1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory(require("react"), require("react-dom"), require("react-addons-transition-group"));
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define("Reactstrap", ["react", "react-dom", "react-addons-transition-group"], factory);
|
6 | else if(typeof exports === 'object')
|
7 | exports["Reactstrap"] = factory(require("react"), require("react-dom"), require("react-addons-transition-group"));
|
8 | else
|
9 | root["Reactstrap"] = factory(root["React"], root["ReactDOM"], root["React"]["addons"]["TransitionGroup"]);
|
10 | })(this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_60__, __WEBPACK_EXTERNAL_MODULE_268__) {
|
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 | module.exports = __webpack_require__(165);
|
58 |
|
59 |
|
60 | },
|
61 |
|
62 | function(module, exports) {
|
63 |
|
64 | module.exports = __WEBPACK_EXTERNAL_MODULE_1__;
|
65 |
|
66 | },
|
67 |
|
68 | function(module, exports, __webpack_require__) {
|
69 |
|
70 | var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; |
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 | (function () {
|
78 | 'use strict';
|
79 |
|
80 | var hasOwn = {}.hasOwnProperty;
|
81 |
|
82 | function classNames () {
|
83 | var classes = [];
|
84 |
|
85 | for (var i = 0; i < arguments.length; i++) {
|
86 | var arg = arguments[i];
|
87 | if (!arg) continue;
|
88 |
|
89 | var argType = typeof arg;
|
90 |
|
91 | if (argType === 'string' || argType === 'number') {
|
92 | classes.push(arg);
|
93 | } else if (Array.isArray(arg)) {
|
94 | classes.push(classNames.apply(null, arg));
|
95 | } else if (argType === 'object') {
|
96 | for (var key in arg) {
|
97 | if (hasOwn.call(arg, key) && arg[key]) {
|
98 | classes.push(key);
|
99 | }
|
100 | }
|
101 | }
|
102 | }
|
103 |
|
104 | return classes.join(' ');
|
105 | }
|
106 |
|
107 | if (typeof module !== 'undefined' && module.exports) {
|
108 | module.exports = classNames;
|
109 | } else if (true) {
|
110 |
|
111 | !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {
|
112 | return classNames;
|
113 | }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
114 | } else {
|
115 | window.classNames = classNames;
|
116 | }
|
117 | }());
|
118 |
|
119 |
|
120 | },
|
121 |
|
122 | function(module, exports) {
|
123 |
|
124 | 'use strict';
|
125 |
|
126 | Object.defineProperty(exports, "__esModule", {
|
127 | value: true
|
128 | });
|
129 | exports.getTetherAttachments = getTetherAttachments;
|
130 | exports.getScrollbarWidth = getScrollbarWidth;
|
131 | exports.setScrollbarWidth = setScrollbarWidth;
|
132 | exports.isBodyOverflowing = isBodyOverflowing;
|
133 | exports.getOriginalBodyPadding = getOriginalBodyPadding;
|
134 | exports.conditionallyUpdateScrollbar = conditionallyUpdateScrollbar;
|
135 | exports.mapToCssModules = mapToCssModules;
|
136 | function getTetherAttachments(placement) {
|
137 | var attachments = {};
|
138 | switch (placement) {
|
139 | case 'top':
|
140 | case 'top center':
|
141 | attachments = {
|
142 | attachment: 'bottom center',
|
143 | targetAttachment: 'top center'
|
144 | };
|
145 | break;
|
146 | case 'bottom':
|
147 | case 'bottom center':
|
148 | attachments = {
|
149 | attachment: 'top center',
|
150 | targetAttachment: 'bottom center'
|
151 | };
|
152 | break;
|
153 | case 'left':
|
154 | case 'left center':
|
155 | attachments = {
|
156 | attachment: 'middle right',
|
157 | targetAttachment: 'middle left'
|
158 | };
|
159 | break;
|
160 | case 'right':
|
161 | case 'right center':
|
162 | attachments = {
|
163 | attachment: 'middle left',
|
164 | targetAttachment: 'middle right'
|
165 | };
|
166 | break;
|
167 | case 'top left':
|
168 | attachments = {
|
169 | attachment: 'bottom left',
|
170 | targetAttachment: 'top left'
|
171 | };
|
172 | break;
|
173 | case 'top right':
|
174 | attachments = {
|
175 | attachment: 'bottom right',
|
176 | targetAttachment: 'top right'
|
177 | };
|
178 | break;
|
179 | case 'bottom left':
|
180 | attachments = {
|
181 | attachment: 'top left',
|
182 | targetAttachment: 'bottom left'
|
183 | };
|
184 | break;
|
185 | case 'bottom right':
|
186 | attachments = {
|
187 | attachment: 'top right',
|
188 | targetAttachment: 'bottom right'
|
189 | };
|
190 | break;
|
191 | case 'right top':
|
192 | attachments = {
|
193 | attachment: 'top left',
|
194 | targetAttachment: 'top right'
|
195 | };
|
196 | break;
|
197 | case 'right bottom':
|
198 | attachments = {
|
199 | attachment: 'bottom left',
|
200 | targetAttachment: 'bottom right'
|
201 | };
|
202 | break;
|
203 | case 'left top':
|
204 | attachments = {
|
205 | attachment: 'top right',
|
206 | targetAttachment: 'top left'
|
207 | };
|
208 | break;
|
209 | case 'left bottom':
|
210 | attachments = {
|
211 | attachment: 'bottom right',
|
212 | targetAttachment: 'bottom left'
|
213 | };
|
214 | break;
|
215 | default:
|
216 | attachments = {
|
217 | attachment: 'top center',
|
218 | targetAttachment: 'bottom center'
|
219 | };
|
220 | }
|
221 |
|
222 | return attachments;
|
223 | }
|
224 |
|
225 | var tetherAttachements = exports.tetherAttachements = ['top', 'bottom', 'left', 'right', 'top left', 'top center', 'top right', 'right top', 'right middle', 'right bottom', 'bottom right', 'bottom center', 'bottom left', 'left top', 'left middle', 'left bottom'];
|
226 |
|
227 |
|
228 | function getScrollbarWidth() {
|
229 | var scrollDiv = document.createElement('div');
|
230 |
|
231 | scrollDiv.style.position = 'absolute';
|
232 | scrollDiv.style.top = '-9999px';
|
233 | scrollDiv.style.width = '50px';
|
234 | scrollDiv.style.height = '50px';
|
235 | scrollDiv.style.overflow = 'scroll';
|
236 | document.body.appendChild(scrollDiv);
|
237 | var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
238 | document.body.removeChild(scrollDiv);
|
239 | return scrollbarWidth;
|
240 | }
|
241 |
|
242 | function setScrollbarWidth(padding) {
|
243 | document.body.style.paddingRight = padding > 0 ? padding + 'px' : null;
|
244 | }
|
245 |
|
246 | function isBodyOverflowing() {
|
247 | return document.body.clientWidth < window.innerWidth;
|
248 | }
|
249 |
|
250 | function getOriginalBodyPadding() {
|
251 | return parseInt(window.getComputedStyle(document.body, null).getPropertyValue('padding-right') || 0, 10);
|
252 | }
|
253 |
|
254 | function conditionallyUpdateScrollbar() {
|
255 | var scrollbarWidth = getScrollbarWidth();
|
256 |
|
257 | var fixedContent = document.querySelectorAll('.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed')[0];
|
258 | var bodyPadding = fixedContent ? parseInt(fixedContent.style.paddingRight || 0, 10) : 0;
|
259 |
|
260 | if (isBodyOverflowing()) {
|
261 | setScrollbarWidth(bodyPadding + scrollbarWidth);
|
262 | }
|
263 | }
|
264 |
|
265 | function mapToCssModules(className, cssModule) {
|
266 | if (!cssModule) return className;
|
267 | return className.split(' ').map(function (c) {
|
268 | return cssModule[c] || c;
|
269 | }).join(' ');
|
270 | }
|
271 |
|
272 | },
|
273 |
|
274 | function(module, exports, __webpack_require__) {
|
275 |
|
276 | |
277 |
|
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 | 'use strict';
|
287 |
|
288 | |
289 |
|
290 |
|
291 |
|
292 |
|
293 |
|
294 |
|
295 |
|
296 |
|
297 |
|
298 |
|
299 | var validateFormat = function validateFormat(format) {};
|
300 |
|
301 | if (true) {
|
302 | validateFormat = function validateFormat(format) {
|
303 | if (format === undefined) {
|
304 | throw new Error('invariant requires an error message argument');
|
305 | }
|
306 | };
|
307 | }
|
308 |
|
309 | function invariant(condition, format, a, b, c, d, e, f) {
|
310 | validateFormat(format);
|
311 |
|
312 | if (!condition) {
|
313 | var error;
|
314 | if (format === undefined) {
|
315 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
316 | } else {
|
317 | var args = [a, b, c, d, e, f];
|
318 | var argIndex = 0;
|
319 | error = new Error(format.replace(/%s/g, function () {
|
320 | return args[argIndex++];
|
321 | }));
|
322 | error.name = 'Invariant Violation';
|
323 | }
|
324 |
|
325 | error.framesToPop = 1;
|
326 | throw error;
|
327 | }
|
328 | }
|
329 |
|
330 | module.exports = invariant;
|
331 |
|
332 | },
|
333 |
|
334 | function(module, exports, __webpack_require__) {
|
335 |
|
336 | |
337 |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
|
344 |
|
345 |
|
346 | 'use strict';
|
347 |
|
348 | var emptyFunction = __webpack_require__(11);
|
349 |
|
350 | |
351 |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 |
|
357 | var warning = emptyFunction;
|
358 |
|
359 | if (true) {
|
360 | (function () {
|
361 | var printWarning = function printWarning(format) {
|
362 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
363 | args[_key - 1] = arguments[_key];
|
364 | }
|
365 |
|
366 | var argIndex = 0;
|
367 | var message = 'Warning: ' + format.replace(/%s/g, function () {
|
368 | return args[argIndex++];
|
369 | });
|
370 | if (typeof console !== 'undefined') {
|
371 | console.error(message);
|
372 | }
|
373 | try {
|
374 |
|
375 |
|
376 |
|
377 | throw new Error(message);
|
378 | } catch (x) {}
|
379 | };
|
380 |
|
381 | warning = function warning(condition, format) {
|
382 | if (format === undefined) {
|
383 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
384 | }
|
385 |
|
386 | if (format.indexOf('Failed Composite propType: ') === 0) {
|
387 | return;
|
388 | }
|
389 |
|
390 | if (!condition) {
|
391 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
392 | args[_key2 - 2] = arguments[_key2];
|
393 | }
|
394 |
|
395 | printWarning.apply(undefined, [format].concat(args));
|
396 | }
|
397 | };
|
398 | })();
|
399 | }
|
400 |
|
401 | module.exports = warning;
|
402 |
|
403 | },
|
404 |
|
405 | function(module, exports) {
|
406 |
|
407 | |
408 |
|
409 |
|
410 |
|
411 |
|
412 |
|
413 |
|
414 |
|
415 |
|
416 |
|
417 | 'use strict';
|
418 |
|
419 | |
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 |
|
426 | function reactProdInvariant(code) {
|
427 | var argCount = arguments.length - 1;
|
428 |
|
429 | var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
|
430 |
|
431 | for (var argIdx = 0; argIdx < argCount; argIdx++) {
|
432 | message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
|
433 | }
|
434 |
|
435 | message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
|
436 |
|
437 | var error = new Error(message);
|
438 | error.name = 'Invariant Violation';
|
439 | error.framesToPop = 1;
|
440 |
|
441 | throw error;
|
442 | }
|
443 |
|
444 | module.exports = reactProdInvariant;
|
445 |
|
446 | },
|
447 |
|
448 | function(module, exports) {
|
449 |
|
450 | 'use strict';
|
451 |
|
452 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
453 | var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
454 |
|
455 | function toObject(val) {
|
456 | if (val === null || val === undefined) {
|
457 | throw new TypeError('Object.assign cannot be called with null or undefined');
|
458 | }
|
459 |
|
460 | return Object(val);
|
461 | }
|
462 |
|
463 | function shouldUseNative() {
|
464 | try {
|
465 | if (!Object.assign) {
|
466 | return false;
|
467 | }
|
468 |
|
469 |
|
470 |
|
471 |
|
472 | var test1 = new String('abc');
|
473 | test1[5] = 'de';
|
474 | if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
475 | return false;
|
476 | }
|
477 |
|
478 |
|
479 | var test2 = {};
|
480 | for (var i = 0; i < 10; i++) {
|
481 | test2['_' + String.fromCharCode(i)] = i;
|
482 | }
|
483 | var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
484 | return test2[n];
|
485 | });
|
486 | if (order2.join('') !== '0123456789') {
|
487 | return false;
|
488 | }
|
489 |
|
490 |
|
491 | var test3 = {};
|
492 | 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
493 | test3[letter] = letter;
|
494 | });
|
495 | if (Object.keys(Object.assign({}, test3)).join('') !==
|
496 | 'abcdefghijklmnopqrst') {
|
497 | return false;
|
498 | }
|
499 |
|
500 | return true;
|
501 | } catch (e) {
|
502 |
|
503 | return false;
|
504 | }
|
505 | }
|
506 |
|
507 | module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
508 | var from;
|
509 | var to = toObject(target);
|
510 | var symbols;
|
511 |
|
512 | for (var s = 1; s < arguments.length; s++) {
|
513 | from = Object(arguments[s]);
|
514 |
|
515 | for (var key in from) {
|
516 | if (hasOwnProperty.call(from, key)) {
|
517 | to[key] = from[key];
|
518 | }
|
519 | }
|
520 |
|
521 | if (Object.getOwnPropertySymbols) {
|
522 | symbols = Object.getOwnPropertySymbols(from);
|
523 | for (var i = 0; i < symbols.length; i++) {
|
524 | if (propIsEnumerable.call(from, symbols[i])) {
|
525 | to[symbols[i]] = from[symbols[i]];
|
526 | }
|
527 | }
|
528 | }
|
529 | }
|
530 |
|
531 | return to;
|
532 | };
|
533 |
|
534 |
|
535 | },
|
536 |
|
537 | function(module, exports, __webpack_require__) {
|
538 |
|
539 | |
540 |
|
541 |
|
542 |
|
543 |
|
544 |
|
545 |
|
546 |
|
547 |
|
548 |
|
549 | 'use strict';
|
550 |
|
551 | var _prodInvariant = __webpack_require__(6);
|
552 |
|
553 | var DOMProperty = __webpack_require__(17);
|
554 | var ReactDOMComponentFlags = __webpack_require__(75);
|
555 |
|
556 | var invariant = __webpack_require__(4);
|
557 |
|
558 | var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
|
559 | var Flags = ReactDOMComponentFlags;
|
560 |
|
561 | var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
|
562 |
|
563 | |
564 |
|
565 |
|
566 |
|
567 |
|
568 |
|
569 |
|
570 | function getRenderedHostOrTextFromComponent(component) {
|
571 | var rendered;
|
572 | while (rendered = component._renderedComponent) {
|
573 | component = rendered;
|
574 | }
|
575 | return component;
|
576 | }
|
577 |
|
578 | |
579 |
|
580 |
|
581 |
|
582 | function precacheNode(inst, node) {
|
583 | var hostInst = getRenderedHostOrTextFromComponent(inst);
|
584 | hostInst._hostNode = node;
|
585 | node[internalInstanceKey] = hostInst;
|
586 | }
|
587 |
|
588 | function uncacheNode(inst) {
|
589 | var node = inst._hostNode;
|
590 | if (node) {
|
591 | delete node[internalInstanceKey];
|
592 | inst._hostNode = null;
|
593 | }
|
594 | }
|
595 |
|
596 | |
597 |
|
598 |
|
599 |
|
600 |
|
601 |
|
602 |
|
603 |
|
604 |
|
605 |
|
606 |
|
607 |
|
608 |
|
609 |
|
610 | function precacheChildNodes(inst, node) {
|
611 | if (inst._flags & Flags.hasCachedChildNodes) {
|
612 | return;
|
613 | }
|
614 | var children = inst._renderedChildren;
|
615 | var childNode = node.firstChild;
|
616 | outer: for (var name in children) {
|
617 | if (!children.hasOwnProperty(name)) {
|
618 | continue;
|
619 | }
|
620 | var childInst = children[name];
|
621 | var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
|
622 | if (childID === 0) {
|
623 |
|
624 | continue;
|
625 | }
|
626 |
|
627 | for (; childNode !== null; childNode = childNode.nextSibling) {
|
628 | if (childNode.nodeType === 1 && childNode.getAttribute(ATTR_NAME) === String(childID) || childNode.nodeType === 8 && childNode.nodeValue === ' react-text: ' + childID + ' ' || childNode.nodeType === 8 && childNode.nodeValue === ' react-empty: ' + childID + ' ') {
|
629 | precacheNode(childInst, childNode);
|
630 | continue outer;
|
631 | }
|
632 | }
|
633 |
|
634 | true ? true ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;
|
635 | }
|
636 | inst._flags |= Flags.hasCachedChildNodes;
|
637 | }
|
638 |
|
639 | |
640 |
|
641 |
|
642 |
|
643 | function getClosestInstanceFromNode(node) {
|
644 | if (node[internalInstanceKey]) {
|
645 | return node[internalInstanceKey];
|
646 | }
|
647 |
|
648 |
|
649 | var parents = [];
|
650 | while (!node[internalInstanceKey]) {
|
651 | parents.push(node);
|
652 | if (node.parentNode) {
|
653 | node = node.parentNode;
|
654 | } else {
|
655 |
|
656 |
|
657 | return null;
|
658 | }
|
659 | }
|
660 |
|
661 | var closest;
|
662 | var inst;
|
663 | for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {
|
664 | closest = inst;
|
665 | if (parents.length) {
|
666 | precacheChildNodes(inst, node);
|
667 | }
|
668 | }
|
669 |
|
670 | return closest;
|
671 | }
|
672 |
|
673 | |
674 |
|
675 |
|
676 |
|
677 | function getInstanceFromNode(node) {
|
678 | var inst = getClosestInstanceFromNode(node);
|
679 | if (inst != null && inst._hostNode === node) {
|
680 | return inst;
|
681 | } else {
|
682 | return null;
|
683 | }
|
684 | }
|
685 |
|
686 | |
687 |
|
688 |
|
689 |
|
690 | function getNodeFromInstance(inst) {
|
691 |
|
692 |
|
693 | !(inst._hostNode !== undefined) ? true ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
694 |
|
695 | if (inst._hostNode) {
|
696 | return inst._hostNode;
|
697 | }
|
698 |
|
699 |
|
700 | var parents = [];
|
701 | while (!inst._hostNode) {
|
702 | parents.push(inst);
|
703 | !inst._hostParent ? true ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;
|
704 | inst = inst._hostParent;
|
705 | }
|
706 |
|
707 |
|
708 |
|
709 | for (; parents.length; inst = parents.pop()) {
|
710 | precacheChildNodes(inst, inst._hostNode);
|
711 | }
|
712 |
|
713 | return inst._hostNode;
|
714 | }
|
715 |
|
716 | var ReactDOMComponentTree = {
|
717 | getClosestInstanceFromNode: getClosestInstanceFromNode,
|
718 | getInstanceFromNode: getInstanceFromNode,
|
719 | getNodeFromInstance: getNodeFromInstance,
|
720 | precacheChildNodes: precacheChildNodes,
|
721 | precacheNode: precacheNode,
|
722 | uncacheNode: uncacheNode
|
723 | };
|
724 |
|
725 | module.exports = ReactDOMComponentTree;
|
726 |
|
727 | },
|
728 |
|
729 | function(module, exports) {
|
730 |
|
731 | |
732 |
|
733 |
|
734 |
|
735 |
|
736 |
|
737 |
|
738 |
|
739 |
|
740 |
|
741 | 'use strict';
|
742 |
|
743 | var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
744 |
|
745 | |
746 |
|
747 |
|
748 |
|
749 |
|
750 |
|
751 | var ExecutionEnvironment = {
|
752 |
|
753 | canUseDOM: canUseDOM,
|
754 |
|
755 | canUseWorkers: typeof Worker !== 'undefined',
|
756 |
|
757 | canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
|
758 |
|
759 | canUseViewport: canUseDOM && !!window.screen,
|
760 |
|
761 | isInWorker: !canUseDOM
|
762 |
|
763 | };
|
764 |
|
765 | module.exports = ExecutionEnvironment;
|
766 |
|
767 | },
|
768 |
|
769 | function(module, exports, __webpack_require__) {
|
770 |
|
771 | |
772 |
|
773 |
|
774 |
|
775 |
|
776 |
|
777 |
|
778 |
|
779 |
|
780 |
|
781 |
|
782 | 'use strict';
|
783 |
|
784 | var _prodInvariant = __webpack_require__(23);
|
785 |
|
786 | var ReactCurrentOwner = __webpack_require__(16);
|
787 |
|
788 | var invariant = __webpack_require__(4);
|
789 | var warning = __webpack_require__(5);
|
790 |
|
791 | function isNative(fn) {
|
792 |
|
793 | var funcToString = Function.prototype.toString;
|
794 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
795 | var reIsNative = RegExp('^' + funcToString
|
796 |
|
797 | .call(hasOwnProperty)
|
798 |
|
799 | .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
|
800 |
|
801 | .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
802 | try {
|
803 | var source = funcToString.call(fn);
|
804 | return reIsNative.test(source);
|
805 | } catch (err) {
|
806 | return false;
|
807 | }
|
808 | }
|
809 |
|
810 | var canUseCollections =
|
811 |
|
812 | typeof Array.from === 'function' &&
|
813 |
|
814 | typeof Map === 'function' && isNative(Map) &&
|
815 |
|
816 | Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
|
817 |
|
818 | typeof Set === 'function' && isNative(Set) &&
|
819 |
|
820 | Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
|
821 |
|
822 | var setItem;
|
823 | var getItem;
|
824 | var removeItem;
|
825 | var getItemIDs;
|
826 | var addRoot;
|
827 | var removeRoot;
|
828 | var getRootIDs;
|
829 |
|
830 | if (canUseCollections) {
|
831 | var itemMap = new Map();
|
832 | var rootIDSet = new Set();
|
833 |
|
834 | setItem = function (id, item) {
|
835 | itemMap.set(id, item);
|
836 | };
|
837 | getItem = function (id) {
|
838 | return itemMap.get(id);
|
839 | };
|
840 | removeItem = function (id) {
|
841 | itemMap['delete'](id);
|
842 | };
|
843 | getItemIDs = function () {
|
844 | return Array.from(itemMap.keys());
|
845 | };
|
846 |
|
847 | addRoot = function (id) {
|
848 | rootIDSet.add(id);
|
849 | };
|
850 | removeRoot = function (id) {
|
851 | rootIDSet['delete'](id);
|
852 | };
|
853 | getRootIDs = function () {
|
854 | return Array.from(rootIDSet.keys());
|
855 | };
|
856 | } else {
|
857 | var itemByKey = {};
|
858 | var rootByKey = {};
|
859 |
|
860 |
|
861 |
|
862 | var getKeyFromID = function (id) {
|
863 | return '.' + id;
|
864 | };
|
865 | var getIDFromKey = function (key) {
|
866 | return parseInt(key.substr(1), 10);
|
867 | };
|
868 |
|
869 | setItem = function (id, item) {
|
870 | var key = getKeyFromID(id);
|
871 | itemByKey[key] = item;
|
872 | };
|
873 | getItem = function (id) {
|
874 | var key = getKeyFromID(id);
|
875 | return itemByKey[key];
|
876 | };
|
877 | removeItem = function (id) {
|
878 | var key = getKeyFromID(id);
|
879 | delete itemByKey[key];
|
880 | };
|
881 | getItemIDs = function () {
|
882 | return Object.keys(itemByKey).map(getIDFromKey);
|
883 | };
|
884 |
|
885 | addRoot = function (id) {
|
886 | var key = getKeyFromID(id);
|
887 | rootByKey[key] = true;
|
888 | };
|
889 | removeRoot = function (id) {
|
890 | var key = getKeyFromID(id);
|
891 | delete rootByKey[key];
|
892 | };
|
893 | getRootIDs = function () {
|
894 | return Object.keys(rootByKey).map(getIDFromKey);
|
895 | };
|
896 | }
|
897 |
|
898 | var unmountedIDs = [];
|
899 |
|
900 | function purgeDeep(id) {
|
901 | var item = getItem(id);
|
902 | if (item) {
|
903 | var childIDs = item.childIDs;
|
904 |
|
905 | removeItem(id);
|
906 | childIDs.forEach(purgeDeep);
|
907 | }
|
908 | }
|
909 |
|
910 | function describeComponentFrame(name, source, ownerName) {
|
911 | return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
|
912 | }
|
913 |
|
914 | function getDisplayName(element) {
|
915 | if (element == null) {
|
916 | return '#empty';
|
917 | } else if (typeof element === 'string' || typeof element === 'number') {
|
918 | return '#text';
|
919 | } else if (typeof element.type === 'string') {
|
920 | return element.type;
|
921 | } else {
|
922 | return element.type.displayName || element.type.name || 'Unknown';
|
923 | }
|
924 | }
|
925 |
|
926 | function describeID(id) {
|
927 | var name = ReactComponentTreeHook.getDisplayName(id);
|
928 | var element = ReactComponentTreeHook.getElement(id);
|
929 | var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
930 | var ownerName;
|
931 | if (ownerID) {
|
932 | ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
|
933 | }
|
934 | true ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
|
935 | return describeComponentFrame(name, element && element._source, ownerName);
|
936 | }
|
937 |
|
938 | var ReactComponentTreeHook = {
|
939 | onSetChildren: function (id, nextChildIDs) {
|
940 | var item = getItem(id);
|
941 | !item ? true ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
|
942 | item.childIDs = nextChildIDs;
|
943 |
|
944 | for (var i = 0; i < nextChildIDs.length; i++) {
|
945 | var nextChildID = nextChildIDs[i];
|
946 | var nextChild = getItem(nextChildID);
|
947 | !nextChild ? true ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
|
948 | !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? true ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
|
949 | !nextChild.isMounted ? true ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
|
950 | if (nextChild.parentID == null) {
|
951 | nextChild.parentID = id;
|
952 |
|
953 |
|
954 |
|
955 | }
|
956 | !(nextChild.parentID === id) ? true ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;
|
957 | }
|
958 | },
|
959 | onBeforeMountComponent: function (id, element, parentID) {
|
960 | var item = {
|
961 | element: element,
|
962 | parentID: parentID,
|
963 | text: null,
|
964 | childIDs: [],
|
965 | isMounted: false,
|
966 | updateCount: 0
|
967 | };
|
968 | setItem(id, item);
|
969 | },
|
970 | onBeforeUpdateComponent: function (id, element) {
|
971 | var item = getItem(id);
|
972 | if (!item || !item.isMounted) {
|
973 |
|
974 |
|
975 | return;
|
976 | }
|
977 | item.element = element;
|
978 | },
|
979 | onMountComponent: function (id) {
|
980 | var item = getItem(id);
|
981 | !item ? true ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
|
982 | item.isMounted = true;
|
983 | var isRoot = item.parentID === 0;
|
984 | if (isRoot) {
|
985 | addRoot(id);
|
986 | }
|
987 | },
|
988 | onUpdateComponent: function (id) {
|
989 | var item = getItem(id);
|
990 | if (!item || !item.isMounted) {
|
991 |
|
992 |
|
993 | return;
|
994 | }
|
995 | item.updateCount++;
|
996 | },
|
997 | onUnmountComponent: function (id) {
|
998 | var item = getItem(id);
|
999 | if (item) {
|
1000 |
|
1001 |
|
1002 |
|
1003 |
|
1004 |
|
1005 | item.isMounted = false;
|
1006 | var isRoot = item.parentID === 0;
|
1007 | if (isRoot) {
|
1008 | removeRoot(id);
|
1009 | }
|
1010 | }
|
1011 | unmountedIDs.push(id);
|
1012 | },
|
1013 | purgeUnmountedComponents: function () {
|
1014 | if (ReactComponentTreeHook._preventPurging) {
|
1015 |
|
1016 | return;
|
1017 | }
|
1018 |
|
1019 | for (var i = 0; i < unmountedIDs.length; i++) {
|
1020 | var id = unmountedIDs[i];
|
1021 | purgeDeep(id);
|
1022 | }
|
1023 | unmountedIDs.length = 0;
|
1024 | },
|
1025 | isMounted: function (id) {
|
1026 | var item = getItem(id);
|
1027 | return item ? item.isMounted : false;
|
1028 | },
|
1029 | getCurrentStackAddendum: function (topElement) {
|
1030 | var info = '';
|
1031 | if (topElement) {
|
1032 | var name = getDisplayName(topElement);
|
1033 | var owner = topElement._owner;
|
1034 | info += describeComponentFrame(name, topElement._source, owner && owner.getName());
|
1035 | }
|
1036 |
|
1037 | var currentOwner = ReactCurrentOwner.current;
|
1038 | var id = currentOwner && currentOwner._debugID;
|
1039 |
|
1040 | info += ReactComponentTreeHook.getStackAddendumByID(id);
|
1041 | return info;
|
1042 | },
|
1043 | getStackAddendumByID: function (id) {
|
1044 | var info = '';
|
1045 | while (id) {
|
1046 | info += describeID(id);
|
1047 | id = ReactComponentTreeHook.getParentID(id);
|
1048 | }
|
1049 | return info;
|
1050 | },
|
1051 | getChildIDs: function (id) {
|
1052 | var item = getItem(id);
|
1053 | return item ? item.childIDs : [];
|
1054 | },
|
1055 | getDisplayName: function (id) {
|
1056 | var element = ReactComponentTreeHook.getElement(id);
|
1057 | if (!element) {
|
1058 | return null;
|
1059 | }
|
1060 | return getDisplayName(element);
|
1061 | },
|
1062 | getElement: function (id) {
|
1063 | var item = getItem(id);
|
1064 | return item ? item.element : null;
|
1065 | },
|
1066 | getOwnerID: function (id) {
|
1067 | var element = ReactComponentTreeHook.getElement(id);
|
1068 | if (!element || !element._owner) {
|
1069 | return null;
|
1070 | }
|
1071 | return element._owner._debugID;
|
1072 | },
|
1073 | getParentID: function (id) {
|
1074 | var item = getItem(id);
|
1075 | return item ? item.parentID : null;
|
1076 | },
|
1077 | getSource: function (id) {
|
1078 | var item = getItem(id);
|
1079 | var element = item ? item.element : null;
|
1080 | var source = element != null ? element._source : null;
|
1081 | return source;
|
1082 | },
|
1083 | getText: function (id) {
|
1084 | var element = ReactComponentTreeHook.getElement(id);
|
1085 | if (typeof element === 'string') {
|
1086 | return element;
|
1087 | } else if (typeof element === 'number') {
|
1088 | return '' + element;
|
1089 | } else {
|
1090 | return null;
|
1091 | }
|
1092 | },
|
1093 | getUpdateCount: function (id) {
|
1094 | var item = getItem(id);
|
1095 | return item ? item.updateCount : 0;
|
1096 | },
|
1097 |
|
1098 |
|
1099 | getRootIDs: getRootIDs,
|
1100 | getRegisteredIDs: getItemIDs
|
1101 | };
|
1102 |
|
1103 | module.exports = ReactComponentTreeHook;
|
1104 |
|
1105 | },
|
1106 |
|
1107 | function(module, exports) {
|
1108 |
|
1109 | "use strict";
|
1110 |
|
1111 | |
1112 |
|
1113 |
|
1114 |
|
1115 |
|
1116 |
|
1117 |
|
1118 |
|
1119 |
|
1120 |
|
1121 |
|
1122 | function makeEmptyFunction(arg) {
|
1123 | return function () {
|
1124 | return arg;
|
1125 | };
|
1126 | }
|
1127 |
|
1128 | |
1129 |
|
1130 |
|
1131 |
|
1132 |
|
1133 | var emptyFunction = function emptyFunction() {};
|
1134 |
|
1135 | emptyFunction.thatReturns = makeEmptyFunction;
|
1136 | emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
|
1137 | emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
|
1138 | emptyFunction.thatReturnsNull = makeEmptyFunction(null);
|
1139 | emptyFunction.thatReturnsThis = function () {
|
1140 | return this;
|
1141 | };
|
1142 | emptyFunction.thatReturnsArgument = function (arg) {
|
1143 | return arg;
|
1144 | };
|
1145 |
|
1146 | module.exports = emptyFunction;
|
1147 |
|
1148 | },
|
1149 |
|
1150 | function(module, exports, __webpack_require__) {
|
1151 |
|
1152 | |
1153 |
|
1154 |
|
1155 |
|
1156 |
|
1157 |
|
1158 |
|
1159 |
|
1160 |
|
1161 |
|
1162 |
|
1163 | 'use strict';
|
1164 |
|
1165 |
|
1166 |
|
1167 | var debugTool = null;
|
1168 |
|
1169 | if (true) {
|
1170 | var ReactDebugTool = __webpack_require__(77);
|
1171 | debugTool = ReactDebugTool;
|
1172 | }
|
1173 |
|
1174 | module.exports = { debugTool: debugTool };
|
1175 |
|
1176 | },
|
1177 |
|
1178 | function(module, exports, __webpack_require__) {
|
1179 |
|
1180 | |
1181 |
|
1182 |
|
1183 |
|
1184 |
|
1185 |
|
1186 |
|
1187 |
|
1188 |
|
1189 |
|
1190 | 'use strict';
|
1191 |
|
1192 | var _prodInvariant = __webpack_require__(6),
|
1193 | _assign = __webpack_require__(7);
|
1194 |
|
1195 | var CallbackQueue = __webpack_require__(71);
|
1196 | var PooledClass = __webpack_require__(19);
|
1197 | var ReactFeatureFlags = __webpack_require__(80);
|
1198 | var ReactReconciler = __webpack_require__(21);
|
1199 | var Transaction = __webpack_require__(35);
|
1200 |
|
1201 | var invariant = __webpack_require__(4);
|
1202 |
|
1203 | var dirtyComponents = [];
|
1204 | var updateBatchNumber = 0;
|
1205 | var asapCallbackQueue = CallbackQueue.getPooled();
|
1206 | var asapEnqueued = false;
|
1207 |
|
1208 | var batchingStrategy = null;
|
1209 |
|
1210 | function ensureInjected() {
|
1211 | !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? true ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
|
1212 | }
|
1213 |
|
1214 | var NESTED_UPDATES = {
|
1215 | initialize: function () {
|
1216 | this.dirtyComponentsLength = dirtyComponents.length;
|
1217 | },
|
1218 | close: function () {
|
1219 | if (this.dirtyComponentsLength !== dirtyComponents.length) {
|
1220 |
|
1221 |
|
1222 |
|
1223 |
|
1224 |
|
1225 | dirtyComponents.splice(0, this.dirtyComponentsLength);
|
1226 | flushBatchedUpdates();
|
1227 | } else {
|
1228 | dirtyComponents.length = 0;
|
1229 | }
|
1230 | }
|
1231 | };
|
1232 |
|
1233 | var UPDATE_QUEUEING = {
|
1234 | initialize: function () {
|
1235 | this.callbackQueue.reset();
|
1236 | },
|
1237 | close: function () {
|
1238 | this.callbackQueue.notifyAll();
|
1239 | }
|
1240 | };
|
1241 |
|
1242 | var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
|
1243 |
|
1244 | function ReactUpdatesFlushTransaction() {
|
1245 | this.reinitializeTransaction();
|
1246 | this.dirtyComponentsLength = null;
|
1247 | this.callbackQueue = CallbackQueue.getPooled();
|
1248 | this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
|
1249 | true);
|
1250 | }
|
1251 |
|
1252 | _assign(ReactUpdatesFlushTransaction.prototype, Transaction, {
|
1253 | getTransactionWrappers: function () {
|
1254 | return TRANSACTION_WRAPPERS;
|
1255 | },
|
1256 |
|
1257 | destructor: function () {
|
1258 | this.dirtyComponentsLength = null;
|
1259 | CallbackQueue.release(this.callbackQueue);
|
1260 | this.callbackQueue = null;
|
1261 | ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
|
1262 | this.reconcileTransaction = null;
|
1263 | },
|
1264 |
|
1265 | perform: function (method, scope, a) {
|
1266 |
|
1267 |
|
1268 | return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
|
1269 | }
|
1270 | });
|
1271 |
|
1272 | PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
|
1273 |
|
1274 | function batchedUpdates(callback, a, b, c, d, e) {
|
1275 | ensureInjected();
|
1276 | return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
|
1277 | }
|
1278 |
|
1279 | |
1280 |
|
1281 |
|
1282 |
|
1283 |
|
1284 |
|
1285 |
|
1286 | function mountOrderComparator(c1, c2) {
|
1287 | return c1._mountOrder - c2._mountOrder;
|
1288 | }
|
1289 |
|
1290 | function runBatchedUpdates(transaction) {
|
1291 | var len = transaction.dirtyComponentsLength;
|
1292 | !(len === dirtyComponents.length) ? true ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;
|
1293 |
|
1294 |
|
1295 |
|
1296 |
|
1297 | dirtyComponents.sort(mountOrderComparator);
|
1298 |
|
1299 |
|
1300 |
|
1301 |
|
1302 |
|
1303 |
|
1304 | updateBatchNumber++;
|
1305 |
|
1306 | for (var i = 0; i < len; i++) {
|
1307 |
|
1308 |
|
1309 |
|
1310 | var component = dirtyComponents[i];
|
1311 |
|
1312 |
|
1313 |
|
1314 |
|
1315 | var callbacks = component._pendingCallbacks;
|
1316 | component._pendingCallbacks = null;
|
1317 |
|
1318 | var markerName;
|
1319 | if (ReactFeatureFlags.logTopLevelRenders) {
|
1320 | var namedComponent = component;
|
1321 |
|
1322 | if (component._currentElement.type.isReactTopLevelWrapper) {
|
1323 | namedComponent = component._renderedComponent;
|
1324 | }
|
1325 | markerName = 'React update: ' + namedComponent.getName();
|
1326 | console.time(markerName);
|
1327 | }
|
1328 |
|
1329 | ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
|
1330 |
|
1331 | if (markerName) {
|
1332 | console.timeEnd(markerName);
|
1333 | }
|
1334 |
|
1335 | if (callbacks) {
|
1336 | for (var j = 0; j < callbacks.length; j++) {
|
1337 | transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
|
1338 | }
|
1339 | }
|
1340 | }
|
1341 | }
|
1342 |
|
1343 | var flushBatchedUpdates = function () {
|
1344 |
|
1345 |
|
1346 |
|
1347 |
|
1348 | while (dirtyComponents.length || asapEnqueued) {
|
1349 | if (dirtyComponents.length) {
|
1350 | var transaction = ReactUpdatesFlushTransaction.getPooled();
|
1351 | transaction.perform(runBatchedUpdates, null, transaction);
|
1352 | ReactUpdatesFlushTransaction.release(transaction);
|
1353 | }
|
1354 |
|
1355 | if (asapEnqueued) {
|
1356 | asapEnqueued = false;
|
1357 | var queue = asapCallbackQueue;
|
1358 | asapCallbackQueue = CallbackQueue.getPooled();
|
1359 | queue.notifyAll();
|
1360 | CallbackQueue.release(queue);
|
1361 | }
|
1362 | }
|
1363 | };
|
1364 |
|
1365 | |
1366 |
|
1367 |
|
1368 |
|
1369 | function enqueueUpdate(component) {
|
1370 | ensureInjected();
|
1371 |
|
1372 |
|
1373 |
|
1374 |
|
1375 |
|
1376 |
|
1377 |
|
1378 | if (!batchingStrategy.isBatchingUpdates) {
|
1379 | batchingStrategy.batchedUpdates(enqueueUpdate, component);
|
1380 | return;
|
1381 | }
|
1382 |
|
1383 | dirtyComponents.push(component);
|
1384 | if (component._updateBatchNumber == null) {
|
1385 | component._updateBatchNumber = updateBatchNumber + 1;
|
1386 | }
|
1387 | }
|
1388 |
|
1389 | |
1390 |
|
1391 |
|
1392 |
|
1393 | function asap(callback, context) {
|
1394 | !batchingStrategy.isBatchingUpdates ? true ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;
|
1395 | asapCallbackQueue.enqueue(callback, context);
|
1396 | asapEnqueued = true;
|
1397 | }
|
1398 |
|
1399 | var ReactUpdatesInjection = {
|
1400 | injectReconcileTransaction: function (ReconcileTransaction) {
|
1401 | !ReconcileTransaction ? true ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
|
1402 | ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
|
1403 | },
|
1404 |
|
1405 | injectBatchingStrategy: function (_batchingStrategy) {
|
1406 | !_batchingStrategy ? true ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
|
1407 | !(typeof _batchingStrategy.batchedUpdates === 'function') ? true ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
|
1408 | !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? true ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
|
1409 | batchingStrategy = _batchingStrategy;
|
1410 | }
|
1411 | };
|
1412 |
|
1413 | var ReactUpdates = {
|
1414 | |
1415 |
|
1416 |
|
1417 |
|
1418 |
|
1419 |
|
1420 | ReactReconcileTransaction: null,
|
1421 |
|
1422 | batchedUpdates: batchedUpdates,
|
1423 | enqueueUpdate: enqueueUpdate,
|
1424 | flushBatchedUpdates: flushBatchedUpdates,
|
1425 | injection: ReactUpdatesInjection,
|
1426 | asap: asap
|
1427 | };
|
1428 |
|
1429 | module.exports = ReactUpdates;
|
1430 |
|
1431 | },
|
1432 |
|
1433 | function(module, exports, __webpack_require__) {
|
1434 |
|
1435 | |
1436 |
|
1437 |
|
1438 |
|
1439 |
|
1440 |
|
1441 |
|
1442 |
|
1443 |
|
1444 |
|
1445 | 'use strict';
|
1446 |
|
1447 | var _assign = __webpack_require__(7);
|
1448 |
|
1449 | var PooledClass = __webpack_require__(19);
|
1450 |
|
1451 | var emptyFunction = __webpack_require__(11);
|
1452 | var warning = __webpack_require__(5);
|
1453 |
|
1454 | var didWarnForAddedNewProperty = false;
|
1455 | var isProxySupported = typeof Proxy === 'function';
|
1456 |
|
1457 | var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
|
1458 |
|
1459 | |
1460 |
|
1461 |
|
1462 |
|
1463 | var EventInterface = {
|
1464 | type: null,
|
1465 | target: null,
|
1466 |
|
1467 | currentTarget: emptyFunction.thatReturnsNull,
|
1468 | eventPhase: null,
|
1469 | bubbles: null,
|
1470 | cancelable: null,
|
1471 | timeStamp: function (event) {
|
1472 | return event.timeStamp || Date.now();
|
1473 | },
|
1474 | defaultPrevented: null,
|
1475 | isTrusted: null
|
1476 | };
|
1477 |
|
1478 | |
1479 |
|
1480 |
|
1481 |
|
1482 |
|
1483 |
|
1484 |
|
1485 |
|
1486 |
|
1487 |
|
1488 |
|
1489 |
|
1490 |
|
1491 |
|
1492 |
|
1493 |
|
1494 |
|
1495 |
|
1496 | function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
|
1497 | if (true) {
|
1498 |
|
1499 | delete this.nativeEvent;
|
1500 | delete this.preventDefault;
|
1501 | delete this.stopPropagation;
|
1502 | }
|
1503 |
|
1504 | this.dispatchConfig = dispatchConfig;
|
1505 | this._targetInst = targetInst;
|
1506 | this.nativeEvent = nativeEvent;
|
1507 |
|
1508 | var Interface = this.constructor.Interface;
|
1509 | for (var propName in Interface) {
|
1510 | if (!Interface.hasOwnProperty(propName)) {
|
1511 | continue;
|
1512 | }
|
1513 | if (true) {
|
1514 | delete this[propName];
|
1515 | }
|
1516 | var normalize = Interface[propName];
|
1517 | if (normalize) {
|
1518 | this[propName] = normalize(nativeEvent);
|
1519 | } else {
|
1520 | if (propName === 'target') {
|
1521 | this.target = nativeEventTarget;
|
1522 | } else {
|
1523 | this[propName] = nativeEvent[propName];
|
1524 | }
|
1525 | }
|
1526 | }
|
1527 |
|
1528 | var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
|
1529 | if (defaultPrevented) {
|
1530 | this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
|
1531 | } else {
|
1532 | this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
|
1533 | }
|
1534 | this.isPropagationStopped = emptyFunction.thatReturnsFalse;
|
1535 | return this;
|
1536 | }
|
1537 |
|
1538 | _assign(SyntheticEvent.prototype, {
|
1539 |
|
1540 | preventDefault: function () {
|
1541 | this.defaultPrevented = true;
|
1542 | var event = this.nativeEvent;
|
1543 | if (!event) {
|
1544 | return;
|
1545 | }
|
1546 |
|
1547 | if (event.preventDefault) {
|
1548 | event.preventDefault();
|
1549 | } else if (typeof event.returnValue !== 'unknown') {
|
1550 |
|
1551 | event.returnValue = false;
|
1552 | }
|
1553 | this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
|
1554 | },
|
1555 |
|
1556 | stopPropagation: function () {
|
1557 | var event = this.nativeEvent;
|
1558 | if (!event) {
|
1559 | return;
|
1560 | }
|
1561 |
|
1562 | if (event.stopPropagation) {
|
1563 | event.stopPropagation();
|
1564 | } else if (typeof event.cancelBubble !== 'unknown') {
|
1565 |
|
1566 |
|
1567 |
|
1568 |
|
1569 |
|
1570 |
|
1571 | event.cancelBubble = true;
|
1572 | }
|
1573 |
|
1574 | this.isPropagationStopped = emptyFunction.thatReturnsTrue;
|
1575 | },
|
1576 |
|
1577 | |
1578 |
|
1579 |
|
1580 |
|
1581 |
|
1582 | persist: function () {
|
1583 | this.isPersistent = emptyFunction.thatReturnsTrue;
|
1584 | },
|
1585 |
|
1586 | |
1587 |
|
1588 |
|
1589 |
|
1590 |
|
1591 | isPersistent: emptyFunction.thatReturnsFalse,
|
1592 |
|
1593 | |
1594 |
|
1595 |
|
1596 | destructor: function () {
|
1597 | var Interface = this.constructor.Interface;
|
1598 | for (var propName in Interface) {
|
1599 | if (true) {
|
1600 | Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
|
1601 | } else {
|
1602 | this[propName] = null;
|
1603 | }
|
1604 | }
|
1605 | for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
|
1606 | this[shouldBeReleasedProperties[i]] = null;
|
1607 | }
|
1608 | if (true) {
|
1609 | Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
|
1610 | Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
|
1611 | Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
|
1612 | }
|
1613 | }
|
1614 |
|
1615 | });
|
1616 |
|
1617 | SyntheticEvent.Interface = EventInterface;
|
1618 |
|
1619 | if (true) {
|
1620 | if (isProxySupported) {
|
1621 |
|
1622 | SyntheticEvent = new Proxy(SyntheticEvent, {
|
1623 | construct: function (target, args) {
|
1624 | return this.apply(target, Object.create(target.prototype), args);
|
1625 | },
|
1626 | apply: function (constructor, that, args) {
|
1627 | return new Proxy(constructor.apply(that, args), {
|
1628 | set: function (target, prop, value) {
|
1629 | if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
|
1630 | true ? warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
|
1631 | didWarnForAddedNewProperty = true;
|
1632 | }
|
1633 | target[prop] = value;
|
1634 | return true;
|
1635 | }
|
1636 | });
|
1637 | }
|
1638 | });
|
1639 |
|
1640 | }
|
1641 | }
|
1642 | |
1643 |
|
1644 |
|
1645 |
|
1646 |
|
1647 |
|
1648 | SyntheticEvent.augmentClass = function (Class, Interface) {
|
1649 | var Super = this;
|
1650 |
|
1651 | var E = function () {};
|
1652 | E.prototype = Super.prototype;
|
1653 | var prototype = new E();
|
1654 |
|
1655 | _assign(prototype, Class.prototype);
|
1656 | Class.prototype = prototype;
|
1657 | Class.prototype.constructor = Class;
|
1658 |
|
1659 | Class.Interface = _assign({}, Super.Interface, Interface);
|
1660 | Class.augmentClass = Super.augmentClass;
|
1661 |
|
1662 | PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
|
1663 | };
|
1664 |
|
1665 | PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);
|
1666 |
|
1667 | module.exports = SyntheticEvent;
|
1668 |
|
1669 | |
1670 |
|
1671 |
|
1672 |
|
1673 |
|
1674 |
|
1675 |
|
1676 | function getPooledWarningPropertyDefinition(propName, getVal) {
|
1677 | var isFunction = typeof getVal === 'function';
|
1678 | return {
|
1679 | configurable: true,
|
1680 | set: set,
|
1681 | get: get
|
1682 | };
|
1683 |
|
1684 | function set(val) {
|
1685 | var action = isFunction ? 'setting the method' : 'setting the property';
|
1686 | warn(action, 'This is effectively a no-op');
|
1687 | return val;
|
1688 | }
|
1689 |
|
1690 | function get() {
|
1691 | var action = isFunction ? 'accessing the method' : 'accessing the property';
|
1692 | var result = isFunction ? 'This is a no-op function' : 'This is set to null';
|
1693 | warn(action, result);
|
1694 | return getVal;
|
1695 | }
|
1696 |
|
1697 | function warn(action, result) {
|
1698 | var warningCondition = false;
|
1699 | true ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\'re seeing this, ' + 'you\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
|
1700 | }
|
1701 | }
|
1702 |
|
1703 | },
|
1704 |
|
1705 | function(module, exports, __webpack_require__) {
|
1706 |
|
1707 | |
1708 |
|
1709 |
|
1710 |
|
1711 |
|
1712 |
|
1713 |
|
1714 |
|
1715 |
|
1716 |
|
1717 | 'use strict';
|
1718 |
|
1719 | var _assign = __webpack_require__(7);
|
1720 |
|
1721 | var ReactChildren = __webpack_require__(256);
|
1722 | var ReactComponent = __webpack_require__(55);
|
1723 | var ReactPureComponent = __webpack_require__(260);
|
1724 | var ReactClass = __webpack_require__(257);
|
1725 | var ReactDOMFactories = __webpack_require__(258);
|
1726 | var ReactElement = __webpack_require__(22);
|
1727 | var ReactPropTypes = __webpack_require__(259);
|
1728 | var ReactVersion = __webpack_require__(264);
|
1729 |
|
1730 | var onlyChild = __webpack_require__(103);
|
1731 | var warning = __webpack_require__(5);
|
1732 |
|
1733 | var createElement = ReactElement.createElement;
|
1734 | var createFactory = ReactElement.createFactory;
|
1735 | var cloneElement = ReactElement.cloneElement;
|
1736 |
|
1737 | if (true) {
|
1738 | var ReactElementValidator = __webpack_require__(101);
|
1739 | createElement = ReactElementValidator.createElement;
|
1740 | createFactory = ReactElementValidator.createFactory;
|
1741 | cloneElement = ReactElementValidator.cloneElement;
|
1742 | }
|
1743 |
|
1744 | var __spread = _assign;
|
1745 |
|
1746 | if (true) {
|
1747 | var warned = false;
|
1748 | __spread = function () {
|
1749 | true ? warning(warned, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.') : void 0;
|
1750 | warned = true;
|
1751 | return _assign.apply(null, arguments);
|
1752 | };
|
1753 | }
|
1754 |
|
1755 | var React = {
|
1756 |
|
1757 |
|
1758 |
|
1759 | Children: {
|
1760 | map: ReactChildren.map,
|
1761 | forEach: ReactChildren.forEach,
|
1762 | count: ReactChildren.count,
|
1763 | toArray: ReactChildren.toArray,
|
1764 | only: onlyChild
|
1765 | },
|
1766 |
|
1767 | Component: ReactComponent,
|
1768 | PureComponent: ReactPureComponent,
|
1769 |
|
1770 | createElement: createElement,
|
1771 | cloneElement: cloneElement,
|
1772 | isValidElement: ReactElement.isValidElement,
|
1773 |
|
1774 |
|
1775 |
|
1776 | PropTypes: ReactPropTypes,
|
1777 | createClass: ReactClass.createClass,
|
1778 | createFactory: createFactory,
|
1779 | createMixin: function (mixin) {
|
1780 |
|
1781 | return mixin;
|
1782 | },
|
1783 |
|
1784 |
|
1785 |
|
1786 | DOM: ReactDOMFactories,
|
1787 |
|
1788 | version: ReactVersion,
|
1789 |
|
1790 |
|
1791 | __spread: __spread
|
1792 | };
|
1793 |
|
1794 | module.exports = React;
|
1795 |
|
1796 | },
|
1797 |
|
1798 | function(module, exports) {
|
1799 |
|
1800 | |
1801 |
|
1802 |
|
1803 |
|
1804 |
|
1805 |
|
1806 |
|
1807 |
|
1808 |
|
1809 |
|
1810 |
|
1811 | 'use strict';
|
1812 |
|
1813 | |
1814 |
|
1815 |
|
1816 |
|
1817 |
|
1818 |
|
1819 | var ReactCurrentOwner = {
|
1820 |
|
1821 | |
1822 |
|
1823 |
|
1824 |
|
1825 | current: null
|
1826 |
|
1827 | };
|
1828 |
|
1829 | module.exports = ReactCurrentOwner;
|
1830 |
|
1831 | },
|
1832 |
|
1833 | function(module, exports, __webpack_require__) {
|
1834 |
|
1835 | |
1836 |
|
1837 |
|
1838 |
|
1839 |
|
1840 |
|
1841 |
|
1842 |
|
1843 |
|
1844 |
|
1845 | 'use strict';
|
1846 |
|
1847 | var _prodInvariant = __webpack_require__(6);
|
1848 |
|
1849 | var invariant = __webpack_require__(4);
|
1850 |
|
1851 | function checkMask(value, bitmask) {
|
1852 | return (value & bitmask) === bitmask;
|
1853 | }
|
1854 |
|
1855 | var DOMPropertyInjection = {
|
1856 | |
1857 |
|
1858 |
|
1859 |
|
1860 | MUST_USE_PROPERTY: 0x1,
|
1861 | HAS_BOOLEAN_VALUE: 0x4,
|
1862 | HAS_NUMERIC_VALUE: 0x8,
|
1863 | HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
|
1864 | HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
|
1865 |
|
1866 | |
1867 |
|
1868 |
|
1869 |
|
1870 |
|
1871 |
|
1872 |
|
1873 |
|
1874 |
|
1875 |
|
1876 |
|
1877 |
|
1878 |
|
1879 |
|
1880 |
|
1881 |
|
1882 |
|
1883 |
|
1884 |
|
1885 |
|
1886 |
|
1887 |
|
1888 |
|
1889 |
|
1890 |
|
1891 |
|
1892 |
|
1893 |
|
1894 | injectDOMPropertyConfig: function (domPropertyConfig) {
|
1895 | var Injection = DOMPropertyInjection;
|
1896 | var Properties = domPropertyConfig.Properties || {};
|
1897 | var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
|
1898 | var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
|
1899 | var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
|
1900 | var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
|
1901 |
|
1902 | if (domPropertyConfig.isCustomAttribute) {
|
1903 | DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
|
1904 | }
|
1905 |
|
1906 | for (var propName in Properties) {
|
1907 | !!DOMProperty.properties.hasOwnProperty(propName) ? true ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
|
1908 |
|
1909 | var lowerCased = propName.toLowerCase();
|
1910 | var propConfig = Properties[propName];
|
1911 |
|
1912 | var propertyInfo = {
|
1913 | attributeName: lowerCased,
|
1914 | attributeNamespace: null,
|
1915 | propertyName: propName,
|
1916 | mutationMethod: null,
|
1917 |
|
1918 | mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
|
1919 | hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
|
1920 | hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
|
1921 | hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
|
1922 | hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
|
1923 | };
|
1924 | !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? true ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
|
1925 |
|
1926 | if (true) {
|
1927 | DOMProperty.getPossibleStandardName[lowerCased] = propName;
|
1928 | }
|
1929 |
|
1930 | if (DOMAttributeNames.hasOwnProperty(propName)) {
|
1931 | var attributeName = DOMAttributeNames[propName];
|
1932 | propertyInfo.attributeName = attributeName;
|
1933 | if (true) {
|
1934 | DOMProperty.getPossibleStandardName[attributeName] = propName;
|
1935 | }
|
1936 | }
|
1937 |
|
1938 | if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
|
1939 | propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
|
1940 | }
|
1941 |
|
1942 | if (DOMPropertyNames.hasOwnProperty(propName)) {
|
1943 | propertyInfo.propertyName = DOMPropertyNames[propName];
|
1944 | }
|
1945 |
|
1946 | if (DOMMutationMethods.hasOwnProperty(propName)) {
|
1947 | propertyInfo.mutationMethod = DOMMutationMethods[propName];
|
1948 | }
|
1949 |
|
1950 | DOMProperty.properties[propName] = propertyInfo;
|
1951 | }
|
1952 | }
|
1953 | };
|
1954 |
|
1955 |
|
1956 | var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
|
1957 |
|
1958 |
|
1959 | |
1960 |
|
1961 |
|
1962 |
|
1963 |
|
1964 |
|
1965 |
|
1966 |
|
1967 |
|
1968 |
|
1969 |
|
1970 |
|
1971 |
|
1972 | var DOMProperty = {
|
1973 |
|
1974 | ID_ATTRIBUTE_NAME: 'data-reactid',
|
1975 | ROOT_ATTRIBUTE_NAME: 'data-reactroot',
|
1976 |
|
1977 | ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
|
1978 | ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
|
1979 |
|
1980 | |
1981 |
|
1982 |
|
1983 |
|
1984 |
|
1985 |
|
1986 |
|
1987 |
|
1988 |
|
1989 |
|
1990 |
|
1991 |
|
1992 |
|
1993 |
|
1994 |
|
1995 |
|
1996 |
|
1997 |
|
1998 |
|
1999 |
|
2000 |
|
2001 |
|
2002 |
|
2003 |
|
2004 |
|
2005 |
|
2006 |
|
2007 |
|
2008 | properties: {},
|
2009 |
|
2010 | |
2011 |
|
2012 |
|
2013 |
|
2014 |
|
2015 |
|
2016 |
|
2017 |
|
2018 |
|
2019 | getPossibleStandardName: true ? { autofocus: 'autoFocus' } : null,
|
2020 |
|
2021 | |
2022 |
|
2023 |
|
2024 | _isCustomAttributeFunctions: [],
|
2025 |
|
2026 | |
2027 |
|
2028 |
|
2029 |
|
2030 | isCustomAttribute: function (attributeName) {
|
2031 | for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
|
2032 | var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
|
2033 | if (isCustomAttributeFn(attributeName)) {
|
2034 | return true;
|
2035 | }
|
2036 | }
|
2037 | return false;
|
2038 | },
|
2039 |
|
2040 | injection: DOMPropertyInjection
|
2041 | };
|
2042 |
|
2043 | module.exports = DOMProperty;
|
2044 |
|
2045 | },
|
2046 |
|
2047 | function(module, exports) {
|
2048 |
|
2049 | (function(global) { |
2050 |
|
2051 |
|
2052 |
|
2053 |
|
2054 |
|
2055 |
|
2056 |
|
2057 |
|
2058 |
|
2059 | var LARGE_ARRAY_SIZE = 200;
|
2060 |
|
2061 |
|
2062 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
2063 |
|
2064 |
|
2065 | var INFINITY = 1 / 0,
|
2066 | MAX_SAFE_INTEGER = 9007199254740991;
|
2067 |
|
2068 |
|
2069 | var argsTag = '[object Arguments]',
|
2070 | funcTag = '[object Function]',
|
2071 | genTag = '[object GeneratorFunction]',
|
2072 | symbolTag = '[object Symbol]';
|
2073 |
|
2074 | |
2075 |
|
2076 |
|
2077 |
|
2078 | var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
2079 |
|
2080 |
|
2081 | var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
2082 |
|
2083 |
|
2084 | var reIsUint = /^(?:0|[1-9]\d*)$/;
|
2085 |
|
2086 |
|
2087 | var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
2088 |
|
2089 |
|
2090 | var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
2091 |
|
2092 |
|
2093 | var root = freeGlobal || freeSelf || Function('return this')();
|
2094 |
|
2095 | |
2096 |
|
2097 |
|
2098 |
|
2099 |
|
2100 |
|
2101 |
|
2102 |
|
2103 |
|
2104 |
|
2105 | function apply(func, thisArg, args) {
|
2106 | switch (args.length) {
|
2107 | case 0: return func.call(thisArg);
|
2108 | case 1: return func.call(thisArg, args[0]);
|
2109 | case 2: return func.call(thisArg, args[0], args[1]);
|
2110 | case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
2111 | }
|
2112 | return func.apply(thisArg, args);
|
2113 | }
|
2114 |
|
2115 | |
2116 |
|
2117 |
|
2118 |
|
2119 |
|
2120 |
|
2121 |
|
2122 |
|
2123 |
|
2124 | function arrayIncludes(array, value) {
|
2125 | var length = array ? array.length : 0;
|
2126 | return !!length && baseIndexOf(array, value, 0) > -1;
|
2127 | }
|
2128 |
|
2129 | |
2130 |
|
2131 |
|
2132 |
|
2133 |
|
2134 |
|
2135 |
|
2136 |
|
2137 |
|
2138 | function arrayIncludesWith(array, value, comparator) {
|
2139 | var index = -1,
|
2140 | length = array ? array.length : 0;
|
2141 |
|
2142 | while (++index < length) {
|
2143 | if (comparator(value, array[index])) {
|
2144 | return true;
|
2145 | }
|
2146 | }
|
2147 | return false;
|
2148 | }
|
2149 |
|
2150 | |
2151 |
|
2152 |
|
2153 |
|
2154 |
|
2155 |
|
2156 |
|
2157 |
|
2158 |
|
2159 | function arrayMap(array, iteratee) {
|
2160 | var index = -1,
|
2161 | length = array ? array.length : 0,
|
2162 | result = Array(length);
|
2163 |
|
2164 | while (++index < length) {
|
2165 | result[index] = iteratee(array[index], index, array);
|
2166 | }
|
2167 | return result;
|
2168 | }
|
2169 |
|
2170 | |
2171 |
|
2172 |
|
2173 |
|
2174 |
|
2175 |
|
2176 |
|
2177 |
|
2178 | function arrayPush(array, values) {
|
2179 | var index = -1,
|
2180 | length = values.length,
|
2181 | offset = array.length;
|
2182 |
|
2183 | while (++index < length) {
|
2184 | array[offset + index] = values[index];
|
2185 | }
|
2186 | return array;
|
2187 | }
|
2188 |
|
2189 | |
2190 |
|
2191 |
|
2192 |
|
2193 |
|
2194 |
|
2195 |
|
2196 |
|
2197 |
|
2198 |
|
2199 |
|
2200 | function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
2201 | var length = array.length,
|
2202 | index = fromIndex + (fromRight ? 1 : -1);
|
2203 |
|
2204 | while ((fromRight ? index-- : ++index < length)) {
|
2205 | if (predicate(array[index], index, array)) {
|
2206 | return index;
|
2207 | }
|
2208 | }
|
2209 | return -1;
|
2210 | }
|
2211 |
|
2212 | |
2213 |
|
2214 |
|
2215 |
|
2216 |
|
2217 |
|
2218 |
|
2219 |
|
2220 |
|
2221 | function baseIndexOf(array, value, fromIndex) {
|
2222 | if (value !== value) {
|
2223 | return baseFindIndex(array, baseIsNaN, fromIndex);
|
2224 | }
|
2225 | var index = fromIndex - 1,
|
2226 | length = array.length;
|
2227 |
|
2228 | while (++index < length) {
|
2229 | if (array[index] === value) {
|
2230 | return index;
|
2231 | }
|
2232 | }
|
2233 | return -1;
|
2234 | }
|
2235 |
|
2236 | |
2237 |
|
2238 |
|
2239 |
|
2240 |
|
2241 |
|
2242 |
|
2243 | function baseIsNaN(value) {
|
2244 | return value !== value;
|
2245 | }
|
2246 |
|
2247 | |
2248 |
|
2249 |
|
2250 |
|
2251 |
|
2252 |
|
2253 |
|
2254 |
|
2255 |
|
2256 | function baseTimes(n, iteratee) {
|
2257 | var index = -1,
|
2258 | result = Array(n);
|
2259 |
|
2260 | while (++index < n) {
|
2261 | result[index] = iteratee(index);
|
2262 | }
|
2263 | return result;
|
2264 | }
|
2265 |
|
2266 | |
2267 |
|
2268 |
|
2269 |
|
2270 |
|
2271 |
|
2272 |
|
2273 | function baseUnary(func) {
|
2274 | return function(value) {
|
2275 | return func(value);
|
2276 | };
|
2277 | }
|
2278 |
|
2279 | |
2280 |
|
2281 |
|
2282 |
|
2283 |
|
2284 |
|
2285 |
|
2286 |
|
2287 | function cacheHas(cache, key) {
|
2288 | return cache.has(key);
|
2289 | }
|
2290 |
|
2291 | |
2292 |
|
2293 |
|
2294 |
|
2295 |
|
2296 |
|
2297 |
|
2298 |
|
2299 | function getValue(object, key) {
|
2300 | return object == null ? undefined : object[key];
|
2301 | }
|
2302 |
|
2303 | |
2304 |
|
2305 |
|
2306 |
|
2307 |
|
2308 |
|
2309 |
|
2310 | function isHostObject(value) {
|
2311 |
|
2312 |
|
2313 | var result = false;
|
2314 | if (value != null && typeof value.toString != 'function') {
|
2315 | try {
|
2316 | result = !!(value + '');
|
2317 | } catch (e) {}
|
2318 | }
|
2319 | return result;
|
2320 | }
|
2321 |
|
2322 | |
2323 |
|
2324 |
|
2325 |
|
2326 |
|
2327 |
|
2328 |
|
2329 |
|
2330 | function overArg(func, transform) {
|
2331 | return function(arg) {
|
2332 | return func(transform(arg));
|
2333 | };
|
2334 | }
|
2335 |
|
2336 |
|
2337 | var arrayProto = Array.prototype,
|
2338 | funcProto = Function.prototype,
|
2339 | objectProto = Object.prototype;
|
2340 |
|
2341 |
|
2342 | var coreJsData = root['__core-js_shared__'];
|
2343 |
|
2344 |
|
2345 | var maskSrcKey = (function() {
|
2346 | var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
2347 | return uid ? ('Symbol(src)_1.' + uid) : '';
|
2348 | }());
|
2349 |
|
2350 |
|
2351 | var funcToString = funcProto.toString;
|
2352 |
|
2353 |
|
2354 | var hasOwnProperty = objectProto.hasOwnProperty;
|
2355 |
|
2356 | |
2357 |
|
2358 |
|
2359 |
|
2360 |
|
2361 | var objectToString = objectProto.toString;
|
2362 |
|
2363 |
|
2364 | var reIsNative = RegExp('^' +
|
2365 | funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
2366 | .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
2367 | );
|
2368 |
|
2369 |
|
2370 | var Symbol = root.Symbol,
|
2371 | getPrototype = overArg(Object.getPrototypeOf, Object),
|
2372 | propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
2373 | splice = arrayProto.splice,
|
2374 | spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
2375 |
|
2376 |
|
2377 | var nativeGetSymbols = Object.getOwnPropertySymbols,
|
2378 | nativeMax = Math.max;
|
2379 |
|
2380 |
|
2381 | var Map = getNative(root, 'Map'),
|
2382 | nativeCreate = getNative(Object, 'create');
|
2383 |
|
2384 | |
2385 |
|
2386 |
|
2387 |
|
2388 |
|
2389 |
|
2390 |
|
2391 | function Hash(entries) {
|
2392 | var index = -1,
|
2393 | length = entries ? entries.length : 0;
|
2394 |
|
2395 | this.clear();
|
2396 | while (++index < length) {
|
2397 | var entry = entries[index];
|
2398 | this.set(entry[0], entry[1]);
|
2399 | }
|
2400 | }
|
2401 |
|
2402 | |
2403 |
|
2404 |
|
2405 |
|
2406 |
|
2407 |
|
2408 |
|
2409 | function hashClear() {
|
2410 | this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
2411 | }
|
2412 |
|
2413 | |
2414 |
|
2415 |
|
2416 |
|
2417 |
|
2418 |
|
2419 |
|
2420 |
|
2421 |
|
2422 |
|
2423 | function hashDelete(key) {
|
2424 | return this.has(key) && delete this.__data__[key];
|
2425 | }
|
2426 |
|
2427 | |
2428 |
|
2429 |
|
2430 |
|
2431 |
|
2432 |
|
2433 |
|
2434 |
|
2435 |
|
2436 | function hashGet(key) {
|
2437 | var data = this.__data__;
|
2438 | if (nativeCreate) {
|
2439 | var result = data[key];
|
2440 | return result === HASH_UNDEFINED ? undefined : result;
|
2441 | }
|
2442 | return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
2443 | }
|
2444 |
|
2445 | |
2446 |
|
2447 |
|
2448 |
|
2449 |
|
2450 |
|
2451 |
|
2452 |
|
2453 |
|
2454 | function hashHas(key) {
|
2455 | var data = this.__data__;
|
2456 | return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
|
2457 | }
|
2458 |
|
2459 | |
2460 |
|
2461 |
|
2462 |
|
2463 |
|
2464 |
|
2465 |
|
2466 |
|
2467 |
|
2468 |
|
2469 | function hashSet(key, value) {
|
2470 | var data = this.__data__;
|
2471 | data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
2472 | return this;
|
2473 | }
|
2474 |
|
2475 |
|
2476 | Hash.prototype.clear = hashClear;
|
2477 | Hash.prototype['delete'] = hashDelete;
|
2478 | Hash.prototype.get = hashGet;
|
2479 | Hash.prototype.has = hashHas;
|
2480 | Hash.prototype.set = hashSet;
|
2481 |
|
2482 | |
2483 |
|
2484 |
|
2485 |
|
2486 |
|
2487 |
|
2488 |
|
2489 | function ListCache(entries) {
|
2490 | var index = -1,
|
2491 | length = entries ? entries.length : 0;
|
2492 |
|
2493 | this.clear();
|
2494 | while (++index < length) {
|
2495 | var entry = entries[index];
|
2496 | this.set(entry[0], entry[1]);
|
2497 | }
|
2498 | }
|
2499 |
|
2500 | |
2501 |
|
2502 |
|
2503 |
|
2504 |
|
2505 |
|
2506 |
|
2507 | function listCacheClear() {
|
2508 | this.__data__ = [];
|
2509 | }
|
2510 |
|
2511 | |
2512 |
|
2513 |
|
2514 |
|
2515 |
|
2516 |
|
2517 |
|
2518 |
|
2519 |
|
2520 | function listCacheDelete(key) {
|
2521 | var data = this.__data__,
|
2522 | index = assocIndexOf(data, key);
|
2523 |
|
2524 | if (index < 0) {
|
2525 | return false;
|
2526 | }
|
2527 | var lastIndex = data.length - 1;
|
2528 | if (index == lastIndex) {
|
2529 | data.pop();
|
2530 | } else {
|
2531 | splice.call(data, index, 1);
|
2532 | }
|
2533 | return true;
|
2534 | }
|
2535 |
|
2536 | |
2537 |
|
2538 |
|
2539 |
|
2540 |
|
2541 |
|
2542 |
|
2543 |
|
2544 |
|
2545 | function listCacheGet(key) {
|
2546 | var data = this.__data__,
|
2547 | index = assocIndexOf(data, key);
|
2548 |
|
2549 | return index < 0 ? undefined : data[index][1];
|
2550 | }
|
2551 |
|
2552 | |
2553 |
|
2554 |
|
2555 |
|
2556 |
|
2557 |
|
2558 |
|
2559 |
|
2560 |
|
2561 | function listCacheHas(key) {
|
2562 | return assocIndexOf(this.__data__, key) > -1;
|
2563 | }
|
2564 |
|
2565 | |
2566 |
|
2567 |
|
2568 |
|
2569 |
|
2570 |
|
2571 |
|
2572 |
|
2573 |
|
2574 |
|
2575 | function listCacheSet(key, value) {
|
2576 | var data = this.__data__,
|
2577 | index = assocIndexOf(data, key);
|
2578 |
|
2579 | if (index < 0) {
|
2580 | data.push([key, value]);
|
2581 | } else {
|
2582 | data[index][1] = value;
|
2583 | }
|
2584 | return this;
|
2585 | }
|
2586 |
|
2587 |
|
2588 | ListCache.prototype.clear = listCacheClear;
|
2589 | ListCache.prototype['delete'] = listCacheDelete;
|
2590 | ListCache.prototype.get = listCacheGet;
|
2591 | ListCache.prototype.has = listCacheHas;
|
2592 | ListCache.prototype.set = listCacheSet;
|
2593 |
|
2594 | |
2595 |
|
2596 |
|
2597 |
|
2598 |
|
2599 |
|
2600 |
|
2601 | function MapCache(entries) {
|
2602 | var index = -1,
|
2603 | length = entries ? entries.length : 0;
|
2604 |
|
2605 | this.clear();
|
2606 | while (++index < length) {
|
2607 | var entry = entries[index];
|
2608 | this.set(entry[0], entry[1]);
|
2609 | }
|
2610 | }
|
2611 |
|
2612 | |
2613 |
|
2614 |
|
2615 |
|
2616 |
|
2617 |
|
2618 |
|
2619 | function mapCacheClear() {
|
2620 | this.__data__ = {
|
2621 | 'hash': new Hash,
|
2622 | 'map': new (Map || ListCache),
|
2623 | 'string': new Hash
|
2624 | };
|
2625 | }
|
2626 |
|
2627 | |
2628 |
|
2629 |
|
2630 |
|
2631 |
|
2632 |
|
2633 |
|
2634 |
|
2635 |
|
2636 | function mapCacheDelete(key) {
|
2637 | return getMapData(this, key)['delete'](key);
|
2638 | }
|
2639 |
|
2640 | |
2641 |
|
2642 |
|
2643 |
|
2644 |
|
2645 |
|
2646 |
|
2647 |
|
2648 |
|
2649 | function mapCacheGet(key) {
|
2650 | return getMapData(this, key).get(key);
|
2651 | }
|
2652 |
|
2653 | |
2654 |
|
2655 |
|
2656 |
|
2657 |
|
2658 |
|
2659 |
|
2660 |
|
2661 |
|
2662 | function mapCacheHas(key) {
|
2663 | return getMapData(this, key).has(key);
|
2664 | }
|
2665 |
|
2666 | |
2667 |
|
2668 |
|
2669 |
|
2670 |
|
2671 |
|
2672 |
|
2673 |
|
2674 |
|
2675 |
|
2676 | function mapCacheSet(key, value) {
|
2677 | getMapData(this, key).set(key, value);
|
2678 | return this;
|
2679 | }
|
2680 |
|
2681 |
|
2682 | MapCache.prototype.clear = mapCacheClear;
|
2683 | MapCache.prototype['delete'] = mapCacheDelete;
|
2684 | MapCache.prototype.get = mapCacheGet;
|
2685 | MapCache.prototype.has = mapCacheHas;
|
2686 | MapCache.prototype.set = mapCacheSet;
|
2687 |
|
2688 | |
2689 |
|
2690 |
|
2691 |
|
2692 |
|
2693 |
|
2694 |
|
2695 |
|
2696 | function SetCache(values) {
|
2697 | var index = -1,
|
2698 | length = values ? values.length : 0;
|
2699 |
|
2700 | this.__data__ = new MapCache;
|
2701 | while (++index < length) {
|
2702 | this.add(values[index]);
|
2703 | }
|
2704 | }
|
2705 |
|
2706 | |
2707 |
|
2708 |
|
2709 |
|
2710 |
|
2711 |
|
2712 |
|
2713 |
|
2714 |
|
2715 |
|
2716 | function setCacheAdd(value) {
|
2717 | this.__data__.set(value, HASH_UNDEFINED);
|
2718 | return this;
|
2719 | }
|
2720 |
|
2721 | |
2722 |
|
2723 |
|
2724 |
|
2725 |
|
2726 |
|
2727 |
|
2728 |
|
2729 |
|
2730 | function setCacheHas(value) {
|
2731 | return this.__data__.has(value);
|
2732 | }
|
2733 |
|
2734 |
|
2735 | SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
2736 | SetCache.prototype.has = setCacheHas;
|
2737 |
|
2738 | |
2739 |
|
2740 |
|
2741 |
|
2742 |
|
2743 |
|
2744 |
|
2745 |
|
2746 | function arrayLikeKeys(value, inherited) {
|
2747 |
|
2748 |
|
2749 | var result = (isArray(value) || isArguments(value))
|
2750 | ? baseTimes(value.length, String)
|
2751 | : [];
|
2752 |
|
2753 | var length = result.length,
|
2754 | skipIndexes = !!length;
|
2755 |
|
2756 | for (var key in value) {
|
2757 | if ((inherited || hasOwnProperty.call(value, key)) &&
|
2758 | !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
2759 | result.push(key);
|
2760 | }
|
2761 | }
|
2762 | return result;
|
2763 | }
|
2764 |
|
2765 | |
2766 |
|
2767 |
|
2768 |
|
2769 |
|
2770 |
|
2771 |
|
2772 |
|
2773 | function assocIndexOf(array, key) {
|
2774 | var length = array.length;
|
2775 | while (length--) {
|
2776 | if (eq(array[length][0], key)) {
|
2777 | return length;
|
2778 | }
|
2779 | }
|
2780 | return -1;
|
2781 | }
|
2782 |
|
2783 | |
2784 |
|
2785 |
|
2786 |
|
2787 |
|
2788 |
|
2789 |
|
2790 |
|
2791 |
|
2792 |
|
2793 |
|
2794 | function baseDifference(array, values, iteratee, comparator) {
|
2795 | var index = -1,
|
2796 | includes = arrayIncludes,
|
2797 | isCommon = true,
|
2798 | length = array.length,
|
2799 | result = [],
|
2800 | valuesLength = values.length;
|
2801 |
|
2802 | if (!length) {
|
2803 | return result;
|
2804 | }
|
2805 | if (iteratee) {
|
2806 | values = arrayMap(values, baseUnary(iteratee));
|
2807 | }
|
2808 | if (comparator) {
|
2809 | includes = arrayIncludesWith;
|
2810 | isCommon = false;
|
2811 | }
|
2812 | else if (values.length >= LARGE_ARRAY_SIZE) {
|
2813 | includes = cacheHas;
|
2814 | isCommon = false;
|
2815 | values = new SetCache(values);
|
2816 | }
|
2817 | outer:
|
2818 | while (++index < length) {
|
2819 | var value = array[index],
|
2820 | computed = iteratee ? iteratee(value) : value;
|
2821 |
|
2822 | value = (comparator || value !== 0) ? value : 0;
|
2823 | if (isCommon && computed === computed) {
|
2824 | var valuesIndex = valuesLength;
|
2825 | while (valuesIndex--) {
|
2826 | if (values[valuesIndex] === computed) {
|
2827 | continue outer;
|
2828 | }
|
2829 | }
|
2830 | result.push(value);
|
2831 | }
|
2832 | else if (!includes(values, computed, comparator)) {
|
2833 | result.push(value);
|
2834 | }
|
2835 | }
|
2836 | return result;
|
2837 | }
|
2838 |
|
2839 | |
2840 |
|
2841 |
|
2842 |
|
2843 |
|
2844 |
|
2845 |
|
2846 |
|
2847 |
|
2848 |
|
2849 |
|
2850 | function baseFlatten(array, depth, predicate, isStrict, result) {
|
2851 | var index = -1,
|
2852 | length = array.length;
|
2853 |
|
2854 | predicate || (predicate = isFlattenable);
|
2855 | result || (result = []);
|
2856 |
|
2857 | while (++index < length) {
|
2858 | var value = array[index];
|
2859 | if (depth > 0 && predicate(value)) {
|
2860 | if (depth > 1) {
|
2861 |
|
2862 | baseFlatten(value, depth - 1, predicate, isStrict, result);
|
2863 | } else {
|
2864 | arrayPush(result, value);
|
2865 | }
|
2866 | } else if (!isStrict) {
|
2867 | result[result.length] = value;
|
2868 | }
|
2869 | }
|
2870 | return result;
|
2871 | }
|
2872 |
|
2873 | |
2874 |
|
2875 |
|
2876 |
|
2877 |
|
2878 |
|
2879 |
|
2880 |
|
2881 |
|
2882 |
|
2883 |
|
2884 | function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
2885 | var result = keysFunc(object);
|
2886 | return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
2887 | }
|
2888 |
|
2889 | |
2890 |
|
2891 |
|
2892 |
|
2893 |
|
2894 |
|
2895 |
|
2896 |
|
2897 | function baseIsNative(value) {
|
2898 | if (!isObject(value) || isMasked(value)) {
|
2899 | return false;
|
2900 | }
|
2901 | var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
2902 | return pattern.test(toSource(value));
|
2903 | }
|
2904 |
|
2905 | |
2906 |
|
2907 |
|
2908 |
|
2909 |
|
2910 |
|
2911 |
|
2912 | function baseKeysIn(object) {
|
2913 | if (!isObject(object)) {
|
2914 | return nativeKeysIn(object);
|
2915 | }
|
2916 | var isProto = isPrototype(object),
|
2917 | result = [];
|
2918 |
|
2919 | for (var key in object) {
|
2920 | if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
|
2921 | result.push(key);
|
2922 | }
|
2923 | }
|
2924 | return result;
|
2925 | }
|
2926 |
|
2927 | |
2928 |
|
2929 |
|
2930 |
|
2931 |
|
2932 |
|
2933 |
|
2934 |
|
2935 |
|
2936 | function basePick(object, props) {
|
2937 | object = Object(object);
|
2938 | return basePickBy(object, props, function(value, key) {
|
2939 | return key in object;
|
2940 | });
|
2941 | }
|
2942 |
|
2943 | |
2944 |
|
2945 |
|
2946 |
|
2947 |
|
2948 |
|
2949 |
|
2950 |
|
2951 |
|
2952 | function basePickBy(object, props, predicate) {
|
2953 | var index = -1,
|
2954 | length = props.length,
|
2955 | result = {};
|
2956 |
|
2957 | while (++index < length) {
|
2958 | var key = props[index],
|
2959 | value = object[key];
|
2960 |
|
2961 | if (predicate(value, key)) {
|
2962 | result[key] = value;
|
2963 | }
|
2964 | }
|
2965 | return result;
|
2966 | }
|
2967 |
|
2968 | |
2969 |
|
2970 |
|
2971 |
|
2972 |
|
2973 |
|
2974 |
|
2975 |
|
2976 | function baseRest(func, start) {
|
2977 | start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
2978 | return function() {
|
2979 | var args = arguments,
|
2980 | index = -1,
|
2981 | length = nativeMax(args.length - start, 0),
|
2982 | array = Array(length);
|
2983 |
|
2984 | while (++index < length) {
|
2985 | array[index] = args[start + index];
|
2986 | }
|
2987 | index = -1;
|
2988 | var otherArgs = Array(start + 1);
|
2989 | while (++index < start) {
|
2990 | otherArgs[index] = args[index];
|
2991 | }
|
2992 | otherArgs[start] = array;
|
2993 | return apply(func, this, otherArgs);
|
2994 | };
|
2995 | }
|
2996 |
|
2997 | |
2998 |
|
2999 |
|
3000 |
|
3001 |
|
3002 |
|
3003 |
|
3004 |
|
3005 | function getAllKeysIn(object) {
|
3006 | return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
3007 | }
|
3008 |
|
3009 | |
3010 |
|
3011 |
|
3012 |
|
3013 |
|
3014 |
|
3015 |
|
3016 |
|
3017 | function getMapData(map, key) {
|
3018 | var data = map.__data__;
|
3019 | return isKeyable(key)
|
3020 | ? data[typeof key == 'string' ? 'string' : 'hash']
|
3021 | : data.map;
|
3022 | }
|
3023 |
|
3024 | |
3025 |
|
3026 |
|
3027 |
|
3028 |
|
3029 |
|
3030 |
|
3031 |
|
3032 | function getNative(object, key) {
|
3033 | var value = getValue(object, key);
|
3034 | return baseIsNative(value) ? value : undefined;
|
3035 | }
|
3036 |
|
3037 | |
3038 |
|
3039 |
|
3040 |
|
3041 |
|
3042 |
|
3043 |
|
3044 | var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
|
3045 |
|
3046 | |
3047 |
|
3048 |
|
3049 |
|
3050 |
|
3051 |
|
3052 |
|
3053 |
|
3054 | var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
3055 | var result = [];
|
3056 | while (object) {
|
3057 | arrayPush(result, getSymbols(object));
|
3058 | object = getPrototype(object);
|
3059 | }
|
3060 | return result;
|
3061 | };
|
3062 |
|
3063 | |
3064 |
|
3065 |
|
3066 |
|
3067 |
|
3068 |
|
3069 |
|
3070 | function isFlattenable(value) {
|
3071 | return isArray(value) || isArguments(value) ||
|
3072 | !!(spreadableSymbol && value && value[spreadableSymbol]);
|
3073 | }
|
3074 |
|
3075 | |
3076 |
|
3077 |
|
3078 |
|
3079 |
|
3080 |
|
3081 |
|
3082 |
|
3083 | function isIndex(value, length) {
|
3084 | length = length == null ? MAX_SAFE_INTEGER : length;
|
3085 | return !!length &&
|
3086 | (typeof value == 'number' || reIsUint.test(value)) &&
|
3087 | (value > -1 && value % 1 == 0 && value < length);
|
3088 | }
|
3089 |
|
3090 | |
3091 |
|
3092 |
|
3093 |
|
3094 |
|
3095 |
|
3096 |
|
3097 | function isKeyable(value) {
|
3098 | var type = typeof value;
|
3099 | return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
3100 | ? (value !== '__proto__')
|
3101 | : (value === null);
|
3102 | }
|
3103 |
|
3104 | |
3105 |
|
3106 |
|
3107 |
|
3108 |
|
3109 |
|
3110 |
|
3111 | function isMasked(func) {
|
3112 | return !!maskSrcKey && (maskSrcKey in func);
|
3113 | }
|
3114 |
|
3115 | |
3116 |
|
3117 |
|
3118 |
|
3119 |
|
3120 |
|
3121 |
|
3122 | function isPrototype(value) {
|
3123 | var Ctor = value && value.constructor,
|
3124 | proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
3125 |
|
3126 | return value === proto;
|
3127 | }
|
3128 |
|
3129 | |
3130 |
|
3131 |
|
3132 |
|
3133 |
|
3134 |
|
3135 |
|
3136 |
|
3137 |
|
3138 | function nativeKeysIn(object) {
|
3139 | var result = [];
|
3140 | if (object != null) {
|
3141 | for (var key in Object(object)) {
|
3142 | result.push(key);
|
3143 | }
|
3144 | }
|
3145 | return result;
|
3146 | }
|
3147 |
|
3148 | |
3149 |
|
3150 |
|
3151 |
|
3152 |
|
3153 |
|
3154 |
|
3155 | function toKey(value) {
|
3156 | if (typeof value == 'string' || isSymbol(value)) {
|
3157 | return value;
|
3158 | }
|
3159 | var result = (value + '');
|
3160 | return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
3161 | }
|
3162 |
|
3163 | |
3164 |
|
3165 |
|
3166 |
|
3167 |
|
3168 |
|
3169 |
|
3170 | function toSource(func) {
|
3171 | if (func != null) {
|
3172 | try {
|
3173 | return funcToString.call(func);
|
3174 | } catch (e) {}
|
3175 | try {
|
3176 | return (func + '');
|
3177 | } catch (e) {}
|
3178 | }
|
3179 | return '';
|
3180 | }
|
3181 |
|
3182 | |
3183 |
|
3184 |
|
3185 |
|
3186 |
|
3187 |
|
3188 |
|
3189 |
|
3190 |
|
3191 |
|
3192 |
|
3193 |
|
3194 |
|
3195 |
|
3196 |
|
3197 |
|
3198 |
|
3199 |
|
3200 |
|
3201 |
|
3202 |
|
3203 |
|
3204 |
|
3205 |
|
3206 |
|
3207 |
|
3208 |
|
3209 |
|
3210 |
|
3211 |
|
3212 |
|
3213 |
|
3214 | function eq(value, other) {
|
3215 | return value === other || (value !== value && other !== other);
|
3216 | }
|
3217 |
|
3218 | |
3219 |
|
3220 |
|
3221 |
|
3222 |
|
3223 |
|
3224 |
|
3225 |
|
3226 |
|
3227 |
|
3228 |
|
3229 |
|
3230 |
|
3231 |
|
3232 |
|
3233 |
|
3234 |
|
3235 |
|
3236 | function isArguments(value) {
|
3237 |
|
3238 | return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
3239 | (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
3240 | }
|
3241 |
|
3242 | |
3243 |
|
3244 |
|
3245 |
|
3246 |
|
3247 |
|
3248 |
|
3249 |
|
3250 |
|
3251 |
|
3252 |
|
3253 |
|
3254 |
|
3255 |
|
3256 |
|
3257 |
|
3258 |
|
3259 |
|
3260 |
|
3261 |
|
3262 |
|
3263 |
|
3264 |
|
3265 | var isArray = Array.isArray;
|
3266 |
|
3267 | |
3268 |
|
3269 |
|
3270 |
|
3271 |
|
3272 |
|
3273 |
|
3274 |
|
3275 |
|
3276 |
|
3277 |
|
3278 |
|
3279 |
|
3280 |
|
3281 |
|
3282 |
|
3283 |
|
3284 |
|
3285 |
|
3286 |
|
3287 |
|
3288 |
|
3289 |
|
3290 |
|
3291 |
|
3292 | function isArrayLike(value) {
|
3293 | return value != null && isLength(value.length) && !isFunction(value);
|
3294 | }
|
3295 |
|
3296 | |
3297 |
|
3298 |
|
3299 |
|
3300 |
|
3301 |
|
3302 |
|
3303 |
|
3304 |
|
3305 |
|
3306 |
|
3307 |
|
3308 |
|
3309 |
|
3310 |
|
3311 |
|
3312 |
|
3313 |
|
3314 |
|
3315 |
|
3316 |
|
3317 |
|
3318 |
|
3319 |
|
3320 |
|
3321 | function isArrayLikeObject(value) {
|
3322 | return isObjectLike(value) && isArrayLike(value);
|
3323 | }
|
3324 |
|
3325 | |
3326 |
|
3327 |
|
3328 |
|
3329 |
|
3330 |
|
3331 |
|
3332 |
|
3333 |
|
3334 |
|
3335 |
|
3336 |
|
3337 |
|
3338 |
|
3339 |
|
3340 |
|
3341 |
|
3342 | function isFunction(value) {
|
3343 |
|
3344 |
|
3345 | var tag = isObject(value) ? objectToString.call(value) : '';
|
3346 | return tag == funcTag || tag == genTag;
|
3347 | }
|
3348 |
|
3349 | |
3350 |
|
3351 |
|
3352 |
|
3353 |
|
3354 |
|
3355 |
|
3356 |
|
3357 |
|
3358 |
|
3359 |
|
3360 |
|
3361 |
|
3362 |
|
3363 |
|
3364 |
|
3365 |
|
3366 |
|
3367 |
|
3368 |
|
3369 |
|
3370 |
|
3371 |
|
3372 |
|
3373 |
|
3374 |
|
3375 | function isLength(value) {
|
3376 | return typeof value == 'number' &&
|
3377 | value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
3378 | }
|
3379 |
|
3380 | |
3381 |
|
3382 |
|
3383 |
|
3384 |
|
3385 |
|
3386 |
|
3387 |
|
3388 |
|
3389 |
|
3390 |
|
3391 |
|
3392 |
|
3393 |
|
3394 |
|
3395 |
|
3396 |
|
3397 |
|
3398 |
|
3399 |
|
3400 |
|
3401 |
|
3402 |
|
3403 |
|
3404 |
|
3405 | function isObject(value) {
|
3406 | var type = typeof value;
|
3407 | return !!value && (type == 'object' || type == 'function');
|
3408 | }
|
3409 |
|
3410 | |
3411 |
|
3412 |
|
3413 |
|
3414 |
|
3415 |
|
3416 |
|
3417 |
|
3418 |
|
3419 |
|
3420 |
|
3421 |
|
3422 |
|
3423 |
|
3424 |
|
3425 |
|
3426 |
|
3427 |
|
3428 |
|
3429 |
|
3430 |
|
3431 |
|
3432 |
|
3433 |
|
3434 | function isObjectLike(value) {
|
3435 | return !!value && typeof value == 'object';
|
3436 | }
|
3437 |
|
3438 | |
3439 |
|
3440 |
|
3441 |
|
3442 |
|
3443 |
|
3444 |
|
3445 |
|
3446 |
|
3447 |
|
3448 |
|
3449 |
|
3450 |
|
3451 |
|
3452 |
|
3453 |
|
3454 |
|
3455 | function isSymbol(value) {
|
3456 | return typeof value == 'symbol' ||
|
3457 | (isObjectLike(value) && objectToString.call(value) == symbolTag);
|
3458 | }
|
3459 |
|
3460 | |
3461 |
|
3462 |
|
3463 |
|
3464 |
|
3465 |
|
3466 |
|
3467 |
|
3468 |
|
3469 |
|
3470 |
|
3471 |
|
3472 |
|
3473 |
|
3474 |
|
3475 |
|
3476 |
|
3477 |
|
3478 |
|
3479 |
|
3480 |
|
3481 |
|
3482 |
|
3483 | function keysIn(object) {
|
3484 | return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
3485 | }
|
3486 |
|
3487 | |
3488 |
|
3489 |
|
3490 |
|
3491 |
|
3492 |
|
3493 |
|
3494 |
|
3495 |
|
3496 |
|
3497 |
|
3498 |
|
3499 |
|
3500 |
|
3501 |
|
3502 |
|
3503 |
|
3504 |
|
3505 |
|
3506 | var omit = baseRest(function(object, props) {
|
3507 | if (object == null) {
|
3508 | return {};
|
3509 | }
|
3510 | props = arrayMap(baseFlatten(props, 1), toKey);
|
3511 | return basePick(object, baseDifference(getAllKeysIn(object), props));
|
3512 | });
|
3513 |
|
3514 | |
3515 |
|
3516 |
|
3517 |
|
3518 |
|
3519 |
|
3520 |
|
3521 |
|
3522 |
|
3523 |
|
3524 |
|
3525 |
|
3526 |
|
3527 |
|
3528 |
|
3529 |
|
3530 |
|
3531 |
|
3532 | function stubArray() {
|
3533 | return [];
|
3534 | }
|
3535 |
|
3536 | module.exports = omit;
|
3537 |
|
3538 | }.call(exports, (function() { return this; }())))
|
3539 |
|
3540 | },
|
3541 |
|
3542 | function(module, exports, __webpack_require__) {
|
3543 |
|
3544 | |
3545 |
|
3546 |
|
3547 |
|
3548 |
|
3549 |
|
3550 |
|
3551 |
|
3552 |
|
3553 |
|
3554 |
|
3555 | 'use strict';
|
3556 |
|
3557 | var _prodInvariant = __webpack_require__(6);
|
3558 |
|
3559 | var invariant = __webpack_require__(4);
|
3560 |
|
3561 | |
3562 |
|
3563 |
|
3564 |
|
3565 |
|
3566 |
|
3567 |
|
3568 | var oneArgumentPooler = function (copyFieldsFrom) {
|
3569 | var Klass = this;
|
3570 | if (Klass.instancePool.length) {
|
3571 | var instance = Klass.instancePool.pop();
|
3572 | Klass.call(instance, copyFieldsFrom);
|
3573 | return instance;
|
3574 | } else {
|
3575 | return new Klass(copyFieldsFrom);
|
3576 | }
|
3577 | };
|
3578 |
|
3579 | var twoArgumentPooler = function (a1, a2) {
|
3580 | var Klass = this;
|
3581 | if (Klass.instancePool.length) {
|
3582 | var instance = Klass.instancePool.pop();
|
3583 | Klass.call(instance, a1, a2);
|
3584 | return instance;
|
3585 | } else {
|
3586 | return new Klass(a1, a2);
|
3587 | }
|
3588 | };
|
3589 |
|
3590 | var threeArgumentPooler = function (a1, a2, a3) {
|
3591 | var Klass = this;
|
3592 | if (Klass.instancePool.length) {
|
3593 | var instance = Klass.instancePool.pop();
|
3594 | Klass.call(instance, a1, a2, a3);
|
3595 | return instance;
|
3596 | } else {
|
3597 | return new Klass(a1, a2, a3);
|
3598 | }
|
3599 | };
|
3600 |
|
3601 | var fourArgumentPooler = function (a1, a2, a3, a4) {
|
3602 | var Klass = this;
|
3603 | if (Klass.instancePool.length) {
|
3604 | var instance = Klass.instancePool.pop();
|
3605 | Klass.call(instance, a1, a2, a3, a4);
|
3606 | return instance;
|
3607 | } else {
|
3608 | return new Klass(a1, a2, a3, a4);
|
3609 | }
|
3610 | };
|
3611 |
|
3612 | var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
|
3613 | var Klass = this;
|
3614 | if (Klass.instancePool.length) {
|
3615 | var instance = Klass.instancePool.pop();
|
3616 | Klass.call(instance, a1, a2, a3, a4, a5);
|
3617 | return instance;
|
3618 | } else {
|
3619 | return new Klass(a1, a2, a3, a4, a5);
|
3620 | }
|
3621 | };
|
3622 |
|
3623 | var standardReleaser = function (instance) {
|
3624 | var Klass = this;
|
3625 | !(instance instanceof Klass) ? true ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
|
3626 | instance.destructor();
|
3627 | if (Klass.instancePool.length < Klass.poolSize) {
|
3628 | Klass.instancePool.push(instance);
|
3629 | }
|
3630 | };
|
3631 |
|
3632 | var DEFAULT_POOL_SIZE = 10;
|
3633 | var DEFAULT_POOLER = oneArgumentPooler;
|
3634 |
|
3635 | |
3636 |
|
3637 |
|
3638 |
|
3639 |
|
3640 |
|
3641 |
|
3642 |
|
3643 |
|
3644 | var addPoolingTo = function (CopyConstructor, pooler) {
|
3645 |
|
3646 |
|
3647 | var NewKlass = CopyConstructor;
|
3648 | NewKlass.instancePool = [];
|
3649 | NewKlass.getPooled = pooler || DEFAULT_POOLER;
|
3650 | if (!NewKlass.poolSize) {
|
3651 | NewKlass.poolSize = DEFAULT_POOL_SIZE;
|
3652 | }
|
3653 | NewKlass.release = standardReleaser;
|
3654 | return NewKlass;
|
3655 | };
|
3656 |
|
3657 | var PooledClass = {
|
3658 | addPoolingTo: addPoolingTo,
|
3659 | oneArgumentPooler: oneArgumentPooler,
|
3660 | twoArgumentPooler: twoArgumentPooler,
|
3661 | threeArgumentPooler: threeArgumentPooler,
|
3662 | fourArgumentPooler: fourArgumentPooler,
|
3663 | fiveArgumentPooler: fiveArgumentPooler
|
3664 | };
|
3665 |
|
3666 | module.exports = PooledClass;
|
3667 |
|
3668 | },
|
3669 |
|
3670 | function(module, exports) {
|
3671 |
|
3672 | |
3673 |
|
3674 |
|
3675 |
|
3676 |
|
3677 |
|
3678 |
|
3679 |
|
3680 |
|
3681 |
|
3682 | 'use strict';
|
3683 |
|
3684 | |
3685 |
|
3686 |
|
3687 |
|
3688 |
|
3689 |
|
3690 |
|
3691 |
|
3692 |
|
3693 | var ReactInstanceMap = {
|
3694 |
|
3695 | |
3696 |
|
3697 |
|
3698 |
|
3699 |
|
3700 | remove: function (key) {
|
3701 | key._reactInternalInstance = undefined;
|
3702 | },
|
3703 |
|
3704 | get: function (key) {
|
3705 | return key._reactInternalInstance;
|
3706 | },
|
3707 |
|
3708 | has: function (key) {
|
3709 | return key._reactInternalInstance !== undefined;
|
3710 | },
|
3711 |
|
3712 | set: function (key, value) {
|
3713 | key._reactInternalInstance = value;
|
3714 | }
|
3715 |
|
3716 | };
|
3717 |
|
3718 | module.exports = ReactInstanceMap;
|
3719 |
|
3720 | },
|
3721 |
|
3722 | function(module, exports, __webpack_require__) {
|
3723 |
|
3724 | |
3725 |
|
3726 |
|
3727 |
|
3728 |
|
3729 |
|
3730 |
|
3731 |
|
3732 |
|
3733 |
|
3734 | 'use strict';
|
3735 |
|
3736 | var ReactRef = __webpack_require__(225);
|
3737 | var ReactInstrumentation = __webpack_require__(12);
|
3738 |
|
3739 | var warning = __webpack_require__(5);
|
3740 |
|
3741 | |
3742 |
|
3743 |
|
3744 |
|
3745 | function attachRefs() {
|
3746 | ReactRef.attachRefs(this, this._currentElement);
|
3747 | }
|
3748 |
|
3749 | var ReactReconciler = {
|
3750 |
|
3751 | |
3752 |
|
3753 |
|
3754 |
|
3755 |
|
3756 |
|
3757 |
|
3758 |
|
3759 |
|
3760 |
|
3761 |
|
3762 | mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots
|
3763 | ) {
|
3764 | if (true) {
|
3765 | if (internalInstance._debugID !== 0) {
|
3766 | ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
|
3767 | }
|
3768 | }
|
3769 | var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
|
3770 | if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
|
3771 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
|
3772 | }
|
3773 | if (true) {
|
3774 | if (internalInstance._debugID !== 0) {
|
3775 | ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
|
3776 | }
|
3777 | }
|
3778 | return markup;
|
3779 | },
|
3780 |
|
3781 | |
3782 |
|
3783 |
|
3784 |
|
3785 | getHostNode: function (internalInstance) {
|
3786 | return internalInstance.getHostNode();
|
3787 | },
|
3788 |
|
3789 | |
3790 |
|
3791 |
|
3792 |
|
3793 |
|
3794 |
|
3795 | unmountComponent: function (internalInstance, safely) {
|
3796 | if (true) {
|
3797 | if (internalInstance._debugID !== 0) {
|
3798 | ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
|
3799 | }
|
3800 | }
|
3801 | ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
|
3802 | internalInstance.unmountComponent(safely);
|
3803 | if (true) {
|
3804 | if (internalInstance._debugID !== 0) {
|
3805 | ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
|
3806 | }
|
3807 | }
|
3808 | },
|
3809 |
|
3810 | |
3811 |
|
3812 |
|
3813 |
|
3814 |
|
3815 |
|
3816 |
|
3817 |
|
3818 |
|
3819 | receiveComponent: function (internalInstance, nextElement, transaction, context) {
|
3820 | var prevElement = internalInstance._currentElement;
|
3821 |
|
3822 | if (nextElement === prevElement && context === internalInstance._context) {
|
3823 |
|
3824 |
|
3825 |
|
3826 |
|
3827 |
|
3828 |
|
3829 |
|
3830 |
|
3831 |
|
3832 |
|
3833 | return;
|
3834 | }
|
3835 |
|
3836 | if (true) {
|
3837 | if (internalInstance._debugID !== 0) {
|
3838 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
|
3839 | }
|
3840 | }
|
3841 |
|
3842 | var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
|
3843 |
|
3844 | if (refsChanged) {
|
3845 | ReactRef.detachRefs(internalInstance, prevElement);
|
3846 | }
|
3847 |
|
3848 | internalInstance.receiveComponent(nextElement, transaction, context);
|
3849 |
|
3850 | if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
|
3851 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
|
3852 | }
|
3853 |
|
3854 | if (true) {
|
3855 | if (internalInstance._debugID !== 0) {
|
3856 | ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
|
3857 | }
|
3858 | }
|
3859 | },
|
3860 |
|
3861 | |
3862 |
|
3863 |
|
3864 |
|
3865 |
|
3866 |
|
3867 |
|
3868 | performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {
|
3869 | if (internalInstance._updateBatchNumber !== updateBatchNumber) {
|
3870 |
|
3871 |
|
3872 | true ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;
|
3873 | return;
|
3874 | }
|
3875 | if (true) {
|
3876 | if (internalInstance._debugID !== 0) {
|
3877 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
|
3878 | }
|
3879 | }
|
3880 | internalInstance.performUpdateIfNecessary(transaction);
|
3881 | if (true) {
|
3882 | if (internalInstance._debugID !== 0) {
|
3883 | ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
|
3884 | }
|
3885 | }
|
3886 | }
|
3887 |
|
3888 | };
|
3889 |
|
3890 | module.exports = ReactReconciler;
|
3891 |
|
3892 | },
|
3893 |
|
3894 | function(module, exports, __webpack_require__) {
|
3895 |
|
3896 | |
3897 |
|
3898 |
|
3899 |
|
3900 |
|
3901 |
|
3902 |
|
3903 |
|
3904 |
|
3905 |
|
3906 | 'use strict';
|
3907 |
|
3908 | var _assign = __webpack_require__(7);
|
3909 |
|
3910 | var ReactCurrentOwner = __webpack_require__(16);
|
3911 |
|
3912 | var warning = __webpack_require__(5);
|
3913 | var canDefineProperty = __webpack_require__(58);
|
3914 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
3915 |
|
3916 | var REACT_ELEMENT_TYPE = __webpack_require__(100);
|
3917 |
|
3918 | var RESERVED_PROPS = {
|
3919 | key: true,
|
3920 | ref: true,
|
3921 | __self: true,
|
3922 | __source: true
|
3923 | };
|
3924 |
|
3925 | var specialPropKeyWarningShown, specialPropRefWarningShown;
|
3926 |
|
3927 | function hasValidRef(config) {
|
3928 | if (true) {
|
3929 | if (hasOwnProperty.call(config, 'ref')) {
|
3930 | var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
3931 | if (getter && getter.isReactWarning) {
|
3932 | return false;
|
3933 | }
|
3934 | }
|
3935 | }
|
3936 | return config.ref !== undefined;
|
3937 | }
|
3938 |
|
3939 | function hasValidKey(config) {
|
3940 | if (true) {
|
3941 | if (hasOwnProperty.call(config, 'key')) {
|
3942 | var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
3943 | if (getter && getter.isReactWarning) {
|
3944 | return false;
|
3945 | }
|
3946 | }
|
3947 | }
|
3948 | return config.key !== undefined;
|
3949 | }
|
3950 |
|
3951 | function defineKeyPropWarningGetter(props, displayName) {
|
3952 | var warnAboutAccessingKey = function () {
|
3953 | if (!specialPropKeyWarningShown) {
|
3954 | specialPropKeyWarningShown = true;
|
3955 | true ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
|
3956 | }
|
3957 | };
|
3958 | warnAboutAccessingKey.isReactWarning = true;
|
3959 | Object.defineProperty(props, 'key', {
|
3960 | get: warnAboutAccessingKey,
|
3961 | configurable: true
|
3962 | });
|
3963 | }
|
3964 |
|
3965 | function defineRefPropWarningGetter(props, displayName) {
|
3966 | var warnAboutAccessingRef = function () {
|
3967 | if (!specialPropRefWarningShown) {
|
3968 | specialPropRefWarningShown = true;
|
3969 | true ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
|
3970 | }
|
3971 | };
|
3972 | warnAboutAccessingRef.isReactWarning = true;
|
3973 | Object.defineProperty(props, 'ref', {
|
3974 | get: warnAboutAccessingRef,
|
3975 | configurable: true
|
3976 | });
|
3977 | }
|
3978 |
|
3979 | /**
|
3980 | * Factory method to create a new React element. This no longer adheres to
|
3981 | * the class pattern, so do not use new to call it. Also, no instanceof check
|
3982 | * will work. Instead test $$typeof field against Symbol.for('react.element') to check
|
3983 | * if something is a React Element.
|
3984 | *
|
3985 | * @param {*} type
|
3986 | * @param {*} key
|
3987 | * @param {string|object} ref
|
3988 | * @param {*} self A *temporary* helper to detect places where `this` is
|
3989 | * different from the `owner` when React.createElement is called, so that we
|
3990 | * can warn. We want to get rid of owner and replace string `ref`s with arrow
|
3991 | * functions, and as long as `this` and owner are the same, there will be no
|
3992 | * change in behavior.
|
3993 | * @param {*} source An annotation object (added by a transpiler or otherwise)
|
3994 | * indicating filename, line number, and/or other information.
|
3995 | * @param {*} owner
|
3996 | * @param {*} props
|
3997 | * @internal
|
3998 | */
|
3999 | var ReactElement = function (type, key, ref, self, source, owner, props) {
|
4000 | var element = {
|
4001 |
|
4002 | $$typeof: REACT_ELEMENT_TYPE,
|
4003 |
|
4004 |
|
4005 | type: type,
|
4006 | key: key,
|
4007 | ref: ref,
|
4008 | props: props,
|
4009 |
|
4010 |
|
4011 | _owner: owner
|
4012 | };
|
4013 |
|
4014 | if (true) {
|
4015 |
|
4016 |
|
4017 |
|
4018 |
|
4019 | element._store = {};
|
4020 |
|
4021 |
|
4022 |
|
4023 |
|
4024 |
|
4025 | if (canDefineProperty) {
|
4026 | Object.defineProperty(element._store, 'validated', {
|
4027 | configurable: false,
|
4028 | enumerable: false,
|
4029 | writable: true,
|
4030 | value: false
|
4031 | });
|
4032 |
|
4033 | Object.defineProperty(element, '_self', {
|
4034 | configurable: false,
|
4035 | enumerable: false,
|
4036 | writable: false,
|
4037 | value: self
|
4038 | });
|
4039 |
|
4040 |
|
4041 | Object.defineProperty(element, '_source', {
|
4042 | configurable: false,
|
4043 | enumerable: false,
|
4044 | writable: false,
|
4045 | value: source
|
4046 | });
|
4047 | } else {
|
4048 | element._store.validated = false;
|
4049 | element._self = self;
|
4050 | element._source = source;
|
4051 | }
|
4052 | if (Object.freeze) {
|
4053 | Object.freeze(element.props);
|
4054 | Object.freeze(element);
|
4055 | }
|
4056 | }
|
4057 |
|
4058 | return element;
|
4059 | };
|
4060 |
|
4061 | |
4062 |
|
4063 |
|
4064 |
|
4065 | ReactElement.createElement = function (type, config, children) {
|
4066 | var propName;
|
4067 |
|
4068 |
|
4069 | var props = {};
|
4070 |
|
4071 | var key = null;
|
4072 | var ref = null;
|
4073 | var self = null;
|
4074 | var source = null;
|
4075 |
|
4076 | if (config != null) {
|
4077 | if (hasValidRef(config)) {
|
4078 | ref = config.ref;
|
4079 | }
|
4080 | if (hasValidKey(config)) {
|
4081 | key = '' + config.key;
|
4082 | }
|
4083 |
|
4084 | self = config.__self === undefined ? null : config.__self;
|
4085 | source = config.__source === undefined ? null : config.__source;
|
4086 |
|
4087 | for (propName in config) {
|
4088 | if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
4089 | props[propName] = config[propName];
|
4090 | }
|
4091 | }
|
4092 | }
|
4093 |
|
4094 |
|
4095 |
|
4096 | var childrenLength = arguments.length - 2;
|
4097 | if (childrenLength === 1) {
|
4098 | props.children = children;
|
4099 | } else if (childrenLength > 1) {
|
4100 | var childArray = Array(childrenLength);
|
4101 | for (var i = 0; i < childrenLength; i++) {
|
4102 | childArray[i] = arguments[i + 2];
|
4103 | }
|
4104 | if (true) {
|
4105 | if (Object.freeze) {
|
4106 | Object.freeze(childArray);
|
4107 | }
|
4108 | }
|
4109 | props.children = childArray;
|
4110 | }
|
4111 |
|
4112 |
|
4113 | if (type && type.defaultProps) {
|
4114 | var defaultProps = type.defaultProps;
|
4115 | for (propName in defaultProps) {
|
4116 | if (props[propName] === undefined) {
|
4117 | props[propName] = defaultProps[propName];
|
4118 | }
|
4119 | }
|
4120 | }
|
4121 | if (true) {
|
4122 | if (key || ref) {
|
4123 | if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
|
4124 | var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
4125 | if (key) {
|
4126 | defineKeyPropWarningGetter(props, displayName);
|
4127 | }
|
4128 | if (ref) {
|
4129 | defineRefPropWarningGetter(props, displayName);
|
4130 | }
|
4131 | }
|
4132 | }
|
4133 | }
|
4134 | return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
4135 | };
|
4136 |
|
4137 | |
4138 |
|
4139 |
|
4140 |
|
4141 | ReactElement.createFactory = function (type) {
|
4142 | var factory = ReactElement.createElement.bind(null, type);
|
4143 |
|
4144 |
|
4145 |
|
4146 |
|
4147 |
|
4148 | factory.type = type;
|
4149 | return factory;
|
4150 | };
|
4151 |
|
4152 | ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
|
4153 | var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
4154 |
|
4155 | return newElement;
|
4156 | };
|
4157 |
|
4158 | |
4159 |
|
4160 |
|
4161 |
|
4162 | ReactElement.cloneElement = function (element, config, children) {
|
4163 | var propName;
|
4164 |
|
4165 |
|
4166 | var props = _assign({}, element.props);
|
4167 |
|
4168 |
|
4169 | var key = element.key;
|
4170 | var ref = element.ref;
|
4171 |
|
4172 | var self = element._self;
|
4173 |
|
4174 |
|
4175 |
|
4176 | var source = element._source;
|
4177 |
|
4178 |
|
4179 | var owner = element._owner;
|
4180 |
|
4181 | if (config != null) {
|
4182 | if (hasValidRef(config)) {
|
4183 |
|
4184 | ref = config.ref;
|
4185 | owner = ReactCurrentOwner.current;
|
4186 | }
|
4187 | if (hasValidKey(config)) {
|
4188 | key = '' + config.key;
|
4189 | }
|
4190 |
|
4191 |
|
4192 | var defaultProps;
|
4193 | if (element.type && element.type.defaultProps) {
|
4194 | defaultProps = element.type.defaultProps;
|
4195 | }
|
4196 | for (propName in config) {
|
4197 | if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
4198 | if (config[propName] === undefined && defaultProps !== undefined) {
|
4199 |
|
4200 | props[propName] = defaultProps[propName];
|
4201 | } else {
|
4202 | props[propName] = config[propName];
|
4203 | }
|
4204 | }
|
4205 | }
|
4206 | }
|
4207 |
|
4208 |
|
4209 |
|
4210 | var childrenLength = arguments.length - 2;
|
4211 | if (childrenLength === 1) {
|
4212 | props.children = children;
|
4213 | } else if (childrenLength > 1) {
|
4214 | var childArray = Array(childrenLength);
|
4215 | for (var i = 0; i < childrenLength; i++) {
|
4216 | childArray[i] = arguments[i + 2];
|
4217 | }
|
4218 | props.children = childArray;
|
4219 | }
|
4220 |
|
4221 | return ReactElement(element.type, key, ref, self, source, owner, props);
|
4222 | };
|
4223 |
|
4224 | |
4225 |
|
4226 |
|
4227 |
|
4228 |
|
4229 |
|
4230 |
|
4231 | ReactElement.isValidElement = function (object) {
|
4232 | return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
4233 | };
|
4234 |
|
4235 | module.exports = ReactElement;
|
4236 |
|
4237 | },
|
4238 |
|
4239 | function(module, exports) {
|
4240 |
|
4241 | |
4242 |
|
4243 |
|
4244 |
|
4245 |
|
4246 |
|
4247 |
|
4248 |
|
4249 |
|
4250 |
|
4251 | 'use strict';
|
4252 |
|
4253 | |
4254 |
|
4255 |
|
4256 |
|
4257 |
|
4258 |
|
4259 |
|
4260 | function reactProdInvariant(code) {
|
4261 | var argCount = arguments.length - 1;
|
4262 |
|
4263 | var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
|
4264 |
|
4265 | for (var argIdx = 0; argIdx < argCount; argIdx++) {
|
4266 | message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
|
4267 | }
|
4268 |
|
4269 | message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
|
4270 |
|
4271 | var error = new Error(message);
|
4272 | error.name = 'Invariant Violation';
|
4273 | error.framesToPop = 1;
|
4274 |
|
4275 | throw error;
|
4276 | }
|
4277 |
|
4278 | module.exports = reactProdInvariant;
|
4279 |
|
4280 | },
|
4281 |
|
4282 | function(module, exports, __webpack_require__) {
|
4283 |
|
4284 | |
4285 |
|
4286 |
|
4287 |
|
4288 |
|
4289 |
|
4290 |
|
4291 |
|
4292 |
|
4293 |
|
4294 | 'use strict';
|
4295 |
|
4296 | var emptyObject = {};
|
4297 |
|
4298 | if (true) {
|
4299 | Object.freeze(emptyObject);
|
4300 | }
|
4301 |
|
4302 | module.exports = emptyObject;
|
4303 |
|
4304 | },
|
4305 |
|
4306 | function(module, exports, __webpack_require__) {
|
4307 |
|
4308 | |
4309 |
|
4310 |
|
4311 |
|
4312 |
|
4313 |
|
4314 |
|
4315 |
|
4316 |
|
4317 |
|
4318 | 'use strict';
|
4319 |
|
4320 | var DOMNamespaces = __webpack_require__(41);
|
4321 | var setInnerHTML = __webpack_require__(37);
|
4322 |
|
4323 | var createMicrosoftUnsafeLocalFunction = __webpack_require__(48);
|
4324 | var setTextContent = __webpack_require__(96);
|
4325 |
|
4326 | var ELEMENT_NODE_TYPE = 1;
|
4327 | var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
|
4328 |
|
4329 | |
4330 |
|
4331 |
|
4332 |
|
4333 |
|
4334 |
|
4335 |
|
4336 |
|
4337 |
|
4338 |
|
4339 |
|
4340 | var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
|
4341 |
|
4342 | function insertTreeChildren(tree) {
|
4343 | if (!enableLazy) {
|
4344 | return;
|
4345 | }
|
4346 | var node = tree.node;
|
4347 | var children = tree.children;
|
4348 | if (children.length) {
|
4349 | for (var i = 0; i < children.length; i++) {
|
4350 | insertTreeBefore(node, children[i], null);
|
4351 | }
|
4352 | } else if (tree.html != null) {
|
4353 | setInnerHTML(node, tree.html);
|
4354 | } else if (tree.text != null) {
|
4355 | setTextContent(node, tree.text);
|
4356 | }
|
4357 | }
|
4358 |
|
4359 | var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
|
4360 |
|
4361 |
|
4362 |
|
4363 |
|
4364 |
|
4365 |
|
4366 | if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) {
|
4367 | insertTreeChildren(tree);
|
4368 | parentNode.insertBefore(tree.node, referenceNode);
|
4369 | } else {
|
4370 | parentNode.insertBefore(tree.node, referenceNode);
|
4371 | insertTreeChildren(tree);
|
4372 | }
|
4373 | });
|
4374 |
|
4375 | function replaceChildWithTree(oldNode, newTree) {
|
4376 | oldNode.parentNode.replaceChild(newTree.node, oldNode);
|
4377 | insertTreeChildren(newTree);
|
4378 | }
|
4379 |
|
4380 | function queueChild(parentTree, childTree) {
|
4381 | if (enableLazy) {
|
4382 | parentTree.children.push(childTree);
|
4383 | } else {
|
4384 | parentTree.node.appendChild(childTree.node);
|
4385 | }
|
4386 | }
|
4387 |
|
4388 | function queueHTML(tree, html) {
|
4389 | if (enableLazy) {
|
4390 | tree.html = html;
|
4391 | } else {
|
4392 | setInnerHTML(tree.node, html);
|
4393 | }
|
4394 | }
|
4395 |
|
4396 | function queueText(tree, text) {
|
4397 | if (enableLazy) {
|
4398 | tree.text = text;
|
4399 | } else {
|
4400 | setTextContent(tree.node, text);
|
4401 | }
|
4402 | }
|
4403 |
|
4404 | function toString() {
|
4405 | return this.node.nodeName;
|
4406 | }
|
4407 |
|
4408 | function DOMLazyTree(node) {
|
4409 | return {
|
4410 | node: node,
|
4411 | children: [],
|
4412 | html: null,
|
4413 | text: null,
|
4414 | toString: toString
|
4415 | };
|
4416 | }
|
4417 |
|
4418 | DOMLazyTree.insertTreeBefore = insertTreeBefore;
|
4419 | DOMLazyTree.replaceChildWithTree = replaceChildWithTree;
|
4420 | DOMLazyTree.queueChild = queueChild;
|
4421 | DOMLazyTree.queueHTML = queueHTML;
|
4422 | DOMLazyTree.queueText = queueText;
|
4423 |
|
4424 | module.exports = DOMLazyTree;
|
4425 |
|
4426 | },
|
4427 |
|
4428 | function(module, exports, __webpack_require__) {
|
4429 |
|
4430 | |
4431 |
|
4432 |
|
4433 |
|
4434 |
|
4435 |
|
4436 |
|
4437 |
|
4438 |
|
4439 |
|
4440 | 'use strict';
|
4441 |
|
4442 | var _prodInvariant = __webpack_require__(6);
|
4443 |
|
4444 | var EventPluginRegistry = __webpack_require__(29);
|
4445 | var EventPluginUtils = __webpack_require__(42);
|
4446 | var ReactErrorUtils = __webpack_require__(46);
|
4447 |
|
4448 | var accumulateInto = __webpack_require__(87);
|
4449 | var forEachAccumulated = __webpack_require__(89);
|
4450 | var invariant = __webpack_require__(4);
|
4451 |
|
4452 | |
4453 |
|
4454 |
|
4455 | var listenerBank = {};
|
4456 |
|
4457 | |
4458 |
|
4459 |
|
4460 |
|
4461 | var eventQueue = null;
|
4462 |
|
4463 | |
4464 |
|
4465 |
|
4466 |
|
4467 |
|
4468 |
|
4469 |
|
4470 | var executeDispatchesAndRelease = function (event, simulated) {
|
4471 | if (event) {
|
4472 | EventPluginUtils.executeDispatchesInOrder(event, simulated);
|
4473 |
|
4474 | if (!event.isPersistent()) {
|
4475 | event.constructor.release(event);
|
4476 | }
|
4477 | }
|
4478 | };
|
4479 | var executeDispatchesAndReleaseSimulated = function (e) {
|
4480 | return executeDispatchesAndRelease(e, true);
|
4481 | };
|
4482 | var executeDispatchesAndReleaseTopLevel = function (e) {
|
4483 | return executeDispatchesAndRelease(e, false);
|
4484 | };
|
4485 |
|
4486 | var getDictionaryKey = function (inst) {
|
4487 |
|
4488 |
|
4489 | return '.' + inst._rootNodeID;
|
4490 | };
|
4491 |
|
4492 | function isInteractive(tag) {
|
4493 | return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
|
4494 | }
|
4495 |
|
4496 | function shouldPreventMouseEvent(name, type, props) {
|
4497 | switch (name) {
|
4498 | case 'onClick':
|
4499 | case 'onClickCapture':
|
4500 | case 'onDoubleClick':
|
4501 | case 'onDoubleClickCapture':
|
4502 | case 'onMouseDown':
|
4503 | case 'onMouseDownCapture':
|
4504 | case 'onMouseMove':
|
4505 | case 'onMouseMoveCapture':
|
4506 | case 'onMouseUp':
|
4507 | case 'onMouseUpCapture':
|
4508 | return !!(props.disabled && isInteractive(type));
|
4509 | default:
|
4510 | return false;
|
4511 | }
|
4512 | }
|
4513 |
|
4514 | |
4515 |
|
4516 |
|
4517 |
|
4518 |
|
4519 |
|
4520 |
|
4521 |
|
4522 |
|
4523 |
|
4524 |
|
4525 |
|
4526 |
|
4527 |
|
4528 |
|
4529 |
|
4530 |
|
4531 |
|
4532 |
|
4533 |
|
4534 |
|
4535 |
|
4536 | var EventPluginHub = {
|
4537 |
|
4538 | |
4539 |
|
4540 |
|
4541 | injection: {
|
4542 |
|
4543 | |
4544 |
|
4545 |
|
4546 |
|
4547 | injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
|
4548 |
|
4549 | |
4550 |
|
4551 |
|
4552 | injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
|
4553 |
|
4554 | },
|
4555 |
|
4556 | |
4557 |
|
4558 |
|
4559 |
|
4560 |
|
4561 |
|
4562 |
|
4563 | putListener: function (inst, registrationName, listener) {
|
4564 | !(typeof listener === 'function') ? true ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;
|
4565 |
|
4566 | var key = getDictionaryKey(inst);
|
4567 | var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
|
4568 | bankForRegistrationName[key] = listener;
|
4569 |
|
4570 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
4571 | if (PluginModule && PluginModule.didPutListener) {
|
4572 | PluginModule.didPutListener(inst, registrationName, listener);
|
4573 | }
|
4574 | },
|
4575 |
|
4576 | |
4577 |
|
4578 |
|
4579 |
|
4580 |
|
4581 | getListener: function (inst, registrationName) {
|
4582 |
|
4583 |
|
4584 | var bankForRegistrationName = listenerBank[registrationName];
|
4585 | if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) {
|
4586 | return null;
|
4587 | }
|
4588 | var key = getDictionaryKey(inst);
|
4589 | return bankForRegistrationName && bankForRegistrationName[key];
|
4590 | },
|
4591 |
|
4592 | |
4593 |
|
4594 |
|
4595 |
|
4596 |
|
4597 |
|
4598 | deleteListener: function (inst, registrationName) {
|
4599 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
4600 | if (PluginModule && PluginModule.willDeleteListener) {
|
4601 | PluginModule.willDeleteListener(inst, registrationName);
|
4602 | }
|
4603 |
|
4604 | var bankForRegistrationName = listenerBank[registrationName];
|
4605 |
|
4606 | if (bankForRegistrationName) {
|
4607 | var key = getDictionaryKey(inst);
|
4608 | delete bankForRegistrationName[key];
|
4609 | }
|
4610 | },
|
4611 |
|
4612 | |
4613 |
|
4614 |
|
4615 |
|
4616 |
|
4617 | deleteAllListeners: function (inst) {
|
4618 | var key = getDictionaryKey(inst);
|
4619 | for (var registrationName in listenerBank) {
|
4620 | if (!listenerBank.hasOwnProperty(registrationName)) {
|
4621 | continue;
|
4622 | }
|
4623 |
|
4624 | if (!listenerBank[registrationName][key]) {
|
4625 | continue;
|
4626 | }
|
4627 |
|
4628 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
4629 | if (PluginModule && PluginModule.willDeleteListener) {
|
4630 | PluginModule.willDeleteListener(inst, registrationName);
|
4631 | }
|
4632 |
|
4633 | delete listenerBank[registrationName][key];
|
4634 | }
|
4635 | },
|
4636 |
|
4637 | |
4638 |
|
4639 |
|
4640 |
|
4641 |
|
4642 |
|
4643 |
|
4644 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
4645 | var events;
|
4646 | var plugins = EventPluginRegistry.plugins;
|
4647 | for (var i = 0; i < plugins.length; i++) {
|
4648 |
|
4649 | var possiblePlugin = plugins[i];
|
4650 | if (possiblePlugin) {
|
4651 | var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
|
4652 | if (extractedEvents) {
|
4653 | events = accumulateInto(events, extractedEvents);
|
4654 | }
|
4655 | }
|
4656 | }
|
4657 | return events;
|
4658 | },
|
4659 |
|
4660 | |
4661 |
|
4662 |
|
4663 |
|
4664 |
|
4665 |
|
4666 |
|
4667 | enqueueEvents: function (events) {
|
4668 | if (events) {
|
4669 | eventQueue = accumulateInto(eventQueue, events);
|
4670 | }
|
4671 | },
|
4672 |
|
4673 | |
4674 |
|
4675 |
|
4676 |
|
4677 |
|
4678 | processEventQueue: function (simulated) {
|
4679 |
|
4680 |
|
4681 | var processingEventQueue = eventQueue;
|
4682 | eventQueue = null;
|
4683 | if (simulated) {
|
4684 | forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
|
4685 | } else {
|
4686 | forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
|
4687 | }
|
4688 | !!eventQueue ? true ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0;
|
4689 |
|
4690 | ReactErrorUtils.rethrowCaughtError();
|
4691 | },
|
4692 |
|
4693 | |
4694 |
|
4695 |
|
4696 | __purge: function () {
|
4697 | listenerBank = {};
|
4698 | },
|
4699 |
|
4700 | __getListenerBank: function () {
|
4701 | return listenerBank;
|
4702 | }
|
4703 |
|
4704 | };
|
4705 |
|
4706 | module.exports = EventPluginHub;
|
4707 |
|
4708 | },
|
4709 |
|
4710 | function(module, exports, __webpack_require__) {
|
4711 |
|
4712 | |
4713 |
|
4714 |
|
4715 |
|
4716 |
|
4717 |
|
4718 |
|
4719 |
|
4720 |
|
4721 |
|
4722 | 'use strict';
|
4723 |
|
4724 | var EventPluginHub = __webpack_require__(26);
|
4725 | var EventPluginUtils = __webpack_require__(42);
|
4726 |
|
4727 | var accumulateInto = __webpack_require__(87);
|
4728 | var forEachAccumulated = __webpack_require__(89);
|
4729 | var warning = __webpack_require__(5);
|
4730 |
|
4731 | var getListener = EventPluginHub.getListener;
|
4732 |
|
4733 | |
4734 |
|
4735 |
|
4736 |
|
4737 | function listenerAtPhase(inst, event, propagationPhase) {
|
4738 | var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
|
4739 | return getListener(inst, registrationName);
|
4740 | }
|
4741 |
|
4742 | |
4743 |
|
4744 |
|
4745 |
|
4746 |
|
4747 |
|
4748 | function accumulateDirectionalDispatches(inst, phase, event) {
|
4749 | if (true) {
|
4750 | true ? warning(inst, 'Dispatching inst must not be null') : void 0;
|
4751 | }
|
4752 | var listener = listenerAtPhase(inst, event, phase);
|
4753 | if (listener) {
|
4754 | event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
|
4755 | event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
|
4756 | }
|
4757 | }
|
4758 |
|
4759 | |
4760 |
|
4761 |
|
4762 |
|
4763 |
|
4764 |
|
4765 |
|
4766 | function accumulateTwoPhaseDispatchesSingle(event) {
|
4767 | if (event && event.dispatchConfig.phasedRegistrationNames) {
|
4768 | EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
|
4769 | }
|
4770 | }
|
4771 |
|
4772 | |
4773 |
|
4774 |
|
4775 | function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
|
4776 | if (event && event.dispatchConfig.phasedRegistrationNames) {
|
4777 | var targetInst = event._targetInst;
|
4778 | var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
|
4779 | EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
|
4780 | }
|
4781 | }
|
4782 |
|
4783 | |
4784 |
|
4785 |
|
4786 |
|
4787 |
|
4788 | function accumulateDispatches(inst, ignoredDirection, event) {
|
4789 | if (event && event.dispatchConfig.registrationName) {
|
4790 | var registrationName = event.dispatchConfig.registrationName;
|
4791 | var listener = getListener(inst, registrationName);
|
4792 | if (listener) {
|
4793 | event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
|
4794 | event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
|
4795 | }
|
4796 | }
|
4797 | }
|
4798 |
|
4799 | |
4800 |
|
4801 |
|
4802 |
|
4803 |
|
4804 | function accumulateDirectDispatchesSingle(event) {
|
4805 | if (event && event.dispatchConfig.registrationName) {
|
4806 | accumulateDispatches(event._targetInst, null, event);
|
4807 | }
|
4808 | }
|
4809 |
|
4810 | function accumulateTwoPhaseDispatches(events) {
|
4811 | forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
|
4812 | }
|
4813 |
|
4814 | function accumulateTwoPhaseDispatchesSkipTarget(events) {
|
4815 | forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
|
4816 | }
|
4817 |
|
4818 | function accumulateEnterLeaveDispatches(leave, enter, from, to) {
|
4819 | EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
|
4820 | }
|
4821 |
|
4822 | function accumulateDirectDispatches(events) {
|
4823 | forEachAccumulated(events, accumulateDirectDispatchesSingle);
|
4824 | }
|
4825 |
|
4826 | |
4827 |
|
4828 |
|
4829 |
|
4830 |
|
4831 |
|
4832 |
|
4833 |
|
4834 |
|
4835 |
|
4836 |
|
4837 | var EventPropagators = {
|
4838 | accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
|
4839 | accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
|
4840 | accumulateDirectDispatches: accumulateDirectDispatches,
|
4841 | accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
|
4842 | };
|
4843 |
|
4844 | module.exports = EventPropagators;
|
4845 |
|
4846 | },
|
4847 |
|
4848 | function(module, exports) {
|
4849 |
|
4850 |
|
4851 | var process = module.exports = {};
|
4852 |
|
4853 |
|
4854 |
|
4855 |
|
4856 |
|
4857 |
|
4858 | var cachedSetTimeout;
|
4859 | var cachedClearTimeout;
|
4860 |
|
4861 | function defaultSetTimout() {
|
4862 | throw new Error('setTimeout has not been defined');
|
4863 | }
|
4864 | function defaultClearTimeout () {
|
4865 | throw new Error('clearTimeout has not been defined');
|
4866 | }
|
4867 | (function () {
|
4868 | try {
|
4869 | if (typeof setTimeout === 'function') {
|
4870 | cachedSetTimeout = setTimeout;
|
4871 | } else {
|
4872 | cachedSetTimeout = defaultSetTimout;
|
4873 | }
|
4874 | } catch (e) {
|
4875 | cachedSetTimeout = defaultSetTimout;
|
4876 | }
|
4877 | try {
|
4878 | if (typeof clearTimeout === 'function') {
|
4879 | cachedClearTimeout = clearTimeout;
|
4880 | } else {
|
4881 | cachedClearTimeout = defaultClearTimeout;
|
4882 | }
|
4883 | } catch (e) {
|
4884 | cachedClearTimeout = defaultClearTimeout;
|
4885 | }
|
4886 | } ())
|
4887 | function runTimeout(fun) {
|
4888 | if (cachedSetTimeout === setTimeout) {
|
4889 |
|
4890 | return setTimeout(fun, 0);
|
4891 | }
|
4892 |
|
4893 | if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
4894 | cachedSetTimeout = setTimeout;
|
4895 | return setTimeout(fun, 0);
|
4896 | }
|
4897 | try {
|
4898 |
|
4899 | return cachedSetTimeout(fun, 0);
|
4900 | } catch(e){
|
4901 | try {
|
4902 |
|
4903 | return cachedSetTimeout.call(null, fun, 0);
|
4904 | } catch(e){
|
4905 |
|
4906 | return cachedSetTimeout.call(this, fun, 0);
|
4907 | }
|
4908 | }
|
4909 |
|
4910 |
|
4911 | }
|
4912 | function runClearTimeout(marker) {
|
4913 | if (cachedClearTimeout === clearTimeout) {
|
4914 |
|
4915 | return clearTimeout(marker);
|
4916 | }
|
4917 |
|
4918 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
4919 | cachedClearTimeout = clearTimeout;
|
4920 | return clearTimeout(marker);
|
4921 | }
|
4922 | try {
|
4923 |
|
4924 | return cachedClearTimeout(marker);
|
4925 | } catch (e){
|
4926 | try {
|
4927 |
|
4928 | return cachedClearTimeout.call(null, marker);
|
4929 | } catch (e){
|
4930 |
|
4931 |
|
4932 | return cachedClearTimeout.call(this, marker);
|
4933 | }
|
4934 | }
|
4935 |
|
4936 |
|
4937 |
|
4938 | }
|
4939 | var queue = [];
|
4940 | var draining = false;
|
4941 | var currentQueue;
|
4942 | var queueIndex = -1;
|
4943 |
|
4944 | function cleanUpNextTick() {
|
4945 | if (!draining || !currentQueue) {
|
4946 | return;
|
4947 | }
|
4948 | draining = false;
|
4949 | if (currentQueue.length) {
|
4950 | queue = currentQueue.concat(queue);
|
4951 | } else {
|
4952 | queueIndex = -1;
|
4953 | }
|
4954 | if (queue.length) {
|
4955 | drainQueue();
|
4956 | }
|
4957 | }
|
4958 |
|
4959 | function drainQueue() {
|
4960 | if (draining) {
|
4961 | return;
|
4962 | }
|
4963 | var timeout = runTimeout(cleanUpNextTick);
|
4964 | draining = true;
|
4965 |
|
4966 | var len = queue.length;
|
4967 | while(len) {
|
4968 | currentQueue = queue;
|
4969 | queue = [];
|
4970 | while (++queueIndex < len) {
|
4971 | if (currentQueue) {
|
4972 | currentQueue[queueIndex].run();
|
4973 | }
|
4974 | }
|
4975 | queueIndex = -1;
|
4976 | len = queue.length;
|
4977 | }
|
4978 | currentQueue = null;
|
4979 | draining = false;
|
4980 | runClearTimeout(timeout);
|
4981 | }
|
4982 |
|
4983 | process.nextTick = function (fun) {
|
4984 | var args = new Array(arguments.length - 1);
|
4985 | if (arguments.length > 1) {
|
4986 | for (var i = 1; i < arguments.length; i++) {
|
4987 | args[i - 1] = arguments[i];
|
4988 | }
|
4989 | }
|
4990 | queue.push(new Item(fun, args));
|
4991 | if (queue.length === 1 && !draining) {
|
4992 | runTimeout(drainQueue);
|
4993 | }
|
4994 | };
|
4995 |
|
4996 |
|
4997 | function Item(fun, array) {
|
4998 | this.fun = fun;
|
4999 | this.array = array;
|
5000 | }
|
5001 | Item.prototype.run = function () {
|
5002 | this.fun.apply(null, this.array);
|
5003 | };
|
5004 | process.title = 'browser';
|
5005 | process.browser = true;
|
5006 | process.env = {};
|
5007 | process.argv = [];
|
5008 | process.version = '';
|
5009 | process.versions = {};
|
5010 |
|
5011 | function noop() {}
|
5012 |
|
5013 | process.on = noop;
|
5014 | process.addListener = noop;
|
5015 | process.once = noop;
|
5016 | process.off = noop;
|
5017 | process.removeListener = noop;
|
5018 | process.removeAllListeners = noop;
|
5019 | process.emit = noop;
|
5020 |
|
5021 | process.binding = function (name) {
|
5022 | throw new Error('process.binding is not supported');
|
5023 | };
|
5024 |
|
5025 | process.cwd = function () { return '/' };
|
5026 | process.chdir = function (dir) {
|
5027 | throw new Error('process.chdir is not supported');
|
5028 | };
|
5029 | process.umask = function() { return 0; };
|
5030 |
|
5031 |
|
5032 | },
|
5033 |
|
5034 | function(module, exports, __webpack_require__) {
|
5035 |
|
5036 | |
5037 |
|
5038 |
|
5039 |
|
5040 |
|
5041 |
|
5042 |
|
5043 |
|
5044 |
|
5045 |
|
5046 |
|
5047 | 'use strict';
|
5048 |
|
5049 | var _prodInvariant = __webpack_require__(6);
|
5050 |
|
5051 | var invariant = __webpack_require__(4);
|
5052 |
|
5053 | |
5054 |
|
5055 |
|
5056 | var eventPluginOrder = null;
|
5057 |
|
5058 | |
5059 |
|
5060 |
|
5061 | var namesToPlugins = {};
|
5062 |
|
5063 | |
5064 |
|
5065 |
|
5066 |
|
5067 |
|
5068 | function recomputePluginOrdering() {
|
5069 | if (!eventPluginOrder) {
|
5070 |
|
5071 | return;
|
5072 | }
|
5073 | for (var pluginName in namesToPlugins) {
|
5074 | var pluginModule = namesToPlugins[pluginName];
|
5075 | var pluginIndex = eventPluginOrder.indexOf(pluginName);
|
5076 | !(pluginIndex > -1) ? true ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;
|
5077 | if (EventPluginRegistry.plugins[pluginIndex]) {
|
5078 | continue;
|
5079 | }
|
5080 | !pluginModule.extractEvents ? true ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;
|
5081 | EventPluginRegistry.plugins[pluginIndex] = pluginModule;
|
5082 | var publishedEvents = pluginModule.eventTypes;
|
5083 | for (var eventName in publishedEvents) {
|
5084 | !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? true ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;
|
5085 | }
|
5086 | }
|
5087 | }
|
5088 |
|
5089 | |
5090 |
|
5091 |
|
5092 |
|
5093 |
|
5094 |
|
5095 |
|
5096 |
|
5097 | function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
|
5098 | !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? true ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;
|
5099 | EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
|
5100 |
|
5101 | var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
|
5102 | if (phasedRegistrationNames) {
|
5103 | for (var phaseName in phasedRegistrationNames) {
|
5104 | if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
|
5105 | var phasedRegistrationName = phasedRegistrationNames[phaseName];
|
5106 | publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
|
5107 | }
|
5108 | }
|
5109 | return true;
|
5110 | } else if (dispatchConfig.registrationName) {
|
5111 | publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
|
5112 | return true;
|
5113 | }
|
5114 | return false;
|
5115 | }
|
5116 |
|
5117 | |
5118 |
|
5119 |
|
5120 |
|
5121 |
|
5122 |
|
5123 |
|
5124 |
|
5125 | function publishRegistrationName(registrationName, pluginModule, eventName) {
|
5126 | !!EventPluginRegistry.registrationNameModules[registrationName] ? true ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;
|
5127 | EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;
|
5128 | EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
|
5129 |
|
5130 | if (true) {
|
5131 | var lowerCasedName = registrationName.toLowerCase();
|
5132 | EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
|
5133 |
|
5134 | if (registrationName === 'onDoubleClick') {
|
5135 | EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
|
5136 | }
|
5137 | }
|
5138 | }
|
5139 |
|
5140 | |
5141 |
|
5142 |
|
5143 |
|
5144 |
|
5145 | var EventPluginRegistry = {
|
5146 |
|
5147 | |
5148 |
|
5149 |
|
5150 | plugins: [],
|
5151 |
|
5152 | |
5153 |
|
5154 |
|
5155 | eventNameDispatchConfigs: {},
|
5156 |
|
5157 | |
5158 |
|
5159 |
|
5160 | registrationNameModules: {},
|
5161 |
|
5162 | |
5163 |
|
5164 |
|
5165 | registrationNameDependencies: {},
|
5166 |
|
5167 | |
5168 |
|
5169 |
|
5170 |
|
5171 |
|
5172 |
|
5173 | possibleRegistrationNames: true ? {} : null,
|
5174 |
|
5175 |
|
5176 | |
5177 |
|
5178 |
|
5179 |
|
5180 |
|
5181 |
|
5182 |
|
5183 |
|
5184 |
|
5185 | injectEventPluginOrder: function (injectedEventPluginOrder) {
|
5186 | !!eventPluginOrder ? true ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0;
|
5187 |
|
5188 | eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
|
5189 | recomputePluginOrdering();
|
5190 | },
|
5191 |
|
5192 | |
5193 |
|
5194 |
|
5195 |
|
5196 |
|
5197 |
|
5198 |
|
5199 |
|
5200 |
|
5201 |
|
5202 | injectEventPluginsByName: function (injectedNamesToPlugins) {
|
5203 | var isOrderingDirty = false;
|
5204 | for (var pluginName in injectedNamesToPlugins) {
|
5205 | if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
|
5206 | continue;
|
5207 | }
|
5208 | var pluginModule = injectedNamesToPlugins[pluginName];
|
5209 | if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
|
5210 | !!namesToPlugins[pluginName] ? true ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;
|
5211 | namesToPlugins[pluginName] = pluginModule;
|
5212 | isOrderingDirty = true;
|
5213 | }
|
5214 | }
|
5215 | if (isOrderingDirty) {
|
5216 | recomputePluginOrdering();
|
5217 | }
|
5218 | },
|
5219 |
|
5220 | |
5221 |
|
5222 |
|
5223 |
|
5224 |
|
5225 |
|
5226 |
|
5227 | getPluginModuleForEvent: function (event) {
|
5228 | var dispatchConfig = event.dispatchConfig;
|
5229 | if (dispatchConfig.registrationName) {
|
5230 | return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
|
5231 | }
|
5232 | if (dispatchConfig.phasedRegistrationNames !== undefined) {
|
5233 |
|
5234 |
|
5235 | var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
|
5236 |
|
5237 | for (var phase in phasedRegistrationNames) {
|
5238 | if (!phasedRegistrationNames.hasOwnProperty(phase)) {
|
5239 | continue;
|
5240 | }
|
5241 | var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];
|
5242 | if (pluginModule) {
|
5243 | return pluginModule;
|
5244 | }
|
5245 | }
|
5246 | }
|
5247 | return null;
|
5248 | },
|
5249 |
|
5250 | |
5251 |
|
5252 |
|
5253 |
|
5254 | _resetEventPlugins: function () {
|
5255 | eventPluginOrder = null;
|
5256 | for (var pluginName in namesToPlugins) {
|
5257 | if (namesToPlugins.hasOwnProperty(pluginName)) {
|
5258 | delete namesToPlugins[pluginName];
|
5259 | }
|
5260 | }
|
5261 | EventPluginRegistry.plugins.length = 0;
|
5262 |
|
5263 | var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
|
5264 | for (var eventName in eventNameDispatchConfigs) {
|
5265 | if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
|
5266 | delete eventNameDispatchConfigs[eventName];
|
5267 | }
|
5268 | }
|
5269 |
|
5270 | var registrationNameModules = EventPluginRegistry.registrationNameModules;
|
5271 | for (var registrationName in registrationNameModules) {
|
5272 | if (registrationNameModules.hasOwnProperty(registrationName)) {
|
5273 | delete registrationNameModules[registrationName];
|
5274 | }
|
5275 | }
|
5276 |
|
5277 | if (true) {
|
5278 | var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
|
5279 | for (var lowerCasedName in possibleRegistrationNames) {
|
5280 | if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
|
5281 | delete possibleRegistrationNames[lowerCasedName];
|
5282 | }
|
5283 | }
|
5284 | }
|
5285 | }
|
5286 |
|
5287 | };
|
5288 |
|
5289 | module.exports = EventPluginRegistry;
|
5290 |
|
5291 | },
|
5292 |
|
5293 | function(module, exports, __webpack_require__) {
|
5294 |
|
5295 | |
5296 |
|
5297 |
|
5298 |
|
5299 |
|
5300 |
|
5301 |
|
5302 |
|
5303 |
|
5304 |
|
5305 | 'use strict';
|
5306 |
|
5307 | var _assign = __webpack_require__(7);
|
5308 |
|
5309 | var EventPluginRegistry = __webpack_require__(29);
|
5310 | var ReactEventEmitterMixin = __webpack_require__(214);
|
5311 | var ViewportMetrics = __webpack_require__(86);
|
5312 |
|
5313 | var getVendorPrefixedEventName = __webpack_require__(93);
|
5314 | var isEventSupported = __webpack_require__(52);
|
5315 |
|
5316 | |
5317 |
|
5318 |
|
5319 |
|
5320 |
|
5321 |
|
5322 |
|
5323 |
|
5324 |
|
5325 |
|
5326 |
|
5327 |
|
5328 |
|
5329 |
|
5330 |
|
5331 |
|
5332 |
|
5333 |
|
5334 |
|
5335 |
|
5336 |
|
5337 |
|
5338 |
|
5339 |
|
5340 |
|
5341 |
|
5342 |
|
5343 |
|
5344 |
|
5345 |
|
5346 |
|
5347 |
|
5348 |
|
5349 |
|
5350 |
|
5351 |
|
5352 |
|
5353 |
|
5354 |
|
5355 |
|
5356 |
|
5357 |
|
5358 |
|
5359 |
|
5360 |
|
5361 |
|
5362 |
|
5363 |
|
5364 |
|
5365 |
|
5366 |
|
5367 |
|
5368 |
|
5369 |
|
5370 |
|
5371 | var hasEventPageXY;
|
5372 | var alreadyListeningTo = {};
|
5373 | var isMonitoringScrollValue = false;
|
5374 | var reactTopListenersCounter = 0;
|
5375 |
|
5376 |
|
5377 |
|
5378 |
|
5379 | var topEventMapping = {
|
5380 | topAbort: 'abort',
|
5381 | topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
|
5382 | topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
|
5383 | topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
|
5384 | topBlur: 'blur',
|
5385 | topCanPlay: 'canplay',
|
5386 | topCanPlayThrough: 'canplaythrough',
|
5387 | topChange: 'change',
|
5388 | topClick: 'click',
|
5389 | topCompositionEnd: 'compositionend',
|
5390 | topCompositionStart: 'compositionstart',
|
5391 | topCompositionUpdate: 'compositionupdate',
|
5392 | topContextMenu: 'contextmenu',
|
5393 | topCopy: 'copy',
|
5394 | topCut: 'cut',
|
5395 | topDoubleClick: 'dblclick',
|
5396 | topDrag: 'drag',
|
5397 | topDragEnd: 'dragend',
|
5398 | topDragEnter: 'dragenter',
|
5399 | topDragExit: 'dragexit',
|
5400 | topDragLeave: 'dragleave',
|
5401 | topDragOver: 'dragover',
|
5402 | topDragStart: 'dragstart',
|
5403 | topDrop: 'drop',
|
5404 | topDurationChange: 'durationchange',
|
5405 | topEmptied: 'emptied',
|
5406 | topEncrypted: 'encrypted',
|
5407 | topEnded: 'ended',
|
5408 | topError: 'error',
|
5409 | topFocus: 'focus',
|
5410 | topInput: 'input',
|
5411 | topKeyDown: 'keydown',
|
5412 | topKeyPress: 'keypress',
|
5413 | topKeyUp: 'keyup',
|
5414 | topLoadedData: 'loadeddata',
|
5415 | topLoadedMetadata: 'loadedmetadata',
|
5416 | topLoadStart: 'loadstart',
|
5417 | topMouseDown: 'mousedown',
|
5418 | topMouseMove: 'mousemove',
|
5419 | topMouseOut: 'mouseout',
|
5420 | topMouseOver: 'mouseover',
|
5421 | topMouseUp: 'mouseup',
|
5422 | topPaste: 'paste',
|
5423 | topPause: 'pause',
|
5424 | topPlay: 'play',
|
5425 | topPlaying: 'playing',
|
5426 | topProgress: 'progress',
|
5427 | topRateChange: 'ratechange',
|
5428 | topScroll: 'scroll',
|
5429 | topSeeked: 'seeked',
|
5430 | topSeeking: 'seeking',
|
5431 | topSelectionChange: 'selectionchange',
|
5432 | topStalled: 'stalled',
|
5433 | topSuspend: 'suspend',
|
5434 | topTextInput: 'textInput',
|
5435 | topTimeUpdate: 'timeupdate',
|
5436 | topTouchCancel: 'touchcancel',
|
5437 | topTouchEnd: 'touchend',
|
5438 | topTouchMove: 'touchmove',
|
5439 | topTouchStart: 'touchstart',
|
5440 | topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
|
5441 | topVolumeChange: 'volumechange',
|
5442 | topWaiting: 'waiting',
|
5443 | topWheel: 'wheel'
|
5444 | };
|
5445 |
|
5446 | |
5447 |
|
5448 |
|
5449 | var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
|
5450 |
|
5451 | function getListeningForDocument(mountAt) {
|
5452 |
|
5453 |
|
5454 | if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
|
5455 | mountAt[topListenersIDKey] = reactTopListenersCounter++;
|
5456 | alreadyListeningTo[mountAt[topListenersIDKey]] = {};
|
5457 | }
|
5458 | return alreadyListeningTo[mountAt[topListenersIDKey]];
|
5459 | }
|
5460 |
|
5461 | |
5462 |
|
5463 |
|
5464 |
|
5465 |
|
5466 |
|
5467 |
|
5468 |
|
5469 |
|
5470 |
|
5471 | var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
|
5472 |
|
5473 | |
5474 |
|
5475 |
|
5476 | ReactEventListener: null,
|
5477 |
|
5478 | injection: {
|
5479 | |
5480 |
|
5481 |
|
5482 | injectReactEventListener: function (ReactEventListener) {
|
5483 | ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
|
5484 | ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
|
5485 | }
|
5486 | },
|
5487 |
|
5488 | |
5489 |
|
5490 |
|
5491 |
|
5492 |
|
5493 | setEnabled: function (enabled) {
|
5494 | if (ReactBrowserEventEmitter.ReactEventListener) {
|
5495 | ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
|
5496 | }
|
5497 | },
|
5498 |
|
5499 | |
5500 |
|
5501 |
|
5502 | isEnabled: function () {
|
5503 | return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
|
5504 | },
|
5505 |
|
5506 | |
5507 |
|
5508 |
|
5509 |
|
5510 |
|
5511 |
|
5512 |
|
5513 |
|
5514 |
|
5515 |
|
5516 |
|
5517 |
|
5518 |
|
5519 |
|
5520 |
|
5521 |
|
5522 |
|
5523 |
|
5524 |
|
5525 |
|
5526 |
|
5527 | listenTo: function (registrationName, contentDocumentHandle) {
|
5528 | var mountAt = contentDocumentHandle;
|
5529 | var isListening = getListeningForDocument(mountAt);
|
5530 | var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
|
5531 |
|
5532 | for (var i = 0; i < dependencies.length; i++) {
|
5533 | var dependency = dependencies[i];
|
5534 | if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
|
5535 | if (dependency === 'topWheel') {
|
5536 | if (isEventSupported('wheel')) {
|
5537 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);
|
5538 | } else if (isEventSupported('mousewheel')) {
|
5539 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);
|
5540 | } else {
|
5541 |
|
5542 |
|
5543 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
|
5544 | }
|
5545 | } else if (dependency === 'topScroll') {
|
5546 |
|
5547 | if (isEventSupported('scroll', true)) {
|
5548 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
|
5549 | } else {
|
5550 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
|
5551 | }
|
5552 | } else if (dependency === 'topFocus' || dependency === 'topBlur') {
|
5553 |
|
5554 | if (isEventSupported('focus', true)) {
|
5555 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
|
5556 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
|
5557 | } else if (isEventSupported('focusin')) {
|
5558 |
|
5559 |
|
5560 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);
|
5561 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);
|
5562 | }
|
5563 |
|
5564 |
|
5565 | isListening.topBlur = true;
|
5566 | isListening.topFocus = true;
|
5567 | } else if (topEventMapping.hasOwnProperty(dependency)) {
|
5568 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
|
5569 | }
|
5570 |
|
5571 | isListening[dependency] = true;
|
5572 | }
|
5573 | }
|
5574 | },
|
5575 |
|
5576 | trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
|
5577 | return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
|
5578 | },
|
5579 |
|
5580 | trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
|
5581 | return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
|
5582 | },
|
5583 |
|
5584 | |
5585 |
|
5586 |
|
5587 |
|
5588 |
|
5589 | supportsEventPageXY: function () {
|
5590 | if (!document.createEvent) {
|
5591 | return false;
|
5592 | }
|
5593 | var ev = document.createEvent('MouseEvent');
|
5594 | return ev != null && 'pageX' in ev;
|
5595 | },
|
5596 |
|
5597 | |
5598 |
|
5599 |
|
5600 |
|
5601 |
|
5602 |
|
5603 |
|
5604 |
|
5605 |
|
5606 |
|
5607 |
|
5608 | ensureScrollValueMonitoring: function () {
|
5609 | if (hasEventPageXY === undefined) {
|
5610 | hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
|
5611 | }
|
5612 | if (!hasEventPageXY && !isMonitoringScrollValue) {
|
5613 | var refresh = ViewportMetrics.refreshScrollValues;
|
5614 | ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
|
5615 | isMonitoringScrollValue = true;
|
5616 | }
|
5617 | }
|
5618 |
|
5619 | });
|
5620 |
|
5621 | module.exports = ReactBrowserEventEmitter;
|
5622 |
|
5623 | },
|
5624 |
|
5625 | function(module, exports, __webpack_require__) {
|
5626 |
|
5627 | |
5628 |
|
5629 |
|
5630 |
|
5631 |
|
5632 |
|
5633 |
|
5634 |
|
5635 |
|
5636 |
|
5637 | 'use strict';
|
5638 |
|
5639 | var SyntheticEvent = __webpack_require__(14);
|
5640 |
|
5641 | var getEventTarget = __webpack_require__(51);
|
5642 |
|
5643 | |
5644 |
|
5645 |
|
5646 |
|
5647 | var UIEventInterface = {
|
5648 | view: function (event) {
|
5649 | if (event.view) {
|
5650 | return event.view;
|
5651 | }
|
5652 |
|
5653 | var target = getEventTarget(event);
|
5654 | if (target.window === target) {
|
5655 |
|
5656 | return target;
|
5657 | }
|
5658 |
|
5659 | var doc = target.ownerDocument;
|
5660 |
|
5661 | if (doc) {
|
5662 | return doc.defaultView || doc.parentWindow;
|
5663 | } else {
|
5664 | return window;
|
5665 | }
|
5666 | },
|
5667 | detail: function (event) {
|
5668 | return event.detail || 0;
|
5669 | }
|
5670 | };
|
5671 |
|
5672 | |
5673 |
|
5674 |
|
5675 |
|
5676 |
|
5677 |
|
5678 | function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
5679 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
5680 | }
|
5681 |
|
5682 | SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
|
5683 |
|
5684 | module.exports = SyntheticUIEvent;
|
5685 |
|
5686 | },
|
5687 |
|
5688 | function(module, exports, __webpack_require__) {
|
5689 |
|
5690 | 'use strict';
|
5691 |
|
5692 | Object.defineProperty(exports, "__esModule", {
|
5693 | value: true
|
5694 | });
|
5695 |
|
5696 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
5697 |
|
5698 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
5699 |
|
5700 | var _react = __webpack_require__(1);
|
5701 |
|
5702 | var _react2 = _interopRequireDefault(_react);
|
5703 |
|
5704 | var _reactDom = __webpack_require__(60);
|
5705 |
|
5706 | var _reactDom2 = _interopRequireDefault(_reactDom);
|
5707 |
|
5708 | var _classnames = __webpack_require__(2);
|
5709 |
|
5710 | var _classnames2 = _interopRequireDefault(_classnames);
|
5711 |
|
5712 | var _lodash = __webpack_require__(18);
|
5713 |
|
5714 | var _lodash2 = _interopRequireDefault(_lodash);
|
5715 |
|
5716 | var _utils = __webpack_require__(3);
|
5717 |
|
5718 | var _TetherContent = __webpack_require__(33);
|
5719 |
|
5720 | var _TetherContent2 = _interopRequireDefault(_TetherContent);
|
5721 |
|
5722 | var _DropdownMenu = __webpack_require__(63);
|
5723 |
|
5724 | var _DropdownMenu2 = _interopRequireDefault(_DropdownMenu);
|
5725 |
|
5726 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5727 |
|
5728 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
5729 |
|
5730 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
5731 |
|
5732 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
5733 |
|
5734 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
5735 |
|
5736 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
5737 |
|
5738 |
|
5739 | var propTypes = {
|
5740 | disabled: _react.PropTypes.bool,
|
5741 | dropup: _react.PropTypes.bool,
|
5742 | group: _react.PropTypes.bool,
|
5743 | isOpen: _react.PropTypes.bool,
|
5744 | size: _react.PropTypes.string,
|
5745 | tag: _react.PropTypes.string,
|
5746 | tether: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.bool]),
|
5747 | toggle: _react.PropTypes.func,
|
5748 | children: _react.PropTypes.node,
|
5749 | className: _react.PropTypes.string,
|
5750 | cssModule: _react.PropTypes.object
|
5751 | };
|
5752 |
|
5753 | var defaultProps = {
|
5754 | isOpen: false,
|
5755 | tag: 'div'
|
5756 | };
|
5757 |
|
5758 | var childContextTypes = {
|
5759 | toggle: _react.PropTypes.func.isRequired,
|
5760 | isOpen: _react.PropTypes.bool.isRequired
|
5761 | };
|
5762 |
|
5763 | var defaultTetherConfig = {
|
5764 | classPrefix: 'bs-tether',
|
5765 | classes: { element: 'dropdown', enabled: 'show' },
|
5766 | constraints: [{ to: 'scrollParent', attachment: 'together none' }, { to: 'window', attachment: 'together none' }]
|
5767 | };
|
5768 |
|
5769 | var Dropdown = function (_React$Component) {
|
5770 | _inherits(Dropdown, _React$Component);
|
5771 |
|
5772 | function Dropdown(props) {
|
5773 | _classCallCheck(this, Dropdown);
|
5774 |
|
5775 | var _this = _possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).call(this, props));
|
5776 |
|
5777 | _this.addEvents = _this.addEvents.bind(_this);
|
5778 | _this.getTetherConfig = _this.getTetherConfig.bind(_this);
|
5779 | _this.handleDocumentClick = _this.handleDocumentClick.bind(_this);
|
5780 | _this.removeEvents = _this.removeEvents.bind(_this);
|
5781 | _this.toggle = _this.toggle.bind(_this);
|
5782 | return _this;
|
5783 | }
|
5784 |
|
5785 | _createClass(Dropdown, [{
|
5786 | key: 'getChildContext',
|
5787 | value: function getChildContext() {
|
5788 | return {
|
5789 | toggle: this.props.toggle,
|
5790 | isOpen: this.props.isOpen
|
5791 | };
|
5792 | }
|
5793 | }, {
|
5794 | key: 'componentDidMount',
|
5795 | value: function componentDidMount() {
|
5796 | this.handleProps();
|
5797 | }
|
5798 | }, {
|
5799 | key: 'componentDidUpdate',
|
5800 | value: function componentDidUpdate(prevProps) {
|
5801 | if (this.props.isOpen !== prevProps.isOpen) {
|
5802 | this.handleProps();
|
5803 | }
|
5804 | }
|
5805 | }, {
|
5806 | key: 'componentWillUnmount',
|
5807 | value: function componentWillUnmount() {
|
5808 | this.removeEvents();
|
5809 | }
|
5810 | }, {
|
5811 | key: 'getTetherTarget',
|
5812 | value: function getTetherTarget() {
|
5813 | var container = _reactDom2.default.findDOMNode(this);
|
5814 |
|
5815 | return container.querySelector('[data-toggle="dropdown"]');
|
5816 | }
|
5817 | }, {
|
5818 | key: 'getTetherConfig',
|
5819 | value: function getTetherConfig(childProps) {
|
5820 | var _this2 = this;
|
5821 |
|
5822 | var target = function target() {
|
5823 | return _this2.getTetherTarget();
|
5824 | };
|
5825 | var vElementAttach = 'top';
|
5826 | var hElementAttach = 'left';
|
5827 | var vTargetAttach = 'bottom';
|
5828 | var hTargetAttach = 'left';
|
5829 |
|
5830 | if (childProps.right) {
|
5831 | hElementAttach = 'right';
|
5832 | hTargetAttach = 'right';
|
5833 | }
|
5834 |
|
5835 | if (this.props.dropup) {
|
5836 | vElementAttach = 'bottom';
|
5837 | vTargetAttach = 'top';
|
5838 | }
|
5839 |
|
5840 | return _extends({}, defaultTetherConfig, {
|
5841 | attachment: vElementAttach + ' ' + hElementAttach,
|
5842 | targetAttachment: vTargetAttach + ' ' + hTargetAttach,
|
5843 | target: target
|
5844 | }, this.props.tether);
|
5845 | }
|
5846 | }, {
|
5847 | key: 'addEvents',
|
5848 | value: function addEvents() {
|
5849 | document.addEventListener('click', this.handleDocumentClick, true);
|
5850 | }
|
5851 | }, {
|
5852 | key: 'removeEvents',
|
5853 | value: function removeEvents() {
|
5854 | document.removeEventListener('click', this.handleDocumentClick, true);
|
5855 | }
|
5856 | }, {
|
5857 | key: 'handleDocumentClick',
|
5858 | value: function handleDocumentClick(e) {
|
5859 | var container = _reactDom2.default.findDOMNode(this);
|
5860 |
|
5861 | if (container.contains(e.target) && container !== e.target) {
|
5862 | return;
|
5863 | }
|
5864 |
|
5865 | this.toggle();
|
5866 | }
|
5867 | }, {
|
5868 | key: 'handleProps',
|
5869 | value: function handleProps() {
|
5870 | if (this.props.tether) {
|
5871 | return;
|
5872 | }
|
5873 |
|
5874 | if (this.props.isOpen) {
|
5875 | this.addEvents();
|
5876 | } else {
|
5877 | this.removeEvents();
|
5878 | }
|
5879 | }
|
5880 | }, {
|
5881 | key: 'toggle',
|
5882 | value: function toggle(e) {
|
5883 | if (this.props.disabled) {
|
5884 | return e && e.preventDefault();
|
5885 | }
|
5886 |
|
5887 | return this.props.toggle();
|
5888 | }
|
5889 | }, {
|
5890 | key: 'renderChildren',
|
5891 | value: function renderChildren() {
|
5892 | var _this3 = this;
|
5893 |
|
5894 | var _props = this.props,
|
5895 | tether = _props.tether,
|
5896 | children = _props.children,
|
5897 | attrs = _objectWithoutProperties(_props, ['tether', 'children']);
|
5898 |
|
5899 | attrs.toggle = this.toggle;
|
5900 |
|
5901 | return _react2.default.Children.map(_react2.default.Children.toArray(children), function (child) {
|
5902 | if (tether && child.type === _DropdownMenu2.default) {
|
5903 | var tetherConfig = _this3.getTetherConfig(child.props);
|
5904 | return _react2.default.createElement(
|
5905 | _TetherContent2.default,
|
5906 | _extends({}, attrs, { tether: tetherConfig }),
|
5907 | child
|
5908 | );
|
5909 | }
|
5910 |
|
5911 | return child;
|
5912 | });
|
5913 | }
|
5914 | }, {
|
5915 | key: 'render',
|
5916 | value: function render() {
|
5917 | var _classNames;
|
5918 |
|
5919 | var _omit = (0, _lodash2.default)(this.props, ['toggle', 'tether']),
|
5920 | className = _omit.className,
|
5921 | cssModule = _omit.cssModule,
|
5922 | dropup = _omit.dropup,
|
5923 | group = _omit.group,
|
5924 | size = _omit.size,
|
5925 | Tag = _omit.tag,
|
5926 | isOpen = _omit.isOpen,
|
5927 | attributes = _objectWithoutProperties(_omit, ['className', 'cssModule', 'dropup', 'group', 'size', 'tag', 'isOpen']);
|
5928 |
|
5929 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, (_classNames = {
|
5930 | 'btn-group': group
|
5931 | }, _defineProperty(_classNames, 'btn-group-' + size, !!size), _defineProperty(_classNames, 'dropdown', !group), _defineProperty(_classNames, 'show', isOpen), _defineProperty(_classNames, 'dropup', dropup), _classNames)), cssModule);
|
5932 |
|
5933 | return _react2.default.createElement(
|
5934 | Tag,
|
5935 | _extends({}, attributes, {
|
5936 | className: classes
|
5937 | }),
|
5938 | this.renderChildren()
|
5939 | );
|
5940 | }
|
5941 | }]);
|
5942 |
|
5943 | return Dropdown;
|
5944 | }(_react2.default.Component);
|
5945 |
|
5946 | Dropdown.propTypes = propTypes;
|
5947 | Dropdown.defaultProps = defaultProps;
|
5948 | Dropdown.childContextTypes = childContextTypes;
|
5949 |
|
5950 | exports.default = Dropdown;
|
5951 |
|
5952 | },
|
5953 |
|
5954 | function(module, exports, __webpack_require__) {
|
5955 |
|
5956 | 'use strict';
|
5957 |
|
5958 | Object.defineProperty(exports, "__esModule", {
|
5959 | value: true
|
5960 | });
|
5961 |
|
5962 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
5963 |
|
5964 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
5965 |
|
5966 | var _react = __webpack_require__(1);
|
5967 |
|
5968 | var _react2 = _interopRequireDefault(_react);
|
5969 |
|
5970 | var _reactDom = __webpack_require__(60);
|
5971 |
|
5972 | var _reactDom2 = _interopRequireDefault(_reactDom);
|
5973 |
|
5974 | var _lodash = __webpack_require__(181);
|
5975 |
|
5976 | var _lodash2 = _interopRequireDefault(_lodash);
|
5977 |
|
5978 | var _tether = __webpack_require__(267);
|
5979 |
|
5980 | var _tether2 = _interopRequireDefault(_tether);
|
5981 |
|
5982 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5983 |
|
5984 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
5985 |
|
5986 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
5987 |
|
5988 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
5989 |
|
5990 | var propTypes = {
|
5991 | children: _react.PropTypes.node.isRequired,
|
5992 | className: _react.PropTypes.string,
|
5993 | arrow: _react.PropTypes.string,
|
5994 | disabled: _react.PropTypes.bool,
|
5995 | isOpen: _react.PropTypes.bool.isRequired,
|
5996 | toggle: _react.PropTypes.func.isRequired,
|
5997 | tether: _react.PropTypes.object.isRequired,
|
5998 | tetherRef: _react.PropTypes.func,
|
5999 | style: _react.PropTypes.node,
|
6000 | cssModule: _react.PropTypes.object
|
6001 | };
|
6002 |
|
6003 | var defaultProps = {
|
6004 | isOpen: false,
|
6005 | tetherRef: function tetherRef() {}
|
6006 | };
|
6007 |
|
6008 | var TetherContent = function (_React$Component) {
|
6009 | _inherits(TetherContent, _React$Component);
|
6010 |
|
6011 | function TetherContent(props) {
|
6012 | _classCallCheck(this, TetherContent);
|
6013 |
|
6014 | var _this = _possibleConstructorReturn(this, (TetherContent.__proto__ || Object.getPrototypeOf(TetherContent)).call(this, props));
|
6015 |
|
6016 | _this.handleDocumentClick = _this.handleDocumentClick.bind(_this);
|
6017 | _this.toggle = _this.toggle.bind(_this);
|
6018 | return _this;
|
6019 | }
|
6020 |
|
6021 | _createClass(TetherContent, [{
|
6022 | key: 'componentDidMount',
|
6023 | value: function componentDidMount() {
|
6024 | this.handleProps();
|
6025 | }
|
6026 | }, {
|
6027 | key: 'componentDidUpdate',
|
6028 | value: function componentDidUpdate(prevProps) {
|
6029 | if (this.props.isOpen !== prevProps.isOpen) {
|
6030 | this.handleProps();
|
6031 | } else if (this._element) {
|
6032 |
|
6033 | this.renderIntoSubtree();
|
6034 | }
|
6035 | }
|
6036 | }, {
|
6037 | key: 'componentWillUnmount',
|
6038 | value: function componentWillUnmount() {
|
6039 | this.hide();
|
6040 | }
|
6041 | }, {
|
6042 | key: 'getTarget',
|
6043 | value: function getTarget() {
|
6044 | var target = this.props.tether.target;
|
6045 |
|
6046 | if ((0, _lodash2.default)(target)) {
|
6047 | return target();
|
6048 | }
|
6049 |
|
6050 | return target;
|
6051 | }
|
6052 | }, {
|
6053 | key: 'getTetherConfig',
|
6054 | value: function getTetherConfig() {
|
6055 | var config = _extends({}, this.props.tether);
|
6056 |
|
6057 | config.element = this._element;
|
6058 | config.target = this.getTarget();
|
6059 | return config;
|
6060 | }
|
6061 | }, {
|
6062 | key: 'handleDocumentClick',
|
6063 | value: function handleDocumentClick(e) {
|
6064 | var container = this._element;
|
6065 | if (e.target === container || !container.contains(e.target)) {
|
6066 | this.toggle();
|
6067 | }
|
6068 | }
|
6069 | }, {
|
6070 | key: 'handleProps',
|
6071 | value: function handleProps() {
|
6072 | if (this.props.isOpen) {
|
6073 | this.show();
|
6074 | } else {
|
6075 | this.hide();
|
6076 | }
|
6077 | }
|
6078 | }, {
|
6079 | key: 'hide',
|
6080 | value: function hide() {
|
6081 | document.removeEventListener('click', this.handleDocumentClick, true);
|
6082 |
|
6083 | if (this._element) {
|
6084 | document.body.removeChild(this._element);
|
6085 | _reactDom2.default.unmountComponentAtNode(this._element);
|
6086 | this._element = null;
|
6087 | }
|
6088 |
|
6089 | if (this._tether) {
|
6090 | this._tether.destroy();
|
6091 | this._tether = null;
|
6092 | this.props.tetherRef(this._tether);
|
6093 | }
|
6094 | }
|
6095 | }, {
|
6096 | key: 'show',
|
6097 | value: function show() {
|
6098 | document.addEventListener('click', this.handleDocumentClick, true);
|
6099 |
|
6100 | this._element = document.createElement('div');
|
6101 | this._element.className = this.props.className;
|
6102 | document.body.appendChild(this._element);
|
6103 | this.renderIntoSubtree();
|
6104 | this._tether = new _tether2.default(this.getTetherConfig());
|
6105 | this.props.tetherRef(this._tether);
|
6106 | this._tether.position();
|
6107 | this._element.childNodes[0].focus();
|
6108 | }
|
6109 | }, {
|
6110 | key: 'toggle',
|
6111 | value: function toggle(e) {
|
6112 | if (this.props.disabled) {
|
6113 | return e && e.preventDefault();
|
6114 | }
|
6115 |
|
6116 | return this.props.toggle();
|
6117 | }
|
6118 | }, {
|
6119 | key: 'renderIntoSubtree',
|
6120 | value: function renderIntoSubtree() {
|
6121 | _reactDom2.default.unstable_renderSubtreeIntoContainer(this, this.renderChildren(), this._element);
|
6122 | }
|
6123 | }, {
|
6124 | key: 'renderChildren',
|
6125 | value: function renderChildren() {
|
6126 | var _props = this.props,
|
6127 | children = _props.children,
|
6128 | style = _props.style;
|
6129 |
|
6130 | return _react2.default.cloneElement(children, { style: style });
|
6131 | }
|
6132 | }, {
|
6133 | key: 'render',
|
6134 | value: function render() {
|
6135 | return null;
|
6136 | }
|
6137 | }]);
|
6138 |
|
6139 | return TetherContent;
|
6140 | }(_react2.default.Component);
|
6141 |
|
6142 | TetherContent.propTypes = propTypes;
|
6143 | TetherContent.defaultProps = defaultProps;
|
6144 |
|
6145 | exports.default = TetherContent;
|
6146 |
|
6147 | },
|
6148 |
|
6149 | function(module, exports, __webpack_require__) {
|
6150 |
|
6151 | |
6152 |
|
6153 |
|
6154 |
|
6155 |
|
6156 |
|
6157 |
|
6158 |
|
6159 |
|
6160 |
|
6161 | 'use strict';
|
6162 |
|
6163 | var SyntheticUIEvent = __webpack_require__(31);
|
6164 | var ViewportMetrics = __webpack_require__(86);
|
6165 |
|
6166 | var getEventModifierState = __webpack_require__(50);
|
6167 |
|
6168 | |
6169 |
|
6170 |
|
6171 |
|
6172 | var MouseEventInterface = {
|
6173 | screenX: null,
|
6174 | screenY: null,
|
6175 | clientX: null,
|
6176 | clientY: null,
|
6177 | ctrlKey: null,
|
6178 | shiftKey: null,
|
6179 | altKey: null,
|
6180 | metaKey: null,
|
6181 | getModifierState: getEventModifierState,
|
6182 | button: function (event) {
|
6183 |
|
6184 |
|
6185 |
|
6186 | var button = event.button;
|
6187 | if ('which' in event) {
|
6188 | return button;
|
6189 | }
|
6190 |
|
6191 |
|
6192 |
|
6193 |
|
6194 | return button === 2 ? 2 : button === 4 ? 1 : 0;
|
6195 | },
|
6196 | buttons: null,
|
6197 | relatedTarget: function (event) {
|
6198 | return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
|
6199 | },
|
6200 |
|
6201 | pageX: function (event) {
|
6202 | return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
|
6203 | },
|
6204 | pageY: function (event) {
|
6205 | return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
|
6206 | }
|
6207 | };
|
6208 |
|
6209 | |
6210 |
|
6211 |
|
6212 |
|
6213 |
|
6214 |
|
6215 | function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
6216 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
6217 | }
|
6218 |
|
6219 | SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
|
6220 |
|
6221 | module.exports = SyntheticMouseEvent;
|
6222 |
|
6223 | },
|
6224 |
|
6225 | function(module, exports, __webpack_require__) {
|
6226 |
|
6227 | |
6228 |
|
6229 |
|
6230 |
|
6231 |
|
6232 |
|
6233 |
|
6234 |
|
6235 |
|
6236 |
|
6237 |
|
6238 | 'use strict';
|
6239 |
|
6240 | var _prodInvariant = __webpack_require__(6);
|
6241 |
|
6242 | var invariant = __webpack_require__(4);
|
6243 |
|
6244 | var OBSERVED_ERROR = {};
|
6245 |
|
6246 | |
6247 |
|
6248 |
|
6249 |
|
6250 |
|
6251 |
|
6252 |
|
6253 |
|
6254 |
|
6255 |
|
6256 |
|
6257 |
|
6258 |
|
6259 |
|
6260 |
|
6261 |
|
6262 |
|
6263 |
|
6264 |
|
6265 |
|
6266 |
|
6267 |
|
6268 |
|
6269 |
|
6270 |
|
6271 |
|
6272 |
|
6273 |
|
6274 |
|
6275 |
|
6276 |
|
6277 |
|
6278 |
|
6279 |
|
6280 |
|
6281 |
|
6282 |
|
6283 |
|
6284 |
|
6285 |
|
6286 |
|
6287 |
|
6288 |
|
6289 |
|
6290 |
|
6291 |
|
6292 |
|
6293 |
|
6294 |
|
6295 |
|
6296 |
|
6297 |
|
6298 |
|
6299 |
|
6300 |
|
6301 |
|
6302 |
|
6303 |
|
6304 |
|
6305 |
|
6306 |
|
6307 | var TransactionImpl = {
|
6308 | |
6309 |
|
6310 |
|
6311 |
|
6312 |
|
6313 |
|
6314 |
|
6315 | reinitializeTransaction: function () {
|
6316 | this.transactionWrappers = this.getTransactionWrappers();
|
6317 | if (this.wrapperInitData) {
|
6318 | this.wrapperInitData.length = 0;
|
6319 | } else {
|
6320 | this.wrapperInitData = [];
|
6321 | }
|
6322 | this._isInTransaction = false;
|
6323 | },
|
6324 |
|
6325 | _isInTransaction: false,
|
6326 |
|
6327 | |
6328 |
|
6329 |
|
6330 |
|
6331 | getTransactionWrappers: null,
|
6332 |
|
6333 | isInTransaction: function () {
|
6334 | return !!this._isInTransaction;
|
6335 | },
|
6336 |
|
6337 | |
6338 |
|
6339 |
|
6340 |
|
6341 |
|
6342 |
|
6343 |
|
6344 |
|
6345 |
|
6346 |
|
6347 |
|
6348 |
|
6349 |
|
6350 |
|
6351 |
|
6352 |
|
6353 |
|
6354 | perform: function (method, scope, a, b, c, d, e, f) {
|
6355 | !!this.isInTransaction() ? true ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
|
6356 | var errorThrown;
|
6357 | var ret;
|
6358 | try {
|
6359 | this._isInTransaction = true;
|
6360 |
|
6361 |
|
6362 |
|
6363 |
|
6364 | errorThrown = true;
|
6365 | this.initializeAll(0);
|
6366 | ret = method.call(scope, a, b, c, d, e, f);
|
6367 | errorThrown = false;
|
6368 | } finally {
|
6369 | try {
|
6370 | if (errorThrown) {
|
6371 |
|
6372 |
|
6373 | try {
|
6374 | this.closeAll(0);
|
6375 | } catch (err) {}
|
6376 | } else {
|
6377 |
|
6378 |
|
6379 | this.closeAll(0);
|
6380 | }
|
6381 | } finally {
|
6382 | this._isInTransaction = false;
|
6383 | }
|
6384 | }
|
6385 | return ret;
|
6386 | },
|
6387 |
|
6388 | initializeAll: function (startIndex) {
|
6389 | var transactionWrappers = this.transactionWrappers;
|
6390 | for (var i = startIndex; i < transactionWrappers.length; i++) {
|
6391 | var wrapper = transactionWrappers[i];
|
6392 | try {
|
6393 |
|
6394 |
|
6395 |
|
6396 |
|
6397 | this.wrapperInitData[i] = OBSERVED_ERROR;
|
6398 | this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
|
6399 | } finally {
|
6400 | if (this.wrapperInitData[i] === OBSERVED_ERROR) {
|
6401 |
|
6402 |
|
6403 |
|
6404 | try {
|
6405 | this.initializeAll(i + 1);
|
6406 | } catch (err) {}
|
6407 | }
|
6408 | }
|
6409 | }
|
6410 | },
|
6411 |
|
6412 | |
6413 |
|
6414 |
|
6415 |
|
6416 |
|
6417 |
|
6418 | closeAll: function (startIndex) {
|
6419 | !this.isInTransaction() ? true ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;
|
6420 | var transactionWrappers = this.transactionWrappers;
|
6421 | for (var i = startIndex; i < transactionWrappers.length; i++) {
|
6422 | var wrapper = transactionWrappers[i];
|
6423 | var initData = this.wrapperInitData[i];
|
6424 | var errorThrown;
|
6425 | try {
|
6426 |
|
6427 |
|
6428 |
|
6429 |
|
6430 | errorThrown = true;
|
6431 | if (initData !== OBSERVED_ERROR && wrapper.close) {
|
6432 | wrapper.close.call(this, initData);
|
6433 | }
|
6434 | errorThrown = false;
|
6435 | } finally {
|
6436 | if (errorThrown) {
|
6437 |
|
6438 |
|
6439 |
|
6440 | try {
|
6441 | this.closeAll(i + 1);
|
6442 | } catch (e) {}
|
6443 | }
|
6444 | }
|
6445 | }
|
6446 | this.wrapperInitData.length = 0;
|
6447 | }
|
6448 | };
|
6449 |
|
6450 | module.exports = TransactionImpl;
|
6451 |
|
6452 | },
|
6453 |
|
6454 | function(module, exports) {
|
6455 |
|
6456 | |
6457 |
|
6458 |
|
6459 |
|
6460 |
|
6461 |
|
6462 |
|
6463 |
|
6464 |
|
6465 |
|
6466 |
|
6467 |
|
6468 |
|
6469 |
|
6470 |
|
6471 |
|
6472 |
|
6473 |
|
6474 |
|
6475 |
|
6476 |
|
6477 |
|
6478 |
|
6479 |
|
6480 |
|
6481 |
|
6482 |
|
6483 |
|
6484 |
|
6485 |
|
6486 |
|
6487 |
|
6488 |
|
6489 |
|
6490 |
|
6491 | 'use strict';
|
6492 |
|
6493 |
|
6494 | |
6495 |
|
6496 |
|
6497 |
|
6498 |
|
6499 | var matchHtmlRegExp = /["'&<>]/;
|
6500 |
|
6501 | |
6502 |
|
6503 |
|
6504 |
|
6505 |
|
6506 |
|
6507 |
|
6508 |
|
6509 | function escapeHtml(string) {
|
6510 | var str = '' + string;
|
6511 | var match = matchHtmlRegExp.exec(str);
|
6512 |
|
6513 | if (!match) {
|
6514 | return str;
|
6515 | }
|
6516 |
|
6517 | var escape;
|
6518 | var html = '';
|
6519 | var index = 0;
|
6520 | var lastIndex = 0;
|
6521 |
|
6522 | for (index = match.index; index < str.length; index++) {
|
6523 | switch (str.charCodeAt(index)) {
|
6524 | case 34:
|
6525 |
|
6526 | escape = '"';
|
6527 | break;
|
6528 | case 38:
|
6529 |
|
6530 | escape = '&';
|
6531 | break;
|
6532 | case 39:
|
6533 |
|
6534 | escape = ''';
|
6535 | break;
|
6536 | case 60:
|
6537 |
|
6538 | escape = '<';
|
6539 | break;
|
6540 | case 62:
|
6541 |
|
6542 | escape = '>';
|
6543 | break;
|
6544 | default:
|
6545 | continue;
|
6546 | }
|
6547 |
|
6548 | if (lastIndex !== index) {
|
6549 | html += str.substring(lastIndex, index);
|
6550 | }
|
6551 |
|
6552 | lastIndex = index + 1;
|
6553 | html += escape;
|
6554 | }
|
6555 |
|
6556 | return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
|
6557 | }
|
6558 |
|
6559 |
|
6560 |
|
6561 | |
6562 |
|
6563 |
|
6564 |
|
6565 |
|
6566 |
|
6567 | function escapeTextContentForBrowser(text) {
|
6568 | if (typeof text === 'boolean' || typeof text === 'number') {
|
6569 |
|
6570 |
|
6571 |
|
6572 | return '' + text;
|
6573 | }
|
6574 | return escapeHtml(text);
|
6575 | }
|
6576 |
|
6577 | module.exports = escapeTextContentForBrowser;
|
6578 |
|
6579 | },
|
6580 |
|
6581 | function(module, exports, __webpack_require__) {
|
6582 |
|
6583 | |
6584 |
|
6585 |
|
6586 |
|
6587 |
|
6588 |
|
6589 |
|
6590 |
|
6591 |
|
6592 |
|
6593 | 'use strict';
|
6594 |
|
6595 | var ExecutionEnvironment = __webpack_require__(9);
|
6596 | var DOMNamespaces = __webpack_require__(41);
|
6597 |
|
6598 | var WHITESPACE_TEST = /^[ \r\n\t\f]/;
|
6599 | var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
|
6600 |
|
6601 | var createMicrosoftUnsafeLocalFunction = __webpack_require__(48);
|
6602 |
|
6603 |
|
6604 | var reusableSVGContainer;
|
6605 |
|
6606 | |
6607 |
|
6608 |
|
6609 |
|
6610 |
|
6611 |
|
6612 |
|
6613 |
|
6614 | var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
|
6615 |
|
6616 |
|
6617 |
|
6618 | if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
|
6619 | reusableSVGContainer = reusableSVGContainer || document.createElement('div');
|
6620 | reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
|
6621 | var svgNode = reusableSVGContainer.firstChild;
|
6622 | while (svgNode.firstChild) {
|
6623 | node.appendChild(svgNode.firstChild);
|
6624 | }
|
6625 | } else {
|
6626 | node.innerHTML = html;
|
6627 | }
|
6628 | });
|
6629 |
|
6630 | if (ExecutionEnvironment.canUseDOM) {
|
6631 |
|
6632 |
|
6633 |
|
6634 |
|
6635 |
|
6636 |
|
6637 | var testElement = document.createElement('div');
|
6638 | testElement.innerHTML = ' ';
|
6639 | if (testElement.innerHTML === '') {
|
6640 | setInnerHTML = function (node, html) {
|
6641 |
|
6642 |
|
6643 |
|
6644 |
|
6645 |
|
6646 | if (node.parentNode) {
|
6647 | node.parentNode.replaceChild(node, node);
|
6648 | }
|
6649 |
|
6650 |
|
6651 |
|
6652 |
|
6653 |
|
6654 | if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {
|
6655 |
|
6656 |
|
6657 |
|
6658 |
|
6659 |
|
6660 |
|
6661 | node.innerHTML = String.fromCharCode(0xFEFF) + html;
|
6662 |
|
6663 |
|
6664 |
|
6665 | var textNode = node.firstChild;
|
6666 | if (textNode.data.length === 1) {
|
6667 | node.removeChild(textNode);
|
6668 | } else {
|
6669 | textNode.deleteData(0, 1);
|
6670 | }
|
6671 | } else {
|
6672 | node.innerHTML = html;
|
6673 | }
|
6674 | };
|
6675 | }
|
6676 | testElement = null;
|
6677 | }
|
6678 |
|
6679 | module.exports = setInnerHTML;
|
6680 |
|
6681 | },
|
6682 |
|
6683 | function(module, exports, __webpack_require__) {
|
6684 |
|
6685 | 'use strict';
|
6686 |
|
6687 | Object.defineProperty(exports, "__esModule", {
|
6688 | value: true
|
6689 | });
|
6690 |
|
6691 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
6692 |
|
6693 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
6694 |
|
6695 | var _react = __webpack_require__(1);
|
6696 |
|
6697 | var _react2 = _interopRequireDefault(_react);
|
6698 |
|
6699 | var _classnames = __webpack_require__(2);
|
6700 |
|
6701 | var _classnames2 = _interopRequireDefault(_classnames);
|
6702 |
|
6703 | var _utils = __webpack_require__(3);
|
6704 |
|
6705 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6706 |
|
6707 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
6708 |
|
6709 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
6710 |
|
6711 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
6712 |
|
6713 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
6714 |
|
6715 | var propTypes = {
|
6716 | active: _react.PropTypes.bool,
|
6717 | block: _react.PropTypes.bool,
|
6718 | color: _react.PropTypes.string,
|
6719 | disabled: _react.PropTypes.bool,
|
6720 | outline: _react.PropTypes.bool,
|
6721 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
6722 | getRef: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
6723 | onClick: _react.PropTypes.func,
|
6724 | size: _react.PropTypes.string,
|
6725 | children: _react.PropTypes.node,
|
6726 | className: _react.PropTypes.string,
|
6727 | cssModule: _react.PropTypes.object
|
6728 | };
|
6729 |
|
6730 | var defaultProps = {
|
6731 | color: 'secondary',
|
6732 | tag: 'button'
|
6733 | };
|
6734 |
|
6735 | var Button = function (_React$Component) {
|
6736 | _inherits(Button, _React$Component);
|
6737 |
|
6738 | function Button(props) {
|
6739 | _classCallCheck(this, Button);
|
6740 |
|
6741 | var _this = _possibleConstructorReturn(this, (Button.__proto__ || Object.getPrototypeOf(Button)).call(this, props));
|
6742 |
|
6743 | _this.onClick = _this.onClick.bind(_this);
|
6744 | return _this;
|
6745 | }
|
6746 |
|
6747 | _createClass(Button, [{
|
6748 | key: 'onClick',
|
6749 | value: function onClick(e) {
|
6750 | if (this.props.disabled) {
|
6751 | e.preventDefault();
|
6752 | return;
|
6753 | }
|
6754 |
|
6755 | if (this.props.onClick) {
|
6756 | this.props.onClick(e);
|
6757 | }
|
6758 | }
|
6759 | }, {
|
6760 | key: 'render',
|
6761 | value: function render() {
|
6762 | var _props = this.props,
|
6763 | active = _props.active,
|
6764 | block = _props.block,
|
6765 | className = _props.className,
|
6766 | cssModule = _props.cssModule,
|
6767 | color = _props.color,
|
6768 | outline = _props.outline,
|
6769 | size = _props.size,
|
6770 | Tag = _props.tag,
|
6771 | getRef = _props.getRef,
|
6772 | attributes = _objectWithoutProperties(_props, ['active', 'block', 'className', 'cssModule', 'color', 'outline', 'size', 'tag', 'getRef']);
|
6773 |
|
6774 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'btn', 'btn' + (outline ? '-outline' : '') + '-' + color, size ? 'btn-' + size : false, block ? 'btn-block' : false, { active: active, disabled: this.props.disabled }), cssModule);
|
6775 |
|
6776 | if (attributes.href && Tag === 'button') {
|
6777 | Tag = 'a';
|
6778 | }
|
6779 |
|
6780 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes, ref: getRef, onClick: this.onClick }));
|
6781 | }
|
6782 | }]);
|
6783 |
|
6784 | return Button;
|
6785 | }(_react2.default.Component);
|
6786 |
|
6787 | Button.propTypes = propTypes;
|
6788 | Button.defaultProps = defaultProps;
|
6789 |
|
6790 | exports.default = Button;
|
6791 |
|
6792 | },
|
6793 |
|
6794 | function(module, exports) {
|
6795 |
|
6796 | |
6797 |
|
6798 |
|
6799 |
|
6800 |
|
6801 |
|
6802 |
|
6803 |
|
6804 |
|
6805 |
|
6806 |
|
6807 |
|
6808 |
|
6809 |
|
6810 | 'use strict';
|
6811 |
|
6812 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
6813 |
|
6814 | |
6815 |
|
6816 |
|
6817 |
|
6818 | function is(x, y) {
|
6819 |
|
6820 | if (x === y) {
|
6821 |
|
6822 |
|
6823 |
|
6824 | return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
6825 | } else {
|
6826 |
|
6827 | return x !== x && y !== y;
|
6828 | }
|
6829 | }
|
6830 |
|
6831 | |
6832 |
|
6833 |
|
6834 |
|
6835 |
|
6836 | function shallowEqual(objA, objB) {
|
6837 | if (is(objA, objB)) {
|
6838 | return true;
|
6839 | }
|
6840 |
|
6841 | if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
|
6842 | return false;
|
6843 | }
|
6844 |
|
6845 | var keysA = Object.keys(objA);
|
6846 | var keysB = Object.keys(objB);
|
6847 |
|
6848 | if (keysA.length !== keysB.length) {
|
6849 | return false;
|
6850 | }
|
6851 |
|
6852 |
|
6853 | for (var i = 0; i < keysA.length; i++) {
|
6854 | if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
|
6855 | return false;
|
6856 | }
|
6857 | }
|
6858 |
|
6859 | return true;
|
6860 | }
|
6861 |
|
6862 | module.exports = shallowEqual;
|
6863 |
|
6864 | },
|
6865 |
|
6866 | function(module, exports, __webpack_require__) {
|
6867 |
|
6868 | |
6869 |
|
6870 |
|
6871 |
|
6872 |
|
6873 |
|
6874 |
|
6875 |
|
6876 |
|
6877 |
|
6878 | 'use strict';
|
6879 |
|
6880 | var DOMLazyTree = __webpack_require__(25);
|
6881 | var Danger = __webpack_require__(190);
|
6882 | var ReactDOMComponentTree = __webpack_require__(8);
|
6883 | var ReactInstrumentation = __webpack_require__(12);
|
6884 |
|
6885 | var createMicrosoftUnsafeLocalFunction = __webpack_require__(48);
|
6886 | var setInnerHTML = __webpack_require__(37);
|
6887 | var setTextContent = __webpack_require__(96);
|
6888 |
|
6889 | function getNodeAfter(parentNode, node) {
|
6890 |
|
6891 |
|
6892 | if (Array.isArray(node)) {
|
6893 | node = node[1];
|
6894 | }
|
6895 | return node ? node.nextSibling : parentNode.firstChild;
|
6896 | }
|
6897 |
|
6898 | |
6899 |
|
6900 |
|
6901 |
|
6902 |
|
6903 |
|
6904 |
|
6905 |
|
6906 | var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
|
6907 |
|
6908 |
|
6909 |
|
6910 | parentNode.insertBefore(childNode, referenceNode);
|
6911 | });
|
6912 |
|
6913 | function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
|
6914 | DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
|
6915 | }
|
6916 |
|
6917 | function moveChild(parentNode, childNode, referenceNode) {
|
6918 | if (Array.isArray(childNode)) {
|
6919 | moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
|
6920 | } else {
|
6921 | insertChildAt(parentNode, childNode, referenceNode);
|
6922 | }
|
6923 | }
|
6924 |
|
6925 | function removeChild(parentNode, childNode) {
|
6926 | if (Array.isArray(childNode)) {
|
6927 | var closingComment = childNode[1];
|
6928 | childNode = childNode[0];
|
6929 | removeDelimitedText(parentNode, childNode, closingComment);
|
6930 | parentNode.removeChild(closingComment);
|
6931 | }
|
6932 | parentNode.removeChild(childNode);
|
6933 | }
|
6934 |
|
6935 | function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
|
6936 | var node = openingComment;
|
6937 | while (true) {
|
6938 | var nextNode = node.nextSibling;
|
6939 | insertChildAt(parentNode, node, referenceNode);
|
6940 | if (node === closingComment) {
|
6941 | break;
|
6942 | }
|
6943 | node = nextNode;
|
6944 | }
|
6945 | }
|
6946 |
|
6947 | function removeDelimitedText(parentNode, startNode, closingComment) {
|
6948 | while (true) {
|
6949 | var node = startNode.nextSibling;
|
6950 | if (node === closingComment) {
|
6951 |
|
6952 | break;
|
6953 | } else {
|
6954 | parentNode.removeChild(node);
|
6955 | }
|
6956 | }
|
6957 | }
|
6958 |
|
6959 | function replaceDelimitedText(openingComment, closingComment, stringText) {
|
6960 | var parentNode = openingComment.parentNode;
|
6961 | var nodeAfterComment = openingComment.nextSibling;
|
6962 | if (nodeAfterComment === closingComment) {
|
6963 |
|
6964 |
|
6965 | if (stringText) {
|
6966 | insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
|
6967 | }
|
6968 | } else {
|
6969 | if (stringText) {
|
6970 |
|
6971 |
|
6972 | setTextContent(nodeAfterComment, stringText);
|
6973 | removeDelimitedText(parentNode, nodeAfterComment, closingComment);
|
6974 | } else {
|
6975 | removeDelimitedText(parentNode, openingComment, closingComment);
|
6976 | }
|
6977 | }
|
6978 |
|
6979 | if (true) {
|
6980 | ReactInstrumentation.debugTool.onHostOperation({
|
6981 | instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,
|
6982 | type: 'replace text',
|
6983 | payload: stringText
|
6984 | });
|
6985 | }
|
6986 | }
|
6987 |
|
6988 | var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;
|
6989 | if (true) {
|
6990 | dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
|
6991 | Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
|
6992 | if (prevInstance._debugID !== 0) {
|
6993 | ReactInstrumentation.debugTool.onHostOperation({
|
6994 | instanceID: prevInstance._debugID,
|
6995 | type: 'replace with',
|
6996 | payload: markup.toString()
|
6997 | });
|
6998 | } else {
|
6999 | var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
|
7000 | if (nextInstance._debugID !== 0) {
|
7001 | ReactInstrumentation.debugTool.onHostOperation({
|
7002 | instanceID: nextInstance._debugID,
|
7003 | type: 'mount',
|
7004 | payload: markup.toString()
|
7005 | });
|
7006 | }
|
7007 | }
|
7008 | };
|
7009 | }
|
7010 |
|
7011 | |
7012 |
|
7013 |
|
7014 | var DOMChildrenOperations = {
|
7015 |
|
7016 | dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
|
7017 |
|
7018 | replaceDelimitedText: replaceDelimitedText,
|
7019 |
|
7020 | |
7021 |
|
7022 |
|
7023 |
|
7024 |
|
7025 |
|
7026 |
|
7027 | processUpdates: function (parentNode, updates) {
|
7028 | if (true) {
|
7029 | var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;
|
7030 | }
|
7031 |
|
7032 | for (var k = 0; k < updates.length; k++) {
|
7033 | var update = updates[k];
|
7034 | switch (update.type) {
|
7035 | case 'INSERT_MARKUP':
|
7036 | insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
|
7037 | if (true) {
|
7038 | ReactInstrumentation.debugTool.onHostOperation({
|
7039 | instanceID: parentNodeDebugID,
|
7040 | type: 'insert child',
|
7041 | payload: { toIndex: update.toIndex, content: update.content.toString() }
|
7042 | });
|
7043 | }
|
7044 | break;
|
7045 | case 'MOVE_EXISTING':
|
7046 | moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
|
7047 | if (true) {
|
7048 | ReactInstrumentation.debugTool.onHostOperation({
|
7049 | instanceID: parentNodeDebugID,
|
7050 | type: 'move child',
|
7051 | payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }
|
7052 | });
|
7053 | }
|
7054 | break;
|
7055 | case 'SET_MARKUP':
|
7056 | setInnerHTML(parentNode, update.content);
|
7057 | if (true) {
|
7058 | ReactInstrumentation.debugTool.onHostOperation({
|
7059 | instanceID: parentNodeDebugID,
|
7060 | type: 'replace children',
|
7061 | payload: update.content.toString()
|
7062 | });
|
7063 | }
|
7064 | break;
|
7065 | case 'TEXT_CONTENT':
|
7066 | setTextContent(parentNode, update.content);
|
7067 | if (true) {
|
7068 | ReactInstrumentation.debugTool.onHostOperation({
|
7069 | instanceID: parentNodeDebugID,
|
7070 | type: 'replace text',
|
7071 | payload: update.content.toString()
|
7072 | });
|
7073 | }
|
7074 | break;
|
7075 | case 'REMOVE_NODE':
|
7076 | removeChild(parentNode, update.fromNode);
|
7077 | if (true) {
|
7078 | ReactInstrumentation.debugTool.onHostOperation({
|
7079 | instanceID: parentNodeDebugID,
|
7080 | type: 'remove child',
|
7081 | payload: { fromIndex: update.fromIndex }
|
7082 | });
|
7083 | }
|
7084 | break;
|
7085 | }
|
7086 | }
|
7087 | }
|
7088 |
|
7089 | };
|
7090 |
|
7091 | module.exports = DOMChildrenOperations;
|
7092 |
|
7093 | },
|
7094 |
|
7095 | function(module, exports) {
|
7096 |
|
7097 | |
7098 |
|
7099 |
|
7100 |
|
7101 |
|
7102 |
|
7103 |
|
7104 |
|
7105 |
|
7106 |
|
7107 | 'use strict';
|
7108 |
|
7109 | var DOMNamespaces = {
|
7110 | html: 'http://www.w3.org/1999/xhtml',
|
7111 | mathml: 'http://www.w3.org/1998/Math/MathML',
|
7112 | svg: 'http://www.w3.org/2000/svg'
|
7113 | };
|
7114 |
|
7115 | module.exports = DOMNamespaces;
|
7116 |
|
7117 | },
|
7118 |
|
7119 | function(module, exports, __webpack_require__) {
|
7120 |
|
7121 | |
7122 |
|
7123 |
|
7124 |
|
7125 |
|
7126 |
|
7127 |
|
7128 |
|
7129 |
|
7130 |
|
7131 | 'use strict';
|
7132 |
|
7133 | var _prodInvariant = __webpack_require__(6);
|
7134 |
|
7135 | var ReactErrorUtils = __webpack_require__(46);
|
7136 |
|
7137 | var invariant = __webpack_require__(4);
|
7138 | var warning = __webpack_require__(5);
|
7139 |
|
7140 | |
7141 |
|
7142 |
|
7143 |
|
7144 | |
7145 |
|
7146 |
|
7147 |
|
7148 | var ComponentTree;
|
7149 | var TreeTraversal;
|
7150 | var injection = {
|
7151 | injectComponentTree: function (Injected) {
|
7152 | ComponentTree = Injected;
|
7153 | if (true) {
|
7154 | true ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
|
7155 | }
|
7156 | },
|
7157 | injectTreeTraversal: function (Injected) {
|
7158 | TreeTraversal = Injected;
|
7159 | if (true) {
|
7160 | true ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;
|
7161 | }
|
7162 | }
|
7163 | };
|
7164 |
|
7165 | function isEndish(topLevelType) {
|
7166 | return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';
|
7167 | }
|
7168 |
|
7169 | function isMoveish(topLevelType) {
|
7170 | return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';
|
7171 | }
|
7172 | function isStartish(topLevelType) {
|
7173 | return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
|
7174 | }
|
7175 |
|
7176 | var validateEventDispatches;
|
7177 | if (true) {
|
7178 | validateEventDispatches = function (event) {
|
7179 | var dispatchListeners = event._dispatchListeners;
|
7180 | var dispatchInstances = event._dispatchInstances;
|
7181 |
|
7182 | var listenersIsArr = Array.isArray(dispatchListeners);
|
7183 | var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
|
7184 |
|
7185 | var instancesIsArr = Array.isArray(dispatchInstances);
|
7186 | var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
|
7187 |
|
7188 | true ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;
|
7189 | };
|
7190 | }
|
7191 |
|
7192 | |
7193 |
|
7194 |
|
7195 |
|
7196 |
|
7197 |
|
7198 |
|
7199 | function executeDispatch(event, simulated, listener, inst) {
|
7200 | var type = event.type || 'unknown-event';
|
7201 | event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
|
7202 | if (simulated) {
|
7203 | ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
|
7204 | } else {
|
7205 | ReactErrorUtils.invokeGuardedCallback(type, listener, event);
|
7206 | }
|
7207 | event.currentTarget = null;
|
7208 | }
|
7209 |
|
7210 | |
7211 |
|
7212 |
|
7213 | function executeDispatchesInOrder(event, simulated) {
|
7214 | var dispatchListeners = event._dispatchListeners;
|
7215 | var dispatchInstances = event._dispatchInstances;
|
7216 | if (true) {
|
7217 | validateEventDispatches(event);
|
7218 | }
|
7219 | if (Array.isArray(dispatchListeners)) {
|
7220 | for (var i = 0; i < dispatchListeners.length; i++) {
|
7221 | if (event.isPropagationStopped()) {
|
7222 | break;
|
7223 | }
|
7224 |
|
7225 | executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
|
7226 | }
|
7227 | } else if (dispatchListeners) {
|
7228 | executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
|
7229 | }
|
7230 | event._dispatchListeners = null;
|
7231 | event._dispatchInstances = null;
|
7232 | }
|
7233 |
|
7234 | |
7235 |
|
7236 |
|
7237 |
|
7238 |
|
7239 |
|
7240 |
|
7241 | function executeDispatchesInOrderStopAtTrueImpl(event) {
|
7242 | var dispatchListeners = event._dispatchListeners;
|
7243 | var dispatchInstances = event._dispatchInstances;
|
7244 | if (true) {
|
7245 | validateEventDispatches(event);
|
7246 | }
|
7247 | if (Array.isArray(dispatchListeners)) {
|
7248 | for (var i = 0; i < dispatchListeners.length; i++) {
|
7249 | if (event.isPropagationStopped()) {
|
7250 | break;
|
7251 | }
|
7252 |
|
7253 | if (dispatchListeners[i](event, dispatchInstances[i])) {
|
7254 | return dispatchInstances[i];
|
7255 | }
|
7256 | }
|
7257 | } else if (dispatchListeners) {
|
7258 | if (dispatchListeners(event, dispatchInstances)) {
|
7259 | return dispatchInstances;
|
7260 | }
|
7261 | }
|
7262 | return null;
|
7263 | }
|
7264 |
|
7265 | |
7266 |
|
7267 |
|
7268 | function executeDispatchesInOrderStopAtTrue(event) {
|
7269 | var ret = executeDispatchesInOrderStopAtTrueImpl(event);
|
7270 | event._dispatchInstances = null;
|
7271 | event._dispatchListeners = null;
|
7272 | return ret;
|
7273 | }
|
7274 |
|
7275 | |
7276 |
|
7277 |
|
7278 |
|
7279 |
|
7280 |
|
7281 |
|
7282 |
|
7283 |
|
7284 | function executeDirectDispatch(event) {
|
7285 | if (true) {
|
7286 | validateEventDispatches(event);
|
7287 | }
|
7288 | var dispatchListener = event._dispatchListeners;
|
7289 | var dispatchInstance = event._dispatchInstances;
|
7290 | !!Array.isArray(dispatchListener) ? true ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;
|
7291 | event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
|
7292 | var res = dispatchListener ? dispatchListener(event) : null;
|
7293 | event.currentTarget = null;
|
7294 | event._dispatchListeners = null;
|
7295 | event._dispatchInstances = null;
|
7296 | return res;
|
7297 | }
|
7298 |
|
7299 | |
7300 |
|
7301 |
|
7302 |
|
7303 | function hasDispatches(event) {
|
7304 | return !!event._dispatchListeners;
|
7305 | }
|
7306 |
|
7307 | |
7308 |
|
7309 |
|
7310 | var EventPluginUtils = {
|
7311 | isEndish: isEndish,
|
7312 | isMoveish: isMoveish,
|
7313 | isStartish: isStartish,
|
7314 |
|
7315 | executeDirectDispatch: executeDirectDispatch,
|
7316 | executeDispatchesInOrder: executeDispatchesInOrder,
|
7317 | executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
|
7318 | hasDispatches: hasDispatches,
|
7319 |
|
7320 | getInstanceFromNode: function (node) {
|
7321 | return ComponentTree.getInstanceFromNode(node);
|
7322 | },
|
7323 | getNodeFromInstance: function (node) {
|
7324 | return ComponentTree.getNodeFromInstance(node);
|
7325 | },
|
7326 | isAncestor: function (a, b) {
|
7327 | return TreeTraversal.isAncestor(a, b);
|
7328 | },
|
7329 | getLowestCommonAncestor: function (a, b) {
|
7330 | return TreeTraversal.getLowestCommonAncestor(a, b);
|
7331 | },
|
7332 | getParentInstance: function (inst) {
|
7333 | return TreeTraversal.getParentInstance(inst);
|
7334 | },
|
7335 | traverseTwoPhase: function (target, fn, arg) {
|
7336 | return TreeTraversal.traverseTwoPhase(target, fn, arg);
|
7337 | },
|
7338 | traverseEnterLeave: function (from, to, fn, argFrom, argTo) {
|
7339 | return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
|
7340 | },
|
7341 |
|
7342 | injection: injection
|
7343 | };
|
7344 |
|
7345 | module.exports = EventPluginUtils;
|
7346 |
|
7347 | },
|
7348 |
|
7349 | function(module, exports) {
|
7350 |
|
7351 | |
7352 |
|
7353 |
|
7354 |
|
7355 |
|
7356 |
|
7357 |
|
7358 |
|
7359 |
|
7360 |
|
7361 |
|
7362 | 'use strict';
|
7363 |
|
7364 | |
7365 |
|
7366 |
|
7367 |
|
7368 |
|
7369 |
|
7370 |
|
7371 | function escape(key) {
|
7372 | var escapeRegex = /[=:]/g;
|
7373 | var escaperLookup = {
|
7374 | '=': '=0',
|
7375 | ':': '=2'
|
7376 | };
|
7377 | var escapedString = ('' + key).replace(escapeRegex, function (match) {
|
7378 | return escaperLookup[match];
|
7379 | });
|
7380 |
|
7381 | return '$' + escapedString;
|
7382 | }
|
7383 |
|
7384 | |
7385 |
|
7386 |
|
7387 |
|
7388 |
|
7389 |
|
7390 | function unescape(key) {
|
7391 | var unescapeRegex = /(=0|=2)/g;
|
7392 | var unescaperLookup = {
|
7393 | '=0': '=',
|
7394 | '=2': ':'
|
7395 | };
|
7396 | var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
|
7397 |
|
7398 | return ('' + keySubstring).replace(unescapeRegex, function (match) {
|
7399 | return unescaperLookup[match];
|
7400 | });
|
7401 | }
|
7402 |
|
7403 | var KeyEscapeUtils = {
|
7404 | escape: escape,
|
7405 | unescape: unescape
|
7406 | };
|
7407 |
|
7408 | module.exports = KeyEscapeUtils;
|
7409 |
|
7410 | },
|
7411 |
|
7412 | function(module, exports, __webpack_require__) {
|
7413 |
|
7414 | |
7415 |
|
7416 |
|
7417 |
|
7418 |
|
7419 |
|
7420 |
|
7421 |
|
7422 |
|
7423 |
|
7424 | 'use strict';
|
7425 |
|
7426 | var _prodInvariant = __webpack_require__(6);
|
7427 |
|
7428 | var React = __webpack_require__(15);
|
7429 | var ReactPropTypesSecret = __webpack_require__(85);
|
7430 |
|
7431 | var invariant = __webpack_require__(4);
|
7432 | var warning = __webpack_require__(5);
|
7433 |
|
7434 | var hasReadOnlyValue = {
|
7435 | 'button': true,
|
7436 | 'checkbox': true,
|
7437 | 'image': true,
|
7438 | 'hidden': true,
|
7439 | 'radio': true,
|
7440 | 'reset': true,
|
7441 | 'submit': true
|
7442 | };
|
7443 |
|
7444 | function _assertSingleLink(inputProps) {
|
7445 | !(inputProps.checkedLink == null || inputProps.valueLink == null) ? true ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0;
|
7446 | }
|
7447 | function _assertValueLink(inputProps) {
|
7448 | _assertSingleLink(inputProps);
|
7449 | !(inputProps.value == null && inputProps.onChange == null) ? true ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\'t want to use valueLink.') : _prodInvariant('88') : void 0;
|
7450 | }
|
7451 |
|
7452 | function _assertCheckedLink(inputProps) {
|
7453 | _assertSingleLink(inputProps);
|
7454 | !(inputProps.checked == null && inputProps.onChange == null) ? true ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\'t want to use checkedLink') : _prodInvariant('89') : void 0;
|
7455 | }
|
7456 |
|
7457 | var propTypes = {
|
7458 | value: function (props, propName, componentName) {
|
7459 | if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
|
7460 | return null;
|
7461 | }
|
7462 | return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
|
7463 | },
|
7464 | checked: function (props, propName, componentName) {
|
7465 | if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
|
7466 | return null;
|
7467 | }
|
7468 | return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
|
7469 | },
|
7470 | onChange: React.PropTypes.func
|
7471 | };
|
7472 |
|
7473 | var loggedTypeFailures = {};
|
7474 | function getDeclarationErrorAddendum(owner) {
|
7475 | if (owner) {
|
7476 | var name = owner.getName();
|
7477 | if (name) {
|
7478 | return ' Check the render method of `' + name + '`.';
|
7479 | }
|
7480 | }
|
7481 | return '';
|
7482 | }
|
7483 |
|
7484 | |
7485 |
|
7486 |
|
7487 |
|
7488 | var LinkedValueUtils = {
|
7489 | checkPropTypes: function (tagName, props, owner) {
|
7490 | for (var propName in propTypes) {
|
7491 | if (propTypes.hasOwnProperty(propName)) {
|
7492 | var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret);
|
7493 | }
|
7494 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
7495 |
|
7496 |
|
7497 | loggedTypeFailures[error.message] = true;
|
7498 |
|
7499 | var addendum = getDeclarationErrorAddendum(owner);
|
7500 | true ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;
|
7501 | }
|
7502 | }
|
7503 | },
|
7504 |
|
7505 | |
7506 |
|
7507 |
|
7508 |
|
7509 | getValue: function (inputProps) {
|
7510 | if (inputProps.valueLink) {
|
7511 | _assertValueLink(inputProps);
|
7512 | return inputProps.valueLink.value;
|
7513 | }
|
7514 | return inputProps.value;
|
7515 | },
|
7516 |
|
7517 | |
7518 |
|
7519 |
|
7520 |
|
7521 |
|
7522 | getChecked: function (inputProps) {
|
7523 | if (inputProps.checkedLink) {
|
7524 | _assertCheckedLink(inputProps);
|
7525 | return inputProps.checkedLink.value;
|
7526 | }
|
7527 | return inputProps.checked;
|
7528 | },
|
7529 |
|
7530 | |
7531 |
|
7532 |
|
7533 |
|
7534 | executeOnChange: function (inputProps, event) {
|
7535 | if (inputProps.valueLink) {
|
7536 | _assertValueLink(inputProps);
|
7537 | return inputProps.valueLink.requestChange(event.target.value);
|
7538 | } else if (inputProps.checkedLink) {
|
7539 | _assertCheckedLink(inputProps);
|
7540 | return inputProps.checkedLink.requestChange(event.target.checked);
|
7541 | } else if (inputProps.onChange) {
|
7542 | return inputProps.onChange.call(undefined, event);
|
7543 | }
|
7544 | }
|
7545 | };
|
7546 |
|
7547 | module.exports = LinkedValueUtils;
|
7548 |
|
7549 | },
|
7550 |
|
7551 | function(module, exports, __webpack_require__) {
|
7552 |
|
7553 | |
7554 |
|
7555 |
|
7556 |
|
7557 |
|
7558 |
|
7559 |
|
7560 |
|
7561 |
|
7562 |
|
7563 |
|
7564 | 'use strict';
|
7565 |
|
7566 | var _prodInvariant = __webpack_require__(6);
|
7567 |
|
7568 | var invariant = __webpack_require__(4);
|
7569 |
|
7570 | var injected = false;
|
7571 |
|
7572 | var ReactComponentEnvironment = {
|
7573 |
|
7574 | |
7575 |
|
7576 |
|
7577 |
|
7578 | replaceNodeWithMarkup: null,
|
7579 |
|
7580 | |
7581 |
|
7582 |
|
7583 |
|
7584 | processChildrenUpdates: null,
|
7585 |
|
7586 | injection: {
|
7587 | injectEnvironment: function (environment) {
|
7588 | !!injected ? true ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;
|
7589 | ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;
|
7590 | ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
|
7591 | injected = true;
|
7592 | }
|
7593 | }
|
7594 |
|
7595 | };
|
7596 |
|
7597 | module.exports = ReactComponentEnvironment;
|
7598 |
|
7599 | },
|
7600 |
|
7601 | function(module, exports, __webpack_require__) {
|
7602 |
|
7603 | |
7604 |
|
7605 |
|
7606 |
|
7607 |
|
7608 |
|
7609 |
|
7610 |
|
7611 |
|
7612 |
|
7613 |
|
7614 | 'use strict';
|
7615 |
|
7616 | var caughtError = null;
|
7617 |
|
7618 | |
7619 |
|
7620 |
|
7621 |
|
7622 |
|
7623 |
|
7624 |
|
7625 |
|
7626 | function invokeGuardedCallback(name, func, a) {
|
7627 | try {
|
7628 | func(a);
|
7629 | } catch (x) {
|
7630 | if (caughtError === null) {
|
7631 | caughtError = x;
|
7632 | }
|
7633 | }
|
7634 | }
|
7635 |
|
7636 | var ReactErrorUtils = {
|
7637 | invokeGuardedCallback: invokeGuardedCallback,
|
7638 |
|
7639 | |
7640 |
|
7641 |
|
7642 |
|
7643 | invokeGuardedCallbackWithCatch: invokeGuardedCallback,
|
7644 |
|
7645 | |
7646 |
|
7647 |
|
7648 |
|
7649 | rethrowCaughtError: function () {
|
7650 | if (caughtError) {
|
7651 | var error = caughtError;
|
7652 | caughtError = null;
|
7653 | throw error;
|
7654 | }
|
7655 | }
|
7656 | };
|
7657 |
|
7658 | if (true) {
|
7659 | |
7660 |
|
7661 |
|
7662 |
|
7663 | if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
|
7664 | var fakeNode = document.createElement('react');
|
7665 | ReactErrorUtils.invokeGuardedCallback = function (name, func, a) {
|
7666 | var boundFunc = func.bind(null, a);
|
7667 | var evtType = 'react-' + name;
|
7668 | fakeNode.addEventListener(evtType, boundFunc, false);
|
7669 | var evt = document.createEvent('Event');
|
7670 |
|
7671 | evt.initEvent(evtType, false, false);
|
7672 | fakeNode.dispatchEvent(evt);
|
7673 | fakeNode.removeEventListener(evtType, boundFunc, false);
|
7674 | };
|
7675 | }
|
7676 | }
|
7677 |
|
7678 | module.exports = ReactErrorUtils;
|
7679 |
|
7680 | },
|
7681 |
|
7682 | function(module, exports, __webpack_require__) {
|
7683 |
|
7684 | |
7685 |
|
7686 |
|
7687 |
|
7688 |
|
7689 |
|
7690 |
|
7691 |
|
7692 |
|
7693 |
|
7694 | 'use strict';
|
7695 |
|
7696 | var _prodInvariant = __webpack_require__(6);
|
7697 |
|
7698 | var ReactCurrentOwner = __webpack_require__(16);
|
7699 | var ReactInstanceMap = __webpack_require__(20);
|
7700 | var ReactInstrumentation = __webpack_require__(12);
|
7701 | var ReactUpdates = __webpack_require__(13);
|
7702 |
|
7703 | var invariant = __webpack_require__(4);
|
7704 | var warning = __webpack_require__(5);
|
7705 |
|
7706 | function enqueueUpdate(internalInstance) {
|
7707 | ReactUpdates.enqueueUpdate(internalInstance);
|
7708 | }
|
7709 |
|
7710 | function formatUnexpectedArgument(arg) {
|
7711 | var type = typeof arg;
|
7712 | if (type !== 'object') {
|
7713 | return type;
|
7714 | }
|
7715 | var displayName = arg.constructor && arg.constructor.name || type;
|
7716 | var keys = Object.keys(arg);
|
7717 | if (keys.length > 0 && keys.length < 20) {
|
7718 | return displayName + ' (keys: ' + keys.join(', ') + ')';
|
7719 | }
|
7720 | return displayName;
|
7721 | }
|
7722 |
|
7723 | function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
|
7724 | var internalInstance = ReactInstanceMap.get(publicInstance);
|
7725 | if (!internalInstance) {
|
7726 | if (true) {
|
7727 | var ctor = publicInstance.constructor;
|
7728 |
|
7729 |
|
7730 |
|
7731 | true ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, ctor && (ctor.displayName || ctor.name) || 'ReactClass') : void 0;
|
7732 | }
|
7733 | return null;
|
7734 | }
|
7735 |
|
7736 | if (true) {
|
7737 | true ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + 'within `render` or another component\'s constructor). Render methods ' + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0;
|
7738 | }
|
7739 |
|
7740 | return internalInstance;
|
7741 | }
|
7742 |
|
7743 | |
7744 |
|
7745 |
|
7746 |
|
7747 | var ReactUpdateQueue = {
|
7748 |
|
7749 | |
7750 |
|
7751 |
|
7752 |
|
7753 |
|
7754 |
|
7755 |
|
7756 | isMounted: function (publicInstance) {
|
7757 | if (true) {
|
7758 | var owner = ReactCurrentOwner.current;
|
7759 | if (owner !== null) {
|
7760 | true ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;
|
7761 | owner._warnedAboutRefsInRender = true;
|
7762 | }
|
7763 | }
|
7764 | var internalInstance = ReactInstanceMap.get(publicInstance);
|
7765 | if (internalInstance) {
|
7766 |
|
7767 |
|
7768 |
|
7769 | return !!internalInstance._renderedComponent;
|
7770 | } else {
|
7771 | return false;
|
7772 | }
|
7773 | },
|
7774 |
|
7775 | |
7776 |
|
7777 |
|
7778 |
|
7779 |
|
7780 |
|
7781 |
|
7782 |
|
7783 |
|
7784 | enqueueCallback: function (publicInstance, callback, callerName) {
|
7785 | ReactUpdateQueue.validateCallback(callback, callerName);
|
7786 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
|
7787 |
|
7788 |
|
7789 |
|
7790 |
|
7791 |
|
7792 |
|
7793 | if (!internalInstance) {
|
7794 | return null;
|
7795 | }
|
7796 |
|
7797 | if (internalInstance._pendingCallbacks) {
|
7798 | internalInstance._pendingCallbacks.push(callback);
|
7799 | } else {
|
7800 | internalInstance._pendingCallbacks = [callback];
|
7801 | }
|
7802 |
|
7803 |
|
7804 |
|
7805 |
|
7806 | enqueueUpdate(internalInstance);
|
7807 | },
|
7808 |
|
7809 | enqueueCallbackInternal: function (internalInstance, callback) {
|
7810 | if (internalInstance._pendingCallbacks) {
|
7811 | internalInstance._pendingCallbacks.push(callback);
|
7812 | } else {
|
7813 | internalInstance._pendingCallbacks = [callback];
|
7814 | }
|
7815 | enqueueUpdate(internalInstance);
|
7816 | },
|
7817 |
|
7818 | |
7819 |
|
7820 |
|
7821 |
|
7822 |
|
7823 |
|
7824 |
|
7825 |
|
7826 |
|
7827 |
|
7828 |
|
7829 |
|
7830 |
|
7831 | enqueueForceUpdate: function (publicInstance) {
|
7832 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate');
|
7833 |
|
7834 | if (!internalInstance) {
|
7835 | return;
|
7836 | }
|
7837 |
|
7838 | internalInstance._pendingForceUpdate = true;
|
7839 |
|
7840 | enqueueUpdate(internalInstance);
|
7841 | },
|
7842 |
|
7843 | |
7844 |
|
7845 |
|
7846 |
|
7847 |
|
7848 |
|
7849 |
|
7850 |
|
7851 |
|
7852 |
|
7853 |
|
7854 | enqueueReplaceState: function (publicInstance, completeState) {
|
7855 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');
|
7856 |
|
7857 | if (!internalInstance) {
|
7858 | return;
|
7859 | }
|
7860 |
|
7861 | internalInstance._pendingStateQueue = [completeState];
|
7862 | internalInstance._pendingReplaceState = true;
|
7863 |
|
7864 | enqueueUpdate(internalInstance);
|
7865 | },
|
7866 |
|
7867 | |
7868 |
|
7869 |
|
7870 |
|
7871 |
|
7872 |
|
7873 |
|
7874 |
|
7875 |
|
7876 |
|
7877 | enqueueSetState: function (publicInstance, partialState) {
|
7878 | if (true) {
|
7879 | ReactInstrumentation.debugTool.onSetState();
|
7880 | true ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0;
|
7881 | }
|
7882 |
|
7883 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState');
|
7884 |
|
7885 | if (!internalInstance) {
|
7886 | return;
|
7887 | }
|
7888 |
|
7889 | var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);
|
7890 | queue.push(partialState);
|
7891 |
|
7892 | enqueueUpdate(internalInstance);
|
7893 | },
|
7894 |
|
7895 | enqueueElementInternal: function (internalInstance, nextElement, nextContext) {
|
7896 | internalInstance._pendingElement = nextElement;
|
7897 |
|
7898 | internalInstance._context = nextContext;
|
7899 | enqueueUpdate(internalInstance);
|
7900 | },
|
7901 |
|
7902 | validateCallback: function (callback, callerName) {
|
7903 | !(!callback || typeof callback === 'function') ? true ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0;
|
7904 | }
|
7905 |
|
7906 | };
|
7907 |
|
7908 | module.exports = ReactUpdateQueue;
|
7909 |
|
7910 | },
|
7911 |
|
7912 | function(module, exports) {
|
7913 |
|
7914 | |
7915 |
|
7916 |
|
7917 |
|
7918 |
|
7919 |
|
7920 |
|
7921 |
|
7922 |
|
7923 |
|
7924 |
|
7925 |
|
7926 | 'use strict';
|
7927 |
|
7928 | |
7929 |
|
7930 |
|
7931 |
|
7932 | var createMicrosoftUnsafeLocalFunction = function (func) {
|
7933 | if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
|
7934 | return function (arg0, arg1, arg2, arg3) {
|
7935 | MSApp.execUnsafeLocalFunction(function () {
|
7936 | return func(arg0, arg1, arg2, arg3);
|
7937 | });
|
7938 | };
|
7939 | } else {
|
7940 | return func;
|
7941 | }
|
7942 | };
|
7943 |
|
7944 | module.exports = createMicrosoftUnsafeLocalFunction;
|
7945 |
|
7946 | },
|
7947 |
|
7948 | function(module, exports) {
|
7949 |
|
7950 | |
7951 |
|
7952 |
|
7953 |
|
7954 |
|
7955 |
|
7956 |
|
7957 |
|
7958 |
|
7959 |
|
7960 | 'use strict';
|
7961 |
|
7962 | |
7963 |
|
7964 |
|
7965 |
|
7966 |
|
7967 |
|
7968 |
|
7969 |
|
7970 |
|
7971 |
|
7972 |
|
7973 | function getEventCharCode(nativeEvent) {
|
7974 | var charCode;
|
7975 | var keyCode = nativeEvent.keyCode;
|
7976 |
|
7977 | if ('charCode' in nativeEvent) {
|
7978 | charCode = nativeEvent.charCode;
|
7979 |
|
7980 |
|
7981 | if (charCode === 0 && keyCode === 13) {
|
7982 | charCode = 13;
|
7983 | }
|
7984 | } else {
|
7985 |
|
7986 | charCode = keyCode;
|
7987 | }
|
7988 |
|
7989 |
|
7990 |
|
7991 | if (charCode >= 32 || charCode === 13) {
|
7992 | return charCode;
|
7993 | }
|
7994 |
|
7995 | return 0;
|
7996 | }
|
7997 |
|
7998 | module.exports = getEventCharCode;
|
7999 |
|
8000 | },
|
8001 |
|
8002 | function(module, exports) {
|
8003 |
|
8004 | |
8005 |
|
8006 |
|
8007 |
|
8008 |
|
8009 |
|
8010 |
|
8011 |
|
8012 |
|
8013 |
|
8014 | 'use strict';
|
8015 |
|
8016 | |
8017 |
|
8018 |
|
8019 |
|
8020 |
|
8021 | var modifierKeyToProp = {
|
8022 | 'Alt': 'altKey',
|
8023 | 'Control': 'ctrlKey',
|
8024 | 'Meta': 'metaKey',
|
8025 | 'Shift': 'shiftKey'
|
8026 | };
|
8027 |
|
8028 |
|
8029 |
|
8030 |
|
8031 | function modifierStateGetter(keyArg) {
|
8032 | var syntheticEvent = this;
|
8033 | var nativeEvent = syntheticEvent.nativeEvent;
|
8034 | if (nativeEvent.getModifierState) {
|
8035 | return nativeEvent.getModifierState(keyArg);
|
8036 | }
|
8037 | var keyProp = modifierKeyToProp[keyArg];
|
8038 | return keyProp ? !!nativeEvent[keyProp] : false;
|
8039 | }
|
8040 |
|
8041 | function getEventModifierState(nativeEvent) {
|
8042 | return modifierStateGetter;
|
8043 | }
|
8044 |
|
8045 | module.exports = getEventModifierState;
|
8046 |
|
8047 | },
|
8048 |
|
8049 | function(module, exports) {
|
8050 |
|
8051 | |
8052 |
|
8053 |
|
8054 |
|
8055 |
|
8056 |
|
8057 |
|
8058 |
|
8059 |
|
8060 |
|
8061 | 'use strict';
|
8062 |
|
8063 | |
8064 |
|
8065 |
|
8066 |
|
8067 |
|
8068 |
|
8069 |
|
8070 |
|
8071 | function getEventTarget(nativeEvent) {
|
8072 | var target = nativeEvent.target || nativeEvent.srcElement || window;
|
8073 |
|
8074 |
|
8075 | if (target.correspondingUseElement) {
|
8076 | target = target.correspondingUseElement;
|
8077 | }
|
8078 |
|
8079 |
|
8080 |
|
8081 | return target.nodeType === 3 ? target.parentNode : target;
|
8082 | }
|
8083 |
|
8084 | module.exports = getEventTarget;
|
8085 |
|
8086 | },
|
8087 |
|
8088 | function(module, exports, __webpack_require__) {
|
8089 |
|
8090 | |
8091 |
|
8092 |
|
8093 |
|
8094 |
|
8095 |
|
8096 |
|
8097 |
|
8098 |
|
8099 |
|
8100 | 'use strict';
|
8101 |
|
8102 | var ExecutionEnvironment = __webpack_require__(9);
|
8103 |
|
8104 | var useHasFeature;
|
8105 | if (ExecutionEnvironment.canUseDOM) {
|
8106 | useHasFeature = document.implementation && document.implementation.hasFeature &&
|
8107 |
|
8108 |
|
8109 | document.implementation.hasFeature('', '') !== true;
|
8110 | }
|
8111 |
|
8112 | |
8113 |
|
8114 |
|
8115 |
|
8116 |
|
8117 |
|
8118 |
|
8119 |
|
8120 |
|
8121 |
|
8122 |
|
8123 |
|
8124 |
|
8125 |
|
8126 | function isEventSupported(eventNameSuffix, capture) {
|
8127 | if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {
|
8128 | return false;
|
8129 | }
|
8130 |
|
8131 | var eventName = 'on' + eventNameSuffix;
|
8132 | var isSupported = eventName in document;
|
8133 |
|
8134 | if (!isSupported) {
|
8135 | var element = document.createElement('div');
|
8136 | element.setAttribute(eventName, 'return;');
|
8137 | isSupported = typeof element[eventName] === 'function';
|
8138 | }
|
8139 |
|
8140 | if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
|
8141 |
|
8142 | isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
|
8143 | }
|
8144 |
|
8145 | return isSupported;
|
8146 | }
|
8147 |
|
8148 | module.exports = isEventSupported;
|
8149 |
|
8150 | },
|
8151 |
|
8152 | function(module, exports) {
|
8153 |
|
8154 | |
8155 |
|
8156 |
|
8157 |
|
8158 |
|
8159 |
|
8160 |
|
8161 |
|
8162 |
|
8163 |
|
8164 | 'use strict';
|
8165 |
|
8166 | |
8167 |
|
8168 |
|
8169 |
|
8170 |
|
8171 |
|
8172 |
|
8173 |
|
8174 |
|
8175 |
|
8176 |
|
8177 |
|
8178 | function shouldUpdateReactComponent(prevElement, nextElement) {
|
8179 | var prevEmpty = prevElement === null || prevElement === false;
|
8180 | var nextEmpty = nextElement === null || nextElement === false;
|
8181 | if (prevEmpty || nextEmpty) {
|
8182 | return prevEmpty === nextEmpty;
|
8183 | }
|
8184 |
|
8185 | var prevType = typeof prevElement;
|
8186 | var nextType = typeof nextElement;
|
8187 | if (prevType === 'string' || prevType === 'number') {
|
8188 | return nextType === 'string' || nextType === 'number';
|
8189 | } else {
|
8190 | return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;
|
8191 | }
|
8192 | }
|
8193 |
|
8194 | module.exports = shouldUpdateReactComponent;
|
8195 |
|
8196 | },
|
8197 |
|
8198 | function(module, exports, __webpack_require__) {
|
8199 |
|
8200 | |
8201 |
|
8202 |
|
8203 |
|
8204 |
|
8205 |
|
8206 |
|
8207 |
|
8208 |
|
8209 |
|
8210 | 'use strict';
|
8211 |
|
8212 | var _assign = __webpack_require__(7);
|
8213 |
|
8214 | var emptyFunction = __webpack_require__(11);
|
8215 | var warning = __webpack_require__(5);
|
8216 |
|
8217 | var validateDOMNesting = emptyFunction;
|
8218 |
|
8219 | if (true) {
|
8220 |
|
8221 |
|
8222 |
|
8223 |
|
8224 |
|
8225 |
|
8226 |
|
8227 |
|
8228 |
|
8229 |
|
8230 |
|
8231 |
|
8232 | var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp'];
|
8233 |
|
8234 |
|
8235 | var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',
|
8236 |
|
8237 |
|
8238 |
|
8239 |
|
8240 | 'foreignObject', 'desc', 'title'];
|
8241 |
|
8242 |
|
8243 | var buttonScopeTags = inScopeTags.concat(['button']);
|
8244 |
|
8245 |
|
8246 | var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
|
8247 |
|
8248 | var emptyAncestorInfo = {
|
8249 | current: null,
|
8250 |
|
8251 | formTag: null,
|
8252 | aTagInScope: null,
|
8253 | buttonTagInScope: null,
|
8254 | nobrTagInScope: null,
|
8255 | pTagInButtonScope: null,
|
8256 |
|
8257 | listItemTagAutoclosing: null,
|
8258 | dlItemTagAutoclosing: null
|
8259 | };
|
8260 |
|
8261 | var updatedAncestorInfo = function (oldInfo, tag, instance) {
|
8262 | var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
|
8263 | var info = { tag: tag, instance: instance };
|
8264 |
|
8265 | if (inScopeTags.indexOf(tag) !== -1) {
|
8266 | ancestorInfo.aTagInScope = null;
|
8267 | ancestorInfo.buttonTagInScope = null;
|
8268 | ancestorInfo.nobrTagInScope = null;
|
8269 | }
|
8270 | if (buttonScopeTags.indexOf(tag) !== -1) {
|
8271 | ancestorInfo.pTagInButtonScope = null;
|
8272 | }
|
8273 |
|
8274 |
|
8275 |
|
8276 | if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
|
8277 | ancestorInfo.listItemTagAutoclosing = null;
|
8278 | ancestorInfo.dlItemTagAutoclosing = null;
|
8279 | }
|
8280 |
|
8281 | ancestorInfo.current = info;
|
8282 |
|
8283 | if (tag === 'form') {
|
8284 | ancestorInfo.formTag = info;
|
8285 | }
|
8286 | if (tag === 'a') {
|
8287 | ancestorInfo.aTagInScope = info;
|
8288 | }
|
8289 | if (tag === 'button') {
|
8290 | ancestorInfo.buttonTagInScope = info;
|
8291 | }
|
8292 | if (tag === 'nobr') {
|
8293 | ancestorInfo.nobrTagInScope = info;
|
8294 | }
|
8295 | if (tag === 'p') {
|
8296 | ancestorInfo.pTagInButtonScope = info;
|
8297 | }
|
8298 | if (tag === 'li') {
|
8299 | ancestorInfo.listItemTagAutoclosing = info;
|
8300 | }
|
8301 | if (tag === 'dd' || tag === 'dt') {
|
8302 | ancestorInfo.dlItemTagAutoclosing = info;
|
8303 | }
|
8304 |
|
8305 | return ancestorInfo;
|
8306 | };
|
8307 |
|
8308 | |
8309 |
|
8310 |
|
8311 | var isTagValidWithParent = function (tag, parentTag) {
|
8312 |
|
8313 | switch (parentTag) {
|
8314 |
|
8315 | case 'select':
|
8316 | return tag === 'option' || tag === 'optgroup' || tag === '#text';
|
8317 | case 'optgroup':
|
8318 | return tag === 'option' || tag === '#text';
|
8319 |
|
8320 |
|
8321 | case 'option':
|
8322 | return tag === '#text';
|
8323 |
|
8324 |
|
8325 |
|
8326 |
|
8327 |
|
8328 |
|
8329 |
|
8330 | case 'tr':
|
8331 | return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
|
8332 |
|
8333 |
|
8334 | case 'tbody':
|
8335 | case 'thead':
|
8336 | case 'tfoot':
|
8337 | return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
|
8338 |
|
8339 |
|
8340 | case 'colgroup':
|
8341 | return tag === 'col' || tag === 'template';
|
8342 |
|
8343 |
|
8344 | case 'table':
|
8345 | return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
|
8346 |
|
8347 |
|
8348 | case 'head':
|
8349 | return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
|
8350 |
|
8351 |
|
8352 | case 'html':
|
8353 | return tag === 'head' || tag === 'body';
|
8354 | case '#document':
|
8355 | return tag === 'html';
|
8356 | }
|
8357 |
|
8358 |
|
8359 |
|
8360 |
|
8361 | switch (tag) {
|
8362 | case 'h1':
|
8363 | case 'h2':
|
8364 | case 'h3':
|
8365 | case 'h4':
|
8366 | case 'h5':
|
8367 | case 'h6':
|
8368 | return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
|
8369 |
|
8370 | case 'rp':
|
8371 | case 'rt':
|
8372 | return impliedEndTags.indexOf(parentTag) === -1;
|
8373 |
|
8374 | case 'body':
|
8375 | case 'caption':
|
8376 | case 'col':
|
8377 | case 'colgroup':
|
8378 | case 'frame':
|
8379 | case 'head':
|
8380 | case 'html':
|
8381 | case 'tbody':
|
8382 | case 'td':
|
8383 | case 'tfoot':
|
8384 | case 'th':
|
8385 | case 'thead':
|
8386 | case 'tr':
|
8387 |
|
8388 |
|
8389 |
|
8390 |
|
8391 | return parentTag == null;
|
8392 | }
|
8393 |
|
8394 | return true;
|
8395 | };
|
8396 |
|
8397 | |
8398 |
|
8399 |
|
8400 | var findInvalidAncestorForTag = function (tag, ancestorInfo) {
|
8401 | switch (tag) {
|
8402 | case 'address':
|
8403 | case 'article':
|
8404 | case 'aside':
|
8405 | case 'blockquote':
|
8406 | case 'center':
|
8407 | case 'details':
|
8408 | case 'dialog':
|
8409 | case 'dir':
|
8410 | case 'div':
|
8411 | case 'dl':
|
8412 | case 'fieldset':
|
8413 | case 'figcaption':
|
8414 | case 'figure':
|
8415 | case 'footer':
|
8416 | case 'header':
|
8417 | case 'hgroup':
|
8418 | case 'main':
|
8419 | case 'menu':
|
8420 | case 'nav':
|
8421 | case 'ol':
|
8422 | case 'p':
|
8423 | case 'section':
|
8424 | case 'summary':
|
8425 | case 'ul':
|
8426 |
|
8427 | case 'pre':
|
8428 | case 'listing':
|
8429 |
|
8430 | case 'table':
|
8431 |
|
8432 | case 'hr':
|
8433 |
|
8434 | case 'xmp':
|
8435 |
|
8436 | case 'h1':
|
8437 | case 'h2':
|
8438 | case 'h3':
|
8439 | case 'h4':
|
8440 | case 'h5':
|
8441 | case 'h6':
|
8442 | return ancestorInfo.pTagInButtonScope;
|
8443 |
|
8444 | case 'form':
|
8445 | return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
|
8446 |
|
8447 | case 'li':
|
8448 | return ancestorInfo.listItemTagAutoclosing;
|
8449 |
|
8450 | case 'dd':
|
8451 | case 'dt':
|
8452 | return ancestorInfo.dlItemTagAutoclosing;
|
8453 |
|
8454 | case 'button':
|
8455 | return ancestorInfo.buttonTagInScope;
|
8456 |
|
8457 | case 'a':
|
8458 |
|
8459 |
|
8460 | return ancestorInfo.aTagInScope;
|
8461 |
|
8462 | case 'nobr':
|
8463 | return ancestorInfo.nobrTagInScope;
|
8464 | }
|
8465 |
|
8466 | return null;
|
8467 | };
|
8468 |
|
8469 | |
8470 |
|
8471 |
|
8472 |
|
8473 | var findOwnerStack = function (instance) {
|
8474 | if (!instance) {
|
8475 | return [];
|
8476 | }
|
8477 |
|
8478 | var stack = [];
|
8479 | do {
|
8480 | stack.push(instance);
|
8481 | } while (instance = instance._currentElement._owner);
|
8482 | stack.reverse();
|
8483 | return stack;
|
8484 | };
|
8485 |
|
8486 | var didWarn = {};
|
8487 |
|
8488 | validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) {
|
8489 | ancestorInfo = ancestorInfo || emptyAncestorInfo;
|
8490 | var parentInfo = ancestorInfo.current;
|
8491 | var parentTag = parentInfo && parentInfo.tag;
|
8492 |
|
8493 | if (childText != null) {
|
8494 | true ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
|
8495 | childTag = '#text';
|
8496 | }
|
8497 |
|
8498 | var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
|
8499 | var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
|
8500 | var problematic = invalidParent || invalidAncestor;
|
8501 |
|
8502 | if (problematic) {
|
8503 | var ancestorTag = problematic.tag;
|
8504 | var ancestorInstance = problematic.instance;
|
8505 |
|
8506 | var childOwner = childInstance && childInstance._currentElement._owner;
|
8507 | var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner;
|
8508 |
|
8509 | var childOwners = findOwnerStack(childOwner);
|
8510 | var ancestorOwners = findOwnerStack(ancestorOwner);
|
8511 |
|
8512 | var minStackLen = Math.min(childOwners.length, ancestorOwners.length);
|
8513 | var i;
|
8514 |
|
8515 | var deepestCommon = -1;
|
8516 | for (i = 0; i < minStackLen; i++) {
|
8517 | if (childOwners[i] === ancestorOwners[i]) {
|
8518 | deepestCommon = i;
|
8519 | } else {
|
8520 | break;
|
8521 | }
|
8522 | }
|
8523 |
|
8524 | var UNKNOWN = '(unknown)';
|
8525 | var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) {
|
8526 | return inst.getName() || UNKNOWN;
|
8527 | });
|
8528 | var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) {
|
8529 | return inst.getName() || UNKNOWN;
|
8530 | });
|
8531 | var ownerInfo = [].concat(
|
8532 |
|
8533 |
|
8534 | deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag,
|
8535 |
|
8536 | invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > ');
|
8537 |
|
8538 | var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo;
|
8539 | if (didWarn[warnKey]) {
|
8540 | return;
|
8541 | }
|
8542 | didWarn[warnKey] = true;
|
8543 |
|
8544 | var tagDisplayName = childTag;
|
8545 | var whitespaceInfo = '';
|
8546 | if (childTag === '#text') {
|
8547 | if (/\S/.test(childText)) {
|
8548 | tagDisplayName = 'Text nodes';
|
8549 | } else {
|
8550 | tagDisplayName = 'Whitespace text nodes';
|
8551 | whitespaceInfo = ' Make sure you don\'t have any extra whitespace between tags on ' + 'each line of your source code.';
|
8552 | }
|
8553 | } else {
|
8554 | tagDisplayName = '<' + childTag + '>';
|
8555 | }
|
8556 |
|
8557 | if (invalidParent) {
|
8558 | var info = '';
|
8559 | if (ancestorTag === 'table' && childTag === 'tr') {
|
8560 | info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
|
8561 | }
|
8562 | true ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;
|
8563 | } else {
|
8564 | true ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;
|
8565 | }
|
8566 | }
|
8567 | };
|
8568 |
|
8569 | validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo;
|
8570 |
|
8571 |
|
8572 | validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) {
|
8573 | ancestorInfo = ancestorInfo || emptyAncestorInfo;
|
8574 | var parentInfo = ancestorInfo.current;
|
8575 | var parentTag = parentInfo && parentInfo.tag;
|
8576 | return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);
|
8577 | };
|
8578 | }
|
8579 |
|
8580 | module.exports = validateDOMNesting;
|
8581 |
|
8582 | },
|
8583 |
|
8584 | function(module, exports, __webpack_require__) {
|
8585 |
|
8586 | |
8587 |
|
8588 |
|
8589 |
|
8590 |
|
8591 |
|
8592 |
|
8593 |
|
8594 |
|
8595 |
|
8596 | 'use strict';
|
8597 |
|
8598 | var _prodInvariant = __webpack_require__(23);
|
8599 |
|
8600 | var ReactNoopUpdateQueue = __webpack_require__(56);
|
8601 |
|
8602 | var canDefineProperty = __webpack_require__(58);
|
8603 | var emptyObject = __webpack_require__(24);
|
8604 | var invariant = __webpack_require__(4);
|
8605 | var warning = __webpack_require__(5);
|
8606 |
|
8607 | |
8608 |
|
8609 |
|
8610 | function ReactComponent(props, context, updater) {
|
8611 | this.props = props;
|
8612 | this.context = context;
|
8613 | this.refs = emptyObject;
|
8614 |
|
8615 |
|
8616 | this.updater = updater || ReactNoopUpdateQueue;
|
8617 | }
|
8618 |
|
8619 | ReactComponent.prototype.isReactComponent = {};
|
8620 |
|
8621 | |
8622 |
|
8623 |
|
8624 |
|
8625 |
|
8626 |
|
8627 |
|
8628 |
|
8629 |
|
8630 |
|
8631 |
|
8632 |
|
8633 |
|
8634 |
|
8635 |
|
8636 |
|
8637 |
|
8638 |
|
8639 |
|
8640 |
|
8641 |
|
8642 |
|
8643 |
|
8644 |
|
8645 |
|
8646 | ReactComponent.prototype.setState = function (partialState, callback) {
|
8647 | !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? true ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;
|
8648 | this.updater.enqueueSetState(this, partialState);
|
8649 | if (callback) {
|
8650 | this.updater.enqueueCallback(this, callback, 'setState');
|
8651 | }
|
8652 | };
|
8653 |
|
8654 | |
8655 |
|
8656 |
|
8657 |
|
8658 |
|
8659 |
|
8660 |
|
8661 |
|
8662 |
|
8663 |
|
8664 |
|
8665 |
|
8666 |
|
8667 |
|
8668 | ReactComponent.prototype.forceUpdate = function (callback) {
|
8669 | this.updater.enqueueForceUpdate(this);
|
8670 | if (callback) {
|
8671 | this.updater.enqueueCallback(this, callback, 'forceUpdate');
|
8672 | }
|
8673 | };
|
8674 |
|
8675 | |
8676 |
|
8677 |
|
8678 |
|
8679 |
|
8680 | if (true) {
|
8681 | var deprecatedAPIs = {
|
8682 | isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
|
8683 | replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
8684 | };
|
8685 | var defineDeprecationWarning = function (methodName, info) {
|
8686 | if (canDefineProperty) {
|
8687 | Object.defineProperty(ReactComponent.prototype, methodName, {
|
8688 | get: function () {
|
8689 | true ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0;
|
8690 | return undefined;
|
8691 | }
|
8692 | });
|
8693 | }
|
8694 | };
|
8695 | for (var fnName in deprecatedAPIs) {
|
8696 | if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
8697 | defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
8698 | }
|
8699 | }
|
8700 | }
|
8701 |
|
8702 | module.exports = ReactComponent;
|
8703 |
|
8704 | },
|
8705 |
|
8706 | function(module, exports, __webpack_require__) {
|
8707 |
|
8708 | |
8709 |
|
8710 |
|
8711 |
|
8712 |
|
8713 |
|
8714 |
|
8715 |
|
8716 |
|
8717 |
|
8718 | 'use strict';
|
8719 |
|
8720 | var warning = __webpack_require__(5);
|
8721 |
|
8722 | function warnNoop(publicInstance, callerName) {
|
8723 | if (true) {
|
8724 | var constructor = publicInstance.constructor;
|
8725 | true ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
|
8726 | }
|
8727 | }
|
8728 |
|
8729 | /**
|
8730 | * This is the abstract API for an update queue.
|
8731 | */
|
8732 | var ReactNoopUpdateQueue = {
|
8733 |
|
8734 | |
8735 |
|
8736 |
|
8737 |
|
8738 |
|
8739 |
|
8740 |
|
8741 | isMounted: function (publicInstance) {
|
8742 | return false;
|
8743 | },
|
8744 |
|
8745 | |
8746 |
|
8747 |
|
8748 |
|
8749 |
|
8750 |
|
8751 |
|
8752 |
|
8753 | enqueueCallback: function (publicInstance, callback) {},
|
8754 |
|
8755 | |
8756 |
|
8757 |
|
8758 |
|
8759 |
|
8760 |
|
8761 |
|
8762 |
|
8763 |
|
8764 |
|
8765 |
|
8766 |
|
8767 |
|
8768 | enqueueForceUpdate: function (publicInstance) {
|
8769 | warnNoop(publicInstance, 'forceUpdate');
|
8770 | },
|
8771 |
|
8772 | |
8773 |
|
8774 |
|
8775 |
|
8776 |
|
8777 |
|
8778 |
|
8779 |
|
8780 |
|
8781 |
|
8782 |
|
8783 | enqueueReplaceState: function (publicInstance, completeState) {
|
8784 | warnNoop(publicInstance, 'replaceState');
|
8785 | },
|
8786 |
|
8787 | |
8788 |
|
8789 |
|
8790 |
|
8791 |
|
8792 |
|
8793 |
|
8794 |
|
8795 |
|
8796 |
|
8797 | enqueueSetState: function (publicInstance, partialState) {
|
8798 | warnNoop(publicInstance, 'setState');
|
8799 | }
|
8800 | };
|
8801 |
|
8802 | module.exports = ReactNoopUpdateQueue;
|
8803 |
|
8804 | },
|
8805 |
|
8806 | function(module, exports, __webpack_require__) {
|
8807 |
|
8808 | |
8809 |
|
8810 |
|
8811 |
|
8812 |
|
8813 |
|
8814 |
|
8815 |
|
8816 |
|
8817 |
|
8818 |
|
8819 | 'use strict';
|
8820 |
|
8821 | var ReactPropTypeLocationNames = {};
|
8822 |
|
8823 | if (true) {
|
8824 | ReactPropTypeLocationNames = {
|
8825 | prop: 'prop',
|
8826 | context: 'context',
|
8827 | childContext: 'child context'
|
8828 | };
|
8829 | }
|
8830 |
|
8831 | module.exports = ReactPropTypeLocationNames;
|
8832 |
|
8833 | },
|
8834 |
|
8835 | function(module, exports, __webpack_require__) {
|
8836 |
|
8837 | |
8838 |
|
8839 |
|
8840 |
|
8841 |
|
8842 |
|
8843 |
|
8844 |
|
8845 |
|
8846 |
|
8847 |
|
8848 | 'use strict';
|
8849 |
|
8850 | var canDefineProperty = false;
|
8851 | if (true) {
|
8852 | try {
|
8853 |
|
8854 | Object.defineProperty({}, 'x', { get: function () {} });
|
8855 | canDefineProperty = true;
|
8856 | } catch (x) {
|
8857 |
|
8858 | }
|
8859 | }
|
8860 |
|
8861 | module.exports = canDefineProperty;
|
8862 |
|
8863 | },
|
8864 |
|
8865 | function(module, exports) {
|
8866 |
|
8867 | |
8868 |
|
8869 |
|
8870 |
|
8871 |
|
8872 |
|
8873 |
|
8874 |
|
8875 |
|
8876 |
|
8877 |
|
8878 | 'use strict';
|
8879 |
|
8880 |
|
8881 |
|
8882 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
8883 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
8884 |
|
8885 | |
8886 |
|
8887 |
|
8888 |
|
8889 |
|
8890 |
|
8891 |
|
8892 |
|
8893 |
|
8894 |
|
8895 |
|
8896 |
|
8897 |
|
8898 |
|
8899 | function getIteratorFn(maybeIterable) {
|
8900 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
8901 | if (typeof iteratorFn === 'function') {
|
8902 | return iteratorFn;
|
8903 | }
|
8904 | }
|
8905 |
|
8906 | module.exports = getIteratorFn;
|
8907 |
|
8908 | },
|
8909 |
|
8910 | function(module, exports) {
|
8911 |
|
8912 | module.exports = __WEBPACK_EXTERNAL_MODULE_60__;
|
8913 |
|
8914 | },
|
8915 |
|
8916 | function(module, exports, __webpack_require__) {
|
8917 |
|
8918 | 'use strict';
|
8919 |
|
8920 | Object.defineProperty(exports, "__esModule", {
|
8921 | value: true
|
8922 | });
|
8923 |
|
8924 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
8925 |
|
8926 | var _react = __webpack_require__(1);
|
8927 |
|
8928 | var _react2 = _interopRequireDefault(_react);
|
8929 |
|
8930 | var _classnames = __webpack_require__(2);
|
8931 |
|
8932 | var _classnames2 = _interopRequireDefault(_classnames);
|
8933 |
|
8934 | var _reactAddonsCssTransitionGroup = __webpack_require__(184);
|
8935 |
|
8936 | var _reactAddonsCssTransitionGroup2 = _interopRequireDefault(_reactAddonsCssTransitionGroup);
|
8937 |
|
8938 | var _utils = __webpack_require__(3);
|
8939 |
|
8940 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
8941 |
|
8942 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
8943 |
|
8944 | var FirstChild = function FirstChild(_ref) {
|
8945 | var children = _ref.children;
|
8946 | return _react2.default.Children.toArray(children)[0] || null;
|
8947 | };
|
8948 |
|
8949 | var propTypes = {
|
8950 | children: _react.PropTypes.node,
|
8951 | className: _react.PropTypes.string,
|
8952 | cssModule: _react.PropTypes.object,
|
8953 | color: _react.PropTypes.string,
|
8954 | isOpen: _react.PropTypes.bool,
|
8955 | toggle: _react.PropTypes.func,
|
8956 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
8957 | transitionAppearTimeout: _react.PropTypes.number,
|
8958 | transitionEnterTimeout: _react.PropTypes.number,
|
8959 | transitionLeaveTimeout: _react.PropTypes.number
|
8960 | };
|
8961 |
|
8962 | var defaultProps = {
|
8963 | color: 'success',
|
8964 | isOpen: true,
|
8965 | tag: 'div',
|
8966 | transitionAppearTimeout: 150,
|
8967 | transitionEnterTimeout: 150,
|
8968 | transitionLeaveTimeout: 150
|
8969 | };
|
8970 |
|
8971 | var Alert = function Alert(props) {
|
8972 | var className = props.className,
|
8973 | cssModule = props.cssModule,
|
8974 | Tag = props.tag,
|
8975 | color = props.color,
|
8976 | isOpen = props.isOpen,
|
8977 | toggle = props.toggle,
|
8978 | children = props.children,
|
8979 | transitionAppearTimeout = props.transitionAppearTimeout,
|
8980 | transitionEnterTimeout = props.transitionEnterTimeout,
|
8981 | transitionLeaveTimeout = props.transitionLeaveTimeout,
|
8982 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'color', 'isOpen', 'toggle', 'children', 'transitionAppearTimeout', 'transitionEnterTimeout', 'transitionLeaveTimeout']);
|
8983 |
|
8984 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'alert', 'alert-' + color, { 'alert-dismissible': toggle }), cssModule);
|
8985 |
|
8986 | var alert = _react2.default.createElement(
|
8987 | Tag,
|
8988 | _extends({}, attributes, { className: classes, role: 'alert' }),
|
8989 | toggle ? _react2.default.createElement(
|
8990 | 'button',
|
8991 | { type: 'button', className: 'close', 'aria-label': 'Close', onClick: toggle },
|
8992 | _react2.default.createElement(
|
8993 | 'span',
|
8994 | { 'aria-hidden': 'true' },
|
8995 | '\xD7'
|
8996 | )
|
8997 | ) : null,
|
8998 | children
|
8999 | );
|
9000 |
|
9001 | return _react2.default.createElement(
|
9002 | _reactAddonsCssTransitionGroup2.default,
|
9003 | {
|
9004 | component: FirstChild,
|
9005 | transitionName: {
|
9006 | appear: 'fade',
|
9007 | appearActive: 'show',
|
9008 | enter: 'fade',
|
9009 | enterActive: 'show',
|
9010 | leave: 'fade',
|
9011 | leaveActive: 'out'
|
9012 | },
|
9013 | transitionAppear: transitionAppearTimeout > 0,
|
9014 | transitionAppearTimeout: transitionAppearTimeout,
|
9015 | transitionEnter: transitionEnterTimeout > 0,
|
9016 | transitionEnterTimeout: transitionEnterTimeout,
|
9017 | transitionLeave: transitionLeaveTimeout > 0,
|
9018 | transitionLeaveTimeout: transitionLeaveTimeout
|
9019 | },
|
9020 | isOpen ? alert : null
|
9021 | );
|
9022 | };
|
9023 |
|
9024 | Alert.propTypes = propTypes;
|
9025 | Alert.defaultProps = defaultProps;
|
9026 |
|
9027 | exports.default = Alert;
|
9028 |
|
9029 | },
|
9030 |
|
9031 | function(module, exports, __webpack_require__) {
|
9032 |
|
9033 | 'use strict';
|
9034 |
|
9035 | Object.defineProperty(exports, "__esModule", {
|
9036 | value: true
|
9037 | });
|
9038 |
|
9039 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
9040 |
|
9041 | var _react = __webpack_require__(1);
|
9042 |
|
9043 | var _react2 = _interopRequireDefault(_react);
|
9044 |
|
9045 | var _Dropdown = __webpack_require__(32);
|
9046 |
|
9047 | var _Dropdown2 = _interopRequireDefault(_Dropdown);
|
9048 |
|
9049 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9050 |
|
9051 | var propTypes = {
|
9052 | children: _react.PropTypes.node
|
9053 | };
|
9054 |
|
9055 | var ButtonDropdown = function ButtonDropdown(props) {
|
9056 | return _react2.default.createElement(_Dropdown2.default, _extends({}, props, { group: true }));
|
9057 | };
|
9058 |
|
9059 | ButtonDropdown.propTypes = propTypes;
|
9060 |
|
9061 | exports.default = ButtonDropdown;
|
9062 |
|
9063 | },
|
9064 |
|
9065 | function(module, exports, __webpack_require__) {
|
9066 |
|
9067 | 'use strict';
|
9068 |
|
9069 | Object.defineProperty(exports, "__esModule", {
|
9070 | value: true
|
9071 | });
|
9072 |
|
9073 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
9074 |
|
9075 | var _react = __webpack_require__(1);
|
9076 |
|
9077 | var _react2 = _interopRequireDefault(_react);
|
9078 |
|
9079 | var _classnames = __webpack_require__(2);
|
9080 |
|
9081 | var _classnames2 = _interopRequireDefault(_classnames);
|
9082 |
|
9083 | var _utils = __webpack_require__(3);
|
9084 |
|
9085 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9086 |
|
9087 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
9088 |
|
9089 | var propTypes = {
|
9090 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
9091 | children: _react.PropTypes.node.isRequired,
|
9092 | right: _react.PropTypes.bool,
|
9093 | className: _react.PropTypes.string,
|
9094 | cssModule: _react.PropTypes.object
|
9095 | };
|
9096 |
|
9097 | var defaultProps = {
|
9098 | tag: 'div'
|
9099 | };
|
9100 |
|
9101 | var contextTypes = {
|
9102 | isOpen: _react.PropTypes.bool.isRequired
|
9103 | };
|
9104 |
|
9105 | var DropdownMenu = function DropdownMenu(props, context) {
|
9106 | var className = props.className,
|
9107 | cssModule = props.cssModule,
|
9108 | right = props.right,
|
9109 | Tag = props.tag,
|
9110 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'right', 'tag']);
|
9111 |
|
9112 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'dropdown-menu', { 'dropdown-menu-right': right }), cssModule);
|
9113 |
|
9114 | return _react2.default.createElement(Tag, _extends({}, attributes, { tabIndex: '-1', 'aria-hidden': !context.isOpen, role: 'menu', className: classes }));
|
9115 | };
|
9116 |
|
9117 | DropdownMenu.propTypes = propTypes;
|
9118 | DropdownMenu.defaultProps = defaultProps;
|
9119 | DropdownMenu.contextTypes = contextTypes;
|
9120 |
|
9121 | exports.default = DropdownMenu;
|
9122 |
|
9123 | },
|
9124 |
|
9125 | function(module, exports, __webpack_require__) {
|
9126 |
|
9127 | 'use strict';
|
9128 |
|
9129 | Object.defineProperty(exports, "__esModule", {
|
9130 | value: true
|
9131 | });
|
9132 |
|
9133 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
9134 |
|
9135 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
9136 |
|
9137 | var _react = __webpack_require__(1);
|
9138 |
|
9139 | var _react2 = _interopRequireDefault(_react);
|
9140 |
|
9141 | var _classnames = __webpack_require__(2);
|
9142 |
|
9143 | var _classnames2 = _interopRequireDefault(_classnames);
|
9144 |
|
9145 | var _lodash = __webpack_require__(18);
|
9146 |
|
9147 | var _lodash2 = _interopRequireDefault(_lodash);
|
9148 |
|
9149 | var _utils = __webpack_require__(3);
|
9150 |
|
9151 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9152 |
|
9153 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9154 |
|
9155 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
9156 |
|
9157 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
9158 |
|
9159 | var propTypes = {
|
9160 | baseClass: _react.PropTypes.string,
|
9161 | baseClassIn: _react.PropTypes.string,
|
9162 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
9163 | className: _react.PropTypes.string,
|
9164 | cssModule: _react.PropTypes.object,
|
9165 | transitionAppearTimeout: _react.PropTypes.number,
|
9166 | transitionEnterTimeout: _react.PropTypes.number,
|
9167 | transitionLeaveTimeout: _react.PropTypes.number,
|
9168 | transitionAppear: _react.PropTypes.bool,
|
9169 | transitionEnter: _react.PropTypes.bool,
|
9170 | transitionLeave: _react.PropTypes.bool,
|
9171 | onLeave: _react.PropTypes.func,
|
9172 | onEnter: _react.PropTypes.func
|
9173 | };
|
9174 |
|
9175 | var defaultProps = {
|
9176 | tag: 'div',
|
9177 | baseClass: 'fade',
|
9178 | baseClassIn: 'show',
|
9179 | transitionAppearTimeout: 0,
|
9180 | transitionEnterTimeout: 0,
|
9181 | transitionLeaveTimeout: 0,
|
9182 | transitionAppear: true,
|
9183 | transitionEnter: true,
|
9184 | transitionLeave: true
|
9185 | };
|
9186 |
|
9187 | var Fade = function (_React$Component) {
|
9188 | _inherits(Fade, _React$Component);
|
9189 |
|
9190 | function Fade(props) {
|
9191 | _classCallCheck(this, Fade);
|
9192 |
|
9193 | var _this = _possibleConstructorReturn(this, (Fade.__proto__ || Object.getPrototypeOf(Fade)).call(this, props));
|
9194 |
|
9195 | _this.state = {
|
9196 | mounted: !props.transitionAppear
|
9197 | };
|
9198 |
|
9199 | _this.onLeave = _this.onLeave.bind(_this);
|
9200 | _this.onEnter = _this.onEnter.bind(_this);
|
9201 | _this.timers = [];
|
9202 | return _this;
|
9203 | }
|
9204 |
|
9205 | _createClass(Fade, [{
|
9206 | key: 'componentWillUnmount',
|
9207 | value: function componentWillUnmount() {
|
9208 | this.timers.forEach(function (timer) {
|
9209 | return clearTimeout(timer);
|
9210 | });
|
9211 | }
|
9212 | }, {
|
9213 | key: 'onEnter',
|
9214 | value: function onEnter(cb) {
|
9215 | var _this2 = this;
|
9216 |
|
9217 | return function () {
|
9218 | cb();
|
9219 | if (_this2.props.onEnter) {
|
9220 | _this2.props.onEnter();
|
9221 | }
|
9222 | };
|
9223 | }
|
9224 | }, {
|
9225 | key: 'onLeave',
|
9226 | value: function onLeave(cb) {
|
9227 | var _this3 = this;
|
9228 |
|
9229 | return function () {
|
9230 | cb();
|
9231 | if (_this3.props.onLeave) {
|
9232 | _this3.props.onLeave();
|
9233 | }
|
9234 | };
|
9235 | }
|
9236 | }, {
|
9237 | key: 'componentWillAppear',
|
9238 | value: function componentWillAppear(cb) {
|
9239 | if (!this.props.transitionAppear) {
|
9240 | this.onEnter(cb)();
|
9241 | }
|
9242 |
|
9243 | this.timers.push(setTimeout(this.onEnter(cb), this.props.transitionAppearTimeout));
|
9244 | }
|
9245 | }, {
|
9246 | key: 'componentDidAppear',
|
9247 | value: function componentDidAppear() {
|
9248 | this.setState({
|
9249 | mounted: true
|
9250 | });
|
9251 | }
|
9252 | }, {
|
9253 | key: 'componentWillEnter',
|
9254 | value: function componentWillEnter(cb) {
|
9255 | if (!this.props.transitionEnter) {
|
9256 | this.onEnter(cb)();
|
9257 | }
|
9258 |
|
9259 | this.timers.push(setTimeout(this.onEnter(cb), this.props.transitionEnterTimeout));
|
9260 | }
|
9261 | }, {
|
9262 | key: 'componentDidEnter',
|
9263 | value: function componentDidEnter() {
|
9264 | this.setState({
|
9265 | mounted: true
|
9266 | });
|
9267 | }
|
9268 | }, {
|
9269 | key: 'componentWillLeave',
|
9270 | value: function componentWillLeave(cb) {
|
9271 | this.setState({
|
9272 | mounted: false
|
9273 | });
|
9274 |
|
9275 | if (!this.props.transitionLeave) {
|
9276 | this.onLeave(cb)();
|
9277 | }
|
9278 |
|
9279 | this.timers.push(setTimeout(this.onLeave(cb), this.props.transitionLeaveTimeout));
|
9280 | }
|
9281 | }, {
|
9282 | key: 'render',
|
9283 | value: function render() {
|
9284 | var _props = this.props,
|
9285 | baseClass = _props.baseClass,
|
9286 | baseClassIn = _props.baseClassIn,
|
9287 | className = _props.className,
|
9288 | cssModule = _props.cssModule,
|
9289 | Tag = _props.tag;
|
9290 |
|
9291 | var attributes = (0, _lodash2.default)(this.props, Object.keys(propTypes));
|
9292 |
|
9293 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, baseClass, this.state.mounted ? baseClassIn : false), cssModule);
|
9294 |
|
9295 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
9296 | }
|
9297 | }]);
|
9298 |
|
9299 | return Fade;
|
9300 | }(_react2.default.Component);
|
9301 |
|
9302 | Fade.propTypes = propTypes;
|
9303 | Fade.defaultProps = defaultProps;
|
9304 |
|
9305 | exports.default = Fade;
|
9306 |
|
9307 | },
|
9308 |
|
9309 | function(module, exports, __webpack_require__) {
|
9310 |
|
9311 | 'use strict';
|
9312 |
|
9313 | Object.defineProperty(exports, "__esModule", {
|
9314 | value: true
|
9315 | });
|
9316 |
|
9317 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
9318 |
|
9319 | var _react = __webpack_require__(1);
|
9320 |
|
9321 | var _react2 = _interopRequireDefault(_react);
|
9322 |
|
9323 | var _classnames = __webpack_require__(2);
|
9324 |
|
9325 | var _classnames2 = _interopRequireDefault(_classnames);
|
9326 |
|
9327 | var _utils = __webpack_require__(3);
|
9328 |
|
9329 | var _Dropdown = __webpack_require__(32);
|
9330 |
|
9331 | var _Dropdown2 = _interopRequireDefault(_Dropdown);
|
9332 |
|
9333 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9334 |
|
9335 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
9336 |
|
9337 | var propTypes = {
|
9338 | children: _react.PropTypes.node,
|
9339 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
9340 | className: _react.PropTypes.string,
|
9341 | cssModule: _react.PropTypes.object
|
9342 | };
|
9343 |
|
9344 | var defaultProps = {
|
9345 | tag: 'li'
|
9346 | };
|
9347 |
|
9348 | var NavDropdown = function NavDropdown(props) {
|
9349 | var className = props.className,
|
9350 | cssModule = props.cssModule,
|
9351 | Tag = props.tag,
|
9352 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
9353 |
|
9354 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'nav-item'), cssModule);
|
9355 |
|
9356 | return _react2.default.createElement(_Dropdown2.default, _extends({}, attributes, { tag: Tag, className: classes }));
|
9357 | };
|
9358 |
|
9359 | NavDropdown.propTypes = propTypes;
|
9360 | NavDropdown.defaultProps = defaultProps;
|
9361 |
|
9362 | exports.default = NavDropdown;
|
9363 |
|
9364 | },
|
9365 |
|
9366 | function(module, exports, __webpack_require__) {
|
9367 |
|
9368 | 'use strict';
|
9369 |
|
9370 | Object.defineProperty(exports, "__esModule", {
|
9371 | value: true
|
9372 | });
|
9373 |
|
9374 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
9375 |
|
9376 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
9377 |
|
9378 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
9379 |
|
9380 | var _react = __webpack_require__(1);
|
9381 |
|
9382 | var _react2 = _interopRequireDefault(_react);
|
9383 |
|
9384 | var _classnames = __webpack_require__(2);
|
9385 |
|
9386 | var _classnames2 = _interopRequireDefault(_classnames);
|
9387 |
|
9388 | var _lodash = __webpack_require__(18);
|
9389 |
|
9390 | var _lodash2 = _interopRequireDefault(_lodash);
|
9391 |
|
9392 | var _TetherContent = __webpack_require__(33);
|
9393 |
|
9394 | var _TetherContent2 = _interopRequireDefault(_TetherContent);
|
9395 |
|
9396 | var _utils = __webpack_require__(3);
|
9397 |
|
9398 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9399 |
|
9400 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9401 |
|
9402 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
9403 |
|
9404 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
9405 |
|
9406 | var propTypes = {
|
9407 | placement: _react2.default.PropTypes.oneOf(_utils.tetherAttachements),
|
9408 | target: _react.PropTypes.string.isRequired,
|
9409 | isOpen: _react.PropTypes.bool,
|
9410 | disabled: _react.PropTypes.bool,
|
9411 | tether: _react.PropTypes.object,
|
9412 | tetherRef: _react.PropTypes.func,
|
9413 | className: _react.PropTypes.string,
|
9414 | cssModule: _react.PropTypes.object,
|
9415 | toggle: _react.PropTypes.func,
|
9416 | autohide: _react.PropTypes.bool,
|
9417 | delay: _react.PropTypes.oneOfType([_react.PropTypes.shape({ show: _react.PropTypes.number, hide: _react.PropTypes.number }), _react.PropTypes.number])
|
9418 | };
|
9419 |
|
9420 | var DEFAULT_DELAYS = {
|
9421 | show: 0,
|
9422 | hide: 250
|
9423 | };
|
9424 |
|
9425 | var defaultProps = {
|
9426 | isOpen: false,
|
9427 | placement: 'bottom',
|
9428 | delay: DEFAULT_DELAYS,
|
9429 | autohide: true,
|
9430 | toggle: function toggle() {}
|
9431 | };
|
9432 |
|
9433 | var defaultTetherConfig = {
|
9434 | classPrefix: 'bs-tether',
|
9435 | classes: {
|
9436 | element: false,
|
9437 | enabled: 'show'
|
9438 | },
|
9439 | constraints: [{ to: 'scrollParent', attachment: 'together none' }, { to: 'window', attachment: 'together none' }]
|
9440 | };
|
9441 |
|
9442 | var Tooltip = function (_React$Component) {
|
9443 | _inherits(Tooltip, _React$Component);
|
9444 |
|
9445 | function Tooltip(props) {
|
9446 | _classCallCheck(this, Tooltip);
|
9447 |
|
9448 | var _this = _possibleConstructorReturn(this, (Tooltip.__proto__ || Object.getPrototypeOf(Tooltip)).call(this, props));
|
9449 |
|
9450 | _this.addTargetEvents = _this.addTargetEvents.bind(_this);
|
9451 | _this.getTetherConfig = _this.getTetherConfig.bind(_this);
|
9452 | _this.handleDocumentClick = _this.handleDocumentClick.bind(_this);
|
9453 | _this.removeTargetEvents = _this.removeTargetEvents.bind(_this);
|
9454 | _this.toggle = _this.toggle.bind(_this);
|
9455 | _this.onMouseOverTooltip = _this.onMouseOverTooltip.bind(_this);
|
9456 | _this.onMouseLeaveTooltip = _this.onMouseLeaveTooltip.bind(_this);
|
9457 | _this.onMouseOverTooltipContent = _this.onMouseOverTooltipContent.bind(_this);
|
9458 | _this.onMouseLeaveTooltipContent = _this.onMouseLeaveTooltipContent.bind(_this);
|
9459 | _this.show = _this.show.bind(_this);
|
9460 | _this.hide = _this.hide.bind(_this);
|
9461 | return _this;
|
9462 | }
|
9463 |
|
9464 | _createClass(Tooltip, [{
|
9465 | key: 'componentDidMount',
|
9466 | value: function componentDidMount() {
|
9467 | this._target = document.getElementById(this.props.target);
|
9468 | this.addTargetEvents();
|
9469 | }
|
9470 | }, {
|
9471 | key: 'componentWillUnmount',
|
9472 | value: function componentWillUnmount() {
|
9473 | this.removeTargetEvents();
|
9474 | }
|
9475 | }, {
|
9476 | key: 'onMouseOverTooltip',
|
9477 | value: function onMouseOverTooltip() {
|
9478 | if (this._hideTimeout) {
|
9479 | this.clearHideTimeout();
|
9480 | }
|
9481 | this._showTimeout = setTimeout(this.show, this.getDelay('show'));
|
9482 | }
|
9483 | }, {
|
9484 | key: 'onMouseLeaveTooltip',
|
9485 | value: function onMouseLeaveTooltip() {
|
9486 | if (this._showTimeout) {
|
9487 | this.clearShowTimeout();
|
9488 | }
|
9489 | this._hideTimeout = setTimeout(this.hide, this.getDelay('hide'));
|
9490 | }
|
9491 | }, {
|
9492 | key: 'onMouseOverTooltipContent',
|
9493 | value: function onMouseOverTooltipContent() {
|
9494 | if (this.props.autohide) {
|
9495 | return;
|
9496 | }
|
9497 | if (this._hideTimeout) {
|
9498 | this.clearHideTimeout();
|
9499 | }
|
9500 | }
|
9501 | }, {
|
9502 | key: 'onMouseLeaveTooltipContent',
|
9503 | value: function onMouseLeaveTooltipContent() {
|
9504 | if (this.props.autohide) {
|
9505 | return;
|
9506 | }
|
9507 | if (this._showTimeout) {
|
9508 | this.clearShowTimeout();
|
9509 | }
|
9510 | this._hideTimeout = setTimeout(this.hide, this.getDelay('hide'));
|
9511 | }
|
9512 | }, {
|
9513 | key: 'getDelay',
|
9514 | value: function getDelay(key) {
|
9515 | var delay = this.props.delay;
|
9516 |
|
9517 | if ((typeof delay === 'undefined' ? 'undefined' : _typeof(delay)) === 'object') {
|
9518 | return isNaN(delay[key]) ? DEFAULT_DELAYS[key] : delay[key];
|
9519 | }
|
9520 | return delay;
|
9521 | }
|
9522 | }, {
|
9523 | key: 'getTetherConfig',
|
9524 | value: function getTetherConfig() {
|
9525 | var attachments = (0, _utils.getTetherAttachments)(this.props.placement);
|
9526 | return _extends({}, defaultTetherConfig, attachments, {
|
9527 | target: '#' + this.props.target
|
9528 | }, this.props.tether);
|
9529 | }
|
9530 | }, {
|
9531 | key: 'show',
|
9532 | value: function show() {
|
9533 | if (!this.props.isOpen) {
|
9534 | this.clearShowTimeout();
|
9535 | this.toggle();
|
9536 | }
|
9537 | }
|
9538 | }, {
|
9539 | key: 'hide',
|
9540 | value: function hide() {
|
9541 | if (this.props.isOpen) {
|
9542 | this.clearHideTimeout();
|
9543 | this.toggle();
|
9544 | }
|
9545 | }
|
9546 | }, {
|
9547 | key: 'clearShowTimeout',
|
9548 | value: function clearShowTimeout() {
|
9549 | clearTimeout(this._showTimeout);
|
9550 | this._showTimeout = undefined;
|
9551 | }
|
9552 | }, {
|
9553 | key: 'clearHideTimeout',
|
9554 | value: function clearHideTimeout() {
|
9555 | clearTimeout(this._hideTimeout);
|
9556 | this._hideTimeout = undefined;
|
9557 | }
|
9558 | }, {
|
9559 | key: 'handleDocumentClick',
|
9560 | value: function handleDocumentClick(e) {
|
9561 | if (e.target === this._target || this._target.contains(e.target)) {
|
9562 | if (this._hideTimeout) {
|
9563 | this.clearHideTimeout();
|
9564 | }
|
9565 |
|
9566 | if (!this.props.isOpen) {
|
9567 | this.toggle();
|
9568 | }
|
9569 | }
|
9570 | }
|
9571 | }, {
|
9572 | key: 'addTargetEvents',
|
9573 | value: function addTargetEvents() {
|
9574 | this._target.addEventListener('mouseover', this.onMouseOverTooltip, true);
|
9575 | this._target.addEventListener('mouseout', this.onMouseLeaveTooltip, true);
|
9576 | document.addEventListener('click', this.handleDocumentClick, true);
|
9577 | }
|
9578 | }, {
|
9579 | key: 'removeTargetEvents',
|
9580 | value: function removeTargetEvents() {
|
9581 | this._target.removeEventListener('mouseover', this.onMouseOverTooltip, true);
|
9582 | this._target.removeEventListener('mouseout', this.onMouseLeaveTooltip, true);
|
9583 | document.removeEventListener('click', this.handleDocumentClick, true);
|
9584 | }
|
9585 | }, {
|
9586 | key: 'toggle',
|
9587 | value: function toggle(e) {
|
9588 | if (this.props.disabled) {
|
9589 | return e && e.preventDefault();
|
9590 | }
|
9591 |
|
9592 | return this.props.toggle();
|
9593 | }
|
9594 | }, {
|
9595 | key: 'render',
|
9596 | value: function render() {
|
9597 | if (!this.props.isOpen) {
|
9598 | return null;
|
9599 | }
|
9600 |
|
9601 | var attributes = (0, _lodash2.default)(this.props, Object.keys(propTypes));
|
9602 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)('tooltip-inner', this.props.className), this.props.cssModule);
|
9603 |
|
9604 | var tetherConfig = this.getTetherConfig();
|
9605 |
|
9606 | return _react2.default.createElement(
|
9607 | _TetherContent2.default,
|
9608 | {
|
9609 | className: 'tooltip',
|
9610 | tether: tetherConfig,
|
9611 | tetherRef: this.props.tetherRef,
|
9612 | isOpen: this.props.isOpen,
|
9613 | toggle: this.toggle
|
9614 | },
|
9615 | _react2.default.createElement('div', _extends({}, attributes, {
|
9616 | className: classes,
|
9617 | onMouseOver: this.onMouseOverTooltipContent,
|
9618 | onMouseLeave: this.onMouseLeaveTooltipContent
|
9619 | }))
|
9620 | );
|
9621 | }
|
9622 | }]);
|
9623 |
|
9624 | return Tooltip;
|
9625 | }(_react2.default.Component);
|
9626 |
|
9627 | Tooltip.propTypes = propTypes;
|
9628 | Tooltip.defaultProps = defaultProps;
|
9629 |
|
9630 | exports.default = Tooltip;
|
9631 |
|
9632 | },
|
9633 |
|
9634 | function(module, exports, __webpack_require__) {
|
9635 |
|
9636 | 'use strict';
|
9637 |
|
9638 | |
9639 |
|
9640 |
|
9641 |
|
9642 |
|
9643 |
|
9644 |
|
9645 |
|
9646 |
|
9647 |
|
9648 |
|
9649 |
|
9650 |
|
9651 |
|
9652 |
|
9653 |
|
9654 |
|
9655 |
|
9656 | var emptyFunction = __webpack_require__(11);
|
9657 |
|
9658 | |
9659 |
|
9660 |
|
9661 |
|
9662 | var EventListener = {
|
9663 | |
9664 |
|
9665 |
|
9666 |
|
9667 |
|
9668 |
|
9669 |
|
9670 |
|
9671 | listen: function listen(target, eventType, callback) {
|
9672 | if (target.addEventListener) {
|
9673 | target.addEventListener(eventType, callback, false);
|
9674 | return {
|
9675 | remove: function remove() {
|
9676 | target.removeEventListener(eventType, callback, false);
|
9677 | }
|
9678 | };
|
9679 | } else if (target.attachEvent) {
|
9680 | target.attachEvent('on' + eventType, callback);
|
9681 | return {
|
9682 | remove: function remove() {
|
9683 | target.detachEvent('on' + eventType, callback);
|
9684 | }
|
9685 | };
|
9686 | }
|
9687 | },
|
9688 |
|
9689 | |
9690 |
|
9691 |
|
9692 |
|
9693 |
|
9694 |
|
9695 |
|
9696 |
|
9697 | capture: function capture(target, eventType, callback) {
|
9698 | if (target.addEventListener) {
|
9699 | target.addEventListener(eventType, callback, true);
|
9700 | return {
|
9701 | remove: function remove() {
|
9702 | target.removeEventListener(eventType, callback, true);
|
9703 | }
|
9704 | };
|
9705 | } else {
|
9706 | if (true) {
|
9707 | console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.');
|
9708 | }
|
9709 | return {
|
9710 | remove: emptyFunction
|
9711 | };
|
9712 | }
|
9713 | },
|
9714 |
|
9715 | registerDefault: function registerDefault() {}
|
9716 | };
|
9717 |
|
9718 | module.exports = EventListener;
|
9719 |
|
9720 | },
|
9721 |
|
9722 | function(module, exports) {
|
9723 |
|
9724 | |
9725 |
|
9726 |
|
9727 |
|
9728 |
|
9729 |
|
9730 |
|
9731 |
|
9732 |
|
9733 |
|
9734 | 'use strict';
|
9735 |
|
9736 | |
9737 |
|
9738 |
|
9739 |
|
9740 | function focusNode(node) {
|
9741 |
|
9742 |
|
9743 |
|
9744 | try {
|
9745 | node.focus();
|
9746 | } catch (e) {}
|
9747 | }
|
9748 |
|
9749 | module.exports = focusNode;
|
9750 |
|
9751 | },
|
9752 |
|
9753 | function(module, exports) {
|
9754 |
|
9755 | 'use strict';
|
9756 |
|
9757 | |
9758 |
|
9759 |
|
9760 |
|
9761 |
|
9762 |
|
9763 |
|
9764 |
|
9765 |
|
9766 |
|
9767 |
|
9768 |
|
9769 |
|
9770 | |
9771 |
|
9772 |
|
9773 |
|
9774 |
|
9775 |
|
9776 |
|
9777 | function getActiveElement() /*?DOMElement*/{
|
9778 | if (typeof document === 'undefined') {
|
9779 | return null;
|
9780 | }
|
9781 | try {
|
9782 | return document.activeElement || document.body;
|
9783 | } catch (e) {
|
9784 | return document.body;
|
9785 | }
|
9786 | }
|
9787 |
|
9788 | module.exports = getActiveElement;
|
9789 |
|
9790 | },
|
9791 |
|
9792 | function(module, exports) {
|
9793 |
|
9794 | |
9795 |
|
9796 |
|
9797 |
|
9798 |
|
9799 |
|
9800 |
|
9801 |
|
9802 |
|
9803 |
|
9804 | 'use strict';
|
9805 |
|
9806 | |
9807 |
|
9808 |
|
9809 |
|
9810 | var isUnitlessNumber = {
|
9811 | animationIterationCount: true,
|
9812 | borderImageOutset: true,
|
9813 | borderImageSlice: true,
|
9814 | borderImageWidth: true,
|
9815 | boxFlex: true,
|
9816 | boxFlexGroup: true,
|
9817 | boxOrdinalGroup: true,
|
9818 | columnCount: true,
|
9819 | flex: true,
|
9820 | flexGrow: true,
|
9821 | flexPositive: true,
|
9822 | flexShrink: true,
|
9823 | flexNegative: true,
|
9824 | flexOrder: true,
|
9825 | gridRow: true,
|
9826 | gridColumn: true,
|
9827 | fontWeight: true,
|
9828 | lineClamp: true,
|
9829 | lineHeight: true,
|
9830 | opacity: true,
|
9831 | order: true,
|
9832 | orphans: true,
|
9833 | tabSize: true,
|
9834 | widows: true,
|
9835 | zIndex: true,
|
9836 | zoom: true,
|
9837 |
|
9838 |
|
9839 | fillOpacity: true,
|
9840 | floodOpacity: true,
|
9841 | stopOpacity: true,
|
9842 | strokeDasharray: true,
|
9843 | strokeDashoffset: true,
|
9844 | strokeMiterlimit: true,
|
9845 | strokeOpacity: true,
|
9846 | strokeWidth: true
|
9847 | };
|
9848 |
|
9849 | |
9850 |
|
9851 |
|
9852 |
|
9853 |
|
9854 |
|
9855 | function prefixKey(prefix, key) {
|
9856 | return prefix + key.charAt(0).toUpperCase() + key.substring(1);
|
9857 | }
|
9858 |
|
9859 | |
9860 |
|
9861 |
|
9862 |
|
9863 | var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
|
9864 |
|
9865 |
|
9866 |
|
9867 | Object.keys(isUnitlessNumber).forEach(function (prop) {
|
9868 | prefixes.forEach(function (prefix) {
|
9869 | isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
|
9870 | });
|
9871 | });
|
9872 |
|
9873 | |
9874 |
|
9875 |
|
9876 |
|
9877 |
|
9878 |
|
9879 |
|
9880 |
|
9881 |
|
9882 | var shorthandPropertyExpansions = {
|
9883 | background: {
|
9884 | backgroundAttachment: true,
|
9885 | backgroundColor: true,
|
9886 | backgroundImage: true,
|
9887 | backgroundPositionX: true,
|
9888 | backgroundPositionY: true,
|
9889 | backgroundRepeat: true
|
9890 | },
|
9891 | backgroundPosition: {
|
9892 | backgroundPositionX: true,
|
9893 | backgroundPositionY: true
|
9894 | },
|
9895 | border: {
|
9896 | borderWidth: true,
|
9897 | borderStyle: true,
|
9898 | borderColor: true
|
9899 | },
|
9900 | borderBottom: {
|
9901 | borderBottomWidth: true,
|
9902 | borderBottomStyle: true,
|
9903 | borderBottomColor: true
|
9904 | },
|
9905 | borderLeft: {
|
9906 | borderLeftWidth: true,
|
9907 | borderLeftStyle: true,
|
9908 | borderLeftColor: true
|
9909 | },
|
9910 | borderRight: {
|
9911 | borderRightWidth: true,
|
9912 | borderRightStyle: true,
|
9913 | borderRightColor: true
|
9914 | },
|
9915 | borderTop: {
|
9916 | borderTopWidth: true,
|
9917 | borderTopStyle: true,
|
9918 | borderTopColor: true
|
9919 | },
|
9920 | font: {
|
9921 | fontStyle: true,
|
9922 | fontVariant: true,
|
9923 | fontWeight: true,
|
9924 | fontSize: true,
|
9925 | lineHeight: true,
|
9926 | fontFamily: true
|
9927 | },
|
9928 | outline: {
|
9929 | outlineWidth: true,
|
9930 | outlineStyle: true,
|
9931 | outlineColor: true
|
9932 | }
|
9933 | };
|
9934 |
|
9935 | var CSSProperty = {
|
9936 | isUnitlessNumber: isUnitlessNumber,
|
9937 | shorthandPropertyExpansions: shorthandPropertyExpansions
|
9938 | };
|
9939 |
|
9940 | module.exports = CSSProperty;
|
9941 |
|
9942 | },
|
9943 |
|
9944 | function(module, exports, __webpack_require__) {
|
9945 |
|
9946 | |
9947 |
|
9948 |
|
9949 |
|
9950 |
|
9951 |
|
9952 |
|
9953 |
|
9954 |
|
9955 |
|
9956 |
|
9957 | 'use strict';
|
9958 |
|
9959 | var _prodInvariant = __webpack_require__(6);
|
9960 |
|
9961 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9962 |
|
9963 | var PooledClass = __webpack_require__(19);
|
9964 |
|
9965 | var invariant = __webpack_require__(4);
|
9966 |
|
9967 | |
9968 |
|
9969 |
|
9970 |
|
9971 |
|
9972 |
|
9973 |
|
9974 |
|
9975 |
|
9976 |
|
9977 |
|
9978 |
|
9979 | var CallbackQueue = function () {
|
9980 | function CallbackQueue(arg) {
|
9981 | _classCallCheck(this, CallbackQueue);
|
9982 |
|
9983 | this._callbacks = null;
|
9984 | this._contexts = null;
|
9985 | this._arg = arg;
|
9986 | }
|
9987 |
|
9988 | |
9989 |
|
9990 |
|
9991 |
|
9992 |
|
9993 |
|
9994 |
|
9995 |
|
9996 |
|
9997 | CallbackQueue.prototype.enqueue = function enqueue(callback, context) {
|
9998 | this._callbacks = this._callbacks || [];
|
9999 | this._callbacks.push(callback);
|
10000 | this._contexts = this._contexts || [];
|
10001 | this._contexts.push(context);
|
10002 | };
|
10003 |
|
10004 | |
10005 |
|
10006 |
|
10007 |
|
10008 |
|
10009 |
|
10010 |
|
10011 |
|
10012 | CallbackQueue.prototype.notifyAll = function notifyAll() {
|
10013 | var callbacks = this._callbacks;
|
10014 | var contexts = this._contexts;
|
10015 | var arg = this._arg;
|
10016 | if (callbacks && contexts) {
|
10017 | !(callbacks.length === contexts.length) ? true ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
|
10018 | this._callbacks = null;
|
10019 | this._contexts = null;
|
10020 | for (var i = 0; i < callbacks.length; i++) {
|
10021 | callbacks[i].call(contexts[i], arg);
|
10022 | }
|
10023 | callbacks.length = 0;
|
10024 | contexts.length = 0;
|
10025 | }
|
10026 | };
|
10027 |
|
10028 | CallbackQueue.prototype.checkpoint = function checkpoint() {
|
10029 | return this._callbacks ? this._callbacks.length : 0;
|
10030 | };
|
10031 |
|
10032 | CallbackQueue.prototype.rollback = function rollback(len) {
|
10033 | if (this._callbacks && this._contexts) {
|
10034 | this._callbacks.length = len;
|
10035 | this._contexts.length = len;
|
10036 | }
|
10037 | };
|
10038 |
|
10039 | |
10040 |
|
10041 |
|
10042 |
|
10043 |
|
10044 |
|
10045 |
|
10046 | CallbackQueue.prototype.reset = function reset() {
|
10047 | this._callbacks = null;
|
10048 | this._contexts = null;
|
10049 | };
|
10050 |
|
10051 | |
10052 |
|
10053 |
|
10054 |
|
10055 |
|
10056 | CallbackQueue.prototype.destructor = function destructor() {
|
10057 | this.reset();
|
10058 | };
|
10059 |
|
10060 | return CallbackQueue;
|
10061 | }();
|
10062 |
|
10063 | module.exports = PooledClass.addPoolingTo(CallbackQueue);
|
10064 |
|
10065 | },
|
10066 |
|
10067 | function(module, exports, __webpack_require__) {
|
10068 |
|
10069 | |
10070 |
|
10071 |
|
10072 |
|
10073 |
|
10074 |
|
10075 |
|
10076 |
|
10077 |
|
10078 |
|
10079 | 'use strict';
|
10080 |
|
10081 | var DOMProperty = __webpack_require__(17);
|
10082 | var ReactDOMComponentTree = __webpack_require__(8);
|
10083 | var ReactInstrumentation = __webpack_require__(12);
|
10084 |
|
10085 | var quoteAttributeValueForBrowser = __webpack_require__(251);
|
10086 | var warning = __webpack_require__(5);
|
10087 |
|
10088 | var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
|
10089 | var illegalAttributeNameCache = {};
|
10090 | var validatedAttributeNameCache = {};
|
10091 |
|
10092 | function isAttributeNameSafe(attributeName) {
|
10093 | if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
|
10094 | return true;
|
10095 | }
|
10096 | if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
|
10097 | return false;
|
10098 | }
|
10099 | if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
|
10100 | validatedAttributeNameCache[attributeName] = true;
|
10101 | return true;
|
10102 | }
|
10103 | illegalAttributeNameCache[attributeName] = true;
|
10104 | true ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;
|
10105 | return false;
|
10106 | }
|
10107 |
|
10108 | function shouldIgnoreValue(propertyInfo, value) {
|
10109 | return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
|
10110 | }
|
10111 |
|
10112 | |
10113 |
|
10114 |
|
10115 | var DOMPropertyOperations = {
|
10116 |
|
10117 | |
10118 |
|
10119 |
|
10120 |
|
10121 |
|
10122 |
|
10123 | createMarkupForID: function (id) {
|
10124 | return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
|
10125 | },
|
10126 |
|
10127 | setAttributeForID: function (node, id) {
|
10128 | node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
|
10129 | },
|
10130 |
|
10131 | createMarkupForRoot: function () {
|
10132 | return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
|
10133 | },
|
10134 |
|
10135 | setAttributeForRoot: function (node) {
|
10136 | node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');
|
10137 | },
|
10138 |
|
10139 | |
10140 |
|
10141 |
|
10142 |
|
10143 |
|
10144 |
|
10145 |
|
10146 | createMarkupForProperty: function (name, value) {
|
10147 | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
|
10148 | if (propertyInfo) {
|
10149 | if (shouldIgnoreValue(propertyInfo, value)) {
|
10150 | return '';
|
10151 | }
|
10152 | var attributeName = propertyInfo.attributeName;
|
10153 | if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
|
10154 | return attributeName + '=""';
|
10155 | }
|
10156 | return attributeName + '=' + quoteAttributeValueForBrowser(value);
|
10157 | } else if (DOMProperty.isCustomAttribute(name)) {
|
10158 | if (value == null) {
|
10159 | return '';
|
10160 | }
|
10161 | return name + '=' + quoteAttributeValueForBrowser(value);
|
10162 | }
|
10163 | return null;
|
10164 | },
|
10165 |
|
10166 | |
10167 |
|
10168 |
|
10169 |
|
10170 |
|
10171 |
|
10172 |
|
10173 | createMarkupForCustomAttribute: function (name, value) {
|
10174 | if (!isAttributeNameSafe(name) || value == null) {
|
10175 | return '';
|
10176 | }
|
10177 | return name + '=' + quoteAttributeValueForBrowser(value);
|
10178 | },
|
10179 |
|
10180 | |
10181 |
|
10182 |
|
10183 |
|
10184 |
|
10185 |
|
10186 |
|
10187 | setValueForProperty: function (node, name, value) {
|
10188 | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
|
10189 | if (propertyInfo) {
|
10190 | var mutationMethod = propertyInfo.mutationMethod;
|
10191 | if (mutationMethod) {
|
10192 | mutationMethod(node, value);
|
10193 | } else if (shouldIgnoreValue(propertyInfo, value)) {
|
10194 | this.deleteValueForProperty(node, name);
|
10195 | return;
|
10196 | } else if (propertyInfo.mustUseProperty) {
|
10197 |
|
10198 |
|
10199 | node[propertyInfo.propertyName] = value;
|
10200 | } else {
|
10201 | var attributeName = propertyInfo.attributeName;
|
10202 | var namespace = propertyInfo.attributeNamespace;
|
10203 |
|
10204 |
|
10205 | if (namespace) {
|
10206 | node.setAttributeNS(namespace, attributeName, '' + value);
|
10207 | } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
|
10208 | node.setAttribute(attributeName, '');
|
10209 | } else {
|
10210 | node.setAttribute(attributeName, '' + value);
|
10211 | }
|
10212 | }
|
10213 | } else if (DOMProperty.isCustomAttribute(name)) {
|
10214 | DOMPropertyOperations.setValueForAttribute(node, name, value);
|
10215 | return;
|
10216 | }
|
10217 |
|
10218 | if (true) {
|
10219 | var payload = {};
|
10220 | payload[name] = value;
|
10221 | ReactInstrumentation.debugTool.onHostOperation({
|
10222 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
10223 | type: 'update attribute',
|
10224 | payload: payload
|
10225 | });
|
10226 | }
|
10227 | },
|
10228 |
|
10229 | setValueForAttribute: function (node, name, value) {
|
10230 | if (!isAttributeNameSafe(name)) {
|
10231 | return;
|
10232 | }
|
10233 | if (value == null) {
|
10234 | node.removeAttribute(name);
|
10235 | } else {
|
10236 | node.setAttribute(name, '' + value);
|
10237 | }
|
10238 |
|
10239 | if (true) {
|
10240 | var payload = {};
|
10241 | payload[name] = value;
|
10242 | ReactInstrumentation.debugTool.onHostOperation({
|
10243 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
10244 | type: 'update attribute',
|
10245 | payload: payload
|
10246 | });
|
10247 | }
|
10248 | },
|
10249 |
|
10250 | |
10251 |
|
10252 |
|
10253 |
|
10254 |
|
10255 |
|
10256 | deleteValueForAttribute: function (node, name) {
|
10257 | node.removeAttribute(name);
|
10258 | if (true) {
|
10259 | ReactInstrumentation.debugTool.onHostOperation({
|
10260 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
10261 | type: 'remove attribute',
|
10262 | payload: name
|
10263 | });
|
10264 | }
|
10265 | },
|
10266 |
|
10267 | |
10268 |
|
10269 |
|
10270 |
|
10271 |
|
10272 |
|
10273 | deleteValueForProperty: function (node, name) {
|
10274 | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
|
10275 | if (propertyInfo) {
|
10276 | var mutationMethod = propertyInfo.mutationMethod;
|
10277 | if (mutationMethod) {
|
10278 | mutationMethod(node, undefined);
|
10279 | } else if (propertyInfo.mustUseProperty) {
|
10280 | var propName = propertyInfo.propertyName;
|
10281 | if (propertyInfo.hasBooleanValue) {
|
10282 | node[propName] = false;
|
10283 | } else {
|
10284 | node[propName] = '';
|
10285 | }
|
10286 | } else {
|
10287 | node.removeAttribute(propertyInfo.attributeName);
|
10288 | }
|
10289 | } else if (DOMProperty.isCustomAttribute(name)) {
|
10290 | node.removeAttribute(name);
|
10291 | }
|
10292 |
|
10293 | if (true) {
|
10294 | ReactInstrumentation.debugTool.onHostOperation({
|
10295 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
10296 | type: 'remove attribute',
|
10297 | payload: name
|
10298 | });
|
10299 | }
|
10300 | }
|
10301 |
|
10302 | };
|
10303 |
|
10304 | module.exports = DOMPropertyOperations;
|
10305 |
|
10306 | },
|
10307 |
|
10308 | function(module, exports, __webpack_require__) {
|
10309 |
|
10310 | |
10311 |
|
10312 |
|
10313 |
|
10314 |
|
10315 |
|
10316 |
|
10317 |
|
10318 |
|
10319 |
|
10320 | 'use strict';
|
10321 |
|
10322 | var _prodInvariant = __webpack_require__(6),
|
10323 | _assign = __webpack_require__(7);
|
10324 |
|
10325 | var React = __webpack_require__(15);
|
10326 | var ReactComponentEnvironment = __webpack_require__(45);
|
10327 | var ReactCurrentOwner = __webpack_require__(16);
|
10328 | var ReactErrorUtils = __webpack_require__(46);
|
10329 | var ReactInstanceMap = __webpack_require__(20);
|
10330 | var ReactInstrumentation = __webpack_require__(12);
|
10331 | var ReactNodeTypes = __webpack_require__(84);
|
10332 | var ReactReconciler = __webpack_require__(21);
|
10333 |
|
10334 | if (true) {
|
10335 | var checkReactTypeSpec = __webpack_require__(245);
|
10336 | }
|
10337 |
|
10338 | var emptyObject = __webpack_require__(24);
|
10339 | var invariant = __webpack_require__(4);
|
10340 | var shallowEqual = __webpack_require__(39);
|
10341 | var shouldUpdateReactComponent = __webpack_require__(53);
|
10342 | var warning = __webpack_require__(5);
|
10343 |
|
10344 | var CompositeTypes = {
|
10345 | ImpureClass: 0,
|
10346 | PureClass: 1,
|
10347 | StatelessFunctional: 2
|
10348 | };
|
10349 |
|
10350 | function StatelessComponent(Component) {}
|
10351 | StatelessComponent.prototype.render = function () {
|
10352 | var Component = ReactInstanceMap.get(this)._currentElement.type;
|
10353 | var element = Component(this.props, this.context, this.updater);
|
10354 | warnIfInvalidElement(Component, element);
|
10355 | return element;
|
10356 | };
|
10357 |
|
10358 | function warnIfInvalidElement(Component, element) {
|
10359 | if (true) {
|
10360 | true ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0;
|
10361 | true ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;
|
10362 | }
|
10363 | }
|
10364 |
|
10365 | function shouldConstruct(Component) {
|
10366 | return !!(Component.prototype && Component.prototype.isReactComponent);
|
10367 | }
|
10368 |
|
10369 | function isPureComponent(Component) {
|
10370 | return !!(Component.prototype && Component.prototype.isPureReactComponent);
|
10371 | }
|
10372 |
|
10373 |
|
10374 | function measureLifeCyclePerf(fn, debugID, timerType) {
|
10375 | if (debugID === 0) {
|
10376 |
|
10377 |
|
10378 |
|
10379 | return fn();
|
10380 | }
|
10381 |
|
10382 | ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
|
10383 | try {
|
10384 | return fn();
|
10385 | } finally {
|
10386 | ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
|
10387 | }
|
10388 | }
|
10389 |
|
10390 | |
10391 |
|
10392 |
|
10393 |
|
10394 |
|
10395 |
|
10396 |
|
10397 |
|
10398 |
|
10399 |
|
10400 |
|
10401 |
|
10402 |
|
10403 |
|
10404 |
|
10405 |
|
10406 |
|
10407 |
|
10408 |
|
10409 |
|
10410 |
|
10411 |
|
10412 |
|
10413 |
|
10414 |
|
10415 |
|
10416 |
|
10417 | |
10418 |
|
10419 |
|
10420 |
|
10421 |
|
10422 |
|
10423 | var nextMountID = 1;
|
10424 |
|
10425 | |
10426 |
|
10427 |
|
10428 | var ReactCompositeComponent = {
|
10429 |
|
10430 | |
10431 |
|
10432 |
|
10433 |
|
10434 |
|
10435 |
|
10436 |
|
10437 | construct: function (element) {
|
10438 | this._currentElement = element;
|
10439 | this._rootNodeID = 0;
|
10440 | this._compositeType = null;
|
10441 | this._instance = null;
|
10442 | this._hostParent = null;
|
10443 | this._hostContainerInfo = null;
|
10444 |
|
10445 |
|
10446 | this._updateBatchNumber = null;
|
10447 | this._pendingElement = null;
|
10448 | this._pendingStateQueue = null;
|
10449 | this._pendingReplaceState = false;
|
10450 | this._pendingForceUpdate = false;
|
10451 |
|
10452 | this._renderedNodeType = null;
|
10453 | this._renderedComponent = null;
|
10454 | this._context = null;
|
10455 | this._mountOrder = 0;
|
10456 | this._topLevelWrapper = null;
|
10457 |
|
10458 |
|
10459 | this._pendingCallbacks = null;
|
10460 |
|
10461 |
|
10462 | this._calledComponentWillUnmount = false;
|
10463 |
|
10464 | if (true) {
|
10465 | this._warnedAboutRefsInRender = false;
|
10466 | }
|
10467 | },
|
10468 |
|
10469 | |
10470 |
|
10471 |
|
10472 |
|
10473 |
|
10474 |
|
10475 |
|
10476 |
|
10477 |
|
10478 |
|
10479 |
|
10480 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
10481 | var _this = this;
|
10482 |
|
10483 | this._context = context;
|
10484 | this._mountOrder = nextMountID++;
|
10485 | this._hostParent = hostParent;
|
10486 | this._hostContainerInfo = hostContainerInfo;
|
10487 |
|
10488 | var publicProps = this._currentElement.props;
|
10489 | var publicContext = this._processContext(context);
|
10490 |
|
10491 | var Component = this._currentElement.type;
|
10492 |
|
10493 | var updateQueue = transaction.getUpdateQueue();
|
10494 |
|
10495 |
|
10496 | var doConstruct = shouldConstruct(Component);
|
10497 | var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);
|
10498 | var renderedElement;
|
10499 |
|
10500 |
|
10501 | if (!doConstruct && (inst == null || inst.render == null)) {
|
10502 | renderedElement = inst;
|
10503 | warnIfInvalidElement(Component, renderedElement);
|
10504 | !(inst === null || inst === false || React.isValidElement(inst)) ? true ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0;
|
10505 | inst = new StatelessComponent(Component);
|
10506 | this._compositeType = CompositeTypes.StatelessFunctional;
|
10507 | } else {
|
10508 | if (isPureComponent(Component)) {
|
10509 | this._compositeType = CompositeTypes.PureClass;
|
10510 | } else {
|
10511 | this._compositeType = CompositeTypes.ImpureClass;
|
10512 | }
|
10513 | }
|
10514 |
|
10515 | if (true) {
|
10516 |
|
10517 |
|
10518 | if (inst.render == null) {
|
10519 | true ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0;
|
10520 | }
|
10521 |
|
10522 | var propsMutated = inst.props !== publicProps;
|
10523 | var componentName = Component.displayName || Component.name || 'Component';
|
10524 |
|
10525 | true ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\'s constructor was passed.', componentName, componentName) : void 0;
|
10526 | }
|
10527 |
|
10528 |
|
10529 |
|
10530 | inst.props = publicProps;
|
10531 | inst.context = publicContext;
|
10532 | inst.refs = emptyObject;
|
10533 | inst.updater = updateQueue;
|
10534 |
|
10535 | this._instance = inst;
|
10536 |
|
10537 |
|
10538 | ReactInstanceMap.set(inst, this);
|
10539 |
|
10540 | if (true) {
|
10541 |
|
10542 |
|
10543 |
|
10544 | true ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;
|
10545 | true ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0;
|
10546 | true ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0;
|
10547 | true ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0;
|
10548 | true ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0;
|
10549 | true ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0;
|
10550 | true ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;
|
10551 | }
|
10552 |
|
10553 | var initialState = inst.state;
|
10554 | if (initialState === undefined) {
|
10555 | inst.state = initialState = null;
|
10556 | }
|
10557 | !(typeof initialState === 'object' && !Array.isArray(initialState)) ? true ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0;
|
10558 |
|
10559 | this._pendingStateQueue = null;
|
10560 | this._pendingReplaceState = false;
|
10561 | this._pendingForceUpdate = false;
|
10562 |
|
10563 | var markup;
|
10564 | if (inst.unstable_handleError) {
|
10565 | markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
10566 | } else {
|
10567 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
10568 | }
|
10569 |
|
10570 | if (inst.componentDidMount) {
|
10571 | if (true) {
|
10572 | transaction.getReactMountReady().enqueue(function () {
|
10573 | measureLifeCyclePerf(function () {
|
10574 | return inst.componentDidMount();
|
10575 | }, _this._debugID, 'componentDidMount');
|
10576 | });
|
10577 | } else {
|
10578 | transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
|
10579 | }
|
10580 | }
|
10581 |
|
10582 | return markup;
|
10583 | },
|
10584 |
|
10585 | _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {
|
10586 | if (true) {
|
10587 | ReactCurrentOwner.current = this;
|
10588 | try {
|
10589 | return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
|
10590 | } finally {
|
10591 | ReactCurrentOwner.current = null;
|
10592 | }
|
10593 | } else {
|
10594 | return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
|
10595 | }
|
10596 | },
|
10597 |
|
10598 | _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
|
10599 | var Component = this._currentElement.type;
|
10600 |
|
10601 | if (doConstruct) {
|
10602 | if (true) {
|
10603 | return measureLifeCyclePerf(function () {
|
10604 | return new Component(publicProps, publicContext, updateQueue);
|
10605 | }, this._debugID, 'ctor');
|
10606 | } else {
|
10607 | return new Component(publicProps, publicContext, updateQueue);
|
10608 | }
|
10609 | }
|
10610 |
|
10611 |
|
10612 |
|
10613 | if (true) {
|
10614 | return measureLifeCyclePerf(function () {
|
10615 | return Component(publicProps, publicContext, updateQueue);
|
10616 | }, this._debugID, 'render');
|
10617 | } else {
|
10618 | return Component(publicProps, publicContext, updateQueue);
|
10619 | }
|
10620 | },
|
10621 |
|
10622 | performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
|
10623 | var markup;
|
10624 | var checkpoint = transaction.checkpoint();
|
10625 | try {
|
10626 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
10627 | } catch (e) {
|
10628 |
|
10629 | transaction.rollback(checkpoint);
|
10630 | this._instance.unstable_handleError(e);
|
10631 | if (this._pendingStateQueue) {
|
10632 | this._instance.state = this._processPendingState(this._instance.props, this._instance.context);
|
10633 | }
|
10634 | checkpoint = transaction.checkpoint();
|
10635 |
|
10636 | this._renderedComponent.unmountComponent(true);
|
10637 | transaction.rollback(checkpoint);
|
10638 |
|
10639 |
|
10640 |
|
10641 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
10642 | }
|
10643 | return markup;
|
10644 | },
|
10645 |
|
10646 | performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
|
10647 | var inst = this._instance;
|
10648 |
|
10649 | var debugID = 0;
|
10650 | if (true) {
|
10651 | debugID = this._debugID;
|
10652 | }
|
10653 |
|
10654 | if (inst.componentWillMount) {
|
10655 | if (true) {
|
10656 | measureLifeCyclePerf(function () {
|
10657 | return inst.componentWillMount();
|
10658 | }, debugID, 'componentWillMount');
|
10659 | } else {
|
10660 | inst.componentWillMount();
|
10661 | }
|
10662 |
|
10663 |
|
10664 | if (this._pendingStateQueue) {
|
10665 | inst.state = this._processPendingState(inst.props, inst.context);
|
10666 | }
|
10667 | }
|
10668 |
|
10669 |
|
10670 | if (renderedElement === undefined) {
|
10671 | renderedElement = this._renderValidatedComponent();
|
10672 | }
|
10673 |
|
10674 | var nodeType = ReactNodeTypes.getType(renderedElement);
|
10675 | this._renderedNodeType = nodeType;
|
10676 | var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY
|
10677 | );
|
10678 | this._renderedComponent = child;
|
10679 |
|
10680 | var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
|
10681 |
|
10682 | if (true) {
|
10683 | if (debugID !== 0) {
|
10684 | var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
|
10685 | ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
|
10686 | }
|
10687 | }
|
10688 |
|
10689 | return markup;
|
10690 | },
|
10691 |
|
10692 | getHostNode: function () {
|
10693 | return ReactReconciler.getHostNode(this._renderedComponent);
|
10694 | },
|
10695 |
|
10696 | |
10697 |
|
10698 |
|
10699 |
|
10700 |
|
10701 |
|
10702 | unmountComponent: function (safely) {
|
10703 | if (!this._renderedComponent) {
|
10704 | return;
|
10705 | }
|
10706 |
|
10707 | var inst = this._instance;
|
10708 |
|
10709 | if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
|
10710 | inst._calledComponentWillUnmount = true;
|
10711 |
|
10712 | if (safely) {
|
10713 | var name = this.getName() + '.componentWillUnmount()';
|
10714 | ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
|
10715 | } else {
|
10716 | if (true) {
|
10717 | measureLifeCyclePerf(function () {
|
10718 | return inst.componentWillUnmount();
|
10719 | }, this._debugID, 'componentWillUnmount');
|
10720 | } else {
|
10721 | inst.componentWillUnmount();
|
10722 | }
|
10723 | }
|
10724 | }
|
10725 |
|
10726 | if (this._renderedComponent) {
|
10727 | ReactReconciler.unmountComponent(this._renderedComponent, safely);
|
10728 | this._renderedNodeType = null;
|
10729 | this._renderedComponent = null;
|
10730 | this._instance = null;
|
10731 | }
|
10732 |
|
10733 |
|
10734 |
|
10735 |
|
10736 | this._pendingStateQueue = null;
|
10737 | this._pendingReplaceState = false;
|
10738 | this._pendingForceUpdate = false;
|
10739 | this._pendingCallbacks = null;
|
10740 | this._pendingElement = null;
|
10741 |
|
10742 |
|
10743 |
|
10744 | this._context = null;
|
10745 | this._rootNodeID = 0;
|
10746 | this._topLevelWrapper = null;
|
10747 |
|
10748 |
|
10749 |
|
10750 |
|
10751 | ReactInstanceMap.remove(inst);
|
10752 |
|
10753 |
|
10754 |
|
10755 |
|
10756 |
|
10757 |
|
10758 | },
|
10759 |
|
10760 | |
10761 |
|
10762 |
|
10763 |
|
10764 |
|
10765 |
|
10766 |
|
10767 |
|
10768 | _maskContext: function (context) {
|
10769 | var Component = this._currentElement.type;
|
10770 | var contextTypes = Component.contextTypes;
|
10771 | if (!contextTypes) {
|
10772 | return emptyObject;
|
10773 | }
|
10774 | var maskedContext = {};
|
10775 | for (var contextName in contextTypes) {
|
10776 | maskedContext[contextName] = context[contextName];
|
10777 | }
|
10778 | return maskedContext;
|
10779 | },
|
10780 |
|
10781 | |
10782 |
|
10783 |
|
10784 |
|
10785 |
|
10786 |
|
10787 |
|
10788 |
|
10789 | _processContext: function (context) {
|
10790 | var maskedContext = this._maskContext(context);
|
10791 | if (true) {
|
10792 | var Component = this._currentElement.type;
|
10793 | if (Component.contextTypes) {
|
10794 | this._checkContextTypes(Component.contextTypes, maskedContext, 'context');
|
10795 | }
|
10796 | }
|
10797 | return maskedContext;
|
10798 | },
|
10799 |
|
10800 | |
10801 |
|
10802 |
|
10803 |
|
10804 |
|
10805 | _processChildContext: function (currentContext) {
|
10806 | var Component = this._currentElement.type;
|
10807 | var inst = this._instance;
|
10808 | var childContext;
|
10809 |
|
10810 | if (inst.getChildContext) {
|
10811 | if (true) {
|
10812 | ReactInstrumentation.debugTool.onBeginProcessingChildContext();
|
10813 | try {
|
10814 | childContext = inst.getChildContext();
|
10815 | } finally {
|
10816 | ReactInstrumentation.debugTool.onEndProcessingChildContext();
|
10817 | }
|
10818 | } else {
|
10819 | childContext = inst.getChildContext();
|
10820 | }
|
10821 | }
|
10822 |
|
10823 | if (childContext) {
|
10824 | !(typeof Component.childContextTypes === 'object') ? true ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;
|
10825 | if (true) {
|
10826 | this._checkContextTypes(Component.childContextTypes, childContext, 'childContext');
|
10827 | }
|
10828 | for (var name in childContext) {
|
10829 | !(name in Component.childContextTypes) ? true ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0;
|
10830 | }
|
10831 | return _assign({}, currentContext, childContext);
|
10832 | }
|
10833 | return currentContext;
|
10834 | },
|
10835 |
|
10836 | |
10837 |
|
10838 |
|
10839 |
|
10840 |
|
10841 |
|
10842 |
|
10843 |
|
10844 | _checkContextTypes: function (typeSpecs, values, location) {
|
10845 | if (true) {
|
10846 | checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);
|
10847 | }
|
10848 | },
|
10849 |
|
10850 | receiveComponent: function (nextElement, transaction, nextContext) {
|
10851 | var prevElement = this._currentElement;
|
10852 | var prevContext = this._context;
|
10853 |
|
10854 | this._pendingElement = null;
|
10855 |
|
10856 | this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
|
10857 | },
|
10858 |
|
10859 | |
10860 |
|
10861 |
|
10862 |
|
10863 |
|
10864 |
|
10865 |
|
10866 | performUpdateIfNecessary: function (transaction) {
|
10867 | if (this._pendingElement != null) {
|
10868 | ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);
|
10869 | } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
|
10870 | this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);
|
10871 | } else {
|
10872 | this._updateBatchNumber = null;
|
10873 | }
|
10874 | },
|
10875 |
|
10876 | |
10877 |
|
10878 |
|
10879 |
|
10880 |
|
10881 |
|
10882 |
|
10883 |
|
10884 |
|
10885 |
|
10886 |
|
10887 |
|
10888 |
|
10889 |
|
10890 |
|
10891 | updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
|
10892 | var inst = this._instance;
|
10893 | !(inst != null) ? true ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0;
|
10894 |
|
10895 | var willReceive = false;
|
10896 | var nextContext;
|
10897 |
|
10898 |
|
10899 | if (this._context === nextUnmaskedContext) {
|
10900 | nextContext = inst.context;
|
10901 | } else {
|
10902 | nextContext = this._processContext(nextUnmaskedContext);
|
10903 | willReceive = true;
|
10904 | }
|
10905 |
|
10906 | var prevProps = prevParentElement.props;
|
10907 | var nextProps = nextParentElement.props;
|
10908 |
|
10909 |
|
10910 | if (prevParentElement !== nextParentElement) {
|
10911 | willReceive = true;
|
10912 | }
|
10913 |
|
10914 |
|
10915 |
|
10916 |
|
10917 | if (willReceive && inst.componentWillReceiveProps) {
|
10918 | if (true) {
|
10919 | measureLifeCyclePerf(function () {
|
10920 | return inst.componentWillReceiveProps(nextProps, nextContext);
|
10921 | }, this._debugID, 'componentWillReceiveProps');
|
10922 | } else {
|
10923 | inst.componentWillReceiveProps(nextProps, nextContext);
|
10924 | }
|
10925 | }
|
10926 |
|
10927 | var nextState = this._processPendingState(nextProps, nextContext);
|
10928 | var shouldUpdate = true;
|
10929 |
|
10930 | if (!this._pendingForceUpdate) {
|
10931 | if (inst.shouldComponentUpdate) {
|
10932 | if (true) {
|
10933 | shouldUpdate = measureLifeCyclePerf(function () {
|
10934 | return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
|
10935 | }, this._debugID, 'shouldComponentUpdate');
|
10936 | } else {
|
10937 | shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
|
10938 | }
|
10939 | } else {
|
10940 | if (this._compositeType === CompositeTypes.PureClass) {
|
10941 | shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);
|
10942 | }
|
10943 | }
|
10944 | }
|
10945 |
|
10946 | if (true) {
|
10947 | true ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0;
|
10948 | }
|
10949 |
|
10950 | this._updateBatchNumber = null;
|
10951 | if (shouldUpdate) {
|
10952 | this._pendingForceUpdate = false;
|
10953 |
|
10954 | this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);
|
10955 | } else {
|
10956 |
|
10957 |
|
10958 | this._currentElement = nextParentElement;
|
10959 | this._context = nextUnmaskedContext;
|
10960 | inst.props = nextProps;
|
10961 | inst.state = nextState;
|
10962 | inst.context = nextContext;
|
10963 | }
|
10964 | },
|
10965 |
|
10966 | _processPendingState: function (props, context) {
|
10967 | var inst = this._instance;
|
10968 | var queue = this._pendingStateQueue;
|
10969 | var replace = this._pendingReplaceState;
|
10970 | this._pendingReplaceState = false;
|
10971 | this._pendingStateQueue = null;
|
10972 |
|
10973 | if (!queue) {
|
10974 | return inst.state;
|
10975 | }
|
10976 |
|
10977 | if (replace && queue.length === 1) {
|
10978 | return queue[0];
|
10979 | }
|
10980 |
|
10981 | var nextState = _assign({}, replace ? queue[0] : inst.state);
|
10982 | for (var i = replace ? 1 : 0; i < queue.length; i++) {
|
10983 | var partial = queue[i];
|
10984 | _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
|
10985 | }
|
10986 |
|
10987 | return nextState;
|
10988 | },
|
10989 |
|
10990 | |
10991 |
|
10992 |
|
10993 |
|
10994 |
|
10995 |
|
10996 |
|
10997 |
|
10998 |
|
10999 |
|
11000 |
|
11001 |
|
11002 | _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
|
11003 | var _this2 = this;
|
11004 |
|
11005 | var inst = this._instance;
|
11006 |
|
11007 | var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
|
11008 | var prevProps;
|
11009 | var prevState;
|
11010 | var prevContext;
|
11011 | if (hasComponentDidUpdate) {
|
11012 | prevProps = inst.props;
|
11013 | prevState = inst.state;
|
11014 | prevContext = inst.context;
|
11015 | }
|
11016 |
|
11017 | if (inst.componentWillUpdate) {
|
11018 | if (true) {
|
11019 | measureLifeCyclePerf(function () {
|
11020 | return inst.componentWillUpdate(nextProps, nextState, nextContext);
|
11021 | }, this._debugID, 'componentWillUpdate');
|
11022 | } else {
|
11023 | inst.componentWillUpdate(nextProps, nextState, nextContext);
|
11024 | }
|
11025 | }
|
11026 |
|
11027 | this._currentElement = nextElement;
|
11028 | this._context = unmaskedContext;
|
11029 | inst.props = nextProps;
|
11030 | inst.state = nextState;
|
11031 | inst.context = nextContext;
|
11032 |
|
11033 | this._updateRenderedComponent(transaction, unmaskedContext);
|
11034 |
|
11035 | if (hasComponentDidUpdate) {
|
11036 | if (true) {
|
11037 | transaction.getReactMountReady().enqueue(function () {
|
11038 | measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');
|
11039 | });
|
11040 | } else {
|
11041 | transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
|
11042 | }
|
11043 | }
|
11044 | },
|
11045 |
|
11046 | |
11047 |
|
11048 |
|
11049 |
|
11050 |
|
11051 |
|
11052 | _updateRenderedComponent: function (transaction, context) {
|
11053 | var prevComponentInstance = this._renderedComponent;
|
11054 | var prevRenderedElement = prevComponentInstance._currentElement;
|
11055 | var nextRenderedElement = this._renderValidatedComponent();
|
11056 |
|
11057 | var debugID = 0;
|
11058 | if (true) {
|
11059 | debugID = this._debugID;
|
11060 | }
|
11061 |
|
11062 | if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
|
11063 | ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
|
11064 | } else {
|
11065 | var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);
|
11066 | ReactReconciler.unmountComponent(prevComponentInstance, false);
|
11067 |
|
11068 | var nodeType = ReactNodeTypes.getType(nextRenderedElement);
|
11069 | this._renderedNodeType = nodeType;
|
11070 | var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY
|
11071 | );
|
11072 | this._renderedComponent = child;
|
11073 |
|
11074 | var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
|
11075 |
|
11076 | if (true) {
|
11077 | if (debugID !== 0) {
|
11078 | var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
|
11079 | ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
|
11080 | }
|
11081 | }
|
11082 |
|
11083 | this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);
|
11084 | }
|
11085 | },
|
11086 |
|
11087 | |
11088 |
|
11089 |
|
11090 |
|
11091 |
|
11092 | _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) {
|
11093 | ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);
|
11094 | },
|
11095 |
|
11096 | |
11097 |
|
11098 |
|
11099 | _renderValidatedComponentWithoutOwnerOrContext: function () {
|
11100 | var inst = this._instance;
|
11101 | var renderedElement;
|
11102 |
|
11103 | if (true) {
|
11104 | renderedElement = measureLifeCyclePerf(function () {
|
11105 | return inst.render();
|
11106 | }, this._debugID, 'render');
|
11107 | } else {
|
11108 | renderedElement = inst.render();
|
11109 | }
|
11110 |
|
11111 | if (true) {
|
11112 |
|
11113 | if (renderedElement === undefined && inst.render._isMockFunction) {
|
11114 |
|
11115 |
|
11116 | renderedElement = null;
|
11117 | }
|
11118 | }
|
11119 |
|
11120 | return renderedElement;
|
11121 | },
|
11122 |
|
11123 | |
11124 |
|
11125 |
|
11126 | _renderValidatedComponent: function () {
|
11127 | var renderedElement;
|
11128 | if (true) {
|
11129 | ReactCurrentOwner.current = this;
|
11130 | try {
|
11131 | renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
|
11132 | } finally {
|
11133 | ReactCurrentOwner.current = null;
|
11134 | }
|
11135 | } else {
|
11136 | renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
|
11137 | }
|
11138 | !(
|
11139 |
|
11140 | renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? true ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0;
|
11141 |
|
11142 | return renderedElement;
|
11143 | },
|
11144 |
|
11145 | |
11146 |
|
11147 |
|
11148 |
|
11149 |
|
11150 |
|
11151 |
|
11152 |
|
11153 | attachRef: function (ref, component) {
|
11154 | var inst = this.getPublicInstance();
|
11155 | !(inst != null) ? true ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;
|
11156 | var publicComponentInstance = component.getPublicInstance();
|
11157 | if (true) {
|
11158 | var componentName = component && component.getName ? component.getName() : 'a component';
|
11159 | true ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;
|
11160 | }
|
11161 | var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
|
11162 | refs[ref] = publicComponentInstance;
|
11163 | },
|
11164 |
|
11165 | |
11166 |
|
11167 |
|
11168 |
|
11169 |
|
11170 |
|
11171 |
|
11172 | detachRef: function (ref) {
|
11173 | var refs = this.getPublicInstance().refs;
|
11174 | delete refs[ref];
|
11175 | },
|
11176 |
|
11177 | |
11178 |
|
11179 |
|
11180 |
|
11181 |
|
11182 |
|
11183 | getName: function () {
|
11184 | var type = this._currentElement.type;
|
11185 | var constructor = this._instance && this._instance.constructor;
|
11186 | return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;
|
11187 | },
|
11188 |
|
11189 | /**
|
11190 | * Get the publicly accessible representation of this component - i.e. what
|
11191 | * is exposed by refs and returned by render. Can be null for stateless
|
11192 | * components.
|
11193 | *
|
11194 | * @return {ReactComponent} the public component instance.
|
11195 | * @internal
|
11196 | */
|
11197 | getPublicInstance: function () {
|
11198 | var inst = this._instance;
|
11199 | if (this._compositeType === CompositeTypes.StatelessFunctional) {
|
11200 | return null;
|
11201 | }
|
11202 | return inst;
|
11203 | },
|
11204 |
|
11205 |
|
11206 | _instantiateReactComponent: null
|
11207 |
|
11208 | };
|
11209 |
|
11210 | module.exports = ReactCompositeComponent;
|
11211 |
|
11212 | },
|
11213 |
|
11214 | function(module, exports, __webpack_require__) {
|
11215 |
|
11216 | |
11217 |
|
11218 |
|
11219 |
|
11220 |
|
11221 |
|
11222 |
|
11223 |
|
11224 |
|
11225 |
|
11226 |
|
11227 |
|
11228 | 'use strict';
|
11229 |
|
11230 | var ReactDOMComponentTree = __webpack_require__(8);
|
11231 | var ReactDefaultInjection = __webpack_require__(78);
|
11232 | var ReactMount = __webpack_require__(83);
|
11233 | var ReactReconciler = __webpack_require__(21);
|
11234 | var ReactUpdates = __webpack_require__(13);
|
11235 | var ReactVersion = __webpack_require__(230);
|
11236 |
|
11237 | var findDOMNode = __webpack_require__(88);
|
11238 | var getHostComponentFromComposite = __webpack_require__(90);
|
11239 | var renderSubtreeIntoContainer = __webpack_require__(252);
|
11240 | var warning = __webpack_require__(5);
|
11241 |
|
11242 | ReactDefaultInjection.inject();
|
11243 |
|
11244 | var ReactDOM = {
|
11245 | findDOMNode: findDOMNode,
|
11246 | render: ReactMount.render,
|
11247 | unmountComponentAtNode: ReactMount.unmountComponentAtNode,
|
11248 | version: ReactVersion,
|
11249 |
|
11250 |
|
11251 | unstable_batchedUpdates: ReactUpdates.batchedUpdates,
|
11252 | unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer
|
11253 | };
|
11254 |
|
11255 |
|
11256 |
|
11257 | if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {
|
11258 | __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
|
11259 | ComponentTree: {
|
11260 | getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode,
|
11261 | getNodeFromInstance: function (inst) {
|
11262 |
|
11263 | if (inst._renderedComponent) {
|
11264 | inst = getHostComponentFromComposite(inst);
|
11265 | }
|
11266 | if (inst) {
|
11267 | return ReactDOMComponentTree.getNodeFromInstance(inst);
|
11268 | } else {
|
11269 | return null;
|
11270 | }
|
11271 | }
|
11272 | },
|
11273 | Mount: ReactMount,
|
11274 | Reconciler: ReactReconciler
|
11275 | });
|
11276 | }
|
11277 |
|
11278 | if (true) {
|
11279 | var ExecutionEnvironment = __webpack_require__(9);
|
11280 | if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
|
11281 |
|
11282 |
|
11283 | if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
|
11284 |
|
11285 | if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
|
11286 |
|
11287 | var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1;
|
11288 | console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools');
|
11289 | }
|
11290 | }
|
11291 |
|
11292 | var testFunc = function testFn() {};
|
11293 | true ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;
|
11294 |
|
11295 |
|
11296 |
|
11297 | var ieCompatibilityMode = document.documentMode && document.documentMode < 8;
|
11298 |
|
11299 | true ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : void 0;
|
11300 |
|
11301 | var expectedFeatures = [
|
11302 |
|
11303 | Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim];
|
11304 |
|
11305 | for (var i = 0; i < expectedFeatures.length; i++) {
|
11306 | if (!expectedFeatures[i]) {
|
11307 | true ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0;
|
11308 | break;
|
11309 | }
|
11310 | }
|
11311 | }
|
11312 | }
|
11313 |
|
11314 | if (true) {
|
11315 | var ReactInstrumentation = __webpack_require__(12);
|
11316 | var ReactDOMUnknownPropertyHook = __webpack_require__(211);
|
11317 | var ReactDOMNullInputValuePropHook = __webpack_require__(205);
|
11318 | var ReactDOMInvalidARIAHook = __webpack_require__(204);
|
11319 |
|
11320 | ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook);
|
11321 | ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook);
|
11322 | ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook);
|
11323 | }
|
11324 |
|
11325 | module.exports = ReactDOM;
|
11326 |
|
11327 | },
|
11328 |
|
11329 | function(module, exports) {
|
11330 |
|
11331 | |
11332 |
|
11333 |
|
11334 |
|
11335 |
|
11336 |
|
11337 |
|
11338 |
|
11339 |
|
11340 |
|
11341 | 'use strict';
|
11342 |
|
11343 | var ReactDOMComponentFlags = {
|
11344 | hasCachedChildNodes: 1 << 0
|
11345 | };
|
11346 |
|
11347 | module.exports = ReactDOMComponentFlags;
|
11348 |
|
11349 | },
|
11350 |
|
11351 | function(module, exports, __webpack_require__) {
|
11352 |
|
11353 | |
11354 |
|
11355 |
|
11356 |
|
11357 |
|
11358 |
|
11359 |
|
11360 |
|
11361 |
|
11362 |
|
11363 | 'use strict';
|
11364 |
|
11365 | var _assign = __webpack_require__(7);
|
11366 |
|
11367 | var LinkedValueUtils = __webpack_require__(44);
|
11368 | var ReactDOMComponentTree = __webpack_require__(8);
|
11369 | var ReactUpdates = __webpack_require__(13);
|
11370 |
|
11371 | var warning = __webpack_require__(5);
|
11372 |
|
11373 | var didWarnValueLink = false;
|
11374 | var didWarnValueDefaultValue = false;
|
11375 |
|
11376 | function updateOptionsIfPendingUpdateAndMounted() {
|
11377 | if (this._rootNodeID && this._wrapperState.pendingUpdate) {
|
11378 | this._wrapperState.pendingUpdate = false;
|
11379 |
|
11380 | var props = this._currentElement.props;
|
11381 | var value = LinkedValueUtils.getValue(props);
|
11382 |
|
11383 | if (value != null) {
|
11384 | updateOptions(this, Boolean(props.multiple), value);
|
11385 | }
|
11386 | }
|
11387 | }
|
11388 |
|
11389 | function getDeclarationErrorAddendum(owner) {
|
11390 | if (owner) {
|
11391 | var name = owner.getName();
|
11392 | if (name) {
|
11393 | return ' Check the render method of `' + name + '`.';
|
11394 | }
|
11395 | }
|
11396 | return '';
|
11397 | }
|
11398 |
|
11399 | var valuePropNames = ['value', 'defaultValue'];
|
11400 |
|
11401 | |
11402 |
|
11403 |
|
11404 |
|
11405 | function checkSelectPropTypes(inst, props) {
|
11406 | var owner = inst._currentElement._owner;
|
11407 | LinkedValueUtils.checkPropTypes('select', props, owner);
|
11408 |
|
11409 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
11410 | true ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;
|
11411 | didWarnValueLink = true;
|
11412 | }
|
11413 |
|
11414 | for (var i = 0; i < valuePropNames.length; i++) {
|
11415 | var propName = valuePropNames[i];
|
11416 | if (props[propName] == null) {
|
11417 | continue;
|
11418 | }
|
11419 | var isArray = Array.isArray(props[propName]);
|
11420 | if (props.multiple && !isArray) {
|
11421 | true ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
|
11422 | } else if (!props.multiple && isArray) {
|
11423 | true ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
|
11424 | }
|
11425 | }
|
11426 | }
|
11427 |
|
11428 | |
11429 |
|
11430 |
|
11431 |
|
11432 |
|
11433 |
|
11434 | function updateOptions(inst, multiple, propValue) {
|
11435 | var selectedValue, i;
|
11436 | var options = ReactDOMComponentTree.getNodeFromInstance(inst).options;
|
11437 |
|
11438 | if (multiple) {
|
11439 | selectedValue = {};
|
11440 | for (i = 0; i < propValue.length; i++) {
|
11441 | selectedValue['' + propValue[i]] = true;
|
11442 | }
|
11443 | for (i = 0; i < options.length; i++) {
|
11444 | var selected = selectedValue.hasOwnProperty(options[i].value);
|
11445 | if (options[i].selected !== selected) {
|
11446 | options[i].selected = selected;
|
11447 | }
|
11448 | }
|
11449 | } else {
|
11450 |
|
11451 |
|
11452 | selectedValue = '' + propValue;
|
11453 | for (i = 0; i < options.length; i++) {
|
11454 | if (options[i].value === selectedValue) {
|
11455 | options[i].selected = true;
|
11456 | return;
|
11457 | }
|
11458 | }
|
11459 | if (options.length) {
|
11460 | options[0].selected = true;
|
11461 | }
|
11462 | }
|
11463 | }
|
11464 |
|
11465 | |
11466 |
|
11467 |
|
11468 |
|
11469 |
|
11470 |
|
11471 |
|
11472 |
|
11473 |
|
11474 |
|
11475 |
|
11476 |
|
11477 |
|
11478 |
|
11479 |
|
11480 | var ReactDOMSelect = {
|
11481 | getHostProps: function (inst, props) {
|
11482 | return _assign({}, props, {
|
11483 | onChange: inst._wrapperState.onChange,
|
11484 | value: undefined
|
11485 | });
|
11486 | },
|
11487 |
|
11488 | mountWrapper: function (inst, props) {
|
11489 | if (true) {
|
11490 | checkSelectPropTypes(inst, props);
|
11491 | }
|
11492 |
|
11493 | var value = LinkedValueUtils.getValue(props);
|
11494 | inst._wrapperState = {
|
11495 | pendingUpdate: false,
|
11496 | initialValue: value != null ? value : props.defaultValue,
|
11497 | listeners: null,
|
11498 | onChange: _handleChange.bind(inst),
|
11499 | wasMultiple: Boolean(props.multiple)
|
11500 | };
|
11501 |
|
11502 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
|
11503 | true ? warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;
|
11504 | didWarnValueDefaultValue = true;
|
11505 | }
|
11506 | },
|
11507 |
|
11508 | getSelectValueContext: function (inst) {
|
11509 |
|
11510 |
|
11511 | return inst._wrapperState.initialValue;
|
11512 | },
|
11513 |
|
11514 | postUpdateWrapper: function (inst) {
|
11515 | var props = inst._currentElement.props;
|
11516 |
|
11517 |
|
11518 |
|
11519 | inst._wrapperState.initialValue = undefined;
|
11520 |
|
11521 | var wasMultiple = inst._wrapperState.wasMultiple;
|
11522 | inst._wrapperState.wasMultiple = Boolean(props.multiple);
|
11523 |
|
11524 | var value = LinkedValueUtils.getValue(props);
|
11525 | if (value != null) {
|
11526 | inst._wrapperState.pendingUpdate = false;
|
11527 | updateOptions(inst, Boolean(props.multiple), value);
|
11528 | } else if (wasMultiple !== Boolean(props.multiple)) {
|
11529 |
|
11530 | if (props.defaultValue != null) {
|
11531 | updateOptions(inst, Boolean(props.multiple), props.defaultValue);
|
11532 | } else {
|
11533 |
|
11534 | updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : '');
|
11535 | }
|
11536 | }
|
11537 | }
|
11538 | };
|
11539 |
|
11540 | function _handleChange(event) {
|
11541 | var props = this._currentElement.props;
|
11542 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
11543 |
|
11544 | if (this._rootNodeID) {
|
11545 | this._wrapperState.pendingUpdate = true;
|
11546 | }
|
11547 | ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);
|
11548 | return returnValue;
|
11549 | }
|
11550 |
|
11551 | module.exports = ReactDOMSelect;
|
11552 |
|
11553 | },
|
11554 |
|
11555 | function(module, exports, __webpack_require__) {
|
11556 |
|
11557 | |
11558 |
|
11559 |
|
11560 |
|
11561 |
|
11562 |
|
11563 |
|
11564 |
|
11565 |
|
11566 |
|
11567 |
|
11568 | 'use strict';
|
11569 |
|
11570 | var ReactInvalidSetStateWarningHook = __webpack_require__(218);
|
11571 | var ReactHostOperationHistoryHook = __webpack_require__(216);
|
11572 | var ReactComponentTreeHook = __webpack_require__(10);
|
11573 | var ExecutionEnvironment = __webpack_require__(9);
|
11574 |
|
11575 | var performanceNow = __webpack_require__(180);
|
11576 | var warning = __webpack_require__(5);
|
11577 |
|
11578 | var hooks = [];
|
11579 | var didHookThrowForEvent = {};
|
11580 |
|
11581 | function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
|
11582 | try {
|
11583 | fn.call(context, arg1, arg2, arg3, arg4, arg5);
|
11584 | } catch (e) {
|
11585 | true ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0;
|
11586 | didHookThrowForEvent[event] = true;
|
11587 | }
|
11588 | }
|
11589 |
|
11590 | function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
|
11591 | for (var i = 0; i < hooks.length; i++) {
|
11592 | var hook = hooks[i];
|
11593 | var fn = hook[event];
|
11594 | if (fn) {
|
11595 | callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
|
11596 | }
|
11597 | }
|
11598 | }
|
11599 |
|
11600 | var isProfiling = false;
|
11601 | var flushHistory = [];
|
11602 | var lifeCycleTimerStack = [];
|
11603 | var currentFlushNesting = 0;
|
11604 | var currentFlushMeasurements = [];
|
11605 | var currentFlushStartTime = 0;
|
11606 | var currentTimerDebugID = null;
|
11607 | var currentTimerStartTime = 0;
|
11608 | var currentTimerNestedFlushDuration = 0;
|
11609 | var currentTimerType = null;
|
11610 |
|
11611 | var lifeCycleTimerHasWarned = false;
|
11612 |
|
11613 | function clearHistory() {
|
11614 | ReactComponentTreeHook.purgeUnmountedComponents();
|
11615 | ReactHostOperationHistoryHook.clearHistory();
|
11616 | }
|
11617 |
|
11618 | function getTreeSnapshot(registeredIDs) {
|
11619 | return registeredIDs.reduce(function (tree, id) {
|
11620 | var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
11621 | var parentID = ReactComponentTreeHook.getParentID(id);
|
11622 | tree[id] = {
|
11623 | displayName: ReactComponentTreeHook.getDisplayName(id),
|
11624 | text: ReactComponentTreeHook.getText(id),
|
11625 | updateCount: ReactComponentTreeHook.getUpdateCount(id),
|
11626 | childIDs: ReactComponentTreeHook.getChildIDs(id),
|
11627 |
|
11628 | ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0,
|
11629 | parentID: parentID
|
11630 | };
|
11631 | return tree;
|
11632 | }, {});
|
11633 | }
|
11634 |
|
11635 | function resetMeasurements() {
|
11636 | var previousStartTime = currentFlushStartTime;
|
11637 | var previousMeasurements = currentFlushMeasurements;
|
11638 | var previousOperations = ReactHostOperationHistoryHook.getHistory();
|
11639 |
|
11640 | if (currentFlushNesting === 0) {
|
11641 | currentFlushStartTime = 0;
|
11642 | currentFlushMeasurements = [];
|
11643 | clearHistory();
|
11644 | return;
|
11645 | }
|
11646 |
|
11647 | if (previousMeasurements.length || previousOperations.length) {
|
11648 | var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
|
11649 | flushHistory.push({
|
11650 | duration: performanceNow() - previousStartTime,
|
11651 | measurements: previousMeasurements || [],
|
11652 | operations: previousOperations || [],
|
11653 | treeSnapshot: getTreeSnapshot(registeredIDs)
|
11654 | });
|
11655 | }
|
11656 |
|
11657 | clearHistory();
|
11658 | currentFlushStartTime = performanceNow();
|
11659 | currentFlushMeasurements = [];
|
11660 | }
|
11661 |
|
11662 | function checkDebugID(debugID) {
|
11663 | var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
11664 |
|
11665 | if (allowRoot && debugID === 0) {
|
11666 | return;
|
11667 | }
|
11668 | if (!debugID) {
|
11669 | true ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;
|
11670 | }
|
11671 | }
|
11672 |
|
11673 | function beginLifeCycleTimer(debugID, timerType) {
|
11674 | if (currentFlushNesting === 0) {
|
11675 | return;
|
11676 | }
|
11677 | if (currentTimerType && !lifeCycleTimerHasWarned) {
|
11678 | true ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
|
11679 | lifeCycleTimerHasWarned = true;
|
11680 | }
|
11681 | currentTimerStartTime = performanceNow();
|
11682 | currentTimerNestedFlushDuration = 0;
|
11683 | currentTimerDebugID = debugID;
|
11684 | currentTimerType = timerType;
|
11685 | }
|
11686 |
|
11687 | function endLifeCycleTimer(debugID, timerType) {
|
11688 | if (currentFlushNesting === 0) {
|
11689 | return;
|
11690 | }
|
11691 | if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
|
11692 | true ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
|
11693 | lifeCycleTimerHasWarned = true;
|
11694 | }
|
11695 | if (isProfiling) {
|
11696 | currentFlushMeasurements.push({
|
11697 | timerType: timerType,
|
11698 | instanceID: debugID,
|
11699 | duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
|
11700 | });
|
11701 | }
|
11702 | currentTimerStartTime = 0;
|
11703 | currentTimerNestedFlushDuration = 0;
|
11704 | currentTimerDebugID = null;
|
11705 | currentTimerType = null;
|
11706 | }
|
11707 |
|
11708 | function pauseCurrentLifeCycleTimer() {
|
11709 | var currentTimer = {
|
11710 | startTime: currentTimerStartTime,
|
11711 | nestedFlushStartTime: performanceNow(),
|
11712 | debugID: currentTimerDebugID,
|
11713 | timerType: currentTimerType
|
11714 | };
|
11715 | lifeCycleTimerStack.push(currentTimer);
|
11716 | currentTimerStartTime = 0;
|
11717 | currentTimerNestedFlushDuration = 0;
|
11718 | currentTimerDebugID = null;
|
11719 | currentTimerType = null;
|
11720 | }
|
11721 |
|
11722 | function resumeCurrentLifeCycleTimer() {
|
11723 | var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(),
|
11724 | startTime = _lifeCycleTimerStack$.startTime,
|
11725 | nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime,
|
11726 | debugID = _lifeCycleTimerStack$.debugID,
|
11727 | timerType = _lifeCycleTimerStack$.timerType;
|
11728 |
|
11729 | var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
|
11730 | currentTimerStartTime = startTime;
|
11731 | currentTimerNestedFlushDuration += nestedFlushDuration;
|
11732 | currentTimerDebugID = debugID;
|
11733 | currentTimerType = timerType;
|
11734 | }
|
11735 |
|
11736 | var lastMarkTimeStamp = 0;
|
11737 | var canUsePerformanceMeasure =
|
11738 |
|
11739 | typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
|
11740 |
|
11741 | function shouldMark(debugID) {
|
11742 | if (!isProfiling || !canUsePerformanceMeasure) {
|
11743 | return false;
|
11744 | }
|
11745 | var element = ReactComponentTreeHook.getElement(debugID);
|
11746 | if (element == null || typeof element !== 'object') {
|
11747 | return false;
|
11748 | }
|
11749 | var isHostElement = typeof element.type === 'string';
|
11750 | if (isHostElement) {
|
11751 | return false;
|
11752 | }
|
11753 | return true;
|
11754 | }
|
11755 |
|
11756 | function markBegin(debugID, markType) {
|
11757 | if (!shouldMark(debugID)) {
|
11758 | return;
|
11759 | }
|
11760 |
|
11761 | var markName = debugID + '::' + markType;
|
11762 | lastMarkTimeStamp = performanceNow();
|
11763 | performance.mark(markName);
|
11764 | }
|
11765 |
|
11766 | function markEnd(debugID, markType) {
|
11767 | if (!shouldMark(debugID)) {
|
11768 | return;
|
11769 | }
|
11770 |
|
11771 | var markName = debugID + '::' + markType;
|
11772 | var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown';
|
11773 |
|
11774 |
|
11775 |
|
11776 |
|
11777 |
|
11778 |
|
11779 |
|
11780 | var timeStamp = performanceNow();
|
11781 | if (timeStamp - lastMarkTimeStamp > 0.1) {
|
11782 | var measurementName = displayName + ' [' + markType + ']';
|
11783 | performance.measure(measurementName, markName);
|
11784 | }
|
11785 |
|
11786 | performance.clearMarks(markName);
|
11787 | performance.clearMeasures(measurementName);
|
11788 | }
|
11789 |
|
11790 | var ReactDebugTool = {
|
11791 | addHook: function (hook) {
|
11792 | hooks.push(hook);
|
11793 | },
|
11794 | removeHook: function (hook) {
|
11795 | for (var i = 0; i < hooks.length; i++) {
|
11796 | if (hooks[i] === hook) {
|
11797 | hooks.splice(i, 1);
|
11798 | i--;
|
11799 | }
|
11800 | }
|
11801 | },
|
11802 | isProfiling: function () {
|
11803 | return isProfiling;
|
11804 | },
|
11805 | beginProfiling: function () {
|
11806 | if (isProfiling) {
|
11807 | return;
|
11808 | }
|
11809 |
|
11810 | isProfiling = true;
|
11811 | flushHistory.length = 0;
|
11812 | resetMeasurements();
|
11813 | ReactDebugTool.addHook(ReactHostOperationHistoryHook);
|
11814 | },
|
11815 | endProfiling: function () {
|
11816 | if (!isProfiling) {
|
11817 | return;
|
11818 | }
|
11819 |
|
11820 | isProfiling = false;
|
11821 | resetMeasurements();
|
11822 | ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
|
11823 | },
|
11824 | getFlushHistory: function () {
|
11825 | return flushHistory;
|
11826 | },
|
11827 | onBeginFlush: function () {
|
11828 | currentFlushNesting++;
|
11829 | resetMeasurements();
|
11830 | pauseCurrentLifeCycleTimer();
|
11831 | emitEvent('onBeginFlush');
|
11832 | },
|
11833 | onEndFlush: function () {
|
11834 | resetMeasurements();
|
11835 | currentFlushNesting--;
|
11836 | resumeCurrentLifeCycleTimer();
|
11837 | emitEvent('onEndFlush');
|
11838 | },
|
11839 | onBeginLifeCycleTimer: function (debugID, timerType) {
|
11840 | checkDebugID(debugID);
|
11841 | emitEvent('onBeginLifeCycleTimer', debugID, timerType);
|
11842 | markBegin(debugID, timerType);
|
11843 | beginLifeCycleTimer(debugID, timerType);
|
11844 | },
|
11845 | onEndLifeCycleTimer: function (debugID, timerType) {
|
11846 | checkDebugID(debugID);
|
11847 | endLifeCycleTimer(debugID, timerType);
|
11848 | markEnd(debugID, timerType);
|
11849 | emitEvent('onEndLifeCycleTimer', debugID, timerType);
|
11850 | },
|
11851 | onBeginProcessingChildContext: function () {
|
11852 | emitEvent('onBeginProcessingChildContext');
|
11853 | },
|
11854 | onEndProcessingChildContext: function () {
|
11855 | emitEvent('onEndProcessingChildContext');
|
11856 | },
|
11857 | onHostOperation: function (operation) {
|
11858 | checkDebugID(operation.instanceID);
|
11859 | emitEvent('onHostOperation', operation);
|
11860 | },
|
11861 | onSetState: function () {
|
11862 | emitEvent('onSetState');
|
11863 | },
|
11864 | onSetChildren: function (debugID, childDebugIDs) {
|
11865 | checkDebugID(debugID);
|
11866 | childDebugIDs.forEach(checkDebugID);
|
11867 | emitEvent('onSetChildren', debugID, childDebugIDs);
|
11868 | },
|
11869 | onBeforeMountComponent: function (debugID, element, parentDebugID) {
|
11870 | checkDebugID(debugID);
|
11871 | checkDebugID(parentDebugID, true);
|
11872 | emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
|
11873 | markBegin(debugID, 'mount');
|
11874 | },
|
11875 | onMountComponent: function (debugID) {
|
11876 | checkDebugID(debugID);
|
11877 | markEnd(debugID, 'mount');
|
11878 | emitEvent('onMountComponent', debugID);
|
11879 | },
|
11880 | onBeforeUpdateComponent: function (debugID, element) {
|
11881 | checkDebugID(debugID);
|
11882 | emitEvent('onBeforeUpdateComponent', debugID, element);
|
11883 | markBegin(debugID, 'update');
|
11884 | },
|
11885 | onUpdateComponent: function (debugID) {
|
11886 | checkDebugID(debugID);
|
11887 | markEnd(debugID, 'update');
|
11888 | emitEvent('onUpdateComponent', debugID);
|
11889 | },
|
11890 | onBeforeUnmountComponent: function (debugID) {
|
11891 | checkDebugID(debugID);
|
11892 | emitEvent('onBeforeUnmountComponent', debugID);
|
11893 | markBegin(debugID, 'unmount');
|
11894 | },
|
11895 | onUnmountComponent: function (debugID) {
|
11896 | checkDebugID(debugID);
|
11897 | markEnd(debugID, 'unmount');
|
11898 | emitEvent('onUnmountComponent', debugID);
|
11899 | },
|
11900 | onTestEvent: function () {
|
11901 | emitEvent('onTestEvent');
|
11902 | }
|
11903 | };
|
11904 |
|
11905 |
|
11906 | ReactDebugTool.addDevtool = ReactDebugTool.addHook;
|
11907 | ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
|
11908 |
|
11909 | ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
|
11910 | ReactDebugTool.addHook(ReactComponentTreeHook);
|
11911 | var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
|
11912 | if (/[?&]react_perf\b/.test(url)) {
|
11913 | ReactDebugTool.beginProfiling();
|
11914 | }
|
11915 |
|
11916 | module.exports = ReactDebugTool;
|
11917 |
|
11918 | },
|
11919 |
|
11920 | function(module, exports, __webpack_require__) {
|
11921 |
|
11922 | |
11923 |
|
11924 |
|
11925 |
|
11926 |
|
11927 |
|
11928 |
|
11929 |
|
11930 |
|
11931 |
|
11932 | 'use strict';
|
11933 |
|
11934 | var ARIADOMPropertyConfig = __webpack_require__(185);
|
11935 | var BeforeInputEventPlugin = __webpack_require__(187);
|
11936 | var ChangeEventPlugin = __webpack_require__(189);
|
11937 | var DefaultEventPluginOrder = __webpack_require__(191);
|
11938 | var EnterLeaveEventPlugin = __webpack_require__(192);
|
11939 | var HTMLDOMPropertyConfig = __webpack_require__(195);
|
11940 | var ReactComponentBrowserEnvironment = __webpack_require__(197);
|
11941 | var ReactDOMComponent = __webpack_require__(198);
|
11942 | var ReactDOMComponentTree = __webpack_require__(8);
|
11943 | var ReactDOMEmptyComponent = __webpack_require__(200);
|
11944 | var ReactDOMTreeTraversal = __webpack_require__(210);
|
11945 | var ReactDOMTextComponent = __webpack_require__(208);
|
11946 | var ReactDefaultBatchingStrategy = __webpack_require__(212);
|
11947 | var ReactEventListener = __webpack_require__(215);
|
11948 | var ReactInjection = __webpack_require__(217);
|
11949 | var ReactReconcileTransaction = __webpack_require__(224);
|
11950 | var SVGDOMPropertyConfig = __webpack_require__(231);
|
11951 | var SelectEventPlugin = __webpack_require__(232);
|
11952 | var SimpleEventPlugin = __webpack_require__(233);
|
11953 |
|
11954 | var alreadyInjected = false;
|
11955 |
|
11956 | function inject() {
|
11957 | if (alreadyInjected) {
|
11958 |
|
11959 |
|
11960 |
|
11961 | return;
|
11962 | }
|
11963 | alreadyInjected = true;
|
11964 |
|
11965 | ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);
|
11966 |
|
11967 | |
11968 |
|
11969 |
|
11970 | ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
|
11971 | ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree);
|
11972 | ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal);
|
11973 |
|
11974 | |
11975 |
|
11976 |
|
11977 |
|
11978 | ReactInjection.EventPluginHub.injectEventPluginsByName({
|
11979 | SimpleEventPlugin: SimpleEventPlugin,
|
11980 | EnterLeaveEventPlugin: EnterLeaveEventPlugin,
|
11981 | ChangeEventPlugin: ChangeEventPlugin,
|
11982 | SelectEventPlugin: SelectEventPlugin,
|
11983 | BeforeInputEventPlugin: BeforeInputEventPlugin
|
11984 | });
|
11985 |
|
11986 | ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent);
|
11987 |
|
11988 | ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent);
|
11989 |
|
11990 | ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig);
|
11991 | ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
|
11992 | ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
|
11993 |
|
11994 | ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) {
|
11995 | return new ReactDOMEmptyComponent(instantiate);
|
11996 | });
|
11997 |
|
11998 | ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);
|
11999 | ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);
|
12000 |
|
12001 | ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
|
12002 | }
|
12003 |
|
12004 | module.exports = {
|
12005 | inject: inject
|
12006 | };
|
12007 |
|
12008 | },
|
12009 |
|
12010 | function(module, exports) {
|
12011 |
|
12012 | |
12013 |
|
12014 |
|
12015 |
|
12016 |
|
12017 |
|
12018 |
|
12019 |
|
12020 |
|
12021 |
|
12022 | 'use strict';
|
12023 |
|
12024 | var emptyComponentFactory;
|
12025 |
|
12026 | var ReactEmptyComponentInjection = {
|
12027 | injectEmptyComponentFactory: function (factory) {
|
12028 | emptyComponentFactory = factory;
|
12029 | }
|
12030 | };
|
12031 |
|
12032 | var ReactEmptyComponent = {
|
12033 | create: function (instantiate) {
|
12034 | return emptyComponentFactory(instantiate);
|
12035 | }
|
12036 | };
|
12037 |
|
12038 | ReactEmptyComponent.injection = ReactEmptyComponentInjection;
|
12039 |
|
12040 | module.exports = ReactEmptyComponent;
|
12041 |
|
12042 | },
|
12043 |
|
12044 | function(module, exports) {
|
12045 |
|
12046 | |
12047 |
|
12048 |
|
12049 |
|
12050 |
|
12051 |
|
12052 |
|
12053 |
|
12054 |
|
12055 |
|
12056 |
|
12057 | 'use strict';
|
12058 |
|
12059 | var ReactFeatureFlags = {
|
12060 |
|
12061 |
|
12062 |
|
12063 | logTopLevelRenders: false
|
12064 | };
|
12065 |
|
12066 | module.exports = ReactFeatureFlags;
|
12067 |
|
12068 | },
|
12069 |
|
12070 | function(module, exports, __webpack_require__) {
|
12071 |
|
12072 | |
12073 |
|
12074 |
|
12075 |
|
12076 |
|
12077 |
|
12078 |
|
12079 |
|
12080 |
|
12081 |
|
12082 | 'use strict';
|
12083 |
|
12084 | var _prodInvariant = __webpack_require__(6),
|
12085 | _assign = __webpack_require__(7);
|
12086 |
|
12087 | var invariant = __webpack_require__(4);
|
12088 |
|
12089 | var genericComponentClass = null;
|
12090 |
|
12091 | var tagToComponentClass = {};
|
12092 | var textComponentClass = null;
|
12093 |
|
12094 | var ReactHostComponentInjection = {
|
12095 |
|
12096 |
|
12097 | injectGenericComponentClass: function (componentClass) {
|
12098 | genericComponentClass = componentClass;
|
12099 | },
|
12100 |
|
12101 |
|
12102 | injectTextComponentClass: function (componentClass) {
|
12103 | textComponentClass = componentClass;
|
12104 | },
|
12105 |
|
12106 |
|
12107 | injectComponentClasses: function (componentClasses) {
|
12108 | _assign(tagToComponentClass, componentClasses);
|
12109 | }
|
12110 | };
|
12111 |
|
12112 | |
12113 |
|
12114 |
|
12115 |
|
12116 |
|
12117 |
|
12118 | function createInternalComponent(element) {
|
12119 | !genericComponentClass ? true ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0;
|
12120 | return new genericComponentClass(element);
|
12121 | }
|
12122 |
|
12123 | |
12124 |
|
12125 |
|
12126 |
|
12127 | function createInstanceForText(text) {
|
12128 | return new textComponentClass(text);
|
12129 | }
|
12130 |
|
12131 | |
12132 |
|
12133 |
|
12134 |
|
12135 | function isTextComponent(component) {
|
12136 | return component instanceof textComponentClass;
|
12137 | }
|
12138 |
|
12139 | var ReactHostComponent = {
|
12140 | createInternalComponent: createInternalComponent,
|
12141 | createInstanceForText: createInstanceForText,
|
12142 | isTextComponent: isTextComponent,
|
12143 | injection: ReactHostComponentInjection
|
12144 | };
|
12145 |
|
12146 | module.exports = ReactHostComponent;
|
12147 |
|
12148 | },
|
12149 |
|
12150 | function(module, exports, __webpack_require__) {
|
12151 |
|
12152 | |
12153 |
|
12154 |
|
12155 |
|
12156 |
|
12157 |
|
12158 |
|
12159 |
|
12160 |
|
12161 |
|
12162 | 'use strict';
|
12163 |
|
12164 | var ReactDOMSelection = __webpack_require__(207);
|
12165 |
|
12166 | var containsNode = __webpack_require__(169);
|
12167 | var focusNode = __webpack_require__(68);
|
12168 | var getActiveElement = __webpack_require__(69);
|
12169 |
|
12170 | function isInDocument(node) {
|
12171 | return containsNode(document.documentElement, node);
|
12172 | }
|
12173 |
|
12174 | |
12175 |
|
12176 |
|
12177 |
|
12178 |
|
12179 |
|
12180 | var ReactInputSelection = {
|
12181 |
|
12182 | hasSelectionCapabilities: function (elem) {
|
12183 | var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
|
12184 | return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
|
12185 | },
|
12186 |
|
12187 | getSelectionInformation: function () {
|
12188 | var focusedElem = getActiveElement();
|
12189 | return {
|
12190 | focusedElem: focusedElem,
|
12191 | selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null
|
12192 | };
|
12193 | },
|
12194 |
|
12195 | |
12196 |
|
12197 |
|
12198 |
|
12199 |
|
12200 | restoreSelection: function (priorSelectionInformation) {
|
12201 | var curFocusedElem = getActiveElement();
|
12202 | var priorFocusedElem = priorSelectionInformation.focusedElem;
|
12203 | var priorSelectionRange = priorSelectionInformation.selectionRange;
|
12204 | if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
|
12205 | if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {
|
12206 | ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);
|
12207 | }
|
12208 | focusNode(priorFocusedElem);
|
12209 | }
|
12210 | },
|
12211 |
|
12212 | |
12213 |
|
12214 |
|
12215 |
|
12216 |
|
12217 |
|
12218 | getSelection: function (input) {
|
12219 | var selection;
|
12220 |
|
12221 | if ('selectionStart' in input) {
|
12222 |
|
12223 | selection = {
|
12224 | start: input.selectionStart,
|
12225 | end: input.selectionEnd
|
12226 | };
|
12227 | } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
|
12228 |
|
12229 | var range = document.selection.createRange();
|
12230 |
|
12231 |
|
12232 | if (range.parentElement() === input) {
|
12233 | selection = {
|
12234 | start: -range.moveStart('character', -input.value.length),
|
12235 | end: -range.moveEnd('character', -input.value.length)
|
12236 | };
|
12237 | }
|
12238 | } else {
|
12239 |
|
12240 | selection = ReactDOMSelection.getOffsets(input);
|
12241 | }
|
12242 |
|
12243 | return selection || { start: 0, end: 0 };
|
12244 | },
|
12245 |
|
12246 | |
12247 |
|
12248 |
|
12249 |
|
12250 |
|
12251 |
|
12252 | setSelection: function (input, offsets) {
|
12253 | var start = offsets.start;
|
12254 | var end = offsets.end;
|
12255 | if (end === undefined) {
|
12256 | end = start;
|
12257 | }
|
12258 |
|
12259 | if ('selectionStart' in input) {
|
12260 | input.selectionStart = start;
|
12261 | input.selectionEnd = Math.min(end, input.value.length);
|
12262 | } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
|
12263 | var range = input.createTextRange();
|
12264 | range.collapse(true);
|
12265 | range.moveStart('character', start);
|
12266 | range.moveEnd('character', end - start);
|
12267 | range.select();
|
12268 | } else {
|
12269 | ReactDOMSelection.setOffsets(input, offsets);
|
12270 | }
|
12271 | }
|
12272 | };
|
12273 |
|
12274 | module.exports = ReactInputSelection;
|
12275 |
|
12276 | },
|
12277 |
|
12278 | function(module, exports, __webpack_require__) {
|
12279 |
|
12280 | |
12281 |
|
12282 |
|
12283 |
|
12284 |
|
12285 |
|
12286 |
|
12287 |
|
12288 |
|
12289 |
|
12290 | 'use strict';
|
12291 |
|
12292 | var _prodInvariant = __webpack_require__(6);
|
12293 |
|
12294 | var DOMLazyTree = __webpack_require__(25);
|
12295 | var DOMProperty = __webpack_require__(17);
|
12296 | var React = __webpack_require__(15);
|
12297 | var ReactBrowserEventEmitter = __webpack_require__(30);
|
12298 | var ReactCurrentOwner = __webpack_require__(16);
|
12299 | var ReactDOMComponentTree = __webpack_require__(8);
|
12300 | var ReactDOMContainerInfo = __webpack_require__(199);
|
12301 | var ReactDOMFeatureFlags = __webpack_require__(201);
|
12302 | var ReactFeatureFlags = __webpack_require__(80);
|
12303 | var ReactInstanceMap = __webpack_require__(20);
|
12304 | var ReactInstrumentation = __webpack_require__(12);
|
12305 | var ReactMarkupChecksum = __webpack_require__(219);
|
12306 | var ReactReconciler = __webpack_require__(21);
|
12307 | var ReactUpdateQueue = __webpack_require__(47);
|
12308 | var ReactUpdates = __webpack_require__(13);
|
12309 |
|
12310 | var emptyObject = __webpack_require__(24);
|
12311 | var instantiateReactComponent = __webpack_require__(94);
|
12312 | var invariant = __webpack_require__(4);
|
12313 | var setInnerHTML = __webpack_require__(37);
|
12314 | var shouldUpdateReactComponent = __webpack_require__(53);
|
12315 | var warning = __webpack_require__(5);
|
12316 |
|
12317 | var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
|
12318 | var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME;
|
12319 |
|
12320 | var ELEMENT_NODE_TYPE = 1;
|
12321 | var DOC_NODE_TYPE = 9;
|
12322 | var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
|
12323 |
|
12324 | var instancesByReactRootID = {};
|
12325 |
|
12326 | |
12327 |
|
12328 |
|
12329 |
|
12330 |
|
12331 |
|
12332 | function firstDifferenceIndex(string1, string2) {
|
12333 | var minLen = Math.min(string1.length, string2.length);
|
12334 | for (var i = 0; i < minLen; i++) {
|
12335 | if (string1.charAt(i) !== string2.charAt(i)) {
|
12336 | return i;
|
12337 | }
|
12338 | }
|
12339 | return string1.length === string2.length ? -1 : minLen;
|
12340 | }
|
12341 |
|
12342 | |
12343 |
|
12344 |
|
12345 |
|
12346 |
|
12347 | function getReactRootElementInContainer(container) {
|
12348 | if (!container) {
|
12349 | return null;
|
12350 | }
|
12351 |
|
12352 | if (container.nodeType === DOC_NODE_TYPE) {
|
12353 | return container.documentElement;
|
12354 | } else {
|
12355 | return container.firstChild;
|
12356 | }
|
12357 | }
|
12358 |
|
12359 | function internalGetID(node) {
|
12360 |
|
12361 |
|
12362 |
|
12363 | return node.getAttribute && node.getAttribute(ATTR_NAME) || '';
|
12364 | }
|
12365 |
|
12366 | |
12367 |
|
12368 |
|
12369 |
|
12370 |
|
12371 |
|
12372 |
|
12373 |
|
12374 | function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) {
|
12375 | var markerName;
|
12376 | if (ReactFeatureFlags.logTopLevelRenders) {
|
12377 | var wrappedElement = wrapperInstance._currentElement.props.child;
|
12378 | var type = wrappedElement.type;
|
12379 | markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name);
|
12380 | console.time(markerName);
|
12381 | }
|
12382 |
|
12383 | var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0
|
12384 | );
|
12385 |
|
12386 | if (markerName) {
|
12387 | console.timeEnd(markerName);
|
12388 | }
|
12389 |
|
12390 | wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance;
|
12391 | ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction);
|
12392 | }
|
12393 |
|
12394 | |
12395 |
|
12396 |
|
12397 |
|
12398 |
|
12399 |
|
12400 |
|
12401 | function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) {
|
12402 | var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(
|
12403 |
|
12404 | !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement);
|
12405 | transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context);
|
12406 | ReactUpdates.ReactReconcileTransaction.release(transaction);
|
12407 | }
|
12408 |
|
12409 | |
12410 |
|
12411 |
|
12412 |
|
12413 |
|
12414 |
|
12415 |
|
12416 |
|
12417 |
|
12418 | function unmountComponentFromNode(instance, container, safely) {
|
12419 | if (true) {
|
12420 | ReactInstrumentation.debugTool.onBeginFlush();
|
12421 | }
|
12422 | ReactReconciler.unmountComponent(instance, safely);
|
12423 | if (true) {
|
12424 | ReactInstrumentation.debugTool.onEndFlush();
|
12425 | }
|
12426 |
|
12427 | if (container.nodeType === DOC_NODE_TYPE) {
|
12428 | container = container.documentElement;
|
12429 | }
|
12430 |
|
12431 |
|
12432 | while (container.lastChild) {
|
12433 | container.removeChild(container.lastChild);
|
12434 | }
|
12435 | }
|
12436 |
|
12437 | |
12438 |
|
12439 |
|
12440 |
|
12441 |
|
12442 |
|
12443 |
|
12444 |
|
12445 |
|
12446 |
|
12447 | function hasNonRootReactChild(container) {
|
12448 | var rootEl = getReactRootElementInContainer(container);
|
12449 | if (rootEl) {
|
12450 | var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl);
|
12451 | return !!(inst && inst._hostParent);
|
12452 | }
|
12453 | }
|
12454 |
|
12455 | |
12456 |
|
12457 |
|
12458 |
|
12459 |
|
12460 |
|
12461 |
|
12462 |
|
12463 | function nodeIsRenderedByOtherInstance(container) {
|
12464 | var rootEl = getReactRootElementInContainer(container);
|
12465 | return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl));
|
12466 | }
|
12467 |
|
12468 | |
12469 |
|
12470 |
|
12471 |
|
12472 |
|
12473 |
|
12474 |
|
12475 | function isValidContainer(node) {
|
12476 | return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE));
|
12477 | }
|
12478 |
|
12479 | |
12480 |
|
12481 |
|
12482 |
|
12483 |
|
12484 |
|
12485 |
|
12486 | function isReactNode(node) {
|
12487 | return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME));
|
12488 | }
|
12489 |
|
12490 | function getHostRootInstanceInContainer(container) {
|
12491 | var rootEl = getReactRootElementInContainer(container);
|
12492 | var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl);
|
12493 | return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null;
|
12494 | }
|
12495 |
|
12496 | function getTopLevelWrapperInContainer(container) {
|
12497 | var root = getHostRootInstanceInContainer(container);
|
12498 | return root ? root._hostContainerInfo._topLevelWrapper : null;
|
12499 | }
|
12500 |
|
12501 | |
12502 |
|
12503 |
|
12504 |
|
12505 |
|
12506 | var topLevelRootCounter = 1;
|
12507 | var TopLevelWrapper = function () {
|
12508 | this.rootID = topLevelRootCounter++;
|
12509 | };
|
12510 | TopLevelWrapper.prototype.isReactComponent = {};
|
12511 | if (true) {
|
12512 | TopLevelWrapper.displayName = 'TopLevelWrapper';
|
12513 | }
|
12514 | TopLevelWrapper.prototype.render = function () {
|
12515 | return this.props.child;
|
12516 | };
|
12517 | TopLevelWrapper.isReactTopLevelWrapper = true;
|
12518 |
|
12519 | |
12520 |
|
12521 |
|
12522 |
|
12523 |
|
12524 |
|
12525 |
|
12526 |
|
12527 |
|
12528 |
|
12529 |
|
12530 |
|
12531 |
|
12532 |
|
12533 |
|
12534 |
|
12535 |
|
12536 |
|
12537 | var ReactMount = {
|
12538 |
|
12539 | TopLevelWrapper: TopLevelWrapper,
|
12540 |
|
12541 | |
12542 |
|
12543 |
|
12544 | _instancesByReactRootID: instancesByReactRootID,
|
12545 |
|
12546 | |
12547 |
|
12548 |
|
12549 |
|
12550 |
|
12551 |
|
12552 |
|
12553 |
|
12554 | scrollMonitor: function (container, renderCallback) {
|
12555 | renderCallback();
|
12556 | },
|
12557 |
|
12558 | |
12559 |
|
12560 |
|
12561 |
|
12562 |
|
12563 |
|
12564 |
|
12565 | _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) {
|
12566 | ReactMount.scrollMonitor(container, function () {
|
12567 | ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext);
|
12568 | if (callback) {
|
12569 | ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback);
|
12570 | }
|
12571 | });
|
12572 |
|
12573 | return prevComponent;
|
12574 | },
|
12575 |
|
12576 | |
12577 |
|
12578 |
|
12579 |
|
12580 |
|
12581 |
|
12582 |
|
12583 |
|
12584 | _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) {
|
12585 |
|
12586 |
|
12587 |
|
12588 | true ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;
|
12589 |
|
12590 | !isValidContainer(container) ? true ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0;
|
12591 |
|
12592 | ReactBrowserEventEmitter.ensureScrollValueMonitoring();
|
12593 | var componentInstance = instantiateReactComponent(nextElement, false);
|
12594 |
|
12595 |
|
12596 |
|
12597 |
|
12598 |
|
12599 | ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context);
|
12600 |
|
12601 | var wrapperID = componentInstance._instance.rootID;
|
12602 | instancesByReactRootID[wrapperID] = componentInstance;
|
12603 |
|
12604 | return componentInstance;
|
12605 | },
|
12606 |
|
12607 | |
12608 |
|
12609 |
|
12610 |
|
12611 |
|
12612 |
|
12613 |
|
12614 |
|
12615 |
|
12616 |
|
12617 |
|
12618 |
|
12619 |
|
12620 | renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
|
12621 | !(parentComponent != null && ReactInstanceMap.has(parentComponent)) ? true ? invariant(false, 'parentComponent must be a valid React Component') : _prodInvariant('38') : void 0;
|
12622 | return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback);
|
12623 | },
|
12624 |
|
12625 | _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
|
12626 | ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render');
|
12627 | !React.isValidElement(nextElement) ? true ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' :
|
12628 |
|
12629 | nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or <div />.' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or <Foo />.' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0;
|
12630 |
|
12631 | true ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;
|
12632 |
|
12633 | var nextWrappedElement = React.createElement(TopLevelWrapper, { child: nextElement });
|
12634 |
|
12635 | var nextContext;
|
12636 | if (parentComponent) {
|
12637 | var parentInst = ReactInstanceMap.get(parentComponent);
|
12638 | nextContext = parentInst._processChildContext(parentInst._context);
|
12639 | } else {
|
12640 | nextContext = emptyObject;
|
12641 | }
|
12642 |
|
12643 | var prevComponent = getTopLevelWrapperInContainer(container);
|
12644 |
|
12645 | if (prevComponent) {
|
12646 | var prevWrappedElement = prevComponent._currentElement;
|
12647 | var prevElement = prevWrappedElement.props.child;
|
12648 | if (shouldUpdateReactComponent(prevElement, nextElement)) {
|
12649 | var publicInst = prevComponent._renderedComponent.getPublicInstance();
|
12650 | var updatedCallback = callback && function () {
|
12651 | callback.call(publicInst);
|
12652 | };
|
12653 | ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback);
|
12654 | return publicInst;
|
12655 | } else {
|
12656 | ReactMount.unmountComponentAtNode(container);
|
12657 | }
|
12658 | }
|
12659 |
|
12660 | var reactRootElement = getReactRootElementInContainer(container);
|
12661 | var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement);
|
12662 | var containerHasNonRootReactChild = hasNonRootReactChild(container);
|
12663 |
|
12664 | if (true) {
|
12665 | true ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;
|
12666 |
|
12667 | if (!containerHasReactMarkup || reactRootElement.nextSibling) {
|
12668 | var rootElementSibling = reactRootElement;
|
12669 | while (rootElementSibling) {
|
12670 | if (internalGetID(rootElementSibling)) {
|
12671 | true ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : void 0;
|
12672 | break;
|
12673 | }
|
12674 | rootElementSibling = rootElementSibling.nextSibling;
|
12675 | }
|
12676 | }
|
12677 | }
|
12678 |
|
12679 | var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild;
|
12680 | var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance();
|
12681 | if (callback) {
|
12682 | callback.call(component);
|
12683 | }
|
12684 | return component;
|
12685 | },
|
12686 |
|
12687 | |
12688 |
|
12689 |
|
12690 |
|
12691 |
|
12692 |
|
12693 |
|
12694 |
|
12695 |
|
12696 |
|
12697 |
|
12698 |
|
12699 |
|
12700 | render: function (nextElement, container, callback) {
|
12701 | return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback);
|
12702 | },
|
12703 |
|
12704 | |
12705 |
|
12706 |
|
12707 |
|
12708 |
|
12709 |
|
12710 |
|
12711 |
|
12712 | unmountComponentAtNode: function (container) {
|
12713 |
|
12714 |
|
12715 |
|
12716 |
|
12717 | true ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : void 0;
|
12718 |
|
12719 | !isValidContainer(container) ? true ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0;
|
12720 |
|
12721 | if (true) {
|
12722 | true ? warning(!nodeIsRenderedByOtherInstance(container), 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by another copy of React.') : void 0;
|
12723 | }
|
12724 |
|
12725 | var prevComponent = getTopLevelWrapperInContainer(container);
|
12726 | if (!prevComponent) {
|
12727 |
|
12728 |
|
12729 | var containerHasNonRootReactChild = hasNonRootReactChild(container);
|
12730 |
|
12731 |
|
12732 | var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME);
|
12733 |
|
12734 | if (true) {
|
12735 | true ? warning(!containerHasNonRootReactChild, 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;
|
12736 | }
|
12737 |
|
12738 | return false;
|
12739 | }
|
12740 | delete instancesByReactRootID[prevComponent._instance.rootID];
|
12741 | ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false);
|
12742 | return true;
|
12743 | },
|
12744 |
|
12745 | _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) {
|
12746 | !isValidContainer(container) ? true ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0;
|
12747 |
|
12748 | if (shouldReuseMarkup) {
|
12749 | var rootElement = getReactRootElementInContainer(container);
|
12750 | if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) {
|
12751 | ReactDOMComponentTree.precacheNode(instance, rootElement);
|
12752 | return;
|
12753 | } else {
|
12754 | var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
|
12755 | rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
|
12756 |
|
12757 | var rootMarkup = rootElement.outerHTML;
|
12758 | rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum);
|
12759 |
|
12760 | var normalizedMarkup = markup;
|
12761 | if (true) {
|
12762 |
|
12763 |
|
12764 |
|
12765 |
|
12766 | var normalizer;
|
12767 | if (container.nodeType === ELEMENT_NODE_TYPE) {
|
12768 | normalizer = document.createElement('div');
|
12769 | normalizer.innerHTML = markup;
|
12770 | normalizedMarkup = normalizer.innerHTML;
|
12771 | } else {
|
12772 | normalizer = document.createElement('iframe');
|
12773 | document.body.appendChild(normalizer);
|
12774 | normalizer.contentDocument.write(markup);
|
12775 | normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;
|
12776 | document.body.removeChild(normalizer);
|
12777 | }
|
12778 | }
|
12779 |
|
12780 | var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup);
|
12781 | var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20);
|
12782 |
|
12783 | !(container.nodeType !== DOC_NODE_TYPE) ? true ? invariant(false, 'You\'re trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s', difference) : _prodInvariant('42', difference) : void 0;
|
12784 |
|
12785 | if (true) {
|
12786 | true ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\n%s', difference) : void 0;
|
12787 | }
|
12788 | }
|
12789 | }
|
12790 |
|
12791 | !(container.nodeType !== DOC_NODE_TYPE) ? true ? invariant(false, 'You\'re trying to render a component to the document but you didn\'t use server rendering. We can\'t do this without using server rendering due to cross-browser quirks. See ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('43') : void 0;
|
12792 |
|
12793 | if (transaction.useCreateElement) {
|
12794 | while (container.lastChild) {
|
12795 | container.removeChild(container.lastChild);
|
12796 | }
|
12797 | DOMLazyTree.insertTreeBefore(container, markup, null);
|
12798 | } else {
|
12799 | setInnerHTML(container, markup);
|
12800 | ReactDOMComponentTree.precacheNode(instance, container.firstChild);
|
12801 | }
|
12802 |
|
12803 | if (true) {
|
12804 | var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild);
|
12805 | if (hostNode._debugID !== 0) {
|
12806 | ReactInstrumentation.debugTool.onHostOperation({
|
12807 | instanceID: hostNode._debugID,
|
12808 | type: 'mount',
|
12809 | payload: markup.toString()
|
12810 | });
|
12811 | }
|
12812 | }
|
12813 | }
|
12814 | };
|
12815 |
|
12816 | module.exports = ReactMount;
|
12817 |
|
12818 | },
|
12819 |
|
12820 | function(module, exports, __webpack_require__) {
|
12821 |
|
12822 | |
12823 |
|
12824 |
|
12825 |
|
12826 |
|
12827 |
|
12828 |
|
12829 |
|
12830 |
|
12831 |
|
12832 |
|
12833 | 'use strict';
|
12834 |
|
12835 | var _prodInvariant = __webpack_require__(6);
|
12836 |
|
12837 | var React = __webpack_require__(15);
|
12838 |
|
12839 | var invariant = __webpack_require__(4);
|
12840 |
|
12841 | var ReactNodeTypes = {
|
12842 | HOST: 0,
|
12843 | COMPOSITE: 1,
|
12844 | EMPTY: 2,
|
12845 |
|
12846 | getType: function (node) {
|
12847 | if (node === null || node === false) {
|
12848 | return ReactNodeTypes.EMPTY;
|
12849 | } else if (React.isValidElement(node)) {
|
12850 | if (typeof node.type === 'function') {
|
12851 | return ReactNodeTypes.COMPOSITE;
|
12852 | } else {
|
12853 | return ReactNodeTypes.HOST;
|
12854 | }
|
12855 | }
|
12856 | true ? true ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0;
|
12857 | }
|
12858 | };
|
12859 |
|
12860 | module.exports = ReactNodeTypes;
|
12861 |
|
12862 | },
|
12863 |
|
12864 | function(module, exports) {
|
12865 |
|
12866 | |
12867 |
|
12868 |
|
12869 |
|
12870 |
|
12871 |
|
12872 |
|
12873 |
|
12874 |
|
12875 |
|
12876 |
|
12877 | 'use strict';
|
12878 |
|
12879 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
12880 |
|
12881 | module.exports = ReactPropTypesSecret;
|
12882 |
|
12883 | },
|
12884 |
|
12885 | function(module, exports) {
|
12886 |
|
12887 | |
12888 |
|
12889 |
|
12890 |
|
12891 |
|
12892 |
|
12893 |
|
12894 |
|
12895 |
|
12896 |
|
12897 | 'use strict';
|
12898 |
|
12899 | var ViewportMetrics = {
|
12900 |
|
12901 | currentScrollLeft: 0,
|
12902 |
|
12903 | currentScrollTop: 0,
|
12904 |
|
12905 | refreshScrollValues: function (scrollPosition) {
|
12906 | ViewportMetrics.currentScrollLeft = scrollPosition.x;
|
12907 | ViewportMetrics.currentScrollTop = scrollPosition.y;
|
12908 | }
|
12909 |
|
12910 | };
|
12911 |
|
12912 | module.exports = ViewportMetrics;
|
12913 |
|
12914 | },
|
12915 |
|
12916 | function(module, exports, __webpack_require__) {
|
12917 |
|
12918 | |
12919 |
|
12920 |
|
12921 |
|
12922 |
|
12923 |
|
12924 |
|
12925 |
|
12926 |
|
12927 |
|
12928 |
|
12929 | 'use strict';
|
12930 |
|
12931 | var _prodInvariant = __webpack_require__(6);
|
12932 |
|
12933 | var invariant = __webpack_require__(4);
|
12934 |
|
12935 | |
12936 |
|
12937 |
|
12938 |
|
12939 |
|
12940 |
|
12941 |
|
12942 |
|
12943 |
|
12944 |
|
12945 |
|
12946 |
|
12947 |
|
12948 | function accumulateInto(current, next) {
|
12949 | !(next != null) ? true ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0;
|
12950 |
|
12951 | if (current == null) {
|
12952 | return next;
|
12953 | }
|
12954 |
|
12955 |
|
12956 |
|
12957 | if (Array.isArray(current)) {
|
12958 | if (Array.isArray(next)) {
|
12959 | current.push.apply(current, next);
|
12960 | return current;
|
12961 | }
|
12962 | current.push(next);
|
12963 | return current;
|
12964 | }
|
12965 |
|
12966 | if (Array.isArray(next)) {
|
12967 |
|
12968 | return [current].concat(next);
|
12969 | }
|
12970 |
|
12971 | return [current, next];
|
12972 | }
|
12973 |
|
12974 | module.exports = accumulateInto;
|
12975 |
|
12976 | },
|
12977 |
|
12978 | function(module, exports, __webpack_require__) {
|
12979 |
|
12980 | |
12981 |
|
12982 |
|
12983 |
|
12984 |
|
12985 |
|
12986 |
|
12987 |
|
12988 |
|
12989 |
|
12990 | 'use strict';
|
12991 |
|
12992 | var _prodInvariant = __webpack_require__(6);
|
12993 |
|
12994 | var ReactCurrentOwner = __webpack_require__(16);
|
12995 | var ReactDOMComponentTree = __webpack_require__(8);
|
12996 | var ReactInstanceMap = __webpack_require__(20);
|
12997 |
|
12998 | var getHostComponentFromComposite = __webpack_require__(90);
|
12999 | var invariant = __webpack_require__(4);
|
13000 | var warning = __webpack_require__(5);
|
13001 |
|
13002 | |
13003 |
|
13004 |
|
13005 |
|
13006 |
|
13007 |
|
13008 |
|
13009 |
|
13010 | function findDOMNode(componentOrElement) {
|
13011 | if (true) {
|
13012 | var owner = ReactCurrentOwner.current;
|
13013 | if (owner !== null) {
|
13014 | true ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;
|
13015 | owner._warnedAboutRefsInRender = true;
|
13016 | }
|
13017 | }
|
13018 | if (componentOrElement == null) {
|
13019 | return null;
|
13020 | }
|
13021 | if (componentOrElement.nodeType === 1) {
|
13022 | return componentOrElement;
|
13023 | }
|
13024 |
|
13025 | var inst = ReactInstanceMap.get(componentOrElement);
|
13026 | if (inst) {
|
13027 | inst = getHostComponentFromComposite(inst);
|
13028 | return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null;
|
13029 | }
|
13030 |
|
13031 | if (typeof componentOrElement.render === 'function') {
|
13032 | true ? true ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0;
|
13033 | } else {
|
13034 | true ? true ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0;
|
13035 | }
|
13036 | }
|
13037 |
|
13038 | module.exports = findDOMNode;
|
13039 |
|
13040 | },
|
13041 |
|
13042 | function(module, exports) {
|
13043 |
|
13044 | |
13045 |
|
13046 |
|
13047 |
|
13048 |
|
13049 |
|
13050 |
|
13051 |
|
13052 |
|
13053 |
|
13054 |
|
13055 | 'use strict';
|
13056 |
|
13057 | |
13058 |
|
13059 |
|
13060 |
|
13061 |
|
13062 |
|
13063 |
|
13064 |
|
13065 | function forEachAccumulated(arr, cb, scope) {
|
13066 | if (Array.isArray(arr)) {
|
13067 | arr.forEach(cb, scope);
|
13068 | } else if (arr) {
|
13069 | cb.call(scope, arr);
|
13070 | }
|
13071 | }
|
13072 |
|
13073 | module.exports = forEachAccumulated;
|
13074 |
|
13075 | },
|
13076 |
|
13077 | function(module, exports, __webpack_require__) {
|
13078 |
|
13079 | |
13080 |
|
13081 |
|
13082 |
|
13083 |
|
13084 |
|
13085 |
|
13086 |
|
13087 |
|
13088 |
|
13089 | 'use strict';
|
13090 |
|
13091 | var ReactNodeTypes = __webpack_require__(84);
|
13092 |
|
13093 | function getHostComponentFromComposite(inst) {
|
13094 | var type;
|
13095 |
|
13096 | while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) {
|
13097 | inst = inst._renderedComponent;
|
13098 | }
|
13099 |
|
13100 | if (type === ReactNodeTypes.HOST) {
|
13101 | return inst._renderedComponent;
|
13102 | } else if (type === ReactNodeTypes.EMPTY) {
|
13103 | return null;
|
13104 | }
|
13105 | }
|
13106 |
|
13107 | module.exports = getHostComponentFromComposite;
|
13108 |
|
13109 | },
|
13110 |
|
13111 | function(module, exports) {
|
13112 |
|
13113 | |
13114 |
|
13115 |
|
13116 |
|
13117 |
|
13118 |
|
13119 |
|
13120 |
|
13121 |
|
13122 |
|
13123 |
|
13124 | 'use strict';
|
13125 |
|
13126 | var nextDebugID = 1;
|
13127 |
|
13128 | function getNextDebugID() {
|
13129 | return nextDebugID++;
|
13130 | }
|
13131 |
|
13132 | module.exports = getNextDebugID;
|
13133 |
|
13134 | },
|
13135 |
|
13136 | function(module, exports, __webpack_require__) {
|
13137 |
|
13138 | |
13139 |
|
13140 |
|
13141 |
|
13142 |
|
13143 |
|
13144 |
|
13145 |
|
13146 |
|
13147 |
|
13148 | 'use strict';
|
13149 |
|
13150 | var ExecutionEnvironment = __webpack_require__(9);
|
13151 |
|
13152 | var contentKey = null;
|
13153 |
|
13154 | |
13155 |
|
13156 |
|
13157 |
|
13158 |
|
13159 |
|
13160 | function getTextContentAccessor() {
|
13161 | if (!contentKey && ExecutionEnvironment.canUseDOM) {
|
13162 |
|
13163 |
|
13164 | contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
|
13165 | }
|
13166 | return contentKey;
|
13167 | }
|
13168 |
|
13169 | module.exports = getTextContentAccessor;
|
13170 |
|
13171 | },
|
13172 |
|
13173 | function(module, exports, __webpack_require__) {
|
13174 |
|
13175 | |
13176 |
|
13177 |
|
13178 |
|
13179 |
|
13180 |
|
13181 |
|
13182 |
|
13183 |
|
13184 |
|
13185 | 'use strict';
|
13186 |
|
13187 | var ExecutionEnvironment = __webpack_require__(9);
|
13188 |
|
13189 | |
13190 |
|
13191 |
|
13192 |
|
13193 |
|
13194 |
|
13195 |
|
13196 | function makePrefixMap(styleProp, eventName) {
|
13197 | var prefixes = {};
|
13198 |
|
13199 | prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
|
13200 | prefixes['Webkit' + styleProp] = 'webkit' + eventName;
|
13201 | prefixes['Moz' + styleProp] = 'moz' + eventName;
|
13202 | prefixes['ms' + styleProp] = 'MS' + eventName;
|
13203 | prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
|
13204 |
|
13205 | return prefixes;
|
13206 | }
|
13207 |
|
13208 | |
13209 |
|
13210 |
|
13211 | var vendorPrefixes = {
|
13212 | animationend: makePrefixMap('Animation', 'AnimationEnd'),
|
13213 | animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
|
13214 | animationstart: makePrefixMap('Animation', 'AnimationStart'),
|
13215 | transitionend: makePrefixMap('Transition', 'TransitionEnd')
|
13216 | };
|
13217 |
|
13218 | |
13219 |
|
13220 |
|
13221 | var prefixedEventNames = {};
|
13222 |
|
13223 | |
13224 |
|
13225 |
|
13226 | var style = {};
|
13227 |
|
13228 | |
13229 |
|
13230 |
|
13231 | if (ExecutionEnvironment.canUseDOM) {
|
13232 | style = document.createElement('div').style;
|
13233 |
|
13234 |
|
13235 |
|
13236 |
|
13237 |
|
13238 | if (!('AnimationEvent' in window)) {
|
13239 | delete vendorPrefixes.animationend.animation;
|
13240 | delete vendorPrefixes.animationiteration.animation;
|
13241 | delete vendorPrefixes.animationstart.animation;
|
13242 | }
|
13243 |
|
13244 |
|
13245 | if (!('TransitionEvent' in window)) {
|
13246 | delete vendorPrefixes.transitionend.transition;
|
13247 | }
|
13248 | }
|
13249 |
|
13250 | |
13251 |
|
13252 |
|
13253 |
|
13254 |
|
13255 |
|
13256 | function getVendorPrefixedEventName(eventName) {
|
13257 | if (prefixedEventNames[eventName]) {
|
13258 | return prefixedEventNames[eventName];
|
13259 | } else if (!vendorPrefixes[eventName]) {
|
13260 | return eventName;
|
13261 | }
|
13262 |
|
13263 | var prefixMap = vendorPrefixes[eventName];
|
13264 |
|
13265 | for (var styleProp in prefixMap) {
|
13266 | if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
|
13267 | return prefixedEventNames[eventName] = prefixMap[styleProp];
|
13268 | }
|
13269 | }
|
13270 |
|
13271 | return '';
|
13272 | }
|
13273 |
|
13274 | module.exports = getVendorPrefixedEventName;
|
13275 |
|
13276 | },
|
13277 |
|
13278 | function(module, exports, __webpack_require__) {
|
13279 |
|
13280 | |
13281 |
|
13282 |
|
13283 |
|
13284 |
|
13285 |
|
13286 |
|
13287 |
|
13288 |
|
13289 |
|
13290 | 'use strict';
|
13291 |
|
13292 | var _prodInvariant = __webpack_require__(6),
|
13293 | _assign = __webpack_require__(7);
|
13294 |
|
13295 | var ReactCompositeComponent = __webpack_require__(73);
|
13296 | var ReactEmptyComponent = __webpack_require__(79);
|
13297 | var ReactHostComponent = __webpack_require__(81);
|
13298 |
|
13299 | var getNextDebugID = __webpack_require__(91);
|
13300 | var invariant = __webpack_require__(4);
|
13301 | var warning = __webpack_require__(5);
|
13302 |
|
13303 |
|
13304 | var ReactCompositeComponentWrapper = function (element) {
|
13305 | this.construct(element);
|
13306 | };
|
13307 | _assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {
|
13308 | _instantiateReactComponent: instantiateReactComponent
|
13309 | });
|
13310 |
|
13311 | function getDeclarationErrorAddendum(owner) {
|
13312 | if (owner) {
|
13313 | var name = owner.getName();
|
13314 | if (name) {
|
13315 | return ' Check the render method of `' + name + '`.';
|
13316 | }
|
13317 | }
|
13318 | return '';
|
13319 | }
|
13320 |
|
13321 | |
13322 |
|
13323 |
|
13324 |
|
13325 |
|
13326 |
|
13327 |
|
13328 | function isInternalComponentType(type) {
|
13329 | return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';
|
13330 | }
|
13331 |
|
13332 | |
13333 |
|
13334 |
|
13335 |
|
13336 |
|
13337 |
|
13338 |
|
13339 |
|
13340 | function instantiateReactComponent(node, shouldHaveDebugID) {
|
13341 | var instance;
|
13342 |
|
13343 | if (node === null || node === false) {
|
13344 | instance = ReactEmptyComponent.create(instantiateReactComponent);
|
13345 | } else if (typeof node === 'object') {
|
13346 | var element = node;
|
13347 | !(element && (typeof element.type === 'function' || typeof element.type === 'string')) ? true ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : _prodInvariant('130', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : void 0;
|
13348 |
|
13349 |
|
13350 | if (typeof element.type === 'string') {
|
13351 | instance = ReactHostComponent.createInternalComponent(element);
|
13352 | } else if (isInternalComponentType(element.type)) {
|
13353 |
|
13354 |
|
13355 |
|
13356 | instance = new element.type(element);
|
13357 |
|
13358 |
|
13359 | if (!instance.getHostNode) {
|
13360 | instance.getHostNode = instance.getNativeNode;
|
13361 | }
|
13362 | } else {
|
13363 | instance = new ReactCompositeComponentWrapper(element);
|
13364 | }
|
13365 | } else if (typeof node === 'string' || typeof node === 'number') {
|
13366 | instance = ReactHostComponent.createInstanceForText(node);
|
13367 | } else {
|
13368 | true ? true ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0;
|
13369 | }
|
13370 |
|
13371 | if (true) {
|
13372 | true ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0;
|
13373 | }
|
13374 |
|
13375 |
|
13376 |
|
13377 |
|
13378 | instance._mountIndex = 0;
|
13379 | instance._mountImage = null;
|
13380 |
|
13381 | if (true) {
|
13382 | instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0;
|
13383 | }
|
13384 |
|
13385 |
|
13386 |
|
13387 | if (true) {
|
13388 | if (Object.preventExtensions) {
|
13389 | Object.preventExtensions(instance);
|
13390 | }
|
13391 | }
|
13392 |
|
13393 | return instance;
|
13394 | }
|
13395 |
|
13396 | module.exports = instantiateReactComponent;
|
13397 |
|
13398 | },
|
13399 |
|
13400 | function(module, exports) {
|
13401 |
|
13402 | |
13403 |
|
13404 |
|
13405 |
|
13406 |
|
13407 |
|
13408 |
|
13409 |
|
13410 |
|
13411 |
|
13412 |
|
13413 | 'use strict';
|
13414 |
|
13415 | |
13416 |
|
13417 |
|
13418 |
|
13419 | var supportedInputTypes = {
|
13420 | 'color': true,
|
13421 | 'date': true,
|
13422 | 'datetime': true,
|
13423 | 'datetime-local': true,
|
13424 | 'email': true,
|
13425 | 'month': true,
|
13426 | 'number': true,
|
13427 | 'password': true,
|
13428 | 'range': true,
|
13429 | 'search': true,
|
13430 | 'tel': true,
|
13431 | 'text': true,
|
13432 | 'time': true,
|
13433 | 'url': true,
|
13434 | 'week': true
|
13435 | };
|
13436 |
|
13437 | function isTextInputElement(elem) {
|
13438 | var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
|
13439 |
|
13440 | if (nodeName === 'input') {
|
13441 | return !!supportedInputTypes[elem.type];
|
13442 | }
|
13443 |
|
13444 | if (nodeName === 'textarea') {
|
13445 | return true;
|
13446 | }
|
13447 |
|
13448 | return false;
|
13449 | }
|
13450 |
|
13451 | module.exports = isTextInputElement;
|
13452 |
|
13453 | },
|
13454 |
|
13455 | function(module, exports, __webpack_require__) {
|
13456 |
|
13457 | |
13458 |
|
13459 |
|
13460 |
|
13461 |
|
13462 |
|
13463 |
|
13464 |
|
13465 |
|
13466 |
|
13467 | 'use strict';
|
13468 |
|
13469 | var ExecutionEnvironment = __webpack_require__(9);
|
13470 | var escapeTextContentForBrowser = __webpack_require__(36);
|
13471 | var setInnerHTML = __webpack_require__(37);
|
13472 |
|
13473 | |
13474 |
|
13475 |
|
13476 |
|
13477 |
|
13478 |
|
13479 |
|
13480 |
|
13481 |
|
13482 |
|
13483 | var setTextContent = function (node, text) {
|
13484 | if (text) {
|
13485 | var firstChild = node.firstChild;
|
13486 |
|
13487 | if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {
|
13488 | firstChild.nodeValue = text;
|
13489 | return;
|
13490 | }
|
13491 | }
|
13492 | node.textContent = text;
|
13493 | };
|
13494 |
|
13495 | if (ExecutionEnvironment.canUseDOM) {
|
13496 | if (!('textContent' in document.documentElement)) {
|
13497 | setTextContent = function (node, text) {
|
13498 | if (node.nodeType === 3) {
|
13499 | node.nodeValue = text;
|
13500 | return;
|
13501 | }
|
13502 | setInnerHTML(node, escapeTextContentForBrowser(text));
|
13503 | };
|
13504 | }
|
13505 | }
|
13506 |
|
13507 | module.exports = setTextContent;
|
13508 |
|
13509 | },
|
13510 |
|
13511 | function(module, exports, __webpack_require__) {
|
13512 |
|
13513 | |
13514 |
|
13515 |
|
13516 |
|
13517 |
|
13518 |
|
13519 |
|
13520 |
|
13521 |
|
13522 |
|
13523 | 'use strict';
|
13524 |
|
13525 | var _prodInvariant = __webpack_require__(6);
|
13526 |
|
13527 | var ReactCurrentOwner = __webpack_require__(16);
|
13528 | var REACT_ELEMENT_TYPE = __webpack_require__(213);
|
13529 |
|
13530 | var getIteratorFn = __webpack_require__(249);
|
13531 | var invariant = __webpack_require__(4);
|
13532 | var KeyEscapeUtils = __webpack_require__(43);
|
13533 | var warning = __webpack_require__(5);
|
13534 |
|
13535 | var SEPARATOR = '.';
|
13536 | var SUBSEPARATOR = ':';
|
13537 |
|
13538 | |
13539 |
|
13540 |
|
13541 |
|
13542 |
|
13543 |
|
13544 | |
13545 |
|
13546 |
|
13547 |
|
13548 |
|
13549 | var didWarnAboutMaps = false;
|
13550 |
|
13551 | |
13552 |
|
13553 |
|
13554 |
|
13555 |
|
13556 |
|
13557 |
|
13558 | function getComponentKey(component, index) {
|
13559 |
|
13560 |
|
13561 | if (component && typeof component === 'object' && component.key != null) {
|
13562 |
|
13563 | return KeyEscapeUtils.escape(component.key);
|
13564 | }
|
13565 |
|
13566 | return index.toString(36);
|
13567 | }
|
13568 |
|
13569 | |
13570 |
|
13571 |
|
13572 |
|
13573 |
|
13574 |
|
13575 |
|
13576 |
|
13577 | function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
|
13578 | var type = typeof children;
|
13579 |
|
13580 | if (type === 'undefined' || type === 'boolean') {
|
13581 |
|
13582 | children = null;
|
13583 | }
|
13584 |
|
13585 | if (children === null || type === 'string' || type === 'number' ||
|
13586 |
|
13587 |
|
13588 | type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
|
13589 | callback(traverseContext, children,
|
13590 |
|
13591 |
|
13592 | nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
|
13593 | return 1;
|
13594 | }
|
13595 |
|
13596 | var child;
|
13597 | var nextName;
|
13598 | var subtreeCount = 0;
|
13599 | var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
13600 |
|
13601 | if (Array.isArray(children)) {
|
13602 | for (var i = 0; i < children.length; i++) {
|
13603 | child = children[i];
|
13604 | nextName = nextNamePrefix + getComponentKey(child, i);
|
13605 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
13606 | }
|
13607 | } else {
|
13608 | var iteratorFn = getIteratorFn(children);
|
13609 | if (iteratorFn) {
|
13610 | var iterator = iteratorFn.call(children);
|
13611 | var step;
|
13612 | if (iteratorFn !== children.entries) {
|
13613 | var ii = 0;
|
13614 | while (!(step = iterator.next()).done) {
|
13615 | child = step.value;
|
13616 | nextName = nextNamePrefix + getComponentKey(child, ii++);
|
13617 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
13618 | }
|
13619 | } else {
|
13620 | if (true) {
|
13621 | var mapsAsChildrenAddendum = '';
|
13622 | if (ReactCurrentOwner.current) {
|
13623 | var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
|
13624 | if (mapsAsChildrenOwnerName) {
|
13625 | mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
|
13626 | }
|
13627 | }
|
13628 | true ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
|
13629 | didWarnAboutMaps = true;
|
13630 | }
|
13631 |
|
13632 | while (!(step = iterator.next()).done) {
|
13633 | var entry = step.value;
|
13634 | if (entry) {
|
13635 | child = entry[1];
|
13636 | nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
|
13637 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
13638 | }
|
13639 | }
|
13640 | }
|
13641 | } else if (type === 'object') {
|
13642 | var addendum = '';
|
13643 | if (true) {
|
13644 | addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
|
13645 | if (children._isReactElement) {
|
13646 | addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';
|
13647 | }
|
13648 | if (ReactCurrentOwner.current) {
|
13649 | var name = ReactCurrentOwner.current.getName();
|
13650 | if (name) {
|
13651 | addendum += ' Check the render method of `' + name + '`.';
|
13652 | }
|
13653 | }
|
13654 | }
|
13655 | var childrenString = String(children);
|
13656 | true ? true ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
|
13657 | }
|
13658 | }
|
13659 |
|
13660 | return subtreeCount;
|
13661 | }
|
13662 |
|
13663 | |
13664 |
|
13665 |
|
13666 |
|
13667 |
|
13668 |
|
13669 |
|
13670 |
|
13671 |
|
13672 |
|
13673 |
|
13674 |
|
13675 |
|
13676 |
|
13677 |
|
13678 |
|
13679 | function traverseAllChildren(children, callback, traverseContext) {
|
13680 | if (children == null) {
|
13681 | return 0;
|
13682 | }
|
13683 |
|
13684 | return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
13685 | }
|
13686 |
|
13687 | module.exports = traverseAllChildren;
|
13688 |
|
13689 | },
|
13690 |
|
13691 | function(module, exports) {
|
13692 |
|
13693 | |
13694 |
|
13695 |
|
13696 |
|
13697 |
|
13698 |
|
13699 |
|
13700 |
|
13701 |
|
13702 |
|
13703 |
|
13704 | 'use strict';
|
13705 |
|
13706 | |
13707 |
|
13708 |
|
13709 |
|
13710 |
|
13711 |
|
13712 |
|
13713 | function escape(key) {
|
13714 | var escapeRegex = /[=:]/g;
|
13715 | var escaperLookup = {
|
13716 | '=': '=0',
|
13717 | ':': '=2'
|
13718 | };
|
13719 | var escapedString = ('' + key).replace(escapeRegex, function (match) {
|
13720 | return escaperLookup[match];
|
13721 | });
|
13722 |
|
13723 | return '$' + escapedString;
|
13724 | }
|
13725 |
|
13726 | |
13727 |
|
13728 |
|
13729 |
|
13730 |
|
13731 |
|
13732 | function unescape(key) {
|
13733 | var unescapeRegex = /(=0|=2)/g;
|
13734 | var unescaperLookup = {
|
13735 | '=0': '=',
|
13736 | '=2': ':'
|
13737 | };
|
13738 | var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
|
13739 |
|
13740 | return ('' + keySubstring).replace(unescapeRegex, function (match) {
|
13741 | return unescaperLookup[match];
|
13742 | });
|
13743 | }
|
13744 |
|
13745 | var KeyEscapeUtils = {
|
13746 | escape: escape,
|
13747 | unescape: unescape
|
13748 | };
|
13749 |
|
13750 | module.exports = KeyEscapeUtils;
|
13751 |
|
13752 | },
|
13753 |
|
13754 | function(module, exports, __webpack_require__) {
|
13755 |
|
13756 | |
13757 |
|
13758 |
|
13759 |
|
13760 |
|
13761 |
|
13762 |
|
13763 |
|
13764 |
|
13765 |
|
13766 | 'use strict';
|
13767 |
|
13768 | var ReactDOM = __webpack_require__(74);
|
13769 | var ReactInstanceMap = __webpack_require__(20);
|
13770 |
|
13771 | exports.getReactDOM = function () {
|
13772 | return ReactDOM;
|
13773 | };
|
13774 |
|
13775 | exports.getReactInstanceMap = function () {
|
13776 | return ReactInstanceMap;
|
13777 | };
|
13778 |
|
13779 | if (true) {
|
13780 | var ReactPerf = __webpack_require__(222);
|
13781 | var ReactTestUtils = __webpack_require__(229);
|
13782 |
|
13783 | exports.getReactPerf = function () {
|
13784 | return ReactPerf;
|
13785 | };
|
13786 |
|
13787 | exports.getReactTestUtils = function () {
|
13788 | return ReactTestUtils;
|
13789 | };
|
13790 | }
|
13791 |
|
13792 | },
|
13793 |
|
13794 | function(module, exports) {
|
13795 |
|
13796 | |
13797 |
|
13798 |
|
13799 |
|
13800 |
|
13801 |
|
13802 |
|
13803 |
|
13804 |
|
13805 |
|
13806 |
|
13807 | 'use strict';
|
13808 |
|
13809 |
|
13810 |
|
13811 |
|
13812 | var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
13813 |
|
13814 | module.exports = REACT_ELEMENT_TYPE;
|
13815 |
|
13816 | },
|
13817 |
|
13818 | function(module, exports, __webpack_require__) {
|
13819 |
|
13820 | |
13821 |
|
13822 |
|
13823 |
|
13824 |
|
13825 |
|
13826 |
|
13827 |
|
13828 |
|
13829 |
|
13830 | |
13831 |
|
13832 |
|
13833 |
|
13834 |
|
13835 |
|
13836 |
|
13837 | 'use strict';
|
13838 |
|
13839 | var ReactCurrentOwner = __webpack_require__(16);
|
13840 | var ReactComponentTreeHook = __webpack_require__(10);
|
13841 | var ReactElement = __webpack_require__(22);
|
13842 |
|
13843 | var checkReactTypeSpec = __webpack_require__(265);
|
13844 |
|
13845 | var canDefineProperty = __webpack_require__(58);
|
13846 | var getIteratorFn = __webpack_require__(59);
|
13847 | var warning = __webpack_require__(5);
|
13848 |
|
13849 | function getDeclarationErrorAddendum() {
|
13850 | if (ReactCurrentOwner.current) {
|
13851 | var name = ReactCurrentOwner.current.getName();
|
13852 | if (name) {
|
13853 | return ' Check the render method of `' + name + '`.';
|
13854 | }
|
13855 | }
|
13856 | return '';
|
13857 | }
|
13858 |
|
13859 | |
13860 |
|
13861 |
|
13862 |
|
13863 |
|
13864 | var ownerHasKeyUseWarning = {};
|
13865 |
|
13866 | function getCurrentComponentErrorInfo(parentType) {
|
13867 | var info = getDeclarationErrorAddendum();
|
13868 |
|
13869 | if (!info) {
|
13870 | var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
13871 | if (parentName) {
|
13872 | info = ' Check the top-level render call using <' + parentName + '>.';
|
13873 | }
|
13874 | }
|
13875 | return info;
|
13876 | }
|
13877 |
|
13878 | |
13879 |
|
13880 |
|
13881 |
|
13882 |
|
13883 |
|
13884 |
|
13885 |
|
13886 |
|
13887 |
|
13888 |
|
13889 | function validateExplicitKey(element, parentType) {
|
13890 | if (!element._store || element._store.validated || element.key != null) {
|
13891 | return;
|
13892 | }
|
13893 | element._store.validated = true;
|
13894 |
|
13895 | var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});
|
13896 |
|
13897 | var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
13898 | if (memoizer[currentComponentErrorInfo]) {
|
13899 | return;
|
13900 | }
|
13901 | memoizer[currentComponentErrorInfo] = true;
|
13902 |
|
13903 |
|
13904 |
|
13905 |
|
13906 | var childOwner = '';
|
13907 | if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
13908 |
|
13909 | childOwner = ' It was passed a child from ' + element._owner.getName() + '.';
|
13910 | }
|
13911 |
|
13912 | true ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;
|
13913 | }
|
13914 |
|
13915 | |
13916 |
|
13917 |
|
13918 |
|
13919 |
|
13920 |
|
13921 |
|
13922 |
|
13923 |
|
13924 | function validateChildKeys(node, parentType) {
|
13925 | if (typeof node !== 'object') {
|
13926 | return;
|
13927 | }
|
13928 | if (Array.isArray(node)) {
|
13929 | for (var i = 0; i < node.length; i++) {
|
13930 | var child = node[i];
|
13931 | if (ReactElement.isValidElement(child)) {
|
13932 | validateExplicitKey(child, parentType);
|
13933 | }
|
13934 | }
|
13935 | } else if (ReactElement.isValidElement(node)) {
|
13936 |
|
13937 | if (node._store) {
|
13938 | node._store.validated = true;
|
13939 | }
|
13940 | } else if (node) {
|
13941 | var iteratorFn = getIteratorFn(node);
|
13942 |
|
13943 | if (iteratorFn) {
|
13944 | if (iteratorFn !== node.entries) {
|
13945 | var iterator = iteratorFn.call(node);
|
13946 | var step;
|
13947 | while (!(step = iterator.next()).done) {
|
13948 | if (ReactElement.isValidElement(step.value)) {
|
13949 | validateExplicitKey(step.value, parentType);
|
13950 | }
|
13951 | }
|
13952 | }
|
13953 | }
|
13954 | }
|
13955 | }
|
13956 |
|
13957 | |
13958 |
|
13959 |
|
13960 |
|
13961 |
|
13962 |
|
13963 | function validatePropTypes(element) {
|
13964 | var componentClass = element.type;
|
13965 | if (typeof componentClass !== 'function') {
|
13966 | return;
|
13967 | }
|
13968 | var name = componentClass.displayName || componentClass.name;
|
13969 | if (componentClass.propTypes) {
|
13970 | checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null);
|
13971 | }
|
13972 | if (typeof componentClass.getDefaultProps === 'function') {
|
13973 | true ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
|
13974 | }
|
13975 | }
|
13976 |
|
13977 | var ReactElementValidator = {
|
13978 |
|
13979 | createElement: function (type, props, children) {
|
13980 | var validType = typeof type === 'string' || typeof type === 'function';
|
13981 |
|
13982 |
|
13983 | if (!validType) {
|
13984 | true ? warning(false, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0;
|
13985 | }
|
13986 |
|
13987 | var element = ReactElement.createElement.apply(this, arguments);
|
13988 |
|
13989 |
|
13990 |
|
13991 | if (element == null) {
|
13992 | return element;
|
13993 | }
|
13994 |
|
13995 |
|
13996 |
|
13997 |
|
13998 |
|
13999 |
|
14000 | if (validType) {
|
14001 | for (var i = 2; i < arguments.length; i++) {
|
14002 | validateChildKeys(arguments[i], type);
|
14003 | }
|
14004 | }
|
14005 |
|
14006 | validatePropTypes(element);
|
14007 |
|
14008 | return element;
|
14009 | },
|
14010 |
|
14011 | createFactory: function (type) {
|
14012 | var validatedFactory = ReactElementValidator.createElement.bind(null, type);
|
14013 |
|
14014 | validatedFactory.type = type;
|
14015 |
|
14016 | if (true) {
|
14017 | if (canDefineProperty) {
|
14018 | Object.defineProperty(validatedFactory, 'type', {
|
14019 | enumerable: false,
|
14020 | get: function () {
|
14021 | true ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : void 0;
|
14022 | Object.defineProperty(this, 'type', {
|
14023 | value: type
|
14024 | });
|
14025 | return type;
|
14026 | }
|
14027 | });
|
14028 | }
|
14029 | }
|
14030 |
|
14031 | return validatedFactory;
|
14032 | },
|
14033 |
|
14034 | cloneElement: function (element, props, children) {
|
14035 | var newElement = ReactElement.cloneElement.apply(this, arguments);
|
14036 | for (var i = 2; i < arguments.length; i++) {
|
14037 | validateChildKeys(arguments[i], newElement.type);
|
14038 | }
|
14039 | validatePropTypes(newElement);
|
14040 | return newElement;
|
14041 | }
|
14042 |
|
14043 | };
|
14044 |
|
14045 | module.exports = ReactElementValidator;
|
14046 |
|
14047 | },
|
14048 |
|
14049 | function(module, exports) {
|
14050 |
|
14051 | |
14052 |
|
14053 |
|
14054 |
|
14055 |
|
14056 |
|
14057 |
|
14058 |
|
14059 |
|
14060 |
|
14061 |
|
14062 | 'use strict';
|
14063 |
|
14064 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
14065 |
|
14066 | module.exports = ReactPropTypesSecret;
|
14067 |
|
14068 | },
|
14069 |
|
14070 | function(module, exports, __webpack_require__) {
|
14071 |
|
14072 | |
14073 |
|
14074 |
|
14075 |
|
14076 |
|
14077 |
|
14078 |
|
14079 |
|
14080 |
|
14081 | 'use strict';
|
14082 |
|
14083 | var _prodInvariant = __webpack_require__(23);
|
14084 |
|
14085 | var ReactElement = __webpack_require__(22);
|
14086 |
|
14087 | var invariant = __webpack_require__(4);
|
14088 |
|
14089 | |
14090 |
|
14091 |
|
14092 |
|
14093 |
|
14094 |
|
14095 |
|
14096 |
|
14097 |
|
14098 |
|
14099 |
|
14100 |
|
14101 |
|
14102 |
|
14103 | function onlyChild(children) {
|
14104 | !ReactElement.isValidElement(children) ? true ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;
|
14105 | return children;
|
14106 | }
|
14107 |
|
14108 | module.exports = onlyChild;
|
14109 |
|
14110 | },
|
14111 |
|
14112 | function(module, exports, __webpack_require__) {
|
14113 |
|
14114 | |
14115 |
|
14116 |
|
14117 |
|
14118 |
|
14119 |
|
14120 |
|
14121 |
|
14122 |
|
14123 |
|
14124 | 'use strict';
|
14125 |
|
14126 | var _prodInvariant = __webpack_require__(23);
|
14127 |
|
14128 | var ReactCurrentOwner = __webpack_require__(16);
|
14129 | var REACT_ELEMENT_TYPE = __webpack_require__(100);
|
14130 |
|
14131 | var getIteratorFn = __webpack_require__(59);
|
14132 | var invariant = __webpack_require__(4);
|
14133 | var KeyEscapeUtils = __webpack_require__(98);
|
14134 | var warning = __webpack_require__(5);
|
14135 |
|
14136 | var SEPARATOR = '.';
|
14137 | var SUBSEPARATOR = ':';
|
14138 |
|
14139 | |
14140 |
|
14141 |
|
14142 |
|
14143 |
|
14144 |
|
14145 | |
14146 |
|
14147 |
|
14148 |
|
14149 |
|
14150 | var didWarnAboutMaps = false;
|
14151 |
|
14152 | |
14153 |
|
14154 |
|
14155 |
|
14156 |
|
14157 |
|
14158 |
|
14159 | function getComponentKey(component, index) {
|
14160 |
|
14161 |
|
14162 | if (component && typeof component === 'object' && component.key != null) {
|
14163 |
|
14164 | return KeyEscapeUtils.escape(component.key);
|
14165 | }
|
14166 |
|
14167 | return index.toString(36);
|
14168 | }
|
14169 |
|
14170 | |
14171 |
|
14172 |
|
14173 |
|
14174 |
|
14175 |
|
14176 |
|
14177 |
|
14178 | function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
|
14179 | var type = typeof children;
|
14180 |
|
14181 | if (type === 'undefined' || type === 'boolean') {
|
14182 |
|
14183 | children = null;
|
14184 | }
|
14185 |
|
14186 | if (children === null || type === 'string' || type === 'number' ||
|
14187 |
|
14188 |
|
14189 | type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
|
14190 | callback(traverseContext, children,
|
14191 |
|
14192 |
|
14193 | nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
|
14194 | return 1;
|
14195 | }
|
14196 |
|
14197 | var child;
|
14198 | var nextName;
|
14199 | var subtreeCount = 0;
|
14200 | var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
14201 |
|
14202 | if (Array.isArray(children)) {
|
14203 | for (var i = 0; i < children.length; i++) {
|
14204 | child = children[i];
|
14205 | nextName = nextNamePrefix + getComponentKey(child, i);
|
14206 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
14207 | }
|
14208 | } else {
|
14209 | var iteratorFn = getIteratorFn(children);
|
14210 | if (iteratorFn) {
|
14211 | var iterator = iteratorFn.call(children);
|
14212 | var step;
|
14213 | if (iteratorFn !== children.entries) {
|
14214 | var ii = 0;
|
14215 | while (!(step = iterator.next()).done) {
|
14216 | child = step.value;
|
14217 | nextName = nextNamePrefix + getComponentKey(child, ii++);
|
14218 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
14219 | }
|
14220 | } else {
|
14221 | if (true) {
|
14222 | var mapsAsChildrenAddendum = '';
|
14223 | if (ReactCurrentOwner.current) {
|
14224 | var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
|
14225 | if (mapsAsChildrenOwnerName) {
|
14226 | mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
|
14227 | }
|
14228 | }
|
14229 | true ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
|
14230 | didWarnAboutMaps = true;
|
14231 | }
|
14232 |
|
14233 | while (!(step = iterator.next()).done) {
|
14234 | var entry = step.value;
|
14235 | if (entry) {
|
14236 | child = entry[1];
|
14237 | nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
|
14238 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
14239 | }
|
14240 | }
|
14241 | }
|
14242 | } else if (type === 'object') {
|
14243 | var addendum = '';
|
14244 | if (true) {
|
14245 | addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
|
14246 | if (children._isReactElement) {
|
14247 | addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';
|
14248 | }
|
14249 | if (ReactCurrentOwner.current) {
|
14250 | var name = ReactCurrentOwner.current.getName();
|
14251 | if (name) {
|
14252 | addendum += ' Check the render method of `' + name + '`.';
|
14253 | }
|
14254 | }
|
14255 | }
|
14256 | var childrenString = String(children);
|
14257 | true ? true ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
|
14258 | }
|
14259 | }
|
14260 |
|
14261 | return subtreeCount;
|
14262 | }
|
14263 |
|
14264 | |
14265 |
|
14266 |
|
14267 |
|
14268 |
|
14269 |
|
14270 |
|
14271 |
|
14272 |
|
14273 |
|
14274 |
|
14275 |
|
14276 |
|
14277 |
|
14278 |
|
14279 |
|
14280 | function traverseAllChildren(children, callback, traverseContext) {
|
14281 | if (children == null) {
|
14282 | return 0;
|
14283 | }
|
14284 |
|
14285 | return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
14286 | }
|
14287 |
|
14288 | module.exports = traverseAllChildren;
|
14289 |
|
14290 | },
|
14291 |
|
14292 | function(module, exports, __webpack_require__) {
|
14293 |
|
14294 | 'use strict';
|
14295 |
|
14296 | Object.defineProperty(exports, "__esModule", {
|
14297 | value: true
|
14298 | });
|
14299 |
|
14300 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
14301 |
|
14302 | var _react = __webpack_require__(1);
|
14303 |
|
14304 | var _react2 = _interopRequireDefault(_react);
|
14305 |
|
14306 | var _classnames = __webpack_require__(2);
|
14307 |
|
14308 | var _classnames2 = _interopRequireDefault(_classnames);
|
14309 |
|
14310 | var _utils = __webpack_require__(3);
|
14311 |
|
14312 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14313 |
|
14314 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
14315 |
|
14316 | var propTypes = {
|
14317 | color: _react.PropTypes.string,
|
14318 | pill: _react.PropTypes.bool,
|
14319 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
14320 | children: _react.PropTypes.node,
|
14321 | className: _react.PropTypes.string,
|
14322 | cssModule: _react.PropTypes.object
|
14323 | };
|
14324 |
|
14325 | var defaultProps = {
|
14326 | color: 'default',
|
14327 | pill: false,
|
14328 | tag: 'span'
|
14329 | };
|
14330 |
|
14331 | var Badge = function Badge(props) {
|
14332 | var className = props.className,
|
14333 | cssModule = props.cssModule,
|
14334 | color = props.color,
|
14335 | pill = props.pill,
|
14336 | Component = props.tag,
|
14337 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'color', 'pill', 'tag']);
|
14338 |
|
14339 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'badge', 'badge-' + color, pill ? 'badge-pill' : false), cssModule);
|
14340 |
|
14341 | return _react2.default.createElement(Component, _extends({}, attributes, { className: classes }));
|
14342 | };
|
14343 |
|
14344 | Badge.propTypes = propTypes;
|
14345 | Badge.defaultProps = defaultProps;
|
14346 |
|
14347 | exports.default = Badge;
|
14348 |
|
14349 | },
|
14350 |
|
14351 | function(module, exports, __webpack_require__) {
|
14352 |
|
14353 | 'use strict';
|
14354 |
|
14355 | Object.defineProperty(exports, "__esModule", {
|
14356 | value: true
|
14357 | });
|
14358 |
|
14359 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
14360 |
|
14361 | var _react = __webpack_require__(1);
|
14362 |
|
14363 | var _react2 = _interopRequireDefault(_react);
|
14364 |
|
14365 | var _classnames = __webpack_require__(2);
|
14366 |
|
14367 | var _classnames2 = _interopRequireDefault(_classnames);
|
14368 |
|
14369 | var _utils = __webpack_require__(3);
|
14370 |
|
14371 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14372 |
|
14373 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
14374 |
|
14375 | var propTypes = {
|
14376 | tag: _react.PropTypes.string,
|
14377 | className: _react.PropTypes.string,
|
14378 | cssModule: _react.PropTypes.object
|
14379 | };
|
14380 |
|
14381 | var defaultProps = {
|
14382 | tag: 'ol'
|
14383 | };
|
14384 |
|
14385 | var Breadcrumb = function Breadcrumb(props) {
|
14386 | var className = props.className,
|
14387 | cssModule = props.cssModule,
|
14388 | Tag = props.tag,
|
14389 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
14390 |
|
14391 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'breadcrumb'), cssModule);
|
14392 |
|
14393 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
14394 | };
|
14395 |
|
14396 | Breadcrumb.propTypes = propTypes;
|
14397 | Breadcrumb.defaultProps = defaultProps;
|
14398 |
|
14399 | exports.default = Breadcrumb;
|
14400 |
|
14401 | },
|
14402 |
|
14403 | function(module, exports, __webpack_require__) {
|
14404 |
|
14405 | 'use strict';
|
14406 |
|
14407 | Object.defineProperty(exports, "__esModule", {
|
14408 | value: true
|
14409 | });
|
14410 |
|
14411 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
14412 |
|
14413 | var _react = __webpack_require__(1);
|
14414 |
|
14415 | var _react2 = _interopRequireDefault(_react);
|
14416 |
|
14417 | var _classnames = __webpack_require__(2);
|
14418 |
|
14419 | var _classnames2 = _interopRequireDefault(_classnames);
|
14420 |
|
14421 | var _utils = __webpack_require__(3);
|
14422 |
|
14423 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14424 |
|
14425 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
14426 |
|
14427 | var propTypes = {
|
14428 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
14429 | active: _react.PropTypes.bool,
|
14430 | className: _react.PropTypes.string,
|
14431 | cssModule: _react.PropTypes.object
|
14432 | };
|
14433 |
|
14434 | var defaultProps = {
|
14435 | tag: 'li'
|
14436 | };
|
14437 |
|
14438 | var BreadcrumbItem = function BreadcrumbItem(props) {
|
14439 | var className = props.className,
|
14440 | cssModule = props.cssModule,
|
14441 | active = props.active,
|
14442 | Tag = props.tag,
|
14443 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'active', 'tag']);
|
14444 |
|
14445 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, active ? 'active' : false, 'breadcrumb-item'), cssModule);
|
14446 |
|
14447 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
14448 | };
|
14449 |
|
14450 | BreadcrumbItem.propTypes = propTypes;
|
14451 | BreadcrumbItem.defaultProps = defaultProps;
|
14452 |
|
14453 | exports.default = BreadcrumbItem;
|
14454 |
|
14455 | },
|
14456 |
|
14457 | function(module, exports, __webpack_require__) {
|
14458 |
|
14459 | 'use strict';
|
14460 |
|
14461 | Object.defineProperty(exports, "__esModule", {
|
14462 | value: true
|
14463 | });
|
14464 |
|
14465 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
14466 |
|
14467 | var _react = __webpack_require__(1);
|
14468 |
|
14469 | var _react2 = _interopRequireDefault(_react);
|
14470 |
|
14471 | var _classnames = __webpack_require__(2);
|
14472 |
|
14473 | var _classnames2 = _interopRequireDefault(_classnames);
|
14474 |
|
14475 | var _utils = __webpack_require__(3);
|
14476 |
|
14477 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14478 |
|
14479 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
14480 |
|
14481 | var propTypes = {
|
14482 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
14483 | 'aria-label': _react.PropTypes.string,
|
14484 | className: _react.PropTypes.string,
|
14485 | cssModule: _react.PropTypes.object,
|
14486 | role: _react.PropTypes.string,
|
14487 | size: _react.PropTypes.string,
|
14488 | vertical: _react.PropTypes.bool
|
14489 | };
|
14490 |
|
14491 | var defaultProps = {
|
14492 | tag: 'div',
|
14493 | role: 'group'
|
14494 | };
|
14495 |
|
14496 | var ButtonGroup = function ButtonGroup(props) {
|
14497 | var className = props.className,
|
14498 | cssModule = props.cssModule,
|
14499 | size = props.size,
|
14500 | vertical = props.vertical,
|
14501 | Tag = props.tag,
|
14502 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'size', 'vertical', 'tag']);
|
14503 |
|
14504 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, size ? 'btn-group-' + size : false, vertical ? 'btn-group-vertical' : 'btn-group'), cssModule);
|
14505 |
|
14506 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
14507 | };
|
14508 |
|
14509 | ButtonGroup.propTypes = propTypes;
|
14510 | ButtonGroup.defaultProps = defaultProps;
|
14511 |
|
14512 | exports.default = ButtonGroup;
|
14513 |
|
14514 | },
|
14515 |
|
14516 | function(module, exports, __webpack_require__) {
|
14517 |
|
14518 | 'use strict';
|
14519 |
|
14520 | Object.defineProperty(exports, "__esModule", {
|
14521 | value: true
|
14522 | });
|
14523 |
|
14524 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
14525 |
|
14526 | var _react = __webpack_require__(1);
|
14527 |
|
14528 | var _react2 = _interopRequireDefault(_react);
|
14529 |
|
14530 | var _classnames = __webpack_require__(2);
|
14531 |
|
14532 | var _classnames2 = _interopRequireDefault(_classnames);
|
14533 |
|
14534 | var _utils = __webpack_require__(3);
|
14535 |
|
14536 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14537 |
|
14538 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
14539 |
|
14540 | var propTypes = {
|
14541 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
14542 | 'aria-label': _react.PropTypes.string,
|
14543 | className: _react.PropTypes.string,
|
14544 | cssModule: _react.PropTypes.object,
|
14545 | role: _react.PropTypes.string
|
14546 | };
|
14547 |
|
14548 | var defaultProps = {
|
14549 | tag: 'div',
|
14550 | role: 'toolbar'
|
14551 | };
|
14552 |
|
14553 | var ButtonToolbar = function ButtonToolbar(props) {
|
14554 | var className = props.className,
|
14555 | cssModule = props.cssModule,
|
14556 | Tag = props.tag,
|
14557 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
14558 |
|
14559 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'btn-toolbar'), cssModule);
|
14560 |
|
14561 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
14562 | };
|
14563 |
|
14564 | ButtonToolbar.propTypes = propTypes;
|
14565 | ButtonToolbar.defaultProps = defaultProps;
|
14566 |
|
14567 | exports.default = ButtonToolbar;
|
14568 |
|
14569 | },
|
14570 |
|
14571 | function(module, exports, __webpack_require__) {
|
14572 |
|
14573 | 'use strict';
|
14574 |
|
14575 | Object.defineProperty(exports, "__esModule", {
|
14576 | value: true
|
14577 | });
|
14578 |
|
14579 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
14580 |
|
14581 | var _react = __webpack_require__(1);
|
14582 |
|
14583 | var _react2 = _interopRequireDefault(_react);
|
14584 |
|
14585 | var _classnames = __webpack_require__(2);
|
14586 |
|
14587 | var _classnames2 = _interopRequireDefault(_classnames);
|
14588 |
|
14589 | var _utils = __webpack_require__(3);
|
14590 |
|
14591 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14592 |
|
14593 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
14594 |
|
14595 | var propTypes = {
|
14596 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
14597 | inverse: _react.PropTypes.bool,
|
14598 | color: _react.PropTypes.string,
|
14599 | block: _react.PropTypes.bool,
|
14600 | outline: _react.PropTypes.bool,
|
14601 | className: _react.PropTypes.string,
|
14602 | cssModule: _react.PropTypes.object
|
14603 | };
|
14604 |
|
14605 | var defaultProps = {
|
14606 | tag: 'div'
|
14607 | };
|
14608 |
|
14609 | var Card = function Card(props) {
|
14610 | var className = props.className,
|
14611 | cssModule = props.cssModule,
|
14612 | color = props.color,
|
14613 | block = props.block,
|
14614 | inverse = props.inverse,
|
14615 | outline = props.outline,
|
14616 | Tag = props.tag,
|
14617 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'color', 'block', 'inverse', 'outline', 'tag']);
|
14618 |
|
14619 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'card', inverse ? 'card-inverse' : false, block ? 'card-block' : false, color ? 'card' + (outline ? '-outline' : '') + '-' + color : false), cssModule);
|
14620 |
|
14621 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
14622 | };
|
14623 |
|
14624 | Card.propTypes = propTypes;
|
14625 | Card.defaultProps = defaultProps;
|
14626 |
|
14627 | exports.default = Card;
|
14628 |
|
14629 | },
|
14630 |
|
14631 | function(module, exports, __webpack_require__) {
|
14632 |
|
14633 | 'use strict';
|
14634 |
|
14635 | Object.defineProperty(exports, "__esModule", {
|
14636 | value: true
|
14637 | });
|
14638 |
|
14639 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
14640 |
|
14641 | var _react = __webpack_require__(1);
|
14642 |
|
14643 | var _react2 = _interopRequireDefault(_react);
|
14644 |
|
14645 | var _classnames = __webpack_require__(2);
|
14646 |
|
14647 | var _classnames2 = _interopRequireDefault(_classnames);
|
14648 |
|
14649 | var _utils = __webpack_require__(3);
|
14650 |
|
14651 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14652 |
|
14653 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
14654 |
|
14655 | var propTypes = {
|
14656 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
14657 | className: _react.PropTypes.string,
|
14658 | cssModule: _react.PropTypes.object
|
14659 | };
|
14660 |
|
14661 | var defaultProps = {
|
14662 | tag: 'div'
|
14663 | };
|
14664 |
|
14665 | var CardBlock = function CardBlock(props) {
|
14666 | var className = props.className,
|
14667 | cssModule = props.cssModule,
|
14668 | Tag = props.tag,
|
14669 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
14670 |
|
14671 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'card-block'), cssModule);
|
14672 |
|
14673 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
14674 | };
|
14675 |
|
14676 | CardBlock.propTypes = propTypes;
|
14677 | CardBlock.defaultProps = defaultProps;
|
14678 |
|
14679 | exports.default = CardBlock;
|
14680 |
|
14681 | },
|
14682 |
|
14683 | function(module, exports, __webpack_require__) {
|
14684 |
|
14685 | 'use strict';
|
14686 |
|
14687 | Object.defineProperty(exports, "__esModule", {
|
14688 | value: true
|
14689 | });
|
14690 |
|
14691 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
14692 |
|
14693 | var _react = __webpack_require__(1);
|
14694 |
|
14695 | var _react2 = _interopRequireDefault(_react);
|
14696 |
|
14697 | var _classnames = __webpack_require__(2);
|
14698 |
|
14699 | var _classnames2 = _interopRequireDefault(_classnames);
|
14700 |
|
14701 | var _utils = __webpack_require__(3);
|
14702 |
|
14703 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14704 |
|
14705 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
14706 |
|
14707 | var propTypes = {
|
14708 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
14709 | className: _react.PropTypes.string,
|
14710 | cssModule: _react.PropTypes.object
|
14711 | };
|
14712 |
|
14713 | var defaultProps = {
|
14714 | tag: 'div'
|
14715 | };
|
14716 |
|
14717 | var CardColumns = function CardColumns(props) {
|
14718 | var className = props.className,
|
14719 | cssModule = props.cssModule,
|
14720 | Tag = props.tag,
|
14721 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
14722 |
|
14723 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'card-columns'), cssModule);
|
14724 |
|
14725 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
14726 | };
|
14727 |
|
14728 | CardColumns.propTypes = propTypes;
|
14729 | CardColumns.defaultProps = defaultProps;
|
14730 |
|
14731 | exports.default = CardColumns;
|
14732 |
|
14733 | },
|
14734 |
|
14735 | function(module, exports, __webpack_require__) {
|
14736 |
|
14737 | 'use strict';
|
14738 |
|
14739 | Object.defineProperty(exports, "__esModule", {
|
14740 | value: true
|
14741 | });
|
14742 |
|
14743 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
14744 |
|
14745 | var _react = __webpack_require__(1);
|
14746 |
|
14747 | var _react2 = _interopRequireDefault(_react);
|
14748 |
|
14749 | var _classnames = __webpack_require__(2);
|
14750 |
|
14751 | var _classnames2 = _interopRequireDefault(_classnames);
|
14752 |
|
14753 | var _utils = __webpack_require__(3);
|
14754 |
|
14755 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14756 |
|
14757 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
14758 |
|
14759 | var propTypes = {
|
14760 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
14761 | className: _react.PropTypes.string,
|
14762 | cssModule: _react.PropTypes.object
|
14763 | };
|
14764 |
|
14765 | var defaultProps = {
|
14766 | tag: 'div'
|
14767 | };
|
14768 |
|
14769 | var CardDeck = function CardDeck(props) {
|
14770 | var className = props.className,
|
14771 | cssModule = props.cssModule,
|
14772 | Tag = props.tag,
|
14773 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
14774 |
|
14775 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'card-deck'), cssModule);
|
14776 |
|
14777 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
14778 | };
|
14779 |
|
14780 | CardDeck.propTypes = propTypes;
|
14781 | CardDeck.defaultProps = defaultProps;
|
14782 |
|
14783 | exports.default = CardDeck;
|
14784 |
|
14785 | },
|
14786 |
|
14787 | function(module, exports, __webpack_require__) {
|
14788 |
|
14789 | 'use strict';
|
14790 |
|
14791 | Object.defineProperty(exports, "__esModule", {
|
14792 | value: true
|
14793 | });
|
14794 |
|
14795 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
14796 |
|
14797 | var _react = __webpack_require__(1);
|
14798 |
|
14799 | var _react2 = _interopRequireDefault(_react);
|
14800 |
|
14801 | var _classnames = __webpack_require__(2);
|
14802 |
|
14803 | var _classnames2 = _interopRequireDefault(_classnames);
|
14804 |
|
14805 | var _utils = __webpack_require__(3);
|
14806 |
|
14807 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14808 |
|
14809 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
14810 |
|
14811 | var propTypes = {
|
14812 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
14813 | className: _react.PropTypes.string,
|
14814 | cssModule: _react.PropTypes.object
|
14815 | };
|
14816 |
|
14817 | var defaultProps = {
|
14818 | tag: 'div'
|
14819 | };
|
14820 |
|
14821 | var CardFooter = function CardFooter(props) {
|
14822 | var className = props.className,
|
14823 | cssModule = props.cssModule,
|
14824 | Tag = props.tag,
|
14825 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
14826 |
|
14827 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'card-footer'), cssModule);
|
14828 |
|
14829 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
14830 | };
|
14831 |
|
14832 | CardFooter.propTypes = propTypes;
|
14833 | CardFooter.defaultProps = defaultProps;
|
14834 |
|
14835 | exports.default = CardFooter;
|
14836 |
|
14837 | },
|
14838 |
|
14839 | function(module, exports, __webpack_require__) {
|
14840 |
|
14841 | 'use strict';
|
14842 |
|
14843 | Object.defineProperty(exports, "__esModule", {
|
14844 | value: true
|
14845 | });
|
14846 |
|
14847 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
14848 |
|
14849 | var _react = __webpack_require__(1);
|
14850 |
|
14851 | var _react2 = _interopRequireDefault(_react);
|
14852 |
|
14853 | var _classnames = __webpack_require__(2);
|
14854 |
|
14855 | var _classnames2 = _interopRequireDefault(_classnames);
|
14856 |
|
14857 | var _utils = __webpack_require__(3);
|
14858 |
|
14859 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14860 |
|
14861 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
14862 |
|
14863 | var propTypes = {
|
14864 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
14865 | className: _react.PropTypes.string,
|
14866 | cssModule: _react.PropTypes.object
|
14867 | };
|
14868 |
|
14869 | var defaultProps = {
|
14870 | tag: 'div'
|
14871 | };
|
14872 |
|
14873 | var CardGroup = function CardGroup(props) {
|
14874 | var className = props.className,
|
14875 | cssModule = props.cssModule,
|
14876 | Tag = props.tag,
|
14877 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
14878 |
|
14879 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'card-group'), cssModule);
|
14880 |
|
14881 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
14882 | };
|
14883 |
|
14884 | CardGroup.propTypes = propTypes;
|
14885 | CardGroup.defaultProps = defaultProps;
|
14886 |
|
14887 | exports.default = CardGroup;
|
14888 |
|
14889 | },
|
14890 |
|
14891 | function(module, exports, __webpack_require__) {
|
14892 |
|
14893 | 'use strict';
|
14894 |
|
14895 | Object.defineProperty(exports, "__esModule", {
|
14896 | value: true
|
14897 | });
|
14898 |
|
14899 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
14900 |
|
14901 | var _react = __webpack_require__(1);
|
14902 |
|
14903 | var _react2 = _interopRequireDefault(_react);
|
14904 |
|
14905 | var _classnames = __webpack_require__(2);
|
14906 |
|
14907 | var _classnames2 = _interopRequireDefault(_classnames);
|
14908 |
|
14909 | var _utils = __webpack_require__(3);
|
14910 |
|
14911 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14912 |
|
14913 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
14914 |
|
14915 | var propTypes = {
|
14916 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
14917 | className: _react.PropTypes.string,
|
14918 | cssModule: _react.PropTypes.object
|
14919 | };
|
14920 |
|
14921 | var defaultProps = {
|
14922 | tag: 'div'
|
14923 | };
|
14924 |
|
14925 | var CardHeader = function CardHeader(props) {
|
14926 | var className = props.className,
|
14927 | cssModule = props.cssModule,
|
14928 | Tag = props.tag,
|
14929 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
14930 |
|
14931 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'card-header'), cssModule);
|
14932 |
|
14933 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
14934 | };
|
14935 |
|
14936 | CardHeader.propTypes = propTypes;
|
14937 | CardHeader.defaultProps = defaultProps;
|
14938 |
|
14939 | exports.default = CardHeader;
|
14940 |
|
14941 | },
|
14942 |
|
14943 | function(module, exports, __webpack_require__) {
|
14944 |
|
14945 | 'use strict';
|
14946 |
|
14947 | Object.defineProperty(exports, "__esModule", {
|
14948 | value: true
|
14949 | });
|
14950 |
|
14951 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
14952 |
|
14953 | var _react = __webpack_require__(1);
|
14954 |
|
14955 | var _react2 = _interopRequireDefault(_react);
|
14956 |
|
14957 | var _classnames = __webpack_require__(2);
|
14958 |
|
14959 | var _classnames2 = _interopRequireDefault(_classnames);
|
14960 |
|
14961 | var _utils = __webpack_require__(3);
|
14962 |
|
14963 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14964 |
|
14965 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
14966 |
|
14967 | var propTypes = {
|
14968 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
14969 | top: _react.PropTypes.bool,
|
14970 | bottom: _react.PropTypes.bool,
|
14971 | className: _react.PropTypes.string,
|
14972 | cssModule: _react.PropTypes.object
|
14973 | };
|
14974 |
|
14975 | var defaultProps = {
|
14976 | tag: 'img'
|
14977 | };
|
14978 |
|
14979 | var CardImg = function CardImg(props) {
|
14980 | var className = props.className,
|
14981 | cssModule = props.cssModule,
|
14982 | top = props.top,
|
14983 | bottom = props.bottom,
|
14984 | Tag = props.tag,
|
14985 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'top', 'bottom', 'tag']);
|
14986 |
|
14987 | var cardImgClassName = 'card-img';
|
14988 | if (top) {
|
14989 | cardImgClassName = 'card-img-top';
|
14990 | }
|
14991 | if (bottom) {
|
14992 | cardImgClassName = 'card-img-bottom';
|
14993 | }
|
14994 |
|
14995 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, cardImgClassName), cssModule);
|
14996 |
|
14997 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
14998 | };
|
14999 |
|
15000 | CardImg.propTypes = propTypes;
|
15001 | CardImg.defaultProps = defaultProps;
|
15002 |
|
15003 | exports.default = CardImg;
|
15004 |
|
15005 | },
|
15006 |
|
15007 | function(module, exports, __webpack_require__) {
|
15008 |
|
15009 | 'use strict';
|
15010 |
|
15011 | Object.defineProperty(exports, "__esModule", {
|
15012 | value: true
|
15013 | });
|
15014 |
|
15015 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
15016 |
|
15017 | var _react = __webpack_require__(1);
|
15018 |
|
15019 | var _react2 = _interopRequireDefault(_react);
|
15020 |
|
15021 | var _classnames = __webpack_require__(2);
|
15022 |
|
15023 | var _classnames2 = _interopRequireDefault(_classnames);
|
15024 |
|
15025 | var _utils = __webpack_require__(3);
|
15026 |
|
15027 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15028 |
|
15029 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
15030 |
|
15031 | var propTypes = {
|
15032 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
15033 | className: _react.PropTypes.string,
|
15034 | cssModule: _react.PropTypes.object
|
15035 | };
|
15036 |
|
15037 | var defaultProps = {
|
15038 | tag: 'div'
|
15039 | };
|
15040 |
|
15041 | var CardImgOverlay = function CardImgOverlay(props) {
|
15042 | var className = props.className,
|
15043 | cssModule = props.cssModule,
|
15044 | Tag = props.tag,
|
15045 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
15046 |
|
15047 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'card-img-overlay'), cssModule);
|
15048 |
|
15049 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
15050 | };
|
15051 |
|
15052 | CardImgOverlay.propTypes = propTypes;
|
15053 | CardImgOverlay.defaultProps = defaultProps;
|
15054 |
|
15055 | exports.default = CardImgOverlay;
|
15056 |
|
15057 | },
|
15058 |
|
15059 | function(module, exports, __webpack_require__) {
|
15060 |
|
15061 | 'use strict';
|
15062 |
|
15063 | Object.defineProperty(exports, "__esModule", {
|
15064 | value: true
|
15065 | });
|
15066 |
|
15067 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
15068 |
|
15069 | var _react = __webpack_require__(1);
|
15070 |
|
15071 | var _react2 = _interopRequireDefault(_react);
|
15072 |
|
15073 | var _classnames = __webpack_require__(2);
|
15074 |
|
15075 | var _classnames2 = _interopRequireDefault(_classnames);
|
15076 |
|
15077 | var _utils = __webpack_require__(3);
|
15078 |
|
15079 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15080 |
|
15081 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
15082 |
|
15083 | var propTypes = {
|
15084 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
15085 | getRef: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
15086 | className: _react.PropTypes.string,
|
15087 | cssModule: _react.PropTypes.object
|
15088 | };
|
15089 |
|
15090 | var defaultProps = {
|
15091 | tag: 'a'
|
15092 | };
|
15093 |
|
15094 | var CardLink = function CardLink(props) {
|
15095 | var className = props.className,
|
15096 | cssModule = props.cssModule,
|
15097 | Tag = props.tag,
|
15098 | getRef = props.getRef,
|
15099 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'getRef']);
|
15100 |
|
15101 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'card-link'), cssModule);
|
15102 |
|
15103 | return _react2.default.createElement(Tag, _extends({}, attributes, { ref: getRef, className: classes }));
|
15104 | };
|
15105 |
|
15106 | CardLink.propTypes = propTypes;
|
15107 | CardLink.defaultProps = defaultProps;
|
15108 |
|
15109 | exports.default = CardLink;
|
15110 |
|
15111 | },
|
15112 |
|
15113 | function(module, exports, __webpack_require__) {
|
15114 |
|
15115 | 'use strict';
|
15116 |
|
15117 | Object.defineProperty(exports, "__esModule", {
|
15118 | value: true
|
15119 | });
|
15120 |
|
15121 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
15122 |
|
15123 | var _react = __webpack_require__(1);
|
15124 |
|
15125 | var _react2 = _interopRequireDefault(_react);
|
15126 |
|
15127 | var _classnames = __webpack_require__(2);
|
15128 |
|
15129 | var _classnames2 = _interopRequireDefault(_classnames);
|
15130 |
|
15131 | var _utils = __webpack_require__(3);
|
15132 |
|
15133 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15134 |
|
15135 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
15136 |
|
15137 | var propTypes = {
|
15138 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
15139 | className: _react.PropTypes.string,
|
15140 | cssModule: _react.PropTypes.object
|
15141 | };
|
15142 |
|
15143 | var defaultProps = {
|
15144 | tag: 'h6'
|
15145 | };
|
15146 |
|
15147 | var CardSubtitle = function CardSubtitle(props) {
|
15148 | var className = props.className,
|
15149 | cssModule = props.cssModule,
|
15150 | Tag = props.tag,
|
15151 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
15152 |
|
15153 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'card-subtitle'), cssModule);
|
15154 |
|
15155 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
15156 | };
|
15157 |
|
15158 | CardSubtitle.propTypes = propTypes;
|
15159 | CardSubtitle.defaultProps = defaultProps;
|
15160 |
|
15161 | exports.default = CardSubtitle;
|
15162 |
|
15163 | },
|
15164 |
|
15165 | function(module, exports, __webpack_require__) {
|
15166 |
|
15167 | 'use strict';
|
15168 |
|
15169 | Object.defineProperty(exports, "__esModule", {
|
15170 | value: true
|
15171 | });
|
15172 |
|
15173 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
15174 |
|
15175 | var _react = __webpack_require__(1);
|
15176 |
|
15177 | var _react2 = _interopRequireDefault(_react);
|
15178 |
|
15179 | var _classnames = __webpack_require__(2);
|
15180 |
|
15181 | var _classnames2 = _interopRequireDefault(_classnames);
|
15182 |
|
15183 | var _utils = __webpack_require__(3);
|
15184 |
|
15185 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15186 |
|
15187 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
15188 |
|
15189 | var propTypes = {
|
15190 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
15191 | className: _react.PropTypes.string,
|
15192 | cssModule: _react.PropTypes.object
|
15193 | };
|
15194 |
|
15195 | var defaultProps = {
|
15196 | tag: 'p'
|
15197 | };
|
15198 |
|
15199 | var CardText = function CardText(props) {
|
15200 | var className = props.className,
|
15201 | cssModule = props.cssModule,
|
15202 | Tag = props.tag,
|
15203 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
15204 |
|
15205 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'card-text'), cssModule);
|
15206 |
|
15207 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
15208 | };
|
15209 |
|
15210 | CardText.propTypes = propTypes;
|
15211 | CardText.defaultProps = defaultProps;
|
15212 |
|
15213 | exports.default = CardText;
|
15214 |
|
15215 | },
|
15216 |
|
15217 | function(module, exports, __webpack_require__) {
|
15218 |
|
15219 | 'use strict';
|
15220 |
|
15221 | Object.defineProperty(exports, "__esModule", {
|
15222 | value: true
|
15223 | });
|
15224 |
|
15225 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
15226 |
|
15227 | var _react = __webpack_require__(1);
|
15228 |
|
15229 | var _react2 = _interopRequireDefault(_react);
|
15230 |
|
15231 | var _classnames = __webpack_require__(2);
|
15232 |
|
15233 | var _classnames2 = _interopRequireDefault(_classnames);
|
15234 |
|
15235 | var _utils = __webpack_require__(3);
|
15236 |
|
15237 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15238 |
|
15239 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
15240 |
|
15241 | var propTypes = {
|
15242 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
15243 | className: _react.PropTypes.string,
|
15244 | cssModule: _react.PropTypes.object
|
15245 | };
|
15246 |
|
15247 | var defaultProps = {
|
15248 | tag: 'h4'
|
15249 | };
|
15250 |
|
15251 | var CardTitle = function CardTitle(props) {
|
15252 | var className = props.className,
|
15253 | cssModule = props.cssModule,
|
15254 | Tag = props.tag,
|
15255 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
15256 |
|
15257 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'card-title'), cssModule);
|
15258 |
|
15259 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
15260 | };
|
15261 |
|
15262 | CardTitle.propTypes = propTypes;
|
15263 | CardTitle.defaultProps = defaultProps;
|
15264 |
|
15265 | exports.default = CardTitle;
|
15266 |
|
15267 | },
|
15268 |
|
15269 | function(module, exports, __webpack_require__) {
|
15270 |
|
15271 | 'use strict';
|
15272 |
|
15273 | Object.defineProperty(exports, "__esModule", {
|
15274 | value: true
|
15275 | });
|
15276 |
|
15277 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
15278 |
|
15279 | var _lodash = __webpack_require__(182);
|
15280 |
|
15281 | var _lodash2 = _interopRequireDefault(_lodash);
|
15282 |
|
15283 | var _react = __webpack_require__(1);
|
15284 |
|
15285 | var _react2 = _interopRequireDefault(_react);
|
15286 |
|
15287 | var _classnames = __webpack_require__(2);
|
15288 |
|
15289 | var _classnames2 = _interopRequireDefault(_classnames);
|
15290 |
|
15291 | var _utils = __webpack_require__(3);
|
15292 |
|
15293 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15294 |
|
15295 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
15296 |
|
15297 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
15298 |
|
15299 | var colWidths = ['xs', 'sm', 'md', 'lg', 'xl'];
|
15300 | var stringOrNumberProp = _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]);
|
15301 |
|
15302 | var columnProps = _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.number, _react.PropTypes.string, _react.PropTypes.shape({
|
15303 | size: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.number, _react.PropTypes.string]),
|
15304 | push: stringOrNumberProp,
|
15305 | pull: stringOrNumberProp,
|
15306 | offset: stringOrNumberProp
|
15307 | })]);
|
15308 |
|
15309 | var propTypes = {
|
15310 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
15311 | xs: columnProps,
|
15312 | sm: columnProps,
|
15313 | md: columnProps,
|
15314 | lg: columnProps,
|
15315 | xl: columnProps,
|
15316 | className: _react.PropTypes.string,
|
15317 | cssModule: _react.PropTypes.object,
|
15318 | widths: _react.PropTypes.array
|
15319 | };
|
15320 |
|
15321 | var defaultProps = {
|
15322 | tag: 'div',
|
15323 | widths: colWidths
|
15324 | };
|
15325 |
|
15326 | var getColumnSizeClass = function getColumnSizeClass(isXs, colWidth, colSize) {
|
15327 | if (colSize === true || colSize === '') {
|
15328 | return isXs ? 'col' : 'col-' + colWidth;
|
15329 | } else if (colSize === 'auto') {
|
15330 | return isXs ? 'col-auto' : 'col-' + colWidth + '-auto';
|
15331 | }
|
15332 |
|
15333 | return isXs ? 'col-' + colSize : 'col-' + colWidth + '-' + colSize;
|
15334 | };
|
15335 |
|
15336 | var Col = function Col(props) {
|
15337 | var className = props.className,
|
15338 | cssModule = props.cssModule,
|
15339 | widths = props.widths,
|
15340 | Tag = props.tag,
|
15341 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'widths', 'tag']);
|
15342 |
|
15343 | var colClasses = [];
|
15344 |
|
15345 | widths.forEach(function (colWidth, i) {
|
15346 | var columnProp = props[colWidth];
|
15347 |
|
15348 | if (!i && columnProp === undefined) {
|
15349 | columnProp = true;
|
15350 | }
|
15351 |
|
15352 | delete attributes[colWidth];
|
15353 |
|
15354 | if (!columnProp) {
|
15355 | return;
|
15356 | }
|
15357 |
|
15358 | var isXs = !i;
|
15359 | var colClass = void 0;
|
15360 |
|
15361 | if ((0, _lodash2.default)(columnProp)) {
|
15362 | var _classNames;
|
15363 |
|
15364 | var colSizeInterfix = isXs ? '-' : '-' + colWidth + '-';
|
15365 | colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);
|
15366 |
|
15367 | colClasses.push((0, _utils.mapToCssModules)((0, _classnames2.default)((_classNames = {}, _defineProperty(_classNames, colClass, columnProp.size || columnProp.size === ''), _defineProperty(_classNames, 'push' + colSizeInterfix + columnProp.push, columnProp.push), _defineProperty(_classNames, 'pull' + colSizeInterfix + columnProp.pull, columnProp.pull), _defineProperty(_classNames, 'offset' + colSizeInterfix + columnProp.offset, columnProp.offset), _classNames))), cssModule);
|
15368 | } else {
|
15369 | colClass = getColumnSizeClass(isXs, colWidth, columnProp);
|
15370 | colClasses.push(colClass);
|
15371 | }
|
15372 | });
|
15373 |
|
15374 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, colClasses), cssModule);
|
15375 |
|
15376 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
15377 | };
|
15378 |
|
15379 | Col.propTypes = propTypes;
|
15380 | Col.defaultProps = defaultProps;
|
15381 |
|
15382 | exports.default = Col;
|
15383 |
|
15384 | },
|
15385 |
|
15386 | function(module, exports, __webpack_require__) {
|
15387 |
|
15388 | 'use strict';
|
15389 |
|
15390 | Object.defineProperty(exports, "__esModule", {
|
15391 | value: true
|
15392 | });
|
15393 |
|
15394 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
15395 |
|
15396 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
15397 |
|
15398 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
15399 |
|
15400 | var _react = __webpack_require__(1);
|
15401 |
|
15402 | var _react2 = _interopRequireDefault(_react);
|
15403 |
|
15404 | var _classnames = __webpack_require__(2);
|
15405 |
|
15406 | var _classnames2 = _interopRequireDefault(_classnames);
|
15407 |
|
15408 | var _lodash = __webpack_require__(18);
|
15409 |
|
15410 | var _lodash2 = _interopRequireDefault(_lodash);
|
15411 |
|
15412 | var _utils = __webpack_require__(3);
|
15413 |
|
15414 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15415 |
|
15416 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
15417 |
|
15418 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
15419 |
|
15420 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
15421 |
|
15422 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
15423 |
|
15424 | var SHOW = 'SHOW';
|
15425 | var SHOWN = 'SHOWN';
|
15426 | var HIDE = 'HIDE';
|
15427 | var HIDDEN = 'HIDDEN';
|
15428 |
|
15429 | var propTypes = {
|
15430 | isOpen: _react.PropTypes.bool,
|
15431 | className: _react.PropTypes.node,
|
15432 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
15433 | cssModule: _react.PropTypes.object,
|
15434 | navbar: _react.PropTypes.bool,
|
15435 | delay: _react.PropTypes.oneOfType([_react.PropTypes.shape({ show: _react.PropTypes.number, hide: _react.PropTypes.number }), _react.PropTypes.number]),
|
15436 | onOpened: _react.PropTypes.func,
|
15437 | onClosed: _react.PropTypes.func
|
15438 | };
|
15439 |
|
15440 | var DEFAULT_DELAYS = {
|
15441 | show: 350,
|
15442 | hide: 350
|
15443 | };
|
15444 |
|
15445 | var defaultProps = {
|
15446 | isOpen: false,
|
15447 | tag: 'div',
|
15448 | delay: DEFAULT_DELAYS,
|
15449 | onOpened: function onOpened() {},
|
15450 | onClosed: function onClosed() {}
|
15451 | };
|
15452 |
|
15453 | var Collapse = function (_Component) {
|
15454 | _inherits(Collapse, _Component);
|
15455 |
|
15456 | function Collapse(props) {
|
15457 | _classCallCheck(this, Collapse);
|
15458 |
|
15459 | var _this = _possibleConstructorReturn(this, (Collapse.__proto__ || Object.getPrototypeOf(Collapse)).call(this, props));
|
15460 |
|
15461 | _this.state = {
|
15462 | collapse: props.isOpen ? SHOWN : HIDDEN,
|
15463 | height: null
|
15464 | };
|
15465 | _this.element = null;
|
15466 | return _this;
|
15467 | }
|
15468 |
|
15469 | _createClass(Collapse, [{
|
15470 | key: 'componentWillReceiveProps',
|
15471 | value: function componentWillReceiveProps(nextProps) {
|
15472 | var _this2 = this;
|
15473 |
|
15474 | var willOpen = nextProps.isOpen;
|
15475 | var collapse = this.state.collapse;
|
15476 |
|
15477 | if (willOpen && collapse === HIDDEN) {
|
15478 |
|
15479 | this.setState({ collapse: SHOW }, function () {
|
15480 |
|
15481 | _this2.setState({ height: _this2.getHeight() });
|
15482 | _this2.transitionTag = setTimeout(function () {
|
15483 | _this2.setState({
|
15484 | collapse: SHOWN,
|
15485 | height: null
|
15486 | });
|
15487 | }, _this2.getDelay('show'));
|
15488 | });
|
15489 | } else if (!willOpen && collapse === SHOWN) {
|
15490 |
|
15491 | this.setState({ height: this.getHeight() }, function () {
|
15492 | _this2.setState({
|
15493 | collapse: HIDE,
|
15494 | height: _this2.getHeight()
|
15495 | }, function () {
|
15496 | _this2.setState({ height: 0 });
|
15497 | });
|
15498 | });
|
15499 |
|
15500 | this.transitionTag = setTimeout(function () {
|
15501 | _this2.setState({
|
15502 | collapse: HIDDEN,
|
15503 | height: null
|
15504 | });
|
15505 | }, this.getDelay('hide'));
|
15506 | }
|
15507 |
|
15508 | }
|
15509 | }, {
|
15510 | key: 'componentDidUpdate',
|
15511 | value: function componentDidUpdate(prevProps, prevState) {
|
15512 | if (this.state.collapse === SHOWN && prevState && prevState.collapse !== SHOWN) {
|
15513 | this.props.onOpened();
|
15514 | }
|
15515 |
|
15516 | if (this.state.collapse === HIDDEN && prevState && prevState.collapse !== HIDDEN) {
|
15517 | this.props.onClosed();
|
15518 | }
|
15519 | }
|
15520 | }, {
|
15521 | key: 'componentWillUnmount',
|
15522 | value: function componentWillUnmount() {
|
15523 | clearTimeout(this.transitionTag);
|
15524 | }
|
15525 | }, {
|
15526 | key: 'getDelay',
|
15527 | value: function getDelay(key) {
|
15528 | var delay = this.props.delay;
|
15529 |
|
15530 | if ((typeof delay === 'undefined' ? 'undefined' : _typeof(delay)) === 'object') {
|
15531 | return isNaN(delay[key]) ? DEFAULT_DELAYS[key] : delay[key];
|
15532 | }
|
15533 | return delay;
|
15534 | }
|
15535 | }, {
|
15536 | key: 'getHeight',
|
15537 | value: function getHeight() {
|
15538 | return this.element.scrollHeight;
|
15539 | }
|
15540 | }, {
|
15541 | key: 'render',
|
15542 | value: function render() {
|
15543 | var _this3 = this;
|
15544 |
|
15545 | var _omit = (0, _lodash2.default)(this.props, ['isOpen', 'delay', 'onOpened', 'onClosed']),
|
15546 | navbar = _omit.navbar,
|
15547 | className = _omit.className,
|
15548 | cssModule = _omit.cssModule,
|
15549 | Tag = _omit.tag,
|
15550 | attributes = _objectWithoutProperties(_omit, ['navbar', 'className', 'cssModule', 'tag']);
|
15551 |
|
15552 | var _state = this.state,
|
15553 | collapse = _state.collapse,
|
15554 | height = _state.height;
|
15555 |
|
15556 | var collapseClass = void 0;
|
15557 | switch (collapse) {
|
15558 | case SHOW:
|
15559 | collapseClass = 'collapsing';
|
15560 | break;
|
15561 | case SHOWN:
|
15562 | collapseClass = 'collapse show';
|
15563 | break;
|
15564 | case HIDE:
|
15565 | collapseClass = 'collapsing';
|
15566 | break;
|
15567 | case HIDDEN:
|
15568 | collapseClass = 'collapse';
|
15569 | break;
|
15570 | default:
|
15571 |
|
15572 | collapseClass = 'collapse';
|
15573 | }
|
15574 |
|
15575 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, collapseClass, navbar && 'navbar-collapse'), cssModule);
|
15576 | var style = height === null ? null : { height: height };
|
15577 | return _react2.default.createElement(Tag, _extends({}, attributes, {
|
15578 | style: _extends({}, attributes.style, style),
|
15579 | className: classes,
|
15580 | ref: function ref(c) {
|
15581 | _this3.element = c;
|
15582 | }
|
15583 | }));
|
15584 | }
|
15585 | }]);
|
15586 |
|
15587 | return Collapse;
|
15588 | }(_react.Component);
|
15589 |
|
15590 | Collapse.propTypes = propTypes;
|
15591 | Collapse.defaultProps = defaultProps;
|
15592 | exports.default = Collapse;
|
15593 |
|
15594 | },
|
15595 |
|
15596 | function(module, exports, __webpack_require__) {
|
15597 |
|
15598 | 'use strict';
|
15599 |
|
15600 | Object.defineProperty(exports, "__esModule", {
|
15601 | value: true
|
15602 | });
|
15603 |
|
15604 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
15605 |
|
15606 | var _react = __webpack_require__(1);
|
15607 |
|
15608 | var _react2 = _interopRequireDefault(_react);
|
15609 |
|
15610 | var _classnames = __webpack_require__(2);
|
15611 |
|
15612 | var _classnames2 = _interopRequireDefault(_classnames);
|
15613 |
|
15614 | var _utils = __webpack_require__(3);
|
15615 |
|
15616 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15617 |
|
15618 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
15619 |
|
15620 | var propTypes = {
|
15621 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
15622 | fluid: _react.PropTypes.bool,
|
15623 | className: _react.PropTypes.string,
|
15624 | cssModule: _react.PropTypes.object
|
15625 | };
|
15626 |
|
15627 | var defaultProps = {
|
15628 | tag: 'div'
|
15629 | };
|
15630 |
|
15631 | var Container = function Container(props) {
|
15632 | var className = props.className,
|
15633 | cssModule = props.cssModule,
|
15634 | fluid = props.fluid,
|
15635 | Tag = props.tag,
|
15636 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'fluid', 'tag']);
|
15637 |
|
15638 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, fluid ? 'container-fluid' : 'container'), cssModule);
|
15639 |
|
15640 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
15641 | };
|
15642 |
|
15643 | Container.propTypes = propTypes;
|
15644 | Container.defaultProps = defaultProps;
|
15645 |
|
15646 | exports.default = Container;
|
15647 |
|
15648 | },
|
15649 |
|
15650 | function(module, exports, __webpack_require__) {
|
15651 |
|
15652 | 'use strict';
|
15653 |
|
15654 | Object.defineProperty(exports, "__esModule", {
|
15655 | value: true
|
15656 | });
|
15657 |
|
15658 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
15659 |
|
15660 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
15661 |
|
15662 | var _react = __webpack_require__(1);
|
15663 |
|
15664 | var _react2 = _interopRequireDefault(_react);
|
15665 |
|
15666 | var _classnames = __webpack_require__(2);
|
15667 |
|
15668 | var _classnames2 = _interopRequireDefault(_classnames);
|
15669 |
|
15670 | var _utils = __webpack_require__(3);
|
15671 |
|
15672 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15673 |
|
15674 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
15675 |
|
15676 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
15677 |
|
15678 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
15679 |
|
15680 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
15681 |
|
15682 | var propTypes = {
|
15683 | children: _react.PropTypes.node,
|
15684 | disabled: _react.PropTypes.bool,
|
15685 | divider: _react.PropTypes.bool,
|
15686 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
15687 | header: _react.PropTypes.bool,
|
15688 | onClick: _react.PropTypes.func,
|
15689 | className: _react.PropTypes.string,
|
15690 | cssModule: _react.PropTypes.object
|
15691 | };
|
15692 |
|
15693 | var contextTypes = {
|
15694 | toggle: _react.PropTypes.func
|
15695 | };
|
15696 |
|
15697 | var defaultProps = {
|
15698 | tag: 'button'
|
15699 | };
|
15700 |
|
15701 | var DropdownItem = function (_React$Component) {
|
15702 | _inherits(DropdownItem, _React$Component);
|
15703 |
|
15704 | function DropdownItem(props) {
|
15705 | _classCallCheck(this, DropdownItem);
|
15706 |
|
15707 | var _this = _possibleConstructorReturn(this, (DropdownItem.__proto__ || Object.getPrototypeOf(DropdownItem)).call(this, props));
|
15708 |
|
15709 | _this.onClick = _this.onClick.bind(_this);
|
15710 | _this.getTabIndex = _this.getTabIndex.bind(_this);
|
15711 | return _this;
|
15712 | }
|
15713 |
|
15714 | _createClass(DropdownItem, [{
|
15715 | key: 'onClick',
|
15716 | value: function onClick(e) {
|
15717 | if (this.props.disabled || this.props.header || this.props.divider) {
|
15718 | e.preventDefault();
|
15719 | return;
|
15720 | }
|
15721 |
|
15722 | if (this.props.onClick) {
|
15723 | this.props.onClick(e);
|
15724 | }
|
15725 |
|
15726 | this.context.toggle();
|
15727 | }
|
15728 | }, {
|
15729 | key: 'getTabIndex',
|
15730 | value: function getTabIndex() {
|
15731 | if (this.props.disabled || this.props.header || this.props.divider) {
|
15732 | return '-1';
|
15733 | }
|
15734 |
|
15735 | return '0';
|
15736 | }
|
15737 | }, {
|
15738 | key: 'render',
|
15739 | value: function render() {
|
15740 | var tabIndex = this.getTabIndex();
|
15741 |
|
15742 | var _props = this.props,
|
15743 | className = _props.className,
|
15744 | cssModule = _props.cssModule,
|
15745 | divider = _props.divider,
|
15746 | Tag = _props.tag,
|
15747 | header = _props.header,
|
15748 | props = _objectWithoutProperties(_props, ['className', 'cssModule', 'divider', 'tag', 'header']);
|
15749 |
|
15750 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, {
|
15751 | disabled: props.disabled,
|
15752 | 'dropdown-item': !divider && !header,
|
15753 | 'dropdown-header': header,
|
15754 | 'dropdown-divider': divider
|
15755 | }), cssModule);
|
15756 |
|
15757 | if (Tag === 'button') {
|
15758 | if (header) {
|
15759 | Tag = 'h6';
|
15760 | } else if (divider) {
|
15761 | Tag = 'div';
|
15762 | }
|
15763 | }
|
15764 |
|
15765 | return _react2.default.createElement(Tag, _extends({}, props, {
|
15766 | tabIndex: tabIndex,
|
15767 | className: classes,
|
15768 | onClick: this.onClick
|
15769 | }));
|
15770 | }
|
15771 | }]);
|
15772 |
|
15773 | return DropdownItem;
|
15774 | }(_react2.default.Component);
|
15775 |
|
15776 | DropdownItem.propTypes = propTypes;
|
15777 | DropdownItem.defaultProps = defaultProps;
|
15778 | DropdownItem.contextTypes = contextTypes;
|
15779 |
|
15780 | exports.default = DropdownItem;
|
15781 |
|
15782 | },
|
15783 |
|
15784 | function(module, exports, __webpack_require__) {
|
15785 |
|
15786 | 'use strict';
|
15787 |
|
15788 | Object.defineProperty(exports, "__esModule", {
|
15789 | value: true
|
15790 | });
|
15791 |
|
15792 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
15793 |
|
15794 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
15795 |
|
15796 | var _react = __webpack_require__(1);
|
15797 |
|
15798 | var _react2 = _interopRequireDefault(_react);
|
15799 |
|
15800 | var _classnames = __webpack_require__(2);
|
15801 |
|
15802 | var _classnames2 = _interopRequireDefault(_classnames);
|
15803 |
|
15804 | var _utils = __webpack_require__(3);
|
15805 |
|
15806 | var _Button = __webpack_require__(38);
|
15807 |
|
15808 | var _Button2 = _interopRequireDefault(_Button);
|
15809 |
|
15810 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15811 |
|
15812 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
15813 |
|
15814 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
15815 |
|
15816 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
15817 |
|
15818 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
15819 |
|
15820 | var propTypes = {
|
15821 | caret: _react.PropTypes.bool,
|
15822 | children: _react.PropTypes.node,
|
15823 | className: _react.PropTypes.string,
|
15824 | cssModule: _react.PropTypes.object,
|
15825 | disabled: _react.PropTypes.bool,
|
15826 | onClick: _react.PropTypes.func,
|
15827 | 'data-toggle': _react.PropTypes.string,
|
15828 | 'aria-haspopup': _react.PropTypes.bool,
|
15829 | split: _react.PropTypes.bool,
|
15830 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
15831 | nav: _react.PropTypes.bool
|
15832 | };
|
15833 |
|
15834 | var defaultProps = {
|
15835 | 'data-toggle': 'dropdown',
|
15836 | 'aria-haspopup': true,
|
15837 | color: 'secondary'
|
15838 | };
|
15839 |
|
15840 | var contextTypes = {
|
15841 | isOpen: _react.PropTypes.bool.isRequired,
|
15842 | toggle: _react.PropTypes.func.isRequired
|
15843 | };
|
15844 |
|
15845 | var DropdownToggle = function (_React$Component) {
|
15846 | _inherits(DropdownToggle, _React$Component);
|
15847 |
|
15848 | function DropdownToggle(props) {
|
15849 | _classCallCheck(this, DropdownToggle);
|
15850 |
|
15851 | var _this = _possibleConstructorReturn(this, (DropdownToggle.__proto__ || Object.getPrototypeOf(DropdownToggle)).call(this, props));
|
15852 |
|
15853 | _this.onClick = _this.onClick.bind(_this);
|
15854 | return _this;
|
15855 | }
|
15856 |
|
15857 | _createClass(DropdownToggle, [{
|
15858 | key: 'onClick',
|
15859 | value: function onClick(e) {
|
15860 | if (this.props.disabled) {
|
15861 | e.preventDefault();
|
15862 | return;
|
15863 | }
|
15864 |
|
15865 | if (this.props.nav && !this.props.tag) {
|
15866 | e.preventDefault();
|
15867 | }
|
15868 |
|
15869 | if (this.props.onClick) {
|
15870 | this.props.onClick(e);
|
15871 | }
|
15872 |
|
15873 | this.context.toggle();
|
15874 | }
|
15875 | }, {
|
15876 | key: 'render',
|
15877 | value: function render() {
|
15878 | var _props = this.props,
|
15879 | className = _props.className,
|
15880 | cssModule = _props.cssModule,
|
15881 | caret = _props.caret,
|
15882 | split = _props.split,
|
15883 | nav = _props.nav,
|
15884 | tag = _props.tag,
|
15885 | props = _objectWithoutProperties(_props, ['className', 'cssModule', 'caret', 'split', 'nav', 'tag']);
|
15886 |
|
15887 | var ariaLabel = props['aria-label'] || 'Toggle Dropdown';
|
15888 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, {
|
15889 | 'dropdown-toggle': caret || split,
|
15890 | 'dropdown-toggle-split': split,
|
15891 | active: this.context.isOpen,
|
15892 | 'nav-link': nav
|
15893 | }), cssModule);
|
15894 | var children = props.children || _react2.default.createElement(
|
15895 | 'span',
|
15896 | { className: 'sr-only' },
|
15897 | ariaLabel
|
15898 | );
|
15899 |
|
15900 | var Tag = void 0;
|
15901 |
|
15902 | if (nav && !tag) {
|
15903 | Tag = 'a';
|
15904 | props.href = '#';
|
15905 | } else if (!tag) {
|
15906 | Tag = _Button2.default;
|
15907 | } else {
|
15908 | Tag = tag;
|
15909 | }
|
15910 |
|
15911 | return _react2.default.createElement(Tag, _extends({}, props, {
|
15912 | className: classes,
|
15913 | onClick: this.onClick,
|
15914 | 'aria-haspopup': 'true',
|
15915 | 'aria-expanded': this.context.isOpen,
|
15916 | children: children
|
15917 | }));
|
15918 | }
|
15919 | }]);
|
15920 |
|
15921 | return DropdownToggle;
|
15922 | }(_react2.default.Component);
|
15923 |
|
15924 | DropdownToggle.propTypes = propTypes;
|
15925 | DropdownToggle.defaultProps = defaultProps;
|
15926 | DropdownToggle.contextTypes = contextTypes;
|
15927 |
|
15928 | exports.default = DropdownToggle;
|
15929 |
|
15930 | },
|
15931 |
|
15932 | function(module, exports, __webpack_require__) {
|
15933 |
|
15934 | 'use strict';
|
15935 |
|
15936 | Object.defineProperty(exports, "__esModule", {
|
15937 | value: true
|
15938 | });
|
15939 |
|
15940 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
15941 |
|
15942 | var _react = __webpack_require__(1);
|
15943 |
|
15944 | var _react2 = _interopRequireDefault(_react);
|
15945 |
|
15946 | var _classnames = __webpack_require__(2);
|
15947 |
|
15948 | var _classnames2 = _interopRequireDefault(_classnames);
|
15949 |
|
15950 | var _utils = __webpack_require__(3);
|
15951 |
|
15952 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15953 |
|
15954 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
15955 |
|
15956 | var propTypes = {
|
15957 | children: _react.PropTypes.node,
|
15958 | inline: _react.PropTypes.bool,
|
15959 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
15960 | getRef: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
15961 | className: _react.PropTypes.string,
|
15962 | cssModule: _react.PropTypes.object
|
15963 | };
|
15964 |
|
15965 | var defaultProps = {
|
15966 | tag: 'form'
|
15967 | };
|
15968 |
|
15969 | var Form = function Form(props) {
|
15970 | var className = props.className,
|
15971 | cssModule = props.cssModule,
|
15972 | inline = props.inline,
|
15973 | Tag = props.tag,
|
15974 | getRef = props.getRef,
|
15975 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'inline', 'tag', 'getRef']);
|
15976 |
|
15977 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, inline ? 'form-inline' : false), cssModule);
|
15978 |
|
15979 | return _react2.default.createElement(Tag, _extends({}, attributes, { ref: getRef, className: classes }));
|
15980 | };
|
15981 |
|
15982 | Form.propTypes = propTypes;
|
15983 | Form.defaultProps = defaultProps;
|
15984 |
|
15985 | exports.default = Form;
|
15986 |
|
15987 | },
|
15988 |
|
15989 | function(module, exports, __webpack_require__) {
|
15990 |
|
15991 | 'use strict';
|
15992 |
|
15993 | Object.defineProperty(exports, "__esModule", {
|
15994 | value: true
|
15995 | });
|
15996 |
|
15997 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
15998 |
|
15999 | var _react = __webpack_require__(1);
|
16000 |
|
16001 | var _react2 = _interopRequireDefault(_react);
|
16002 |
|
16003 | var _classnames = __webpack_require__(2);
|
16004 |
|
16005 | var _classnames2 = _interopRequireDefault(_classnames);
|
16006 |
|
16007 | var _utils = __webpack_require__(3);
|
16008 |
|
16009 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16010 |
|
16011 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16012 |
|
16013 | var propTypes = {
|
16014 | children: _react.PropTypes.node,
|
16015 | tag: _react.PropTypes.string,
|
16016 | className: _react.PropTypes.string,
|
16017 | cssModule: _react.PropTypes.object
|
16018 | };
|
16019 |
|
16020 | var defaultProps = {
|
16021 | tag: 'div'
|
16022 | };
|
16023 |
|
16024 | var FormFeedback = function FormFeedback(props) {
|
16025 | var className = props.className,
|
16026 | cssModule = props.cssModule,
|
16027 | Tag = props.tag,
|
16028 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
16029 |
|
16030 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'form-control-feedback'), cssModule);
|
16031 |
|
16032 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
16033 | };
|
16034 |
|
16035 | FormFeedback.propTypes = propTypes;
|
16036 | FormFeedback.defaultProps = defaultProps;
|
16037 |
|
16038 | exports.default = FormFeedback;
|
16039 |
|
16040 | },
|
16041 |
|
16042 | function(module, exports, __webpack_require__) {
|
16043 |
|
16044 | 'use strict';
|
16045 |
|
16046 | Object.defineProperty(exports, "__esModule", {
|
16047 | value: true
|
16048 | });
|
16049 |
|
16050 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
16051 |
|
16052 | var _react = __webpack_require__(1);
|
16053 |
|
16054 | var _react2 = _interopRequireDefault(_react);
|
16055 |
|
16056 | var _classnames = __webpack_require__(2);
|
16057 |
|
16058 | var _classnames2 = _interopRequireDefault(_classnames);
|
16059 |
|
16060 | var _utils = __webpack_require__(3);
|
16061 |
|
16062 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16063 |
|
16064 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16065 |
|
16066 | var propTypes = {
|
16067 | children: _react.PropTypes.node,
|
16068 | row: _react.PropTypes.bool,
|
16069 | check: _react.PropTypes.bool,
|
16070 | disabled: _react.PropTypes.bool,
|
16071 | tag: _react.PropTypes.string,
|
16072 | color: _react.PropTypes.string,
|
16073 | className: _react.PropTypes.string,
|
16074 | cssModule: _react.PropTypes.object
|
16075 | };
|
16076 |
|
16077 | var defaultProps = {
|
16078 | tag: 'div'
|
16079 | };
|
16080 |
|
16081 | var FormGroup = function FormGroup(props) {
|
16082 | var className = props.className,
|
16083 | cssModule = props.cssModule,
|
16084 | row = props.row,
|
16085 | disabled = props.disabled,
|
16086 | color = props.color,
|
16087 | check = props.check,
|
16088 | Tag = props.tag,
|
16089 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'row', 'disabled', 'color', 'check', 'tag']);
|
16090 |
|
16091 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, color ? 'has-' + color : false, row ? 'row' : false, check ? 'form-check' : 'form-group', check && disabled ? 'disabled' : false), cssModule);
|
16092 |
|
16093 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
16094 | };
|
16095 |
|
16096 | FormGroup.propTypes = propTypes;
|
16097 | FormGroup.defaultProps = defaultProps;
|
16098 |
|
16099 | exports.default = FormGroup;
|
16100 |
|
16101 | },
|
16102 |
|
16103 | function(module, exports, __webpack_require__) {
|
16104 |
|
16105 | 'use strict';
|
16106 |
|
16107 | Object.defineProperty(exports, "__esModule", {
|
16108 | value: true
|
16109 | });
|
16110 |
|
16111 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
16112 |
|
16113 | var _react = __webpack_require__(1);
|
16114 |
|
16115 | var _react2 = _interopRequireDefault(_react);
|
16116 |
|
16117 | var _classnames = __webpack_require__(2);
|
16118 |
|
16119 | var _classnames2 = _interopRequireDefault(_classnames);
|
16120 |
|
16121 | var _utils = __webpack_require__(3);
|
16122 |
|
16123 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16124 |
|
16125 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16126 |
|
16127 | var propTypes = {
|
16128 | children: _react.PropTypes.node,
|
16129 | inline: _react.PropTypes.bool,
|
16130 | tag: _react.PropTypes.string,
|
16131 | color: _react.PropTypes.string,
|
16132 | className: _react.PropTypes.string,
|
16133 | cssModule: _react.PropTypes.object
|
16134 | };
|
16135 |
|
16136 | var defaultProps = {
|
16137 | tag: 'small'
|
16138 | };
|
16139 |
|
16140 | var FormText = function FormText(props) {
|
16141 | var className = props.className,
|
16142 | cssModule = props.cssModule,
|
16143 | inline = props.inline,
|
16144 | color = props.color,
|
16145 | Tag = props.tag,
|
16146 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'inline', 'color', 'tag']);
|
16147 |
|
16148 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, !inline ? 'form-text' : false, color ? 'text-' + color : false), cssModule);
|
16149 |
|
16150 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
16151 | };
|
16152 |
|
16153 | FormText.propTypes = propTypes;
|
16154 | FormText.defaultProps = defaultProps;
|
16155 |
|
16156 | exports.default = FormText;
|
16157 |
|
16158 | },
|
16159 |
|
16160 | function(module, exports, __webpack_require__) {
|
16161 |
|
16162 | 'use strict';
|
16163 |
|
16164 | Object.defineProperty(exports, "__esModule", {
|
16165 | value: true
|
16166 | });
|
16167 |
|
16168 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
16169 |
|
16170 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
16171 |
|
16172 | var _react = __webpack_require__(1);
|
16173 |
|
16174 | var _react2 = _interopRequireDefault(_react);
|
16175 |
|
16176 | var _classnames = __webpack_require__(2);
|
16177 |
|
16178 | var _classnames2 = _interopRequireDefault(_classnames);
|
16179 |
|
16180 | var _utils = __webpack_require__(3);
|
16181 |
|
16182 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16183 |
|
16184 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16185 |
|
16186 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
16187 |
|
16188 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
16189 |
|
16190 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
16191 |
|
16192 | var propTypes = {
|
16193 | children: _react.PropTypes.node,
|
16194 | type: _react.PropTypes.string,
|
16195 | size: _react.PropTypes.string,
|
16196 | state: _react.PropTypes.string,
|
16197 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
16198 | getRef: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
16199 | static: _react.PropTypes.bool,
|
16200 | addon: _react.PropTypes.bool,
|
16201 | className: _react.PropTypes.string,
|
16202 | cssModule: _react.PropTypes.object
|
16203 | };
|
16204 |
|
16205 | var defaultProps = {
|
16206 | tag: 'p',
|
16207 | type: 'text'
|
16208 | };
|
16209 |
|
16210 | var Input = function (_React$Component) {
|
16211 | _inherits(Input, _React$Component);
|
16212 |
|
16213 | function Input() {
|
16214 | _classCallCheck(this, Input);
|
16215 |
|
16216 | return _possibleConstructorReturn(this, (Input.__proto__ || Object.getPrototypeOf(Input)).apply(this, arguments));
|
16217 | }
|
16218 |
|
16219 | _createClass(Input, [{
|
16220 | key: 'render',
|
16221 | value: function render() {
|
16222 | var _props = this.props,
|
16223 | className = _props.className,
|
16224 | cssModule = _props.cssModule,
|
16225 | type = _props.type,
|
16226 | size = _props.size,
|
16227 | state = _props.state,
|
16228 | tag = _props.tag,
|
16229 | addon = _props.addon,
|
16230 | staticInput = _props.static,
|
16231 | getRef = _props.getRef,
|
16232 | attributes = _objectWithoutProperties(_props, ['className', 'cssModule', 'type', 'size', 'state', 'tag', 'addon', 'static', 'getRef']);
|
16233 |
|
16234 | var checkInput = ['radio', 'checkbox'].indexOf(type) > -1;
|
16235 |
|
16236 | var fileInput = type === 'file';
|
16237 | var textareaInput = type === 'textarea';
|
16238 | var selectInput = type === 'select';
|
16239 | var Tag = selectInput || textareaInput ? type : 'input';
|
16240 |
|
16241 | var formControlClass = 'form-control';
|
16242 |
|
16243 | if (staticInput) {
|
16244 | formControlClass = formControlClass + '-static';
|
16245 | Tag = tag;
|
16246 | } else if (fileInput) {
|
16247 | formControlClass = formControlClass + '-file';
|
16248 | } else if (checkInput) {
|
16249 | if (addon) {
|
16250 | formControlClass = null;
|
16251 | } else {
|
16252 | formControlClass = 'form-check-input';
|
16253 | }
|
16254 | }
|
16255 |
|
16256 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, state ? 'form-control-' + state : false, size ? 'form-control-' + size : false, formControlClass), cssModule);
|
16257 |
|
16258 | if (Tag === 'input') {
|
16259 | attributes.type = type;
|
16260 | }
|
16261 |
|
16262 | return _react2.default.createElement(Tag, _extends({}, attributes, { ref: getRef, className: classes }));
|
16263 | }
|
16264 | }]);
|
16265 |
|
16266 | return Input;
|
16267 | }(_react2.default.Component);
|
16268 |
|
16269 | Input.propTypes = propTypes;
|
16270 | Input.defaultProps = defaultProps;
|
16271 |
|
16272 | exports.default = Input;
|
16273 |
|
16274 | },
|
16275 |
|
16276 | function(module, exports, __webpack_require__) {
|
16277 |
|
16278 | 'use strict';
|
16279 |
|
16280 | Object.defineProperty(exports, "__esModule", {
|
16281 | value: true
|
16282 | });
|
16283 |
|
16284 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
16285 |
|
16286 | var _react = __webpack_require__(1);
|
16287 |
|
16288 | var _react2 = _interopRequireDefault(_react);
|
16289 |
|
16290 | var _classnames = __webpack_require__(2);
|
16291 |
|
16292 | var _classnames2 = _interopRequireDefault(_classnames);
|
16293 |
|
16294 | var _utils = __webpack_require__(3);
|
16295 |
|
16296 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16297 |
|
16298 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16299 |
|
16300 | var propTypes = {
|
16301 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
16302 | size: _react.PropTypes.string,
|
16303 | className: _react.PropTypes.string,
|
16304 | cssModule: _react.PropTypes.object
|
16305 | };
|
16306 |
|
16307 | var defaultProps = {
|
16308 | tag: 'div'
|
16309 | };
|
16310 |
|
16311 | var InputGroup = function InputGroup(props) {
|
16312 | var className = props.className,
|
16313 | cssModule = props.cssModule,
|
16314 | Tag = props.tag,
|
16315 | size = props.size,
|
16316 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'size']);
|
16317 |
|
16318 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'input-group', size ? 'input-group-' + size : null), cssModule);
|
16319 |
|
16320 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
16321 | };
|
16322 |
|
16323 | InputGroup.propTypes = propTypes;
|
16324 | InputGroup.defaultProps = defaultProps;
|
16325 |
|
16326 | exports.default = InputGroup;
|
16327 |
|
16328 | },
|
16329 |
|
16330 | function(module, exports, __webpack_require__) {
|
16331 |
|
16332 | 'use strict';
|
16333 |
|
16334 | Object.defineProperty(exports, "__esModule", {
|
16335 | value: true
|
16336 | });
|
16337 |
|
16338 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
16339 |
|
16340 | var _react = __webpack_require__(1);
|
16341 |
|
16342 | var _react2 = _interopRequireDefault(_react);
|
16343 |
|
16344 | var _classnames = __webpack_require__(2);
|
16345 |
|
16346 | var _classnames2 = _interopRequireDefault(_classnames);
|
16347 |
|
16348 | var _utils = __webpack_require__(3);
|
16349 |
|
16350 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16351 |
|
16352 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16353 |
|
16354 | var propTypes = {
|
16355 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
16356 | className: _react.PropTypes.string,
|
16357 | cssModule: _react.PropTypes.object
|
16358 | };
|
16359 |
|
16360 | var defaultProps = {
|
16361 | tag: 'div'
|
16362 | };
|
16363 |
|
16364 | var InputGroupAddon = function InputGroupAddon(props) {
|
16365 | var className = props.className,
|
16366 | cssModule = props.cssModule,
|
16367 | Tag = props.tag,
|
16368 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
16369 |
|
16370 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'input-group-addon'), cssModule);
|
16371 |
|
16372 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
16373 | };
|
16374 |
|
16375 | InputGroupAddon.propTypes = propTypes;
|
16376 | InputGroupAddon.defaultProps = defaultProps;
|
16377 |
|
16378 | exports.default = InputGroupAddon;
|
16379 |
|
16380 | },
|
16381 |
|
16382 | function(module, exports, __webpack_require__) {
|
16383 |
|
16384 | 'use strict';
|
16385 |
|
16386 | Object.defineProperty(exports, "__esModule", {
|
16387 | value: true
|
16388 | });
|
16389 |
|
16390 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
16391 |
|
16392 | var _react = __webpack_require__(1);
|
16393 |
|
16394 | var _react2 = _interopRequireDefault(_react);
|
16395 |
|
16396 | var _classnames = __webpack_require__(2);
|
16397 |
|
16398 | var _classnames2 = _interopRequireDefault(_classnames);
|
16399 |
|
16400 | var _utils = __webpack_require__(3);
|
16401 |
|
16402 | var _Button = __webpack_require__(38);
|
16403 |
|
16404 | var _Button2 = _interopRequireDefault(_Button);
|
16405 |
|
16406 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16407 |
|
16408 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16409 |
|
16410 | var propTypes = {
|
16411 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
16412 | children: _react.PropTypes.node,
|
16413 | groupClassName: _react.PropTypes.string,
|
16414 | groupAttributes: _react.PropTypes.object,
|
16415 | className: _react.PropTypes.string,
|
16416 | cssModule: _react.PropTypes.object
|
16417 | };
|
16418 |
|
16419 | var defaultProps = {
|
16420 | tag: 'div'
|
16421 | };
|
16422 |
|
16423 | var InputGroupButton = function InputGroupButton(props) {
|
16424 | var className = props.className,
|
16425 | cssModule = props.cssModule,
|
16426 | Tag = props.tag,
|
16427 | children = props.children,
|
16428 | groupClassName = props.groupClassName,
|
16429 | groupAttributes = props.groupAttributes,
|
16430 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'children', 'groupClassName', 'groupAttributes']);
|
16431 |
|
16432 | if (typeof children === 'string') {
|
16433 | var groupClasses = (0, _utils.mapToCssModules)((0, _classnames2.default)(groupClassName, 'input-group-btn'), cssModule);
|
16434 |
|
16435 | return _react2.default.createElement(
|
16436 | Tag,
|
16437 | _extends({}, groupAttributes, { className: groupClasses }),
|
16438 | _react2.default.createElement(_Button2.default, _extends({}, attributes, { className: className, children: children }))
|
16439 | );
|
16440 | }
|
16441 |
|
16442 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'input-group-btn'), cssModule);
|
16443 |
|
16444 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes, children: children }));
|
16445 | };
|
16446 |
|
16447 | InputGroupButton.propTypes = propTypes;
|
16448 | InputGroupButton.defaultProps = defaultProps;
|
16449 |
|
16450 | exports.default = InputGroupButton;
|
16451 |
|
16452 | },
|
16453 |
|
16454 | function(module, exports, __webpack_require__) {
|
16455 |
|
16456 | 'use strict';
|
16457 |
|
16458 | Object.defineProperty(exports, "__esModule", {
|
16459 | value: true
|
16460 | });
|
16461 |
|
16462 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
16463 |
|
16464 | var _react = __webpack_require__(1);
|
16465 |
|
16466 | var _react2 = _interopRequireDefault(_react);
|
16467 |
|
16468 | var _classnames = __webpack_require__(2);
|
16469 |
|
16470 | var _classnames2 = _interopRequireDefault(_classnames);
|
16471 |
|
16472 | var _utils = __webpack_require__(3);
|
16473 |
|
16474 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16475 |
|
16476 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16477 |
|
16478 | var propTypes = {
|
16479 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
16480 | fluid: _react.PropTypes.bool,
|
16481 | className: _react.PropTypes.string,
|
16482 | cssModule: _react.PropTypes.object
|
16483 | };
|
16484 |
|
16485 | var defaultProps = {
|
16486 | tag: 'div'
|
16487 | };
|
16488 |
|
16489 | var Jumbotron = function Jumbotron(props) {
|
16490 | var className = props.className,
|
16491 | cssModule = props.cssModule,
|
16492 | Tag = props.tag,
|
16493 | fluid = props.fluid,
|
16494 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'fluid']);
|
16495 |
|
16496 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'jumbotron', fluid ? 'jumbotron-fluid' : false), cssModule);
|
16497 |
|
16498 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
16499 | };
|
16500 |
|
16501 | Jumbotron.propTypes = propTypes;
|
16502 | Jumbotron.defaultProps = defaultProps;
|
16503 |
|
16504 | exports.default = Jumbotron;
|
16505 |
|
16506 | },
|
16507 |
|
16508 | function(module, exports, __webpack_require__) {
|
16509 |
|
16510 | 'use strict';
|
16511 |
|
16512 | Object.defineProperty(exports, "__esModule", {
|
16513 | value: true
|
16514 | });
|
16515 |
|
16516 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
16517 |
|
16518 | var _react = __webpack_require__(1);
|
16519 |
|
16520 | var _react2 = _interopRequireDefault(_react);
|
16521 |
|
16522 | var _classnames = __webpack_require__(2);
|
16523 |
|
16524 | var _classnames2 = _interopRequireDefault(_classnames);
|
16525 |
|
16526 | var _utils = __webpack_require__(3);
|
16527 |
|
16528 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16529 |
|
16530 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
16531 |
|
16532 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16533 |
|
16534 | var colSizes = ['xs', 'sm', 'md', 'lg', 'xl'];
|
16535 |
|
16536 | var stringOrNumberProp = _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string]);
|
16537 |
|
16538 | var columnProps = _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number, _react.PropTypes.shape({
|
16539 | size: stringOrNumberProp,
|
16540 | push: stringOrNumberProp,
|
16541 | pull: stringOrNumberProp,
|
16542 | offset: stringOrNumberProp
|
16543 | })]);
|
16544 |
|
16545 | var propTypes = {
|
16546 | children: _react.PropTypes.node,
|
16547 | hidden: _react.PropTypes.bool,
|
16548 | check: _react.PropTypes.bool,
|
16549 | inline: _react.PropTypes.bool,
|
16550 | disabled: _react.PropTypes.bool,
|
16551 | size: _react.PropTypes.string,
|
16552 | for: _react.PropTypes.string,
|
16553 | tag: _react.PropTypes.string,
|
16554 | className: _react.PropTypes.string,
|
16555 | cssModule: _react.PropTypes.object,
|
16556 | xs: columnProps,
|
16557 | sm: columnProps,
|
16558 | md: columnProps,
|
16559 | lg: columnProps,
|
16560 | xl: columnProps
|
16561 | };
|
16562 |
|
16563 | var defaultProps = {
|
16564 | tag: 'label'
|
16565 | };
|
16566 |
|
16567 | var Label = function Label(props) {
|
16568 | var className = props.className,
|
16569 | cssModule = props.cssModule,
|
16570 | hidden = props.hidden,
|
16571 | Tag = props.tag,
|
16572 | check = props.check,
|
16573 | inline = props.inline,
|
16574 | disabled = props.disabled,
|
16575 | size = props.size,
|
16576 | htmlFor = props.for,
|
16577 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'hidden', 'tag', 'check', 'inline', 'disabled', 'size', 'for']);
|
16578 |
|
16579 | var colClasses = [];
|
16580 |
|
16581 | colSizes.forEach(function (colSize) {
|
16582 | var columnProp = props[colSize];
|
16583 | delete attributes[colSize];
|
16584 |
|
16585 | if (columnProp && columnProp.size) {
|
16586 | var _classNames;
|
16587 |
|
16588 | colClasses.push((0, _utils.mapToCssModules)((0, _classnames2.default)((_classNames = {}, _defineProperty(_classNames, 'col-' + colSize + '-' + columnProp.size, columnProp.size), _defineProperty(_classNames, 'push-' + colSize + '-' + columnProp.push, columnProp.push), _defineProperty(_classNames, 'pull-' + colSize + '-' + columnProp.pull, columnProp.pull), _defineProperty(_classNames, 'offset-' + colSize + '-' + columnProp.offset, columnProp.offset), _classNames))), cssModule);
|
16589 | } else if (columnProp) {
|
16590 | colClasses.push('col-' + colSize + '-' + columnProp);
|
16591 | }
|
16592 | });
|
16593 |
|
16594 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, hidden ? 'sr-only' : false, check ? 'form-check-' + (inline ? 'inline' : 'label') : false, check && inline && disabled ? 'disabled' : false, size ? 'col-form-label-' + size : false, colClasses, colClasses.length ? 'col-form-label' : false), cssModule);
|
16595 |
|
16596 | return _react2.default.createElement(Tag, _extends({ htmlFor: htmlFor }, attributes, { className: classes }));
|
16597 | };
|
16598 |
|
16599 | Label.propTypes = propTypes;
|
16600 | Label.defaultProps = defaultProps;
|
16601 |
|
16602 | exports.default = Label;
|
16603 |
|
16604 | },
|
16605 |
|
16606 | function(module, exports, __webpack_require__) {
|
16607 |
|
16608 | 'use strict';
|
16609 |
|
16610 | Object.defineProperty(exports, "__esModule", {
|
16611 | value: true
|
16612 | });
|
16613 |
|
16614 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
16615 |
|
16616 | var _react = __webpack_require__(1);
|
16617 |
|
16618 | var _react2 = _interopRequireDefault(_react);
|
16619 |
|
16620 | var _classnames = __webpack_require__(2);
|
16621 |
|
16622 | var _classnames2 = _interopRequireDefault(_classnames);
|
16623 |
|
16624 | var _utils = __webpack_require__(3);
|
16625 |
|
16626 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16627 |
|
16628 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16629 |
|
16630 | var propTypes = {
|
16631 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
16632 | flush: _react.PropTypes.bool,
|
16633 | className: _react.PropTypes.string,
|
16634 | cssModule: _react.PropTypes.object
|
16635 | };
|
16636 |
|
16637 | var defaultProps = {
|
16638 | tag: 'ul'
|
16639 | };
|
16640 |
|
16641 | var ListGroup = function ListGroup(props) {
|
16642 | var className = props.className,
|
16643 | cssModule = props.cssModule,
|
16644 | Tag = props.tag,
|
16645 | flush = props.flush,
|
16646 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag', 'flush']);
|
16647 |
|
16648 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'list-group', flush ? 'list-group-flush' : false), cssModule);
|
16649 |
|
16650 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
16651 | };
|
16652 |
|
16653 | ListGroup.propTypes = propTypes;
|
16654 | ListGroup.defaultProps = defaultProps;
|
16655 |
|
16656 | exports.default = ListGroup;
|
16657 |
|
16658 | },
|
16659 |
|
16660 | function(module, exports, __webpack_require__) {
|
16661 |
|
16662 | 'use strict';
|
16663 |
|
16664 | Object.defineProperty(exports, "__esModule", {
|
16665 | value: true
|
16666 | });
|
16667 |
|
16668 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
16669 |
|
16670 | var _react = __webpack_require__(1);
|
16671 |
|
16672 | var _react2 = _interopRequireDefault(_react);
|
16673 |
|
16674 | var _classnames = __webpack_require__(2);
|
16675 |
|
16676 | var _classnames2 = _interopRequireDefault(_classnames);
|
16677 |
|
16678 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16679 |
|
16680 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16681 |
|
16682 | var propTypes = {
|
16683 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
16684 | active: _react.PropTypes.bool,
|
16685 | disabled: _react.PropTypes.bool,
|
16686 | color: _react.PropTypes.string,
|
16687 | action: _react.PropTypes.bool,
|
16688 | className: _react.PropTypes.any
|
16689 | };
|
16690 |
|
16691 | var defaultProps = {
|
16692 | tag: 'li'
|
16693 | };
|
16694 |
|
16695 | var handleDisabledOnClick = function handleDisabledOnClick(e) {
|
16696 | e.preventDefault();
|
16697 | };
|
16698 |
|
16699 | var ListGroupItem = function ListGroupItem(props) {
|
16700 | var className = props.className,
|
16701 | Tag = props.tag,
|
16702 | active = props.active,
|
16703 | disabled = props.disabled,
|
16704 | action = props.action,
|
16705 | color = props.color,
|
16706 | attributes = _objectWithoutProperties(props, ['className', 'tag', 'active', 'disabled', 'action', 'color']);
|
16707 |
|
16708 | var classes = (0, _classnames2.default)(className, active ? 'active' : false, disabled ? 'disabled' : false, action ? 'list-group-item-action' : false, color ? 'list-group-item-' + color : false, 'list-group-item');
|
16709 |
|
16710 |
|
16711 | if (disabled) {
|
16712 | attributes.onClick = handleDisabledOnClick;
|
16713 | }
|
16714 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
16715 | };
|
16716 |
|
16717 | ListGroupItem.propTypes = propTypes;
|
16718 | ListGroupItem.defaultProps = defaultProps;
|
16719 |
|
16720 | exports.default = ListGroupItem;
|
16721 |
|
16722 | },
|
16723 |
|
16724 | function(module, exports, __webpack_require__) {
|
16725 |
|
16726 | 'use strict';
|
16727 |
|
16728 | Object.defineProperty(exports, "__esModule", {
|
16729 | value: true
|
16730 | });
|
16731 |
|
16732 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
16733 |
|
16734 | var _react = __webpack_require__(1);
|
16735 |
|
16736 | var _react2 = _interopRequireDefault(_react);
|
16737 |
|
16738 | var _classnames = __webpack_require__(2);
|
16739 |
|
16740 | var _classnames2 = _interopRequireDefault(_classnames);
|
16741 |
|
16742 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16743 |
|
16744 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16745 |
|
16746 | var propTypes = {
|
16747 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
16748 | className: _react.PropTypes.any
|
16749 | };
|
16750 |
|
16751 | var defaultProps = {
|
16752 | tag: 'h5'
|
16753 | };
|
16754 |
|
16755 | var ListGroupItemHeading = function ListGroupItemHeading(props) {
|
16756 | var className = props.className,
|
16757 | Tag = props.tag,
|
16758 | attributes = _objectWithoutProperties(props, ['className', 'tag']);
|
16759 |
|
16760 | var classes = (0, _classnames2.default)(className, 'list-group-item-heading');
|
16761 |
|
16762 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
16763 | };
|
16764 |
|
16765 | ListGroupItemHeading.propTypes = propTypes;
|
16766 | ListGroupItemHeading.defaultProps = defaultProps;
|
16767 |
|
16768 | exports.default = ListGroupItemHeading;
|
16769 |
|
16770 | },
|
16771 |
|
16772 | function(module, exports, __webpack_require__) {
|
16773 |
|
16774 | 'use strict';
|
16775 |
|
16776 | Object.defineProperty(exports, "__esModule", {
|
16777 | value: true
|
16778 | });
|
16779 |
|
16780 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
16781 |
|
16782 | var _react = __webpack_require__(1);
|
16783 |
|
16784 | var _react2 = _interopRequireDefault(_react);
|
16785 |
|
16786 | var _classnames = __webpack_require__(2);
|
16787 |
|
16788 | var _classnames2 = _interopRequireDefault(_classnames);
|
16789 |
|
16790 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16791 |
|
16792 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16793 |
|
16794 | var propTypes = {
|
16795 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
16796 | className: _react.PropTypes.any
|
16797 | };
|
16798 |
|
16799 | var defaultProps = {
|
16800 | tag: 'p'
|
16801 | };
|
16802 |
|
16803 | var ListGroupItemText = function ListGroupItemText(props) {
|
16804 | var className = props.className,
|
16805 | Tag = props.tag,
|
16806 | attributes = _objectWithoutProperties(props, ['className', 'tag']);
|
16807 |
|
16808 | var classes = (0, _classnames2.default)(className, 'list-group-item-text');
|
16809 |
|
16810 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
16811 | };
|
16812 |
|
16813 | ListGroupItemText.propTypes = propTypes;
|
16814 | ListGroupItemText.defaultProps = defaultProps;
|
16815 |
|
16816 | exports.default = ListGroupItemText;
|
16817 |
|
16818 | },
|
16819 |
|
16820 | function(module, exports, __webpack_require__) {
|
16821 |
|
16822 | 'use strict';
|
16823 |
|
16824 | Object.defineProperty(exports, "__esModule", {
|
16825 | value: true
|
16826 | });
|
16827 |
|
16828 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
16829 |
|
16830 | var _react = __webpack_require__(1);
|
16831 |
|
16832 | var _react2 = _interopRequireDefault(_react);
|
16833 |
|
16834 | var _classnames = __webpack_require__(2);
|
16835 |
|
16836 | var _classnames2 = _interopRequireDefault(_classnames);
|
16837 |
|
16838 | var _utils = __webpack_require__(3);
|
16839 |
|
16840 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16841 |
|
16842 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16843 |
|
16844 | var propTypes = {
|
16845 | body: _react.PropTypes.bool,
|
16846 | bottom: _react.PropTypes.bool,
|
16847 | children: _react.PropTypes.node,
|
16848 | className: _react.PropTypes.string,
|
16849 | cssModule: _react.PropTypes.object,
|
16850 | heading: _react.PropTypes.bool,
|
16851 | left: _react.PropTypes.bool,
|
16852 | list: _react.PropTypes.bool,
|
16853 | middle: _react.PropTypes.bool,
|
16854 | object: _react.PropTypes.bool,
|
16855 | right: _react.PropTypes.bool,
|
16856 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
16857 | top: _react.PropTypes.bool
|
16858 | };
|
16859 |
|
16860 | var Media = function Media(props) {
|
16861 | var body = props.body,
|
16862 | bottom = props.bottom,
|
16863 | className = props.className,
|
16864 | cssModule = props.cssModule,
|
16865 | heading = props.heading,
|
16866 | left = props.left,
|
16867 | list = props.list,
|
16868 | middle = props.middle,
|
16869 | object = props.object,
|
16870 | right = props.right,
|
16871 | tag = props.tag,
|
16872 | top = props.top,
|
16873 | attributes = _objectWithoutProperties(props, ['body', 'bottom', 'className', 'cssModule', 'heading', 'left', 'list', 'middle', 'object', 'right', 'tag', 'top']);
|
16874 |
|
16875 | var defaultTag = void 0;
|
16876 | if (heading) {
|
16877 | defaultTag = 'h4';
|
16878 | } else if (left || right) {
|
16879 | defaultTag = 'a';
|
16880 | } else if (object) {
|
16881 | defaultTag = 'img';
|
16882 | } else if (list) {
|
16883 | defaultTag = 'ul';
|
16884 | } else {
|
16885 | defaultTag = 'div';
|
16886 | }
|
16887 | var Tag = tag || defaultTag;
|
16888 |
|
16889 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, {
|
16890 | 'media-body': body,
|
16891 | 'media-heading': heading,
|
16892 | 'media-left': left,
|
16893 | 'media-right': right,
|
16894 | 'media-top': top,
|
16895 | 'media-bottom': bottom,
|
16896 | 'media-middle': middle,
|
16897 | 'media-object': object,
|
16898 | 'media-list': list,
|
16899 | media: !body && !heading && !left && !right && !top && !bottom && !middle && !object && !list
|
16900 | }), cssModule);
|
16901 |
|
16902 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
16903 | };
|
16904 |
|
16905 | Media.propTypes = propTypes;
|
16906 |
|
16907 | exports.default = Media;
|
16908 |
|
16909 | },
|
16910 |
|
16911 | function(module, exports, __webpack_require__) {
|
16912 |
|
16913 | 'use strict';
|
16914 |
|
16915 | Object.defineProperty(exports, "__esModule", {
|
16916 | value: true
|
16917 | });
|
16918 |
|
16919 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
16920 |
|
16921 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
16922 |
|
16923 | var _react = __webpack_require__(1);
|
16924 |
|
16925 | var _react2 = _interopRequireDefault(_react);
|
16926 |
|
16927 | var _reactDom = __webpack_require__(60);
|
16928 |
|
16929 | var _reactDom2 = _interopRequireDefault(_reactDom);
|
16930 |
|
16931 | var _classnames = __webpack_require__(2);
|
16932 |
|
16933 | var _classnames2 = _interopRequireDefault(_classnames);
|
16934 |
|
16935 | var _lodash = __webpack_require__(18);
|
16936 |
|
16937 | var _lodash2 = _interopRequireDefault(_lodash);
|
16938 |
|
16939 | var _reactAddonsTransitionGroup = __webpack_require__(268);
|
16940 |
|
16941 | var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup);
|
16942 |
|
16943 | var _Fade = __webpack_require__(64);
|
16944 |
|
16945 | var _Fade2 = _interopRequireDefault(_Fade);
|
16946 |
|
16947 | var _utils = __webpack_require__(3);
|
16948 |
|
16949 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16950 |
|
16951 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
16952 |
|
16953 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
16954 |
|
16955 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
16956 |
|
16957 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
16958 |
|
16959 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
16960 |
|
16961 | var propTypes = {
|
16962 | isOpen: _react.PropTypes.bool,
|
16963 | size: _react.PropTypes.string,
|
16964 | toggle: _react.PropTypes.func,
|
16965 | keyboard: _react.PropTypes.bool,
|
16966 | backdrop: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.oneOf(['static'])]),
|
16967 | onEnter: _react.PropTypes.func,
|
16968 | onExit: _react.PropTypes.func,
|
16969 | children: _react.PropTypes.node,
|
16970 | className: _react.PropTypes.string,
|
16971 | wrapClassName: _react.PropTypes.string,
|
16972 | modalClassName: _react.PropTypes.string,
|
16973 | backdropClassName: _react.PropTypes.string,
|
16974 | contentClassName: _react.PropTypes.string,
|
16975 | cssModule: _react.PropTypes.object,
|
16976 | zIndex: _react.PropTypes.oneOfType([_react.PropTypes.number, _react.PropTypes.string])
|
16977 | };
|
16978 |
|
16979 | var defaultProps = {
|
16980 | isOpen: false,
|
16981 | backdrop: true,
|
16982 | keyboard: true,
|
16983 | zIndex: 1050
|
16984 | };
|
16985 |
|
16986 | var Modal = function (_React$Component) {
|
16987 | _inherits(Modal, _React$Component);
|
16988 |
|
16989 | function Modal(props) {
|
16990 | _classCallCheck(this, Modal);
|
16991 |
|
16992 | var _this = _possibleConstructorReturn(this, (Modal.__proto__ || Object.getPrototypeOf(Modal)).call(this, props));
|
16993 |
|
16994 | _this.originalBodyPadding = null;
|
16995 | _this.isBodyOverflowing = false;
|
16996 | _this.togglePortal = _this.togglePortal.bind(_this);
|
16997 | _this.handleBackdropClick = _this.handleBackdropClick.bind(_this);
|
16998 | _this.handleEscape = _this.handleEscape.bind(_this);
|
16999 | _this.destroy = _this.destroy.bind(_this);
|
17000 | _this.onEnter = _this.onEnter.bind(_this);
|
17001 | _this.onExit = _this.onExit.bind(_this);
|
17002 | return _this;
|
17003 | }
|
17004 |
|
17005 | _createClass(Modal, [{
|
17006 | key: 'componentDidMount',
|
17007 | value: function componentDidMount() {
|
17008 | if (this.props.isOpen) {
|
17009 | this.togglePortal();
|
17010 | }
|
17011 | }
|
17012 | }, {
|
17013 | key: 'componentDidUpdate',
|
17014 | value: function componentDidUpdate(prevProps) {
|
17015 | if (this.props.isOpen !== prevProps.isOpen) {
|
17016 |
|
17017 | this.togglePortal();
|
17018 | } else if (this._element) {
|
17019 |
|
17020 | this.renderIntoSubtree();
|
17021 | }
|
17022 | }
|
17023 | }, {
|
17024 | key: 'componentWillUnmount',
|
17025 | value: function componentWillUnmount() {
|
17026 | this.onExit();
|
17027 | }
|
17028 | }, {
|
17029 | key: 'onEnter',
|
17030 | value: function onEnter() {
|
17031 | if (this.props.onEnter) {
|
17032 | this.props.onEnter();
|
17033 | }
|
17034 | }
|
17035 | }, {
|
17036 | key: 'onExit',
|
17037 | value: function onExit() {
|
17038 | this.destroy();
|
17039 | if (this.props.onExit) {
|
17040 | this.props.onExit();
|
17041 | }
|
17042 | }
|
17043 | }, {
|
17044 | key: 'handleEscape',
|
17045 | value: function handleEscape(e) {
|
17046 | if (this.props.keyboard && e.keyCode === 27 && this.props.toggle) {
|
17047 | this.props.toggle();
|
17048 | }
|
17049 | }
|
17050 | }, {
|
17051 | key: 'handleBackdropClick',
|
17052 | value: function handleBackdropClick(e) {
|
17053 | if (this.props.backdrop !== true) return;
|
17054 |
|
17055 | var container = this._dialog;
|
17056 |
|
17057 | if (e.target && !container.contains(e.target) && this.props.toggle) {
|
17058 | this.props.toggle();
|
17059 | }
|
17060 | }
|
17061 | }, {
|
17062 | key: 'togglePortal',
|
17063 | value: function togglePortal() {
|
17064 | if (this.props.isOpen) {
|
17065 | this._focus = true;
|
17066 | this.show();
|
17067 | } else {
|
17068 | this.hide();
|
17069 | }
|
17070 | }
|
17071 | }, {
|
17072 | key: 'destroy',
|
17073 | value: function destroy() {
|
17074 | if (this._element) {
|
17075 | _reactDom2.default.unmountComponentAtNode(this._element);
|
17076 | document.body.removeChild(this._element);
|
17077 | this._element = null;
|
17078 | }
|
17079 |
|
17080 | var classes = document.body.className.replace('modal-open', '');
|
17081 | document.body.className = (0, _utils.mapToCssModules)((0, _classnames2.default)(classes).trim(), this.props.cssModule);
|
17082 | (0, _utils.setScrollbarWidth)(this.originalBodyPadding);
|
17083 | }
|
17084 | }, {
|
17085 | key: 'hide',
|
17086 | value: function hide() {
|
17087 | this.renderIntoSubtree();
|
17088 | }
|
17089 | }, {
|
17090 | key: 'show',
|
17091 | value: function show() {
|
17092 | var classes = document.body.className;
|
17093 | this._element = document.createElement('div');
|
17094 | this._element.setAttribute('tabindex', '-1');
|
17095 | this._element.style.position = 'relative';
|
17096 | this._element.style.zIndex = this.props.zIndex;
|
17097 | this.originalBodyPadding = (0, _utils.getOriginalBodyPadding)();
|
17098 |
|
17099 | (0, _utils.conditionallyUpdateScrollbar)();
|
17100 |
|
17101 | document.body.appendChild(this._element);
|
17102 |
|
17103 | document.body.className = (0, _utils.mapToCssModules)((0, _classnames2.default)(classes, 'modal-open'), this.props.cssModule);
|
17104 |
|
17105 | this.renderIntoSubtree();
|
17106 | }
|
17107 | }, {
|
17108 | key: 'renderIntoSubtree',
|
17109 | value: function renderIntoSubtree() {
|
17110 | _reactDom2.default.unstable_renderSubtreeIntoContainer(this, this.renderChildren(), this._element);
|
17111 |
|
17112 |
|
17113 | if (this._focus) {
|
17114 | this._dialog.parentNode.focus();
|
17115 | this._focus = false;
|
17116 | }
|
17117 | }
|
17118 | }, {
|
17119 | key: 'renderChildren',
|
17120 | value: function renderChildren() {
|
17121 | var _this2 = this;
|
17122 |
|
17123 | var _omit = (0, _lodash2.default)(this.props, ['toggle', 'keyboard', 'onEnter', 'onExit', 'zIndex']),
|
17124 | className = _omit.className,
|
17125 | wrapClassName = _omit.wrapClassName,
|
17126 | modalClassName = _omit.modalClassName,
|
17127 | backdropClassName = _omit.backdropClassName,
|
17128 | contentClassName = _omit.contentClassName,
|
17129 | cssModule = _omit.cssModule,
|
17130 | isOpen = _omit.isOpen,
|
17131 | size = _omit.size,
|
17132 | backdrop = _omit.backdrop,
|
17133 | children = _omit.children,
|
17134 | attributes = _objectWithoutProperties(_omit, ['className', 'wrapClassName', 'modalClassName', 'backdropClassName', 'contentClassName', 'cssModule', 'isOpen', 'size', 'backdrop', 'children']);
|
17135 |
|
17136 | return _react2.default.createElement(
|
17137 | _reactAddonsTransitionGroup2.default,
|
17138 | { component: 'div', className: (0, _utils.mapToCssModules)(wrapClassName) },
|
17139 | isOpen && _react2.default.createElement(
|
17140 | _Fade2.default,
|
17141 | {
|
17142 | key: 'modal-dialog',
|
17143 | onEnter: this.onEnter,
|
17144 | onLeave: this.onExit,
|
17145 | transitionAppearTimeout: 300,
|
17146 | transitionEnterTimeout: 300,
|
17147 | transitionLeaveTimeout: 300,
|
17148 | onClickCapture: this.handleBackdropClick,
|
17149 | onKeyUp: this.handleEscape,
|
17150 | className: (0, _utils.mapToCssModules)((0, _classnames2.default)('modal', modalClassName), cssModule),
|
17151 | style: { display: 'block' },
|
17152 | tabIndex: '-1'
|
17153 | },
|
17154 | _react2.default.createElement(
|
17155 | 'div',
|
17156 | _extends({
|
17157 | className: (0, _utils.mapToCssModules)((0, _classnames2.default)('modal-dialog', className, _defineProperty({}, 'modal-' + size, size)), cssModule),
|
17158 | role: 'document',
|
17159 | ref: function ref(c) {
|
17160 | return _this2._dialog = c;
|
17161 | }
|
17162 | }, attributes),
|
17163 | _react2.default.createElement(
|
17164 | 'div',
|
17165 | { className: (0, _utils.mapToCssModules)((0, _classnames2.default)('modal-content', contentClassName), cssModule) },
|
17166 | children
|
17167 | )
|
17168 | )
|
17169 | ),
|
17170 | isOpen && backdrop && _react2.default.createElement(_Fade2.default, {
|
17171 | key: 'modal-backdrop',
|
17172 | transitionAppearTimeout: 150,
|
17173 | transitionEnterTimeout: 150,
|
17174 | transitionLeaveTimeout: 150,
|
17175 | className: (0, _utils.mapToCssModules)((0, _classnames2.default)('modal-backdrop', backdropClassName), cssModule)
|
17176 | })
|
17177 | );
|
17178 | }
|
17179 | }, {
|
17180 | key: 'render',
|
17181 | value: function render() {
|
17182 | return null;
|
17183 | }
|
17184 | }]);
|
17185 |
|
17186 | return Modal;
|
17187 | }(_react2.default.Component);
|
17188 |
|
17189 | Modal.propTypes = propTypes;
|
17190 | Modal.defaultProps = defaultProps;
|
17191 |
|
17192 | exports.default = Modal;
|
17193 |
|
17194 | },
|
17195 |
|
17196 | function(module, exports, __webpack_require__) {
|
17197 |
|
17198 | 'use strict';
|
17199 |
|
17200 | Object.defineProperty(exports, "__esModule", {
|
17201 | value: true
|
17202 | });
|
17203 |
|
17204 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
17205 |
|
17206 | var _react = __webpack_require__(1);
|
17207 |
|
17208 | var _react2 = _interopRequireDefault(_react);
|
17209 |
|
17210 | var _classnames = __webpack_require__(2);
|
17211 |
|
17212 | var _classnames2 = _interopRequireDefault(_classnames);
|
17213 |
|
17214 | var _utils = __webpack_require__(3);
|
17215 |
|
17216 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17217 |
|
17218 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
17219 |
|
17220 | var propTypes = {
|
17221 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
17222 | className: _react.PropTypes.string,
|
17223 | cssModule: _react.PropTypes.object
|
17224 | };
|
17225 |
|
17226 | var defaultProps = {
|
17227 | tag: 'div'
|
17228 | };
|
17229 |
|
17230 | var ModalBody = function ModalBody(props) {
|
17231 | var className = props.className,
|
17232 | cssModule = props.cssModule,
|
17233 | Tag = props.tag,
|
17234 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
17235 |
|
17236 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'modal-body'), cssModule);
|
17237 |
|
17238 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
17239 | };
|
17240 |
|
17241 | ModalBody.propTypes = propTypes;
|
17242 | ModalBody.defaultProps = defaultProps;
|
17243 |
|
17244 | exports.default = ModalBody;
|
17245 |
|
17246 | },
|
17247 |
|
17248 | function(module, exports, __webpack_require__) {
|
17249 |
|
17250 | 'use strict';
|
17251 |
|
17252 | Object.defineProperty(exports, "__esModule", {
|
17253 | value: true
|
17254 | });
|
17255 |
|
17256 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
17257 |
|
17258 | var _react = __webpack_require__(1);
|
17259 |
|
17260 | var _react2 = _interopRequireDefault(_react);
|
17261 |
|
17262 | var _classnames = __webpack_require__(2);
|
17263 |
|
17264 | var _classnames2 = _interopRequireDefault(_classnames);
|
17265 |
|
17266 | var _utils = __webpack_require__(3);
|
17267 |
|
17268 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17269 |
|
17270 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
17271 |
|
17272 | var propTypes = {
|
17273 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
17274 | className: _react.PropTypes.string,
|
17275 | cssModule: _react.PropTypes.object
|
17276 | };
|
17277 |
|
17278 | var defaultProps = {
|
17279 | tag: 'div'
|
17280 | };
|
17281 |
|
17282 | var ModalFooter = function ModalFooter(props) {
|
17283 | var className = props.className,
|
17284 | cssModule = props.cssModule,
|
17285 | Tag = props.tag,
|
17286 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
17287 |
|
17288 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'modal-footer'), cssModule);
|
17289 |
|
17290 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
17291 | };
|
17292 |
|
17293 | ModalFooter.propTypes = propTypes;
|
17294 | ModalFooter.defaultProps = defaultProps;
|
17295 |
|
17296 | exports.default = ModalFooter;
|
17297 |
|
17298 | },
|
17299 |
|
17300 | function(module, exports, __webpack_require__) {
|
17301 |
|
17302 | 'use strict';
|
17303 |
|
17304 | Object.defineProperty(exports, "__esModule", {
|
17305 | value: true
|
17306 | });
|
17307 |
|
17308 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
17309 |
|
17310 | var _react = __webpack_require__(1);
|
17311 |
|
17312 | var _react2 = _interopRequireDefault(_react);
|
17313 |
|
17314 | var _classnames = __webpack_require__(2);
|
17315 |
|
17316 | var _classnames2 = _interopRequireDefault(_classnames);
|
17317 |
|
17318 | var _utils = __webpack_require__(3);
|
17319 |
|
17320 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17321 |
|
17322 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
17323 |
|
17324 | var propTypes = {
|
17325 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
17326 | wrapTag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
17327 | toggle: _react.PropTypes.func,
|
17328 | className: _react.PropTypes.string,
|
17329 | cssModule: _react.PropTypes.object,
|
17330 | children: _react.PropTypes.node
|
17331 | };
|
17332 |
|
17333 | var defaultProps = {
|
17334 | tag: 'h4',
|
17335 | wrapTag: 'div'
|
17336 | };
|
17337 |
|
17338 | var ModalHeader = function ModalHeader(props) {
|
17339 | var closeButton = void 0;
|
17340 |
|
17341 | var className = props.className,
|
17342 | cssModule = props.cssModule,
|
17343 | children = props.children,
|
17344 | toggle = props.toggle,
|
17345 | Tag = props.tag,
|
17346 | WrapTag = props.wrapTag,
|
17347 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'children', 'toggle', 'tag', 'wrapTag']);
|
17348 |
|
17349 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'modal-header'), cssModule);
|
17350 |
|
17351 | if (toggle) {
|
17352 | closeButton = _react2.default.createElement(
|
17353 | 'button',
|
17354 | { type: 'button', onClick: toggle, className: 'close', 'aria-label': 'Close' },
|
17355 | _react2.default.createElement(
|
17356 | 'span',
|
17357 | { 'aria-hidden': 'true' },
|
17358 | String.fromCharCode(215)
|
17359 | )
|
17360 | );
|
17361 | }
|
17362 |
|
17363 | return _react2.default.createElement(
|
17364 | WrapTag,
|
17365 | _extends({}, attributes, { className: classes }),
|
17366 | _react2.default.createElement(
|
17367 | Tag,
|
17368 | { className: (0, _utils.mapToCssModules)('modal-title', cssModule) },
|
17369 | children
|
17370 | ),
|
17371 | closeButton
|
17372 | );
|
17373 | };
|
17374 |
|
17375 | ModalHeader.propTypes = propTypes;
|
17376 | ModalHeader.defaultProps = defaultProps;
|
17377 |
|
17378 | exports.default = ModalHeader;
|
17379 |
|
17380 | },
|
17381 |
|
17382 | function(module, exports, __webpack_require__) {
|
17383 |
|
17384 | 'use strict';
|
17385 |
|
17386 | Object.defineProperty(exports, "__esModule", {
|
17387 | value: true
|
17388 | });
|
17389 |
|
17390 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
17391 |
|
17392 | var _react = __webpack_require__(1);
|
17393 |
|
17394 | var _react2 = _interopRequireDefault(_react);
|
17395 |
|
17396 | var _classnames = __webpack_require__(2);
|
17397 |
|
17398 | var _classnames2 = _interopRequireDefault(_classnames);
|
17399 |
|
17400 | var _utils = __webpack_require__(3);
|
17401 |
|
17402 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17403 |
|
17404 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
17405 |
|
17406 | var propTypes = {
|
17407 | tabs: _react.PropTypes.bool,
|
17408 | pills: _react.PropTypes.bool,
|
17409 | vertical: _react.PropTypes.bool,
|
17410 | navbar: _react.PropTypes.bool,
|
17411 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
17412 | className: _react.PropTypes.string,
|
17413 | cssModule: _react.PropTypes.object
|
17414 | };
|
17415 |
|
17416 | var defaultProps = {
|
17417 | tag: 'ul'
|
17418 | };
|
17419 |
|
17420 | var Nav = function Nav(props) {
|
17421 | var className = props.className,
|
17422 | cssModule = props.cssModule,
|
17423 | tabs = props.tabs,
|
17424 | pills = props.pills,
|
17425 | vertical = props.vertical,
|
17426 | navbar = props.navbar,
|
17427 | Tag = props.tag,
|
17428 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tabs', 'pills', 'vertical', 'navbar', 'tag']);
|
17429 |
|
17430 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, navbar ? 'navbar-nav' : 'nav', {
|
17431 | 'nav-tabs': tabs,
|
17432 | 'nav-pills': pills,
|
17433 | 'flex-column': vertical
|
17434 | }), cssModule);
|
17435 |
|
17436 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
17437 | };
|
17438 |
|
17439 | Nav.propTypes = propTypes;
|
17440 | Nav.defaultProps = defaultProps;
|
17441 |
|
17442 | exports.default = Nav;
|
17443 |
|
17444 | },
|
17445 |
|
17446 | function(module, exports, __webpack_require__) {
|
17447 |
|
17448 | 'use strict';
|
17449 |
|
17450 | Object.defineProperty(exports, "__esModule", {
|
17451 | value: true
|
17452 | });
|
17453 |
|
17454 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
17455 |
|
17456 | var _react = __webpack_require__(1);
|
17457 |
|
17458 | var _react2 = _interopRequireDefault(_react);
|
17459 |
|
17460 | var _classnames = __webpack_require__(2);
|
17461 |
|
17462 | var _classnames2 = _interopRequireDefault(_classnames);
|
17463 |
|
17464 | var _utils = __webpack_require__(3);
|
17465 |
|
17466 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17467 |
|
17468 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
17469 |
|
17470 | var propTypes = {
|
17471 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
17472 | className: _react.PropTypes.string,
|
17473 | cssModule: _react.PropTypes.object
|
17474 | };
|
17475 |
|
17476 | var defaultProps = {
|
17477 | tag: 'li'
|
17478 | };
|
17479 |
|
17480 | var NavItem = function NavItem(props) {
|
17481 | var className = props.className,
|
17482 | cssModule = props.cssModule,
|
17483 | Tag = props.tag,
|
17484 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
17485 |
|
17486 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'nav-item'), cssModule);
|
17487 |
|
17488 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
17489 | };
|
17490 |
|
17491 | NavItem.propTypes = propTypes;
|
17492 | NavItem.defaultProps = defaultProps;
|
17493 |
|
17494 | exports.default = NavItem;
|
17495 |
|
17496 | },
|
17497 |
|
17498 | function(module, exports, __webpack_require__) {
|
17499 |
|
17500 | 'use strict';
|
17501 |
|
17502 | Object.defineProperty(exports, "__esModule", {
|
17503 | value: true
|
17504 | });
|
17505 |
|
17506 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
17507 |
|
17508 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
17509 |
|
17510 | var _react = __webpack_require__(1);
|
17511 |
|
17512 | var _react2 = _interopRequireDefault(_react);
|
17513 |
|
17514 | var _classnames = __webpack_require__(2);
|
17515 |
|
17516 | var _classnames2 = _interopRequireDefault(_classnames);
|
17517 |
|
17518 | var _utils = __webpack_require__(3);
|
17519 |
|
17520 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17521 |
|
17522 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
17523 |
|
17524 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
17525 |
|
17526 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
17527 |
|
17528 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
17529 |
|
17530 | var propTypes = {
|
17531 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
17532 | getRef: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
17533 | disabled: _react.PropTypes.bool,
|
17534 | active: _react.PropTypes.bool,
|
17535 | className: _react.PropTypes.string,
|
17536 | cssModule: _react.PropTypes.object,
|
17537 | onClick: _react.PropTypes.func,
|
17538 | href: _react.PropTypes.any
|
17539 | };
|
17540 |
|
17541 | var defaultProps = {
|
17542 | tag: 'a'
|
17543 | };
|
17544 |
|
17545 | var NavLink = function (_React$Component) {
|
17546 | _inherits(NavLink, _React$Component);
|
17547 |
|
17548 | function NavLink(props) {
|
17549 | _classCallCheck(this, NavLink);
|
17550 |
|
17551 | var _this = _possibleConstructorReturn(this, (NavLink.__proto__ || Object.getPrototypeOf(NavLink)).call(this, props));
|
17552 |
|
17553 | _this.onClick = _this.onClick.bind(_this);
|
17554 | return _this;
|
17555 | }
|
17556 |
|
17557 | _createClass(NavLink, [{
|
17558 | key: 'onClick',
|
17559 | value: function onClick(e) {
|
17560 | if (this.props.disabled) {
|
17561 | e.preventDefault();
|
17562 | return;
|
17563 | }
|
17564 |
|
17565 | if (this.props.href === '#') {
|
17566 | e.preventDefault();
|
17567 | }
|
17568 |
|
17569 | if (this.props.onClick) {
|
17570 | this.props.onClick(e);
|
17571 | }
|
17572 | }
|
17573 | }, {
|
17574 | key: 'render',
|
17575 | value: function render() {
|
17576 | var _props = this.props,
|
17577 | className = _props.className,
|
17578 | cssModule = _props.cssModule,
|
17579 | active = _props.active,
|
17580 | Tag = _props.tag,
|
17581 | getRef = _props.getRef,
|
17582 | attributes = _objectWithoutProperties(_props, ['className', 'cssModule', 'active', 'tag', 'getRef']);
|
17583 |
|
17584 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'nav-link', {
|
17585 | disabled: attributes.disabled,
|
17586 | active: active
|
17587 | }), cssModule);
|
17588 |
|
17589 | return _react2.default.createElement(Tag, _extends({}, attributes, { ref: getRef, onClick: this.onClick, className: classes }));
|
17590 | }
|
17591 | }]);
|
17592 |
|
17593 | return NavLink;
|
17594 | }(_react2.default.Component);
|
17595 |
|
17596 | NavLink.propTypes = propTypes;
|
17597 | NavLink.defaultProps = defaultProps;
|
17598 |
|
17599 | exports.default = NavLink;
|
17600 |
|
17601 | },
|
17602 |
|
17603 | function(module, exports, __webpack_require__) {
|
17604 |
|
17605 | 'use strict';
|
17606 |
|
17607 | Object.defineProperty(exports, "__esModule", {
|
17608 | value: true
|
17609 | });
|
17610 |
|
17611 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
17612 |
|
17613 | var _react = __webpack_require__(1);
|
17614 |
|
17615 | var _react2 = _interopRequireDefault(_react);
|
17616 |
|
17617 | var _classnames = __webpack_require__(2);
|
17618 |
|
17619 | var _classnames2 = _interopRequireDefault(_classnames);
|
17620 |
|
17621 | var _utils = __webpack_require__(3);
|
17622 |
|
17623 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17624 |
|
17625 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
17626 |
|
17627 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
17628 |
|
17629 | var propTypes = {
|
17630 | light: _react.PropTypes.bool,
|
17631 | inverse: _react.PropTypes.bool,
|
17632 | full: _react.PropTypes.bool,
|
17633 | fixed: _react.PropTypes.string,
|
17634 | sticky: _react.PropTypes.string,
|
17635 | color: _react.PropTypes.string,
|
17636 | role: _react.PropTypes.string,
|
17637 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
17638 | className: _react.PropTypes.string,
|
17639 | cssModule: _react.PropTypes.object,
|
17640 | toggleable: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.string])
|
17641 | };
|
17642 |
|
17643 | var defaultProps = {
|
17644 | tag: 'nav',
|
17645 | role: 'navigation',
|
17646 | toggleable: false
|
17647 | };
|
17648 |
|
17649 | var getToggleableClass = function getToggleableClass(toggleable) {
|
17650 | if (toggleable === false) {
|
17651 | return false;
|
17652 | } else if (toggleable === true || toggleable === 'xs') {
|
17653 | return 'navbar-toggleable';
|
17654 | }
|
17655 |
|
17656 | return 'navbar-toggleable-' + toggleable;
|
17657 | };
|
17658 |
|
17659 | var Navbar = function Navbar(props) {
|
17660 | var _classNames;
|
17661 |
|
17662 | var toggleable = props.toggleable,
|
17663 | className = props.className,
|
17664 | cssModule = props.cssModule,
|
17665 | light = props.light,
|
17666 | inverse = props.inverse,
|
17667 | full = props.full,
|
17668 | fixed = props.fixed,
|
17669 | sticky = props.sticky,
|
17670 | color = props.color,
|
17671 | Tag = props.tag,
|
17672 | attributes = _objectWithoutProperties(props, ['toggleable', 'className', 'cssModule', 'light', 'inverse', 'full', 'fixed', 'sticky', 'color', 'tag']);
|
17673 |
|
17674 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'navbar', getToggleableClass(toggleable), (_classNames = {
|
17675 | 'navbar-light': light,
|
17676 | 'navbar-inverse': inverse
|
17677 | }, _defineProperty(_classNames, 'bg-' + color, color), _defineProperty(_classNames, 'navbar-full', full), _defineProperty(_classNames, 'fixed-' + fixed, fixed), _defineProperty(_classNames, 'sticky-' + sticky, sticky), _classNames)), cssModule);
|
17678 |
|
17679 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
17680 | };
|
17681 |
|
17682 | Navbar.propTypes = propTypes;
|
17683 | Navbar.defaultProps = defaultProps;
|
17684 |
|
17685 | exports.default = Navbar;
|
17686 |
|
17687 | },
|
17688 |
|
17689 | function(module, exports, __webpack_require__) {
|
17690 |
|
17691 | 'use strict';
|
17692 |
|
17693 | Object.defineProperty(exports, "__esModule", {
|
17694 | value: true
|
17695 | });
|
17696 |
|
17697 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
17698 |
|
17699 | var _react = __webpack_require__(1);
|
17700 |
|
17701 | var _react2 = _interopRequireDefault(_react);
|
17702 |
|
17703 | var _classnames = __webpack_require__(2);
|
17704 |
|
17705 | var _classnames2 = _interopRequireDefault(_classnames);
|
17706 |
|
17707 | var _utils = __webpack_require__(3);
|
17708 |
|
17709 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17710 |
|
17711 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
17712 |
|
17713 | var propTypes = {
|
17714 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
17715 | className: _react.PropTypes.string,
|
17716 | cssModule: _react.PropTypes.object
|
17717 | };
|
17718 |
|
17719 | var defaultProps = {
|
17720 | tag: 'a'
|
17721 | };
|
17722 |
|
17723 | var NavbarBrand = function NavbarBrand(props) {
|
17724 | var className = props.className,
|
17725 | cssModule = props.cssModule,
|
17726 | Tag = props.tag,
|
17727 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
17728 |
|
17729 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'navbar-brand'), cssModule);
|
17730 |
|
17731 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
17732 | };
|
17733 |
|
17734 | NavbarBrand.propTypes = propTypes;
|
17735 | NavbarBrand.defaultProps = defaultProps;
|
17736 |
|
17737 | exports.default = NavbarBrand;
|
17738 |
|
17739 | },
|
17740 |
|
17741 | function(module, exports, __webpack_require__) {
|
17742 |
|
17743 | 'use strict';
|
17744 |
|
17745 | Object.defineProperty(exports, "__esModule", {
|
17746 | value: true
|
17747 | });
|
17748 |
|
17749 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
17750 |
|
17751 | var _react = __webpack_require__(1);
|
17752 |
|
17753 | var _react2 = _interopRequireDefault(_react);
|
17754 |
|
17755 | var _classnames = __webpack_require__(2);
|
17756 |
|
17757 | var _classnames2 = _interopRequireDefault(_classnames);
|
17758 |
|
17759 | var _utils = __webpack_require__(3);
|
17760 |
|
17761 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17762 |
|
17763 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
17764 |
|
17765 | var propTypes = {
|
17766 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
17767 | type: _react.PropTypes.string,
|
17768 | className: _react.PropTypes.string,
|
17769 | cssModule: _react.PropTypes.object,
|
17770 | children: _react.PropTypes.node,
|
17771 | right: _react.PropTypes.bool,
|
17772 | left: _react.PropTypes.bool
|
17773 | };
|
17774 |
|
17775 | var defaultProps = {
|
17776 | tag: 'button',
|
17777 | type: 'button'
|
17778 | };
|
17779 |
|
17780 | var navbarToggleIcon = _react2.default.createElement('span', { className: 'navbar-toggler-icon' });
|
17781 |
|
17782 | var NavbarToggler = function NavbarToggler(props) {
|
17783 | var className = props.className,
|
17784 | cssModule = props.cssModule,
|
17785 | children = props.children,
|
17786 | right = props.right,
|
17787 | left = props.left,
|
17788 | Tag = props.tag,
|
17789 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'children', 'right', 'left', 'tag']);
|
17790 |
|
17791 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'navbar-toggler', right && 'navbar-toggler-right', left && 'navbar-toggler-left'), cssModule);
|
17792 |
|
17793 | return _react2.default.createElement(
|
17794 | Tag,
|
17795 | _extends({}, attributes, { className: classes }),
|
17796 | children || navbarToggleIcon
|
17797 | );
|
17798 | };
|
17799 |
|
17800 | NavbarToggler.propTypes = propTypes;
|
17801 | NavbarToggler.defaultProps = defaultProps;
|
17802 |
|
17803 | exports.default = NavbarToggler;
|
17804 |
|
17805 | },
|
17806 |
|
17807 | function(module, exports, __webpack_require__) {
|
17808 |
|
17809 | 'use strict';
|
17810 |
|
17811 | Object.defineProperty(exports, "__esModule", {
|
17812 | value: true
|
17813 | });
|
17814 |
|
17815 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
17816 |
|
17817 | var _react = __webpack_require__(1);
|
17818 |
|
17819 | var _react2 = _interopRequireDefault(_react);
|
17820 |
|
17821 | var _classnames = __webpack_require__(2);
|
17822 |
|
17823 | var _classnames2 = _interopRequireDefault(_classnames);
|
17824 |
|
17825 | var _utils = __webpack_require__(3);
|
17826 |
|
17827 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17828 |
|
17829 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
17830 |
|
17831 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
17832 |
|
17833 | var propTypes = {
|
17834 | children: _react.PropTypes.node,
|
17835 | className: _react.PropTypes.string,
|
17836 | cssModule: _react.PropTypes.object,
|
17837 | size: _react.PropTypes.string,
|
17838 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string])
|
17839 | };
|
17840 |
|
17841 | var defaultProps = {
|
17842 | tag: 'ul'
|
17843 | };
|
17844 |
|
17845 | var Pagination = function Pagination(props) {
|
17846 | var className = props.className,
|
17847 | cssModule = props.cssModule,
|
17848 | size = props.size,
|
17849 | Tag = props.tag,
|
17850 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'size', 'tag']);
|
17851 |
|
17852 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'pagination', _defineProperty({}, 'pagination-' + size, !!size)), cssModule);
|
17853 |
|
17854 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
17855 | };
|
17856 |
|
17857 | Pagination.propTypes = propTypes;
|
17858 | Pagination.defaultProps = defaultProps;
|
17859 |
|
17860 | exports.default = Pagination;
|
17861 |
|
17862 | },
|
17863 |
|
17864 | function(module, exports, __webpack_require__) {
|
17865 |
|
17866 | 'use strict';
|
17867 |
|
17868 | Object.defineProperty(exports, "__esModule", {
|
17869 | value: true
|
17870 | });
|
17871 |
|
17872 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
17873 |
|
17874 | var _react = __webpack_require__(1);
|
17875 |
|
17876 | var _react2 = _interopRequireDefault(_react);
|
17877 |
|
17878 | var _classnames = __webpack_require__(2);
|
17879 |
|
17880 | var _classnames2 = _interopRequireDefault(_classnames);
|
17881 |
|
17882 | var _utils = __webpack_require__(3);
|
17883 |
|
17884 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17885 |
|
17886 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
17887 |
|
17888 | var propTypes = {
|
17889 | active: _react.PropTypes.bool,
|
17890 | children: _react.PropTypes.node,
|
17891 | className: _react.PropTypes.string,
|
17892 | cssModule: _react.PropTypes.object,
|
17893 | disabled: _react.PropTypes.bool,
|
17894 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string])
|
17895 | };
|
17896 |
|
17897 | var defaultProps = {
|
17898 | tag: 'li'
|
17899 | };
|
17900 |
|
17901 | var PaginationItem = function PaginationItem(props) {
|
17902 | var active = props.active,
|
17903 | className = props.className,
|
17904 | cssModule = props.cssModule,
|
17905 | disabled = props.disabled,
|
17906 | Tag = props.tag,
|
17907 | attributes = _objectWithoutProperties(props, ['active', 'className', 'cssModule', 'disabled', 'tag']);
|
17908 |
|
17909 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'page-item', {
|
17910 | active: active,
|
17911 | disabled: disabled
|
17912 | }), cssModule);
|
17913 |
|
17914 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
17915 | };
|
17916 |
|
17917 | PaginationItem.propTypes = propTypes;
|
17918 | PaginationItem.defaultProps = defaultProps;
|
17919 |
|
17920 | exports.default = PaginationItem;
|
17921 |
|
17922 | },
|
17923 |
|
17924 | function(module, exports, __webpack_require__) {
|
17925 |
|
17926 | 'use strict';
|
17927 |
|
17928 | Object.defineProperty(exports, "__esModule", {
|
17929 | value: true
|
17930 | });
|
17931 |
|
17932 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
17933 |
|
17934 | var _react = __webpack_require__(1);
|
17935 |
|
17936 | var _react2 = _interopRequireDefault(_react);
|
17937 |
|
17938 | var _classnames = __webpack_require__(2);
|
17939 |
|
17940 | var _classnames2 = _interopRequireDefault(_classnames);
|
17941 |
|
17942 | var _utils = __webpack_require__(3);
|
17943 |
|
17944 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17945 |
|
17946 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
17947 |
|
17948 | var propTypes = {
|
17949 | 'aria-label': _react.PropTypes.string,
|
17950 | children: _react.PropTypes.node,
|
17951 | className: _react.PropTypes.string,
|
17952 | cssModule: _react.PropTypes.object,
|
17953 | next: _react.PropTypes.bool,
|
17954 | previous: _react.PropTypes.bool,
|
17955 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string])
|
17956 | };
|
17957 |
|
17958 | var defaultProps = {
|
17959 | tag: 'a'
|
17960 | };
|
17961 |
|
17962 | var PaginationLink = function PaginationLink(props) {
|
17963 | var className = props.className,
|
17964 | cssModule = props.cssModule,
|
17965 | next = props.next,
|
17966 | previous = props.previous,
|
17967 | Tag = props.tag,
|
17968 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'next', 'previous', 'tag']);
|
17969 |
|
17970 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'page-link'), cssModule);
|
17971 |
|
17972 | var defaultAriaLabel = void 0;
|
17973 | if (previous) {
|
17974 | defaultAriaLabel = 'Previous';
|
17975 | } else if (next) {
|
17976 | defaultAriaLabel = 'Next';
|
17977 | }
|
17978 | var ariaLabel = props['aria-label'] || defaultAriaLabel;
|
17979 |
|
17980 | var defaultCaret = void 0;
|
17981 | if (previous) {
|
17982 | defaultCaret = '\xAB';
|
17983 | } else if (next) {
|
17984 | defaultCaret = '\xBB';
|
17985 | }
|
17986 |
|
17987 | var children = props.children;
|
17988 | if (previous || next) {
|
17989 | children = [_react2.default.createElement(
|
17990 | 'span',
|
17991 | {
|
17992 | 'aria-hidden': 'true',
|
17993 | key: 'caret'
|
17994 | },
|
17995 | children || defaultCaret
|
17996 | ), _react2.default.createElement(
|
17997 | 'span',
|
17998 | {
|
17999 | className: 'sr-only',
|
18000 | key: 'sr'
|
18001 | },
|
18002 | ariaLabel
|
18003 | )];
|
18004 | }
|
18005 |
|
18006 | return _react2.default.createElement(
|
18007 | Tag,
|
18008 | _extends({}, attributes, {
|
18009 | className: classes,
|
18010 | 'aria-label': ariaLabel
|
18011 | }),
|
18012 | children
|
18013 | );
|
18014 | };
|
18015 |
|
18016 | PaginationLink.propTypes = propTypes;
|
18017 | PaginationLink.defaultProps = defaultProps;
|
18018 |
|
18019 | exports.default = PaginationLink;
|
18020 |
|
18021 | },
|
18022 |
|
18023 | function(module, exports, __webpack_require__) {
|
18024 |
|
18025 | 'use strict';
|
18026 |
|
18027 | Object.defineProperty(exports, "__esModule", {
|
18028 | value: true
|
18029 | });
|
18030 |
|
18031 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
18032 |
|
18033 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
18034 |
|
18035 | var _react = __webpack_require__(1);
|
18036 |
|
18037 | var _react2 = _interopRequireDefault(_react);
|
18038 |
|
18039 | var _classnames = __webpack_require__(2);
|
18040 |
|
18041 | var _classnames2 = _interopRequireDefault(_classnames);
|
18042 |
|
18043 | var _lodash = __webpack_require__(18);
|
18044 |
|
18045 | var _lodash2 = _interopRequireDefault(_lodash);
|
18046 |
|
18047 | var _TetherContent = __webpack_require__(33);
|
18048 |
|
18049 | var _TetherContent2 = _interopRequireDefault(_TetherContent);
|
18050 |
|
18051 | var _utils = __webpack_require__(3);
|
18052 |
|
18053 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18054 |
|
18055 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
18056 |
|
18057 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
18058 |
|
18059 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
18060 |
|
18061 | var propTypes = {
|
18062 | placement: _react2.default.PropTypes.oneOf(_utils.tetherAttachements),
|
18063 | target: _react.PropTypes.string.isRequired,
|
18064 | isOpen: _react.PropTypes.bool,
|
18065 | tether: _react.PropTypes.object,
|
18066 | tetherRef: _react.PropTypes.func,
|
18067 | className: _react.PropTypes.string,
|
18068 | cssModule: _react.PropTypes.object,
|
18069 | toggle: _react.PropTypes.func
|
18070 | };
|
18071 |
|
18072 | var defaultProps = {
|
18073 | isOpen: false,
|
18074 | placement: 'bottom',
|
18075 | toggle: function toggle() {}
|
18076 | };
|
18077 |
|
18078 | var defaultTetherConfig = {
|
18079 | classPrefix: 'bs-tether',
|
18080 | classes: {
|
18081 | element: false,
|
18082 | enabled: 'show'
|
18083 | },
|
18084 | constraints: [{ to: 'scrollParent', attachment: 'together none' }, { to: 'window', attachment: 'together none' }]
|
18085 | };
|
18086 |
|
18087 | var Popover = function (_React$Component) {
|
18088 | _inherits(Popover, _React$Component);
|
18089 |
|
18090 | function Popover(props) {
|
18091 | _classCallCheck(this, Popover);
|
18092 |
|
18093 | var _this = _possibleConstructorReturn(this, (Popover.__proto__ || Object.getPrototypeOf(Popover)).call(this, props));
|
18094 |
|
18095 | _this.getTetherConfig = _this.getTetherConfig.bind(_this);
|
18096 | return _this;
|
18097 | }
|
18098 |
|
18099 | _createClass(Popover, [{
|
18100 | key: 'getTetherConfig',
|
18101 | value: function getTetherConfig() {
|
18102 | var attachments = (0, _utils.getTetherAttachments)(this.props.placement);
|
18103 | return _extends({}, defaultTetherConfig, attachments, {
|
18104 | target: '#' + this.props.target
|
18105 | }, this.props.tether);
|
18106 | }
|
18107 | }, {
|
18108 | key: 'render',
|
18109 | value: function render() {
|
18110 | if (!this.props.isOpen) {
|
18111 | return null;
|
18112 | }
|
18113 |
|
18114 | var tetherConfig = this.getTetherConfig();
|
18115 |
|
18116 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)('popover-inner', this.props.className), this.props.cssModule);
|
18117 |
|
18118 | var attributes = (0, _lodash2.default)(this.props, Object.keys(propTypes));
|
18119 |
|
18120 | return _react2.default.createElement(
|
18121 | _TetherContent2.default,
|
18122 | {
|
18123 | className: (0, _utils.mapToCssModules)('popover', this.props.cssModule),
|
18124 | tether: tetherConfig,
|
18125 | tetherRef: this.props.tetherRef,
|
18126 | isOpen: this.props.isOpen,
|
18127 | toggle: this.props.toggle
|
18128 | },
|
18129 | _react2.default.createElement('div', _extends({}, attributes, { className: classes }))
|
18130 | );
|
18131 | }
|
18132 | }]);
|
18133 |
|
18134 | return Popover;
|
18135 | }(_react2.default.Component);
|
18136 |
|
18137 | Popover.propTypes = propTypes;
|
18138 | Popover.defaultProps = defaultProps;
|
18139 |
|
18140 | exports.default = Popover;
|
18141 |
|
18142 | },
|
18143 |
|
18144 | function(module, exports, __webpack_require__) {
|
18145 |
|
18146 | 'use strict';
|
18147 |
|
18148 | Object.defineProperty(exports, "__esModule", {
|
18149 | value: true
|
18150 | });
|
18151 |
|
18152 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
18153 |
|
18154 | var _react = __webpack_require__(1);
|
18155 |
|
18156 | var _react2 = _interopRequireDefault(_react);
|
18157 |
|
18158 | var _classnames = __webpack_require__(2);
|
18159 |
|
18160 | var _classnames2 = _interopRequireDefault(_classnames);
|
18161 |
|
18162 | var _utils = __webpack_require__(3);
|
18163 |
|
18164 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18165 |
|
18166 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
18167 |
|
18168 | var propTypes = {
|
18169 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
18170 | className: _react.PropTypes.string,
|
18171 | cssModule: _react.PropTypes.object
|
18172 | };
|
18173 |
|
18174 | var defaultProps = {
|
18175 | tag: 'div'
|
18176 | };
|
18177 |
|
18178 | var PopoverContent = function PopoverContent(props) {
|
18179 | var className = props.className,
|
18180 | cssModule = props.cssModule,
|
18181 | Tag = props.tag,
|
18182 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
18183 |
|
18184 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'popover-content'), cssModule);
|
18185 |
|
18186 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
18187 | };
|
18188 |
|
18189 | PopoverContent.propTypes = propTypes;
|
18190 | PopoverContent.defaultProps = defaultProps;
|
18191 |
|
18192 | exports.default = PopoverContent;
|
18193 |
|
18194 | },
|
18195 |
|
18196 | function(module, exports, __webpack_require__) {
|
18197 |
|
18198 | 'use strict';
|
18199 |
|
18200 | Object.defineProperty(exports, "__esModule", {
|
18201 | value: true
|
18202 | });
|
18203 |
|
18204 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
18205 |
|
18206 | var _react = __webpack_require__(1);
|
18207 |
|
18208 | var _react2 = _interopRequireDefault(_react);
|
18209 |
|
18210 | var _classnames = __webpack_require__(2);
|
18211 |
|
18212 | var _classnames2 = _interopRequireDefault(_classnames);
|
18213 |
|
18214 | var _utils = __webpack_require__(3);
|
18215 |
|
18216 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18217 |
|
18218 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
18219 |
|
18220 | var propTypes = {
|
18221 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
18222 | className: _react.PropTypes.string,
|
18223 | cssModule: _react.PropTypes.object
|
18224 | };
|
18225 |
|
18226 | var defaultProps = {
|
18227 | tag: 'h3'
|
18228 | };
|
18229 |
|
18230 | var PopoverTitle = function PopoverTitle(props) {
|
18231 | var className = props.className,
|
18232 | cssModule = props.cssModule,
|
18233 | Tag = props.tag,
|
18234 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
|
18235 |
|
18236 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'popover-title'), cssModule);
|
18237 |
|
18238 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
18239 | };
|
18240 |
|
18241 | PopoverTitle.propTypes = propTypes;
|
18242 | PopoverTitle.defaultProps = defaultProps;
|
18243 |
|
18244 | exports.default = PopoverTitle;
|
18245 |
|
18246 | },
|
18247 |
|
18248 | function(module, exports, __webpack_require__) {
|
18249 |
|
18250 | 'use strict';
|
18251 |
|
18252 | Object.defineProperty(exports, "__esModule", {
|
18253 | value: true
|
18254 | });
|
18255 |
|
18256 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
18257 |
|
18258 | var _react = __webpack_require__(1);
|
18259 |
|
18260 | var _react2 = _interopRequireDefault(_react);
|
18261 |
|
18262 | var _classnames = __webpack_require__(2);
|
18263 |
|
18264 | var _classnames2 = _interopRequireDefault(_classnames);
|
18265 |
|
18266 | var _lodash = __webpack_require__(183);
|
18267 |
|
18268 | var _lodash2 = _interopRequireDefault(_lodash);
|
18269 |
|
18270 | var _utils = __webpack_require__(3);
|
18271 |
|
18272 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18273 |
|
18274 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
18275 |
|
18276 | var propTypes = {
|
18277 | children: _react.PropTypes.node,
|
18278 | bar: _react.PropTypes.bool,
|
18279 | multi: _react.PropTypes.bool,
|
18280 | tag: _react.PropTypes.string,
|
18281 | value: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
|
18282 | max: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
|
18283 | animated: _react.PropTypes.bool,
|
18284 | striped: _react.PropTypes.bool,
|
18285 | color: _react.PropTypes.string,
|
18286 | className: _react.PropTypes.string,
|
18287 | barClassName: _react.PropTypes.string,
|
18288 | cssModule: _react.PropTypes.object
|
18289 | };
|
18290 |
|
18291 | var defaultProps = {
|
18292 | tag: 'div',
|
18293 | value: 0,
|
18294 | max: 100
|
18295 | };
|
18296 |
|
18297 | var Progress = function Progress(props) {
|
18298 | var children = props.children,
|
18299 | className = props.className,
|
18300 | barClassName = props.barClassName,
|
18301 | cssModule = props.cssModule,
|
18302 | value = props.value,
|
18303 | max = props.max,
|
18304 | animated = props.animated,
|
18305 | striped = props.striped,
|
18306 | color = props.color,
|
18307 | bar = props.bar,
|
18308 | multi = props.multi,
|
18309 | Tag = props.tag,
|
18310 | attributes = _objectWithoutProperties(props, ['children', 'className', 'barClassName', 'cssModule', 'value', 'max', 'animated', 'striped', 'color', 'bar', 'multi', 'tag']);
|
18311 |
|
18312 | var percent = (0, _lodash2.default)(value) / (0, _lodash2.default)(max) * 100;
|
18313 |
|
18314 | var progressClasses = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'progress'), cssModule);
|
18315 |
|
18316 | var progressBarClasses = (0, _utils.mapToCssModules)((0, _classnames2.default)('progress-bar', bar ? className || barClassName : barClassName, animated ? 'progress-bar-animated' : null, color ? 'bg-' + color : null, striped || animated ? 'progress-bar-striped' : null), cssModule);
|
18317 |
|
18318 | var ProgressBar = multi ? children : _react2.default.createElement('div', {
|
18319 | className: progressBarClasses,
|
18320 | style: { width: percent + '%' },
|
18321 | role: 'progressbar',
|
18322 | 'aria-valuenow': value,
|
18323 | 'aria-valuemin': '0',
|
18324 | 'aria-valuemax': max,
|
18325 | children: children
|
18326 | });
|
18327 |
|
18328 | if (bar) {
|
18329 | return ProgressBar;
|
18330 | }
|
18331 |
|
18332 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: progressClasses, children: ProgressBar }));
|
18333 | };
|
18334 |
|
18335 | Progress.propTypes = propTypes;
|
18336 | Progress.defaultProps = defaultProps;
|
18337 |
|
18338 | exports.default = Progress;
|
18339 |
|
18340 | },
|
18341 |
|
18342 | function(module, exports, __webpack_require__) {
|
18343 |
|
18344 | 'use strict';
|
18345 |
|
18346 | Object.defineProperty(exports, "__esModule", {
|
18347 | value: true
|
18348 | });
|
18349 |
|
18350 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
18351 |
|
18352 | var _react = __webpack_require__(1);
|
18353 |
|
18354 | var _react2 = _interopRequireDefault(_react);
|
18355 |
|
18356 | var _classnames = __webpack_require__(2);
|
18357 |
|
18358 | var _classnames2 = _interopRequireDefault(_classnames);
|
18359 |
|
18360 | var _utils = __webpack_require__(3);
|
18361 |
|
18362 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18363 |
|
18364 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
18365 |
|
18366 | var propTypes = {
|
18367 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
18368 | noGutters: _react.PropTypes.bool,
|
18369 | className: _react.PropTypes.string,
|
18370 | cssModule: _react.PropTypes.object
|
18371 | };
|
18372 |
|
18373 | var defaultProps = {
|
18374 | tag: 'div'
|
18375 | };
|
18376 |
|
18377 | var Row = function Row(props) {
|
18378 | var className = props.className,
|
18379 | cssModule = props.cssModule,
|
18380 | noGutters = props.noGutters,
|
18381 | Tag = props.tag,
|
18382 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'noGutters', 'tag']);
|
18383 |
|
18384 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, noGutters ? 'no-gutters' : null, 'row'), cssModule);
|
18385 |
|
18386 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
18387 | };
|
18388 |
|
18389 | Row.propTypes = propTypes;
|
18390 | Row.defaultProps = defaultProps;
|
18391 |
|
18392 | exports.default = Row;
|
18393 |
|
18394 | },
|
18395 |
|
18396 | function(module, exports, __webpack_require__) {
|
18397 |
|
18398 | 'use strict';
|
18399 |
|
18400 | Object.defineProperty(exports, "__esModule", {
|
18401 | value: true
|
18402 | });
|
18403 |
|
18404 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
18405 |
|
18406 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
18407 |
|
18408 | var _react = __webpack_require__(1);
|
18409 |
|
18410 | var _react2 = _interopRequireDefault(_react);
|
18411 |
|
18412 | var _classnames = __webpack_require__(2);
|
18413 |
|
18414 | var _classnames2 = _interopRequireDefault(_classnames);
|
18415 |
|
18416 | var _lodash = __webpack_require__(18);
|
18417 |
|
18418 | var _lodash2 = _interopRequireDefault(_lodash);
|
18419 |
|
18420 | var _utils = __webpack_require__(3);
|
18421 |
|
18422 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18423 |
|
18424 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
18425 |
|
18426 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
18427 |
|
18428 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
18429 |
|
18430 | var propTypes = {
|
18431 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
18432 | activeTab: _react.PropTypes.any,
|
18433 | className: _react.PropTypes.string,
|
18434 | cssModule: _react.PropTypes.object
|
18435 | };
|
18436 |
|
18437 | var defaultProps = {
|
18438 | tag: 'div'
|
18439 | };
|
18440 |
|
18441 | var childContextTypes = {
|
18442 | activeTabId: _react.PropTypes.any
|
18443 | };
|
18444 |
|
18445 | var TabContent = function (_Component) {
|
18446 | _inherits(TabContent, _Component);
|
18447 |
|
18448 | function TabContent(props) {
|
18449 | _classCallCheck(this, TabContent);
|
18450 |
|
18451 | var _this = _possibleConstructorReturn(this, (TabContent.__proto__ || Object.getPrototypeOf(TabContent)).call(this, props));
|
18452 |
|
18453 | _this.state = {
|
18454 | activeTab: _this.props.activeTab
|
18455 | };
|
18456 | return _this;
|
18457 | }
|
18458 |
|
18459 | _createClass(TabContent, [{
|
18460 | key: 'getChildContext',
|
18461 | value: function getChildContext() {
|
18462 | return {
|
18463 | activeTabId: this.state.activeTab
|
18464 | };
|
18465 | }
|
18466 | }, {
|
18467 | key: 'componentWillReceiveProps',
|
18468 | value: function componentWillReceiveProps(nextProps) {
|
18469 | if (this.state.activeTab !== nextProps.activeTab) {
|
18470 | this.setState({
|
18471 | activeTab: nextProps.activeTab
|
18472 | });
|
18473 | }
|
18474 | }
|
18475 | }, {
|
18476 | key: 'render',
|
18477 | value: function render() {
|
18478 | var _props = this.props,
|
18479 | className = _props.className,
|
18480 | cssModule = _props.cssModule,
|
18481 | Tag = _props.tag;
|
18482 |
|
18483 |
|
18484 | var attributes = (0, _lodash2.default)(this.props, Object.keys(propTypes));
|
18485 |
|
18486 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)('tab-content', className), cssModule);
|
18487 |
|
18488 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
18489 | }
|
18490 | }]);
|
18491 |
|
18492 | return TabContent;
|
18493 | }(_react.Component);
|
18494 |
|
18495 | exports.default = TabContent;
|
18496 |
|
18497 | TabContent.propTypes = propTypes;
|
18498 | TabContent.defaultProps = defaultProps;
|
18499 | TabContent.childContextTypes = childContextTypes;
|
18500 |
|
18501 | },
|
18502 |
|
18503 | function(module, exports, __webpack_require__) {
|
18504 |
|
18505 | 'use strict';
|
18506 |
|
18507 | Object.defineProperty(exports, "__esModule", {
|
18508 | value: true
|
18509 | });
|
18510 |
|
18511 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
18512 |
|
18513 | exports.default = TabPane;
|
18514 |
|
18515 | var _react = __webpack_require__(1);
|
18516 |
|
18517 | var _react2 = _interopRequireDefault(_react);
|
18518 |
|
18519 | var _classnames = __webpack_require__(2);
|
18520 |
|
18521 | var _classnames2 = _interopRequireDefault(_classnames);
|
18522 |
|
18523 | var _utils = __webpack_require__(3);
|
18524 |
|
18525 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18526 |
|
18527 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
18528 |
|
18529 | var propTypes = {
|
18530 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
18531 | className: _react.PropTypes.string,
|
18532 | cssModule: _react.PropTypes.object,
|
18533 | tabId: _react.PropTypes.any
|
18534 | };
|
18535 |
|
18536 | var defaultProps = {
|
18537 | tag: 'div'
|
18538 | };
|
18539 |
|
18540 | var contextTypes = {
|
18541 | activeTabId: _react.PropTypes.any
|
18542 | };
|
18543 |
|
18544 | function TabPane(props, context) {
|
18545 | var className = props.className,
|
18546 | cssModule = props.cssModule,
|
18547 | tabId = props.tabId,
|
18548 | Tag = props.tag,
|
18549 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tabId', 'tag']);
|
18550 |
|
18551 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)('tab-pane', className, { active: tabId === context.activeTabId }), cssModule);
|
18552 | return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
18553 | }
|
18554 | TabPane.propTypes = propTypes;
|
18555 | TabPane.defaultProps = defaultProps;
|
18556 | TabPane.contextTypes = contextTypes;
|
18557 |
|
18558 | },
|
18559 |
|
18560 | function(module, exports, __webpack_require__) {
|
18561 |
|
18562 | 'use strict';
|
18563 |
|
18564 | Object.defineProperty(exports, "__esModule", {
|
18565 | value: true
|
18566 | });
|
18567 |
|
18568 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
18569 |
|
18570 | var _react = __webpack_require__(1);
|
18571 |
|
18572 | var _react2 = _interopRequireDefault(_react);
|
18573 |
|
18574 | var _classnames = __webpack_require__(2);
|
18575 |
|
18576 | var _classnames2 = _interopRequireDefault(_classnames);
|
18577 |
|
18578 | var _utils = __webpack_require__(3);
|
18579 |
|
18580 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18581 |
|
18582 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
18583 |
|
18584 | var propTypes = {
|
18585 | className: _react.PropTypes.string,
|
18586 | cssModule: _react.PropTypes.object,
|
18587 | size: _react.PropTypes.string,
|
18588 | bordered: _react.PropTypes.bool,
|
18589 | striped: _react.PropTypes.bool,
|
18590 | inverse: _react.PropTypes.bool,
|
18591 | hover: _react.PropTypes.bool,
|
18592 | reflow: _react.PropTypes.bool,
|
18593 | responsive: _react.PropTypes.bool,
|
18594 | tag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]),
|
18595 | responsiveTag: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string])
|
18596 | };
|
18597 |
|
18598 | var defaultProps = {
|
18599 | tag: 'table',
|
18600 | responsiveTag: 'div'
|
18601 | };
|
18602 |
|
18603 | var Table = function Table(props) {
|
18604 | var className = props.className,
|
18605 | cssModule = props.cssModule,
|
18606 | size = props.size,
|
18607 | bordered = props.bordered,
|
18608 | striped = props.striped,
|
18609 | inverse = props.inverse,
|
18610 | hover = props.hover,
|
18611 | reflow = props.reflow,
|
18612 | responsive = props.responsive,
|
18613 | Tag = props.tag,
|
18614 | ResponsiveTag = props.responsiveTag,
|
18615 | attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'size', 'bordered', 'striped', 'inverse', 'hover', 'reflow', 'responsive', 'tag', 'responsiveTag']);
|
18616 |
|
18617 | var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'table', size ? 'table-' + size : false, bordered ? 'table-bordered' : false, striped ? 'table-striped' : false, inverse ? 'table-inverse' : false, hover ? 'table-hover' : false, reflow ? 'table-reflow' : false), cssModule);
|
18618 |
|
18619 | var table = _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
|
18620 |
|
18621 | if (responsive) {
|
18622 | return _react2.default.createElement(
|
18623 | ResponsiveTag,
|
18624 | { className: 'table-responsive' },
|
18625 | table
|
18626 | );
|
18627 | }
|
18628 |
|
18629 | return table;
|
18630 | };
|
18631 |
|
18632 | Table.propTypes = propTypes;
|
18633 | Table.defaultProps = defaultProps;
|
18634 |
|
18635 | exports.default = Table;
|
18636 |
|
18637 | },
|
18638 |
|
18639 | function(module, exports, __webpack_require__) {
|
18640 |
|
18641 | 'use strict';
|
18642 |
|
18643 | Object.defineProperty(exports, "__esModule", {
|
18644 | value: true
|
18645 | });
|
18646 | exports.UncontrolledTooltip = exports.UncontrolledNavDropdown = exports.UncontrolledDropdown = exports.UncontrolledButtonDropdown = exports.UncontrolledAlert = undefined;
|
18647 |
|
18648 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
18649 |
|
18650 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
18651 |
|
18652 | var _react = __webpack_require__(1);
|
18653 |
|
18654 | var _react2 = _interopRequireDefault(_react);
|
18655 |
|
18656 | var _Alert = __webpack_require__(61);
|
18657 |
|
18658 | var _Alert2 = _interopRequireDefault(_Alert);
|
18659 |
|
18660 | var _ButtonDropdown = __webpack_require__(62);
|
18661 |
|
18662 | var _ButtonDropdown2 = _interopRequireDefault(_ButtonDropdown);
|
18663 |
|
18664 | var _Dropdown = __webpack_require__(32);
|
18665 |
|
18666 | var _Dropdown2 = _interopRequireDefault(_Dropdown);
|
18667 |
|
18668 | var _NavDropdown = __webpack_require__(65);
|
18669 |
|
18670 | var _NavDropdown2 = _interopRequireDefault(_NavDropdown);
|
18671 |
|
18672 | var _Tooltip = __webpack_require__(66);
|
18673 |
|
18674 | var _Tooltip2 = _interopRequireDefault(_Tooltip);
|
18675 |
|
18676 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18677 |
|
18678 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
18679 |
|
18680 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
18681 |
|
18682 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
18683 |
|
18684 | var components = {
|
18685 | UncontrolledAlert: _Alert2.default,
|
18686 | UncontrolledButtonDropdown: _ButtonDropdown2.default,
|
18687 | UncontrolledDropdown: _Dropdown2.default,
|
18688 | UncontrolledNavDropdown: _NavDropdown2.default,
|
18689 | UncontrolledTooltip: _Tooltip2.default
|
18690 | };
|
18691 |
|
18692 | Object.keys(components).forEach(function (key) {
|
18693 | var Tag = components[key];
|
18694 | var defaultValue = Tag === _Alert2.default;
|
18695 |
|
18696 | var Uncontrolled = function (_Component) {
|
18697 | _inherits(Uncontrolled, _Component);
|
18698 |
|
18699 | function Uncontrolled(props) {
|
18700 | _classCallCheck(this, Uncontrolled);
|
18701 |
|
18702 | var _this = _possibleConstructorReturn(this, (Uncontrolled.__proto__ || Object.getPrototypeOf(Uncontrolled)).call(this, props));
|
18703 |
|
18704 | _this.state = { isOpen: defaultValue };
|
18705 |
|
18706 | _this.toggle = _this.toggle.bind(_this);
|
18707 | return _this;
|
18708 | }
|
18709 |
|
18710 | _createClass(Uncontrolled, [{
|
18711 | key: 'toggle',
|
18712 | value: function toggle() {
|
18713 | this.setState({ isOpen: !this.state.isOpen });
|
18714 | }
|
18715 | }, {
|
18716 | key: 'render',
|
18717 | value: function render() {
|
18718 | return _react2.default.createElement(Tag, _extends({ isOpen: this.state.isOpen, toggle: this.toggle }, this.props));
|
18719 | }
|
18720 | }]);
|
18721 |
|
18722 | return Uncontrolled;
|
18723 | }(_react.Component);
|
18724 |
|
18725 | Uncontrolled.displayName = key;
|
18726 |
|
18727 | components[key] = Uncontrolled;
|
18728 | });
|
18729 |
|
18730 | var UncontrolledAlert = components.UncontrolledAlert;
|
18731 | var UncontrolledButtonDropdown = components.UncontrolledButtonDropdown;
|
18732 | var UncontrolledDropdown = components.UncontrolledDropdown;
|
18733 | var UncontrolledNavDropdown = components.UncontrolledNavDropdown;
|
18734 | var UncontrolledTooltip = components.UncontrolledTooltip;
|
18735 |
|
18736 | exports.UncontrolledAlert = UncontrolledAlert;
|
18737 | exports.UncontrolledButtonDropdown = UncontrolledButtonDropdown;
|
18738 | exports.UncontrolledDropdown = UncontrolledDropdown;
|
18739 | exports.UncontrolledNavDropdown = UncontrolledNavDropdown;
|
18740 | exports.UncontrolledTooltip = UncontrolledTooltip;
|
18741 |
|
18742 | },
|
18743 |
|
18744 | function(module, exports, __webpack_require__) {
|
18745 |
|
18746 | 'use strict';
|
18747 |
|
18748 | Object.defineProperty(exports, "__esModule", {
|
18749 | value: true
|
18750 | });
|
18751 | exports.UncontrolledPopover = exports.UncontrolledTooltip = exports.UncontrolledNavDropdown = exports.UncontrolledDropdown = exports.UncontrolledButtonDropdown = exports.UncontrolledAlert = exports.ListGroupItemHeading = exports.ListGroupItemText = exports.ListGroupItem = exports.Collapse = exports.Jumbotron = exports.TabPane = exports.TabContent = exports.PaginationLink = exports.PaginationItem = exports.Pagination = exports.Media = exports.Label = exports.InputGroupButton = exports.InputGroupAddon = exports.InputGroup = exports.Input = exports.FormText = exports.FormGroup = exports.FormFeedback = exports.Form = exports.ListGroup = exports.Table = exports.Tooltip = exports.TetherContent = exports.ModalFooter = exports.ModalBody = exports.ModalHeader = exports.Modal = exports.Progress = exports.PopoverTitle = exports.PopoverContent = exports.Popover = exports.CardTitle = exports.CardText = exports.CardSubtitle = exports.CardImgOverlay = exports.CardImg = exports.CardHeader = exports.CardFooter = exports.CardBlock = exports.CardColumns = exports.CardDeck = exports.CardGroup = exports.CardLink = exports.Card = exports.Badge = exports.Fade = exports.DropdownToggle = exports.DropdownMenu = exports.DropdownItem = exports.Dropdown = exports.ButtonToolbar = exports.ButtonGroup = exports.ButtonDropdown = exports.Button = exports.BreadcrumbItem = exports.Breadcrumb = exports.NavLink = exports.NavDropdown = exports.NavItem = exports.Nav = exports.NavbarToggler = exports.NavbarBrand = exports.Navbar = exports.Col = exports.Row = exports.Container = exports.Alert = undefined;
|
18752 |
|
18753 | var _Container = __webpack_require__(125);
|
18754 |
|
18755 | var _Container2 = _interopRequireDefault(_Container);
|
18756 |
|
18757 | var _Row = __webpack_require__(160);
|
18758 |
|
18759 | var _Row2 = _interopRequireDefault(_Row);
|
18760 |
|
18761 | var _Col = __webpack_require__(123);
|
18762 |
|
18763 | var _Col2 = _interopRequireDefault(_Col);
|
18764 |
|
18765 | var _Navbar = __webpack_require__(150);
|
18766 |
|
18767 | var _Navbar2 = _interopRequireDefault(_Navbar);
|
18768 |
|
18769 | var _NavbarBrand = __webpack_require__(151);
|
18770 |
|
18771 | var _NavbarBrand2 = _interopRequireDefault(_NavbarBrand);
|
18772 |
|
18773 | var _NavbarToggler = __webpack_require__(152);
|
18774 |
|
18775 | var _NavbarToggler2 = _interopRequireDefault(_NavbarToggler);
|
18776 |
|
18777 | var _Nav = __webpack_require__(147);
|
18778 |
|
18779 | var _Nav2 = _interopRequireDefault(_Nav);
|
18780 |
|
18781 | var _NavItem = __webpack_require__(148);
|
18782 |
|
18783 | var _NavItem2 = _interopRequireDefault(_NavItem);
|
18784 |
|
18785 | var _NavDropdown = __webpack_require__(65);
|
18786 |
|
18787 | var _NavDropdown2 = _interopRequireDefault(_NavDropdown);
|
18788 |
|
18789 | var _NavLink = __webpack_require__(149);
|
18790 |
|
18791 | var _NavLink2 = _interopRequireDefault(_NavLink);
|
18792 |
|
18793 | var _Breadcrumb = __webpack_require__(106);
|
18794 |
|
18795 | var _Breadcrumb2 = _interopRequireDefault(_Breadcrumb);
|
18796 |
|
18797 | var _BreadcrumbItem = __webpack_require__(107);
|
18798 |
|
18799 | var _BreadcrumbItem2 = _interopRequireDefault(_BreadcrumbItem);
|
18800 |
|
18801 | var _Button = __webpack_require__(38);
|
18802 |
|
18803 | var _Button2 = _interopRequireDefault(_Button);
|
18804 |
|
18805 | var _ButtonDropdown = __webpack_require__(62);
|
18806 |
|
18807 | var _ButtonDropdown2 = _interopRequireDefault(_ButtonDropdown);
|
18808 |
|
18809 | var _ButtonGroup = __webpack_require__(108);
|
18810 |
|
18811 | var _ButtonGroup2 = _interopRequireDefault(_ButtonGroup);
|
18812 |
|
18813 | var _ButtonToolbar = __webpack_require__(109);
|
18814 |
|
18815 | var _ButtonToolbar2 = _interopRequireDefault(_ButtonToolbar);
|
18816 |
|
18817 | var _Dropdown = __webpack_require__(32);
|
18818 |
|
18819 | var _Dropdown2 = _interopRequireDefault(_Dropdown);
|
18820 |
|
18821 | var _DropdownItem = __webpack_require__(126);
|
18822 |
|
18823 | var _DropdownItem2 = _interopRequireDefault(_DropdownItem);
|
18824 |
|
18825 | var _DropdownMenu = __webpack_require__(63);
|
18826 |
|
18827 | var _DropdownMenu2 = _interopRequireDefault(_DropdownMenu);
|
18828 |
|
18829 | var _DropdownToggle = __webpack_require__(127);
|
18830 |
|
18831 | var _DropdownToggle2 = _interopRequireDefault(_DropdownToggle);
|
18832 |
|
18833 | var _Fade = __webpack_require__(64);
|
18834 |
|
18835 | var _Fade2 = _interopRequireDefault(_Fade);
|
18836 |
|
18837 | var _Badge = __webpack_require__(105);
|
18838 |
|
18839 | var _Badge2 = _interopRequireDefault(_Badge);
|
18840 |
|
18841 | var _Card = __webpack_require__(110);
|
18842 |
|
18843 | var _Card2 = _interopRequireDefault(_Card);
|
18844 |
|
18845 | var _CardGroup = __webpack_require__(115);
|
18846 |
|
18847 | var _CardGroup2 = _interopRequireDefault(_CardGroup);
|
18848 |
|
18849 | var _CardDeck = __webpack_require__(113);
|
18850 |
|
18851 | var _CardDeck2 = _interopRequireDefault(_CardDeck);
|
18852 |
|
18853 | var _CardColumns = __webpack_require__(112);
|
18854 |
|
18855 | var _CardColumns2 = _interopRequireDefault(_CardColumns);
|
18856 |
|
18857 | var _CardBlock = __webpack_require__(111);
|
18858 |
|
18859 | var _CardBlock2 = _interopRequireDefault(_CardBlock);
|
18860 |
|
18861 | var _CardLink = __webpack_require__(119);
|
18862 |
|
18863 | var _CardLink2 = _interopRequireDefault(_CardLink);
|
18864 |
|
18865 | var _CardFooter = __webpack_require__(114);
|
18866 |
|
18867 | var _CardFooter2 = _interopRequireDefault(_CardFooter);
|
18868 |
|
18869 | var _CardHeader = __webpack_require__(116);
|
18870 |
|
18871 | var _CardHeader2 = _interopRequireDefault(_CardHeader);
|
18872 |
|
18873 | var _CardImg = __webpack_require__(117);
|
18874 |
|
18875 | var _CardImg2 = _interopRequireDefault(_CardImg);
|
18876 |
|
18877 | var _CardImgOverlay = __webpack_require__(118);
|
18878 |
|
18879 | var _CardImgOverlay2 = _interopRequireDefault(_CardImgOverlay);
|
18880 |
|
18881 | var _CardSubtitle = __webpack_require__(120);
|
18882 |
|
18883 | var _CardSubtitle2 = _interopRequireDefault(_CardSubtitle);
|
18884 |
|
18885 | var _CardText = __webpack_require__(121);
|
18886 |
|
18887 | var _CardText2 = _interopRequireDefault(_CardText);
|
18888 |
|
18889 | var _CardTitle = __webpack_require__(122);
|
18890 |
|
18891 | var _CardTitle2 = _interopRequireDefault(_CardTitle);
|
18892 |
|
18893 | var _Popover = __webpack_require__(156);
|
18894 |
|
18895 | var _Popover2 = _interopRequireDefault(_Popover);
|
18896 |
|
18897 | var _PopoverTitle = __webpack_require__(158);
|
18898 |
|
18899 | var _PopoverTitle2 = _interopRequireDefault(_PopoverTitle);
|
18900 |
|
18901 | var _PopoverContent = __webpack_require__(157);
|
18902 |
|
18903 | var _PopoverContent2 = _interopRequireDefault(_PopoverContent);
|
18904 |
|
18905 | var _Progress = __webpack_require__(159);
|
18906 |
|
18907 | var _Progress2 = _interopRequireDefault(_Progress);
|
18908 |
|
18909 | var _Modal = __webpack_require__(143);
|
18910 |
|
18911 | var _Modal2 = _interopRequireDefault(_Modal);
|
18912 |
|
18913 | var _ModalHeader = __webpack_require__(146);
|
18914 |
|
18915 | var _ModalHeader2 = _interopRequireDefault(_ModalHeader);
|
18916 |
|
18917 | var _ModalBody = __webpack_require__(144);
|
18918 |
|
18919 | var _ModalBody2 = _interopRequireDefault(_ModalBody);
|
18920 |
|
18921 | var _ModalFooter = __webpack_require__(145);
|
18922 |
|
18923 | var _ModalFooter2 = _interopRequireDefault(_ModalFooter);
|
18924 |
|
18925 | var _TetherContent = __webpack_require__(33);
|
18926 |
|
18927 | var _TetherContent2 = _interopRequireDefault(_TetherContent);
|
18928 |
|
18929 | var _Tooltip = __webpack_require__(66);
|
18930 |
|
18931 | var _Tooltip2 = _interopRequireDefault(_Tooltip);
|
18932 |
|
18933 | var _Table = __webpack_require__(163);
|
18934 |
|
18935 | var _Table2 = _interopRequireDefault(_Table);
|
18936 |
|
18937 | var _ListGroup = __webpack_require__(138);
|
18938 |
|
18939 | var _ListGroup2 = _interopRequireDefault(_ListGroup);
|
18940 |
|
18941 | var _Form = __webpack_require__(128);
|
18942 |
|
18943 | var _Form2 = _interopRequireDefault(_Form);
|
18944 |
|
18945 | var _FormFeedback = __webpack_require__(129);
|
18946 |
|
18947 | var _FormFeedback2 = _interopRequireDefault(_FormFeedback);
|
18948 |
|
18949 | var _FormGroup = __webpack_require__(130);
|
18950 |
|
18951 | var _FormGroup2 = _interopRequireDefault(_FormGroup);
|
18952 |
|
18953 | var _FormText = __webpack_require__(131);
|
18954 |
|
18955 | var _FormText2 = _interopRequireDefault(_FormText);
|
18956 |
|
18957 | var _Input = __webpack_require__(132);
|
18958 |
|
18959 | var _Input2 = _interopRequireDefault(_Input);
|
18960 |
|
18961 | var _InputGroup = __webpack_require__(133);
|
18962 |
|
18963 | var _InputGroup2 = _interopRequireDefault(_InputGroup);
|
18964 |
|
18965 | var _InputGroupAddon = __webpack_require__(134);
|
18966 |
|
18967 | var _InputGroupAddon2 = _interopRequireDefault(_InputGroupAddon);
|
18968 |
|
18969 | var _InputGroupButton = __webpack_require__(135);
|
18970 |
|
18971 | var _InputGroupButton2 = _interopRequireDefault(_InputGroupButton);
|
18972 |
|
18973 | var _Label = __webpack_require__(137);
|
18974 |
|
18975 | var _Label2 = _interopRequireDefault(_Label);
|
18976 |
|
18977 | var _Media = __webpack_require__(142);
|
18978 |
|
18979 | var _Media2 = _interopRequireDefault(_Media);
|
18980 |
|
18981 | var _Pagination = __webpack_require__(153);
|
18982 |
|
18983 | var _Pagination2 = _interopRequireDefault(_Pagination);
|
18984 |
|
18985 | var _PaginationItem = __webpack_require__(154);
|
18986 |
|
18987 | var _PaginationItem2 = _interopRequireDefault(_PaginationItem);
|
18988 |
|
18989 | var _PaginationLink = __webpack_require__(155);
|
18990 |
|
18991 | var _PaginationLink2 = _interopRequireDefault(_PaginationLink);
|
18992 |
|
18993 | var _TabContent = __webpack_require__(161);
|
18994 |
|
18995 | var _TabContent2 = _interopRequireDefault(_TabContent);
|
18996 |
|
18997 | var _TabPane = __webpack_require__(162);
|
18998 |
|
18999 | var _TabPane2 = _interopRequireDefault(_TabPane);
|
19000 |
|
19001 | var _Jumbotron = __webpack_require__(136);
|
19002 |
|
19003 | var _Jumbotron2 = _interopRequireDefault(_Jumbotron);
|
19004 |
|
19005 | var _Alert = __webpack_require__(61);
|
19006 |
|
19007 | var _Alert2 = _interopRequireDefault(_Alert);
|
19008 |
|
19009 | var _Collapse = __webpack_require__(124);
|
19010 |
|
19011 | var _Collapse2 = _interopRequireDefault(_Collapse);
|
19012 |
|
19013 | var _ListGroupItem = __webpack_require__(139);
|
19014 |
|
19015 | var _ListGroupItem2 = _interopRequireDefault(_ListGroupItem);
|
19016 |
|
19017 | var _ListGroupItemHeading = __webpack_require__(140);
|
19018 |
|
19019 | var _ListGroupItemHeading2 = _interopRequireDefault(_ListGroupItemHeading);
|
19020 |
|
19021 | var _ListGroupItemText = __webpack_require__(141);
|
19022 |
|
19023 | var _ListGroupItemText2 = _interopRequireDefault(_ListGroupItemText);
|
19024 |
|
19025 | var _Uncontrolled = __webpack_require__(164);
|
19026 |
|
19027 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19028 |
|
19029 | exports.Alert = _Alert2.default;
|
19030 | exports.Container = _Container2.default;
|
19031 | exports.Row = _Row2.default;
|
19032 | exports.Col = _Col2.default;
|
19033 | exports.Navbar = _Navbar2.default;
|
19034 | exports.NavbarBrand = _NavbarBrand2.default;
|
19035 | exports.NavbarToggler = _NavbarToggler2.default;
|
19036 | exports.Nav = _Nav2.default;
|
19037 | exports.NavItem = _NavItem2.default;
|
19038 | exports.NavDropdown = _NavDropdown2.default;
|
19039 | exports.NavLink = _NavLink2.default;
|
19040 | exports.Breadcrumb = _Breadcrumb2.default;
|
19041 | exports.BreadcrumbItem = _BreadcrumbItem2.default;
|
19042 | exports.Button = _Button2.default;
|
19043 | exports.ButtonDropdown = _ButtonDropdown2.default;
|
19044 | exports.ButtonGroup = _ButtonGroup2.default;
|
19045 | exports.ButtonToolbar = _ButtonToolbar2.default;
|
19046 | exports.Dropdown = _Dropdown2.default;
|
19047 | exports.DropdownItem = _DropdownItem2.default;
|
19048 | exports.DropdownMenu = _DropdownMenu2.default;
|
19049 | exports.DropdownToggle = _DropdownToggle2.default;
|
19050 | exports.Fade = _Fade2.default;
|
19051 | exports.Badge = _Badge2.default;
|
19052 | exports.Card = _Card2.default;
|
19053 | exports.CardLink = _CardLink2.default;
|
19054 | exports.CardGroup = _CardGroup2.default;
|
19055 | exports.CardDeck = _CardDeck2.default;
|
19056 | exports.CardColumns = _CardColumns2.default;
|
19057 | exports.CardBlock = _CardBlock2.default;
|
19058 | exports.CardFooter = _CardFooter2.default;
|
19059 | exports.CardHeader = _CardHeader2.default;
|
19060 | exports.CardImg = _CardImg2.default;
|
19061 | exports.CardImgOverlay = _CardImgOverlay2.default;
|
19062 | exports.CardSubtitle = _CardSubtitle2.default;
|
19063 | exports.CardText = _CardText2.default;
|
19064 | exports.CardTitle = _CardTitle2.default;
|
19065 | exports.Popover = _Popover2.default;
|
19066 | exports.PopoverContent = _PopoverContent2.default;
|
19067 | exports.PopoverTitle = _PopoverTitle2.default;
|
19068 | exports.Progress = _Progress2.default;
|
19069 | exports.Modal = _Modal2.default;
|
19070 | exports.ModalHeader = _ModalHeader2.default;
|
19071 | exports.ModalBody = _ModalBody2.default;
|
19072 | exports.ModalFooter = _ModalFooter2.default;
|
19073 | exports.TetherContent = _TetherContent2.default;
|
19074 | exports.Tooltip = _Tooltip2.default;
|
19075 | exports.Table = _Table2.default;
|
19076 | exports.ListGroup = _ListGroup2.default;
|
19077 | exports.Form = _Form2.default;
|
19078 | exports.FormFeedback = _FormFeedback2.default;
|
19079 | exports.FormGroup = _FormGroup2.default;
|
19080 | exports.FormText = _FormText2.default;
|
19081 | exports.Input = _Input2.default;
|
19082 | exports.InputGroup = _InputGroup2.default;
|
19083 | exports.InputGroupAddon = _InputGroupAddon2.default;
|
19084 | exports.InputGroupButton = _InputGroupButton2.default;
|
19085 | exports.Label = _Label2.default;
|
19086 | exports.Media = _Media2.default;
|
19087 | exports.Pagination = _Pagination2.default;
|
19088 | exports.PaginationItem = _PaginationItem2.default;
|
19089 | exports.PaginationLink = _PaginationLink2.default;
|
19090 | exports.TabContent = _TabContent2.default;
|
19091 | exports.TabPane = _TabPane2.default;
|
19092 | exports.Jumbotron = _Jumbotron2.default;
|
19093 | exports.Collapse = _Collapse2.default;
|
19094 | exports.ListGroupItem = _ListGroupItem2.default;
|
19095 | exports.ListGroupItemText = _ListGroupItemText2.default;
|
19096 | exports.ListGroupItemHeading = _ListGroupItemHeading2.default;
|
19097 | exports.UncontrolledAlert = _Uncontrolled.UncontrolledAlert;
|
19098 | exports.UncontrolledButtonDropdown = _Uncontrolled.UncontrolledButtonDropdown;
|
19099 | exports.UncontrolledDropdown = _Uncontrolled.UncontrolledDropdown;
|
19100 | exports.UncontrolledNavDropdown = _Uncontrolled.UncontrolledNavDropdown;
|
19101 | exports.UncontrolledTooltip = _Uncontrolled.UncontrolledTooltip;
|
19102 | exports.UncontrolledPopover = _Uncontrolled.UncontrolledPopover;
|
19103 |
|
19104 | },
|
19105 |
|
19106 | function(module, exports, __webpack_require__) {
|
19107 |
|
19108 | 'use strict';
|
19109 |
|
19110 | |
19111 |
|
19112 |
|
19113 |
|
19114 |
|
19115 |
|
19116 |
|
19117 |
|
19118 |
|
19119 |
|
19120 |
|
19121 | var invariant = __webpack_require__(4);
|
19122 |
|
19123 | |
19124 |
|
19125 |
|
19126 |
|
19127 |
|
19128 |
|
19129 |
|
19130 |
|
19131 |
|
19132 | function matchesSelector_SLOW(element, selector) {
|
19133 | var root = element;
|
19134 | while (root.parentNode) {
|
19135 | root = root.parentNode;
|
19136 | }
|
19137 |
|
19138 | var all = root.querySelectorAll(selector);
|
19139 | return Array.prototype.indexOf.call(all, element) !== -1;
|
19140 | }
|
19141 |
|
19142 | var CSSCore = {
|
19143 |
|
19144 | |
19145 |
|
19146 |
|
19147 |
|
19148 |
|
19149 |
|
19150 |
|
19151 | addClass: function addClass(element, className) {
|
19152 | !!/\s/.test(className) ? true ? invariant(false, 'CSSCore.addClass takes only a single class name. "%s" contains ' + 'multiple classes.', className) : invariant(false) : void 0;
|
19153 |
|
19154 | if (className) {
|
19155 | if (element.classList) {
|
19156 | element.classList.add(className);
|
19157 | } else if (!CSSCore.hasClass(element, className)) {
|
19158 | element.className = element.className + ' ' + className;
|
19159 | }
|
19160 | }
|
19161 | return element;
|
19162 | },
|
19163 |
|
19164 | |
19165 |
|
19166 |
|
19167 |
|
19168 |
|
19169 |
|
19170 |
|
19171 | removeClass: function removeClass(element, className) {
|
19172 | !!/\s/.test(className) ? true ? invariant(false, 'CSSCore.removeClass takes only a single class name. "%s" contains ' + 'multiple classes.', className) : invariant(false) : void 0;
|
19173 |
|
19174 | if (className) {
|
19175 | if (element.classList) {
|
19176 | element.classList.remove(className);
|
19177 | } else if (CSSCore.hasClass(element, className)) {
|
19178 | element.className = element.className.replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ')
|
19179 | .replace(/^\s*|\s*$/g, '');
|
19180 | }
|
19181 | }
|
19182 | return element;
|
19183 | },
|
19184 |
|
19185 | |
19186 |
|
19187 |
|
19188 |
|
19189 |
|
19190 |
|
19191 |
|
19192 |
|
19193 | conditionClass: function conditionClass(element, className, bool) {
|
19194 | return (bool ? CSSCore.addClass : CSSCore.removeClass)(element, className);
|
19195 | },
|
19196 |
|
19197 | |
19198 |
|
19199 |
|
19200 |
|
19201 |
|
19202 |
|
19203 |
|
19204 | hasClass: function hasClass(element, className) {
|
19205 | !!/\s/.test(className) ? true ? invariant(false, 'CSS.hasClass takes only a single class name.') : invariant(false) : void 0;
|
19206 | if (element.classList) {
|
19207 | return !!className && element.classList.contains(className);
|
19208 | }
|
19209 | return (' ' + element.className + ' ').indexOf(' ' + className + ' ') > -1;
|
19210 | },
|
19211 |
|
19212 | |
19213 |
|
19214 |
|
19215 |
|
19216 |
|
19217 |
|
19218 |
|
19219 | matchesSelector: function matchesSelector(element, selector) {
|
19220 | var matchesImpl = element.matches || element.webkitMatchesSelector || element.mozMatchesSelector || element.msMatchesSelector || function (s) {
|
19221 | return matchesSelector_SLOW(element, s);
|
19222 | };
|
19223 | return matchesImpl.call(element, selector);
|
19224 | }
|
19225 |
|
19226 | };
|
19227 |
|
19228 | module.exports = CSSCore;
|
19229 |
|
19230 | },
|
19231 |
|
19232 | function(module, exports) {
|
19233 |
|
19234 | "use strict";
|
19235 |
|
19236 | |
19237 |
|
19238 |
|
19239 |
|
19240 |
|
19241 |
|
19242 |
|
19243 |
|
19244 |
|
19245 |
|
19246 |
|
19247 | var _hyphenPattern = /-(.)/g;
|
19248 |
|
19249 | |
19250 |
|
19251 |
|
19252 |
|
19253 |
|
19254 |
|
19255 |
|
19256 |
|
19257 |
|
19258 | function camelize(string) {
|
19259 | return string.replace(_hyphenPattern, function (_, character) {
|
19260 | return character.toUpperCase();
|
19261 | });
|
19262 | }
|
19263 |
|
19264 | module.exports = camelize;
|
19265 |
|
19266 | },
|
19267 |
|
19268 | function(module, exports, __webpack_require__) {
|
19269 |
|
19270 | |
19271 |
|
19272 |
|
19273 |
|
19274 |
|
19275 |
|
19276 |
|
19277 |
|
19278 |
|
19279 |
|
19280 |
|
19281 | 'use strict';
|
19282 |
|
19283 | var camelize = __webpack_require__(167);
|
19284 |
|
19285 | var msPattern = /^-ms-/;
|
19286 |
|
19287 | |
19288 |
|
19289 |
|
19290 |
|
19291 |
|
19292 |
|
19293 |
|
19294 |
|
19295 |
|
19296 |
|
19297 |
|
19298 |
|
19299 |
|
19300 |
|
19301 |
|
19302 |
|
19303 |
|
19304 | function camelizeStyleName(string) {
|
19305 | return camelize(string.replace(msPattern, 'ms-'));
|
19306 | }
|
19307 |
|
19308 | module.exports = camelizeStyleName;
|
19309 |
|
19310 | },
|
19311 |
|
19312 | function(module, exports, __webpack_require__) {
|
19313 |
|
19314 | 'use strict';
|
19315 |
|
19316 | |
19317 |
|
19318 |
|
19319 |
|
19320 |
|
19321 |
|
19322 |
|
19323 |
|
19324 |
|
19325 |
|
19326 |
|
19327 | var isTextNode = __webpack_require__(177);
|
19328 |
|
19329 |
|
19330 |
|
19331 | |
19332 |
|
19333 |
|
19334 | function containsNode(outerNode, innerNode) {
|
19335 | if (!outerNode || !innerNode) {
|
19336 | return false;
|
19337 | } else if (outerNode === innerNode) {
|
19338 | return true;
|
19339 | } else if (isTextNode(outerNode)) {
|
19340 | return false;
|
19341 | } else if (isTextNode(innerNode)) {
|
19342 | return containsNode(outerNode, innerNode.parentNode);
|
19343 | } else if ('contains' in outerNode) {
|
19344 | return outerNode.contains(innerNode);
|
19345 | } else if (outerNode.compareDocumentPosition) {
|
19346 | return !!(outerNode.compareDocumentPosition(innerNode) & 16);
|
19347 | } else {
|
19348 | return false;
|
19349 | }
|
19350 | }
|
19351 |
|
19352 | module.exports = containsNode;
|
19353 |
|
19354 | },
|
19355 |
|
19356 | function(module, exports, __webpack_require__) {
|
19357 |
|
19358 | 'use strict';
|
19359 |
|
19360 | |
19361 |
|
19362 |
|
19363 |
|
19364 |
|
19365 |
|
19366 |
|
19367 |
|
19368 |
|
19369 |
|
19370 |
|
19371 | var invariant = __webpack_require__(4);
|
19372 |
|
19373 | |
19374 |
|
19375 |
|
19376 |
|
19377 |
|
19378 |
|
19379 |
|
19380 |
|
19381 |
|
19382 | function toArray(obj) {
|
19383 | var length = obj.length;
|
19384 |
|
19385 |
|
19386 |
|
19387 | !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? true ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;
|
19388 |
|
19389 | !(typeof length === 'number') ? true ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;
|
19390 |
|
19391 | !(length === 0 || length - 1 in obj) ? true ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;
|
19392 |
|
19393 | !(typeof obj.callee !== 'function') ? true ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;
|
19394 |
|
19395 |
|
19396 |
|
19397 |
|
19398 | if (obj.hasOwnProperty) {
|
19399 | try {
|
19400 | return Array.prototype.slice.call(obj);
|
19401 | } catch (e) {
|
19402 |
|
19403 | }
|
19404 | }
|
19405 |
|
19406 |
|
19407 |
|
19408 | var ret = Array(length);
|
19409 | for (var ii = 0; ii < length; ii++) {
|
19410 | ret[ii] = obj[ii];
|
19411 | }
|
19412 | return ret;
|
19413 | }
|
19414 |
|
19415 | |
19416 |
|
19417 |
|
19418 |
|
19419 |
|
19420 |
|
19421 |
|
19422 |
|
19423 |
|
19424 |
|
19425 |
|
19426 |
|
19427 |
|
19428 |
|
19429 |
|
19430 | function hasArrayNature(obj) {
|
19431 | return (
|
19432 |
|
19433 | !!obj && (
|
19434 |
|
19435 | typeof obj == 'object' || typeof obj == 'function') &&
|
19436 |
|
19437 | 'length' in obj &&
|
19438 |
|
19439 | !('setInterval' in obj) &&
|
19440 |
|
19441 |
|
19442 | typeof obj.nodeType != 'number' && (
|
19443 |
|
19444 | Array.isArray(obj) ||
|
19445 |
|
19446 | 'callee' in obj ||
|
19447 |
|
19448 | 'item' in obj)
|
19449 | );
|
19450 | }
|
19451 |
|
19452 | |
19453 |
|
19454 |
|
19455 |
|
19456 |
|
19457 |
|
19458 |
|
19459 |
|
19460 |
|
19461 |
|
19462 |
|
19463 |
|
19464 |
|
19465 |
|
19466 |
|
19467 |
|
19468 |
|
19469 |
|
19470 |
|
19471 |
|
19472 |
|
19473 | function createArrayFromMixed(obj) {
|
19474 | if (!hasArrayNature(obj)) {
|
19475 | return [obj];
|
19476 | } else if (Array.isArray(obj)) {
|
19477 | return obj.slice();
|
19478 | } else {
|
19479 | return toArray(obj);
|
19480 | }
|
19481 | }
|
19482 |
|
19483 | module.exports = createArrayFromMixed;
|
19484 |
|
19485 | },
|
19486 |
|
19487 | function(module, exports, __webpack_require__) {
|
19488 |
|
19489 | 'use strict';
|
19490 |
|
19491 | |
19492 |
|
19493 |
|
19494 |
|
19495 |
|
19496 |
|
19497 |
|
19498 |
|
19499 |
|
19500 |
|
19501 |
|
19502 |
|
19503 |
|
19504 | var ExecutionEnvironment = __webpack_require__(9);
|
19505 |
|
19506 | var createArrayFromMixed = __webpack_require__(170);
|
19507 | var getMarkupWrap = __webpack_require__(172);
|
19508 | var invariant = __webpack_require__(4);
|
19509 |
|
19510 | |
19511 |
|
19512 |
|
19513 | var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
|
19514 |
|
19515 | |
19516 |
|
19517 |
|
19518 | var nodeNamePattern = /^\s*<(\w+)/;
|
19519 |
|
19520 | |
19521 |
|
19522 |
|
19523 |
|
19524 |
|
19525 |
|
19526 | function getNodeName(markup) {
|
19527 | var nodeNameMatch = markup.match(nodeNamePattern);
|
19528 | return nodeNameMatch && nodeNameMatch[1].toLowerCase();
|
19529 | }
|
19530 |
|
19531 | |
19532 |
|
19533 |
|
19534 |
|
19535 |
|
19536 |
|
19537 |
|
19538 |
|
19539 |
|
19540 |
|
19541 | function createNodesFromMarkup(markup, handleScript) {
|
19542 | var node = dummyNode;
|
19543 | !!!dummyNode ? true ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0;
|
19544 | var nodeName = getNodeName(markup);
|
19545 |
|
19546 | var wrap = nodeName && getMarkupWrap(nodeName);
|
19547 | if (wrap) {
|
19548 | node.innerHTML = wrap[1] + markup + wrap[2];
|
19549 |
|
19550 | var wrapDepth = wrap[0];
|
19551 | while (wrapDepth--) {
|
19552 | node = node.lastChild;
|
19553 | }
|
19554 | } else {
|
19555 | node.innerHTML = markup;
|
19556 | }
|
19557 |
|
19558 | var scripts = node.getElementsByTagName('script');
|
19559 | if (scripts.length) {
|
19560 | !handleScript ? true ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0;
|
19561 | createArrayFromMixed(scripts).forEach(handleScript);
|
19562 | }
|
19563 |
|
19564 | var nodes = Array.from(node.childNodes);
|
19565 | while (node.lastChild) {
|
19566 | node.removeChild(node.lastChild);
|
19567 | }
|
19568 | return nodes;
|
19569 | }
|
19570 |
|
19571 | module.exports = createNodesFromMarkup;
|
19572 |
|
19573 | },
|
19574 |
|
19575 | function(module, exports, __webpack_require__) {
|
19576 |
|
19577 | 'use strict';
|
19578 |
|
19579 | |
19580 |
|
19581 |
|
19582 |
|
19583 |
|
19584 |
|
19585 |
|
19586 |
|
19587 |
|
19588 |
|
19589 |
|
19590 |
|
19591 | var ExecutionEnvironment = __webpack_require__(9);
|
19592 |
|
19593 | var invariant = __webpack_require__(4);
|
19594 |
|
19595 | |
19596 |
|
19597 |
|
19598 | var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
|
19599 |
|
19600 | |
19601 |
|
19602 |
|
19603 |
|
19604 |
|
19605 |
|
19606 |
|
19607 | var shouldWrap = {};
|
19608 |
|
19609 | var selectWrap = [1, '<select multiple="true">', '</select>'];
|
19610 | var tableWrap = [1, '<table>', '</table>'];
|
19611 | var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
|
19612 |
|
19613 | var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
|
19614 |
|
19615 | var markupWrap = {
|
19616 | '*': [1, '?<div>', '</div>'],
|
19617 |
|
19618 | 'area': [1, '<map>', '</map>'],
|
19619 | 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
|
19620 | 'legend': [1, '<fieldset>', '</fieldset>'],
|
19621 | 'param': [1, '<object>', '</object>'],
|
19622 | 'tr': [2, '<table><tbody>', '</tbody></table>'],
|
19623 |
|
19624 | 'optgroup': selectWrap,
|
19625 | 'option': selectWrap,
|
19626 |
|
19627 | 'caption': tableWrap,
|
19628 | 'colgroup': tableWrap,
|
19629 | 'tbody': tableWrap,
|
19630 | 'tfoot': tableWrap,
|
19631 | 'thead': tableWrap,
|
19632 |
|
19633 | 'td': trWrap,
|
19634 | 'th': trWrap
|
19635 | };
|
19636 |
|
19637 |
|
19638 |
|
19639 |
|
19640 | var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
|
19641 | svgElements.forEach(function (nodeName) {
|
19642 | markupWrap[nodeName] = svgWrap;
|
19643 | shouldWrap[nodeName] = true;
|
19644 | });
|
19645 |
|
19646 | |
19647 |
|
19648 |
|
19649 |
|
19650 |
|
19651 |
|
19652 |
|
19653 |
|
19654 | function getMarkupWrap(nodeName) {
|
19655 | !!!dummyNode ? true ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;
|
19656 | if (!markupWrap.hasOwnProperty(nodeName)) {
|
19657 | nodeName = '*';
|
19658 | }
|
19659 | if (!shouldWrap.hasOwnProperty(nodeName)) {
|
19660 | if (nodeName === '*') {
|
19661 | dummyNode.innerHTML = '<link />';
|
19662 | } else {
|
19663 | dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
|
19664 | }
|
19665 | shouldWrap[nodeName] = !dummyNode.firstChild;
|
19666 | }
|
19667 | return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
|
19668 | }
|
19669 |
|
19670 | module.exports = getMarkupWrap;
|
19671 |
|
19672 | },
|
19673 |
|
19674 | function(module, exports) {
|
19675 |
|
19676 | |
19677 |
|
19678 |
|
19679 |
|
19680 |
|
19681 |
|
19682 |
|
19683 |
|
19684 |
|
19685 |
|
19686 |
|
19687 | 'use strict';
|
19688 |
|
19689 | |
19690 |
|
19691 |
|
19692 |
|
19693 |
|
19694 |
|
19695 |
|
19696 |
|
19697 |
|
19698 |
|
19699 |
|
19700 | function getUnboundedScrollPosition(scrollable) {
|
19701 | if (scrollable === window) {
|
19702 | return {
|
19703 | x: window.pageXOffset || document.documentElement.scrollLeft,
|
19704 | y: window.pageYOffset || document.documentElement.scrollTop
|
19705 | };
|
19706 | }
|
19707 | return {
|
19708 | x: scrollable.scrollLeft,
|
19709 | y: scrollable.scrollTop
|
19710 | };
|
19711 | }
|
19712 |
|
19713 | module.exports = getUnboundedScrollPosition;
|
19714 |
|
19715 | },
|
19716 |
|
19717 | function(module, exports) {
|
19718 |
|
19719 | 'use strict';
|
19720 |
|
19721 | |
19722 |
|
19723 |
|
19724 |
|
19725 |
|
19726 |
|
19727 |
|
19728 |
|
19729 |
|
19730 |
|
19731 |
|
19732 | var _uppercasePattern = /([A-Z])/g;
|
19733 |
|
19734 | |
19735 |
|
19736 |
|
19737 |
|
19738 |
|
19739 |
|
19740 |
|
19741 |
|
19742 |
|
19743 |
|
19744 |
|
19745 |
|
19746 | function hyphenate(string) {
|
19747 | return string.replace(_uppercasePattern, '-$1').toLowerCase();
|
19748 | }
|
19749 |
|
19750 | module.exports = hyphenate;
|
19751 |
|
19752 | },
|
19753 |
|
19754 | function(module, exports, __webpack_require__) {
|
19755 |
|
19756 | |
19757 |
|
19758 |
|
19759 |
|
19760 |
|
19761 |
|
19762 |
|
19763 |
|
19764 |
|
19765 |
|
19766 |
|
19767 | 'use strict';
|
19768 |
|
19769 | var hyphenate = __webpack_require__(174);
|
19770 |
|
19771 | var msPattern = /^ms-/;
|
19772 |
|
19773 | |
19774 |
|
19775 |
|
19776 |
|
19777 |
|
19778 |
|
19779 |
|
19780 |
|
19781 |
|
19782 |
|
19783 |
|
19784 |
|
19785 |
|
19786 |
|
19787 |
|
19788 |
|
19789 | function hyphenateStyleName(string) {
|
19790 | return hyphenate(string).replace(msPattern, '-ms-');
|
19791 | }
|
19792 |
|
19793 | module.exports = hyphenateStyleName;
|
19794 |
|
19795 | },
|
19796 |
|
19797 | function(module, exports) {
|
19798 |
|
19799 | 'use strict';
|
19800 |
|
19801 | |
19802 |
|
19803 |
|
19804 |
|
19805 |
|
19806 |
|
19807 |
|
19808 |
|
19809 |
|
19810 |
|
19811 |
|
19812 | |
19813 |
|
19814 |
|
19815 |
|
19816 | function isNode(object) {
|
19817 | return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
|
19818 | }
|
19819 |
|
19820 | module.exports = isNode;
|
19821 |
|
19822 | },
|
19823 |
|
19824 | function(module, exports, __webpack_require__) {
|
19825 |
|
19826 | 'use strict';
|
19827 |
|
19828 | |
19829 |
|
19830 |
|
19831 |
|
19832 |
|
19833 |
|
19834 |
|
19835 |
|
19836 |
|
19837 |
|
19838 |
|
19839 | var isNode = __webpack_require__(176);
|
19840 |
|
19841 | |
19842 |
|
19843 |
|
19844 |
|
19845 | function isTextNode(object) {
|
19846 | return isNode(object) && object.nodeType == 3;
|
19847 | }
|
19848 |
|
19849 | module.exports = isTextNode;
|
19850 |
|
19851 | },
|
19852 |
|
19853 | function(module, exports) {
|
19854 |
|
19855 | |
19856 |
|
19857 |
|
19858 |
|
19859 |
|
19860 |
|
19861 |
|
19862 |
|
19863 |
|
19864 |
|
19865 |
|
19866 |
|
19867 | 'use strict';
|
19868 |
|
19869 | |
19870 |
|
19871 |
|
19872 |
|
19873 | function memoizeStringOnly(callback) {
|
19874 | var cache = {};
|
19875 | return function (string) {
|
19876 | if (!cache.hasOwnProperty(string)) {
|
19877 | cache[string] = callback.call(this, string);
|
19878 | }
|
19879 | return cache[string];
|
19880 | };
|
19881 | }
|
19882 |
|
19883 | module.exports = memoizeStringOnly;
|
19884 |
|
19885 | },
|
19886 |
|
19887 | function(module, exports, __webpack_require__) {
|
19888 |
|
19889 | |
19890 |
|
19891 |
|
19892 |
|
19893 |
|
19894 |
|
19895 |
|
19896 |
|
19897 |
|
19898 |
|
19899 |
|
19900 | 'use strict';
|
19901 |
|
19902 | var ExecutionEnvironment = __webpack_require__(9);
|
19903 |
|
19904 | var performance;
|
19905 |
|
19906 | if (ExecutionEnvironment.canUseDOM) {
|
19907 | performance = window.performance || window.msPerformance || window.webkitPerformance;
|
19908 | }
|
19909 |
|
19910 | module.exports = performance || {};
|
19911 |
|
19912 | },
|
19913 |
|
19914 | function(module, exports, __webpack_require__) {
|
19915 |
|
19916 | 'use strict';
|
19917 |
|
19918 | |
19919 |
|
19920 |
|
19921 |
|
19922 |
|
19923 |
|
19924 |
|
19925 |
|
19926 |
|
19927 |
|
19928 |
|
19929 | var performance = __webpack_require__(179);
|
19930 |
|
19931 | var performanceNow;
|
19932 |
|
19933 | |
19934 |
|
19935 |
|
19936 |
|
19937 |
|
19938 | if (performance.now) {
|
19939 | performanceNow = function performanceNow() {
|
19940 | return performance.now();
|
19941 | };
|
19942 | } else {
|
19943 | performanceNow = function performanceNow() {
|
19944 | return Date.now();
|
19945 | };
|
19946 | }
|
19947 |
|
19948 | module.exports = performanceNow;
|
19949 |
|
19950 | },
|
19951 |
|
19952 | function(module, exports) {
|
19953 |
|
19954 | |
19955 |
|
19956 |
|
19957 |
|
19958 |
|
19959 |
|
19960 |
|
19961 |
|
19962 |
|
19963 |
|
19964 | var funcTag = '[object Function]',
|
19965 | genTag = '[object GeneratorFunction]';
|
19966 |
|
19967 |
|
19968 | var objectProto = Object.prototype;
|
19969 |
|
19970 | |
19971 |
|
19972 |
|
19973 |
|
19974 | var objectToString = objectProto.toString;
|
19975 |
|
19976 | |
19977 |
|
19978 |
|
19979 |
|
19980 |
|
19981 |
|
19982 |
|
19983 |
|
19984 |
|
19985 |
|
19986 |
|
19987 |
|
19988 |
|
19989 |
|
19990 |
|
19991 |
|
19992 | function isFunction(value) {
|
19993 |
|
19994 |
|
19995 |
|
19996 | var tag = isObject(value) ? objectToString.call(value) : '';
|
19997 | return tag == funcTag || tag == genTag;
|
19998 | }
|
19999 |
|
20000 | |
20001 |
|
20002 |
|
20003 |
|
20004 |
|
20005 |
|
20006 |
|
20007 |
|
20008 |
|
20009 |
|
20010 |
|
20011 |
|
20012 |
|
20013 |
|
20014 |
|
20015 |
|
20016 |
|
20017 |
|
20018 |
|
20019 |
|
20020 |
|
20021 |
|
20022 |
|
20023 | function isObject(value) {
|
20024 | var type = typeof value;
|
20025 | return !!value && (type == 'object' || type == 'function');
|
20026 | }
|
20027 |
|
20028 | module.exports = isFunction;
|
20029 |
|
20030 |
|
20031 | },
|
20032 |
|
20033 | function(module, exports) {
|
20034 |
|
20035 | |
20036 |
|
20037 |
|
20038 |
|
20039 |
|
20040 |
|
20041 |
|
20042 |
|
20043 |
|
20044 | |
20045 |
|
20046 |
|
20047 |
|
20048 |
|
20049 |
|
20050 |
|
20051 |
|
20052 |
|
20053 |
|
20054 |
|
20055 |
|
20056 |
|
20057 |
|
20058 |
|
20059 |
|
20060 |
|
20061 |
|
20062 |
|
20063 |
|
20064 | function isObject(value) {
|
20065 |
|
20066 |
|
20067 | var type = typeof value;
|
20068 | return !!value && (type == 'object' || type == 'function');
|
20069 | }
|
20070 |
|
20071 | module.exports = isObject;
|
20072 |
|
20073 |
|
20074 | },
|
20075 |
|
20076 | function(module, exports) {
|
20077 |
|
20078 | |
20079 |
|
20080 |
|
20081 |
|
20082 |
|
20083 |
|
20084 |
|
20085 |
|
20086 |
|
20087 |
|
20088 | var NAN = 0 / 0;
|
20089 |
|
20090 |
|
20091 | var symbolTag = '[object Symbol]';
|
20092 |
|
20093 |
|
20094 | var reTrim = /^\s+|\s+$/g;
|
20095 |
|
20096 |
|
20097 | var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
20098 |
|
20099 |
|
20100 | var reIsBinary = /^0b[01]+$/i;
|
20101 |
|
20102 |
|
20103 | var reIsOctal = /^0o[0-7]+$/i;
|
20104 |
|
20105 |
|
20106 | var freeParseInt = parseInt;
|
20107 |
|
20108 |
|
20109 | var objectProto = Object.prototype;
|
20110 |
|
20111 | |
20112 |
|
20113 |
|
20114 |
|
20115 |
|
20116 | var objectToString = objectProto.toString;
|
20117 |
|
20118 | |
20119 |
|
20120 |
|
20121 |
|
20122 |
|
20123 |
|
20124 |
|
20125 |
|
20126 |
|
20127 |
|
20128 |
|
20129 |
|
20130 |
|
20131 |
|
20132 |
|
20133 |
|
20134 |
|
20135 |
|
20136 |
|
20137 |
|
20138 |
|
20139 |
|
20140 |
|
20141 |
|
20142 |
|
20143 | function isObject(value) {
|
20144 | var type = typeof value;
|
20145 | return !!value && (type == 'object' || type == 'function');
|
20146 | }
|
20147 |
|
20148 | |
20149 |
|
20150 |
|
20151 |
|
20152 |
|
20153 |
|
20154 |
|
20155 |
|
20156 |
|
20157 |
|
20158 |
|
20159 |
|
20160 |
|
20161 |
|
20162 |
|
20163 |
|
20164 |
|
20165 |
|
20166 |
|
20167 |
|
20168 |
|
20169 |
|
20170 |
|
20171 |
|
20172 | function isObjectLike(value) {
|
20173 | return !!value && typeof value == 'object';
|
20174 | }
|
20175 |
|
20176 | |
20177 |
|
20178 |
|
20179 |
|
20180 |
|
20181 |
|
20182 |
|
20183 |
|
20184 |
|
20185 |
|
20186 |
|
20187 |
|
20188 |
|
20189 |
|
20190 |
|
20191 |
|
20192 |
|
20193 | function isSymbol(value) {
|
20194 | return typeof value == 'symbol' ||
|
20195 | (isObjectLike(value) && objectToString.call(value) == symbolTag);
|
20196 | }
|
20197 |
|
20198 | |
20199 |
|
20200 |
|
20201 |
|
20202 |
|
20203 |
|
20204 |
|
20205 |
|
20206 |
|
20207 |
|
20208 |
|
20209 |
|
20210 |
|
20211 |
|
20212 |
|
20213 |
|
20214 |
|
20215 |
|
20216 |
|
20217 |
|
20218 |
|
20219 |
|
20220 |
|
20221 | function toNumber(value) {
|
20222 | if (typeof value == 'number') {
|
20223 | return value;
|
20224 | }
|
20225 | if (isSymbol(value)) {
|
20226 | return NAN;
|
20227 | }
|
20228 | if (isObject(value)) {
|
20229 | var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
20230 | value = isObject(other) ? (other + '') : other;
|
20231 | }
|
20232 | if (typeof value != 'string') {
|
20233 | return value === 0 ? value : +value;
|
20234 | }
|
20235 | value = value.replace(reTrim, '');
|
20236 | var isBinary = reIsBinary.test(value);
|
20237 | return (isBinary || reIsOctal.test(value))
|
20238 | ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
20239 | : (reIsBadHex.test(value) ? NAN : +value);
|
20240 | }
|
20241 |
|
20242 | module.exports = toNumber;
|
20243 |
|
20244 |
|
20245 | },
|
20246 |
|
20247 | function(module, exports, __webpack_require__) {
|
20248 |
|
20249 | module.exports = __webpack_require__(254);
|
20250 |
|
20251 | },
|
20252 |
|
20253 | function(module, exports) {
|
20254 |
|
20255 | |
20256 |
|
20257 |
|
20258 |
|
20259 |
|
20260 |
|
20261 |
|
20262 |
|
20263 |
|
20264 |
|
20265 | 'use strict';
|
20266 |
|
20267 | var ARIADOMPropertyConfig = {
|
20268 | Properties: {
|
20269 |
|
20270 | 'aria-current': 0,
|
20271 | 'aria-details': 0,
|
20272 | 'aria-disabled': 0,
|
20273 | 'aria-hidden': 0,
|
20274 | 'aria-invalid': 0,
|
20275 | 'aria-keyshortcuts': 0,
|
20276 | 'aria-label': 0,
|
20277 | 'aria-roledescription': 0,
|
20278 |
|
20279 | 'aria-autocomplete': 0,
|
20280 | 'aria-checked': 0,
|
20281 | 'aria-expanded': 0,
|
20282 | 'aria-haspopup': 0,
|
20283 | 'aria-level': 0,
|
20284 | 'aria-modal': 0,
|
20285 | 'aria-multiline': 0,
|
20286 | 'aria-multiselectable': 0,
|
20287 | 'aria-orientation': 0,
|
20288 | 'aria-placeholder': 0,
|
20289 | 'aria-pressed': 0,
|
20290 | 'aria-readonly': 0,
|
20291 | 'aria-required': 0,
|
20292 | 'aria-selected': 0,
|
20293 | 'aria-sort': 0,
|
20294 | 'aria-valuemax': 0,
|
20295 | 'aria-valuemin': 0,
|
20296 | 'aria-valuenow': 0,
|
20297 | 'aria-valuetext': 0,
|
20298 |
|
20299 | 'aria-atomic': 0,
|
20300 | 'aria-busy': 0,
|
20301 | 'aria-live': 0,
|
20302 | 'aria-relevant': 0,
|
20303 |
|
20304 | 'aria-dropeffect': 0,
|
20305 | 'aria-grabbed': 0,
|
20306 |
|
20307 | 'aria-activedescendant': 0,
|
20308 | 'aria-colcount': 0,
|
20309 | 'aria-colindex': 0,
|
20310 | 'aria-colspan': 0,
|
20311 | 'aria-controls': 0,
|
20312 | 'aria-describedby': 0,
|
20313 | 'aria-errormessage': 0,
|
20314 | 'aria-flowto': 0,
|
20315 | 'aria-labelledby': 0,
|
20316 | 'aria-owns': 0,
|
20317 | 'aria-posinset': 0,
|
20318 | 'aria-rowcount': 0,
|
20319 | 'aria-rowindex': 0,
|
20320 | 'aria-rowspan': 0,
|
20321 | 'aria-setsize': 0
|
20322 | },
|
20323 | DOMAttributeNames: {},
|
20324 | DOMPropertyNames: {}
|
20325 | };
|
20326 |
|
20327 | module.exports = ARIADOMPropertyConfig;
|
20328 |
|
20329 | },
|
20330 |
|
20331 | function(module, exports, __webpack_require__) {
|
20332 |
|
20333 | |
20334 |
|
20335 |
|
20336 |
|
20337 |
|
20338 |
|
20339 |
|
20340 |
|
20341 |
|
20342 |
|
20343 | 'use strict';
|
20344 |
|
20345 | var ReactDOMComponentTree = __webpack_require__(8);
|
20346 |
|
20347 | var focusNode = __webpack_require__(68);
|
20348 |
|
20349 | var AutoFocusUtils = {
|
20350 | focusDOMComponent: function () {
|
20351 | focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
|
20352 | }
|
20353 | };
|
20354 |
|
20355 | module.exports = AutoFocusUtils;
|
20356 |
|
20357 | },
|
20358 |
|
20359 | function(module, exports, __webpack_require__) {
|
20360 |
|
20361 | |
20362 |
|
20363 |
|
20364 |
|
20365 |
|
20366 |
|
20367 |
|
20368 |
|
20369 |
|
20370 |
|
20371 | 'use strict';
|
20372 |
|
20373 | var EventPropagators = __webpack_require__(27);
|
20374 | var ExecutionEnvironment = __webpack_require__(9);
|
20375 | var FallbackCompositionState = __webpack_require__(194);
|
20376 | var SyntheticCompositionEvent = __webpack_require__(236);
|
20377 | var SyntheticInputEvent = __webpack_require__(239);
|
20378 |
|
20379 | var END_KEYCODES = [9, 13, 27, 32];
|
20380 | var START_KEYCODE = 229;
|
20381 |
|
20382 | var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
|
20383 |
|
20384 | var documentMode = null;
|
20385 | if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
|
20386 | documentMode = document.documentMode;
|
20387 | }
|
20388 |
|
20389 |
|
20390 |
|
20391 |
|
20392 | var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
|
20393 |
|
20394 |
|
20395 |
|
20396 |
|
20397 | var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
|
20398 |
|
20399 | |
20400 |
|
20401 |
|
20402 |
|
20403 | function isPresto() {
|
20404 | var opera = window.opera;
|
20405 | return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
|
20406 | }
|
20407 |
|
20408 | var SPACEBAR_CODE = 32;
|
20409 | var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
|
20410 |
|
20411 |
|
20412 | var eventTypes = {
|
20413 | beforeInput: {
|
20414 | phasedRegistrationNames: {
|
20415 | bubbled: 'onBeforeInput',
|
20416 | captured: 'onBeforeInputCapture'
|
20417 | },
|
20418 | dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']
|
20419 | },
|
20420 | compositionEnd: {
|
20421 | phasedRegistrationNames: {
|
20422 | bubbled: 'onCompositionEnd',
|
20423 | captured: 'onCompositionEndCapture'
|
20424 | },
|
20425 | dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
|
20426 | },
|
20427 | compositionStart: {
|
20428 | phasedRegistrationNames: {
|
20429 | bubbled: 'onCompositionStart',
|
20430 | captured: 'onCompositionStartCapture'
|
20431 | },
|
20432 | dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
|
20433 | },
|
20434 | compositionUpdate: {
|
20435 | phasedRegistrationNames: {
|
20436 | bubbled: 'onCompositionUpdate',
|
20437 | captured: 'onCompositionUpdateCapture'
|
20438 | },
|
20439 | dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
|
20440 | }
|
20441 | };
|
20442 |
|
20443 |
|
20444 | var hasSpaceKeypress = false;
|
20445 |
|
20446 | |
20447 |
|
20448 |
|
20449 |
|
20450 |
|
20451 | function isKeypressCommand(nativeEvent) {
|
20452 | return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
|
20453 |
|
20454 | !(nativeEvent.ctrlKey && nativeEvent.altKey);
|
20455 | }
|
20456 |
|
20457 | |
20458 |
|
20459 |
|
20460 |
|
20461 |
|
20462 |
|
20463 | function getCompositionEventType(topLevelType) {
|
20464 | switch (topLevelType) {
|
20465 | case 'topCompositionStart':
|
20466 | return eventTypes.compositionStart;
|
20467 | case 'topCompositionEnd':
|
20468 | return eventTypes.compositionEnd;
|
20469 | case 'topCompositionUpdate':
|
20470 | return eventTypes.compositionUpdate;
|
20471 | }
|
20472 | }
|
20473 |
|
20474 | |
20475 |
|
20476 |
|
20477 |
|
20478 |
|
20479 |
|
20480 |
|
20481 |
|
20482 | function isFallbackCompositionStart(topLevelType, nativeEvent) {
|
20483 | return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;
|
20484 | }
|
20485 |
|
20486 | |
20487 |
|
20488 |
|
20489 |
|
20490 |
|
20491 |
|
20492 |
|
20493 | function isFallbackCompositionEnd(topLevelType, nativeEvent) {
|
20494 | switch (topLevelType) {
|
20495 | case 'topKeyUp':
|
20496 |
|
20497 | return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
|
20498 | case 'topKeyDown':
|
20499 |
|
20500 |
|
20501 | return nativeEvent.keyCode !== START_KEYCODE;
|
20502 | case 'topKeyPress':
|
20503 | case 'topMouseDown':
|
20504 | case 'topBlur':
|
20505 |
|
20506 | return true;
|
20507 | default:
|
20508 | return false;
|
20509 | }
|
20510 | }
|
20511 |
|
20512 | |
20513 |
|
20514 |
|
20515 |
|
20516 |
|
20517 |
|
20518 |
|
20519 |
|
20520 |
|
20521 | function getDataFromCustomEvent(nativeEvent) {
|
20522 | var detail = nativeEvent.detail;
|
20523 | if (typeof detail === 'object' && 'data' in detail) {
|
20524 | return detail.data;
|
20525 | }
|
20526 | return null;
|
20527 | }
|
20528 |
|
20529 |
|
20530 | var currentComposition = null;
|
20531 |
|
20532 | |
20533 |
|
20534 |
|
20535 | function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
20536 | var eventType;
|
20537 | var fallbackData;
|
20538 |
|
20539 | if (canUseCompositionEvent) {
|
20540 | eventType = getCompositionEventType(topLevelType);
|
20541 | } else if (!currentComposition) {
|
20542 | if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
|
20543 | eventType = eventTypes.compositionStart;
|
20544 | }
|
20545 | } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
|
20546 | eventType = eventTypes.compositionEnd;
|
20547 | }
|
20548 |
|
20549 | if (!eventType) {
|
20550 | return null;
|
20551 | }
|
20552 |
|
20553 | if (useFallbackCompositionData) {
|
20554 |
|
20555 |
|
20556 | if (!currentComposition && eventType === eventTypes.compositionStart) {
|
20557 | currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
|
20558 | } else if (eventType === eventTypes.compositionEnd) {
|
20559 | if (currentComposition) {
|
20560 | fallbackData = currentComposition.getData();
|
20561 | }
|
20562 | }
|
20563 | }
|
20564 |
|
20565 | var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
|
20566 |
|
20567 | if (fallbackData) {
|
20568 |
|
20569 |
|
20570 | event.data = fallbackData;
|
20571 | } else {
|
20572 | var customData = getDataFromCustomEvent(nativeEvent);
|
20573 | if (customData !== null) {
|
20574 | event.data = customData;
|
20575 | }
|
20576 | }
|
20577 |
|
20578 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
20579 | return event;
|
20580 | }
|
20581 |
|
20582 | |
20583 |
|
20584 |
|
20585 |
|
20586 |
|
20587 | function getNativeBeforeInputChars(topLevelType, nativeEvent) {
|
20588 | switch (topLevelType) {
|
20589 | case 'topCompositionEnd':
|
20590 | return getDataFromCustomEvent(nativeEvent);
|
20591 | case 'topKeyPress':
|
20592 | |
20593 |
|
20594 |
|
20595 |
|
20596 |
|
20597 |
|
20598 |
|
20599 |
|
20600 |
|
20601 |
|
20602 |
|
20603 |
|
20604 |
|
20605 |
|
20606 | var which = nativeEvent.which;
|
20607 | if (which !== SPACEBAR_CODE) {
|
20608 | return null;
|
20609 | }
|
20610 |
|
20611 | hasSpaceKeypress = true;
|
20612 | return SPACEBAR_CHAR;
|
20613 |
|
20614 | case 'topTextInput':
|
20615 |
|
20616 | var chars = nativeEvent.data;
|
20617 |
|
20618 |
|
20619 |
|
20620 |
|
20621 | if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
|
20622 | return null;
|
20623 | }
|
20624 |
|
20625 | return chars;
|
20626 |
|
20627 | default:
|
20628 |
|
20629 | return null;
|
20630 | }
|
20631 | }
|
20632 |
|
20633 | |
20634 |
|
20635 |
|
20636 |
|
20637 |
|
20638 |
|
20639 |
|
20640 |
|
20641 | function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
|
20642 |
|
20643 |
|
20644 |
|
20645 |
|
20646 | if (currentComposition) {
|
20647 | if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
|
20648 | var chars = currentComposition.getData();
|
20649 | FallbackCompositionState.release(currentComposition);
|
20650 | currentComposition = null;
|
20651 | return chars;
|
20652 | }
|
20653 | return null;
|
20654 | }
|
20655 |
|
20656 | switch (topLevelType) {
|
20657 | case 'topPaste':
|
20658 |
|
20659 |
|
20660 | return null;
|
20661 | case 'topKeyPress':
|
20662 | |
20663 |
|
20664 |
|
20665 |
|
20666 |
|
20667 |
|
20668 |
|
20669 |
|
20670 |
|
20671 |
|
20672 |
|
20673 |
|
20674 |
|
20675 |
|
20676 |
|
20677 |
|
20678 | if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
|
20679 | return String.fromCharCode(nativeEvent.which);
|
20680 | }
|
20681 | return null;
|
20682 | case 'topCompositionEnd':
|
20683 | return useFallbackCompositionData ? null : nativeEvent.data;
|
20684 | default:
|
20685 | return null;
|
20686 | }
|
20687 | }
|
20688 |
|
20689 | |
20690 |
|
20691 |
|
20692 |
|
20693 |
|
20694 |
|
20695 | function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
20696 | var chars;
|
20697 |
|
20698 | if (canUseTextInputEvent) {
|
20699 | chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
|
20700 | } else {
|
20701 | chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
|
20702 | }
|
20703 |
|
20704 |
|
20705 |
|
20706 | if (!chars) {
|
20707 | return null;
|
20708 | }
|
20709 |
|
20710 | var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
|
20711 |
|
20712 | event.data = chars;
|
20713 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
20714 | return event;
|
20715 | }
|
20716 |
|
20717 | |
20718 |
|
20719 |
|
20720 |
|
20721 |
|
20722 |
|
20723 |
|
20724 |
|
20725 |
|
20726 |
|
20727 |
|
20728 |
|
20729 |
|
20730 |
|
20731 |
|
20732 |
|
20733 |
|
20734 |
|
20735 | var BeforeInputEventPlugin = {
|
20736 |
|
20737 | eventTypes: eventTypes,
|
20738 |
|
20739 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
20740 | return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
|
20741 | }
|
20742 | };
|
20743 |
|
20744 | module.exports = BeforeInputEventPlugin;
|
20745 |
|
20746 | },
|
20747 |
|
20748 | function(module, exports, __webpack_require__) {
|
20749 |
|
20750 | |
20751 |
|
20752 |
|
20753 |
|
20754 |
|
20755 |
|
20756 |
|
20757 |
|
20758 |
|
20759 |
|
20760 | 'use strict';
|
20761 |
|
20762 | var CSSProperty = __webpack_require__(70);
|
20763 | var ExecutionEnvironment = __webpack_require__(9);
|
20764 | var ReactInstrumentation = __webpack_require__(12);
|
20765 |
|
20766 | var camelizeStyleName = __webpack_require__(168);
|
20767 | var dangerousStyleValue = __webpack_require__(246);
|
20768 | var hyphenateStyleName = __webpack_require__(175);
|
20769 | var memoizeStringOnly = __webpack_require__(178);
|
20770 | var warning = __webpack_require__(5);
|
20771 |
|
20772 | var processStyleName = memoizeStringOnly(function (styleName) {
|
20773 | return hyphenateStyleName(styleName);
|
20774 | });
|
20775 |
|
20776 | var hasShorthandPropertyBug = false;
|
20777 | var styleFloatAccessor = 'cssFloat';
|
20778 | if (ExecutionEnvironment.canUseDOM) {
|
20779 | var tempStyle = document.createElement('div').style;
|
20780 | try {
|
20781 |
|
20782 | tempStyle.font = '';
|
20783 | } catch (e) {
|
20784 | hasShorthandPropertyBug = true;
|
20785 | }
|
20786 |
|
20787 | if (document.documentElement.style.cssFloat === undefined) {
|
20788 | styleFloatAccessor = 'styleFloat';
|
20789 | }
|
20790 | }
|
20791 |
|
20792 | if (true) {
|
20793 |
|
20794 | var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
|
20795 |
|
20796 |
|
20797 | var badStyleValueWithSemicolonPattern = /;\s*$/;
|
20798 |
|
20799 | var warnedStyleNames = {};
|
20800 | var warnedStyleValues = {};
|
20801 | var warnedForNaNValue = false;
|
20802 |
|
20803 | var warnHyphenatedStyleName = function (name, owner) {
|
20804 | if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
|
20805 | return;
|
20806 | }
|
20807 |
|
20808 | warnedStyleNames[name] = true;
|
20809 | true ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
|
20810 | };
|
20811 |
|
20812 | var warnBadVendoredStyleName = function (name, owner) {
|
20813 | if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
|
20814 | return;
|
20815 | }
|
20816 |
|
20817 | warnedStyleNames[name] = true;
|
20818 | true ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;
|
20819 | };
|
20820 |
|
20821 | var warnStyleValueWithSemicolon = function (name, value, owner) {
|
20822 | if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
|
20823 | return;
|
20824 | }
|
20825 |
|
20826 | warnedStyleValues[value] = true;
|
20827 | true ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
|
20828 | };
|
20829 |
|
20830 | var warnStyleValueIsNaN = function (name, value, owner) {
|
20831 | if (warnedForNaNValue) {
|
20832 | return;
|
20833 | }
|
20834 |
|
20835 | warnedForNaNValue = true;
|
20836 | true ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
|
20837 | };
|
20838 |
|
20839 | var checkRenderMessage = function (owner) {
|
20840 | if (owner) {
|
20841 | var name = owner.getName();
|
20842 | if (name) {
|
20843 | return ' Check the render method of `' + name + '`.';
|
20844 | }
|
20845 | }
|
20846 | return '';
|
20847 | };
|
20848 |
|
20849 | |
20850 |
|
20851 |
|
20852 |
|
20853 |
|
20854 | var warnValidStyle = function (name, value, component) {
|
20855 | var owner;
|
20856 | if (component) {
|
20857 | owner = component._currentElement._owner;
|
20858 | }
|
20859 | if (name.indexOf('-') > -1) {
|
20860 | warnHyphenatedStyleName(name, owner);
|
20861 | } else if (badVendoredStyleNamePattern.test(name)) {
|
20862 | warnBadVendoredStyleName(name, owner);
|
20863 | } else if (badStyleValueWithSemicolonPattern.test(value)) {
|
20864 | warnStyleValueWithSemicolon(name, value, owner);
|
20865 | }
|
20866 |
|
20867 | if (typeof value === 'number' && isNaN(value)) {
|
20868 | warnStyleValueIsNaN(name, value, owner);
|
20869 | }
|
20870 | };
|
20871 | }
|
20872 |
|
20873 | |
20874 |
|
20875 |
|
20876 | var CSSPropertyOperations = {
|
20877 |
|
20878 | |
20879 |
|
20880 |
|
20881 |
|
20882 |
|
20883 |
|
20884 |
|
20885 |
|
20886 |
|
20887 |
|
20888 |
|
20889 |
|
20890 |
|
20891 | createMarkupForStyles: function (styles, component) {
|
20892 | var serialized = '';
|
20893 | for (var styleName in styles) {
|
20894 | if (!styles.hasOwnProperty(styleName)) {
|
20895 | continue;
|
20896 | }
|
20897 | var styleValue = styles[styleName];
|
20898 | if (true) {
|
20899 | warnValidStyle(styleName, styleValue, component);
|
20900 | }
|
20901 | if (styleValue != null) {
|
20902 | serialized += processStyleName(styleName) + ':';
|
20903 | serialized += dangerousStyleValue(styleName, styleValue, component) + ';';
|
20904 | }
|
20905 | }
|
20906 | return serialized || null;
|
20907 | },
|
20908 |
|
20909 | |
20910 |
|
20911 |
|
20912 |
|
20913 |
|
20914 |
|
20915 |
|
20916 |
|
20917 | setValueForStyles: function (node, styles, component) {
|
20918 | if (true) {
|
20919 | ReactInstrumentation.debugTool.onHostOperation({
|
20920 | instanceID: component._debugID,
|
20921 | type: 'update styles',
|
20922 | payload: styles
|
20923 | });
|
20924 | }
|
20925 |
|
20926 | var style = node.style;
|
20927 | for (var styleName in styles) {
|
20928 | if (!styles.hasOwnProperty(styleName)) {
|
20929 | continue;
|
20930 | }
|
20931 | if (true) {
|
20932 | warnValidStyle(styleName, styles[styleName], component);
|
20933 | }
|
20934 | var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
|
20935 | if (styleName === 'float' || styleName === 'cssFloat') {
|
20936 | styleName = styleFloatAccessor;
|
20937 | }
|
20938 | if (styleValue) {
|
20939 | style[styleName] = styleValue;
|
20940 | } else {
|
20941 | var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
|
20942 | if (expansion) {
|
20943 |
|
20944 |
|
20945 | for (var individualStyleName in expansion) {
|
20946 | style[individualStyleName] = '';
|
20947 | }
|
20948 | } else {
|
20949 | style[styleName] = '';
|
20950 | }
|
20951 | }
|
20952 | }
|
20953 | }
|
20954 |
|
20955 | };
|
20956 |
|
20957 | module.exports = CSSPropertyOperations;
|
20958 |
|
20959 | },
|
20960 |
|
20961 | function(module, exports, __webpack_require__) {
|
20962 |
|
20963 | |
20964 |
|
20965 |
|
20966 |
|
20967 |
|
20968 |
|
20969 |
|
20970 |
|
20971 |
|
20972 |
|
20973 | 'use strict';
|
20974 |
|
20975 | var EventPluginHub = __webpack_require__(26);
|
20976 | var EventPropagators = __webpack_require__(27);
|
20977 | var ExecutionEnvironment = __webpack_require__(9);
|
20978 | var ReactDOMComponentTree = __webpack_require__(8);
|
20979 | var ReactUpdates = __webpack_require__(13);
|
20980 | var SyntheticEvent = __webpack_require__(14);
|
20981 |
|
20982 | var getEventTarget = __webpack_require__(51);
|
20983 | var isEventSupported = __webpack_require__(52);
|
20984 | var isTextInputElement = __webpack_require__(95);
|
20985 |
|
20986 | var eventTypes = {
|
20987 | change: {
|
20988 | phasedRegistrationNames: {
|
20989 | bubbled: 'onChange',
|
20990 | captured: 'onChangeCapture'
|
20991 | },
|
20992 | dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']
|
20993 | }
|
20994 | };
|
20995 |
|
20996 | |
20997 |
|
20998 |
|
20999 | var activeElement = null;
|
21000 | var activeElementInst = null;
|
21001 | var activeElementValue = null;
|
21002 | var activeElementValueProp = null;
|
21003 |
|
21004 | |
21005 |
|
21006 |
|
21007 | function shouldUseChangeEvent(elem) {
|
21008 | var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
|
21009 | return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
|
21010 | }
|
21011 |
|
21012 | var doesChangeEventBubble = false;
|
21013 | if (ExecutionEnvironment.canUseDOM) {
|
21014 |
|
21015 | doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
|
21016 | }
|
21017 |
|
21018 | function manualDispatchChangeEvent(nativeEvent) {
|
21019 | var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent));
|
21020 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
21021 |
|
21022 |
|
21023 |
|
21024 |
|
21025 |
|
21026 |
|
21027 |
|
21028 |
|
21029 |
|
21030 |
|
21031 |
|
21032 |
|
21033 | ReactUpdates.batchedUpdates(runEventInBatch, event);
|
21034 | }
|
21035 |
|
21036 | function runEventInBatch(event) {
|
21037 | EventPluginHub.enqueueEvents(event);
|
21038 | EventPluginHub.processEventQueue(false);
|
21039 | }
|
21040 |
|
21041 | function startWatchingForChangeEventIE8(target, targetInst) {
|
21042 | activeElement = target;
|
21043 | activeElementInst = targetInst;
|
21044 | activeElement.attachEvent('onchange', manualDispatchChangeEvent);
|
21045 | }
|
21046 |
|
21047 | function stopWatchingForChangeEventIE8() {
|
21048 | if (!activeElement) {
|
21049 | return;
|
21050 | }
|
21051 | activeElement.detachEvent('onchange', manualDispatchChangeEvent);
|
21052 | activeElement = null;
|
21053 | activeElementInst = null;
|
21054 | }
|
21055 |
|
21056 | function getTargetInstForChangeEvent(topLevelType, targetInst) {
|
21057 | if (topLevelType === 'topChange') {
|
21058 | return targetInst;
|
21059 | }
|
21060 | }
|
21061 | function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
|
21062 | if (topLevelType === 'topFocus') {
|
21063 |
|
21064 |
|
21065 | stopWatchingForChangeEventIE8();
|
21066 | startWatchingForChangeEventIE8(target, targetInst);
|
21067 | } else if (topLevelType === 'topBlur') {
|
21068 | stopWatchingForChangeEventIE8();
|
21069 | }
|
21070 | }
|
21071 |
|
21072 | |
21073 |
|
21074 |
|
21075 | var isInputEventSupported = false;
|
21076 | if (ExecutionEnvironment.canUseDOM) {
|
21077 |
|
21078 |
|
21079 |
|
21080 |
|
21081 | isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11);
|
21082 | }
|
21083 |
|
21084 | |
21085 |
|
21086 |
|
21087 |
|
21088 | var newValueProp = {
|
21089 | get: function () {
|
21090 | return activeElementValueProp.get.call(this);
|
21091 | },
|
21092 | set: function (val) {
|
21093 |
|
21094 | activeElementValue = '' + val;
|
21095 | activeElementValueProp.set.call(this, val);
|
21096 | }
|
21097 | };
|
21098 |
|
21099 | |
21100 |
|
21101 |
|
21102 |
|
21103 |
|
21104 | function startWatchingForValueChange(target, targetInst) {
|
21105 | activeElement = target;
|
21106 | activeElementInst = targetInst;
|
21107 | activeElementValue = target.value;
|
21108 | activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');
|
21109 |
|
21110 |
|
21111 |
|
21112 | Object.defineProperty(activeElement, 'value', newValueProp);
|
21113 | if (activeElement.attachEvent) {
|
21114 | activeElement.attachEvent('onpropertychange', handlePropertyChange);
|
21115 | } else {
|
21116 | activeElement.addEventListener('propertychange', handlePropertyChange, false);
|
21117 | }
|
21118 | }
|
21119 |
|
21120 | |
21121 |
|
21122 |
|
21123 |
|
21124 | function stopWatchingForValueChange() {
|
21125 | if (!activeElement) {
|
21126 | return;
|
21127 | }
|
21128 |
|
21129 |
|
21130 | delete activeElement.value;
|
21131 |
|
21132 | if (activeElement.detachEvent) {
|
21133 | activeElement.detachEvent('onpropertychange', handlePropertyChange);
|
21134 | } else {
|
21135 | activeElement.removeEventListener('propertychange', handlePropertyChange, false);
|
21136 | }
|
21137 |
|
21138 | activeElement = null;
|
21139 | activeElementInst = null;
|
21140 | activeElementValue = null;
|
21141 | activeElementValueProp = null;
|
21142 | }
|
21143 |
|
21144 | |
21145 |
|
21146 |
|
21147 |
|
21148 | function handlePropertyChange(nativeEvent) {
|
21149 | if (nativeEvent.propertyName !== 'value') {
|
21150 | return;
|
21151 | }
|
21152 | var value = nativeEvent.srcElement.value;
|
21153 | if (value === activeElementValue) {
|
21154 | return;
|
21155 | }
|
21156 | activeElementValue = value;
|
21157 |
|
21158 | manualDispatchChangeEvent(nativeEvent);
|
21159 | }
|
21160 |
|
21161 | |
21162 |
|
21163 |
|
21164 | function getTargetInstForInputEvent(topLevelType, targetInst) {
|
21165 | if (topLevelType === 'topInput') {
|
21166 |
|
21167 |
|
21168 | return targetInst;
|
21169 | }
|
21170 | }
|
21171 |
|
21172 | function handleEventsForInputEventIE(topLevelType, target, targetInst) {
|
21173 | if (topLevelType === 'topFocus') {
|
21174 |
|
21175 |
|
21176 |
|
21177 |
|
21178 |
|
21179 |
|
21180 |
|
21181 |
|
21182 |
|
21183 |
|
21184 |
|
21185 |
|
21186 |
|
21187 | stopWatchingForValueChange();
|
21188 | startWatchingForValueChange(target, targetInst);
|
21189 | } else if (topLevelType === 'topBlur') {
|
21190 | stopWatchingForValueChange();
|
21191 | }
|
21192 | }
|
21193 |
|
21194 |
|
21195 | function getTargetInstForInputEventIE(topLevelType, targetInst) {
|
21196 | if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
|
21197 |
|
21198 |
|
21199 |
|
21200 |
|
21201 |
|
21202 |
|
21203 |
|
21204 |
|
21205 |
|
21206 |
|
21207 | if (activeElement && activeElement.value !== activeElementValue) {
|
21208 | activeElementValue = activeElement.value;
|
21209 | return activeElementInst;
|
21210 | }
|
21211 | }
|
21212 | }
|
21213 |
|
21214 | |
21215 |
|
21216 |
|
21217 | function shouldUseClickEvent(elem) {
|
21218 |
|
21219 |
|
21220 |
|
21221 | return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
|
21222 | }
|
21223 |
|
21224 | function getTargetInstForClickEvent(topLevelType, targetInst) {
|
21225 | if (topLevelType === 'topClick') {
|
21226 | return targetInst;
|
21227 | }
|
21228 | }
|
21229 |
|
21230 | |
21231 |
|
21232 |
|
21233 |
|
21234 |
|
21235 |
|
21236 |
|
21237 |
|
21238 |
|
21239 |
|
21240 | var ChangeEventPlugin = {
|
21241 |
|
21242 | eventTypes: eventTypes,
|
21243 |
|
21244 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
21245 | var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
|
21246 |
|
21247 | var getTargetInstFunc, handleEventFunc;
|
21248 | if (shouldUseChangeEvent(targetNode)) {
|
21249 | if (doesChangeEventBubble) {
|
21250 | getTargetInstFunc = getTargetInstForChangeEvent;
|
21251 | } else {
|
21252 | handleEventFunc = handleEventsForChangeEventIE8;
|
21253 | }
|
21254 | } else if (isTextInputElement(targetNode)) {
|
21255 | if (isInputEventSupported) {
|
21256 | getTargetInstFunc = getTargetInstForInputEvent;
|
21257 | } else {
|
21258 | getTargetInstFunc = getTargetInstForInputEventIE;
|
21259 | handleEventFunc = handleEventsForInputEventIE;
|
21260 | }
|
21261 | } else if (shouldUseClickEvent(targetNode)) {
|
21262 | getTargetInstFunc = getTargetInstForClickEvent;
|
21263 | }
|
21264 |
|
21265 | if (getTargetInstFunc) {
|
21266 | var inst = getTargetInstFunc(topLevelType, targetInst);
|
21267 | if (inst) {
|
21268 | var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget);
|
21269 | event.type = 'change';
|
21270 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
21271 | return event;
|
21272 | }
|
21273 | }
|
21274 |
|
21275 | if (handleEventFunc) {
|
21276 | handleEventFunc(topLevelType, targetNode, targetInst);
|
21277 | }
|
21278 | }
|
21279 |
|
21280 | };
|
21281 |
|
21282 | module.exports = ChangeEventPlugin;
|
21283 |
|
21284 | },
|
21285 |
|
21286 | function(module, exports, __webpack_require__) {
|
21287 |
|
21288 | |
21289 |
|
21290 |
|
21291 |
|
21292 |
|
21293 |
|
21294 |
|
21295 |
|
21296 |
|
21297 |
|
21298 | 'use strict';
|
21299 |
|
21300 | var _prodInvariant = __webpack_require__(6);
|
21301 |
|
21302 | var DOMLazyTree = __webpack_require__(25);
|
21303 | var ExecutionEnvironment = __webpack_require__(9);
|
21304 |
|
21305 | var createNodesFromMarkup = __webpack_require__(171);
|
21306 | var emptyFunction = __webpack_require__(11);
|
21307 | var invariant = __webpack_require__(4);
|
21308 |
|
21309 | var Danger = {
|
21310 |
|
21311 | |
21312 |
|
21313 |
|
21314 |
|
21315 |
|
21316 |
|
21317 |
|
21318 |
|
21319 | dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
|
21320 | !ExecutionEnvironment.canUseDOM ? true ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0;
|
21321 | !markup ? true ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;
|
21322 | !(oldChild.nodeName !== 'HTML') ? true ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0;
|
21323 |
|
21324 | if (typeof markup === 'string') {
|
21325 | var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
|
21326 | oldChild.parentNode.replaceChild(newChild, oldChild);
|
21327 | } else {
|
21328 | DOMLazyTree.replaceChildWithTree(oldChild, markup);
|
21329 | }
|
21330 | }
|
21331 |
|
21332 | };
|
21333 |
|
21334 | module.exports = Danger;
|
21335 |
|
21336 | },
|
21337 |
|
21338 | function(module, exports) {
|
21339 |
|
21340 | |
21341 |
|
21342 |
|
21343 |
|
21344 |
|
21345 |
|
21346 |
|
21347 |
|
21348 |
|
21349 |
|
21350 | 'use strict';
|
21351 |
|
21352 | |
21353 |
|
21354 |
|
21355 |
|
21356 |
|
21357 |
|
21358 |
|
21359 |
|
21360 |
|
21361 |
|
21362 | var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
|
21363 |
|
21364 | module.exports = DefaultEventPluginOrder;
|
21365 |
|
21366 | },
|
21367 |
|
21368 | function(module, exports, __webpack_require__) {
|
21369 |
|
21370 | |
21371 |
|
21372 |
|
21373 |
|
21374 |
|
21375 |
|
21376 |
|
21377 |
|
21378 |
|
21379 |
|
21380 | 'use strict';
|
21381 |
|
21382 | var EventPropagators = __webpack_require__(27);
|
21383 | var ReactDOMComponentTree = __webpack_require__(8);
|
21384 | var SyntheticMouseEvent = __webpack_require__(34);
|
21385 |
|
21386 | var eventTypes = {
|
21387 | mouseEnter: {
|
21388 | registrationName: 'onMouseEnter',
|
21389 | dependencies: ['topMouseOut', 'topMouseOver']
|
21390 | },
|
21391 | mouseLeave: {
|
21392 | registrationName: 'onMouseLeave',
|
21393 | dependencies: ['topMouseOut', 'topMouseOver']
|
21394 | }
|
21395 | };
|
21396 |
|
21397 | var EnterLeaveEventPlugin = {
|
21398 |
|
21399 | eventTypes: eventTypes,
|
21400 |
|
21401 | |
21402 |
|
21403 |
|
21404 |
|
21405 |
|
21406 |
|
21407 |
|
21408 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
21409 | if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
|
21410 | return null;
|
21411 | }
|
21412 | if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {
|
21413 |
|
21414 | return null;
|
21415 | }
|
21416 |
|
21417 | var win;
|
21418 | if (nativeEventTarget.window === nativeEventTarget) {
|
21419 |
|
21420 | win = nativeEventTarget;
|
21421 | } else {
|
21422 |
|
21423 | var doc = nativeEventTarget.ownerDocument;
|
21424 | if (doc) {
|
21425 | win = doc.defaultView || doc.parentWindow;
|
21426 | } else {
|
21427 | win = window;
|
21428 | }
|
21429 | }
|
21430 |
|
21431 | var from;
|
21432 | var to;
|
21433 | if (topLevelType === 'topMouseOut') {
|
21434 | from = targetInst;
|
21435 | var related = nativeEvent.relatedTarget || nativeEvent.toElement;
|
21436 | to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
|
21437 | } else {
|
21438 |
|
21439 | from = null;
|
21440 | to = targetInst;
|
21441 | }
|
21442 |
|
21443 | if (from === to) {
|
21444 |
|
21445 | return null;
|
21446 | }
|
21447 |
|
21448 | var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);
|
21449 | var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);
|
21450 |
|
21451 | var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
|
21452 | leave.type = 'mouseleave';
|
21453 | leave.target = fromNode;
|
21454 | leave.relatedTarget = toNode;
|
21455 |
|
21456 | var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
|
21457 | enter.type = 'mouseenter';
|
21458 | enter.target = toNode;
|
21459 | enter.relatedTarget = fromNode;
|
21460 |
|
21461 | EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);
|
21462 |
|
21463 | return [leave, enter];
|
21464 | }
|
21465 |
|
21466 | };
|
21467 |
|
21468 | module.exports = EnterLeaveEventPlugin;
|
21469 |
|
21470 | },
|
21471 |
|
21472 | function(module, exports) {
|
21473 |
|
21474 | |
21475 |
|
21476 |
|
21477 |
|
21478 |
|
21479 |
|
21480 |
|
21481 |
|
21482 |
|
21483 |
|
21484 | 'use strict';
|
21485 |
|
21486 | |
21487 |
|
21488 |
|
21489 | var topLevelTypes = {
|
21490 | topAbort: null,
|
21491 | topAnimationEnd: null,
|
21492 | topAnimationIteration: null,
|
21493 | topAnimationStart: null,
|
21494 | topBlur: null,
|
21495 | topCanPlay: null,
|
21496 | topCanPlayThrough: null,
|
21497 | topChange: null,
|
21498 | topClick: null,
|
21499 | topCompositionEnd: null,
|
21500 | topCompositionStart: null,
|
21501 | topCompositionUpdate: null,
|
21502 | topContextMenu: null,
|
21503 | topCopy: null,
|
21504 | topCut: null,
|
21505 | topDoubleClick: null,
|
21506 | topDrag: null,
|
21507 | topDragEnd: null,
|
21508 | topDragEnter: null,
|
21509 | topDragExit: null,
|
21510 | topDragLeave: null,
|
21511 | topDragOver: null,
|
21512 | topDragStart: null,
|
21513 | topDrop: null,
|
21514 | topDurationChange: null,
|
21515 | topEmptied: null,
|
21516 | topEncrypted: null,
|
21517 | topEnded: null,
|
21518 | topError: null,
|
21519 | topFocus: null,
|
21520 | topInput: null,
|
21521 | topInvalid: null,
|
21522 | topKeyDown: null,
|
21523 | topKeyPress: null,
|
21524 | topKeyUp: null,
|
21525 | topLoad: null,
|
21526 | topLoadedData: null,
|
21527 | topLoadedMetadata: null,
|
21528 | topLoadStart: null,
|
21529 | topMouseDown: null,
|
21530 | topMouseMove: null,
|
21531 | topMouseOut: null,
|
21532 | topMouseOver: null,
|
21533 | topMouseUp: null,
|
21534 | topPaste: null,
|
21535 | topPause: null,
|
21536 | topPlay: null,
|
21537 | topPlaying: null,
|
21538 | topProgress: null,
|
21539 | topRateChange: null,
|
21540 | topReset: null,
|
21541 | topScroll: null,
|
21542 | topSeeked: null,
|
21543 | topSeeking: null,
|
21544 | topSelectionChange: null,
|
21545 | topStalled: null,
|
21546 | topSubmit: null,
|
21547 | topSuspend: null,
|
21548 | topTextInput: null,
|
21549 | topTimeUpdate: null,
|
21550 | topTouchCancel: null,
|
21551 | topTouchEnd: null,
|
21552 | topTouchMove: null,
|
21553 | topTouchStart: null,
|
21554 | topTransitionEnd: null,
|
21555 | topVolumeChange: null,
|
21556 | topWaiting: null,
|
21557 | topWheel: null
|
21558 | };
|
21559 |
|
21560 | var EventConstants = {
|
21561 | topLevelTypes: topLevelTypes
|
21562 | };
|
21563 |
|
21564 | module.exports = EventConstants;
|
21565 |
|
21566 | },
|
21567 |
|
21568 | function(module, exports, __webpack_require__) {
|
21569 |
|
21570 | |
21571 |
|
21572 |
|
21573 |
|
21574 |
|
21575 |
|
21576 |
|
21577 |
|
21578 |
|
21579 |
|
21580 | 'use strict';
|
21581 |
|
21582 | var _assign = __webpack_require__(7);
|
21583 |
|
21584 | var PooledClass = __webpack_require__(19);
|
21585 |
|
21586 | var getTextContentAccessor = __webpack_require__(92);
|
21587 |
|
21588 | |
21589 |
|
21590 |
|
21591 |
|
21592 |
|
21593 |
|
21594 |
|
21595 |
|
21596 |
|
21597 |
|
21598 |
|
21599 | function FallbackCompositionState(root) {
|
21600 | this._root = root;
|
21601 | this._startText = this.getText();
|
21602 | this._fallbackText = null;
|
21603 | }
|
21604 |
|
21605 | _assign(FallbackCompositionState.prototype, {
|
21606 | destructor: function () {
|
21607 | this._root = null;
|
21608 | this._startText = null;
|
21609 | this._fallbackText = null;
|
21610 | },
|
21611 |
|
21612 | |
21613 |
|
21614 |
|
21615 |
|
21616 |
|
21617 | getText: function () {
|
21618 | if ('value' in this._root) {
|
21619 | return this._root.value;
|
21620 | }
|
21621 | return this._root[getTextContentAccessor()];
|
21622 | },
|
21623 |
|
21624 | |
21625 |
|
21626 |
|
21627 |
|
21628 |
|
21629 |
|
21630 | getData: function () {
|
21631 | if (this._fallbackText) {
|
21632 | return this._fallbackText;
|
21633 | }
|
21634 |
|
21635 | var start;
|
21636 | var startValue = this._startText;
|
21637 | var startLength = startValue.length;
|
21638 | var end;
|
21639 | var endValue = this.getText();
|
21640 | var endLength = endValue.length;
|
21641 |
|
21642 | for (start = 0; start < startLength; start++) {
|
21643 | if (startValue[start] !== endValue[start]) {
|
21644 | break;
|
21645 | }
|
21646 | }
|
21647 |
|
21648 | var minEnd = startLength - start;
|
21649 | for (end = 1; end <= minEnd; end++) {
|
21650 | if (startValue[startLength - end] !== endValue[endLength - end]) {
|
21651 | break;
|
21652 | }
|
21653 | }
|
21654 |
|
21655 | var sliceTail = end > 1 ? 1 - end : undefined;
|
21656 | this._fallbackText = endValue.slice(start, sliceTail);
|
21657 | return this._fallbackText;
|
21658 | }
|
21659 | });
|
21660 |
|
21661 | PooledClass.addPoolingTo(FallbackCompositionState);
|
21662 |
|
21663 | module.exports = FallbackCompositionState;
|
21664 |
|
21665 | },
|
21666 |
|
21667 | function(module, exports, __webpack_require__) {
|
21668 |
|
21669 | |
21670 |
|
21671 |
|
21672 |
|
21673 |
|
21674 |
|
21675 |
|
21676 |
|
21677 |
|
21678 |
|
21679 | 'use strict';
|
21680 |
|
21681 | var DOMProperty = __webpack_require__(17);
|
21682 |
|
21683 | var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
|
21684 | var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
|
21685 | var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
|
21686 | var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
|
21687 | var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
|
21688 |
|
21689 | var HTMLDOMPropertyConfig = {
|
21690 | isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
|
21691 | Properties: {
|
21692 | |
21693 |
|
21694 |
|
21695 | accept: 0,
|
21696 | acceptCharset: 0,
|
21697 | accessKey: 0,
|
21698 | action: 0,
|
21699 | allowFullScreen: HAS_BOOLEAN_VALUE,
|
21700 | allowTransparency: 0,
|
21701 | alt: 0,
|
21702 |
|
21703 | as: 0,
|
21704 | async: HAS_BOOLEAN_VALUE,
|
21705 | autoComplete: 0,
|
21706 |
|
21707 |
|
21708 | autoPlay: HAS_BOOLEAN_VALUE,
|
21709 | capture: HAS_BOOLEAN_VALUE,
|
21710 | cellPadding: 0,
|
21711 | cellSpacing: 0,
|
21712 | charSet: 0,
|
21713 | challenge: 0,
|
21714 | checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
21715 | cite: 0,
|
21716 | classID: 0,
|
21717 | className: 0,
|
21718 | cols: HAS_POSITIVE_NUMERIC_VALUE,
|
21719 | colSpan: 0,
|
21720 | content: 0,
|
21721 | contentEditable: 0,
|
21722 | contextMenu: 0,
|
21723 | controls: HAS_BOOLEAN_VALUE,
|
21724 | coords: 0,
|
21725 | crossOrigin: 0,
|
21726 | data: 0,
|
21727 | dateTime: 0,
|
21728 | 'default': HAS_BOOLEAN_VALUE,
|
21729 | defer: HAS_BOOLEAN_VALUE,
|
21730 | dir: 0,
|
21731 | disabled: HAS_BOOLEAN_VALUE,
|
21732 | download: HAS_OVERLOADED_BOOLEAN_VALUE,
|
21733 | draggable: 0,
|
21734 | encType: 0,
|
21735 | form: 0,
|
21736 | formAction: 0,
|
21737 | formEncType: 0,
|
21738 | formMethod: 0,
|
21739 | formNoValidate: HAS_BOOLEAN_VALUE,
|
21740 | formTarget: 0,
|
21741 | frameBorder: 0,
|
21742 | headers: 0,
|
21743 | height: 0,
|
21744 | hidden: HAS_BOOLEAN_VALUE,
|
21745 | high: 0,
|
21746 | href: 0,
|
21747 | hrefLang: 0,
|
21748 | htmlFor: 0,
|
21749 | httpEquiv: 0,
|
21750 | icon: 0,
|
21751 | id: 0,
|
21752 | inputMode: 0,
|
21753 | integrity: 0,
|
21754 | is: 0,
|
21755 | keyParams: 0,
|
21756 | keyType: 0,
|
21757 | kind: 0,
|
21758 | label: 0,
|
21759 | lang: 0,
|
21760 | list: 0,
|
21761 | loop: HAS_BOOLEAN_VALUE,
|
21762 | low: 0,
|
21763 | manifest: 0,
|
21764 | marginHeight: 0,
|
21765 | marginWidth: 0,
|
21766 | max: 0,
|
21767 | maxLength: 0,
|
21768 | media: 0,
|
21769 | mediaGroup: 0,
|
21770 | method: 0,
|
21771 | min: 0,
|
21772 | minLength: 0,
|
21773 |
|
21774 |
|
21775 | multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
21776 | muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
21777 | name: 0,
|
21778 | nonce: 0,
|
21779 | noValidate: HAS_BOOLEAN_VALUE,
|
21780 | open: HAS_BOOLEAN_VALUE,
|
21781 | optimum: 0,
|
21782 | pattern: 0,
|
21783 | placeholder: 0,
|
21784 | playsInline: HAS_BOOLEAN_VALUE,
|
21785 | poster: 0,
|
21786 | preload: 0,
|
21787 | profile: 0,
|
21788 | radioGroup: 0,
|
21789 | readOnly: HAS_BOOLEAN_VALUE,
|
21790 | referrerPolicy: 0,
|
21791 | rel: 0,
|
21792 | required: HAS_BOOLEAN_VALUE,
|
21793 | reversed: HAS_BOOLEAN_VALUE,
|
21794 | role: 0,
|
21795 | rows: HAS_POSITIVE_NUMERIC_VALUE,
|
21796 | rowSpan: HAS_NUMERIC_VALUE,
|
21797 | sandbox: 0,
|
21798 | scope: 0,
|
21799 | scoped: HAS_BOOLEAN_VALUE,
|
21800 | scrolling: 0,
|
21801 | seamless: HAS_BOOLEAN_VALUE,
|
21802 | selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
21803 | shape: 0,
|
21804 | size: HAS_POSITIVE_NUMERIC_VALUE,
|
21805 | sizes: 0,
|
21806 | span: HAS_POSITIVE_NUMERIC_VALUE,
|
21807 | spellCheck: 0,
|
21808 | src: 0,
|
21809 | srcDoc: 0,
|
21810 | srcLang: 0,
|
21811 | srcSet: 0,
|
21812 | start: HAS_NUMERIC_VALUE,
|
21813 | step: 0,
|
21814 | style: 0,
|
21815 | summary: 0,
|
21816 | tabIndex: 0,
|
21817 | target: 0,
|
21818 | title: 0,
|
21819 |
|
21820 | type: 0,
|
21821 | useMap: 0,
|
21822 | value: 0,
|
21823 | width: 0,
|
21824 | wmode: 0,
|
21825 | wrap: 0,
|
21826 |
|
21827 | |
21828 |
|
21829 |
|
21830 | about: 0,
|
21831 | datatype: 0,
|
21832 | inlist: 0,
|
21833 | prefix: 0,
|
21834 |
|
21835 | property: 0,
|
21836 | resource: 0,
|
21837 | 'typeof': 0,
|
21838 | vocab: 0,
|
21839 |
|
21840 | |
21841 |
|
21842 |
|
21843 |
|
21844 |
|
21845 | autoCapitalize: 0,
|
21846 | autoCorrect: 0,
|
21847 |
|
21848 | autoSave: 0,
|
21849 |
|
21850 | color: 0,
|
21851 |
|
21852 |
|
21853 | itemProp: 0,
|
21854 | itemScope: HAS_BOOLEAN_VALUE,
|
21855 | itemType: 0,
|
21856 |
|
21857 |
|
21858 |
|
21859 | itemID: 0,
|
21860 | itemRef: 0,
|
21861 |
|
21862 |
|
21863 | results: 0,
|
21864 |
|
21865 |
|
21866 | security: 0,
|
21867 |
|
21868 | unselectable: 0
|
21869 | },
|
21870 | DOMAttributeNames: {
|
21871 | acceptCharset: 'accept-charset',
|
21872 | className: 'class',
|
21873 | htmlFor: 'for',
|
21874 | httpEquiv: 'http-equiv'
|
21875 | },
|
21876 | DOMPropertyNames: {}
|
21877 | };
|
21878 |
|
21879 | module.exports = HTMLDOMPropertyConfig;
|
21880 |
|
21881 | },
|
21882 |
|
21883 | function(module, exports, __webpack_require__) {
|
21884 |
|
21885 | (function(process) { |
21886 |
|
21887 |
|
21888 |
|
21889 |
|
21890 |
|
21891 |
|
21892 |
|
21893 |
|
21894 |
|
21895 | 'use strict';
|
21896 |
|
21897 | var ReactReconciler = __webpack_require__(21);
|
21898 |
|
21899 | var instantiateReactComponent = __webpack_require__(94);
|
21900 | var KeyEscapeUtils = __webpack_require__(43);
|
21901 | var shouldUpdateReactComponent = __webpack_require__(53);
|
21902 | var traverseAllChildren = __webpack_require__(97);
|
21903 | var warning = __webpack_require__(5);
|
21904 |
|
21905 | var ReactComponentTreeHook;
|
21906 |
|
21907 | if (typeof process !== 'undefined' && process.env && ("development") === 'test') {
|
21908 |
|
21909 |
|
21910 |
|
21911 |
|
21912 |
|
21913 | ReactComponentTreeHook = __webpack_require__(10);
|
21914 | }
|
21915 |
|
21916 | function instantiateChild(childInstances, child, name, selfDebugID) {
|
21917 |
|
21918 | var keyUnique = childInstances[name] === undefined;
|
21919 | if (true) {
|
21920 | if (!ReactComponentTreeHook) {
|
21921 | ReactComponentTreeHook = __webpack_require__(10);
|
21922 | }
|
21923 | if (!keyUnique) {
|
21924 | true ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
|
21925 | }
|
21926 | }
|
21927 | if (child != null && keyUnique) {
|
21928 | childInstances[name] = instantiateReactComponent(child, true);
|
21929 | }
|
21930 | }
|
21931 |
|
21932 | |
21933 |
|
21934 |
|
21935 |
|
21936 |
|
21937 | var ReactChildReconciler = {
|
21938 | |
21939 |
|
21940 |
|
21941 |
|
21942 |
|
21943 |
|
21944 |
|
21945 |
|
21946 | instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots
|
21947 | ) {
|
21948 | if (nestedChildNodes == null) {
|
21949 | return null;
|
21950 | }
|
21951 | var childInstances = {};
|
21952 |
|
21953 | if (true) {
|
21954 | traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {
|
21955 | return instantiateChild(childInsts, child, name, selfDebugID);
|
21956 | }, childInstances);
|
21957 | } else {
|
21958 | traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
|
21959 | }
|
21960 | return childInstances;
|
21961 | },
|
21962 |
|
21963 | |
21964 |
|
21965 |
|
21966 |
|
21967 |
|
21968 |
|
21969 |
|
21970 |
|
21971 |
|
21972 |
|
21973 | updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots
|
21974 | ) {
|
21975 |
|
21976 |
|
21977 |
|
21978 |
|
21979 |
|
21980 | if (!nextChildren && !prevChildren) {
|
21981 | return;
|
21982 | }
|
21983 | var name;
|
21984 | var prevChild;
|
21985 | for (name in nextChildren) {
|
21986 | if (!nextChildren.hasOwnProperty(name)) {
|
21987 | continue;
|
21988 | }
|
21989 | prevChild = prevChildren && prevChildren[name];
|
21990 | var prevElement = prevChild && prevChild._currentElement;
|
21991 | var nextElement = nextChildren[name];
|
21992 | if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
|
21993 | ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
|
21994 | nextChildren[name] = prevChild;
|
21995 | } else {
|
21996 | if (prevChild) {
|
21997 | removedNodes[name] = ReactReconciler.getHostNode(prevChild);
|
21998 | ReactReconciler.unmountComponent(prevChild, false);
|
21999 | }
|
22000 |
|
22001 | var nextChildInstance = instantiateReactComponent(nextElement, true);
|
22002 | nextChildren[name] = nextChildInstance;
|
22003 |
|
22004 |
|
22005 | var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
|
22006 | mountImages.push(nextChildMountImage);
|
22007 | }
|
22008 | }
|
22009 |
|
22010 | for (name in prevChildren) {
|
22011 | if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
|
22012 | prevChild = prevChildren[name];
|
22013 | removedNodes[name] = ReactReconciler.getHostNode(prevChild);
|
22014 | ReactReconciler.unmountComponent(prevChild, false);
|
22015 | }
|
22016 | }
|
22017 | },
|
22018 |
|
22019 | |
22020 |
|
22021 |
|
22022 |
|
22023 |
|
22024 |
|
22025 |
|
22026 | unmountChildren: function (renderedChildren, safely) {
|
22027 | for (var name in renderedChildren) {
|
22028 | if (renderedChildren.hasOwnProperty(name)) {
|
22029 | var renderedChild = renderedChildren[name];
|
22030 | ReactReconciler.unmountComponent(renderedChild, safely);
|
22031 | }
|
22032 | }
|
22033 | }
|
22034 |
|
22035 | };
|
22036 |
|
22037 | module.exports = ReactChildReconciler;
|
22038 | }.call(exports, __webpack_require__(28)))
|
22039 |
|
22040 | },
|
22041 |
|
22042 | function(module, exports, __webpack_require__) {
|
22043 |
|
22044 | |
22045 |
|
22046 |
|
22047 |
|
22048 |
|
22049 |
|
22050 |
|
22051 |
|
22052 |
|
22053 |
|
22054 | 'use strict';
|
22055 |
|
22056 | var DOMChildrenOperations = __webpack_require__(40);
|
22057 | var ReactDOMIDOperations = __webpack_require__(202);
|
22058 |
|
22059 | |
22060 |
|
22061 |
|
22062 |
|
22063 |
|
22064 | var ReactComponentBrowserEnvironment = {
|
22065 |
|
22066 | processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
|
22067 |
|
22068 | replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
|
22069 |
|
22070 | };
|
22071 |
|
22072 | module.exports = ReactComponentBrowserEnvironment;
|
22073 |
|
22074 | },
|
22075 |
|
22076 | function(module, exports, __webpack_require__) {
|
22077 |
|
22078 | |
22079 |
|
22080 |
|
22081 |
|
22082 |
|
22083 |
|
22084 |
|
22085 |
|
22086 |
|
22087 |
|
22088 |
|
22089 |
|
22090 | 'use strict';
|
22091 |
|
22092 | var _prodInvariant = __webpack_require__(6),
|
22093 | _assign = __webpack_require__(7);
|
22094 |
|
22095 | var AutoFocusUtils = __webpack_require__(186);
|
22096 | var CSSPropertyOperations = __webpack_require__(188);
|
22097 | var DOMLazyTree = __webpack_require__(25);
|
22098 | var DOMNamespaces = __webpack_require__(41);
|
22099 | var DOMProperty = __webpack_require__(17);
|
22100 | var DOMPropertyOperations = __webpack_require__(72);
|
22101 | var EventPluginHub = __webpack_require__(26);
|
22102 | var EventPluginRegistry = __webpack_require__(29);
|
22103 | var ReactBrowserEventEmitter = __webpack_require__(30);
|
22104 | var ReactDOMComponentFlags = __webpack_require__(75);
|
22105 | var ReactDOMComponentTree = __webpack_require__(8);
|
22106 | var ReactDOMInput = __webpack_require__(203);
|
22107 | var ReactDOMOption = __webpack_require__(206);
|
22108 | var ReactDOMSelect = __webpack_require__(76);
|
22109 | var ReactDOMTextarea = __webpack_require__(209);
|
22110 | var ReactInstrumentation = __webpack_require__(12);
|
22111 | var ReactMultiChild = __webpack_require__(220);
|
22112 | var ReactServerRenderingTransaction = __webpack_require__(226);
|
22113 |
|
22114 | var emptyFunction = __webpack_require__(11);
|
22115 | var escapeTextContentForBrowser = __webpack_require__(36);
|
22116 | var invariant = __webpack_require__(4);
|
22117 | var isEventSupported = __webpack_require__(52);
|
22118 | var shallowEqual = __webpack_require__(39);
|
22119 | var validateDOMNesting = __webpack_require__(54);
|
22120 | var warning = __webpack_require__(5);
|
22121 |
|
22122 | var Flags = ReactDOMComponentFlags;
|
22123 | var deleteListener = EventPluginHub.deleteListener;
|
22124 | var getNode = ReactDOMComponentTree.getNodeFromInstance;
|
22125 | var listenTo = ReactBrowserEventEmitter.listenTo;
|
22126 | var registrationNameModules = EventPluginRegistry.registrationNameModules;
|
22127 |
|
22128 |
|
22129 | var CONTENT_TYPES = { 'string': true, 'number': true };
|
22130 |
|
22131 | var STYLE = 'style';
|
22132 | var HTML = '__html';
|
22133 | var RESERVED_PROPS = {
|
22134 | children: null,
|
22135 | dangerouslySetInnerHTML: null,
|
22136 | suppressContentEditableWarning: null
|
22137 | };
|
22138 |
|
22139 |
|
22140 | var DOC_FRAGMENT_TYPE = 11;
|
22141 |
|
22142 | function getDeclarationErrorAddendum(internalInstance) {
|
22143 | if (internalInstance) {
|
22144 | var owner = internalInstance._currentElement._owner || null;
|
22145 | if (owner) {
|
22146 | var name = owner.getName();
|
22147 | if (name) {
|
22148 | return ' This DOM node was rendered by `' + name + '`.';
|
22149 | }
|
22150 | }
|
22151 | }
|
22152 | return '';
|
22153 | }
|
22154 |
|
22155 | function friendlyStringify(obj) {
|
22156 | if (typeof obj === 'object') {
|
22157 | if (Array.isArray(obj)) {
|
22158 | return '[' + obj.map(friendlyStringify).join(', ') + ']';
|
22159 | } else {
|
22160 | var pairs = [];
|
22161 | for (var key in obj) {
|
22162 | if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
22163 | var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key);
|
22164 | pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));
|
22165 | }
|
22166 | }
|
22167 | return '{' + pairs.join(', ') + '}';
|
22168 | }
|
22169 | } else if (typeof obj === 'string') {
|
22170 | return JSON.stringify(obj);
|
22171 | } else if (typeof obj === 'function') {
|
22172 | return '[function object]';
|
22173 | }
|
22174 |
|
22175 |
|
22176 | return String(obj);
|
22177 | }
|
22178 |
|
22179 | var styleMutationWarning = {};
|
22180 |
|
22181 | function checkAndWarnForMutatedStyle(style1, style2, component) {
|
22182 | if (style1 == null || style2 == null) {
|
22183 | return;
|
22184 | }
|
22185 | if (shallowEqual(style1, style2)) {
|
22186 | return;
|
22187 | }
|
22188 |
|
22189 | var componentName = component._tag;
|
22190 | var owner = component._currentElement._owner;
|
22191 | var ownerName;
|
22192 | if (owner) {
|
22193 | ownerName = owner.getName();
|
22194 | }
|
22195 |
|
22196 | var hash = ownerName + '|' + componentName;
|
22197 |
|
22198 | if (styleMutationWarning.hasOwnProperty(hash)) {
|
22199 | return;
|
22200 | }
|
22201 |
|
22202 | styleMutationWarning[hash] = true;
|
22203 |
|
22204 | true ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0;
|
22205 | }
|
22206 |
|
22207 | |
22208 |
|
22209 |
|
22210 |
|
22211 | function assertValidProps(component, props) {
|
22212 | if (!props) {
|
22213 | return;
|
22214 | }
|
22215 |
|
22216 | if (voidElementTags[component._tag]) {
|
22217 | !(props.children == null && props.dangerouslySetInnerHTML == null) ? true ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0;
|
22218 | }
|
22219 | if (props.dangerouslySetInnerHTML != null) {
|
22220 | !(props.children == null) ? true ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0;
|
22221 | !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? true ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0;
|
22222 | }
|
22223 | if (true) {
|
22224 | true ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0;
|
22225 | true ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
|
22226 | true ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0;
|
22227 | }
|
22228 | !(props.style == null || typeof props.style === 'object') ? true ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0;
|
22229 | }
|
22230 |
|
22231 | function enqueuePutListener(inst, registrationName, listener, transaction) {
|
22232 | if (transaction instanceof ReactServerRenderingTransaction) {
|
22233 | return;
|
22234 | }
|
22235 | if (true) {
|
22236 |
|
22237 |
|
22238 | true ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : void 0;
|
22239 | }
|
22240 | var containerInfo = inst._hostContainerInfo;
|
22241 | var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;
|
22242 | var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;
|
22243 | listenTo(registrationName, doc);
|
22244 | transaction.getReactMountReady().enqueue(putListener, {
|
22245 | inst: inst,
|
22246 | registrationName: registrationName,
|
22247 | listener: listener
|
22248 | });
|
22249 | }
|
22250 |
|
22251 | function putListener() {
|
22252 | var listenerToPut = this;
|
22253 | EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);
|
22254 | }
|
22255 |
|
22256 | function inputPostMount() {
|
22257 | var inst = this;
|
22258 | ReactDOMInput.postMountWrapper(inst);
|
22259 | }
|
22260 |
|
22261 | function textareaPostMount() {
|
22262 | var inst = this;
|
22263 | ReactDOMTextarea.postMountWrapper(inst);
|
22264 | }
|
22265 |
|
22266 | function optionPostMount() {
|
22267 | var inst = this;
|
22268 | ReactDOMOption.postMountWrapper(inst);
|
22269 | }
|
22270 |
|
22271 | var setAndValidateContentChildDev = emptyFunction;
|
22272 | if (true) {
|
22273 | setAndValidateContentChildDev = function (content) {
|
22274 | var hasExistingContent = this._contentDebugID != null;
|
22275 | var debugID = this._debugID;
|
22276 |
|
22277 | var contentDebugID = -debugID;
|
22278 |
|
22279 | if (content == null) {
|
22280 | if (hasExistingContent) {
|
22281 | ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);
|
22282 | }
|
22283 | this._contentDebugID = null;
|
22284 | return;
|
22285 | }
|
22286 |
|
22287 | validateDOMNesting(null, String(content), this, this._ancestorInfo);
|
22288 | this._contentDebugID = contentDebugID;
|
22289 | if (hasExistingContent) {
|
22290 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);
|
22291 | ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);
|
22292 | } else {
|
22293 | ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);
|
22294 | ReactInstrumentation.debugTool.onMountComponent(contentDebugID);
|
22295 | ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);
|
22296 | }
|
22297 | };
|
22298 | }
|
22299 |
|
22300 |
|
22301 |
|
22302 | var mediaEvents = {
|
22303 | topAbort: 'abort',
|
22304 | topCanPlay: 'canplay',
|
22305 | topCanPlayThrough: 'canplaythrough',
|
22306 | topDurationChange: 'durationchange',
|
22307 | topEmptied: 'emptied',
|
22308 | topEncrypted: 'encrypted',
|
22309 | topEnded: 'ended',
|
22310 | topError: 'error',
|
22311 | topLoadedData: 'loadeddata',
|
22312 | topLoadedMetadata: 'loadedmetadata',
|
22313 | topLoadStart: 'loadstart',
|
22314 | topPause: 'pause',
|
22315 | topPlay: 'play',
|
22316 | topPlaying: 'playing',
|
22317 | topProgress: 'progress',
|
22318 | topRateChange: 'ratechange',
|
22319 | topSeeked: 'seeked',
|
22320 | topSeeking: 'seeking',
|
22321 | topStalled: 'stalled',
|
22322 | topSuspend: 'suspend',
|
22323 | topTimeUpdate: 'timeupdate',
|
22324 | topVolumeChange: 'volumechange',
|
22325 | topWaiting: 'waiting'
|
22326 | };
|
22327 |
|
22328 | function trapBubbledEventsLocal() {
|
22329 | var inst = this;
|
22330 |
|
22331 |
|
22332 | !inst._rootNodeID ? true ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0;
|
22333 | var node = getNode(inst);
|
22334 | !node ? true ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0;
|
22335 |
|
22336 | switch (inst._tag) {
|
22337 | case 'iframe':
|
22338 | case 'object':
|
22339 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
|
22340 | break;
|
22341 | case 'video':
|
22342 | case 'audio':
|
22343 |
|
22344 | inst._wrapperState.listeners = [];
|
22345 |
|
22346 | for (var event in mediaEvents) {
|
22347 | if (mediaEvents.hasOwnProperty(event)) {
|
22348 | inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node));
|
22349 | }
|
22350 | }
|
22351 | break;
|
22352 | case 'source':
|
22353 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)];
|
22354 | break;
|
22355 | case 'img':
|
22356 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
|
22357 | break;
|
22358 | case 'form':
|
22359 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)];
|
22360 | break;
|
22361 | case 'input':
|
22362 | case 'select':
|
22363 | case 'textarea':
|
22364 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)];
|
22365 | break;
|
22366 | }
|
22367 | }
|
22368 |
|
22369 | function postUpdateSelectWrapper() {
|
22370 | ReactDOMSelect.postUpdateWrapper(this);
|
22371 | }
|
22372 |
|
22373 |
|
22374 |
|
22375 |
|
22376 | var omittedCloseTags = {
|
22377 | 'area': true,
|
22378 | 'base': true,
|
22379 | 'br': true,
|
22380 | 'col': true,
|
22381 | 'embed': true,
|
22382 | 'hr': true,
|
22383 | 'img': true,
|
22384 | 'input': true,
|
22385 | 'keygen': true,
|
22386 | 'link': true,
|
22387 | 'meta': true,
|
22388 | 'param': true,
|
22389 | 'source': true,
|
22390 | 'track': true,
|
22391 | 'wbr': true
|
22392 | };
|
22393 |
|
22394 | var newlineEatingTags = {
|
22395 | 'listing': true,
|
22396 | 'pre': true,
|
22397 | 'textarea': true
|
22398 | };
|
22399 |
|
22400 |
|
22401 |
|
22402 |
|
22403 | var voidElementTags = _assign({
|
22404 | 'menuitem': true
|
22405 | }, omittedCloseTags);
|
22406 |
|
22407 |
|
22408 |
|
22409 |
|
22410 |
|
22411 | var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/;
|
22412 | var validatedTagCache = {};
|
22413 | var hasOwnProperty = {}.hasOwnProperty;
|
22414 |
|
22415 | function validateDangerousTag(tag) {
|
22416 | if (!hasOwnProperty.call(validatedTagCache, tag)) {
|
22417 | !VALID_TAG_REGEX.test(tag) ? true ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0;
|
22418 | validatedTagCache[tag] = true;
|
22419 | }
|
22420 | }
|
22421 |
|
22422 | function isCustomComponent(tagName, props) {
|
22423 | return tagName.indexOf('-') >= 0 || props.is != null;
|
22424 | }
|
22425 |
|
22426 | var globalIdCounter = 1;
|
22427 |
|
22428 | |
22429 |
|
22430 |
|
22431 |
|
22432 |
|
22433 |
|
22434 |
|
22435 |
|
22436 |
|
22437 |
|
22438 |
|
22439 |
|
22440 |
|
22441 |
|
22442 | function ReactDOMComponent(element) {
|
22443 | var tag = element.type;
|
22444 | validateDangerousTag(tag);
|
22445 | this._currentElement = element;
|
22446 | this._tag = tag.toLowerCase();
|
22447 | this._namespaceURI = null;
|
22448 | this._renderedChildren = null;
|
22449 | this._previousStyle = null;
|
22450 | this._previousStyleCopy = null;
|
22451 | this._hostNode = null;
|
22452 | this._hostParent = null;
|
22453 | this._rootNodeID = 0;
|
22454 | this._domID = 0;
|
22455 | this._hostContainerInfo = null;
|
22456 | this._wrapperState = null;
|
22457 | this._topLevelWrapper = null;
|
22458 | this._flags = 0;
|
22459 | if (true) {
|
22460 | this._ancestorInfo = null;
|
22461 | setAndValidateContentChildDev.call(this, null);
|
22462 | }
|
22463 | }
|
22464 |
|
22465 | ReactDOMComponent.displayName = 'ReactDOMComponent';
|
22466 |
|
22467 | ReactDOMComponent.Mixin = {
|
22468 |
|
22469 | |
22470 |
|
22471 |
|
22472 |
|
22473 |
|
22474 |
|
22475 |
|
22476 |
|
22477 |
|
22478 |
|
22479 |
|
22480 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
22481 | this._rootNodeID = globalIdCounter++;
|
22482 | this._domID = hostContainerInfo._idCounter++;
|
22483 | this._hostParent = hostParent;
|
22484 | this._hostContainerInfo = hostContainerInfo;
|
22485 |
|
22486 | var props = this._currentElement.props;
|
22487 |
|
22488 | switch (this._tag) {
|
22489 | case 'audio':
|
22490 | case 'form':
|
22491 | case 'iframe':
|
22492 | case 'img':
|
22493 | case 'link':
|
22494 | case 'object':
|
22495 | case 'source':
|
22496 | case 'video':
|
22497 | this._wrapperState = {
|
22498 | listeners: null
|
22499 | };
|
22500 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
22501 | break;
|
22502 | case 'input':
|
22503 | ReactDOMInput.mountWrapper(this, props, hostParent);
|
22504 | props = ReactDOMInput.getHostProps(this, props);
|
22505 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
22506 | break;
|
22507 | case 'option':
|
22508 | ReactDOMOption.mountWrapper(this, props, hostParent);
|
22509 | props = ReactDOMOption.getHostProps(this, props);
|
22510 | break;
|
22511 | case 'select':
|
22512 | ReactDOMSelect.mountWrapper(this, props, hostParent);
|
22513 | props = ReactDOMSelect.getHostProps(this, props);
|
22514 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
22515 | break;
|
22516 | case 'textarea':
|
22517 | ReactDOMTextarea.mountWrapper(this, props, hostParent);
|
22518 | props = ReactDOMTextarea.getHostProps(this, props);
|
22519 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
22520 | break;
|
22521 | }
|
22522 |
|
22523 | assertValidProps(this, props);
|
22524 |
|
22525 |
|
22526 |
|
22527 | var namespaceURI;
|
22528 | var parentTag;
|
22529 | if (hostParent != null) {
|
22530 | namespaceURI = hostParent._namespaceURI;
|
22531 | parentTag = hostParent._tag;
|
22532 | } else if (hostContainerInfo._tag) {
|
22533 | namespaceURI = hostContainerInfo._namespaceURI;
|
22534 | parentTag = hostContainerInfo._tag;
|
22535 | }
|
22536 | if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {
|
22537 | namespaceURI = DOMNamespaces.html;
|
22538 | }
|
22539 | if (namespaceURI === DOMNamespaces.html) {
|
22540 | if (this._tag === 'svg') {
|
22541 | namespaceURI = DOMNamespaces.svg;
|
22542 | } else if (this._tag === 'math') {
|
22543 | namespaceURI = DOMNamespaces.mathml;
|
22544 | }
|
22545 | }
|
22546 | this._namespaceURI = namespaceURI;
|
22547 |
|
22548 | if (true) {
|
22549 | var parentInfo;
|
22550 | if (hostParent != null) {
|
22551 | parentInfo = hostParent._ancestorInfo;
|
22552 | } else if (hostContainerInfo._tag) {
|
22553 | parentInfo = hostContainerInfo._ancestorInfo;
|
22554 | }
|
22555 | if (parentInfo) {
|
22556 |
|
22557 |
|
22558 | validateDOMNesting(this._tag, null, this, parentInfo);
|
22559 | }
|
22560 | this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
|
22561 | }
|
22562 |
|
22563 | var mountImage;
|
22564 | if (transaction.useCreateElement) {
|
22565 | var ownerDocument = hostContainerInfo._ownerDocument;
|
22566 | var el;
|
22567 | if (namespaceURI === DOMNamespaces.html) {
|
22568 | if (this._tag === 'script') {
|
22569 |
|
22570 |
|
22571 | var div = ownerDocument.createElement('div');
|
22572 | var type = this._currentElement.type;
|
22573 | div.innerHTML = '<' + type + '></' + type + '>';
|
22574 | el = div.removeChild(div.firstChild);
|
22575 | } else if (props.is) {
|
22576 | el = ownerDocument.createElement(this._currentElement.type, props.is);
|
22577 | } else {
|
22578 |
|
22579 |
|
22580 |
|
22581 | el = ownerDocument.createElement(this._currentElement.type);
|
22582 | }
|
22583 | } else {
|
22584 | el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);
|
22585 | }
|
22586 | ReactDOMComponentTree.precacheNode(this, el);
|
22587 | this._flags |= Flags.hasCachedChildNodes;
|
22588 | if (!this._hostParent) {
|
22589 | DOMPropertyOperations.setAttributeForRoot(el);
|
22590 | }
|
22591 | this._updateDOMProperties(null, props, transaction);
|
22592 | var lazyTree = DOMLazyTree(el);
|
22593 | this._createInitialChildren(transaction, props, context, lazyTree);
|
22594 | mountImage = lazyTree;
|
22595 | } else {
|
22596 | var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
|
22597 | var tagContent = this._createContentMarkup(transaction, props, context);
|
22598 | if (!tagContent && omittedCloseTags[this._tag]) {
|
22599 | mountImage = tagOpen + '/>';
|
22600 | } else {
|
22601 | mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
|
22602 | }
|
22603 | }
|
22604 |
|
22605 | switch (this._tag) {
|
22606 | case 'input':
|
22607 | transaction.getReactMountReady().enqueue(inputPostMount, this);
|
22608 | if (props.autoFocus) {
|
22609 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
22610 | }
|
22611 | break;
|
22612 | case 'textarea':
|
22613 | transaction.getReactMountReady().enqueue(textareaPostMount, this);
|
22614 | if (props.autoFocus) {
|
22615 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
22616 | }
|
22617 | break;
|
22618 | case 'select':
|
22619 | if (props.autoFocus) {
|
22620 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
22621 | }
|
22622 | break;
|
22623 | case 'button':
|
22624 | if (props.autoFocus) {
|
22625 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
22626 | }
|
22627 | break;
|
22628 | case 'option':
|
22629 | transaction.getReactMountReady().enqueue(optionPostMount, this);
|
22630 | break;
|
22631 | }
|
22632 |
|
22633 | return mountImage;
|
22634 | },
|
22635 |
|
22636 | |
22637 |
|
22638 |
|
22639 |
|
22640 |
|
22641 |
|
22642 |
|
22643 |
|
22644 |
|
22645 |
|
22646 |
|
22647 |
|
22648 |
|
22649 | _createOpenTagMarkupAndPutListeners: function (transaction, props) {
|
22650 | var ret = '<' + this._currentElement.type;
|
22651 |
|
22652 | for (var propKey in props) {
|
22653 | if (!props.hasOwnProperty(propKey)) {
|
22654 | continue;
|
22655 | }
|
22656 | var propValue = props[propKey];
|
22657 | if (propValue == null) {
|
22658 | continue;
|
22659 | }
|
22660 | if (registrationNameModules.hasOwnProperty(propKey)) {
|
22661 | if (propValue) {
|
22662 | enqueuePutListener(this, propKey, propValue, transaction);
|
22663 | }
|
22664 | } else {
|
22665 | if (propKey === STYLE) {
|
22666 | if (propValue) {
|
22667 | if (true) {
|
22668 |
|
22669 | this._previousStyle = propValue;
|
22670 | }
|
22671 | propValue = this._previousStyleCopy = _assign({}, props.style);
|
22672 | }
|
22673 | propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this);
|
22674 | }
|
22675 | var markup = null;
|
22676 | if (this._tag != null && isCustomComponent(this._tag, props)) {
|
22677 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
22678 | markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);
|
22679 | }
|
22680 | } else {
|
22681 | markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
|
22682 | }
|
22683 | if (markup) {
|
22684 | ret += ' ' + markup;
|
22685 | }
|
22686 | }
|
22687 | }
|
22688 |
|
22689 |
|
22690 |
|
22691 | if (transaction.renderToStaticMarkup) {
|
22692 | return ret;
|
22693 | }
|
22694 |
|
22695 | if (!this._hostParent) {
|
22696 | ret += ' ' + DOMPropertyOperations.createMarkupForRoot();
|
22697 | }
|
22698 | ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID);
|
22699 | return ret;
|
22700 | },
|
22701 |
|
22702 | |
22703 |
|
22704 |
|
22705 |
|
22706 |
|
22707 |
|
22708 |
|
22709 |
|
22710 |
|
22711 | _createContentMarkup: function (transaction, props, context) {
|
22712 | var ret = '';
|
22713 |
|
22714 |
|
22715 | var innerHTML = props.dangerouslySetInnerHTML;
|
22716 | if (innerHTML != null) {
|
22717 | if (innerHTML.__html != null) {
|
22718 | ret = innerHTML.__html;
|
22719 | }
|
22720 | } else {
|
22721 | var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
|
22722 | var childrenToUse = contentToUse != null ? null : props.children;
|
22723 | if (contentToUse != null) {
|
22724 |
|
22725 | ret = escapeTextContentForBrowser(contentToUse);
|
22726 | if (true) {
|
22727 | setAndValidateContentChildDev.call(this, contentToUse);
|
22728 | }
|
22729 | } else if (childrenToUse != null) {
|
22730 | var mountImages = this.mountChildren(childrenToUse, transaction, context);
|
22731 | ret = mountImages.join('');
|
22732 | }
|
22733 | }
|
22734 | if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') {
|
22735 |
|
22736 |
|
22737 |
|
22738 |
|
22739 |
|
22740 |
|
22741 |
|
22742 |
|
22743 |
|
22744 |
|
22745 | return '\n' + ret;
|
22746 | } else {
|
22747 | return ret;
|
22748 | }
|
22749 | },
|
22750 |
|
22751 | _createInitialChildren: function (transaction, props, context, lazyTree) {
|
22752 |
|
22753 | var innerHTML = props.dangerouslySetInnerHTML;
|
22754 | if (innerHTML != null) {
|
22755 | if (innerHTML.__html != null) {
|
22756 | DOMLazyTree.queueHTML(lazyTree, innerHTML.__html);
|
22757 | }
|
22758 | } else {
|
22759 | var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
|
22760 | var childrenToUse = contentToUse != null ? null : props.children;
|
22761 | if (contentToUse != null) {
|
22762 |
|
22763 | if (true) {
|
22764 | setAndValidateContentChildDev.call(this, contentToUse);
|
22765 | }
|
22766 | DOMLazyTree.queueText(lazyTree, contentToUse);
|
22767 | } else if (childrenToUse != null) {
|
22768 | var mountImages = this.mountChildren(childrenToUse, transaction, context);
|
22769 | for (var i = 0; i < mountImages.length; i++) {
|
22770 | DOMLazyTree.queueChild(lazyTree, mountImages[i]);
|
22771 | }
|
22772 | }
|
22773 | }
|
22774 | },
|
22775 |
|
22776 | |
22777 |
|
22778 |
|
22779 |
|
22780 |
|
22781 |
|
22782 |
|
22783 |
|
22784 | receiveComponent: function (nextElement, transaction, context) {
|
22785 | var prevElement = this._currentElement;
|
22786 | this._currentElement = nextElement;
|
22787 | this.updateComponent(transaction, prevElement, nextElement, context);
|
22788 | },
|
22789 |
|
22790 | |
22791 |
|
22792 |
|
22793 |
|
22794 |
|
22795 |
|
22796 |
|
22797 |
|
22798 |
|
22799 |
|
22800 | updateComponent: function (transaction, prevElement, nextElement, context) {
|
22801 | var lastProps = prevElement.props;
|
22802 | var nextProps = this._currentElement.props;
|
22803 |
|
22804 | switch (this._tag) {
|
22805 | case 'input':
|
22806 | lastProps = ReactDOMInput.getHostProps(this, lastProps);
|
22807 | nextProps = ReactDOMInput.getHostProps(this, nextProps);
|
22808 | break;
|
22809 | case 'option':
|
22810 | lastProps = ReactDOMOption.getHostProps(this, lastProps);
|
22811 | nextProps = ReactDOMOption.getHostProps(this, nextProps);
|
22812 | break;
|
22813 | case 'select':
|
22814 | lastProps = ReactDOMSelect.getHostProps(this, lastProps);
|
22815 | nextProps = ReactDOMSelect.getHostProps(this, nextProps);
|
22816 | break;
|
22817 | case 'textarea':
|
22818 | lastProps = ReactDOMTextarea.getHostProps(this, lastProps);
|
22819 | nextProps = ReactDOMTextarea.getHostProps(this, nextProps);
|
22820 | break;
|
22821 | }
|
22822 |
|
22823 | assertValidProps(this, nextProps);
|
22824 | this._updateDOMProperties(lastProps, nextProps, transaction);
|
22825 | this._updateDOMChildren(lastProps, nextProps, transaction, context);
|
22826 |
|
22827 | switch (this._tag) {
|
22828 | case 'input':
|
22829 |
|
22830 |
|
22831 |
|
22832 | ReactDOMInput.updateWrapper(this);
|
22833 | break;
|
22834 | case 'textarea':
|
22835 | ReactDOMTextarea.updateWrapper(this);
|
22836 | break;
|
22837 | case 'select':
|
22838 |
|
22839 |
|
22840 | transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
|
22841 | break;
|
22842 | }
|
22843 | },
|
22844 |
|
22845 | |
22846 |
|
22847 |
|
22848 |
|
22849 |
|
22850 |
|
22851 |
|
22852 |
|
22853 |
|
22854 |
|
22855 |
|
22856 |
|
22857 |
|
22858 |
|
22859 |
|
22860 |
|
22861 | _updateDOMProperties: function (lastProps, nextProps, transaction) {
|
22862 | var propKey;
|
22863 | var styleName;
|
22864 | var styleUpdates;
|
22865 | for (propKey in lastProps) {
|
22866 | if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
|
22867 | continue;
|
22868 | }
|
22869 | if (propKey === STYLE) {
|
22870 | var lastStyle = this._previousStyleCopy;
|
22871 | for (styleName in lastStyle) {
|
22872 | if (lastStyle.hasOwnProperty(styleName)) {
|
22873 | styleUpdates = styleUpdates || {};
|
22874 | styleUpdates[styleName] = '';
|
22875 | }
|
22876 | }
|
22877 | this._previousStyleCopy = null;
|
22878 | } else if (registrationNameModules.hasOwnProperty(propKey)) {
|
22879 | if (lastProps[propKey]) {
|
22880 |
|
22881 |
|
22882 |
|
22883 | deleteListener(this, propKey);
|
22884 | }
|
22885 | } else if (isCustomComponent(this._tag, lastProps)) {
|
22886 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
22887 | DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey);
|
22888 | }
|
22889 | } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
|
22890 | DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);
|
22891 | }
|
22892 | }
|
22893 | for (propKey in nextProps) {
|
22894 | var nextProp = nextProps[propKey];
|
22895 | var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined;
|
22896 | if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
|
22897 | continue;
|
22898 | }
|
22899 | if (propKey === STYLE) {
|
22900 | if (nextProp) {
|
22901 | if (true) {
|
22902 | checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);
|
22903 | this._previousStyle = nextProp;
|
22904 | }
|
22905 | nextProp = this._previousStyleCopy = _assign({}, nextProp);
|
22906 | } else {
|
22907 | this._previousStyleCopy = null;
|
22908 | }
|
22909 | if (lastProp) {
|
22910 |
|
22911 | for (styleName in lastProp) {
|
22912 | if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
|
22913 | styleUpdates = styleUpdates || {};
|
22914 | styleUpdates[styleName] = '';
|
22915 | }
|
22916 | }
|
22917 |
|
22918 | for (styleName in nextProp) {
|
22919 | if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
|
22920 | styleUpdates = styleUpdates || {};
|
22921 | styleUpdates[styleName] = nextProp[styleName];
|
22922 | }
|
22923 | }
|
22924 | } else {
|
22925 |
|
22926 | styleUpdates = nextProp;
|
22927 | }
|
22928 | } else if (registrationNameModules.hasOwnProperty(propKey)) {
|
22929 | if (nextProp) {
|
22930 | enqueuePutListener(this, propKey, nextProp, transaction);
|
22931 | } else if (lastProp) {
|
22932 | deleteListener(this, propKey);
|
22933 | }
|
22934 | } else if (isCustomComponent(this._tag, nextProps)) {
|
22935 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
22936 | DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);
|
22937 | }
|
22938 | } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
|
22939 | var node = getNode(this);
|
22940 |
|
22941 |
|
22942 |
|
22943 | if (nextProp != null) {
|
22944 | DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);
|
22945 | } else {
|
22946 | DOMPropertyOperations.deleteValueForProperty(node, propKey);
|
22947 | }
|
22948 | }
|
22949 | }
|
22950 | if (styleUpdates) {
|
22951 | CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);
|
22952 | }
|
22953 | },
|
22954 |
|
22955 | |
22956 |
|
22957 |
|
22958 |
|
22959 |
|
22960 |
|
22961 |
|
22962 |
|
22963 |
|
22964 | _updateDOMChildren: function (lastProps, nextProps, transaction, context) {
|
22965 | var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;
|
22966 | var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;
|
22967 |
|
22968 | var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;
|
22969 | var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;
|
22970 |
|
22971 |
|
22972 | var lastChildren = lastContent != null ? null : lastProps.children;
|
22973 | var nextChildren = nextContent != null ? null : nextProps.children;
|
22974 |
|
22975 |
|
22976 |
|
22977 | var lastHasContentOrHtml = lastContent != null || lastHtml != null;
|
22978 | var nextHasContentOrHtml = nextContent != null || nextHtml != null;
|
22979 | if (lastChildren != null && nextChildren == null) {
|
22980 | this.updateChildren(null, transaction, context);
|
22981 | } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
|
22982 | this.updateTextContent('');
|
22983 | if (true) {
|
22984 | ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
|
22985 | }
|
22986 | }
|
22987 |
|
22988 | if (nextContent != null) {
|
22989 | if (lastContent !== nextContent) {
|
22990 | this.updateTextContent('' + nextContent);
|
22991 | if (true) {
|
22992 | setAndValidateContentChildDev.call(this, nextContent);
|
22993 | }
|
22994 | }
|
22995 | } else if (nextHtml != null) {
|
22996 | if (lastHtml !== nextHtml) {
|
22997 | this.updateMarkup('' + nextHtml);
|
22998 | }
|
22999 | if (true) {
|
23000 | ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
|
23001 | }
|
23002 | } else if (nextChildren != null) {
|
23003 | if (true) {
|
23004 | setAndValidateContentChildDev.call(this, null);
|
23005 | }
|
23006 |
|
23007 | this.updateChildren(nextChildren, transaction, context);
|
23008 | }
|
23009 | },
|
23010 |
|
23011 | getHostNode: function () {
|
23012 | return getNode(this);
|
23013 | },
|
23014 |
|
23015 | |
23016 |
|
23017 |
|
23018 |
|
23019 |
|
23020 |
|
23021 | unmountComponent: function (safely) {
|
23022 | switch (this._tag) {
|
23023 | case 'audio':
|
23024 | case 'form':
|
23025 | case 'iframe':
|
23026 | case 'img':
|
23027 | case 'link':
|
23028 | case 'object':
|
23029 | case 'source':
|
23030 | case 'video':
|
23031 | var listeners = this._wrapperState.listeners;
|
23032 | if (listeners) {
|
23033 | for (var i = 0; i < listeners.length; i++) {
|
23034 | listeners[i].remove();
|
23035 | }
|
23036 | }
|
23037 | break;
|
23038 | case 'html':
|
23039 | case 'head':
|
23040 | case 'body':
|
23041 | |
23042 |
|
23043 |
|
23044 |
|
23045 |
|
23046 |
|
23047 | true ? true ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0;
|
23048 | break;
|
23049 | }
|
23050 |
|
23051 | this.unmountChildren(safely);
|
23052 | ReactDOMComponentTree.uncacheNode(this);
|
23053 | EventPluginHub.deleteAllListeners(this);
|
23054 | this._rootNodeID = 0;
|
23055 | this._domID = 0;
|
23056 | this._wrapperState = null;
|
23057 |
|
23058 | if (true) {
|
23059 | setAndValidateContentChildDev.call(this, null);
|
23060 | }
|
23061 | },
|
23062 |
|
23063 | getPublicInstance: function () {
|
23064 | return getNode(this);
|
23065 | }
|
23066 |
|
23067 | };
|
23068 |
|
23069 | _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
|
23070 |
|
23071 | module.exports = ReactDOMComponent;
|
23072 |
|
23073 | },
|
23074 |
|
23075 | function(module, exports, __webpack_require__) {
|
23076 |
|
23077 | |
23078 |
|
23079 |
|
23080 |
|
23081 |
|
23082 |
|
23083 |
|
23084 |
|
23085 |
|
23086 |
|
23087 | 'use strict';
|
23088 |
|
23089 | var validateDOMNesting = __webpack_require__(54);
|
23090 |
|
23091 | var DOC_NODE_TYPE = 9;
|
23092 |
|
23093 | function ReactDOMContainerInfo(topLevelWrapper, node) {
|
23094 | var info = {
|
23095 | _topLevelWrapper: topLevelWrapper,
|
23096 | _idCounter: 1,
|
23097 | _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null,
|
23098 | _node: node,
|
23099 | _tag: node ? node.nodeName.toLowerCase() : null,
|
23100 | _namespaceURI: node ? node.namespaceURI : null
|
23101 | };
|
23102 | if (true) {
|
23103 | info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null;
|
23104 | }
|
23105 | return info;
|
23106 | }
|
23107 |
|
23108 | module.exports = ReactDOMContainerInfo;
|
23109 |
|
23110 | },
|
23111 |
|
23112 | function(module, exports, __webpack_require__) {
|
23113 |
|
23114 | |
23115 |
|
23116 |
|
23117 |
|
23118 |
|
23119 |
|
23120 |
|
23121 |
|
23122 |
|
23123 |
|
23124 | 'use strict';
|
23125 |
|
23126 | var _assign = __webpack_require__(7);
|
23127 |
|
23128 | var DOMLazyTree = __webpack_require__(25);
|
23129 | var ReactDOMComponentTree = __webpack_require__(8);
|
23130 |
|
23131 | var ReactDOMEmptyComponent = function (instantiate) {
|
23132 |
|
23133 | this._currentElement = null;
|
23134 |
|
23135 | this._hostNode = null;
|
23136 | this._hostParent = null;
|
23137 | this._hostContainerInfo = null;
|
23138 | this._domID = 0;
|
23139 | };
|
23140 | _assign(ReactDOMEmptyComponent.prototype, {
|
23141 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
23142 | var domID = hostContainerInfo._idCounter++;
|
23143 | this._domID = domID;
|
23144 | this._hostParent = hostParent;
|
23145 | this._hostContainerInfo = hostContainerInfo;
|
23146 |
|
23147 | var nodeValue = ' react-empty: ' + this._domID + ' ';
|
23148 | if (transaction.useCreateElement) {
|
23149 | var ownerDocument = hostContainerInfo._ownerDocument;
|
23150 | var node = ownerDocument.createComment(nodeValue);
|
23151 | ReactDOMComponentTree.precacheNode(this, node);
|
23152 | return DOMLazyTree(node);
|
23153 | } else {
|
23154 | if (transaction.renderToStaticMarkup) {
|
23155 |
|
23156 |
|
23157 |
|
23158 | return '';
|
23159 | }
|
23160 | return '<!--' + nodeValue + '-->';
|
23161 | }
|
23162 | },
|
23163 | receiveComponent: function () {},
|
23164 | getHostNode: function () {
|
23165 | return ReactDOMComponentTree.getNodeFromInstance(this);
|
23166 | },
|
23167 | unmountComponent: function () {
|
23168 | ReactDOMComponentTree.uncacheNode(this);
|
23169 | }
|
23170 | });
|
23171 |
|
23172 | module.exports = ReactDOMEmptyComponent;
|
23173 |
|
23174 | },
|
23175 |
|
23176 | function(module, exports) {
|
23177 |
|
23178 | |
23179 |
|
23180 |
|
23181 |
|
23182 |
|
23183 |
|
23184 |
|
23185 |
|
23186 |
|
23187 |
|
23188 | 'use strict';
|
23189 |
|
23190 | var ReactDOMFeatureFlags = {
|
23191 | useCreateElement: true,
|
23192 | useFiber: false
|
23193 | };
|
23194 |
|
23195 | module.exports = ReactDOMFeatureFlags;
|
23196 |
|
23197 | },
|
23198 |
|
23199 | function(module, exports, __webpack_require__) {
|
23200 |
|
23201 | |
23202 |
|
23203 |
|
23204 |
|
23205 |
|
23206 |
|
23207 |
|
23208 |
|
23209 |
|
23210 |
|
23211 | 'use strict';
|
23212 |
|
23213 | var DOMChildrenOperations = __webpack_require__(40);
|
23214 | var ReactDOMComponentTree = __webpack_require__(8);
|
23215 |
|
23216 | |
23217 |
|
23218 |
|
23219 | var ReactDOMIDOperations = {
|
23220 |
|
23221 | |
23222 |
|
23223 |
|
23224 |
|
23225 |
|
23226 |
|
23227 | dangerouslyProcessChildrenUpdates: function (parentInst, updates) {
|
23228 | var node = ReactDOMComponentTree.getNodeFromInstance(parentInst);
|
23229 | DOMChildrenOperations.processUpdates(node, updates);
|
23230 | }
|
23231 | };
|
23232 |
|
23233 | module.exports = ReactDOMIDOperations;
|
23234 |
|
23235 | },
|
23236 |
|
23237 | function(module, exports, __webpack_require__) {
|
23238 |
|
23239 | |
23240 |
|
23241 |
|
23242 |
|
23243 |
|
23244 |
|
23245 |
|
23246 |
|
23247 |
|
23248 |
|
23249 | 'use strict';
|
23250 |
|
23251 | var _prodInvariant = __webpack_require__(6),
|
23252 | _assign = __webpack_require__(7);
|
23253 |
|
23254 | var DOMPropertyOperations = __webpack_require__(72);
|
23255 | var LinkedValueUtils = __webpack_require__(44);
|
23256 | var ReactDOMComponentTree = __webpack_require__(8);
|
23257 | var ReactUpdates = __webpack_require__(13);
|
23258 |
|
23259 | var invariant = __webpack_require__(4);
|
23260 | var warning = __webpack_require__(5);
|
23261 |
|
23262 | var didWarnValueLink = false;
|
23263 | var didWarnCheckedLink = false;
|
23264 | var didWarnValueDefaultValue = false;
|
23265 | var didWarnCheckedDefaultChecked = false;
|
23266 | var didWarnControlledToUncontrolled = false;
|
23267 | var didWarnUncontrolledToControlled = false;
|
23268 |
|
23269 | function forceUpdateIfMounted() {
|
23270 | if (this._rootNodeID) {
|
23271 |
|
23272 | ReactDOMInput.updateWrapper(this);
|
23273 | }
|
23274 | }
|
23275 |
|
23276 | function isControlled(props) {
|
23277 | var usesChecked = props.type === 'checkbox' || props.type === 'radio';
|
23278 | return usesChecked ? props.checked != null : props.value != null;
|
23279 | }
|
23280 |
|
23281 | |
23282 |
|
23283 |
|
23284 |
|
23285 |
|
23286 |
|
23287 |
|
23288 |
|
23289 |
|
23290 |
|
23291 |
|
23292 |
|
23293 |
|
23294 |
|
23295 |
|
23296 |
|
23297 | var ReactDOMInput = {
|
23298 | getHostProps: function (inst, props) {
|
23299 | var value = LinkedValueUtils.getValue(props);
|
23300 | var checked = LinkedValueUtils.getChecked(props);
|
23301 |
|
23302 | var hostProps = _assign({
|
23303 |
|
23304 |
|
23305 | type: undefined,
|
23306 |
|
23307 |
|
23308 | step: undefined,
|
23309 |
|
23310 |
|
23311 | min: undefined,
|
23312 | max: undefined
|
23313 | }, props, {
|
23314 | defaultChecked: undefined,
|
23315 | defaultValue: undefined,
|
23316 | value: value != null ? value : inst._wrapperState.initialValue,
|
23317 | checked: checked != null ? checked : inst._wrapperState.initialChecked,
|
23318 | onChange: inst._wrapperState.onChange
|
23319 | });
|
23320 |
|
23321 | return hostProps;
|
23322 | },
|
23323 |
|
23324 | mountWrapper: function (inst, props) {
|
23325 | if (true) {
|
23326 | LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);
|
23327 |
|
23328 | var owner = inst._currentElement._owner;
|
23329 |
|
23330 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
23331 | true ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
|
23332 | didWarnValueLink = true;
|
23333 | }
|
23334 | if (props.checkedLink !== undefined && !didWarnCheckedLink) {
|
23335 | true ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
|
23336 | didWarnCheckedLink = true;
|
23337 | }
|
23338 | if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
|
23339 | true ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
23340 | didWarnCheckedDefaultChecked = true;
|
23341 | }
|
23342 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
|
23343 | true ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
23344 | didWarnValueDefaultValue = true;
|
23345 | }
|
23346 | }
|
23347 |
|
23348 | var defaultValue = props.defaultValue;
|
23349 | inst._wrapperState = {
|
23350 | initialChecked: props.checked != null ? props.checked : props.defaultChecked,
|
23351 | initialValue: props.value != null ? props.value : defaultValue,
|
23352 | listeners: null,
|
23353 | onChange: _handleChange.bind(inst)
|
23354 | };
|
23355 |
|
23356 | if (true) {
|
23357 | inst._wrapperState.controlled = isControlled(props);
|
23358 | }
|
23359 | },
|
23360 |
|
23361 | updateWrapper: function (inst) {
|
23362 | var props = inst._currentElement.props;
|
23363 |
|
23364 | if (true) {
|
23365 | var controlled = isControlled(props);
|
23366 | var owner = inst._currentElement._owner;
|
23367 |
|
23368 | if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
|
23369 | true ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
23370 | didWarnUncontrolledToControlled = true;
|
23371 | }
|
23372 | if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
|
23373 | true ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
23374 | didWarnControlledToUncontrolled = true;
|
23375 | }
|
23376 | }
|
23377 |
|
23378 |
|
23379 | var checked = props.checked;
|
23380 | if (checked != null) {
|
23381 | DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false);
|
23382 | }
|
23383 |
|
23384 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
23385 | var value = LinkedValueUtils.getValue(props);
|
23386 | if (value != null) {
|
23387 |
|
23388 |
|
23389 |
|
23390 | var newValue = '' + value;
|
23391 |
|
23392 |
|
23393 | if (newValue !== node.value) {
|
23394 | node.value = newValue;
|
23395 | }
|
23396 | } else {
|
23397 | if (props.value == null && props.defaultValue != null) {
|
23398 | node.defaultValue = '' + props.defaultValue;
|
23399 | }
|
23400 | if (props.checked == null && props.defaultChecked != null) {
|
23401 | node.defaultChecked = !!props.defaultChecked;
|
23402 | }
|
23403 | }
|
23404 | },
|
23405 |
|
23406 | postMountWrapper: function (inst) {
|
23407 | var props = inst._currentElement.props;
|
23408 |
|
23409 |
|
23410 |
|
23411 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
23412 |
|
23413 |
|
23414 |
|
23415 |
|
23416 |
|
23417 |
|
23418 |
|
23419 | switch (props.type) {
|
23420 | case 'submit':
|
23421 | case 'reset':
|
23422 | break;
|
23423 | case 'color':
|
23424 | case 'date':
|
23425 | case 'datetime':
|
23426 | case 'datetime-local':
|
23427 | case 'month':
|
23428 | case 'time':
|
23429 | case 'week':
|
23430 |
|
23431 |
|
23432 | node.value = '';
|
23433 | node.value = node.defaultValue;
|
23434 | break;
|
23435 | default:
|
23436 | node.value = node.value;
|
23437 | break;
|
23438 | }
|
23439 |
|
23440 |
|
23441 |
|
23442 |
|
23443 |
|
23444 |
|
23445 | var name = node.name;
|
23446 | if (name !== '') {
|
23447 | node.name = '';
|
23448 | }
|
23449 | node.defaultChecked = !node.defaultChecked;
|
23450 | node.defaultChecked = !node.defaultChecked;
|
23451 | if (name !== '') {
|
23452 | node.name = name;
|
23453 | }
|
23454 | }
|
23455 | };
|
23456 |
|
23457 | function _handleChange(event) {
|
23458 | var props = this._currentElement.props;
|
23459 |
|
23460 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
23461 |
|
23462 |
|
23463 |
|
23464 |
|
23465 | ReactUpdates.asap(forceUpdateIfMounted, this);
|
23466 |
|
23467 | var name = props.name;
|
23468 | if (props.type === 'radio' && name != null) {
|
23469 | var rootNode = ReactDOMComponentTree.getNodeFromInstance(this);
|
23470 | var queryRoot = rootNode;
|
23471 |
|
23472 | while (queryRoot.parentNode) {
|
23473 | queryRoot = queryRoot.parentNode;
|
23474 | }
|
23475 |
|
23476 |
|
23477 |
|
23478 |
|
23479 |
|
23480 |
|
23481 |
|
23482 | var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
|
23483 |
|
23484 | for (var i = 0; i < group.length; i++) {
|
23485 | var otherNode = group[i];
|
23486 | if (otherNode === rootNode || otherNode.form !== rootNode.form) {
|
23487 | continue;
|
23488 | }
|
23489 |
|
23490 |
|
23491 |
|
23492 |
|
23493 | var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode);
|
23494 | !otherInstance ? true ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0;
|
23495 |
|
23496 |
|
23497 |
|
23498 | ReactUpdates.asap(forceUpdateIfMounted, otherInstance);
|
23499 | }
|
23500 | }
|
23501 |
|
23502 | return returnValue;
|
23503 | }
|
23504 |
|
23505 | module.exports = ReactDOMInput;
|
23506 |
|
23507 | },
|
23508 |
|
23509 | function(module, exports, __webpack_require__) {
|
23510 |
|
23511 | |
23512 |
|
23513 |
|
23514 |
|
23515 |
|
23516 |
|
23517 |
|
23518 |
|
23519 |
|
23520 |
|
23521 | 'use strict';
|
23522 |
|
23523 | var DOMProperty = __webpack_require__(17);
|
23524 | var ReactComponentTreeHook = __webpack_require__(10);
|
23525 |
|
23526 | var warning = __webpack_require__(5);
|
23527 |
|
23528 | var warnedProperties = {};
|
23529 | var rARIA = new RegExp('^(aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
|
23530 |
|
23531 | function validateProperty(tagName, name, debugID) {
|
23532 | if (warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
|
23533 | return true;
|
23534 | }
|
23535 |
|
23536 | if (rARIA.test(name)) {
|
23537 | var lowerCasedName = name.toLowerCase();
|
23538 | var standardName = DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
|
23539 |
|
23540 |
|
23541 |
|
23542 | if (standardName == null) {
|
23543 | warnedProperties[name] = true;
|
23544 | return false;
|
23545 | }
|
23546 |
|
23547 | if (name !== standardName) {
|
23548 | true ? warning(false, 'Unknown ARIA attribute %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
23549 | warnedProperties[name] = true;
|
23550 | return true;
|
23551 | }
|
23552 | }
|
23553 |
|
23554 | return true;
|
23555 | }
|
23556 |
|
23557 | function warnInvalidARIAProps(debugID, element) {
|
23558 | var invalidProps = [];
|
23559 |
|
23560 | for (var key in element.props) {
|
23561 | var isValid = validateProperty(element.type, key, debugID);
|
23562 | if (!isValid) {
|
23563 | invalidProps.push(key);
|
23564 | }
|
23565 | }
|
23566 |
|
23567 | var unknownPropString = invalidProps.map(function (prop) {
|
23568 | return '`' + prop + '`';
|
23569 | }).join(', ');
|
23570 |
|
23571 | if (invalidProps.length === 1) {
|
23572 | true ? warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
23573 | } else if (invalidProps.length > 1) {
|
23574 | true ? warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
23575 | }
|
23576 | }
|
23577 |
|
23578 | function handleElement(debugID, element) {
|
23579 | if (element == null || typeof element.type !== 'string') {
|
23580 | return;
|
23581 | }
|
23582 | if (element.type.indexOf('-') >= 0 || element.props.is) {
|
23583 | return;
|
23584 | }
|
23585 |
|
23586 | warnInvalidARIAProps(debugID, element);
|
23587 | }
|
23588 |
|
23589 | var ReactDOMInvalidARIAHook = {
|
23590 | onBeforeMountComponent: function (debugID, element) {
|
23591 | if (true) {
|
23592 | handleElement(debugID, element);
|
23593 | }
|
23594 | },
|
23595 | onBeforeUpdateComponent: function (debugID, element) {
|
23596 | if (true) {
|
23597 | handleElement(debugID, element);
|
23598 | }
|
23599 | }
|
23600 | };
|
23601 |
|
23602 | module.exports = ReactDOMInvalidARIAHook;
|
23603 |
|
23604 | },
|
23605 |
|
23606 | function(module, exports, __webpack_require__) {
|
23607 |
|
23608 | |
23609 |
|
23610 |
|
23611 |
|
23612 |
|
23613 |
|
23614 |
|
23615 |
|
23616 |
|
23617 |
|
23618 | 'use strict';
|
23619 |
|
23620 | var ReactComponentTreeHook = __webpack_require__(10);
|
23621 |
|
23622 | var warning = __webpack_require__(5);
|
23623 |
|
23624 | var didWarnValueNull = false;
|
23625 |
|
23626 | function handleElement(debugID, element) {
|
23627 | if (element == null) {
|
23628 | return;
|
23629 | }
|
23630 | if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') {
|
23631 | return;
|
23632 | }
|
23633 | if (element.props != null && element.props.value === null && !didWarnValueNull) {
|
23634 | true ? warning(false, '`value` prop on `%s` should not be null. ' + 'Consider using the empty string to clear the component or `undefined` ' + 'for uncontrolled components.%s', element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
23635 |
|
23636 | didWarnValueNull = true;
|
23637 | }
|
23638 | }
|
23639 |
|
23640 | var ReactDOMNullInputValuePropHook = {
|
23641 | onBeforeMountComponent: function (debugID, element) {
|
23642 | handleElement(debugID, element);
|
23643 | },
|
23644 | onBeforeUpdateComponent: function (debugID, element) {
|
23645 | handleElement(debugID, element);
|
23646 | }
|
23647 | };
|
23648 |
|
23649 | module.exports = ReactDOMNullInputValuePropHook;
|
23650 |
|
23651 | },
|
23652 |
|
23653 | function(module, exports, __webpack_require__) {
|
23654 |
|
23655 | |
23656 |
|
23657 |
|
23658 |
|
23659 |
|
23660 |
|
23661 |
|
23662 |
|
23663 |
|
23664 |
|
23665 | 'use strict';
|
23666 |
|
23667 | var _assign = __webpack_require__(7);
|
23668 |
|
23669 | var React = __webpack_require__(15);
|
23670 | var ReactDOMComponentTree = __webpack_require__(8);
|
23671 | var ReactDOMSelect = __webpack_require__(76);
|
23672 |
|
23673 | var warning = __webpack_require__(5);
|
23674 | var didWarnInvalidOptionChildren = false;
|
23675 |
|
23676 | function flattenChildren(children) {
|
23677 | var content = '';
|
23678 |
|
23679 |
|
23680 |
|
23681 | React.Children.forEach(children, function (child) {
|
23682 | if (child == null) {
|
23683 | return;
|
23684 | }
|
23685 | if (typeof child === 'string' || typeof child === 'number') {
|
23686 | content += child;
|
23687 | } else if (!didWarnInvalidOptionChildren) {
|
23688 | didWarnInvalidOptionChildren = true;
|
23689 | true ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0;
|
23690 | }
|
23691 | });
|
23692 |
|
23693 | return content;
|
23694 | }
|
23695 |
|
23696 | |
23697 |
|
23698 |
|
23699 | var ReactDOMOption = {
|
23700 | mountWrapper: function (inst, props, hostParent) {
|
23701 |
|
23702 | if (true) {
|
23703 | true ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0;
|
23704 | }
|
23705 |
|
23706 |
|
23707 | var selectValue = null;
|
23708 | if (hostParent != null) {
|
23709 | var selectParent = hostParent;
|
23710 |
|
23711 | if (selectParent._tag === 'optgroup') {
|
23712 | selectParent = selectParent._hostParent;
|
23713 | }
|
23714 |
|
23715 | if (selectParent != null && selectParent._tag === 'select') {
|
23716 | selectValue = ReactDOMSelect.getSelectValueContext(selectParent);
|
23717 | }
|
23718 | }
|
23719 |
|
23720 |
|
23721 |
|
23722 | var selected = null;
|
23723 | if (selectValue != null) {
|
23724 | var value;
|
23725 | if (props.value != null) {
|
23726 | value = props.value + '';
|
23727 | } else {
|
23728 | value = flattenChildren(props.children);
|
23729 | }
|
23730 | selected = false;
|
23731 | if (Array.isArray(selectValue)) {
|
23732 |
|
23733 | for (var i = 0; i < selectValue.length; i++) {
|
23734 | if ('' + selectValue[i] === value) {
|
23735 | selected = true;
|
23736 | break;
|
23737 | }
|
23738 | }
|
23739 | } else {
|
23740 | selected = '' + selectValue === value;
|
23741 | }
|
23742 | }
|
23743 |
|
23744 | inst._wrapperState = { selected: selected };
|
23745 | },
|
23746 |
|
23747 | postMountWrapper: function (inst) {
|
23748 |
|
23749 | var props = inst._currentElement.props;
|
23750 | if (props.value != null) {
|
23751 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
23752 | node.setAttribute('value', props.value);
|
23753 | }
|
23754 | },
|
23755 |
|
23756 | getHostProps: function (inst, props) {
|
23757 | var hostProps = _assign({ selected: undefined, children: undefined }, props);
|
23758 |
|
23759 |
|
23760 |
|
23761 | if (inst._wrapperState.selected != null) {
|
23762 | hostProps.selected = inst._wrapperState.selected;
|
23763 | }
|
23764 |
|
23765 | var content = flattenChildren(props.children);
|
23766 |
|
23767 | if (content) {
|
23768 | hostProps.children = content;
|
23769 | }
|
23770 |
|
23771 | return hostProps;
|
23772 | }
|
23773 |
|
23774 | };
|
23775 |
|
23776 | module.exports = ReactDOMOption;
|
23777 |
|
23778 | },
|
23779 |
|
23780 | function(module, exports, __webpack_require__) {
|
23781 |
|
23782 | |
23783 |
|
23784 |
|
23785 |
|
23786 |
|
23787 |
|
23788 |
|
23789 |
|
23790 |
|
23791 |
|
23792 | 'use strict';
|
23793 |
|
23794 | var ExecutionEnvironment = __webpack_require__(9);
|
23795 |
|
23796 | var getNodeForCharacterOffset = __webpack_require__(250);
|
23797 | var getTextContentAccessor = __webpack_require__(92);
|
23798 |
|
23799 | |
23800 |
|
23801 |
|
23802 |
|
23803 |
|
23804 | function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
|
23805 | return anchorNode === focusNode && anchorOffset === focusOffset;
|
23806 | }
|
23807 |
|
23808 | |
23809 |
|
23810 |
|
23811 |
|
23812 |
|
23813 |
|
23814 |
|
23815 |
|
23816 |
|
23817 |
|
23818 |
|
23819 |
|
23820 |
|
23821 |
|
23822 | function getIEOffsets(node) {
|
23823 | var selection = document.selection;
|
23824 | var selectedRange = selection.createRange();
|
23825 | var selectedLength = selectedRange.text.length;
|
23826 |
|
23827 |
|
23828 | var fromStart = selectedRange.duplicate();
|
23829 | fromStart.moveToElementText(node);
|
23830 | fromStart.setEndPoint('EndToStart', selectedRange);
|
23831 |
|
23832 | var startOffset = fromStart.text.length;
|
23833 | var endOffset = startOffset + selectedLength;
|
23834 |
|
23835 | return {
|
23836 | start: startOffset,
|
23837 | end: endOffset
|
23838 | };
|
23839 | }
|
23840 |
|
23841 | |
23842 |
|
23843 |
|
23844 |
|
23845 | function getModernOffsets(node) {
|
23846 | var selection = window.getSelection && window.getSelection();
|
23847 |
|
23848 | if (!selection || selection.rangeCount === 0) {
|
23849 | return null;
|
23850 | }
|
23851 |
|
23852 | var anchorNode = selection.anchorNode;
|
23853 | var anchorOffset = selection.anchorOffset;
|
23854 | var focusNode = selection.focusNode;
|
23855 | var focusOffset = selection.focusOffset;
|
23856 |
|
23857 | var currentRange = selection.getRangeAt(0);
|
23858 |
|
23859 |
|
23860 |
|
23861 |
|
23862 |
|
23863 |
|
23864 |
|
23865 |
|
23866 | try {
|
23867 |
|
23868 | currentRange.startContainer.nodeType;
|
23869 | currentRange.endContainer.nodeType;
|
23870 |
|
23871 | } catch (e) {
|
23872 | return null;
|
23873 | }
|
23874 |
|
23875 |
|
23876 |
|
23877 |
|
23878 | var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);
|
23879 |
|
23880 | var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;
|
23881 |
|
23882 | var tempRange = currentRange.cloneRange();
|
23883 | tempRange.selectNodeContents(node);
|
23884 | tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
|
23885 |
|
23886 | var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);
|
23887 |
|
23888 | var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;
|
23889 | var end = start + rangeLength;
|
23890 |
|
23891 |
|
23892 | var detectionRange = document.createRange();
|
23893 | detectionRange.setStart(anchorNode, anchorOffset);
|
23894 | detectionRange.setEnd(focusNode, focusOffset);
|
23895 | var isBackward = detectionRange.collapsed;
|
23896 |
|
23897 | return {
|
23898 | start: isBackward ? end : start,
|
23899 | end: isBackward ? start : end
|
23900 | };
|
23901 | }
|
23902 |
|
23903 | |
23904 |
|
23905 |
|
23906 |
|
23907 | function setIEOffsets(node, offsets) {
|
23908 | var range = document.selection.createRange().duplicate();
|
23909 | var start, end;
|
23910 |
|
23911 | if (offsets.end === undefined) {
|
23912 | start = offsets.start;
|
23913 | end = start;
|
23914 | } else if (offsets.start > offsets.end) {
|
23915 | start = offsets.end;
|
23916 | end = offsets.start;
|
23917 | } else {
|
23918 | start = offsets.start;
|
23919 | end = offsets.end;
|
23920 | }
|
23921 |
|
23922 | range.moveToElementText(node);
|
23923 | range.moveStart('character', start);
|
23924 | range.setEndPoint('EndToStart', range);
|
23925 | range.moveEnd('character', end - start);
|
23926 | range.select();
|
23927 | }
|
23928 |
|
23929 | |
23930 |
|
23931 |
|
23932 |
|
23933 |
|
23934 |
|
23935 |
|
23936 |
|
23937 |
|
23938 |
|
23939 |
|
23940 |
|
23941 | function setModernOffsets(node, offsets) {
|
23942 | if (!window.getSelection) {
|
23943 | return;
|
23944 | }
|
23945 |
|
23946 | var selection = window.getSelection();
|
23947 | var length = node[getTextContentAccessor()].length;
|
23948 | var start = Math.min(offsets.start, length);
|
23949 | var end = offsets.end === undefined ? start : Math.min(offsets.end, length);
|
23950 |
|
23951 |
|
23952 |
|
23953 | if (!selection.extend && start > end) {
|
23954 | var temp = end;
|
23955 | end = start;
|
23956 | start = temp;
|
23957 | }
|
23958 |
|
23959 | var startMarker = getNodeForCharacterOffset(node, start);
|
23960 | var endMarker = getNodeForCharacterOffset(node, end);
|
23961 |
|
23962 | if (startMarker && endMarker) {
|
23963 | var range = document.createRange();
|
23964 | range.setStart(startMarker.node, startMarker.offset);
|
23965 | selection.removeAllRanges();
|
23966 |
|
23967 | if (start > end) {
|
23968 | selection.addRange(range);
|
23969 | selection.extend(endMarker.node, endMarker.offset);
|
23970 | } else {
|
23971 | range.setEnd(endMarker.node, endMarker.offset);
|
23972 | selection.addRange(range);
|
23973 | }
|
23974 | }
|
23975 | }
|
23976 |
|
23977 | var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);
|
23978 |
|
23979 | var ReactDOMSelection = {
|
23980 | |
23981 |
|
23982 |
|
23983 | getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
|
23984 |
|
23985 | |
23986 |
|
23987 |
|
23988 |
|
23989 | setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
|
23990 | };
|
23991 |
|
23992 | module.exports = ReactDOMSelection;
|
23993 |
|
23994 | },
|
23995 |
|
23996 | function(module, exports, __webpack_require__) {
|
23997 |
|
23998 | |
23999 |
|
24000 |
|
24001 |
|
24002 |
|
24003 |
|
24004 |
|
24005 |
|
24006 |
|
24007 |
|
24008 | 'use strict';
|
24009 |
|
24010 | var _prodInvariant = __webpack_require__(6),
|
24011 | _assign = __webpack_require__(7);
|
24012 |
|
24013 | var DOMChildrenOperations = __webpack_require__(40);
|
24014 | var DOMLazyTree = __webpack_require__(25);
|
24015 | var ReactDOMComponentTree = __webpack_require__(8);
|
24016 |
|
24017 | var escapeTextContentForBrowser = __webpack_require__(36);
|
24018 | var invariant = __webpack_require__(4);
|
24019 | var validateDOMNesting = __webpack_require__(54);
|
24020 |
|
24021 | |
24022 |
|
24023 |
|
24024 |
|
24025 |
|
24026 |
|
24027 |
|
24028 |
|
24029 |
|
24030 |
|
24031 |
|
24032 |
|
24033 |
|
24034 |
|
24035 |
|
24036 | var ReactDOMTextComponent = function (text) {
|
24037 |
|
24038 | this._currentElement = text;
|
24039 | this._stringText = '' + text;
|
24040 |
|
24041 | this._hostNode = null;
|
24042 | this._hostParent = null;
|
24043 |
|
24044 |
|
24045 | this._domID = 0;
|
24046 | this._mountIndex = 0;
|
24047 | this._closingComment = null;
|
24048 | this._commentNodes = null;
|
24049 | };
|
24050 |
|
24051 | _assign(ReactDOMTextComponent.prototype, {
|
24052 |
|
24053 | |
24054 |
|
24055 |
|
24056 |
|
24057 |
|
24058 |
|
24059 |
|
24060 |
|
24061 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
24062 | if (true) {
|
24063 | var parentInfo;
|
24064 | if (hostParent != null) {
|
24065 | parentInfo = hostParent._ancestorInfo;
|
24066 | } else if (hostContainerInfo != null) {
|
24067 | parentInfo = hostContainerInfo._ancestorInfo;
|
24068 | }
|
24069 | if (parentInfo) {
|
24070 |
|
24071 |
|
24072 | validateDOMNesting(null, this._stringText, this, parentInfo);
|
24073 | }
|
24074 | }
|
24075 |
|
24076 | var domID = hostContainerInfo._idCounter++;
|
24077 | var openingValue = ' react-text: ' + domID + ' ';
|
24078 | var closingValue = ' /react-text ';
|
24079 | this._domID = domID;
|
24080 | this._hostParent = hostParent;
|
24081 | if (transaction.useCreateElement) {
|
24082 | var ownerDocument = hostContainerInfo._ownerDocument;
|
24083 | var openingComment = ownerDocument.createComment(openingValue);
|
24084 | var closingComment = ownerDocument.createComment(closingValue);
|
24085 | var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());
|
24086 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment));
|
24087 | if (this._stringText) {
|
24088 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText)));
|
24089 | }
|
24090 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment));
|
24091 | ReactDOMComponentTree.precacheNode(this, openingComment);
|
24092 | this._closingComment = closingComment;
|
24093 | return lazyTree;
|
24094 | } else {
|
24095 | var escapedText = escapeTextContentForBrowser(this._stringText);
|
24096 |
|
24097 | if (transaction.renderToStaticMarkup) {
|
24098 |
|
24099 |
|
24100 |
|
24101 | return escapedText;
|
24102 | }
|
24103 |
|
24104 | return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->';
|
24105 | }
|
24106 | },
|
24107 |
|
24108 | |
24109 |
|
24110 |
|
24111 |
|
24112 |
|
24113 |
|
24114 |
|
24115 | receiveComponent: function (nextText, transaction) {
|
24116 | if (nextText !== this._currentElement) {
|
24117 | this._currentElement = nextText;
|
24118 | var nextStringText = '' + nextText;
|
24119 | if (nextStringText !== this._stringText) {
|
24120 |
|
24121 |
|
24122 |
|
24123 | this._stringText = nextStringText;
|
24124 | var commentNodes = this.getHostNode();
|
24125 | DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);
|
24126 | }
|
24127 | }
|
24128 | },
|
24129 |
|
24130 | getHostNode: function () {
|
24131 | var hostNode = this._commentNodes;
|
24132 | if (hostNode) {
|
24133 | return hostNode;
|
24134 | }
|
24135 | if (!this._closingComment) {
|
24136 | var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);
|
24137 | var node = openingComment.nextSibling;
|
24138 | while (true) {
|
24139 | !(node != null) ? true ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0;
|
24140 | if (node.nodeType === 8 && node.nodeValue === ' /react-text ') {
|
24141 | this._closingComment = node;
|
24142 | break;
|
24143 | }
|
24144 | node = node.nextSibling;
|
24145 | }
|
24146 | }
|
24147 | hostNode = [this._hostNode, this._closingComment];
|
24148 | this._commentNodes = hostNode;
|
24149 | return hostNode;
|
24150 | },
|
24151 |
|
24152 | unmountComponent: function () {
|
24153 | this._closingComment = null;
|
24154 | this._commentNodes = null;
|
24155 | ReactDOMComponentTree.uncacheNode(this);
|
24156 | }
|
24157 |
|
24158 | });
|
24159 |
|
24160 | module.exports = ReactDOMTextComponent;
|
24161 |
|
24162 | },
|
24163 |
|
24164 | function(module, exports, __webpack_require__) {
|
24165 |
|
24166 | |
24167 |
|
24168 |
|
24169 |
|
24170 |
|
24171 |
|
24172 |
|
24173 |
|
24174 |
|
24175 |
|
24176 | 'use strict';
|
24177 |
|
24178 | var _prodInvariant = __webpack_require__(6),
|
24179 | _assign = __webpack_require__(7);
|
24180 |
|
24181 | var LinkedValueUtils = __webpack_require__(44);
|
24182 | var ReactDOMComponentTree = __webpack_require__(8);
|
24183 | var ReactUpdates = __webpack_require__(13);
|
24184 |
|
24185 | var invariant = __webpack_require__(4);
|
24186 | var warning = __webpack_require__(5);
|
24187 |
|
24188 | var didWarnValueLink = false;
|
24189 | var didWarnValDefaultVal = false;
|
24190 |
|
24191 | function forceUpdateIfMounted() {
|
24192 | if (this._rootNodeID) {
|
24193 |
|
24194 | ReactDOMTextarea.updateWrapper(this);
|
24195 | }
|
24196 | }
|
24197 |
|
24198 | |
24199 |
|
24200 |
|
24201 |
|
24202 |
|
24203 |
|
24204 |
|
24205 |
|
24206 |
|
24207 |
|
24208 |
|
24209 |
|
24210 |
|
24211 |
|
24212 |
|
24213 | var ReactDOMTextarea = {
|
24214 | getHostProps: function (inst, props) {
|
24215 | !(props.dangerouslySetInnerHTML == null) ? true ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0;
|
24216 |
|
24217 |
|
24218 |
|
24219 |
|
24220 |
|
24221 |
|
24222 | var hostProps = _assign({}, props, {
|
24223 | value: undefined,
|
24224 | defaultValue: undefined,
|
24225 | children: '' + inst._wrapperState.initialValue,
|
24226 | onChange: inst._wrapperState.onChange
|
24227 | });
|
24228 |
|
24229 | return hostProps;
|
24230 | },
|
24231 |
|
24232 | mountWrapper: function (inst, props) {
|
24233 | if (true) {
|
24234 | LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);
|
24235 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
24236 | true ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0;
|
24237 | didWarnValueLink = true;
|
24238 | }
|
24239 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
|
24240 | true ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;
|
24241 | didWarnValDefaultVal = true;
|
24242 | }
|
24243 | }
|
24244 |
|
24245 | var value = LinkedValueUtils.getValue(props);
|
24246 | var initialValue = value;
|
24247 |
|
24248 |
|
24249 | if (value == null) {
|
24250 | var defaultValue = props.defaultValue;
|
24251 |
|
24252 | var children = props.children;
|
24253 | if (children != null) {
|
24254 | if (true) {
|
24255 | true ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0;
|
24256 | }
|
24257 | !(defaultValue == null) ? true ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0;
|
24258 | if (Array.isArray(children)) {
|
24259 | !(children.length <= 1) ? true ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0;
|
24260 | children = children[0];
|
24261 | }
|
24262 |
|
24263 | defaultValue = '' + children;
|
24264 | }
|
24265 | if (defaultValue == null) {
|
24266 | defaultValue = '';
|
24267 | }
|
24268 | initialValue = defaultValue;
|
24269 | }
|
24270 |
|
24271 | inst._wrapperState = {
|
24272 | initialValue: '' + initialValue,
|
24273 | listeners: null,
|
24274 | onChange: _handleChange.bind(inst)
|
24275 | };
|
24276 | },
|
24277 |
|
24278 | updateWrapper: function (inst) {
|
24279 | var props = inst._currentElement.props;
|
24280 |
|
24281 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
24282 | var value = LinkedValueUtils.getValue(props);
|
24283 | if (value != null) {
|
24284 |
|
24285 |
|
24286 | var newValue = '' + value;
|
24287 |
|
24288 |
|
24289 | if (newValue !== node.value) {
|
24290 | node.value = newValue;
|
24291 | }
|
24292 | if (props.defaultValue == null) {
|
24293 | node.defaultValue = newValue;
|
24294 | }
|
24295 | }
|
24296 | if (props.defaultValue != null) {
|
24297 | node.defaultValue = props.defaultValue;
|
24298 | }
|
24299 | },
|
24300 |
|
24301 | postMountWrapper: function (inst) {
|
24302 |
|
24303 |
|
24304 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
24305 |
|
24306 |
|
24307 | node.value = node.textContent;
|
24308 | }
|
24309 | };
|
24310 |
|
24311 | function _handleChange(event) {
|
24312 | var props = this._currentElement.props;
|
24313 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
24314 | ReactUpdates.asap(forceUpdateIfMounted, this);
|
24315 | return returnValue;
|
24316 | }
|
24317 |
|
24318 | module.exports = ReactDOMTextarea;
|
24319 |
|
24320 | },
|
24321 |
|
24322 | function(module, exports, __webpack_require__) {
|
24323 |
|
24324 | |
24325 |
|
24326 |
|
24327 |
|
24328 |
|
24329 |
|
24330 |
|
24331 |
|
24332 |
|
24333 |
|
24334 | 'use strict';
|
24335 |
|
24336 | var _prodInvariant = __webpack_require__(6);
|
24337 |
|
24338 | var invariant = __webpack_require__(4);
|
24339 |
|
24340 | |
24341 |
|
24342 |
|
24343 |
|
24344 | function getLowestCommonAncestor(instA, instB) {
|
24345 | !('_hostNode' in instA) ? true ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
24346 | !('_hostNode' in instB) ? true ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
24347 |
|
24348 | var depthA = 0;
|
24349 | for (var tempA = instA; tempA; tempA = tempA._hostParent) {
|
24350 | depthA++;
|
24351 | }
|
24352 | var depthB = 0;
|
24353 | for (var tempB = instB; tempB; tempB = tempB._hostParent) {
|
24354 | depthB++;
|
24355 | }
|
24356 |
|
24357 |
|
24358 | while (depthA - depthB > 0) {
|
24359 | instA = instA._hostParent;
|
24360 | depthA--;
|
24361 | }
|
24362 |
|
24363 |
|
24364 | while (depthB - depthA > 0) {
|
24365 | instB = instB._hostParent;
|
24366 | depthB--;
|
24367 | }
|
24368 |
|
24369 |
|
24370 | var depth = depthA;
|
24371 | while (depth--) {
|
24372 | if (instA === instB) {
|
24373 | return instA;
|
24374 | }
|
24375 | instA = instA._hostParent;
|
24376 | instB = instB._hostParent;
|
24377 | }
|
24378 | return null;
|
24379 | }
|
24380 |
|
24381 | |
24382 |
|
24383 |
|
24384 | function isAncestor(instA, instB) {
|
24385 | !('_hostNode' in instA) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
|
24386 | !('_hostNode' in instB) ? true ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
|
24387 |
|
24388 | while (instB) {
|
24389 | if (instB === instA) {
|
24390 | return true;
|
24391 | }
|
24392 | instB = instB._hostParent;
|
24393 | }
|
24394 | return false;
|
24395 | }
|
24396 |
|
24397 | |
24398 |
|
24399 |
|
24400 | function getParentInstance(inst) {
|
24401 | !('_hostNode' in inst) ? true ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0;
|
24402 |
|
24403 | return inst._hostParent;
|
24404 | }
|
24405 |
|
24406 | |
24407 |
|
24408 |
|
24409 | function traverseTwoPhase(inst, fn, arg) {
|
24410 | var path = [];
|
24411 | while (inst) {
|
24412 | path.push(inst);
|
24413 | inst = inst._hostParent;
|
24414 | }
|
24415 | var i;
|
24416 | for (i = path.length; i-- > 0;) {
|
24417 | fn(path[i], 'captured', arg);
|
24418 | }
|
24419 | for (i = 0; i < path.length; i++) {
|
24420 | fn(path[i], 'bubbled', arg);
|
24421 | }
|
24422 | }
|
24423 |
|
24424 | |
24425 |
|
24426 |
|
24427 |
|
24428 |
|
24429 |
|
24430 |
|
24431 | function traverseEnterLeave(from, to, fn, argFrom, argTo) {
|
24432 | var common = from && to ? getLowestCommonAncestor(from, to) : null;
|
24433 | var pathFrom = [];
|
24434 | while (from && from !== common) {
|
24435 | pathFrom.push(from);
|
24436 | from = from._hostParent;
|
24437 | }
|
24438 | var pathTo = [];
|
24439 | while (to && to !== common) {
|
24440 | pathTo.push(to);
|
24441 | to = to._hostParent;
|
24442 | }
|
24443 | var i;
|
24444 | for (i = 0; i < pathFrom.length; i++) {
|
24445 | fn(pathFrom[i], 'bubbled', argFrom);
|
24446 | }
|
24447 | for (i = pathTo.length; i-- > 0;) {
|
24448 | fn(pathTo[i], 'captured', argTo);
|
24449 | }
|
24450 | }
|
24451 |
|
24452 | module.exports = {
|
24453 | isAncestor: isAncestor,
|
24454 | getLowestCommonAncestor: getLowestCommonAncestor,
|
24455 | getParentInstance: getParentInstance,
|
24456 | traverseTwoPhase: traverseTwoPhase,
|
24457 | traverseEnterLeave: traverseEnterLeave
|
24458 | };
|
24459 |
|
24460 | },
|
24461 |
|
24462 | function(module, exports, __webpack_require__) {
|
24463 |
|
24464 | |
24465 |
|
24466 |
|
24467 |
|
24468 |
|
24469 |
|
24470 |
|
24471 |
|
24472 |
|
24473 |
|
24474 | 'use strict';
|
24475 |
|
24476 | var DOMProperty = __webpack_require__(17);
|
24477 | var EventPluginRegistry = __webpack_require__(29);
|
24478 | var ReactComponentTreeHook = __webpack_require__(10);
|
24479 |
|
24480 | var warning = __webpack_require__(5);
|
24481 |
|
24482 | if (true) {
|
24483 | var reactProps = {
|
24484 | children: true,
|
24485 | dangerouslySetInnerHTML: true,
|
24486 | key: true,
|
24487 | ref: true,
|
24488 |
|
24489 | autoFocus: true,
|
24490 | defaultValue: true,
|
24491 | valueLink: true,
|
24492 | defaultChecked: true,
|
24493 | checkedLink: true,
|
24494 | innerHTML: true,
|
24495 | suppressContentEditableWarning: true,
|
24496 | onFocusIn: true,
|
24497 | onFocusOut: true
|
24498 | };
|
24499 | var warnedProperties = {};
|
24500 |
|
24501 | var validateProperty = function (tagName, name, debugID) {
|
24502 | if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) {
|
24503 | return true;
|
24504 | }
|
24505 | if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
|
24506 | return true;
|
24507 | }
|
24508 | if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) {
|
24509 | return true;
|
24510 | }
|
24511 | warnedProperties[name] = true;
|
24512 | var lowerCasedName = name.toLowerCase();
|
24513 |
|
24514 |
|
24515 | var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
|
24516 |
|
24517 | var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] : null;
|
24518 |
|
24519 | if (standardName != null) {
|
24520 | true ? warning(false, 'Unknown DOM property %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
24521 | return true;
|
24522 | } else if (registrationName != null) {
|
24523 | true ? warning(false, 'Unknown event handler property %s. Did you mean `%s`?%s', name, registrationName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
24524 | return true;
|
24525 | } else {
|
24526 |
|
24527 |
|
24528 |
|
24529 |
|
24530 | return false;
|
24531 | }
|
24532 | };
|
24533 | }
|
24534 |
|
24535 | var warnUnknownProperties = function (debugID, element) {
|
24536 | var unknownProps = [];
|
24537 | for (var key in element.props) {
|
24538 | var isValid = validateProperty(element.type, key, debugID);
|
24539 | if (!isValid) {
|
24540 | unknownProps.push(key);
|
24541 | }
|
24542 | }
|
24543 |
|
24544 | var unknownPropString = unknownProps.map(function (prop) {
|
24545 | return '`' + prop + '`';
|
24546 | }).join(', ');
|
24547 |
|
24548 | if (unknownProps.length === 1) {
|
24549 | true ? warning(false, 'Unknown prop %s on <%s> tag. Remove this prop from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
24550 | } else if (unknownProps.length > 1) {
|
24551 | true ? warning(false, 'Unknown props %s on <%s> tag. Remove these props from the element. ' + 'For details, see https://fb.me/react-unknown-prop%s', unknownPropString, element.type, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
|
24552 | }
|
24553 | };
|
24554 |
|
24555 | function handleElement(debugID, element) {
|
24556 | if (element == null || typeof element.type !== 'string') {
|
24557 | return;
|
24558 | }
|
24559 | if (element.type.indexOf('-') >= 0 || element.props.is) {
|
24560 | return;
|
24561 | }
|
24562 | warnUnknownProperties(debugID, element);
|
24563 | }
|
24564 |
|
24565 | var ReactDOMUnknownPropertyHook = {
|
24566 | onBeforeMountComponent: function (debugID, element) {
|
24567 | handleElement(debugID, element);
|
24568 | },
|
24569 | onBeforeUpdateComponent: function (debugID, element) {
|
24570 | handleElement(debugID, element);
|
24571 | }
|
24572 | };
|
24573 |
|
24574 | module.exports = ReactDOMUnknownPropertyHook;
|
24575 |
|
24576 | },
|
24577 |
|
24578 | function(module, exports, __webpack_require__) {
|
24579 |
|
24580 | |
24581 |
|
24582 |
|
24583 |
|
24584 |
|
24585 |
|
24586 |
|
24587 |
|
24588 |
|
24589 |
|
24590 | 'use strict';
|
24591 |
|
24592 | var _assign = __webpack_require__(7);
|
24593 |
|
24594 | var ReactUpdates = __webpack_require__(13);
|
24595 | var Transaction = __webpack_require__(35);
|
24596 |
|
24597 | var emptyFunction = __webpack_require__(11);
|
24598 |
|
24599 | var RESET_BATCHED_UPDATES = {
|
24600 | initialize: emptyFunction,
|
24601 | close: function () {
|
24602 | ReactDefaultBatchingStrategy.isBatchingUpdates = false;
|
24603 | }
|
24604 | };
|
24605 |
|
24606 | var FLUSH_BATCHED_UPDATES = {
|
24607 | initialize: emptyFunction,
|
24608 | close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
|
24609 | };
|
24610 |
|
24611 | var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];
|
24612 |
|
24613 | function ReactDefaultBatchingStrategyTransaction() {
|
24614 | this.reinitializeTransaction();
|
24615 | }
|
24616 |
|
24617 | _assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, {
|
24618 | getTransactionWrappers: function () {
|
24619 | return TRANSACTION_WRAPPERS;
|
24620 | }
|
24621 | });
|
24622 |
|
24623 | var transaction = new ReactDefaultBatchingStrategyTransaction();
|
24624 |
|
24625 | var ReactDefaultBatchingStrategy = {
|
24626 | isBatchingUpdates: false,
|
24627 |
|
24628 | |
24629 |
|
24630 |
|
24631 |
|
24632 | batchedUpdates: function (callback, a, b, c, d, e) {
|
24633 | var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
|
24634 |
|
24635 | ReactDefaultBatchingStrategy.isBatchingUpdates = true;
|
24636 |
|
24637 |
|
24638 | if (alreadyBatchingUpdates) {
|
24639 | return callback(a, b, c, d, e);
|
24640 | } else {
|
24641 | return transaction.perform(callback, null, a, b, c, d, e);
|
24642 | }
|
24643 | }
|
24644 | };
|
24645 |
|
24646 | module.exports = ReactDefaultBatchingStrategy;
|
24647 |
|
24648 | },
|
24649 |
|
24650 | function(module, exports) {
|
24651 |
|
24652 | |
24653 |
|
24654 |
|
24655 |
|
24656 |
|
24657 |
|
24658 |
|
24659 |
|
24660 |
|
24661 |
|
24662 |
|
24663 | 'use strict';
|
24664 |
|
24665 |
|
24666 |
|
24667 |
|
24668 | var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
24669 |
|
24670 | module.exports = REACT_ELEMENT_TYPE;
|
24671 |
|
24672 | },
|
24673 |
|
24674 | function(module, exports, __webpack_require__) {
|
24675 |
|
24676 | |
24677 |
|
24678 |
|
24679 |
|
24680 |
|
24681 |
|
24682 |
|
24683 |
|
24684 |
|
24685 |
|
24686 | 'use strict';
|
24687 |
|
24688 | var EventPluginHub = __webpack_require__(26);
|
24689 |
|
24690 | function runEventQueueInBatch(events) {
|
24691 | EventPluginHub.enqueueEvents(events);
|
24692 | EventPluginHub.processEventQueue(false);
|
24693 | }
|
24694 |
|
24695 | var ReactEventEmitterMixin = {
|
24696 |
|
24697 | |
24698 |
|
24699 |
|
24700 |
|
24701 | handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
24702 | var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
|
24703 | runEventQueueInBatch(events);
|
24704 | }
|
24705 | };
|
24706 |
|
24707 | module.exports = ReactEventEmitterMixin;
|
24708 |
|
24709 | },
|
24710 |
|
24711 | function(module, exports, __webpack_require__) {
|
24712 |
|
24713 | |
24714 |
|
24715 |
|
24716 |
|
24717 |
|
24718 |
|
24719 |
|
24720 |
|
24721 |
|
24722 |
|
24723 | 'use strict';
|
24724 |
|
24725 | var _assign = __webpack_require__(7);
|
24726 |
|
24727 | var EventListener = __webpack_require__(67);
|
24728 | var ExecutionEnvironment = __webpack_require__(9);
|
24729 | var PooledClass = __webpack_require__(19);
|
24730 | var ReactDOMComponentTree = __webpack_require__(8);
|
24731 | var ReactUpdates = __webpack_require__(13);
|
24732 |
|
24733 | var getEventTarget = __webpack_require__(51);
|
24734 | var getUnboundedScrollPosition = __webpack_require__(173);
|
24735 |
|
24736 | |
24737 |
|
24738 |
|
24739 |
|
24740 |
|
24741 | function findParent(inst) {
|
24742 |
|
24743 |
|
24744 |
|
24745 | while (inst._hostParent) {
|
24746 | inst = inst._hostParent;
|
24747 | }
|
24748 | var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst);
|
24749 | var container = rootNode.parentNode;
|
24750 | return ReactDOMComponentTree.getClosestInstanceFromNode(container);
|
24751 | }
|
24752 |
|
24753 |
|
24754 | function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
|
24755 | this.topLevelType = topLevelType;
|
24756 | this.nativeEvent = nativeEvent;
|
24757 | this.ancestors = [];
|
24758 | }
|
24759 | _assign(TopLevelCallbackBookKeeping.prototype, {
|
24760 | destructor: function () {
|
24761 | this.topLevelType = null;
|
24762 | this.nativeEvent = null;
|
24763 | this.ancestors.length = 0;
|
24764 | }
|
24765 | });
|
24766 | PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
|
24767 |
|
24768 | function handleTopLevelImpl(bookKeeping) {
|
24769 | var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent);
|
24770 | var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget);
|
24771 |
|
24772 |
|
24773 |
|
24774 |
|
24775 |
|
24776 | var ancestor = targetInst;
|
24777 | do {
|
24778 | bookKeeping.ancestors.push(ancestor);
|
24779 | ancestor = ancestor && findParent(ancestor);
|
24780 | } while (ancestor);
|
24781 |
|
24782 | for (var i = 0; i < bookKeeping.ancestors.length; i++) {
|
24783 | targetInst = bookKeeping.ancestors[i];
|
24784 | ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
|
24785 | }
|
24786 | }
|
24787 |
|
24788 | function scrollValueMonitor(cb) {
|
24789 | var scrollPosition = getUnboundedScrollPosition(window);
|
24790 | cb(scrollPosition);
|
24791 | }
|
24792 |
|
24793 | var ReactEventListener = {
|
24794 | _enabled: true,
|
24795 | _handleTopLevel: null,
|
24796 |
|
24797 | WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,
|
24798 |
|
24799 | setHandleTopLevel: function (handleTopLevel) {
|
24800 | ReactEventListener._handleTopLevel = handleTopLevel;
|
24801 | },
|
24802 |
|
24803 | setEnabled: function (enabled) {
|
24804 | ReactEventListener._enabled = !!enabled;
|
24805 | },
|
24806 |
|
24807 | isEnabled: function () {
|
24808 | return ReactEventListener._enabled;
|
24809 | },
|
24810 |
|
24811 | |
24812 |
|
24813 |
|
24814 |
|
24815 |
|
24816 |
|
24817 |
|
24818 |
|
24819 |
|
24820 |
|
24821 | trapBubbledEvent: function (topLevelType, handlerBaseName, element) {
|
24822 | if (!element) {
|
24823 | return null;
|
24824 | }
|
24825 | return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
|
24826 | },
|
24827 |
|
24828 | |
24829 |
|
24830 |
|
24831 |
|
24832 |
|
24833 |
|
24834 |
|
24835 |
|
24836 |
|
24837 |
|
24838 | trapCapturedEvent: function (topLevelType, handlerBaseName, element) {
|
24839 | if (!element) {
|
24840 | return null;
|
24841 | }
|
24842 | return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
|
24843 | },
|
24844 |
|
24845 | monitorScrollValue: function (refresh) {
|
24846 | var callback = scrollValueMonitor.bind(null, refresh);
|
24847 | EventListener.listen(window, 'scroll', callback);
|
24848 | },
|
24849 |
|
24850 | dispatchEvent: function (topLevelType, nativeEvent) {
|
24851 | if (!ReactEventListener._enabled) {
|
24852 | return;
|
24853 | }
|
24854 |
|
24855 | var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);
|
24856 | try {
|
24857 |
|
24858 |
|
24859 | ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
|
24860 | } finally {
|
24861 | TopLevelCallbackBookKeeping.release(bookKeeping);
|
24862 | }
|
24863 | }
|
24864 | };
|
24865 |
|
24866 | module.exports = ReactEventListener;
|
24867 |
|
24868 | },
|
24869 |
|
24870 | function(module, exports) {
|
24871 |
|
24872 | |
24873 |
|
24874 |
|
24875 |
|
24876 |
|
24877 |
|
24878 |
|
24879 |
|
24880 |
|
24881 |
|
24882 |
|
24883 | 'use strict';
|
24884 |
|
24885 | var history = [];
|
24886 |
|
24887 | var ReactHostOperationHistoryHook = {
|
24888 | onHostOperation: function (operation) {
|
24889 | history.push(operation);
|
24890 | },
|
24891 | clearHistory: function () {
|
24892 | if (ReactHostOperationHistoryHook._preventClearing) {
|
24893 |
|
24894 | return;
|
24895 | }
|
24896 |
|
24897 | history = [];
|
24898 | },
|
24899 | getHistory: function () {
|
24900 | return history;
|
24901 | }
|
24902 | };
|
24903 |
|
24904 | module.exports = ReactHostOperationHistoryHook;
|
24905 |
|
24906 | },
|
24907 |
|
24908 | function(module, exports, __webpack_require__) {
|
24909 |
|
24910 | |
24911 |
|
24912 |
|
24913 |
|
24914 |
|
24915 |
|
24916 |
|
24917 |
|
24918 |
|
24919 |
|
24920 | 'use strict';
|
24921 |
|
24922 | var DOMProperty = __webpack_require__(17);
|
24923 | var EventPluginHub = __webpack_require__(26);
|
24924 | var EventPluginUtils = __webpack_require__(42);
|
24925 | var ReactComponentEnvironment = __webpack_require__(45);
|
24926 | var ReactEmptyComponent = __webpack_require__(79);
|
24927 | var ReactBrowserEventEmitter = __webpack_require__(30);
|
24928 | var ReactHostComponent = __webpack_require__(81);
|
24929 | var ReactUpdates = __webpack_require__(13);
|
24930 |
|
24931 | var ReactInjection = {
|
24932 | Component: ReactComponentEnvironment.injection,
|
24933 | DOMProperty: DOMProperty.injection,
|
24934 | EmptyComponent: ReactEmptyComponent.injection,
|
24935 | EventPluginHub: EventPluginHub.injection,
|
24936 | EventPluginUtils: EventPluginUtils.injection,
|
24937 | EventEmitter: ReactBrowserEventEmitter.injection,
|
24938 | HostComponent: ReactHostComponent.injection,
|
24939 | Updates: ReactUpdates.injection
|
24940 | };
|
24941 |
|
24942 | module.exports = ReactInjection;
|
24943 |
|
24944 | },
|
24945 |
|
24946 | function(module, exports, __webpack_require__) {
|
24947 |
|
24948 | |
24949 |
|
24950 |
|
24951 |
|
24952 |
|
24953 |
|
24954 |
|
24955 |
|
24956 |
|
24957 |
|
24958 |
|
24959 | 'use strict';
|
24960 |
|
24961 | var warning = __webpack_require__(5);
|
24962 |
|
24963 | if (true) {
|
24964 | var processingChildContext = false;
|
24965 |
|
24966 | var warnInvalidSetState = function () {
|
24967 | true ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0;
|
24968 | };
|
24969 | }
|
24970 |
|
24971 | var ReactInvalidSetStateWarningHook = {
|
24972 | onBeginProcessingChildContext: function () {
|
24973 | processingChildContext = true;
|
24974 | },
|
24975 | onEndProcessingChildContext: function () {
|
24976 | processingChildContext = false;
|
24977 | },
|
24978 | onSetState: function () {
|
24979 | warnInvalidSetState();
|
24980 | }
|
24981 | };
|
24982 |
|
24983 | module.exports = ReactInvalidSetStateWarningHook;
|
24984 |
|
24985 | },
|
24986 |
|
24987 | function(module, exports, __webpack_require__) {
|
24988 |
|
24989 | |
24990 |
|
24991 |
|
24992 |
|
24993 |
|
24994 |
|
24995 |
|
24996 |
|
24997 |
|
24998 |
|
24999 | 'use strict';
|
25000 |
|
25001 | var adler32 = __webpack_require__(244);
|
25002 |
|
25003 | var TAG_END = /\/?>/;
|
25004 | var COMMENT_START = /^<\!\-\-/;
|
25005 |
|
25006 | var ReactMarkupChecksum = {
|
25007 | CHECKSUM_ATTR_NAME: 'data-react-checksum',
|
25008 |
|
25009 | |
25010 |
|
25011 |
|
25012 |
|
25013 | addChecksumToMarkup: function (markup) {
|
25014 | var checksum = adler32(markup);
|
25015 |
|
25016 |
|
25017 | if (COMMENT_START.test(markup)) {
|
25018 | return markup;
|
25019 | } else {
|
25020 | return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&');
|
25021 | }
|
25022 | },
|
25023 |
|
25024 | |
25025 |
|
25026 |
|
25027 |
|
25028 |
|
25029 | canReuseMarkup: function (markup, element) {
|
25030 | var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
|
25031 | existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
|
25032 | var markupChecksum = adler32(markup);
|
25033 | return markupChecksum === existingChecksum;
|
25034 | }
|
25035 | };
|
25036 |
|
25037 | module.exports = ReactMarkupChecksum;
|
25038 |
|
25039 | },
|
25040 |
|
25041 | function(module, exports, __webpack_require__) {
|
25042 |
|
25043 | |
25044 |
|
25045 |
|
25046 |
|
25047 |
|
25048 |
|
25049 |
|
25050 |
|
25051 |
|
25052 |
|
25053 | 'use strict';
|
25054 |
|
25055 | var _prodInvariant = __webpack_require__(6);
|
25056 |
|
25057 | var ReactComponentEnvironment = __webpack_require__(45);
|
25058 | var ReactInstanceMap = __webpack_require__(20);
|
25059 | var ReactInstrumentation = __webpack_require__(12);
|
25060 |
|
25061 | var ReactCurrentOwner = __webpack_require__(16);
|
25062 | var ReactReconciler = __webpack_require__(21);
|
25063 | var ReactChildReconciler = __webpack_require__(196);
|
25064 |
|
25065 | var emptyFunction = __webpack_require__(11);
|
25066 | var flattenChildren = __webpack_require__(247);
|
25067 | var invariant = __webpack_require__(4);
|
25068 |
|
25069 | |
25070 |
|
25071 |
|
25072 |
|
25073 |
|
25074 |
|
25075 |
|
25076 | function makeInsertMarkup(markup, afterNode, toIndex) {
|
25077 |
|
25078 | return {
|
25079 | type: 'INSERT_MARKUP',
|
25080 | content: markup,
|
25081 | fromIndex: null,
|
25082 | fromNode: null,
|
25083 | toIndex: toIndex,
|
25084 | afterNode: afterNode
|
25085 | };
|
25086 | }
|
25087 |
|
25088 | |
25089 |
|
25090 |
|
25091 |
|
25092 |
|
25093 |
|
25094 |
|
25095 | function makeMove(child, afterNode, toIndex) {
|
25096 |
|
25097 | return {
|
25098 | type: 'MOVE_EXISTING',
|
25099 | content: null,
|
25100 | fromIndex: child._mountIndex,
|
25101 | fromNode: ReactReconciler.getHostNode(child),
|
25102 | toIndex: toIndex,
|
25103 | afterNode: afterNode
|
25104 | };
|
25105 | }
|
25106 |
|
25107 | |
25108 |
|
25109 |
|
25110 |
|
25111 |
|
25112 |
|
25113 | function makeRemove(child, node) {
|
25114 |
|
25115 | return {
|
25116 | type: 'REMOVE_NODE',
|
25117 | content: null,
|
25118 | fromIndex: child._mountIndex,
|
25119 | fromNode: node,
|
25120 | toIndex: null,
|
25121 | afterNode: null
|
25122 | };
|
25123 | }
|
25124 |
|
25125 | |
25126 |
|
25127 |
|
25128 |
|
25129 |
|
25130 |
|
25131 | function makeSetMarkup(markup) {
|
25132 |
|
25133 | return {
|
25134 | type: 'SET_MARKUP',
|
25135 | content: markup,
|
25136 | fromIndex: null,
|
25137 | fromNode: null,
|
25138 | toIndex: null,
|
25139 | afterNode: null
|
25140 | };
|
25141 | }
|
25142 |
|
25143 | |
25144 |
|
25145 |
|
25146 |
|
25147 |
|
25148 |
|
25149 | function makeTextContent(textContent) {
|
25150 |
|
25151 | return {
|
25152 | type: 'TEXT_CONTENT',
|
25153 | content: textContent,
|
25154 | fromIndex: null,
|
25155 | fromNode: null,
|
25156 | toIndex: null,
|
25157 | afterNode: null
|
25158 | };
|
25159 | }
|
25160 |
|
25161 | |
25162 |
|
25163 |
|
25164 |
|
25165 | function enqueue(queue, update) {
|
25166 | if (update) {
|
25167 | queue = queue || [];
|
25168 | queue.push(update);
|
25169 | }
|
25170 | return queue;
|
25171 | }
|
25172 |
|
25173 | |
25174 |
|
25175 |
|
25176 |
|
25177 |
|
25178 | function processQueue(inst, updateQueue) {
|
25179 | ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);
|
25180 | }
|
25181 |
|
25182 | var setChildrenForInstrumentation = emptyFunction;
|
25183 | if (true) {
|
25184 | var getDebugID = function (inst) {
|
25185 | if (!inst._debugID) {
|
25186 |
|
25187 | var internal;
|
25188 | if (internal = ReactInstanceMap.get(inst)) {
|
25189 | inst = internal;
|
25190 | }
|
25191 | }
|
25192 | return inst._debugID;
|
25193 | };
|
25194 | setChildrenForInstrumentation = function (children) {
|
25195 | var debugID = getDebugID(this);
|
25196 |
|
25197 |
|
25198 | if (debugID !== 0) {
|
25199 | ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) {
|
25200 | return children[key]._debugID;
|
25201 | }) : []);
|
25202 | }
|
25203 | };
|
25204 | }
|
25205 |
|
25206 | |
25207 |
|
25208 |
|
25209 |
|
25210 |
|
25211 |
|
25212 | var ReactMultiChild = {
|
25213 |
|
25214 | |
25215 |
|
25216 |
|
25217 |
|
25218 |
|
25219 |
|
25220 |
|
25221 | Mixin: {
|
25222 |
|
25223 | _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
|
25224 | if (true) {
|
25225 | var selfDebugID = getDebugID(this);
|
25226 | if (this._currentElement) {
|
25227 | try {
|
25228 | ReactCurrentOwner.current = this._currentElement._owner;
|
25229 | return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);
|
25230 | } finally {
|
25231 | ReactCurrentOwner.current = null;
|
25232 | }
|
25233 | }
|
25234 | }
|
25235 | return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
|
25236 | },
|
25237 |
|
25238 | _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {
|
25239 | var nextChildren;
|
25240 | var selfDebugID = 0;
|
25241 | if (true) {
|
25242 | selfDebugID = getDebugID(this);
|
25243 | if (this._currentElement) {
|
25244 | try {
|
25245 | ReactCurrentOwner.current = this._currentElement._owner;
|
25246 | nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
|
25247 | } finally {
|
25248 | ReactCurrentOwner.current = null;
|
25249 | }
|
25250 | ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
25251 | return nextChildren;
|
25252 | }
|
25253 | }
|
25254 | nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
|
25255 | ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
25256 | return nextChildren;
|
25257 | },
|
25258 |
|
25259 | |
25260 |
|
25261 |
|
25262 |
|
25263 |
|
25264 |
|
25265 |
|
25266 |
|
25267 | mountChildren: function (nestedChildren, transaction, context) {
|
25268 | var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);
|
25269 | this._renderedChildren = children;
|
25270 |
|
25271 | var mountImages = [];
|
25272 | var index = 0;
|
25273 | for (var name in children) {
|
25274 | if (children.hasOwnProperty(name)) {
|
25275 | var child = children[name];
|
25276 | var selfDebugID = 0;
|
25277 | if (true) {
|
25278 | selfDebugID = getDebugID(this);
|
25279 | }
|
25280 | var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
25281 | child._mountIndex = index++;
|
25282 | mountImages.push(mountImage);
|
25283 | }
|
25284 | }
|
25285 |
|
25286 | if (true) {
|
25287 | setChildrenForInstrumentation.call(this, children);
|
25288 | }
|
25289 |
|
25290 | return mountImages;
|
25291 | },
|
25292 |
|
25293 | |
25294 |
|
25295 |
|
25296 |
|
25297 |
|
25298 |
|
25299 | updateTextContent: function (nextContent) {
|
25300 | var prevChildren = this._renderedChildren;
|
25301 |
|
25302 | ReactChildReconciler.unmountChildren(prevChildren, false);
|
25303 | for (var name in prevChildren) {
|
25304 | if (prevChildren.hasOwnProperty(name)) {
|
25305 | true ? true ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
|
25306 | }
|
25307 | }
|
25308 |
|
25309 | var updates = [makeTextContent(nextContent)];
|
25310 | processQueue(this, updates);
|
25311 | },
|
25312 |
|
25313 | |
25314 |
|
25315 |
|
25316 |
|
25317 |
|
25318 |
|
25319 | updateMarkup: function (nextMarkup) {
|
25320 | var prevChildren = this._renderedChildren;
|
25321 |
|
25322 | ReactChildReconciler.unmountChildren(prevChildren, false);
|
25323 | for (var name in prevChildren) {
|
25324 | if (prevChildren.hasOwnProperty(name)) {
|
25325 | true ? true ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
|
25326 | }
|
25327 | }
|
25328 | var updates = [makeSetMarkup(nextMarkup)];
|
25329 | processQueue(this, updates);
|
25330 | },
|
25331 |
|
25332 | |
25333 |
|
25334 |
|
25335 |
|
25336 |
|
25337 |
|
25338 |
|
25339 | updateChildren: function (nextNestedChildrenElements, transaction, context) {
|
25340 |
|
25341 | this._updateChildren(nextNestedChildrenElements, transaction, context);
|
25342 | },
|
25343 |
|
25344 | |
25345 |
|
25346 |
|
25347 |
|
25348 |
|
25349 |
|
25350 | _updateChildren: function (nextNestedChildrenElements, transaction, context) {
|
25351 | var prevChildren = this._renderedChildren;
|
25352 | var removedNodes = {};
|
25353 | var mountImages = [];
|
25354 | var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);
|
25355 | if (!nextChildren && !prevChildren) {
|
25356 | return;
|
25357 | }
|
25358 | var updates = null;
|
25359 | var name;
|
25360 |
|
25361 |
|
25362 | var nextIndex = 0;
|
25363 | var lastIndex = 0;
|
25364 |
|
25365 | var nextMountIndex = 0;
|
25366 | var lastPlacedNode = null;
|
25367 | for (name in nextChildren) {
|
25368 | if (!nextChildren.hasOwnProperty(name)) {
|
25369 | continue;
|
25370 | }
|
25371 | var prevChild = prevChildren && prevChildren[name];
|
25372 | var nextChild = nextChildren[name];
|
25373 | if (prevChild === nextChild) {
|
25374 | updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex));
|
25375 | lastIndex = Math.max(prevChild._mountIndex, lastIndex);
|
25376 | prevChild._mountIndex = nextIndex;
|
25377 | } else {
|
25378 | if (prevChild) {
|
25379 |
|
25380 | lastIndex = Math.max(prevChild._mountIndex, lastIndex);
|
25381 |
|
25382 | }
|
25383 |
|
25384 | updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context));
|
25385 | nextMountIndex++;
|
25386 | }
|
25387 | nextIndex++;
|
25388 | lastPlacedNode = ReactReconciler.getHostNode(nextChild);
|
25389 | }
|
25390 |
|
25391 | for (name in removedNodes) {
|
25392 | if (removedNodes.hasOwnProperty(name)) {
|
25393 | updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]));
|
25394 | }
|
25395 | }
|
25396 | if (updates) {
|
25397 | processQueue(this, updates);
|
25398 | }
|
25399 | this._renderedChildren = nextChildren;
|
25400 |
|
25401 | if (true) {
|
25402 | setChildrenForInstrumentation.call(this, nextChildren);
|
25403 | }
|
25404 | },
|
25405 |
|
25406 | |
25407 |
|
25408 |
|
25409 |
|
25410 |
|
25411 |
|
25412 |
|
25413 | unmountChildren: function (safely) {
|
25414 | var renderedChildren = this._renderedChildren;
|
25415 | ReactChildReconciler.unmountChildren(renderedChildren, safely);
|
25416 | this._renderedChildren = null;
|
25417 | },
|
25418 |
|
25419 | |
25420 |
|
25421 |
|
25422 |
|
25423 |
|
25424 |
|
25425 |
|
25426 |
|
25427 | moveChild: function (child, afterNode, toIndex, lastIndex) {
|
25428 |
|
25429 |
|
25430 |
|
25431 | if (child._mountIndex < lastIndex) {
|
25432 | return makeMove(child, afterNode, toIndex);
|
25433 | }
|
25434 | },
|
25435 |
|
25436 | |
25437 |
|
25438 |
|
25439 |
|
25440 |
|
25441 |
|
25442 |
|
25443 | createChild: function (child, afterNode, mountImage) {
|
25444 | return makeInsertMarkup(mountImage, afterNode, child._mountIndex);
|
25445 | },
|
25446 |
|
25447 | |
25448 |
|
25449 |
|
25450 |
|
25451 |
|
25452 |
|
25453 | removeChild: function (child, node) {
|
25454 | return makeRemove(child, node);
|
25455 | },
|
25456 |
|
25457 | |
25458 |
|
25459 |
|
25460 |
|
25461 |
|
25462 |
|
25463 |
|
25464 |
|
25465 |
|
25466 |
|
25467 |
|
25468 | _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) {
|
25469 | child._mountIndex = index;
|
25470 | return this.createChild(child, afterNode, mountImage);
|
25471 | },
|
25472 |
|
25473 | |
25474 |
|
25475 |
|
25476 |
|
25477 |
|
25478 |
|
25479 |
|
25480 |
|
25481 | _unmountChild: function (child, node) {
|
25482 | var update = this.removeChild(child, node);
|
25483 | child._mountIndex = null;
|
25484 | return update;
|
25485 | }
|
25486 |
|
25487 | }
|
25488 |
|
25489 | };
|
25490 |
|
25491 | module.exports = ReactMultiChild;
|
25492 |
|
25493 | },
|
25494 |
|
25495 | function(module, exports, __webpack_require__) {
|
25496 |
|
25497 | |
25498 |
|
25499 |
|
25500 |
|
25501 |
|
25502 |
|
25503 |
|
25504 |
|
25505 |
|
25506 |
|
25507 |
|
25508 | 'use strict';
|
25509 |
|
25510 | var _prodInvariant = __webpack_require__(6);
|
25511 |
|
25512 | var invariant = __webpack_require__(4);
|
25513 |
|
25514 | |
25515 |
|
25516 |
|
25517 |
|
25518 |
|
25519 | function isValidOwner(object) {
|
25520 | return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
|
25521 | }
|
25522 |
|
25523 | |
25524 |
|
25525 |
|
25526 |
|
25527 |
|
25528 |
|
25529 |
|
25530 |
|
25531 |
|
25532 |
|
25533 |
|
25534 |
|
25535 |
|
25536 |
|
25537 |
|
25538 |
|
25539 |
|
25540 |
|
25541 |
|
25542 |
|
25543 |
|
25544 |
|
25545 |
|
25546 |
|
25547 |
|
25548 |
|
25549 |
|
25550 |
|
25551 |
|
25552 |
|
25553 | var ReactOwner = {
|
25554 | |
25555 |
|
25556 |
|
25557 |
|
25558 |
|
25559 |
|
25560 |
|
25561 |
|
25562 |
|
25563 | addComponentAsRefTo: function (component, ref, owner) {
|
25564 | !isValidOwner(owner) ? true ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0;
|
25565 | owner.attachRef(ref, component);
|
25566 | },
|
25567 |
|
25568 | |
25569 |
|
25570 |
|
25571 |
|
25572 |
|
25573 |
|
25574 |
|
25575 |
|
25576 |
|
25577 | removeComponentAsRefFrom: function (component, ref, owner) {
|
25578 | !isValidOwner(owner) ? true ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0;
|
25579 | var ownerPublicInstance = owner.getPublicInstance();
|
25580 |
|
25581 |
|
25582 | if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {
|
25583 | owner.detachRef(ref);
|
25584 | }
|
25585 | }
|
25586 |
|
25587 | };
|
25588 |
|
25589 | module.exports = ReactOwner;
|
25590 |
|
25591 | },
|
25592 |
|
25593 | function(module, exports, __webpack_require__) {
|
25594 |
|
25595 | |
25596 |
|
25597 |
|
25598 |
|
25599 |
|
25600 |
|
25601 |
|
25602 |
|
25603 |
|
25604 |
|
25605 |
|
25606 | 'use strict';
|
25607 |
|
25608 | var _assign = __webpack_require__(7);
|
25609 |
|
25610 | var _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
25611 |
|
25612 | var ReactDebugTool = __webpack_require__(77);
|
25613 | var warning = __webpack_require__(5);
|
25614 | var alreadyWarned = false;
|
25615 |
|
25616 | function roundFloat(val) {
|
25617 | var base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
25618 |
|
25619 | var n = Math.pow(10, base);
|
25620 | return Math.floor(val * n) / n;
|
25621 | }
|
25622 |
|
25623 |
|
25624 |
|
25625 | function consoleTable(table) {
|
25626 | console.table(table);
|
25627 | }
|
25628 |
|
25629 | function warnInProduction() {
|
25630 | if (alreadyWarned) {
|
25631 | return;
|
25632 | }
|
25633 | alreadyWarned = true;
|
25634 | if (typeof console !== 'undefined') {
|
25635 | console.error('ReactPerf is not supported in the production builds of React. ' + 'To collect measurements, please use the development build of React instead.');
|
25636 | }
|
25637 | }
|
25638 |
|
25639 | function getLastMeasurements() {
|
25640 | if (false) {
|
25641 | warnInProduction();
|
25642 | return [];
|
25643 | }
|
25644 |
|
25645 | return ReactDebugTool.getFlushHistory();
|
25646 | }
|
25647 |
|
25648 | function getExclusive() {
|
25649 | var flushHistory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements();
|
25650 |
|
25651 | if (false) {
|
25652 | warnInProduction();
|
25653 | return [];
|
25654 | }
|
25655 |
|
25656 | var aggregatedStats = {};
|
25657 | var affectedIDs = {};
|
25658 |
|
25659 | function updateAggregatedStats(treeSnapshot, instanceID, timerType, applyUpdate) {
|
25660 | var displayName = treeSnapshot[instanceID].displayName;
|
25661 |
|
25662 | var key = displayName;
|
25663 | var stats = aggregatedStats[key];
|
25664 | if (!stats) {
|
25665 | affectedIDs[key] = {};
|
25666 | stats = aggregatedStats[key] = {
|
25667 | key: key,
|
25668 | instanceCount: 0,
|
25669 | counts: {},
|
25670 | durations: {},
|
25671 | totalDuration: 0
|
25672 | };
|
25673 | }
|
25674 | if (!stats.durations[timerType]) {
|
25675 | stats.durations[timerType] = 0;
|
25676 | }
|
25677 | if (!stats.counts[timerType]) {
|
25678 | stats.counts[timerType] = 0;
|
25679 | }
|
25680 | affectedIDs[key][instanceID] = true;
|
25681 | applyUpdate(stats);
|
25682 | }
|
25683 |
|
25684 | flushHistory.forEach(function (flush) {
|
25685 | var measurements = flush.measurements,
|
25686 | treeSnapshot = flush.treeSnapshot;
|
25687 |
|
25688 | measurements.forEach(function (measurement) {
|
25689 | var duration = measurement.duration,
|
25690 | instanceID = measurement.instanceID,
|
25691 | timerType = measurement.timerType;
|
25692 |
|
25693 | updateAggregatedStats(treeSnapshot, instanceID, timerType, function (stats) {
|
25694 | stats.totalDuration += duration;
|
25695 | stats.durations[timerType] += duration;
|
25696 | stats.counts[timerType]++;
|
25697 | });
|
25698 | });
|
25699 | });
|
25700 |
|
25701 | return Object.keys(aggregatedStats).map(function (key) {
|
25702 | return _extends({}, aggregatedStats[key], {
|
25703 | instanceCount: Object.keys(affectedIDs[key]).length
|
25704 | });
|
25705 | }).sort(function (a, b) {
|
25706 | return b.totalDuration - a.totalDuration;
|
25707 | });
|
25708 | }
|
25709 |
|
25710 | function getInclusive() {
|
25711 | var flushHistory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements();
|
25712 |
|
25713 | if (false) {
|
25714 | warnInProduction();
|
25715 | return [];
|
25716 | }
|
25717 |
|
25718 | var aggregatedStats = {};
|
25719 | var affectedIDs = {};
|
25720 |
|
25721 | function updateAggregatedStats(treeSnapshot, instanceID, applyUpdate) {
|
25722 | var _treeSnapshot$instanc = treeSnapshot[instanceID],
|
25723 | displayName = _treeSnapshot$instanc.displayName,
|
25724 | ownerID = _treeSnapshot$instanc.ownerID;
|
25725 |
|
25726 | var owner = treeSnapshot[ownerID];
|
25727 | var key = (owner ? owner.displayName + ' > ' : '') + displayName;
|
25728 | var stats = aggregatedStats[key];
|
25729 | if (!stats) {
|
25730 | affectedIDs[key] = {};
|
25731 | stats = aggregatedStats[key] = {
|
25732 | key: key,
|
25733 | instanceCount: 0,
|
25734 | inclusiveRenderDuration: 0,
|
25735 | renderCount: 0
|
25736 | };
|
25737 | }
|
25738 | affectedIDs[key][instanceID] = true;
|
25739 | applyUpdate(stats);
|
25740 | }
|
25741 |
|
25742 | var isCompositeByID = {};
|
25743 | flushHistory.forEach(function (flush) {
|
25744 | var measurements = flush.measurements;
|
25745 |
|
25746 | measurements.forEach(function (measurement) {
|
25747 | var instanceID = measurement.instanceID,
|
25748 | timerType = measurement.timerType;
|
25749 |
|
25750 | if (timerType !== 'render') {
|
25751 | return;
|
25752 | }
|
25753 | isCompositeByID[instanceID] = true;
|
25754 | });
|
25755 | });
|
25756 |
|
25757 | flushHistory.forEach(function (flush) {
|
25758 | var measurements = flush.measurements,
|
25759 | treeSnapshot = flush.treeSnapshot;
|
25760 |
|
25761 | measurements.forEach(function (measurement) {
|
25762 | var duration = measurement.duration,
|
25763 | instanceID = measurement.instanceID,
|
25764 | timerType = measurement.timerType;
|
25765 |
|
25766 | if (timerType !== 'render') {
|
25767 | return;
|
25768 | }
|
25769 | updateAggregatedStats(treeSnapshot, instanceID, function (stats) {
|
25770 | stats.renderCount++;
|
25771 | });
|
25772 | var nextParentID = instanceID;
|
25773 | while (nextParentID) {
|
25774 |
|
25775 |
|
25776 | if (isCompositeByID[nextParentID]) {
|
25777 | updateAggregatedStats(treeSnapshot, nextParentID, function (stats) {
|
25778 | stats.inclusiveRenderDuration += duration;
|
25779 | });
|
25780 | }
|
25781 | nextParentID = treeSnapshot[nextParentID].parentID;
|
25782 | }
|
25783 | });
|
25784 | });
|
25785 |
|
25786 | return Object.keys(aggregatedStats).map(function (key) {
|
25787 | return _extends({}, aggregatedStats[key], {
|
25788 | instanceCount: Object.keys(affectedIDs[key]).length
|
25789 | });
|
25790 | }).sort(function (a, b) {
|
25791 | return b.inclusiveRenderDuration - a.inclusiveRenderDuration;
|
25792 | });
|
25793 | }
|
25794 |
|
25795 | function getWasted() {
|
25796 | var flushHistory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements();
|
25797 |
|
25798 | if (false) {
|
25799 | warnInProduction();
|
25800 | return [];
|
25801 | }
|
25802 |
|
25803 | var aggregatedStats = {};
|
25804 | var affectedIDs = {};
|
25805 |
|
25806 | function updateAggregatedStats(treeSnapshot, instanceID, applyUpdate) {
|
25807 | var _treeSnapshot$instanc2 = treeSnapshot[instanceID],
|
25808 | displayName = _treeSnapshot$instanc2.displayName,
|
25809 | ownerID = _treeSnapshot$instanc2.ownerID;
|
25810 |
|
25811 | var owner = treeSnapshot[ownerID];
|
25812 | var key = (owner ? owner.displayName + ' > ' : '') + displayName;
|
25813 | var stats = aggregatedStats[key];
|
25814 | if (!stats) {
|
25815 | affectedIDs[key] = {};
|
25816 | stats = aggregatedStats[key] = {
|
25817 | key: key,
|
25818 | instanceCount: 0,
|
25819 | inclusiveRenderDuration: 0,
|
25820 | renderCount: 0
|
25821 | };
|
25822 | }
|
25823 | affectedIDs[key][instanceID] = true;
|
25824 | applyUpdate(stats);
|
25825 | }
|
25826 |
|
25827 | flushHistory.forEach(function (flush) {
|
25828 | var measurements = flush.measurements,
|
25829 | treeSnapshot = flush.treeSnapshot,
|
25830 | operations = flush.operations;
|
25831 |
|
25832 | var isDefinitelyNotWastedByID = {};
|
25833 |
|
25834 |
|
25835 |
|
25836 | operations.forEach(function (operation) {
|
25837 | var instanceID = operation.instanceID;
|
25838 |
|
25839 | var nextParentID = instanceID;
|
25840 | while (nextParentID) {
|
25841 | isDefinitelyNotWastedByID[nextParentID] = true;
|
25842 | nextParentID = treeSnapshot[nextParentID].parentID;
|
25843 | }
|
25844 | });
|
25845 |
|
25846 |
|
25847 |
|
25848 | var renderedCompositeIDs = {};
|
25849 | measurements.forEach(function (measurement) {
|
25850 | var instanceID = measurement.instanceID,
|
25851 | timerType = measurement.timerType;
|
25852 |
|
25853 | if (timerType !== 'render') {
|
25854 | return;
|
25855 | }
|
25856 | renderedCompositeIDs[instanceID] = true;
|
25857 | });
|
25858 |
|
25859 | measurements.forEach(function (measurement) {
|
25860 | var duration = measurement.duration,
|
25861 | instanceID = measurement.instanceID,
|
25862 | timerType = measurement.timerType;
|
25863 |
|
25864 | if (timerType !== 'render') {
|
25865 | return;
|
25866 | }
|
25867 |
|
25868 |
|
25869 |
|
25870 | var updateCount = treeSnapshot[instanceID].updateCount;
|
25871 |
|
25872 | if (isDefinitelyNotWastedByID[instanceID] || updateCount === 0) {
|
25873 | return;
|
25874 | }
|
25875 |
|
25876 |
|
25877 | updateAggregatedStats(treeSnapshot, instanceID, function (stats) {
|
25878 | stats.renderCount++;
|
25879 | });
|
25880 |
|
25881 | var nextParentID = instanceID;
|
25882 | while (nextParentID) {
|
25883 |
|
25884 |
|
25885 | var isWasted = renderedCompositeIDs[nextParentID] && !isDefinitelyNotWastedByID[nextParentID];
|
25886 | if (isWasted) {
|
25887 | updateAggregatedStats(treeSnapshot, nextParentID, function (stats) {
|
25888 | stats.inclusiveRenderDuration += duration;
|
25889 | });
|
25890 | }
|
25891 | nextParentID = treeSnapshot[nextParentID].parentID;
|
25892 | }
|
25893 | });
|
25894 | });
|
25895 |
|
25896 | return Object.keys(aggregatedStats).map(function (key) {
|
25897 | return _extends({}, aggregatedStats[key], {
|
25898 | instanceCount: Object.keys(affectedIDs[key]).length
|
25899 | });
|
25900 | }).sort(function (a, b) {
|
25901 | return b.inclusiveRenderDuration - a.inclusiveRenderDuration;
|
25902 | });
|
25903 | }
|
25904 |
|
25905 | function getOperations() {
|
25906 | var flushHistory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLastMeasurements();
|
25907 |
|
25908 | if (false) {
|
25909 | warnInProduction();
|
25910 | return [];
|
25911 | }
|
25912 |
|
25913 | var stats = [];
|
25914 | flushHistory.forEach(function (flush, flushIndex) {
|
25915 | var operations = flush.operations,
|
25916 | treeSnapshot = flush.treeSnapshot;
|
25917 |
|
25918 | operations.forEach(function (operation) {
|
25919 | var instanceID = operation.instanceID,
|
25920 | type = operation.type,
|
25921 | payload = operation.payload;
|
25922 | var _treeSnapshot$instanc3 = treeSnapshot[instanceID],
|
25923 | displayName = _treeSnapshot$instanc3.displayName,
|
25924 | ownerID = _treeSnapshot$instanc3.ownerID;
|
25925 |
|
25926 | var owner = treeSnapshot[ownerID];
|
25927 | var key = (owner ? owner.displayName + ' > ' : '') + displayName;
|
25928 |
|
25929 | stats.push({
|
25930 | flushIndex: flushIndex,
|
25931 | instanceID: instanceID,
|
25932 | key: key,
|
25933 | type: type,
|
25934 | ownerID: ownerID,
|
25935 | payload: payload
|
25936 | });
|
25937 | });
|
25938 | });
|
25939 | return stats;
|
25940 | }
|
25941 |
|
25942 | function printExclusive(flushHistory) {
|
25943 | if (false) {
|
25944 | warnInProduction();
|
25945 | return;
|
25946 | }
|
25947 |
|
25948 | var stats = getExclusive(flushHistory);
|
25949 | var table = stats.map(function (item) {
|
25950 | var key = item.key,
|
25951 | instanceCount = item.instanceCount,
|
25952 | totalDuration = item.totalDuration;
|
25953 |
|
25954 | var renderCount = item.counts.render || 0;
|
25955 | var renderDuration = item.durations.render || 0;
|
25956 | return {
|
25957 | 'Component': key,
|
25958 | 'Total time (ms)': roundFloat(totalDuration),
|
25959 | 'Instance count': instanceCount,
|
25960 | 'Total render time (ms)': roundFloat(renderDuration),
|
25961 | 'Average render time (ms)': renderCount ? roundFloat(renderDuration / renderCount) : undefined,
|
25962 | 'Render count': renderCount,
|
25963 | 'Total lifecycle time (ms)': roundFloat(totalDuration - renderDuration)
|
25964 | };
|
25965 | });
|
25966 | consoleTable(table);
|
25967 | }
|
25968 |
|
25969 | function printInclusive(flushHistory) {
|
25970 | if (false) {
|
25971 | warnInProduction();
|
25972 | return;
|
25973 | }
|
25974 |
|
25975 | var stats = getInclusive(flushHistory);
|
25976 | var table = stats.map(function (item) {
|
25977 | var key = item.key,
|
25978 | instanceCount = item.instanceCount,
|
25979 | inclusiveRenderDuration = item.inclusiveRenderDuration,
|
25980 | renderCount = item.renderCount;
|
25981 |
|
25982 | return {
|
25983 | 'Owner > Component': key,
|
25984 | 'Inclusive render time (ms)': roundFloat(inclusiveRenderDuration),
|
25985 | 'Instance count': instanceCount,
|
25986 | 'Render count': renderCount
|
25987 | };
|
25988 | });
|
25989 | consoleTable(table);
|
25990 | }
|
25991 |
|
25992 | function printWasted(flushHistory) {
|
25993 | if (false) {
|
25994 | warnInProduction();
|
25995 | return;
|
25996 | }
|
25997 |
|
25998 | var stats = getWasted(flushHistory);
|
25999 | var table = stats.map(function (item) {
|
26000 | var key = item.key,
|
26001 | instanceCount = item.instanceCount,
|
26002 | inclusiveRenderDuration = item.inclusiveRenderDuration,
|
26003 | renderCount = item.renderCount;
|
26004 |
|
26005 | return {
|
26006 | 'Owner > Component': key,
|
26007 | 'Inclusive wasted time (ms)': roundFloat(inclusiveRenderDuration),
|
26008 | 'Instance count': instanceCount,
|
26009 | 'Render count': renderCount
|
26010 | };
|
26011 | });
|
26012 | consoleTable(table);
|
26013 | }
|
26014 |
|
26015 | function printOperations(flushHistory) {
|
26016 | if (false) {
|
26017 | warnInProduction();
|
26018 | return;
|
26019 | }
|
26020 |
|
26021 | var stats = getOperations(flushHistory);
|
26022 | var table = stats.map(function (stat) {
|
26023 | return {
|
26024 | 'Owner > Node': stat.key,
|
26025 | 'Operation': stat.type,
|
26026 | 'Payload': typeof stat.payload === 'object' ? JSON.stringify(stat.payload) : stat.payload,
|
26027 | 'Flush index': stat.flushIndex,
|
26028 | 'Owner Component ID': stat.ownerID,
|
26029 | 'DOM Component ID': stat.instanceID
|
26030 | };
|
26031 | });
|
26032 | consoleTable(table);
|
26033 | }
|
26034 |
|
26035 | var warnedAboutPrintDOM = false;
|
26036 | function printDOM(measurements) {
|
26037 | true ? warning(warnedAboutPrintDOM, '`ReactPerf.printDOM(...)` is deprecated. Use ' + '`ReactPerf.printOperations(...)` instead.') : void 0;
|
26038 | warnedAboutPrintDOM = true;
|
26039 | return printOperations(measurements);
|
26040 | }
|
26041 |
|
26042 | var warnedAboutGetMeasurementsSummaryMap = false;
|
26043 | function getMeasurementsSummaryMap(measurements) {
|
26044 | true ? warning(warnedAboutGetMeasurementsSummaryMap, '`ReactPerf.getMeasurementsSummaryMap(...)` is deprecated. Use ' + '`ReactPerf.getWasted(...)` instead.') : void 0;
|
26045 | warnedAboutGetMeasurementsSummaryMap = true;
|
26046 | return getWasted(measurements);
|
26047 | }
|
26048 |
|
26049 | function start() {
|
26050 | if (false) {
|
26051 | warnInProduction();
|
26052 | return;
|
26053 | }
|
26054 |
|
26055 | ReactDebugTool.beginProfiling();
|
26056 | }
|
26057 |
|
26058 | function stop() {
|
26059 | if (false) {
|
26060 | warnInProduction();
|
26061 | return;
|
26062 | }
|
26063 |
|
26064 | ReactDebugTool.endProfiling();
|
26065 | }
|
26066 |
|
26067 | function isRunning() {
|
26068 | if (false) {
|
26069 | warnInProduction();
|
26070 | return false;
|
26071 | }
|
26072 |
|
26073 | return ReactDebugTool.isProfiling();
|
26074 | }
|
26075 |
|
26076 | var ReactPerfAnalysis = {
|
26077 | getLastMeasurements: getLastMeasurements,
|
26078 | getExclusive: getExclusive,
|
26079 | getInclusive: getInclusive,
|
26080 | getWasted: getWasted,
|
26081 | getOperations: getOperations,
|
26082 | printExclusive: printExclusive,
|
26083 | printInclusive: printInclusive,
|
26084 | printWasted: printWasted,
|
26085 | printOperations: printOperations,
|
26086 | start: start,
|
26087 | stop: stop,
|
26088 | isRunning: isRunning,
|
26089 |
|
26090 | printDOM: printDOM,
|
26091 | getMeasurementsSummaryMap: getMeasurementsSummaryMap
|
26092 | };
|
26093 |
|
26094 | module.exports = ReactPerfAnalysis;
|
26095 |
|
26096 | },
|
26097 |
|
26098 | function(module, exports, __webpack_require__) {
|
26099 |
|
26100 | |
26101 |
|
26102 |
|
26103 |
|
26104 |
|
26105 |
|
26106 |
|
26107 |
|
26108 |
|
26109 |
|
26110 |
|
26111 | 'use strict';
|
26112 |
|
26113 | var ReactPropTypeLocationNames = {};
|
26114 |
|
26115 | if (true) {
|
26116 | ReactPropTypeLocationNames = {
|
26117 | prop: 'prop',
|
26118 | context: 'context',
|
26119 | childContext: 'child context'
|
26120 | };
|
26121 | }
|
26122 |
|
26123 | module.exports = ReactPropTypeLocationNames;
|
26124 |
|
26125 | },
|
26126 |
|
26127 | function(module, exports, __webpack_require__) {
|
26128 |
|
26129 | |
26130 |
|
26131 |
|
26132 |
|
26133 |
|
26134 |
|
26135 |
|
26136 |
|
26137 |
|
26138 |
|
26139 | 'use strict';
|
26140 |
|
26141 | var _assign = __webpack_require__(7);
|
26142 |
|
26143 | var CallbackQueue = __webpack_require__(71);
|
26144 | var PooledClass = __webpack_require__(19);
|
26145 | var ReactBrowserEventEmitter = __webpack_require__(30);
|
26146 | var ReactInputSelection = __webpack_require__(82);
|
26147 | var ReactInstrumentation = __webpack_require__(12);
|
26148 | var Transaction = __webpack_require__(35);
|
26149 | var ReactUpdateQueue = __webpack_require__(47);
|
26150 |
|
26151 | |
26152 |
|
26153 |
|
26154 |
|
26155 | var SELECTION_RESTORATION = {
|
26156 | |
26157 |
|
26158 |
|
26159 | initialize: ReactInputSelection.getSelectionInformation,
|
26160 | |
26161 |
|
26162 |
|
26163 | close: ReactInputSelection.restoreSelection
|
26164 | };
|
26165 |
|
26166 | |
26167 |
|
26168 |
|
26169 |
|
26170 |
|
26171 | var EVENT_SUPPRESSION = {
|
26172 | |
26173 |
|
26174 |
|
26175 |
|
26176 | initialize: function () {
|
26177 | var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();
|
26178 | ReactBrowserEventEmitter.setEnabled(false);
|
26179 | return currentlyEnabled;
|
26180 | },
|
26181 |
|
26182 | |
26183 |
|
26184 |
|
26185 |
|
26186 |
|
26187 | close: function (previouslyEnabled) {
|
26188 | ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
|
26189 | }
|
26190 | };
|
26191 |
|
26192 | |
26193 |
|
26194 |
|
26195 |
|
26196 | var ON_DOM_READY_QUEUEING = {
|
26197 | |
26198 |
|
26199 |
|
26200 | initialize: function () {
|
26201 | this.reactMountReady.reset();
|
26202 | },
|
26203 |
|
26204 | |
26205 |
|
26206 |
|
26207 | close: function () {
|
26208 | this.reactMountReady.notifyAll();
|
26209 | }
|
26210 | };
|
26211 |
|
26212 | |
26213 |
|
26214 |
|
26215 |
|
26216 |
|
26217 | var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING];
|
26218 |
|
26219 | if (true) {
|
26220 | TRANSACTION_WRAPPERS.push({
|
26221 | initialize: ReactInstrumentation.debugTool.onBeginFlush,
|
26222 | close: ReactInstrumentation.debugTool.onEndFlush
|
26223 | });
|
26224 | }
|
26225 |
|
26226 | |
26227 |
|
26228 |
|
26229 |
|
26230 |
|
26231 |
|
26232 |
|
26233 |
|
26234 |
|
26235 |
|
26236 |
|
26237 |
|
26238 |
|
26239 |
|
26240 | function ReactReconcileTransaction(useCreateElement) {
|
26241 | this.reinitializeTransaction();
|
26242 |
|
26243 |
|
26244 |
|
26245 |
|
26246 |
|
26247 | this.renderToStaticMarkup = false;
|
26248 | this.reactMountReady = CallbackQueue.getPooled(null);
|
26249 | this.useCreateElement = useCreateElement;
|
26250 | }
|
26251 |
|
26252 | var Mixin = {
|
26253 | |
26254 |
|
26255 |
|
26256 |
|
26257 |
|
26258 |
|
26259 |
|
26260 | getTransactionWrappers: function () {
|
26261 | return TRANSACTION_WRAPPERS;
|
26262 | },
|
26263 |
|
26264 | |
26265 |
|
26266 |
|
26267 | getReactMountReady: function () {
|
26268 | return this.reactMountReady;
|
26269 | },
|
26270 |
|
26271 | |
26272 |
|
26273 |
|
26274 | getUpdateQueue: function () {
|
26275 | return ReactUpdateQueue;
|
26276 | },
|
26277 |
|
26278 | |
26279 |
|
26280 |
|
26281 |
|
26282 | checkpoint: function () {
|
26283 |
|
26284 | return this.reactMountReady.checkpoint();
|
26285 | },
|
26286 |
|
26287 | rollback: function (checkpoint) {
|
26288 | this.reactMountReady.rollback(checkpoint);
|
26289 | },
|
26290 |
|
26291 | |
26292 |
|
26293 |
|
26294 |
|
26295 | destructor: function () {
|
26296 | CallbackQueue.release(this.reactMountReady);
|
26297 | this.reactMountReady = null;
|
26298 | }
|
26299 | };
|
26300 |
|
26301 | _assign(ReactReconcileTransaction.prototype, Transaction, Mixin);
|
26302 |
|
26303 | PooledClass.addPoolingTo(ReactReconcileTransaction);
|
26304 |
|
26305 | module.exports = ReactReconcileTransaction;
|
26306 |
|
26307 | },
|
26308 |
|
26309 | function(module, exports, __webpack_require__) {
|
26310 |
|
26311 | |
26312 |
|
26313 |
|
26314 |
|
26315 |
|
26316 |
|
26317 |
|
26318 |
|
26319 |
|
26320 |
|
26321 |
|
26322 | 'use strict';
|
26323 |
|
26324 | var ReactOwner = __webpack_require__(221);
|
26325 |
|
26326 | var ReactRef = {};
|
26327 |
|
26328 | function attachRef(ref, component, owner) {
|
26329 | if (typeof ref === 'function') {
|
26330 | ref(component.getPublicInstance());
|
26331 | } else {
|
26332 |
|
26333 | ReactOwner.addComponentAsRefTo(component, ref, owner);
|
26334 | }
|
26335 | }
|
26336 |
|
26337 | function detachRef(ref, component, owner) {
|
26338 | if (typeof ref === 'function') {
|
26339 | ref(null);
|
26340 | } else {
|
26341 |
|
26342 | ReactOwner.removeComponentAsRefFrom(component, ref, owner);
|
26343 | }
|
26344 | }
|
26345 |
|
26346 | ReactRef.attachRefs = function (instance, element) {
|
26347 | if (element === null || typeof element !== 'object') {
|
26348 | return;
|
26349 | }
|
26350 | var ref = element.ref;
|
26351 | if (ref != null) {
|
26352 | attachRef(ref, instance, element._owner);
|
26353 | }
|
26354 | };
|
26355 |
|
26356 | ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
|
26357 |
|
26358 |
|
26359 |
|
26360 |
|
26361 |
|
26362 |
|
26363 |
|
26364 |
|
26365 |
|
26366 |
|
26367 |
|
26368 |
|
26369 | var prevRef = null;
|
26370 | var prevOwner = null;
|
26371 | if (prevElement !== null && typeof prevElement === 'object') {
|
26372 | prevRef = prevElement.ref;
|
26373 | prevOwner = prevElement._owner;
|
26374 | }
|
26375 |
|
26376 | var nextRef = null;
|
26377 | var nextOwner = null;
|
26378 | if (nextElement !== null && typeof nextElement === 'object') {
|
26379 | nextRef = nextElement.ref;
|
26380 | nextOwner = nextElement._owner;
|
26381 | }
|
26382 |
|
26383 | return prevRef !== nextRef ||
|
26384 |
|
26385 | typeof nextRef === 'string' && nextOwner !== prevOwner;
|
26386 | };
|
26387 |
|
26388 | ReactRef.detachRefs = function (instance, element) {
|
26389 | if (element === null || typeof element !== 'object') {
|
26390 | return;
|
26391 | }
|
26392 | var ref = element.ref;
|
26393 | if (ref != null) {
|
26394 | detachRef(ref, instance, element._owner);
|
26395 | }
|
26396 | };
|
26397 |
|
26398 | module.exports = ReactRef;
|
26399 |
|
26400 | },
|
26401 |
|
26402 | function(module, exports, __webpack_require__) {
|
26403 |
|
26404 | |
26405 |
|
26406 |
|
26407 |
|
26408 |
|
26409 |
|
26410 |
|
26411 |
|
26412 |
|
26413 |
|
26414 | 'use strict';
|
26415 |
|
26416 | var _assign = __webpack_require__(7);
|
26417 |
|
26418 | var PooledClass = __webpack_require__(19);
|
26419 | var Transaction = __webpack_require__(35);
|
26420 | var ReactInstrumentation = __webpack_require__(12);
|
26421 | var ReactServerUpdateQueue = __webpack_require__(227);
|
26422 |
|
26423 | |
26424 |
|
26425 |
|
26426 |
|
26427 |
|
26428 | var TRANSACTION_WRAPPERS = [];
|
26429 |
|
26430 | if (true) {
|
26431 | TRANSACTION_WRAPPERS.push({
|
26432 | initialize: ReactInstrumentation.debugTool.onBeginFlush,
|
26433 | close: ReactInstrumentation.debugTool.onEndFlush
|
26434 | });
|
26435 | }
|
26436 |
|
26437 | var noopCallbackQueue = {
|
26438 | enqueue: function () {}
|
26439 | };
|
26440 |
|
26441 | |
26442 |
|
26443 |
|
26444 |
|
26445 | function ReactServerRenderingTransaction(renderToStaticMarkup) {
|
26446 | this.reinitializeTransaction();
|
26447 | this.renderToStaticMarkup = renderToStaticMarkup;
|
26448 | this.useCreateElement = false;
|
26449 | this.updateQueue = new ReactServerUpdateQueue(this);
|
26450 | }
|
26451 |
|
26452 | var Mixin = {
|
26453 | |
26454 |
|
26455 |
|
26456 |
|
26457 |
|
26458 |
|
26459 | getTransactionWrappers: function () {
|
26460 | return TRANSACTION_WRAPPERS;
|
26461 | },
|
26462 |
|
26463 | |
26464 |
|
26465 |
|
26466 | getReactMountReady: function () {
|
26467 | return noopCallbackQueue;
|
26468 | },
|
26469 |
|
26470 | |
26471 |
|
26472 |
|
26473 | getUpdateQueue: function () {
|
26474 | return this.updateQueue;
|
26475 | },
|
26476 |
|
26477 | |
26478 |
|
26479 |
|
26480 |
|
26481 | destructor: function () {},
|
26482 |
|
26483 | checkpoint: function () {},
|
26484 |
|
26485 | rollback: function () {}
|
26486 | };
|
26487 |
|
26488 | _assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin);
|
26489 |
|
26490 | PooledClass.addPoolingTo(ReactServerRenderingTransaction);
|
26491 |
|
26492 | module.exports = ReactServerRenderingTransaction;
|
26493 |
|
26494 | },
|
26495 |
|
26496 | function(module, exports, __webpack_require__) {
|
26497 |
|
26498 | |
26499 |
|
26500 |
|
26501 |
|
26502 |
|
26503 |
|
26504 |
|
26505 |
|
26506 |
|
26507 |
|
26508 |
|
26509 | 'use strict';
|
26510 |
|
26511 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
26512 |
|
26513 | var ReactUpdateQueue = __webpack_require__(47);
|
26514 |
|
26515 | var warning = __webpack_require__(5);
|
26516 |
|
26517 | function warnNoop(publicInstance, callerName) {
|
26518 | if (true) {
|
26519 | var constructor = publicInstance.constructor;
|
26520 | true ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
|
26521 | }
|
26522 | }
|
26523 |
|
26524 | /**
|
26525 | * This is the update queue used for server rendering.
|
26526 | * It delegates to ReactUpdateQueue while server rendering is in progress and
|
26527 | * switches to ReactNoopUpdateQueue after the transaction has completed.
|
26528 | * @class ReactServerUpdateQueue
|
26529 | * @param {Transaction} transaction
|
26530 | */
|
26531 |
|
26532 | var ReactServerUpdateQueue = function () {
|
26533 | function ReactServerUpdateQueue(transaction) {
|
26534 | _classCallCheck(this, ReactServerUpdateQueue);
|
26535 |
|
26536 | this.transaction = transaction;
|
26537 | }
|
26538 |
|
26539 | |
26540 |
|
26541 |
|
26542 |
|
26543 |
|
26544 |
|
26545 |
|
26546 |
|
26547 |
|
26548 | ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) {
|
26549 | return false;
|
26550 | };
|
26551 |
|
26552 | |
26553 |
|
26554 |
|
26555 |
|
26556 |
|
26557 |
|
26558 |
|
26559 |
|
26560 |
|
26561 |
|
26562 | ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) {
|
26563 | if (this.transaction.isInTransaction()) {
|
26564 | ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);
|
26565 | }
|
26566 | };
|
26567 |
|
26568 | |
26569 |
|
26570 |
|
26571 |
|
26572 |
|
26573 |
|
26574 |
|
26575 |
|
26576 |
|
26577 |
|
26578 |
|
26579 |
|
26580 |
|
26581 |
|
26582 |
|
26583 | ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) {
|
26584 | if (this.transaction.isInTransaction()) {
|
26585 | ReactUpdateQueue.enqueueForceUpdate(publicInstance);
|
26586 | } else {
|
26587 | warnNoop(publicInstance, 'forceUpdate');
|
26588 | }
|
26589 | };
|
26590 |
|
26591 | |
26592 |
|
26593 |
|
26594 |
|
26595 |
|
26596 |
|
26597 |
|
26598 |
|
26599 |
|
26600 |
|
26601 |
|
26602 |
|
26603 |
|
26604 | ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) {
|
26605 | if (this.transaction.isInTransaction()) {
|
26606 | ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState);
|
26607 | } else {
|
26608 | warnNoop(publicInstance, 'replaceState');
|
26609 | }
|
26610 | };
|
26611 |
|
26612 | |
26613 |
|
26614 |
|
26615 |
|
26616 |
|
26617 |
|
26618 |
|
26619 |
|
26620 |
|
26621 |
|
26622 |
|
26623 |
|
26624 | ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) {
|
26625 | if (this.transaction.isInTransaction()) {
|
26626 | ReactUpdateQueue.enqueueSetState(publicInstance, partialState);
|
26627 | } else {
|
26628 | warnNoop(publicInstance, 'setState');
|
26629 | }
|
26630 | };
|
26631 |
|
26632 | return ReactServerUpdateQueue;
|
26633 | }();
|
26634 |
|
26635 | module.exports = ReactServerUpdateQueue;
|
26636 |
|
26637 | },
|
26638 |
|
26639 | function(module, exports, __webpack_require__) {
|
26640 |
|
26641 | |
26642 |
|
26643 |
|
26644 |
|
26645 |
|
26646 |
|
26647 |
|
26648 |
|
26649 |
|
26650 |
|
26651 | 'use strict';
|
26652 |
|
26653 | var _prodInvariant = __webpack_require__(6),
|
26654 | _assign = __webpack_require__(7);
|
26655 |
|
26656 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
26657 |
|
26658 | var React = __webpack_require__(15);
|
26659 | var ReactDefaultInjection = __webpack_require__(78);
|
26660 | var ReactCompositeComponent = __webpack_require__(73);
|
26661 | var ReactReconciler = __webpack_require__(21);
|
26662 | var ReactUpdates = __webpack_require__(13);
|
26663 |
|
26664 | var emptyObject = __webpack_require__(24);
|
26665 | var getNextDebugID = __webpack_require__(91);
|
26666 | var invariant = __webpack_require__(4);
|
26667 |
|
26668 | var NoopInternalComponent = function () {
|
26669 | function NoopInternalComponent(element) {
|
26670 | _classCallCheck(this, NoopInternalComponent);
|
26671 |
|
26672 | this._renderedOutput = element;
|
26673 | this._currentElement = element;
|
26674 |
|
26675 | if (true) {
|
26676 | this._debugID = getNextDebugID();
|
26677 | }
|
26678 | }
|
26679 |
|
26680 | NoopInternalComponent.prototype.mountComponent = function mountComponent() {};
|
26681 |
|
26682 | NoopInternalComponent.prototype.receiveComponent = function receiveComponent(element) {
|
26683 | this._renderedOutput = element;
|
26684 | this._currentElement = element;
|
26685 | };
|
26686 |
|
26687 | NoopInternalComponent.prototype.unmountComponent = function unmountComponent() {};
|
26688 |
|
26689 | NoopInternalComponent.prototype.getHostNode = function getHostNode() {
|
26690 | return undefined;
|
26691 | };
|
26692 |
|
26693 | NoopInternalComponent.prototype.getPublicInstance = function getPublicInstance() {
|
26694 | return null;
|
26695 | };
|
26696 |
|
26697 | return NoopInternalComponent;
|
26698 | }();
|
26699 |
|
26700 | var ShallowComponentWrapper = function (element) {
|
26701 |
|
26702 | if (true) {
|
26703 | this._debugID = getNextDebugID();
|
26704 | }
|
26705 |
|
26706 | this.construct(element);
|
26707 | };
|
26708 | _assign(ShallowComponentWrapper.prototype, ReactCompositeComponent, {
|
26709 | _constructComponent: ReactCompositeComponent._constructComponentWithoutOwner,
|
26710 | _instantiateReactComponent: function (element) {
|
26711 | return new NoopInternalComponent(element);
|
26712 | },
|
26713 | _replaceNodeWithMarkup: function () {},
|
26714 | _renderValidatedComponent: ReactCompositeComponent._renderValidatedComponentWithoutOwnerOrContext
|
26715 | });
|
26716 |
|
26717 | function _batchedRender(renderer, element, context) {
|
26718 | var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(true);
|
26719 | renderer._render(element, transaction, context);
|
26720 | ReactUpdates.ReactReconcileTransaction.release(transaction);
|
26721 | }
|
26722 |
|
26723 | var ReactShallowRenderer = function () {
|
26724 | function ReactShallowRenderer() {
|
26725 | _classCallCheck(this, ReactShallowRenderer);
|
26726 |
|
26727 | this._instance = null;
|
26728 | }
|
26729 |
|
26730 | ReactShallowRenderer.prototype.getMountedInstance = function getMountedInstance() {
|
26731 | return this._instance ? this._instance._instance : null;
|
26732 | };
|
26733 |
|
26734 | ReactShallowRenderer.prototype.render = function render(element, context) {
|
26735 |
|
26736 |
|
26737 |
|
26738 | ReactDefaultInjection.inject();
|
26739 |
|
26740 | !React.isValidElement(element) ? true ? invariant(false, 'ReactShallowRenderer render(): Invalid component element.%s', typeof element === 'function' ? ' Instead of passing a component class, make sure to instantiate ' + 'it by passing it to React.createElement.' : '') : _prodInvariant('12', typeof element === 'function' ? ' Instead of passing a component class, make sure to instantiate ' + 'it by passing it to React.createElement.' : '') : void 0;
|
26741 | !(typeof element.type !== 'string') ? true ? invariant(false, 'ReactShallowRenderer render(): Shallow rendering works only with custom components, not primitives (%s). Instead of calling `.render(el)` and inspecting the rendered output, look at `el.props` directly instead.', element.type) : _prodInvariant('13', element.type) : void 0;
|
26742 |
|
26743 | if (!context) {
|
26744 | context = emptyObject;
|
26745 | }
|
26746 | ReactUpdates.batchedUpdates(_batchedRender, this, element, context);
|
26747 |
|
26748 | return this.getRenderOutput();
|
26749 | };
|
26750 |
|
26751 | ReactShallowRenderer.prototype.getRenderOutput = function getRenderOutput() {
|
26752 | return this._instance && this._instance._renderedComponent && this._instance._renderedComponent._renderedOutput || null;
|
26753 | };
|
26754 |
|
26755 | ReactShallowRenderer.prototype.unmount = function unmount() {
|
26756 | if (this._instance) {
|
26757 | ReactReconciler.unmountComponent(this._instance, false);
|
26758 | }
|
26759 | };
|
26760 |
|
26761 | ReactShallowRenderer.prototype._render = function _render(element, transaction, context) {
|
26762 | if (this._instance) {
|
26763 | ReactReconciler.receiveComponent(this._instance, element, transaction, context);
|
26764 | } else {
|
26765 | var instance = new ShallowComponentWrapper(element);
|
26766 | ReactReconciler.mountComponent(instance, transaction, null, null, context, 0);
|
26767 | this._instance = instance;
|
26768 | }
|
26769 | };
|
26770 |
|
26771 | return ReactShallowRenderer;
|
26772 | }();
|
26773 |
|
26774 | module.exports = ReactShallowRenderer;
|
26775 |
|
26776 | },
|
26777 |
|
26778 | function(module, exports, __webpack_require__) {
|
26779 |
|
26780 | |
26781 |
|
26782 |
|
26783 |
|
26784 |
|
26785 |
|
26786 |
|
26787 |
|
26788 |
|
26789 |
|
26790 | 'use strict';
|
26791 |
|
26792 | var _prodInvariant = __webpack_require__(6),
|
26793 | _assign = __webpack_require__(7);
|
26794 |
|
26795 | var EventConstants = __webpack_require__(193);
|
26796 | var EventPluginHub = __webpack_require__(26);
|
26797 | var EventPluginRegistry = __webpack_require__(29);
|
26798 | var EventPropagators = __webpack_require__(27);
|
26799 | var React = __webpack_require__(15);
|
26800 | var ReactDOM = __webpack_require__(74);
|
26801 | var ReactDOMComponentTree = __webpack_require__(8);
|
26802 | var ReactBrowserEventEmitter = __webpack_require__(30);
|
26803 | var ReactInstanceMap = __webpack_require__(20);
|
26804 | var ReactUpdates = __webpack_require__(13);
|
26805 | var SyntheticEvent = __webpack_require__(14);
|
26806 | var ReactShallowRenderer = __webpack_require__(228);
|
26807 |
|
26808 | var findDOMNode = __webpack_require__(88);
|
26809 | var invariant = __webpack_require__(4);
|
26810 |
|
26811 | var topLevelTypes = EventConstants.topLevelTypes;
|
26812 |
|
26813 | function Event(suffix) {}
|
26814 |
|
26815 | |
26816 |
|
26817 |
|
26818 |
|
26819 | function findAllInRenderedTreeInternal(inst, test) {
|
26820 | if (!inst || !inst.getPublicInstance) {
|
26821 | return [];
|
26822 | }
|
26823 | var publicInst = inst.getPublicInstance();
|
26824 | var ret = test(publicInst) ? [publicInst] : [];
|
26825 | var currentElement = inst._currentElement;
|
26826 | if (ReactTestUtils.isDOMComponent(publicInst)) {
|
26827 | var renderedChildren = inst._renderedChildren;
|
26828 | var key;
|
26829 | for (key in renderedChildren) {
|
26830 | if (!renderedChildren.hasOwnProperty(key)) {
|
26831 | continue;
|
26832 | }
|
26833 | ret = ret.concat(findAllInRenderedTreeInternal(renderedChildren[key], test));
|
26834 | }
|
26835 | } else if (React.isValidElement(currentElement) && typeof currentElement.type === 'function') {
|
26836 | ret = ret.concat(findAllInRenderedTreeInternal(inst._renderedComponent, test));
|
26837 | }
|
26838 | return ret;
|
26839 | }
|
26840 |
|
26841 | |
26842 |
|
26843 |
|
26844 |
|
26845 |
|
26846 |
|
26847 |
|
26848 |
|
26849 |
|
26850 | var ReactTestUtils = {
|
26851 | renderIntoDocument: function (element) {
|
26852 | var div = document.createElement('div');
|
26853 |
|
26854 |
|
26855 |
|
26856 |
|
26857 |
|
26858 | return ReactDOM.render(element, div);
|
26859 | },
|
26860 |
|
26861 | isElement: function (element) {
|
26862 | return React.isValidElement(element);
|
26863 | },
|
26864 |
|
26865 | isElementOfType: function (inst, convenienceConstructor) {
|
26866 | return React.isValidElement(inst) && inst.type === convenienceConstructor;
|
26867 | },
|
26868 |
|
26869 | isDOMComponent: function (inst) {
|
26870 | return !!(inst && inst.nodeType === 1 && inst.tagName);
|
26871 | },
|
26872 |
|
26873 | isDOMComponentElement: function (inst) {
|
26874 | return !!(inst && React.isValidElement(inst) && !!inst.tagName);
|
26875 | },
|
26876 |
|
26877 | isCompositeComponent: function (inst) {
|
26878 | if (ReactTestUtils.isDOMComponent(inst)) {
|
26879 |
|
26880 |
|
26881 | return false;
|
26882 | }
|
26883 | return inst != null && typeof inst.render === 'function' && typeof inst.setState === 'function';
|
26884 | },
|
26885 |
|
26886 | isCompositeComponentWithType: function (inst, type) {
|
26887 | if (!ReactTestUtils.isCompositeComponent(inst)) {
|
26888 | return false;
|
26889 | }
|
26890 | var internalInstance = ReactInstanceMap.get(inst);
|
26891 | var constructor = internalInstance._currentElement.type;
|
26892 |
|
26893 | return constructor === type;
|
26894 | },
|
26895 |
|
26896 | isCompositeComponentElement: function (inst) {
|
26897 | if (!React.isValidElement(inst)) {
|
26898 | return false;
|
26899 | }
|
26900 |
|
26901 |
|
26902 | var prototype = inst.type.prototype;
|
26903 | return typeof prototype.render === 'function' && typeof prototype.setState === 'function';
|
26904 | },
|
26905 |
|
26906 | isCompositeComponentElementWithType: function (inst, type) {
|
26907 | var internalInstance = ReactInstanceMap.get(inst);
|
26908 | var constructor = internalInstance._currentElement.type;
|
26909 |
|
26910 | return !!(ReactTestUtils.isCompositeComponentElement(inst) && constructor === type);
|
26911 | },
|
26912 |
|
26913 | getRenderedChildOfCompositeComponent: function (inst) {
|
26914 | if (!ReactTestUtils.isCompositeComponent(inst)) {
|
26915 | return null;
|
26916 | }
|
26917 | var internalInstance = ReactInstanceMap.get(inst);
|
26918 | return internalInstance._renderedComponent.getPublicInstance();
|
26919 | },
|
26920 |
|
26921 | findAllInRenderedTree: function (inst, test) {
|
26922 | if (!inst) {
|
26923 | return [];
|
26924 | }
|
26925 | !ReactTestUtils.isCompositeComponent(inst) ? true ? invariant(false, 'findAllInRenderedTree(...): instance must be a composite component') : _prodInvariant('10') : void 0;
|
26926 | return findAllInRenderedTreeInternal(ReactInstanceMap.get(inst), test);
|
26927 | },
|
26928 |
|
26929 | |
26930 |
|
26931 |
|
26932 |
|
26933 |
|
26934 | scryRenderedDOMComponentsWithClass: function (root, classNames) {
|
26935 | return ReactTestUtils.findAllInRenderedTree(root, function (inst) {
|
26936 | if (ReactTestUtils.isDOMComponent(inst)) {
|
26937 | var className = inst.className;
|
26938 | if (typeof className !== 'string') {
|
26939 |
|
26940 | className = inst.getAttribute('class') || '';
|
26941 | }
|
26942 | var classList = className.split(/\s+/);
|
26943 |
|
26944 | if (!Array.isArray(classNames)) {
|
26945 | !(classNames !== undefined) ? true ? invariant(false, 'TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument.') : _prodInvariant('11') : void 0;
|
26946 | classNames = classNames.split(/\s+/);
|
26947 | }
|
26948 | return classNames.every(function (name) {
|
26949 | return classList.indexOf(name) !== -1;
|
26950 | });
|
26951 | }
|
26952 | return false;
|
26953 | });
|
26954 | },
|
26955 |
|
26956 | |
26957 |
|
26958 |
|
26959 |
|
26960 |
|
26961 |
|
26962 | findRenderedDOMComponentWithClass: function (root, className) {
|
26963 | var all = ReactTestUtils.scryRenderedDOMComponentsWithClass(root, className);
|
26964 | if (all.length !== 1) {
|
26965 | throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for class:' + className);
|
26966 | }
|
26967 | return all[0];
|
26968 | },
|
26969 |
|
26970 | |
26971 |
|
26972 |
|
26973 |
|
26974 |
|
26975 | scryRenderedDOMComponentsWithTag: function (root, tagName) {
|
26976 | return ReactTestUtils.findAllInRenderedTree(root, function (inst) {
|
26977 | return ReactTestUtils.isDOMComponent(inst) && inst.tagName.toUpperCase() === tagName.toUpperCase();
|
26978 | });
|
26979 | },
|
26980 |
|
26981 | |
26982 |
|
26983 |
|
26984 |
|
26985 |
|
26986 |
|
26987 | findRenderedDOMComponentWithTag: function (root, tagName) {
|
26988 | var all = ReactTestUtils.scryRenderedDOMComponentsWithTag(root, tagName);
|
26989 | if (all.length !== 1) {
|
26990 | throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for tag:' + tagName);
|
26991 | }
|
26992 | return all[0];
|
26993 | },
|
26994 |
|
26995 | |
26996 |
|
26997 |
|
26998 |
|
26999 | scryRenderedComponentsWithType: function (root, componentType) {
|
27000 | return ReactTestUtils.findAllInRenderedTree(root, function (inst) {
|
27001 | return ReactTestUtils.isCompositeComponentWithType(inst, componentType);
|
27002 | });
|
27003 | },
|
27004 |
|
27005 | |
27006 |
|
27007 |
|
27008 |
|
27009 |
|
27010 |
|
27011 | findRenderedComponentWithType: function (root, componentType) {
|
27012 | var all = ReactTestUtils.scryRenderedComponentsWithType(root, componentType);
|
27013 | if (all.length !== 1) {
|
27014 | throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for componentType:' + componentType);
|
27015 | }
|
27016 | return all[0];
|
27017 | },
|
27018 |
|
27019 | |
27020 |
|
27021 |
|
27022 |
|
27023 |
|
27024 |
|
27025 |
|
27026 |
|
27027 |
|
27028 |
|
27029 |
|
27030 |
|
27031 |
|
27032 | mockComponent: function (module, mockTagName) {
|
27033 | mockTagName = mockTagName || module.mockTagName || 'div';
|
27034 |
|
27035 | module.prototype.render.mockImplementation(function () {
|
27036 | return React.createElement(mockTagName, null, this.props.children);
|
27037 | });
|
27038 |
|
27039 | return this;
|
27040 | },
|
27041 |
|
27042 | |
27043 |
|
27044 |
|
27045 |
|
27046 |
|
27047 |
|
27048 |
|
27049 | simulateNativeEventOnNode: function (topLevelType, node, fakeNativeEvent) {
|
27050 | fakeNativeEvent.target = node;
|
27051 | ReactBrowserEventEmitter.ReactEventListener.dispatchEvent(topLevelType, fakeNativeEvent);
|
27052 | },
|
27053 |
|
27054 | |
27055 |
|
27056 |
|
27057 |
|
27058 |
|
27059 |
|
27060 |
|
27061 | simulateNativeEventOnDOMComponent: function (topLevelType, comp, fakeNativeEvent) {
|
27062 | ReactTestUtils.simulateNativeEventOnNode(topLevelType, findDOMNode(comp), fakeNativeEvent);
|
27063 | },
|
27064 |
|
27065 | nativeTouchData: function (x, y) {
|
27066 | return {
|
27067 | touches: [{ pageX: x, pageY: y }]
|
27068 | };
|
27069 | },
|
27070 |
|
27071 | createRenderer: function () {
|
27072 | return new ReactShallowRenderer();
|
27073 | },
|
27074 |
|
27075 | Simulate: null,
|
27076 | SimulateNative: {}
|
27077 | };
|
27078 |
|
27079 | |
27080 |
|
27081 |
|
27082 |
|
27083 |
|
27084 |
|
27085 |
|
27086 |
|
27087 | function makeSimulator(eventType) {
|
27088 | return function (domComponentOrNode, eventData) {
|
27089 | var node;
|
27090 | !!React.isValidElement(domComponentOrNode) ? true ? invariant(false, 'TestUtils.Simulate expects a component instance and not a ReactElement.TestUtils.Simulate will not work if you are using shallow rendering.') : _prodInvariant('14') : void 0;
|
27091 | if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {
|
27092 | node = findDOMNode(domComponentOrNode);
|
27093 | } else if (domComponentOrNode.tagName) {
|
27094 | node = domComponentOrNode;
|
27095 | }
|
27096 |
|
27097 | var dispatchConfig = EventPluginRegistry.eventNameDispatchConfigs[eventType];
|
27098 |
|
27099 | var fakeNativeEvent = new Event();
|
27100 | fakeNativeEvent.target = node;
|
27101 | fakeNativeEvent.type = eventType.toLowerCase();
|
27102 |
|
27103 |
|
27104 |
|
27105 | var event = new SyntheticEvent(dispatchConfig, ReactDOMComponentTree.getInstanceFromNode(node), fakeNativeEvent, node);
|
27106 |
|
27107 |
|
27108 | event.persist();
|
27109 | _assign(event, eventData);
|
27110 |
|
27111 | if (dispatchConfig.phasedRegistrationNames) {
|
27112 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
27113 | } else {
|
27114 | EventPropagators.accumulateDirectDispatches(event);
|
27115 | }
|
27116 |
|
27117 | ReactUpdates.batchedUpdates(function () {
|
27118 | EventPluginHub.enqueueEvents(event);
|
27119 | EventPluginHub.processEventQueue(true);
|
27120 | });
|
27121 | };
|
27122 | }
|
27123 |
|
27124 | function buildSimulators() {
|
27125 | ReactTestUtils.Simulate = {};
|
27126 |
|
27127 | var eventType;
|
27128 | for (eventType in EventPluginRegistry.eventNameDispatchConfigs) {
|
27129 | |
27130 |
|
27131 |
|
27132 |
|
27133 | ReactTestUtils.Simulate[eventType] = makeSimulator(eventType);
|
27134 | }
|
27135 | }
|
27136 |
|
27137 |
|
27138 | var oldInjectEventPluginOrder = EventPluginHub.injection.injectEventPluginOrder;
|
27139 | EventPluginHub.injection.injectEventPluginOrder = function () {
|
27140 | oldInjectEventPluginOrder.apply(this, arguments);
|
27141 | buildSimulators();
|
27142 | };
|
27143 | var oldInjectEventPlugins = EventPluginHub.injection.injectEventPluginsByName;
|
27144 | EventPluginHub.injection.injectEventPluginsByName = function () {
|
27145 | oldInjectEventPlugins.apply(this, arguments);
|
27146 | buildSimulators();
|
27147 | };
|
27148 |
|
27149 | buildSimulators();
|
27150 |
|
27151 | |
27152 |
|
27153 |
|
27154 |
|
27155 |
|
27156 |
|
27157 |
|
27158 |
|
27159 |
|
27160 |
|
27161 |
|
27162 |
|
27163 |
|
27164 |
|
27165 |
|
27166 |
|
27167 | function makeNativeSimulator(eventType) {
|
27168 | return function (domComponentOrNode, nativeEventData) {
|
27169 | var fakeNativeEvent = new Event(eventType);
|
27170 | _assign(fakeNativeEvent, nativeEventData);
|
27171 | if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {
|
27172 | ReactTestUtils.simulateNativeEventOnDOMComponent(eventType, domComponentOrNode, fakeNativeEvent);
|
27173 | } else if (domComponentOrNode.tagName) {
|
27174 |
|
27175 | ReactTestUtils.simulateNativeEventOnNode(eventType, domComponentOrNode, fakeNativeEvent);
|
27176 | }
|
27177 | };
|
27178 | }
|
27179 |
|
27180 | Object.keys(topLevelTypes).forEach(function (eventType) {
|
27181 |
|
27182 | var convenienceName = eventType.indexOf('top') === 0 ? eventType.charAt(3).toLowerCase() + eventType.substr(4) : eventType;
|
27183 | |
27184 |
|
27185 |
|
27186 |
|
27187 | ReactTestUtils.SimulateNative[convenienceName] = makeNativeSimulator(eventType);
|
27188 | });
|
27189 |
|
27190 | module.exports = ReactTestUtils;
|
27191 |
|
27192 | },
|
27193 |
|
27194 | function(module, exports) {
|
27195 |
|
27196 | |
27197 |
|
27198 |
|
27199 |
|
27200 |
|
27201 |
|
27202 |
|
27203 |
|
27204 |
|
27205 |
|
27206 | 'use strict';
|
27207 |
|
27208 | module.exports = '15.4.1';
|
27209 |
|
27210 | },
|
27211 |
|
27212 | function(module, exports) {
|
27213 |
|
27214 | |
27215 |
|
27216 |
|
27217 |
|
27218 |
|
27219 |
|
27220 |
|
27221 |
|
27222 |
|
27223 |
|
27224 | 'use strict';
|
27225 |
|
27226 | var NS = {
|
27227 | xlink: 'http://www.w3.org/1999/xlink',
|
27228 | xml: 'http://www.w3.org/XML/1998/namespace'
|
27229 | };
|
27230 |
|
27231 |
|
27232 |
|
27233 |
|
27234 |
|
27235 |
|
27236 |
|
27237 |
|
27238 |
|
27239 |
|
27240 |
|
27241 |
|
27242 |
|
27243 |
|
27244 |
|
27245 |
|
27246 |
|
27247 |
|
27248 | var ATTRS = {
|
27249 | accentHeight: 'accent-height',
|
27250 | accumulate: 0,
|
27251 | additive: 0,
|
27252 | alignmentBaseline: 'alignment-baseline',
|
27253 | allowReorder: 'allowReorder',
|
27254 | alphabetic: 0,
|
27255 | amplitude: 0,
|
27256 | arabicForm: 'arabic-form',
|
27257 | ascent: 0,
|
27258 | attributeName: 'attributeName',
|
27259 | attributeType: 'attributeType',
|
27260 | autoReverse: 'autoReverse',
|
27261 | azimuth: 0,
|
27262 | baseFrequency: 'baseFrequency',
|
27263 | baseProfile: 'baseProfile',
|
27264 | baselineShift: 'baseline-shift',
|
27265 | bbox: 0,
|
27266 | begin: 0,
|
27267 | bias: 0,
|
27268 | by: 0,
|
27269 | calcMode: 'calcMode',
|
27270 | capHeight: 'cap-height',
|
27271 | clip: 0,
|
27272 | clipPath: 'clip-path',
|
27273 | clipRule: 'clip-rule',
|
27274 | clipPathUnits: 'clipPathUnits',
|
27275 | colorInterpolation: 'color-interpolation',
|
27276 | colorInterpolationFilters: 'color-interpolation-filters',
|
27277 | colorProfile: 'color-profile',
|
27278 | colorRendering: 'color-rendering',
|
27279 | contentScriptType: 'contentScriptType',
|
27280 | contentStyleType: 'contentStyleType',
|
27281 | cursor: 0,
|
27282 | cx: 0,
|
27283 | cy: 0,
|
27284 | d: 0,
|
27285 | decelerate: 0,
|
27286 | descent: 0,
|
27287 | diffuseConstant: 'diffuseConstant',
|
27288 | direction: 0,
|
27289 | display: 0,
|
27290 | divisor: 0,
|
27291 | dominantBaseline: 'dominant-baseline',
|
27292 | dur: 0,
|
27293 | dx: 0,
|
27294 | dy: 0,
|
27295 | edgeMode: 'edgeMode',
|
27296 | elevation: 0,
|
27297 | enableBackground: 'enable-background',
|
27298 | end: 0,
|
27299 | exponent: 0,
|
27300 | externalResourcesRequired: 'externalResourcesRequired',
|
27301 | fill: 0,
|
27302 | fillOpacity: 'fill-opacity',
|
27303 | fillRule: 'fill-rule',
|
27304 | filter: 0,
|
27305 | filterRes: 'filterRes',
|
27306 | filterUnits: 'filterUnits',
|
27307 | floodColor: 'flood-color',
|
27308 | floodOpacity: 'flood-opacity',
|
27309 | focusable: 0,
|
27310 | fontFamily: 'font-family',
|
27311 | fontSize: 'font-size',
|
27312 | fontSizeAdjust: 'font-size-adjust',
|
27313 | fontStretch: 'font-stretch',
|
27314 | fontStyle: 'font-style',
|
27315 | fontVariant: 'font-variant',
|
27316 | fontWeight: 'font-weight',
|
27317 | format: 0,
|
27318 | from: 0,
|
27319 | fx: 0,
|
27320 | fy: 0,
|
27321 | g1: 0,
|
27322 | g2: 0,
|
27323 | glyphName: 'glyph-name',
|
27324 | glyphOrientationHorizontal: 'glyph-orientation-horizontal',
|
27325 | glyphOrientationVertical: 'glyph-orientation-vertical',
|
27326 | glyphRef: 'glyphRef',
|
27327 | gradientTransform: 'gradientTransform',
|
27328 | gradientUnits: 'gradientUnits',
|
27329 | hanging: 0,
|
27330 | horizAdvX: 'horiz-adv-x',
|
27331 | horizOriginX: 'horiz-origin-x',
|
27332 | ideographic: 0,
|
27333 | imageRendering: 'image-rendering',
|
27334 | 'in': 0,
|
27335 | in2: 0,
|
27336 | intercept: 0,
|
27337 | k: 0,
|
27338 | k1: 0,
|
27339 | k2: 0,
|
27340 | k3: 0,
|
27341 | k4: 0,
|
27342 | kernelMatrix: 'kernelMatrix',
|
27343 | kernelUnitLength: 'kernelUnitLength',
|
27344 | kerning: 0,
|
27345 | keyPoints: 'keyPoints',
|
27346 | keySplines: 'keySplines',
|
27347 | keyTimes: 'keyTimes',
|
27348 | lengthAdjust: 'lengthAdjust',
|
27349 | letterSpacing: 'letter-spacing',
|
27350 | lightingColor: 'lighting-color',
|
27351 | limitingConeAngle: 'limitingConeAngle',
|
27352 | local: 0,
|
27353 | markerEnd: 'marker-end',
|
27354 | markerMid: 'marker-mid',
|
27355 | markerStart: 'marker-start',
|
27356 | markerHeight: 'markerHeight',
|
27357 | markerUnits: 'markerUnits',
|
27358 | markerWidth: 'markerWidth',
|
27359 | mask: 0,
|
27360 | maskContentUnits: 'maskContentUnits',
|
27361 | maskUnits: 'maskUnits',
|
27362 | mathematical: 0,
|
27363 | mode: 0,
|
27364 | numOctaves: 'numOctaves',
|
27365 | offset: 0,
|
27366 | opacity: 0,
|
27367 | operator: 0,
|
27368 | order: 0,
|
27369 | orient: 0,
|
27370 | orientation: 0,
|
27371 | origin: 0,
|
27372 | overflow: 0,
|
27373 | overlinePosition: 'overline-position',
|
27374 | overlineThickness: 'overline-thickness',
|
27375 | paintOrder: 'paint-order',
|
27376 | panose1: 'panose-1',
|
27377 | pathLength: 'pathLength',
|
27378 | patternContentUnits: 'patternContentUnits',
|
27379 | patternTransform: 'patternTransform',
|
27380 | patternUnits: 'patternUnits',
|
27381 | pointerEvents: 'pointer-events',
|
27382 | points: 0,
|
27383 | pointsAtX: 'pointsAtX',
|
27384 | pointsAtY: 'pointsAtY',
|
27385 | pointsAtZ: 'pointsAtZ',
|
27386 | preserveAlpha: 'preserveAlpha',
|
27387 | preserveAspectRatio: 'preserveAspectRatio',
|
27388 | primitiveUnits: 'primitiveUnits',
|
27389 | r: 0,
|
27390 | radius: 0,
|
27391 | refX: 'refX',
|
27392 | refY: 'refY',
|
27393 | renderingIntent: 'rendering-intent',
|
27394 | repeatCount: 'repeatCount',
|
27395 | repeatDur: 'repeatDur',
|
27396 | requiredExtensions: 'requiredExtensions',
|
27397 | requiredFeatures: 'requiredFeatures',
|
27398 | restart: 0,
|
27399 | result: 0,
|
27400 | rotate: 0,
|
27401 | rx: 0,
|
27402 | ry: 0,
|
27403 | scale: 0,
|
27404 | seed: 0,
|
27405 | shapeRendering: 'shape-rendering',
|
27406 | slope: 0,
|
27407 | spacing: 0,
|
27408 | specularConstant: 'specularConstant',
|
27409 | specularExponent: 'specularExponent',
|
27410 | speed: 0,
|
27411 | spreadMethod: 'spreadMethod',
|
27412 | startOffset: 'startOffset',
|
27413 | stdDeviation: 'stdDeviation',
|
27414 | stemh: 0,
|
27415 | stemv: 0,
|
27416 | stitchTiles: 'stitchTiles',
|
27417 | stopColor: 'stop-color',
|
27418 | stopOpacity: 'stop-opacity',
|
27419 | strikethroughPosition: 'strikethrough-position',
|
27420 | strikethroughThickness: 'strikethrough-thickness',
|
27421 | string: 0,
|
27422 | stroke: 0,
|
27423 | strokeDasharray: 'stroke-dasharray',
|
27424 | strokeDashoffset: 'stroke-dashoffset',
|
27425 | strokeLinecap: 'stroke-linecap',
|
27426 | strokeLinejoin: 'stroke-linejoin',
|
27427 | strokeMiterlimit: 'stroke-miterlimit',
|
27428 | strokeOpacity: 'stroke-opacity',
|
27429 | strokeWidth: 'stroke-width',
|
27430 | surfaceScale: 'surfaceScale',
|
27431 | systemLanguage: 'systemLanguage',
|
27432 | tableValues: 'tableValues',
|
27433 | targetX: 'targetX',
|
27434 | targetY: 'targetY',
|
27435 | textAnchor: 'text-anchor',
|
27436 | textDecoration: 'text-decoration',
|
27437 | textRendering: 'text-rendering',
|
27438 | textLength: 'textLength',
|
27439 | to: 0,
|
27440 | transform: 0,
|
27441 | u1: 0,
|
27442 | u2: 0,
|
27443 | underlinePosition: 'underline-position',
|
27444 | underlineThickness: 'underline-thickness',
|
27445 | unicode: 0,
|
27446 | unicodeBidi: 'unicode-bidi',
|
27447 | unicodeRange: 'unicode-range',
|
27448 | unitsPerEm: 'units-per-em',
|
27449 | vAlphabetic: 'v-alphabetic',
|
27450 | vHanging: 'v-hanging',
|
27451 | vIdeographic: 'v-ideographic',
|
27452 | vMathematical: 'v-mathematical',
|
27453 | values: 0,
|
27454 | vectorEffect: 'vector-effect',
|
27455 | version: 0,
|
27456 | vertAdvY: 'vert-adv-y',
|
27457 | vertOriginX: 'vert-origin-x',
|
27458 | vertOriginY: 'vert-origin-y',
|
27459 | viewBox: 'viewBox',
|
27460 | viewTarget: 'viewTarget',
|
27461 | visibility: 0,
|
27462 | widths: 0,
|
27463 | wordSpacing: 'word-spacing',
|
27464 | writingMode: 'writing-mode',
|
27465 | x: 0,
|
27466 | xHeight: 'x-height',
|
27467 | x1: 0,
|
27468 | x2: 0,
|
27469 | xChannelSelector: 'xChannelSelector',
|
27470 | xlinkActuate: 'xlink:actuate',
|
27471 | xlinkArcrole: 'xlink:arcrole',
|
27472 | xlinkHref: 'xlink:href',
|
27473 | xlinkRole: 'xlink:role',
|
27474 | xlinkShow: 'xlink:show',
|
27475 | xlinkTitle: 'xlink:title',
|
27476 | xlinkType: 'xlink:type',
|
27477 | xmlBase: 'xml:base',
|
27478 | xmlns: 0,
|
27479 | xmlnsXlink: 'xmlns:xlink',
|
27480 | xmlLang: 'xml:lang',
|
27481 | xmlSpace: 'xml:space',
|
27482 | y: 0,
|
27483 | y1: 0,
|
27484 | y2: 0,
|
27485 | yChannelSelector: 'yChannelSelector',
|
27486 | z: 0,
|
27487 | zoomAndPan: 'zoomAndPan'
|
27488 | };
|
27489 |
|
27490 | var SVGDOMPropertyConfig = {
|
27491 | Properties: {},
|
27492 | DOMAttributeNamespaces: {
|
27493 | xlinkActuate: NS.xlink,
|
27494 | xlinkArcrole: NS.xlink,
|
27495 | xlinkHref: NS.xlink,
|
27496 | xlinkRole: NS.xlink,
|
27497 | xlinkShow: NS.xlink,
|
27498 | xlinkTitle: NS.xlink,
|
27499 | xlinkType: NS.xlink,
|
27500 | xmlBase: NS.xml,
|
27501 | xmlLang: NS.xml,
|
27502 | xmlSpace: NS.xml
|
27503 | },
|
27504 | DOMAttributeNames: {}
|
27505 | };
|
27506 |
|
27507 | Object.keys(ATTRS).forEach(function (key) {
|
27508 | SVGDOMPropertyConfig.Properties[key] = 0;
|
27509 | if (ATTRS[key]) {
|
27510 | SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];
|
27511 | }
|
27512 | });
|
27513 |
|
27514 | module.exports = SVGDOMPropertyConfig;
|
27515 |
|
27516 | },
|
27517 |
|
27518 | function(module, exports, __webpack_require__) {
|
27519 |
|
27520 | |
27521 |
|
27522 |
|
27523 |
|
27524 |
|
27525 |
|
27526 |
|
27527 |
|
27528 |
|
27529 |
|
27530 | 'use strict';
|
27531 |
|
27532 | var EventPropagators = __webpack_require__(27);
|
27533 | var ExecutionEnvironment = __webpack_require__(9);
|
27534 | var ReactDOMComponentTree = __webpack_require__(8);
|
27535 | var ReactInputSelection = __webpack_require__(82);
|
27536 | var SyntheticEvent = __webpack_require__(14);
|
27537 |
|
27538 | var getActiveElement = __webpack_require__(69);
|
27539 | var isTextInputElement = __webpack_require__(95);
|
27540 | var shallowEqual = __webpack_require__(39);
|
27541 |
|
27542 | var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
|
27543 |
|
27544 | var eventTypes = {
|
27545 | select: {
|
27546 | phasedRegistrationNames: {
|
27547 | bubbled: 'onSelect',
|
27548 | captured: 'onSelectCapture'
|
27549 | },
|
27550 | dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange']
|
27551 | }
|
27552 | };
|
27553 |
|
27554 | var activeElement = null;
|
27555 | var activeElementInst = null;
|
27556 | var lastSelection = null;
|
27557 | var mouseDown = false;
|
27558 |
|
27559 |
|
27560 |
|
27561 | var hasListener = false;
|
27562 |
|
27563 | |
27564 |
|
27565 |
|
27566 |
|
27567 |
|
27568 |
|
27569 |
|
27570 |
|
27571 |
|
27572 | function getSelection(node) {
|
27573 | if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) {
|
27574 | return {
|
27575 | start: node.selectionStart,
|
27576 | end: node.selectionEnd
|
27577 | };
|
27578 | } else if (window.getSelection) {
|
27579 | var selection = window.getSelection();
|
27580 | return {
|
27581 | anchorNode: selection.anchorNode,
|
27582 | anchorOffset: selection.anchorOffset,
|
27583 | focusNode: selection.focusNode,
|
27584 | focusOffset: selection.focusOffset
|
27585 | };
|
27586 | } else if (document.selection) {
|
27587 | var range = document.selection.createRange();
|
27588 | return {
|
27589 | parentElement: range.parentElement(),
|
27590 | text: range.text,
|
27591 | top: range.boundingTop,
|
27592 | left: range.boundingLeft
|
27593 | };
|
27594 | }
|
27595 | }
|
27596 |
|
27597 | |
27598 |
|
27599 |
|
27600 |
|
27601 |
|
27602 |
|
27603 | function constructSelectEvent(nativeEvent, nativeEventTarget) {
|
27604 |
|
27605 |
|
27606 |
|
27607 |
|
27608 | if (mouseDown || activeElement == null || activeElement !== getActiveElement()) {
|
27609 | return null;
|
27610 | }
|
27611 |
|
27612 |
|
27613 | var currentSelection = getSelection(activeElement);
|
27614 | if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
|
27615 | lastSelection = currentSelection;
|
27616 |
|
27617 | var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget);
|
27618 |
|
27619 | syntheticEvent.type = 'select';
|
27620 | syntheticEvent.target = activeElement;
|
27621 |
|
27622 | EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);
|
27623 |
|
27624 | return syntheticEvent;
|
27625 | }
|
27626 |
|
27627 | return null;
|
27628 | }
|
27629 |
|
27630 | |
27631 |
|
27632 |
|
27633 |
|
27634 |
|
27635 |
|
27636 |
|
27637 |
|
27638 |
|
27639 |
|
27640 |
|
27641 |
|
27642 |
|
27643 |
|
27644 | var SelectEventPlugin = {
|
27645 |
|
27646 | eventTypes: eventTypes,
|
27647 |
|
27648 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
27649 | if (!hasListener) {
|
27650 | return null;
|
27651 | }
|
27652 |
|
27653 | var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
|
27654 |
|
27655 | switch (topLevelType) {
|
27656 |
|
27657 | case 'topFocus':
|
27658 | if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
|
27659 | activeElement = targetNode;
|
27660 | activeElementInst = targetInst;
|
27661 | lastSelection = null;
|
27662 | }
|
27663 | break;
|
27664 | case 'topBlur':
|
27665 | activeElement = null;
|
27666 | activeElementInst = null;
|
27667 | lastSelection = null;
|
27668 | break;
|
27669 |
|
27670 |
|
27671 |
|
27672 | case 'topMouseDown':
|
27673 | mouseDown = true;
|
27674 | break;
|
27675 | case 'topContextMenu':
|
27676 | case 'topMouseUp':
|
27677 | mouseDown = false;
|
27678 | return constructSelectEvent(nativeEvent, nativeEventTarget);
|
27679 |
|
27680 |
|
27681 |
|
27682 |
|
27683 |
|
27684 |
|
27685 |
|
27686 |
|
27687 |
|
27688 |
|
27689 | case 'topSelectionChange':
|
27690 | if (skipSelectionChangeEvent) {
|
27691 | break;
|
27692 | }
|
27693 |
|
27694 | case 'topKeyDown':
|
27695 | case 'topKeyUp':
|
27696 | return constructSelectEvent(nativeEvent, nativeEventTarget);
|
27697 | }
|
27698 |
|
27699 | return null;
|
27700 | },
|
27701 |
|
27702 | didPutListener: function (inst, registrationName, listener) {
|
27703 | if (registrationName === 'onSelect') {
|
27704 | hasListener = true;
|
27705 | }
|
27706 | }
|
27707 | };
|
27708 |
|
27709 | module.exports = SelectEventPlugin;
|
27710 |
|
27711 | },
|
27712 |
|
27713 | function(module, exports, __webpack_require__) {
|
27714 |
|
27715 | |
27716 |
|
27717 |
|
27718 |
|
27719 |
|
27720 |
|
27721 |
|
27722 |
|
27723 |
|
27724 |
|
27725 |
|
27726 | 'use strict';
|
27727 |
|
27728 | var _prodInvariant = __webpack_require__(6);
|
27729 |
|
27730 | var EventListener = __webpack_require__(67);
|
27731 | var EventPropagators = __webpack_require__(27);
|
27732 | var ReactDOMComponentTree = __webpack_require__(8);
|
27733 | var SyntheticAnimationEvent = __webpack_require__(234);
|
27734 | var SyntheticClipboardEvent = __webpack_require__(235);
|
27735 | var SyntheticEvent = __webpack_require__(14);
|
27736 | var SyntheticFocusEvent = __webpack_require__(238);
|
27737 | var SyntheticKeyboardEvent = __webpack_require__(240);
|
27738 | var SyntheticMouseEvent = __webpack_require__(34);
|
27739 | var SyntheticDragEvent = __webpack_require__(237);
|
27740 | var SyntheticTouchEvent = __webpack_require__(241);
|
27741 | var SyntheticTransitionEvent = __webpack_require__(242);
|
27742 | var SyntheticUIEvent = __webpack_require__(31);
|
27743 | var SyntheticWheelEvent = __webpack_require__(243);
|
27744 |
|
27745 | var emptyFunction = __webpack_require__(11);
|
27746 | var getEventCharCode = __webpack_require__(49);
|
27747 | var invariant = __webpack_require__(4);
|
27748 |
|
27749 | |
27750 |
|
27751 |
|
27752 |
|
27753 |
|
27754 |
|
27755 |
|
27756 |
|
27757 |
|
27758 |
|
27759 |
|
27760 |
|
27761 |
|
27762 |
|
27763 |
|
27764 |
|
27765 |
|
27766 |
|
27767 | var eventTypes = {};
|
27768 | var topLevelEventsToDispatchConfig = {};
|
27769 | ['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) {
|
27770 | var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
|
27771 | var onEvent = 'on' + capitalizedEvent;
|
27772 | var topEvent = 'top' + capitalizedEvent;
|
27773 |
|
27774 | var type = {
|
27775 | phasedRegistrationNames: {
|
27776 | bubbled: onEvent,
|
27777 | captured: onEvent + 'Capture'
|
27778 | },
|
27779 | dependencies: [topEvent]
|
27780 | };
|
27781 | eventTypes[event] = type;
|
27782 | topLevelEventsToDispatchConfig[topEvent] = type;
|
27783 | });
|
27784 |
|
27785 | var onClickListeners = {};
|
27786 |
|
27787 | function getDictionaryKey(inst) {
|
27788 |
|
27789 |
|
27790 | return '.' + inst._rootNodeID;
|
27791 | }
|
27792 |
|
27793 | function isInteractive(tag) {
|
27794 | return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
|
27795 | }
|
27796 |
|
27797 | var SimpleEventPlugin = {
|
27798 |
|
27799 | eventTypes: eventTypes,
|
27800 |
|
27801 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
27802 | var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
|
27803 | if (!dispatchConfig) {
|
27804 | return null;
|
27805 | }
|
27806 | var EventConstructor;
|
27807 | switch (topLevelType) {
|
27808 | case 'topAbort':
|
27809 | case 'topCanPlay':
|
27810 | case 'topCanPlayThrough':
|
27811 | case 'topDurationChange':
|
27812 | case 'topEmptied':
|
27813 | case 'topEncrypted':
|
27814 | case 'topEnded':
|
27815 | case 'topError':
|
27816 | case 'topInput':
|
27817 | case 'topInvalid':
|
27818 | case 'topLoad':
|
27819 | case 'topLoadedData':
|
27820 | case 'topLoadedMetadata':
|
27821 | case 'topLoadStart':
|
27822 | case 'topPause':
|
27823 | case 'topPlay':
|
27824 | case 'topPlaying':
|
27825 | case 'topProgress':
|
27826 | case 'topRateChange':
|
27827 | case 'topReset':
|
27828 | case 'topSeeked':
|
27829 | case 'topSeeking':
|
27830 | case 'topStalled':
|
27831 | case 'topSubmit':
|
27832 | case 'topSuspend':
|
27833 | case 'topTimeUpdate':
|
27834 | case 'topVolumeChange':
|
27835 | case 'topWaiting':
|
27836 |
|
27837 |
|
27838 | EventConstructor = SyntheticEvent;
|
27839 | break;
|
27840 | case 'topKeyPress':
|
27841 |
|
27842 |
|
27843 |
|
27844 | if (getEventCharCode(nativeEvent) === 0) {
|
27845 | return null;
|
27846 | }
|
27847 |
|
27848 | case 'topKeyDown':
|
27849 | case 'topKeyUp':
|
27850 | EventConstructor = SyntheticKeyboardEvent;
|
27851 | break;
|
27852 | case 'topBlur':
|
27853 | case 'topFocus':
|
27854 | EventConstructor = SyntheticFocusEvent;
|
27855 | break;
|
27856 | case 'topClick':
|
27857 |
|
27858 |
|
27859 | if (nativeEvent.button === 2) {
|
27860 | return null;
|
27861 | }
|
27862 |
|
27863 | case 'topDoubleClick':
|
27864 | case 'topMouseDown':
|
27865 | case 'topMouseMove':
|
27866 | case 'topMouseUp':
|
27867 |
|
27868 |
|
27869 | case 'topMouseOut':
|
27870 | case 'topMouseOver':
|
27871 | case 'topContextMenu':
|
27872 | EventConstructor = SyntheticMouseEvent;
|
27873 | break;
|
27874 | case 'topDrag':
|
27875 | case 'topDragEnd':
|
27876 | case 'topDragEnter':
|
27877 | case 'topDragExit':
|
27878 | case 'topDragLeave':
|
27879 | case 'topDragOver':
|
27880 | case 'topDragStart':
|
27881 | case 'topDrop':
|
27882 | EventConstructor = SyntheticDragEvent;
|
27883 | break;
|
27884 | case 'topTouchCancel':
|
27885 | case 'topTouchEnd':
|
27886 | case 'topTouchMove':
|
27887 | case 'topTouchStart':
|
27888 | EventConstructor = SyntheticTouchEvent;
|
27889 | break;
|
27890 | case 'topAnimationEnd':
|
27891 | case 'topAnimationIteration':
|
27892 | case 'topAnimationStart':
|
27893 | EventConstructor = SyntheticAnimationEvent;
|
27894 | break;
|
27895 | case 'topTransitionEnd':
|
27896 | EventConstructor = SyntheticTransitionEvent;
|
27897 | break;
|
27898 | case 'topScroll':
|
27899 | EventConstructor = SyntheticUIEvent;
|
27900 | break;
|
27901 | case 'topWheel':
|
27902 | EventConstructor = SyntheticWheelEvent;
|
27903 | break;
|
27904 | case 'topCopy':
|
27905 | case 'topCut':
|
27906 | case 'topPaste':
|
27907 | EventConstructor = SyntheticClipboardEvent;
|
27908 | break;
|
27909 | }
|
27910 | !EventConstructor ? true ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0;
|
27911 | var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
|
27912 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
27913 | return event;
|
27914 | },
|
27915 |
|
27916 | didPutListener: function (inst, registrationName, listener) {
|
27917 |
|
27918 |
|
27919 |
|
27920 |
|
27921 |
|
27922 | if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
|
27923 | var key = getDictionaryKey(inst);
|
27924 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
27925 | if (!onClickListeners[key]) {
|
27926 | onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction);
|
27927 | }
|
27928 | }
|
27929 | },
|
27930 |
|
27931 | willDeleteListener: function (inst, registrationName) {
|
27932 | if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
|
27933 | var key = getDictionaryKey(inst);
|
27934 | onClickListeners[key].remove();
|
27935 | delete onClickListeners[key];
|
27936 | }
|
27937 | }
|
27938 |
|
27939 | };
|
27940 |
|
27941 | module.exports = SimpleEventPlugin;
|
27942 |
|
27943 | },
|
27944 |
|
27945 | function(module, exports, __webpack_require__) {
|
27946 |
|
27947 | |
27948 |
|
27949 |
|
27950 |
|
27951 |
|
27952 |
|
27953 |
|
27954 |
|
27955 |
|
27956 |
|
27957 | 'use strict';
|
27958 |
|
27959 | var SyntheticEvent = __webpack_require__(14);
|
27960 |
|
27961 | |
27962 |
|
27963 |
|
27964 |
|
27965 |
|
27966 | var AnimationEventInterface = {
|
27967 | animationName: null,
|
27968 | elapsedTime: null,
|
27969 | pseudoElement: null
|
27970 | };
|
27971 |
|
27972 | |
27973 |
|
27974 |
|
27975 |
|
27976 |
|
27977 |
|
27978 | function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
27979 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
27980 | }
|
27981 |
|
27982 | SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);
|
27983 |
|
27984 | module.exports = SyntheticAnimationEvent;
|
27985 |
|
27986 | },
|
27987 |
|
27988 | function(module, exports, __webpack_require__) {
|
27989 |
|
27990 | |
27991 |
|
27992 |
|
27993 |
|
27994 |
|
27995 |
|
27996 |
|
27997 |
|
27998 |
|
27999 |
|
28000 | 'use strict';
|
28001 |
|
28002 | var SyntheticEvent = __webpack_require__(14);
|
28003 |
|
28004 | |
28005 |
|
28006 |
|
28007 |
|
28008 | var ClipboardEventInterface = {
|
28009 | clipboardData: function (event) {
|
28010 | return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
|
28011 | }
|
28012 | };
|
28013 |
|
28014 | |
28015 |
|
28016 |
|
28017 |
|
28018 |
|
28019 |
|
28020 | function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
28021 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
28022 | }
|
28023 |
|
28024 | SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
|
28025 |
|
28026 | module.exports = SyntheticClipboardEvent;
|
28027 |
|
28028 | },
|
28029 |
|
28030 | function(module, exports, __webpack_require__) {
|
28031 |
|
28032 | |
28033 |
|
28034 |
|
28035 |
|
28036 |
|
28037 |
|
28038 |
|
28039 |
|
28040 |
|
28041 |
|
28042 | 'use strict';
|
28043 |
|
28044 | var SyntheticEvent = __webpack_require__(14);
|
28045 |
|
28046 | |
28047 |
|
28048 |
|
28049 |
|
28050 | var CompositionEventInterface = {
|
28051 | data: null
|
28052 | };
|
28053 |
|
28054 | |
28055 |
|
28056 |
|
28057 |
|
28058 |
|
28059 |
|
28060 | function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
28061 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
28062 | }
|
28063 |
|
28064 | SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
|
28065 |
|
28066 | module.exports = SyntheticCompositionEvent;
|
28067 |
|
28068 | },
|
28069 |
|
28070 | function(module, exports, __webpack_require__) {
|
28071 |
|
28072 | |
28073 |
|
28074 |
|
28075 |
|
28076 |
|
28077 |
|
28078 |
|
28079 |
|
28080 |
|
28081 |
|
28082 | 'use strict';
|
28083 |
|
28084 | var SyntheticMouseEvent = __webpack_require__(34);
|
28085 |
|
28086 | |
28087 |
|
28088 |
|
28089 |
|
28090 | var DragEventInterface = {
|
28091 | dataTransfer: null
|
28092 | };
|
28093 |
|
28094 | |
28095 |
|
28096 |
|
28097 |
|
28098 |
|
28099 |
|
28100 | function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
28101 | return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
28102 | }
|
28103 |
|
28104 | SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
|
28105 |
|
28106 | module.exports = SyntheticDragEvent;
|
28107 |
|
28108 | },
|
28109 |
|
28110 | function(module, exports, __webpack_require__) {
|
28111 |
|
28112 | |
28113 |
|
28114 |
|
28115 |
|
28116 |
|
28117 |
|
28118 |
|
28119 |
|
28120 |
|
28121 |
|
28122 | 'use strict';
|
28123 |
|
28124 | var SyntheticUIEvent = __webpack_require__(31);
|
28125 |
|
28126 | |
28127 |
|
28128 |
|
28129 |
|
28130 | var FocusEventInterface = {
|
28131 | relatedTarget: null
|
28132 | };
|
28133 |
|
28134 | |
28135 |
|
28136 |
|
28137 |
|
28138 |
|
28139 |
|
28140 | function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
28141 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
28142 | }
|
28143 |
|
28144 | SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
|
28145 |
|
28146 | module.exports = SyntheticFocusEvent;
|
28147 |
|
28148 | },
|
28149 |
|
28150 | function(module, exports, __webpack_require__) {
|
28151 |
|
28152 | |
28153 |
|
28154 |
|
28155 |
|
28156 |
|
28157 |
|
28158 |
|
28159 |
|
28160 |
|
28161 |
|
28162 | 'use strict';
|
28163 |
|
28164 | var SyntheticEvent = __webpack_require__(14);
|
28165 |
|
28166 | |
28167 |
|
28168 |
|
28169 |
|
28170 |
|
28171 | var InputEventInterface = {
|
28172 | data: null
|
28173 | };
|
28174 |
|
28175 | |
28176 |
|
28177 |
|
28178 |
|
28179 |
|
28180 |
|
28181 | function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
28182 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
28183 | }
|
28184 |
|
28185 | SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
|
28186 |
|
28187 | module.exports = SyntheticInputEvent;
|
28188 |
|
28189 | },
|
28190 |
|
28191 | function(module, exports, __webpack_require__) {
|
28192 |
|
28193 | |
28194 |
|
28195 |
|
28196 |
|
28197 |
|
28198 |
|
28199 |
|
28200 |
|
28201 |
|
28202 |
|
28203 | 'use strict';
|
28204 |
|
28205 | var SyntheticUIEvent = __webpack_require__(31);
|
28206 |
|
28207 | var getEventCharCode = __webpack_require__(49);
|
28208 | var getEventKey = __webpack_require__(248);
|
28209 | var getEventModifierState = __webpack_require__(50);
|
28210 |
|
28211 | |
28212 |
|
28213 |
|
28214 |
|
28215 | var KeyboardEventInterface = {
|
28216 | key: getEventKey,
|
28217 | location: null,
|
28218 | ctrlKey: null,
|
28219 | shiftKey: null,
|
28220 | altKey: null,
|
28221 | metaKey: null,
|
28222 | repeat: null,
|
28223 | locale: null,
|
28224 | getModifierState: getEventModifierState,
|
28225 |
|
28226 | charCode: function (event) {
|
28227 |
|
28228 |
|
28229 |
|
28230 |
|
28231 |
|
28232 | if (event.type === 'keypress') {
|
28233 | return getEventCharCode(event);
|
28234 | }
|
28235 | return 0;
|
28236 | },
|
28237 | keyCode: function (event) {
|
28238 |
|
28239 |
|
28240 |
|
28241 |
|
28242 |
|
28243 |
|
28244 |
|
28245 | if (event.type === 'keydown' || event.type === 'keyup') {
|
28246 | return event.keyCode;
|
28247 | }
|
28248 | return 0;
|
28249 | },
|
28250 | which: function (event) {
|
28251 |
|
28252 |
|
28253 | if (event.type === 'keypress') {
|
28254 | return getEventCharCode(event);
|
28255 | }
|
28256 | if (event.type === 'keydown' || event.type === 'keyup') {
|
28257 | return event.keyCode;
|
28258 | }
|
28259 | return 0;
|
28260 | }
|
28261 | };
|
28262 |
|
28263 | |
28264 |
|
28265 |
|
28266 |
|
28267 |
|
28268 |
|
28269 | function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
28270 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
28271 | }
|
28272 |
|
28273 | SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
|
28274 |
|
28275 | module.exports = SyntheticKeyboardEvent;
|
28276 |
|
28277 | },
|
28278 |
|
28279 | function(module, exports, __webpack_require__) {
|
28280 |
|
28281 | |
28282 |
|
28283 |
|
28284 |
|
28285 |
|
28286 |
|
28287 |
|
28288 |
|
28289 |
|
28290 |
|
28291 | 'use strict';
|
28292 |
|
28293 | var SyntheticUIEvent = __webpack_require__(31);
|
28294 |
|
28295 | var getEventModifierState = __webpack_require__(50);
|
28296 |
|
28297 | |
28298 |
|
28299 |
|
28300 |
|
28301 | var TouchEventInterface = {
|
28302 | touches: null,
|
28303 | targetTouches: null,
|
28304 | changedTouches: null,
|
28305 | altKey: null,
|
28306 | metaKey: null,
|
28307 | ctrlKey: null,
|
28308 | shiftKey: null,
|
28309 | getModifierState: getEventModifierState
|
28310 | };
|
28311 |
|
28312 | |
28313 |
|
28314 |
|
28315 |
|
28316 |
|
28317 |
|
28318 | function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
28319 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
28320 | }
|
28321 |
|
28322 | SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
|
28323 |
|
28324 | module.exports = SyntheticTouchEvent;
|
28325 |
|
28326 | },
|
28327 |
|
28328 | function(module, exports, __webpack_require__) {
|
28329 |
|
28330 | |
28331 |
|
28332 |
|
28333 |
|
28334 |
|
28335 |
|
28336 |
|
28337 |
|
28338 |
|
28339 |
|
28340 | 'use strict';
|
28341 |
|
28342 | var SyntheticEvent = __webpack_require__(14);
|
28343 |
|
28344 | |
28345 |
|
28346 |
|
28347 |
|
28348 |
|
28349 | var TransitionEventInterface = {
|
28350 | propertyName: null,
|
28351 | elapsedTime: null,
|
28352 | pseudoElement: null
|
28353 | };
|
28354 |
|
28355 | |
28356 |
|
28357 |
|
28358 |
|
28359 |
|
28360 |
|
28361 | function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
28362 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
28363 | }
|
28364 |
|
28365 | SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);
|
28366 |
|
28367 | module.exports = SyntheticTransitionEvent;
|
28368 |
|
28369 | },
|
28370 |
|
28371 | function(module, exports, __webpack_require__) {
|
28372 |
|
28373 | |
28374 |
|
28375 |
|
28376 |
|
28377 |
|
28378 |
|
28379 |
|
28380 |
|
28381 |
|
28382 |
|
28383 | 'use strict';
|
28384 |
|
28385 | var SyntheticMouseEvent = __webpack_require__(34);
|
28386 |
|
28387 | |
28388 |
|
28389 |
|
28390 |
|
28391 | var WheelEventInterface = {
|
28392 | deltaX: function (event) {
|
28393 | return 'deltaX' in event ? event.deltaX :
|
28394 |
|
28395 | 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
|
28396 | },
|
28397 | deltaY: function (event) {
|
28398 | return 'deltaY' in event ? event.deltaY :
|
28399 |
|
28400 | 'wheelDeltaY' in event ? -event.wheelDeltaY :
|
28401 |
|
28402 | 'wheelDelta' in event ? -event.wheelDelta : 0;
|
28403 | },
|
28404 | deltaZ: null,
|
28405 |
|
28406 |
|
28407 |
|
28408 |
|
28409 |
|
28410 | deltaMode: null
|
28411 | };
|
28412 |
|
28413 | |
28414 |
|
28415 |
|
28416 |
|
28417 |
|
28418 |
|
28419 | function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
28420 | return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
28421 | }
|
28422 |
|
28423 | SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
|
28424 |
|
28425 | module.exports = SyntheticWheelEvent;
|
28426 |
|
28427 | },
|
28428 |
|
28429 | function(module, exports) {
|
28430 |
|
28431 | |
28432 |
|
28433 |
|
28434 |
|
28435 |
|
28436 |
|
28437 |
|
28438 |
|
28439 |
|
28440 |
|
28441 |
|
28442 | 'use strict';
|
28443 |
|
28444 | var MOD = 65521;
|
28445 |
|
28446 |
|
28447 |
|
28448 |
|
28449 |
|
28450 |
|
28451 | function adler32(data) {
|
28452 | var a = 1;
|
28453 | var b = 0;
|
28454 | var i = 0;
|
28455 | var l = data.length;
|
28456 | var m = l & ~0x3;
|
28457 | while (i < m) {
|
28458 | var n = Math.min(i + 4096, m);
|
28459 | for (; i < n; i += 4) {
|
28460 | b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));
|
28461 | }
|
28462 | a %= MOD;
|
28463 | b %= MOD;
|
28464 | }
|
28465 | for (; i < l; i++) {
|
28466 | b += a += data.charCodeAt(i);
|
28467 | }
|
28468 | a %= MOD;
|
28469 | b %= MOD;
|
28470 | return a | b << 16;
|
28471 | }
|
28472 |
|
28473 | module.exports = adler32;
|
28474 |
|
28475 | },
|
28476 |
|
28477 | function(module, exports, __webpack_require__) {
|
28478 |
|
28479 | (function(process) { |
28480 |
|
28481 |
|
28482 |
|
28483 |
|
28484 |
|
28485 |
|
28486 |
|
28487 |
|
28488 |
|
28489 | 'use strict';
|
28490 |
|
28491 | var _prodInvariant = __webpack_require__(6);
|
28492 |
|
28493 | var ReactPropTypeLocationNames = __webpack_require__(223);
|
28494 | var ReactPropTypesSecret = __webpack_require__(85);
|
28495 |
|
28496 | var invariant = __webpack_require__(4);
|
28497 | var warning = __webpack_require__(5);
|
28498 |
|
28499 | var ReactComponentTreeHook;
|
28500 |
|
28501 | if (typeof process !== 'undefined' && process.env && ("development") === 'test') {
|
28502 |
|
28503 |
|
28504 |
|
28505 |
|
28506 |
|
28507 | ReactComponentTreeHook = __webpack_require__(10);
|
28508 | }
|
28509 |
|
28510 | var loggedTypeFailures = {};
|
28511 |
|
28512 | |
28513 |
|
28514 |
|
28515 |
|
28516 |
|
28517 |
|
28518 |
|
28519 |
|
28520 |
|
28521 |
|
28522 |
|
28523 |
|
28524 | function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
|
28525 | for (var typeSpecName in typeSpecs) {
|
28526 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
28527 | var error;
|
28528 |
|
28529 |
|
28530 |
|
28531 | try {
|
28532 |
|
28533 |
|
28534 | !(typeof typeSpecs[typeSpecName] === 'function') ? true ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
|
28535 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
28536 | } catch (ex) {
|
28537 | error = ex;
|
28538 | }
|
28539 | true ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
|
28540 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
28541 |
|
28542 |
|
28543 | loggedTypeFailures[error.message] = true;
|
28544 |
|
28545 | var componentStackInfo = '';
|
28546 |
|
28547 | if (true) {
|
28548 | if (!ReactComponentTreeHook) {
|
28549 | ReactComponentTreeHook = __webpack_require__(10);
|
28550 | }
|
28551 | if (debugID !== null) {
|
28552 | componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
|
28553 | } else if (element !== null) {
|
28554 | componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
|
28555 | }
|
28556 | }
|
28557 |
|
28558 | true ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
|
28559 | }
|
28560 | }
|
28561 | }
|
28562 | }
|
28563 |
|
28564 | module.exports = checkReactTypeSpec;
|
28565 | }.call(exports, __webpack_require__(28)))
|
28566 |
|
28567 | },
|
28568 |
|
28569 | function(module, exports, __webpack_require__) {
|
28570 |
|
28571 | |
28572 |
|
28573 |
|
28574 |
|
28575 |
|
28576 |
|
28577 |
|
28578 |
|
28579 |
|
28580 |
|
28581 | 'use strict';
|
28582 |
|
28583 | var CSSProperty = __webpack_require__(70);
|
28584 | var warning = __webpack_require__(5);
|
28585 |
|
28586 | var isUnitlessNumber = CSSProperty.isUnitlessNumber;
|
28587 | var styleWarnings = {};
|
28588 |
|
28589 | |
28590 |
|
28591 |
|
28592 |
|
28593 |
|
28594 |
|
28595 |
|
28596 |
|
28597 |
|
28598 |
|
28599 | function dangerousStyleValue(name, value, component) {
|
28600 |
|
28601 |
|
28602 |
|
28603 |
|
28604 |
|
28605 |
|
28606 |
|
28607 |
|
28608 |
|
28609 |
|
28610 | var isEmpty = value == null || typeof value === 'boolean' || value === '';
|
28611 | if (isEmpty) {
|
28612 | return '';
|
28613 | }
|
28614 |
|
28615 | var isNonNumeric = isNaN(value);
|
28616 | if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
|
28617 | return '' + value;
|
28618 | }
|
28619 |
|
28620 | if (typeof value === 'string') {
|
28621 | if (true) {
|
28622 |
|
28623 |
|
28624 | if (component && value !== '0') {
|
28625 | var owner = component._currentElement._owner;
|
28626 | var ownerName = owner ? owner.getName() : null;
|
28627 | if (ownerName && !styleWarnings[ownerName]) {
|
28628 | styleWarnings[ownerName] = {};
|
28629 | }
|
28630 | var warned = false;
|
28631 | if (ownerName) {
|
28632 | var warnings = styleWarnings[ownerName];
|
28633 | warned = warnings[name];
|
28634 | if (!warned) {
|
28635 | warnings[name] = true;
|
28636 | }
|
28637 | }
|
28638 | if (!warned) {
|
28639 | true ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0;
|
28640 | }
|
28641 | }
|
28642 | }
|
28643 | value = value.trim();
|
28644 | }
|
28645 | return value + 'px';
|
28646 | }
|
28647 |
|
28648 | module.exports = dangerousStyleValue;
|
28649 |
|
28650 | },
|
28651 |
|
28652 | function(module, exports, __webpack_require__) {
|
28653 |
|
28654 | (function(process) { |
28655 |
|
28656 |
|
28657 |
|
28658 |
|
28659 |
|
28660 |
|
28661 |
|
28662 |
|
28663 |
|
28664 |
|
28665 | 'use strict';
|
28666 |
|
28667 | var KeyEscapeUtils = __webpack_require__(43);
|
28668 | var traverseAllChildren = __webpack_require__(97);
|
28669 | var warning = __webpack_require__(5);
|
28670 |
|
28671 | var ReactComponentTreeHook;
|
28672 |
|
28673 | if (typeof process !== 'undefined' && process.env && ("development") === 'test') {
|
28674 |
|
28675 |
|
28676 |
|
28677 |
|
28678 |
|
28679 | ReactComponentTreeHook = __webpack_require__(10);
|
28680 | }
|
28681 |
|
28682 | |
28683 |
|
28684 |
|
28685 |
|
28686 |
|
28687 |
|
28688 | function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {
|
28689 |
|
28690 | if (traverseContext && typeof traverseContext === 'object') {
|
28691 | var result = traverseContext;
|
28692 | var keyUnique = result[name] === undefined;
|
28693 | if (true) {
|
28694 | if (!ReactComponentTreeHook) {
|
28695 | ReactComponentTreeHook = __webpack_require__(10);
|
28696 | }
|
28697 | if (!keyUnique) {
|
28698 | true ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
|
28699 | }
|
28700 | }
|
28701 | if (keyUnique && child != null) {
|
28702 | result[name] = child;
|
28703 | }
|
28704 | }
|
28705 | }
|
28706 |
|
28707 | |
28708 |
|
28709 |
|
28710 |
|
28711 |
|
28712 | function flattenChildren(children, selfDebugID) {
|
28713 | if (children == null) {
|
28714 | return children;
|
28715 | }
|
28716 | var result = {};
|
28717 |
|
28718 | if (true) {
|
28719 | traverseAllChildren(children, function (traverseContext, child, name) {
|
28720 | return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);
|
28721 | }, result);
|
28722 | } else {
|
28723 | traverseAllChildren(children, flattenSingleChildIntoContext, result);
|
28724 | }
|
28725 | return result;
|
28726 | }
|
28727 |
|
28728 | module.exports = flattenChildren;
|
28729 | }.call(exports, __webpack_require__(28)))
|
28730 |
|
28731 | },
|
28732 |
|
28733 | function(module, exports, __webpack_require__) {
|
28734 |
|
28735 | |
28736 |
|
28737 |
|
28738 |
|
28739 |
|
28740 |
|
28741 |
|
28742 |
|
28743 |
|
28744 |
|
28745 | 'use strict';
|
28746 |
|
28747 | var getEventCharCode = __webpack_require__(49);
|
28748 |
|
28749 | |
28750 |
|
28751 |
|
28752 |
|
28753 | var normalizeKey = {
|
28754 | 'Esc': 'Escape',
|
28755 | 'Spacebar': ' ',
|
28756 | 'Left': 'ArrowLeft',
|
28757 | 'Up': 'ArrowUp',
|
28758 | 'Right': 'ArrowRight',
|
28759 | 'Down': 'ArrowDown',
|
28760 | 'Del': 'Delete',
|
28761 | 'Win': 'OS',
|
28762 | 'Menu': 'ContextMenu',
|
28763 | 'Apps': 'ContextMenu',
|
28764 | 'Scroll': 'ScrollLock',
|
28765 | 'MozPrintableKey': 'Unidentified'
|
28766 | };
|
28767 |
|
28768 | |
28769 |
|
28770 |
|
28771 |
|
28772 |
|
28773 | var translateToKey = {
|
28774 | 8: 'Backspace',
|
28775 | 9: 'Tab',
|
28776 | 12: 'Clear',
|
28777 | 13: 'Enter',
|
28778 | 16: 'Shift',
|
28779 | 17: 'Control',
|
28780 | 18: 'Alt',
|
28781 | 19: 'Pause',
|
28782 | 20: 'CapsLock',
|
28783 | 27: 'Escape',
|
28784 | 32: ' ',
|
28785 | 33: 'PageUp',
|
28786 | 34: 'PageDown',
|
28787 | 35: 'End',
|
28788 | 36: 'Home',
|
28789 | 37: 'ArrowLeft',
|
28790 | 38: 'ArrowUp',
|
28791 | 39: 'ArrowRight',
|
28792 | 40: 'ArrowDown',
|
28793 | 45: 'Insert',
|
28794 | 46: 'Delete',
|
28795 | 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6',
|
28796 | 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12',
|
28797 | 144: 'NumLock',
|
28798 | 145: 'ScrollLock',
|
28799 | 224: 'Meta'
|
28800 | };
|
28801 |
|
28802 | |
28803 |
|
28804 |
|
28805 |
|
28806 | function getEventKey(nativeEvent) {
|
28807 | if (nativeEvent.key) {
|
28808 |
|
28809 |
|
28810 |
|
28811 |
|
28812 |
|
28813 | var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
|
28814 | if (key !== 'Unidentified') {
|
28815 | return key;
|
28816 | }
|
28817 | }
|
28818 |
|
28819 |
|
28820 | if (nativeEvent.type === 'keypress') {
|
28821 | var charCode = getEventCharCode(nativeEvent);
|
28822 |
|
28823 |
|
28824 |
|
28825 | return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
|
28826 | }
|
28827 | if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
|
28828 |
|
28829 |
|
28830 | return translateToKey[nativeEvent.keyCode] || 'Unidentified';
|
28831 | }
|
28832 | return '';
|
28833 | }
|
28834 |
|
28835 | module.exports = getEventKey;
|
28836 |
|
28837 | },
|
28838 |
|
28839 | function(module, exports) {
|
28840 |
|
28841 | |
28842 |
|
28843 |
|
28844 |
|
28845 |
|
28846 |
|
28847 |
|
28848 |
|
28849 |
|
28850 |
|
28851 |
|
28852 | 'use strict';
|
28853 |
|
28854 |
|
28855 |
|
28856 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
28857 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
28858 |
|
28859 | |
28860 |
|
28861 |
|
28862 |
|
28863 |
|
28864 |
|
28865 |
|
28866 |
|
28867 |
|
28868 |
|
28869 |
|
28870 |
|
28871 |
|
28872 |
|
28873 | function getIteratorFn(maybeIterable) {
|
28874 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
28875 | if (typeof iteratorFn === 'function') {
|
28876 | return iteratorFn;
|
28877 | }
|
28878 | }
|
28879 |
|
28880 | module.exports = getIteratorFn;
|
28881 |
|
28882 | },
|
28883 |
|
28884 | function(module, exports) {
|
28885 |
|
28886 | |
28887 |
|
28888 |
|
28889 |
|
28890 |
|
28891 |
|
28892 |
|
28893 |
|
28894 |
|
28895 |
|
28896 | 'use strict';
|
28897 |
|
28898 | |
28899 |
|
28900 |
|
28901 |
|
28902 |
|
28903 |
|
28904 |
|
28905 | function getLeafNode(node) {
|
28906 | while (node && node.firstChild) {
|
28907 | node = node.firstChild;
|
28908 | }
|
28909 | return node;
|
28910 | }
|
28911 |
|
28912 | |
28913 |
|
28914 |
|
28915 |
|
28916 |
|
28917 |
|
28918 |
|
28919 | function getSiblingNode(node) {
|
28920 | while (node) {
|
28921 | if (node.nextSibling) {
|
28922 | return node.nextSibling;
|
28923 | }
|
28924 | node = node.parentNode;
|
28925 | }
|
28926 | }
|
28927 |
|
28928 | |
28929 |
|
28930 |
|
28931 |
|
28932 |
|
28933 |
|
28934 |
|
28935 | function getNodeForCharacterOffset(root, offset) {
|
28936 | var node = getLeafNode(root);
|
28937 | var nodeStart = 0;
|
28938 | var nodeEnd = 0;
|
28939 |
|
28940 | while (node) {
|
28941 | if (node.nodeType === 3) {
|
28942 | nodeEnd = nodeStart + node.textContent.length;
|
28943 |
|
28944 | if (nodeStart <= offset && nodeEnd >= offset) {
|
28945 | return {
|
28946 | node: node,
|
28947 | offset: offset - nodeStart
|
28948 | };
|
28949 | }
|
28950 |
|
28951 | nodeStart = nodeEnd;
|
28952 | }
|
28953 |
|
28954 | node = getLeafNode(getSiblingNode(node));
|
28955 | }
|
28956 | }
|
28957 |
|
28958 | module.exports = getNodeForCharacterOffset;
|
28959 |
|
28960 | },
|
28961 |
|
28962 | function(module, exports, __webpack_require__) {
|
28963 |
|
28964 | |
28965 |
|
28966 |
|
28967 |
|
28968 |
|
28969 |
|
28970 |
|
28971 |
|
28972 |
|
28973 |
|
28974 | 'use strict';
|
28975 |
|
28976 | var escapeTextContentForBrowser = __webpack_require__(36);
|
28977 |
|
28978 | |
28979 |
|
28980 |
|
28981 |
|
28982 |
|
28983 |
|
28984 | function quoteAttributeValueForBrowser(value) {
|
28985 | return '"' + escapeTextContentForBrowser(value) + '"';
|
28986 | }
|
28987 |
|
28988 | module.exports = quoteAttributeValueForBrowser;
|
28989 |
|
28990 | },
|
28991 |
|
28992 | function(module, exports, __webpack_require__) {
|
28993 |
|
28994 | |
28995 |
|
28996 |
|
28997 |
|
28998 |
|
28999 |
|
29000 |
|
29001 |
|
29002 |
|
29003 |
|
29004 | 'use strict';
|
29005 |
|
29006 | var ReactMount = __webpack_require__(83);
|
29007 |
|
29008 | module.exports = ReactMount.renderSubtreeIntoContainer;
|
29009 |
|
29010 | },
|
29011 |
|
29012 | function(module, exports, __webpack_require__) {
|
29013 |
|
29014 | |
29015 |
|
29016 |
|
29017 |
|
29018 |
|
29019 |
|
29020 |
|
29021 |
|
29022 |
|
29023 |
|
29024 |
|
29025 | 'use strict';
|
29026 |
|
29027 | var _prodInvariant = __webpack_require__(23);
|
29028 |
|
29029 | var invariant = __webpack_require__(4);
|
29030 |
|
29031 | |
29032 |
|
29033 |
|
29034 |
|
29035 |
|
29036 |
|
29037 |
|
29038 | var oneArgumentPooler = function (copyFieldsFrom) {
|
29039 | var Klass = this;
|
29040 | if (Klass.instancePool.length) {
|
29041 | var instance = Klass.instancePool.pop();
|
29042 | Klass.call(instance, copyFieldsFrom);
|
29043 | return instance;
|
29044 | } else {
|
29045 | return new Klass(copyFieldsFrom);
|
29046 | }
|
29047 | };
|
29048 |
|
29049 | var twoArgumentPooler = function (a1, a2) {
|
29050 | var Klass = this;
|
29051 | if (Klass.instancePool.length) {
|
29052 | var instance = Klass.instancePool.pop();
|
29053 | Klass.call(instance, a1, a2);
|
29054 | return instance;
|
29055 | } else {
|
29056 | return new Klass(a1, a2);
|
29057 | }
|
29058 | };
|
29059 |
|
29060 | var threeArgumentPooler = function (a1, a2, a3) {
|
29061 | var Klass = this;
|
29062 | if (Klass.instancePool.length) {
|
29063 | var instance = Klass.instancePool.pop();
|
29064 | Klass.call(instance, a1, a2, a3);
|
29065 | return instance;
|
29066 | } else {
|
29067 | return new Klass(a1, a2, a3);
|
29068 | }
|
29069 | };
|
29070 |
|
29071 | var fourArgumentPooler = function (a1, a2, a3, a4) {
|
29072 | var Klass = this;
|
29073 | if (Klass.instancePool.length) {
|
29074 | var instance = Klass.instancePool.pop();
|
29075 | Klass.call(instance, a1, a2, a3, a4);
|
29076 | return instance;
|
29077 | } else {
|
29078 | return new Klass(a1, a2, a3, a4);
|
29079 | }
|
29080 | };
|
29081 |
|
29082 | var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
|
29083 | var Klass = this;
|
29084 | if (Klass.instancePool.length) {
|
29085 | var instance = Klass.instancePool.pop();
|
29086 | Klass.call(instance, a1, a2, a3, a4, a5);
|
29087 | return instance;
|
29088 | } else {
|
29089 | return new Klass(a1, a2, a3, a4, a5);
|
29090 | }
|
29091 | };
|
29092 |
|
29093 | var standardReleaser = function (instance) {
|
29094 | var Klass = this;
|
29095 | !(instance instanceof Klass) ? true ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
|
29096 | instance.destructor();
|
29097 | if (Klass.instancePool.length < Klass.poolSize) {
|
29098 | Klass.instancePool.push(instance);
|
29099 | }
|
29100 | };
|
29101 |
|
29102 | var DEFAULT_POOL_SIZE = 10;
|
29103 | var DEFAULT_POOLER = oneArgumentPooler;
|
29104 |
|
29105 | |
29106 |
|
29107 |
|
29108 |
|
29109 |
|
29110 |
|
29111 |
|
29112 |
|
29113 |
|
29114 | var addPoolingTo = function (CopyConstructor, pooler) {
|
29115 |
|
29116 |
|
29117 | var NewKlass = CopyConstructor;
|
29118 | NewKlass.instancePool = [];
|
29119 | NewKlass.getPooled = pooler || DEFAULT_POOLER;
|
29120 | if (!NewKlass.poolSize) {
|
29121 | NewKlass.poolSize = DEFAULT_POOL_SIZE;
|
29122 | }
|
29123 | NewKlass.release = standardReleaser;
|
29124 | return NewKlass;
|
29125 | };
|
29126 |
|
29127 | var PooledClass = {
|
29128 | addPoolingTo: addPoolingTo,
|
29129 | oneArgumentPooler: oneArgumentPooler,
|
29130 | twoArgumentPooler: twoArgumentPooler,
|
29131 | threeArgumentPooler: threeArgumentPooler,
|
29132 | fourArgumentPooler: fourArgumentPooler,
|
29133 | fiveArgumentPooler: fiveArgumentPooler
|
29134 | };
|
29135 |
|
29136 | module.exports = PooledClass;
|
29137 |
|
29138 | },
|
29139 |
|
29140 | function(module, exports, __webpack_require__) {
|
29141 |
|
29142 | |
29143 |
|
29144 |
|
29145 |
|
29146 |
|
29147 |
|
29148 |
|
29149 |
|
29150 |
|
29151 |
|
29152 | 'use strict';
|
29153 |
|
29154 | var _assign = __webpack_require__(7);
|
29155 |
|
29156 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
29157 |
|
29158 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
29159 |
|
29160 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
29161 |
|
29162 | var React = __webpack_require__(15);
|
29163 |
|
29164 | var ReactTransitionGroup = __webpack_require__(263);
|
29165 | var ReactCSSTransitionGroupChild = __webpack_require__(255);
|
29166 |
|
29167 | function createTransitionTimeoutPropValidator(transitionType) {
|
29168 | var timeoutPropName = 'transition' + transitionType + 'Timeout';
|
29169 | var enabledPropName = 'transition' + transitionType;
|
29170 |
|
29171 | return function (props) {
|
29172 |
|
29173 | if (props[enabledPropName]) {
|
29174 |
|
29175 | if (props[timeoutPropName] == null) {
|
29176 | return new Error(timeoutPropName + ' wasn\'t supplied to ReactCSSTransitionGroup: ' + 'this can cause unreliable animations and won\'t be supported in ' + 'a future version of React. See ' + 'https://fb.me/react-animation-transition-group-timeout for more ' + 'information.');
|
29177 |
|
29178 |
|
29179 | } else if (typeof props[timeoutPropName] !== 'number') {
|
29180 | return new Error(timeoutPropName + ' must be a number (in milliseconds)');
|
29181 | }
|
29182 | }
|
29183 | };
|
29184 | }
|
29185 |
|
29186 | |
29187 |
|
29188 |
|
29189 |
|
29190 |
|
29191 |
|
29192 | var ReactCSSTransitionGroup = function (_React$Component) {
|
29193 | _inherits(ReactCSSTransitionGroup, _React$Component);
|
29194 |
|
29195 | function ReactCSSTransitionGroup() {
|
29196 | var _temp, _this, _ret;
|
29197 |
|
29198 | _classCallCheck(this, ReactCSSTransitionGroup);
|
29199 |
|
29200 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
29201 | args[_key] = arguments[_key];
|
29202 | }
|
29203 |
|
29204 | return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this._wrapChild = function (child) {
|
29205 |
|
29206 |
|
29207 |
|
29208 | return React.createElement(ReactCSSTransitionGroupChild, {
|
29209 | name: _this.props.transitionName,
|
29210 | appear: _this.props.transitionAppear,
|
29211 | enter: _this.props.transitionEnter,
|
29212 | leave: _this.props.transitionLeave,
|
29213 | appearTimeout: _this.props.transitionAppearTimeout,
|
29214 | enterTimeout: _this.props.transitionEnterTimeout,
|
29215 | leaveTimeout: _this.props.transitionLeaveTimeout
|
29216 | }, child);
|
29217 | }, _temp), _possibleConstructorReturn(_this, _ret);
|
29218 | }
|
29219 |
|
29220 | ReactCSSTransitionGroup.prototype.render = function render() {
|
29221 | return React.createElement(ReactTransitionGroup, _assign({}, this.props, { childFactory: this._wrapChild }));
|
29222 | };
|
29223 |
|
29224 | return ReactCSSTransitionGroup;
|
29225 | }(React.Component);
|
29226 |
|
29227 | ReactCSSTransitionGroup.displayName = 'ReactCSSTransitionGroup';
|
29228 | ReactCSSTransitionGroup.propTypes = {
|
29229 | transitionName: ReactCSSTransitionGroupChild.propTypes.name,
|
29230 |
|
29231 | transitionAppear: React.PropTypes.bool,
|
29232 | transitionEnter: React.PropTypes.bool,
|
29233 | transitionLeave: React.PropTypes.bool,
|
29234 | transitionAppearTimeout: createTransitionTimeoutPropValidator('Appear'),
|
29235 | transitionEnterTimeout: createTransitionTimeoutPropValidator('Enter'),
|
29236 | transitionLeaveTimeout: createTransitionTimeoutPropValidator('Leave')
|
29237 | };
|
29238 | ReactCSSTransitionGroup.defaultProps = {
|
29239 | transitionAppear: false,
|
29240 | transitionEnter: true,
|
29241 | transitionLeave: true
|
29242 | };
|
29243 |
|
29244 |
|
29245 | module.exports = ReactCSSTransitionGroup;
|
29246 |
|
29247 | },
|
29248 |
|
29249 | function(module, exports, __webpack_require__) {
|
29250 |
|
29251 | |
29252 |
|
29253 |
|
29254 |
|
29255 |
|
29256 |
|
29257 |
|
29258 |
|
29259 |
|
29260 |
|
29261 | 'use strict';
|
29262 |
|
29263 | var React = __webpack_require__(15);
|
29264 | var ReactAddonsDOMDependencies = __webpack_require__(99);
|
29265 |
|
29266 | var CSSCore = __webpack_require__(166);
|
29267 | var ReactTransitionEvents = __webpack_require__(262);
|
29268 |
|
29269 | var onlyChild = __webpack_require__(103);
|
29270 |
|
29271 | var TICK = 17;
|
29272 |
|
29273 | var ReactCSSTransitionGroupChild = React.createClass({
|
29274 | displayName: 'ReactCSSTransitionGroupChild',
|
29275 |
|
29276 | propTypes: {
|
29277 | name: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.shape({
|
29278 | enter: React.PropTypes.string,
|
29279 | leave: React.PropTypes.string,
|
29280 | active: React.PropTypes.string
|
29281 | }), React.PropTypes.shape({
|
29282 | enter: React.PropTypes.string,
|
29283 | enterActive: React.PropTypes.string,
|
29284 | leave: React.PropTypes.string,
|
29285 | leaveActive: React.PropTypes.string,
|
29286 | appear: React.PropTypes.string,
|
29287 | appearActive: React.PropTypes.string
|
29288 | })]).isRequired,
|
29289 |
|
29290 |
|
29291 |
|
29292 |
|
29293 | appear: React.PropTypes.bool,
|
29294 | enter: React.PropTypes.bool,
|
29295 | leave: React.PropTypes.bool,
|
29296 | appearTimeout: React.PropTypes.number,
|
29297 | enterTimeout: React.PropTypes.number,
|
29298 | leaveTimeout: React.PropTypes.number
|
29299 | },
|
29300 |
|
29301 | transition: function (animationType, finishCallback, userSpecifiedDelay) {
|
29302 | var node = ReactAddonsDOMDependencies.getReactDOM().findDOMNode(this);
|
29303 |
|
29304 | if (!node) {
|
29305 | if (finishCallback) {
|
29306 | finishCallback();
|
29307 | }
|
29308 | return;
|
29309 | }
|
29310 |
|
29311 | var className = this.props.name[animationType] || this.props.name + '-' + animationType;
|
29312 | var activeClassName = this.props.name[animationType + 'Active'] || className + '-active';
|
29313 | var timeout = null;
|
29314 |
|
29315 | var endListener = function (e) {
|
29316 | if (e && e.target !== node) {
|
29317 | return;
|
29318 | }
|
29319 |
|
29320 | clearTimeout(timeout);
|
29321 |
|
29322 | CSSCore.removeClass(node, className);
|
29323 | CSSCore.removeClass(node, activeClassName);
|
29324 |
|
29325 | ReactTransitionEvents.removeEndEventListener(node, endListener);
|
29326 |
|
29327 |
|
29328 |
|
29329 | if (finishCallback) {
|
29330 | finishCallback();
|
29331 | }
|
29332 | };
|
29333 |
|
29334 | CSSCore.addClass(node, className);
|
29335 |
|
29336 |
|
29337 | this.queueClassAndNode(activeClassName, node);
|
29338 |
|
29339 |
|
29340 | if (userSpecifiedDelay) {
|
29341 |
|
29342 | timeout = setTimeout(endListener, userSpecifiedDelay);
|
29343 | this.transitionTimeouts.push(timeout);
|
29344 | } else {
|
29345 |
|
29346 | ReactTransitionEvents.addEndEventListener(node, endListener);
|
29347 | }
|
29348 | },
|
29349 |
|
29350 | queueClassAndNode: function (className, node) {
|
29351 | this.classNameAndNodeQueue.push({
|
29352 | className: className,
|
29353 | node: node
|
29354 | });
|
29355 |
|
29356 | if (!this.timeout) {
|
29357 | this.timeout = setTimeout(this.flushClassNameAndNodeQueue, TICK);
|
29358 | }
|
29359 | },
|
29360 |
|
29361 | flushClassNameAndNodeQueue: function () {
|
29362 | if (this.isMounted()) {
|
29363 | this.classNameAndNodeQueue.forEach(function (obj) {
|
29364 | CSSCore.addClass(obj.node, obj.className);
|
29365 | });
|
29366 | }
|
29367 | this.classNameAndNodeQueue.length = 0;
|
29368 | this.timeout = null;
|
29369 | },
|
29370 |
|
29371 | componentWillMount: function () {
|
29372 | this.classNameAndNodeQueue = [];
|
29373 | this.transitionTimeouts = [];
|
29374 | },
|
29375 |
|
29376 | componentWillUnmount: function () {
|
29377 | if (this.timeout) {
|
29378 | clearTimeout(this.timeout);
|
29379 | }
|
29380 | this.transitionTimeouts.forEach(function (timeout) {
|
29381 | clearTimeout(timeout);
|
29382 | });
|
29383 |
|
29384 | this.classNameAndNodeQueue.length = 0;
|
29385 | },
|
29386 |
|
29387 | componentWillAppear: function (done) {
|
29388 | if (this.props.appear) {
|
29389 | this.transition('appear', done, this.props.appearTimeout);
|
29390 | } else {
|
29391 | done();
|
29392 | }
|
29393 | },
|
29394 |
|
29395 | componentWillEnter: function (done) {
|
29396 | if (this.props.enter) {
|
29397 | this.transition('enter', done, this.props.enterTimeout);
|
29398 | } else {
|
29399 | done();
|
29400 | }
|
29401 | },
|
29402 |
|
29403 | componentWillLeave: function (done) {
|
29404 | if (this.props.leave) {
|
29405 | this.transition('leave', done, this.props.leaveTimeout);
|
29406 | } else {
|
29407 | done();
|
29408 | }
|
29409 | },
|
29410 |
|
29411 | render: function () {
|
29412 | return onlyChild(this.props.children);
|
29413 | }
|
29414 | });
|
29415 |
|
29416 | module.exports = ReactCSSTransitionGroupChild;
|
29417 |
|
29418 | },
|
29419 |
|
29420 | function(module, exports, __webpack_require__) {
|
29421 |
|
29422 | |
29423 |
|
29424 |
|
29425 |
|
29426 |
|
29427 |
|
29428 |
|
29429 |
|
29430 |
|
29431 |
|
29432 | 'use strict';
|
29433 |
|
29434 | var PooledClass = __webpack_require__(253);
|
29435 | var ReactElement = __webpack_require__(22);
|
29436 |
|
29437 | var emptyFunction = __webpack_require__(11);
|
29438 | var traverseAllChildren = __webpack_require__(104);
|
29439 |
|
29440 | var twoArgumentPooler = PooledClass.twoArgumentPooler;
|
29441 | var fourArgumentPooler = PooledClass.fourArgumentPooler;
|
29442 |
|
29443 | var userProvidedKeyEscapeRegex = /\/+/g;
|
29444 | function escapeUserProvidedKey(text) {
|
29445 | return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
|
29446 | }
|
29447 |
|
29448 | |
29449 |
|
29450 |
|
29451 |
|
29452 |
|
29453 |
|
29454 |
|
29455 |
|
29456 | function ForEachBookKeeping(forEachFunction, forEachContext) {
|
29457 | this.func = forEachFunction;
|
29458 | this.context = forEachContext;
|
29459 | this.count = 0;
|
29460 | }
|
29461 | ForEachBookKeeping.prototype.destructor = function () {
|
29462 | this.func = null;
|
29463 | this.context = null;
|
29464 | this.count = 0;
|
29465 | };
|
29466 | PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
|
29467 |
|
29468 | function forEachSingleChild(bookKeeping, child, name) {
|
29469 | var func = bookKeeping.func,
|
29470 | context = bookKeeping.context;
|
29471 |
|
29472 | func.call(context, child, bookKeeping.count++);
|
29473 | }
|
29474 |
|
29475 | |
29476 |
|
29477 |
|
29478 |
|
29479 |
|
29480 |
|
29481 |
|
29482 |
|
29483 |
|
29484 |
|
29485 |
|
29486 |
|
29487 | function forEachChildren(children, forEachFunc, forEachContext) {
|
29488 | if (children == null) {
|
29489 | return children;
|
29490 | }
|
29491 | var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
|
29492 | traverseAllChildren(children, forEachSingleChild, traverseContext);
|
29493 | ForEachBookKeeping.release(traverseContext);
|
29494 | }
|
29495 |
|
29496 | |
29497 |
|
29498 |
|
29499 |
|
29500 |
|
29501 |
|
29502 |
|
29503 |
|
29504 |
|
29505 | function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
|
29506 | this.result = mapResult;
|
29507 | this.keyPrefix = keyPrefix;
|
29508 | this.func = mapFunction;
|
29509 | this.context = mapContext;
|
29510 | this.count = 0;
|
29511 | }
|
29512 | MapBookKeeping.prototype.destructor = function () {
|
29513 | this.result = null;
|
29514 | this.keyPrefix = null;
|
29515 | this.func = null;
|
29516 | this.context = null;
|
29517 | this.count = 0;
|
29518 | };
|
29519 | PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
|
29520 |
|
29521 | function mapSingleChildIntoContext(bookKeeping, child, childKey) {
|
29522 | var result = bookKeeping.result,
|
29523 | keyPrefix = bookKeeping.keyPrefix,
|
29524 | func = bookKeeping.func,
|
29525 | context = bookKeeping.context;
|
29526 |
|
29527 |
|
29528 | var mappedChild = func.call(context, child, bookKeeping.count++);
|
29529 | if (Array.isArray(mappedChild)) {
|
29530 | mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
|
29531 | } else if (mappedChild != null) {
|
29532 | if (ReactElement.isValidElement(mappedChild)) {
|
29533 | mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
|
29534 |
|
29535 |
|
29536 | keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
|
29537 | }
|
29538 | result.push(mappedChild);
|
29539 | }
|
29540 | }
|
29541 |
|
29542 | function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
|
29543 | var escapedPrefix = '';
|
29544 | if (prefix != null) {
|
29545 | escapedPrefix = escapeUserProvidedKey(prefix) + '/';
|
29546 | }
|
29547 | var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
|
29548 | traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
|
29549 | MapBookKeeping.release(traverseContext);
|
29550 | }
|
29551 |
|
29552 | |
29553 |
|
29554 |
|
29555 |
|
29556 |
|
29557 |
|
29558 |
|
29559 |
|
29560 |
|
29561 |
|
29562 |
|
29563 |
|
29564 |
|
29565 | function mapChildren(children, func, context) {
|
29566 | if (children == null) {
|
29567 | return children;
|
29568 | }
|
29569 | var result = [];
|
29570 | mapIntoWithKeyPrefixInternal(children, result, null, func, context);
|
29571 | return result;
|
29572 | }
|
29573 |
|
29574 | function forEachSingleChildDummy(traverseContext, child, name) {
|
29575 | return null;
|
29576 | }
|
29577 |
|
29578 | |
29579 |
|
29580 |
|
29581 |
|
29582 |
|
29583 |
|
29584 |
|
29585 |
|
29586 |
|
29587 | function countChildren(children, context) {
|
29588 | return traverseAllChildren(children, forEachSingleChildDummy, null);
|
29589 | }
|
29590 |
|
29591 | |
29592 |
|
29593 |
|
29594 |
|
29595 |
|
29596 |
|
29597 | function toArray(children) {
|
29598 | var result = [];
|
29599 | mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
|
29600 | return result;
|
29601 | }
|
29602 |
|
29603 | var ReactChildren = {
|
29604 | forEach: forEachChildren,
|
29605 | map: mapChildren,
|
29606 | mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
|
29607 | count: countChildren,
|
29608 | toArray: toArray
|
29609 | };
|
29610 |
|
29611 | module.exports = ReactChildren;
|
29612 |
|
29613 | },
|
29614 |
|
29615 | function(module, exports, __webpack_require__) {
|
29616 |
|
29617 | |
29618 |
|
29619 |
|
29620 |
|
29621 |
|
29622 |
|
29623 |
|
29624 |
|
29625 |
|
29626 |
|
29627 | 'use strict';
|
29628 |
|
29629 | var _prodInvariant = __webpack_require__(23),
|
29630 | _assign = __webpack_require__(7);
|
29631 |
|
29632 | var ReactComponent = __webpack_require__(55);
|
29633 | var ReactElement = __webpack_require__(22);
|
29634 | var ReactPropTypeLocationNames = __webpack_require__(57);
|
29635 | var ReactNoopUpdateQueue = __webpack_require__(56);
|
29636 |
|
29637 | var emptyObject = __webpack_require__(24);
|
29638 | var invariant = __webpack_require__(4);
|
29639 | var warning = __webpack_require__(5);
|
29640 |
|
29641 | var MIXINS_KEY = 'mixins';
|
29642 |
|
29643 |
|
29644 |
|
29645 | function identity(fn) {
|
29646 | return fn;
|
29647 | }
|
29648 |
|
29649 | |
29650 |
|
29651 |
|
29652 |
|
29653 |
|
29654 | var injectedMixins = [];
|
29655 |
|
29656 | |
29657 |
|
29658 |
|
29659 |
|
29660 |
|
29661 |
|
29662 |
|
29663 |
|
29664 |
|
29665 |
|
29666 |
|
29667 |
|
29668 |
|
29669 |
|
29670 |
|
29671 |
|
29672 |
|
29673 |
|
29674 |
|
29675 |
|
29676 |
|
29677 |
|
29678 | var ReactClassInterface = {
|
29679 |
|
29680 | |
29681 |
|
29682 |
|
29683 |
|
29684 |
|
29685 |
|
29686 | mixins: 'DEFINE_MANY',
|
29687 |
|
29688 | |
29689 |
|
29690 |
|
29691 |
|
29692 |
|
29693 |
|
29694 |
|
29695 | statics: 'DEFINE_MANY',
|
29696 |
|
29697 | |
29698 |
|
29699 |
|
29700 |
|
29701 |
|
29702 |
|
29703 | propTypes: 'DEFINE_MANY',
|
29704 |
|
29705 | |
29706 |
|
29707 |
|
29708 |
|
29709 |
|
29710 |
|
29711 | contextTypes: 'DEFINE_MANY',
|
29712 |
|
29713 | |
29714 |
|
29715 |
|
29716 |
|
29717 |
|
29718 |
|
29719 | childContextTypes: 'DEFINE_MANY',
|
29720 |
|
29721 |
|
29722 |
|
29723 | |
29724 |
|
29725 |
|
29726 |
|
29727 |
|
29728 |
|
29729 |
|
29730 |
|
29731 |
|
29732 |
|
29733 | getDefaultProps: 'DEFINE_MANY_MERGED',
|
29734 |
|
29735 | |
29736 |
|
29737 |
|
29738 |
|
29739 |
|
29740 |
|
29741 |
|
29742 |
|
29743 |
|
29744 |
|
29745 |
|
29746 |
|
29747 |
|
29748 |
|
29749 | getInitialState: 'DEFINE_MANY_MERGED',
|
29750 |
|
29751 | |
29752 |
|
29753 |
|
29754 |
|
29755 | getChildContext: 'DEFINE_MANY_MERGED',
|
29756 |
|
29757 | |
29758 |
|
29759 |
|
29760 |
|
29761 |
|
29762 |
|
29763 |
|
29764 |
|
29765 |
|
29766 |
|
29767 |
|
29768 |
|
29769 |
|
29770 |
|
29771 |
|
29772 |
|
29773 | render: 'DEFINE_ONCE',
|
29774 |
|
29775 |
|
29776 |
|
29777 | |
29778 |
|
29779 |
|
29780 |
|
29781 |
|
29782 |
|
29783 |
|
29784 | componentWillMount: 'DEFINE_MANY',
|
29785 |
|
29786 | |
29787 |
|
29788 |
|
29789 |
|
29790 |
|
29791 |
|
29792 |
|
29793 |
|
29794 |
|
29795 |
|
29796 | componentDidMount: 'DEFINE_MANY',
|
29797 |
|
29798 | |
29799 |
|
29800 |
|
29801 |
|
29802 |
|
29803 |
|
29804 |
|
29805 |
|
29806 |
|
29807 |
|
29808 |
|
29809 |
|
29810 |
|
29811 |
|
29812 |
|
29813 |
|
29814 |
|
29815 |
|
29816 |
|
29817 | componentWillReceiveProps: 'DEFINE_MANY',
|
29818 |
|
29819 | |
29820 |
|
29821 |
|
29822 |
|
29823 |
|
29824 |
|
29825 |
|
29826 |
|
29827 |
|
29828 |
|
29829 |
|
29830 |
|
29831 |
|
29832 |
|
29833 |
|
29834 |
|
29835 |
|
29836 |
|
29837 |
|
29838 |
|
29839 | shouldComponentUpdate: 'DEFINE_ONCE',
|
29840 |
|
29841 | |
29842 |
|
29843 |
|
29844 |
|
29845 |
|
29846 |
|
29847 |
|
29848 |
|
29849 |
|
29850 |
|
29851 |
|
29852 |
|
29853 |
|
29854 |
|
29855 |
|
29856 | componentWillUpdate: 'DEFINE_MANY',
|
29857 |
|
29858 | |
29859 |
|
29860 |
|
29861 |
|
29862 |
|
29863 |
|
29864 |
|
29865 |
|
29866 |
|
29867 |
|
29868 |
|
29869 |
|
29870 | componentDidUpdate: 'DEFINE_MANY',
|
29871 |
|
29872 | |
29873 |
|
29874 |
|
29875 |
|
29876 |
|
29877 |
|
29878 |
|
29879 |
|
29880 |
|
29881 |
|
29882 |
|
29883 | componentWillUnmount: 'DEFINE_MANY',
|
29884 |
|
29885 |
|
29886 |
|
29887 | |
29888 |
|
29889 |
|
29890 |
|
29891 |
|
29892 |
|
29893 |
|
29894 |
|
29895 |
|
29896 |
|
29897 | updateComponent: 'OVERRIDE_BASE'
|
29898 |
|
29899 | };
|
29900 |
|
29901 | |
29902 |
|
29903 |
|
29904 |
|
29905 |
|
29906 |
|
29907 |
|
29908 |
|
29909 |
|
29910 | var RESERVED_SPEC_KEYS = {
|
29911 | displayName: function (Constructor, displayName) {
|
29912 | Constructor.displayName = displayName;
|
29913 | },
|
29914 | mixins: function (Constructor, mixins) {
|
29915 | if (mixins) {
|
29916 | for (var i = 0; i < mixins.length; i++) {
|
29917 | mixSpecIntoComponent(Constructor, mixins[i]);
|
29918 | }
|
29919 | }
|
29920 | },
|
29921 | childContextTypes: function (Constructor, childContextTypes) {
|
29922 | if (true) {
|
29923 | validateTypeDef(Constructor, childContextTypes, 'childContext');
|
29924 | }
|
29925 | Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
|
29926 | },
|
29927 | contextTypes: function (Constructor, contextTypes) {
|
29928 | if (true) {
|
29929 | validateTypeDef(Constructor, contextTypes, 'context');
|
29930 | }
|
29931 | Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);
|
29932 | },
|
29933 | |
29934 |
|
29935 |
|
29936 |
|
29937 | getDefaultProps: function (Constructor, getDefaultProps) {
|
29938 | if (Constructor.getDefaultProps) {
|
29939 | Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);
|
29940 | } else {
|
29941 | Constructor.getDefaultProps = getDefaultProps;
|
29942 | }
|
29943 | },
|
29944 | propTypes: function (Constructor, propTypes) {
|
29945 | if (true) {
|
29946 | validateTypeDef(Constructor, propTypes, 'prop');
|
29947 | }
|
29948 | Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
|
29949 | },
|
29950 | statics: function (Constructor, statics) {
|
29951 | mixStaticSpecIntoComponent(Constructor, statics);
|
29952 | },
|
29953 | autobind: function () {} };
|
29954 |
|
29955 | function validateTypeDef(Constructor, typeDef, location) {
|
29956 | for (var propName in typeDef) {
|
29957 | if (typeDef.hasOwnProperty(propName)) {
|
29958 |
|
29959 |
|
29960 | true ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0;
|
29961 | }
|
29962 | }
|
29963 | }
|
29964 |
|
29965 | function validateMethodOverride(isAlreadyDefined, name) {
|
29966 | var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
|
29967 |
|
29968 |
|
29969 | if (ReactClassMixin.hasOwnProperty(name)) {
|
29970 | !(specPolicy === 'OVERRIDE_BASE') ? true ? invariant(false, 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', name) : _prodInvariant('73', name) : void 0;
|
29971 | }
|
29972 |
|
29973 |
|
29974 | if (isAlreadyDefined) {
|
29975 | !(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') ? true ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('74', name) : void 0;
|
29976 | }
|
29977 | }
|
29978 |
|
29979 | |
29980 |
|
29981 |
|
29982 |
|
29983 | function mixSpecIntoComponent(Constructor, spec) {
|
29984 | if (!spec) {
|
29985 | if (true) {
|
29986 | var typeofSpec = typeof spec;
|
29987 | var isMixinValid = typeofSpec === 'object' && spec !== null;
|
29988 |
|
29989 | true ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0;
|
29990 | }
|
29991 |
|
29992 | return;
|
29993 | }
|
29994 |
|
29995 | !(typeof spec !== 'function') ? true ? invariant(false, 'ReactClass: You\'re attempting to use a component class or function as a mixin. Instead, just use a regular object.') : _prodInvariant('75') : void 0;
|
29996 | !!ReactElement.isValidElement(spec) ? true ? invariant(false, 'ReactClass: You\'re attempting to use a component as a mixin. Instead, just use a regular object.') : _prodInvariant('76') : void 0;
|
29997 |
|
29998 | var proto = Constructor.prototype;
|
29999 | var autoBindPairs = proto.__reactAutoBindPairs;
|
30000 |
|
30001 |
|
30002 |
|
30003 |
|
30004 | if (spec.hasOwnProperty(MIXINS_KEY)) {
|
30005 | RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
|
30006 | }
|
30007 |
|
30008 | for (var name in spec) {
|
30009 | if (!spec.hasOwnProperty(name)) {
|
30010 | continue;
|
30011 | }
|
30012 |
|
30013 | if (name === MIXINS_KEY) {
|
30014 |
|
30015 | continue;
|
30016 | }
|
30017 |
|
30018 | var property = spec[name];
|
30019 | var isAlreadyDefined = proto.hasOwnProperty(name);
|
30020 | validateMethodOverride(isAlreadyDefined, name);
|
30021 |
|
30022 | if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
|
30023 | RESERVED_SPEC_KEYS[name](Constructor, property);
|
30024 | } else {
|
30025 |
|
30026 |
|
30027 |
|
30028 |
|
30029 | var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
|
30030 | var isFunction = typeof property === 'function';
|
30031 | var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
|
30032 |
|
30033 | if (shouldAutoBind) {
|
30034 | autoBindPairs.push(name, property);
|
30035 | proto[name] = property;
|
30036 | } else {
|
30037 | if (isAlreadyDefined) {
|
30038 | var specPolicy = ReactClassInterface[name];
|
30039 |
|
30040 |
|
30041 | !(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) ? true ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : _prodInvariant('77', specPolicy, name) : void 0;
|
30042 |
|
30043 |
|
30044 |
|
30045 | if (specPolicy === 'DEFINE_MANY_MERGED') {
|
30046 | proto[name] = createMergedResultFunction(proto[name], property);
|
30047 | } else if (specPolicy === 'DEFINE_MANY') {
|
30048 | proto[name] = createChainedFunction(proto[name], property);
|
30049 | }
|
30050 | } else {
|
30051 | proto[name] = property;
|
30052 | if (true) {
|
30053 |
|
30054 |
|
30055 | if (typeof property === 'function' && spec.displayName) {
|
30056 | proto[name].displayName = spec.displayName + '_' + name;
|
30057 | }
|
30058 | }
|
30059 | }
|
30060 | }
|
30061 | }
|
30062 | }
|
30063 | }
|
30064 |
|
30065 | function mixStaticSpecIntoComponent(Constructor, statics) {
|
30066 | if (!statics) {
|
30067 | return;
|
30068 | }
|
30069 | for (var name in statics) {
|
30070 | var property = statics[name];
|
30071 | if (!statics.hasOwnProperty(name)) {
|
30072 | continue;
|
30073 | }
|
30074 |
|
30075 | var isReserved = name in RESERVED_SPEC_KEYS;
|
30076 | !!isReserved ? true ? invariant(false, 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', name) : _prodInvariant('78', name) : void 0;
|
30077 |
|
30078 | var isInherited = name in Constructor;
|
30079 | !!isInherited ? true ? invariant(false, 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('79', name) : void 0;
|
30080 | Constructor[name] = property;
|
30081 | }
|
30082 | }
|
30083 |
|
30084 | |
30085 |
|
30086 |
|
30087 |
|
30088 |
|
30089 |
|
30090 |
|
30091 | function mergeIntoWithNoDuplicateKeys(one, two) {
|
30092 | !(one && two && typeof one === 'object' && typeof two === 'object') ? true ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0;
|
30093 |
|
30094 | for (var key in two) {
|
30095 | if (two.hasOwnProperty(key)) {
|
30096 | !(one[key] === undefined) ? true ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', key) : _prodInvariant('81', key) : void 0;
|
30097 | one[key] = two[key];
|
30098 | }
|
30099 | }
|
30100 | return one;
|
30101 | }
|
30102 |
|
30103 | |
30104 |
|
30105 |
|
30106 |
|
30107 |
|
30108 |
|
30109 |
|
30110 |
|
30111 | function createMergedResultFunction(one, two) {
|
30112 | return function mergedResult() {
|
30113 | var a = one.apply(this, arguments);
|
30114 | var b = two.apply(this, arguments);
|
30115 | if (a == null) {
|
30116 | return b;
|
30117 | } else if (b == null) {
|
30118 | return a;
|
30119 | }
|
30120 | var c = {};
|
30121 | mergeIntoWithNoDuplicateKeys(c, a);
|
30122 | mergeIntoWithNoDuplicateKeys(c, b);
|
30123 | return c;
|
30124 | };
|
30125 | }
|
30126 |
|
30127 | |
30128 |
|
30129 |
|
30130 |
|
30131 |
|
30132 |
|
30133 |
|
30134 |
|
30135 | function createChainedFunction(one, two) {
|
30136 | return function chainedFunction() {
|
30137 | one.apply(this, arguments);
|
30138 | two.apply(this, arguments);
|
30139 | };
|
30140 | }
|
30141 |
|
30142 | |
30143 |
|
30144 |
|
30145 |
|
30146 |
|
30147 |
|
30148 |
|
30149 | function bindAutoBindMethod(component, method) {
|
30150 | var boundMethod = method.bind(component);
|
30151 | if (true) {
|
30152 | boundMethod.__reactBoundContext = component;
|
30153 | boundMethod.__reactBoundMethod = method;
|
30154 | boundMethod.__reactBoundArguments = null;
|
30155 | var componentName = component.constructor.displayName;
|
30156 | var _bind = boundMethod.bind;
|
30157 | boundMethod.bind = function (newThis) {
|
30158 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
30159 | args[_key - 1] = arguments[_key];
|
30160 | }
|
30161 |
|
30162 |
|
30163 |
|
30164 |
|
30165 | if (newThis !== component && newThis !== null) {
|
30166 | true ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0;
|
30167 | } else if (!args.length) {
|
30168 | true ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0;
|
30169 | return boundMethod;
|
30170 | }
|
30171 | var reboundMethod = _bind.apply(boundMethod, arguments);
|
30172 | reboundMethod.__reactBoundContext = component;
|
30173 | reboundMethod.__reactBoundMethod = method;
|
30174 | reboundMethod.__reactBoundArguments = args;
|
30175 | return reboundMethod;
|
30176 | };
|
30177 | }
|
30178 | return boundMethod;
|
30179 | }
|
30180 |
|
30181 | |
30182 |
|
30183 |
|
30184 |
|
30185 |
|
30186 | function bindAutoBindMethods(component) {
|
30187 | var pairs = component.__reactAutoBindPairs;
|
30188 | for (var i = 0; i < pairs.length; i += 2) {
|
30189 | var autoBindKey = pairs[i];
|
30190 | var method = pairs[i + 1];
|
30191 | component[autoBindKey] = bindAutoBindMethod(component, method);
|
30192 | }
|
30193 | }
|
30194 |
|
30195 | |
30196 |
|
30197 |
|
30198 |
|
30199 | var ReactClassMixin = {
|
30200 |
|
30201 | |
30202 |
|
30203 |
|
30204 |
|
30205 | replaceState: function (newState, callback) {
|
30206 | this.updater.enqueueReplaceState(this, newState);
|
30207 | if (callback) {
|
30208 | this.updater.enqueueCallback(this, callback, 'replaceState');
|
30209 | }
|
30210 | },
|
30211 |
|
30212 | |
30213 |
|
30214 |
|
30215 |
|
30216 |
|
30217 |
|
30218 | isMounted: function () {
|
30219 | return this.updater.isMounted(this);
|
30220 | }
|
30221 | };
|
30222 |
|
30223 | var ReactClassComponent = function () {};
|
30224 | _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
|
30225 |
|
30226 | |
30227 |
|
30228 |
|
30229 |
|
30230 |
|
30231 | var ReactClass = {
|
30232 |
|
30233 | |
30234 |
|
30235 |
|
30236 |
|
30237 |
|
30238 |
|
30239 |
|
30240 |
|
30241 | createClass: function (spec) {
|
30242 |
|
30243 |
|
30244 |
|
30245 | var Constructor = identity(function (props, context, updater) {
|
30246 |
|
30247 |
|
30248 |
|
30249 | if (true) {
|
30250 | true ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0;
|
30251 | }
|
30252 |
|
30253 |
|
30254 | if (this.__reactAutoBindPairs.length) {
|
30255 | bindAutoBindMethods(this);
|
30256 | }
|
30257 |
|
30258 | this.props = props;
|
30259 | this.context = context;
|
30260 | this.refs = emptyObject;
|
30261 | this.updater = updater || ReactNoopUpdateQueue;
|
30262 |
|
30263 | this.state = null;
|
30264 |
|
30265 |
|
30266 |
|
30267 |
|
30268 | var initialState = this.getInitialState ? this.getInitialState() : null;
|
30269 | if (true) {
|
30270 |
|
30271 | if (initialState === undefined && this.getInitialState._isMockFunction) {
|
30272 |
|
30273 |
|
30274 | initialState = null;
|
30275 | }
|
30276 | }
|
30277 | !(typeof initialState === 'object' && !Array.isArray(initialState)) ? true ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') : void 0;
|
30278 |
|
30279 | this.state = initialState;
|
30280 | });
|
30281 | Constructor.prototype = new ReactClassComponent();
|
30282 | Constructor.prototype.constructor = Constructor;
|
30283 | Constructor.prototype.__reactAutoBindPairs = [];
|
30284 |
|
30285 | injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
|
30286 |
|
30287 | mixSpecIntoComponent(Constructor, spec);
|
30288 |
|
30289 |
|
30290 | if (Constructor.getDefaultProps) {
|
30291 | Constructor.defaultProps = Constructor.getDefaultProps();
|
30292 | }
|
30293 |
|
30294 | if (true) {
|
30295 |
|
30296 |
|
30297 |
|
30298 |
|
30299 | if (Constructor.getDefaultProps) {
|
30300 | Constructor.getDefaultProps.isReactClassApproved = {};
|
30301 | }
|
30302 | if (Constructor.prototype.getInitialState) {
|
30303 | Constructor.prototype.getInitialState.isReactClassApproved = {};
|
30304 | }
|
30305 | }
|
30306 |
|
30307 | !Constructor.prototype.render ? true ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0;
|
30308 |
|
30309 | if (true) {
|
30310 | true ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0;
|
30311 | true ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0;
|
30312 | }
|
30313 |
|
30314 |
|
30315 | for (var methodName in ReactClassInterface) {
|
30316 | if (!Constructor.prototype[methodName]) {
|
30317 | Constructor.prototype[methodName] = null;
|
30318 | }
|
30319 | }
|
30320 |
|
30321 | return Constructor;
|
30322 | },
|
30323 |
|
30324 | injection: {
|
30325 | injectMixin: function (mixin) {
|
30326 | injectedMixins.push(mixin);
|
30327 | }
|
30328 | }
|
30329 |
|
30330 | };
|
30331 |
|
30332 | module.exports = ReactClass;
|
30333 |
|
30334 | },
|
30335 |
|
30336 | function(module, exports, __webpack_require__) {
|
30337 |
|
30338 | |
30339 |
|
30340 |
|
30341 |
|
30342 |
|
30343 |
|
30344 |
|
30345 |
|
30346 |
|
30347 |
|
30348 | 'use strict';
|
30349 |
|
30350 | var ReactElement = __webpack_require__(22);
|
30351 |
|
30352 | |
30353 |
|
30354 |
|
30355 |
|
30356 |
|
30357 | var createDOMFactory = ReactElement.createFactory;
|
30358 | if (true) {
|
30359 | var ReactElementValidator = __webpack_require__(101);
|
30360 | createDOMFactory = ReactElementValidator.createFactory;
|
30361 | }
|
30362 |
|
30363 | |
30364 |
|
30365 |
|
30366 |
|
30367 |
|
30368 |
|
30369 | var ReactDOMFactories = {
|
30370 | a: createDOMFactory('a'),
|
30371 | abbr: createDOMFactory('abbr'),
|
30372 | address: createDOMFactory('address'),
|
30373 | area: createDOMFactory('area'),
|
30374 | article: createDOMFactory('article'),
|
30375 | aside: createDOMFactory('aside'),
|
30376 | audio: createDOMFactory('audio'),
|
30377 | b: createDOMFactory('b'),
|
30378 | base: createDOMFactory('base'),
|
30379 | bdi: createDOMFactory('bdi'),
|
30380 | bdo: createDOMFactory('bdo'),
|
30381 | big: createDOMFactory('big'),
|
30382 | blockquote: createDOMFactory('blockquote'),
|
30383 | body: createDOMFactory('body'),
|
30384 | br: createDOMFactory('br'),
|
30385 | button: createDOMFactory('button'),
|
30386 | canvas: createDOMFactory('canvas'),
|
30387 | caption: createDOMFactory('caption'),
|
30388 | cite: createDOMFactory('cite'),
|
30389 | code: createDOMFactory('code'),
|
30390 | col: createDOMFactory('col'),
|
30391 | colgroup: createDOMFactory('colgroup'),
|
30392 | data: createDOMFactory('data'),
|
30393 | datalist: createDOMFactory('datalist'),
|
30394 | dd: createDOMFactory('dd'),
|
30395 | del: createDOMFactory('del'),
|
30396 | details: createDOMFactory('details'),
|
30397 | dfn: createDOMFactory('dfn'),
|
30398 | dialog: createDOMFactory('dialog'),
|
30399 | div: createDOMFactory('div'),
|
30400 | dl: createDOMFactory('dl'),
|
30401 | dt: createDOMFactory('dt'),
|
30402 | em: createDOMFactory('em'),
|
30403 | embed: createDOMFactory('embed'),
|
30404 | fieldset: createDOMFactory('fieldset'),
|
30405 | figcaption: createDOMFactory('figcaption'),
|
30406 | figure: createDOMFactory('figure'),
|
30407 | footer: createDOMFactory('footer'),
|
30408 | form: createDOMFactory('form'),
|
30409 | h1: createDOMFactory('h1'),
|
30410 | h2: createDOMFactory('h2'),
|
30411 | h3: createDOMFactory('h3'),
|
30412 | h4: createDOMFactory('h4'),
|
30413 | h5: createDOMFactory('h5'),
|
30414 | h6: createDOMFactory('h6'),
|
30415 | head: createDOMFactory('head'),
|
30416 | header: createDOMFactory('header'),
|
30417 | hgroup: createDOMFactory('hgroup'),
|
30418 | hr: createDOMFactory('hr'),
|
30419 | html: createDOMFactory('html'),
|
30420 | i: createDOMFactory('i'),
|
30421 | iframe: createDOMFactory('iframe'),
|
30422 | img: createDOMFactory('img'),
|
30423 | input: createDOMFactory('input'),
|
30424 | ins: createDOMFactory('ins'),
|
30425 | kbd: createDOMFactory('kbd'),
|
30426 | keygen: createDOMFactory('keygen'),
|
30427 | label: createDOMFactory('label'),
|
30428 | legend: createDOMFactory('legend'),
|
30429 | li: createDOMFactory('li'),
|
30430 | link: createDOMFactory('link'),
|
30431 | main: createDOMFactory('main'),
|
30432 | map: createDOMFactory('map'),
|
30433 | mark: createDOMFactory('mark'),
|
30434 | menu: createDOMFactory('menu'),
|
30435 | menuitem: createDOMFactory('menuitem'),
|
30436 | meta: createDOMFactory('meta'),
|
30437 | meter: createDOMFactory('meter'),
|
30438 | nav: createDOMFactory('nav'),
|
30439 | noscript: createDOMFactory('noscript'),
|
30440 | object: createDOMFactory('object'),
|
30441 | ol: createDOMFactory('ol'),
|
30442 | optgroup: createDOMFactory('optgroup'),
|
30443 | option: createDOMFactory('option'),
|
30444 | output: createDOMFactory('output'),
|
30445 | p: createDOMFactory('p'),
|
30446 | param: createDOMFactory('param'),
|
30447 | picture: createDOMFactory('picture'),
|
30448 | pre: createDOMFactory('pre'),
|
30449 | progress: createDOMFactory('progress'),
|
30450 | q: createDOMFactory('q'),
|
30451 | rp: createDOMFactory('rp'),
|
30452 | rt: createDOMFactory('rt'),
|
30453 | ruby: createDOMFactory('ruby'),
|
30454 | s: createDOMFactory('s'),
|
30455 | samp: createDOMFactory('samp'),
|
30456 | script: createDOMFactory('script'),
|
30457 | section: createDOMFactory('section'),
|
30458 | select: createDOMFactory('select'),
|
30459 | small: createDOMFactory('small'),
|
30460 | source: createDOMFactory('source'),
|
30461 | span: createDOMFactory('span'),
|
30462 | strong: createDOMFactory('strong'),
|
30463 | style: createDOMFactory('style'),
|
30464 | sub: createDOMFactory('sub'),
|
30465 | summary: createDOMFactory('summary'),
|
30466 | sup: createDOMFactory('sup'),
|
30467 | table: createDOMFactory('table'),
|
30468 | tbody: createDOMFactory('tbody'),
|
30469 | td: createDOMFactory('td'),
|
30470 | textarea: createDOMFactory('textarea'),
|
30471 | tfoot: createDOMFactory('tfoot'),
|
30472 | th: createDOMFactory('th'),
|
30473 | thead: createDOMFactory('thead'),
|
30474 | time: createDOMFactory('time'),
|
30475 | title: createDOMFactory('title'),
|
30476 | tr: createDOMFactory('tr'),
|
30477 | track: createDOMFactory('track'),
|
30478 | u: createDOMFactory('u'),
|
30479 | ul: createDOMFactory('ul'),
|
30480 | 'var': createDOMFactory('var'),
|
30481 | video: createDOMFactory('video'),
|
30482 | wbr: createDOMFactory('wbr'),
|
30483 |
|
30484 |
|
30485 | circle: createDOMFactory('circle'),
|
30486 | clipPath: createDOMFactory('clipPath'),
|
30487 | defs: createDOMFactory('defs'),
|
30488 | ellipse: createDOMFactory('ellipse'),
|
30489 | g: createDOMFactory('g'),
|
30490 | image: createDOMFactory('image'),
|
30491 | line: createDOMFactory('line'),
|
30492 | linearGradient: createDOMFactory('linearGradient'),
|
30493 | mask: createDOMFactory('mask'),
|
30494 | path: createDOMFactory('path'),
|
30495 | pattern: createDOMFactory('pattern'),
|
30496 | polygon: createDOMFactory('polygon'),
|
30497 | polyline: createDOMFactory('polyline'),
|
30498 | radialGradient: createDOMFactory('radialGradient'),
|
30499 | rect: createDOMFactory('rect'),
|
30500 | stop: createDOMFactory('stop'),
|
30501 | svg: createDOMFactory('svg'),
|
30502 | text: createDOMFactory('text'),
|
30503 | tspan: createDOMFactory('tspan')
|
30504 | };
|
30505 |
|
30506 | module.exports = ReactDOMFactories;
|
30507 |
|
30508 | },
|
30509 |
|
30510 | function(module, exports, __webpack_require__) {
|
30511 |
|
30512 | |
30513 |
|
30514 |
|
30515 |
|
30516 |
|
30517 |
|
30518 |
|
30519 |
|
30520 |
|
30521 |
|
30522 | 'use strict';
|
30523 |
|
30524 | var ReactElement = __webpack_require__(22);
|
30525 | var ReactPropTypeLocationNames = __webpack_require__(57);
|
30526 | var ReactPropTypesSecret = __webpack_require__(102);
|
30527 |
|
30528 | var emptyFunction = __webpack_require__(11);
|
30529 | var getIteratorFn = __webpack_require__(59);
|
30530 | var warning = __webpack_require__(5);
|
30531 |
|
30532 | |
30533 |
|
30534 |
|
30535 |
|
30536 |
|
30537 |
|
30538 |
|
30539 |
|
30540 |
|
30541 |
|
30542 |
|
30543 |
|
30544 |
|
30545 |
|
30546 |
|
30547 |
|
30548 |
|
30549 |
|
30550 |
|
30551 |
|
30552 |
|
30553 |
|
30554 |
|
30555 |
|
30556 |
|
30557 |
|
30558 |
|
30559 |
|
30560 |
|
30561 |
|
30562 |
|
30563 |
|
30564 |
|
30565 |
|
30566 |
|
30567 |
|
30568 |
|
30569 |
|
30570 |
|
30571 |
|
30572 |
|
30573 |
|
30574 |
|
30575 |
|
30576 |
|
30577 |
|
30578 |
|
30579 | var ANONYMOUS = '<<anonymous>>';
|
30580 |
|
30581 | var ReactPropTypes = {
|
30582 | array: createPrimitiveTypeChecker('array'),
|
30583 | bool: createPrimitiveTypeChecker('boolean'),
|
30584 | func: createPrimitiveTypeChecker('function'),
|
30585 | number: createPrimitiveTypeChecker('number'),
|
30586 | object: createPrimitiveTypeChecker('object'),
|
30587 | string: createPrimitiveTypeChecker('string'),
|
30588 | symbol: createPrimitiveTypeChecker('symbol'),
|
30589 |
|
30590 | any: createAnyTypeChecker(),
|
30591 | arrayOf: createArrayOfTypeChecker,
|
30592 | element: createElementTypeChecker(),
|
30593 | instanceOf: createInstanceTypeChecker,
|
30594 | node: createNodeChecker(),
|
30595 | objectOf: createObjectOfTypeChecker,
|
30596 | oneOf: createEnumTypeChecker,
|
30597 | oneOfType: createUnionTypeChecker,
|
30598 | shape: createShapeTypeChecker
|
30599 | };
|
30600 |
|
30601 | |
30602 |
|
30603 |
|
30604 |
|
30605 |
|
30606 | function is(x, y) {
|
30607 |
|
30608 | if (x === y) {
|
30609 |
|
30610 |
|
30611 | return x !== 0 || 1 / x === 1 / y;
|
30612 | } else {
|
30613 |
|
30614 | return x !== x && y !== y;
|
30615 | }
|
30616 | }
|
30617 |
|
30618 |
|
30619 | |
30620 |
|
30621 |
|
30622 |
|
30623 |
|
30624 |
|
30625 |
|
30626 | function PropTypeError(message) {
|
30627 | this.message = message;
|
30628 | this.stack = '';
|
30629 | }
|
30630 |
|
30631 | PropTypeError.prototype = Error.prototype;
|
30632 |
|
30633 | function createChainableTypeChecker(validate) {
|
30634 | if (true) {
|
30635 | var manualPropTypeCallCache = {};
|
30636 | }
|
30637 | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
30638 | componentName = componentName || ANONYMOUS;
|
30639 | propFullName = propFullName || propName;
|
30640 | if (true) {
|
30641 | if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') {
|
30642 | var cacheKey = componentName + ':' + propName;
|
30643 | if (!manualPropTypeCallCache[cacheKey]) {
|
30644 | true ? warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will not work in production with the next major version. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName) : void 0;
|
30645 | manualPropTypeCallCache[cacheKey] = true;
|
30646 | }
|
30647 | }
|
30648 | }
|
30649 | if (props[propName] == null) {
|
30650 | var locationName = ReactPropTypeLocationNames[location];
|
30651 | if (isRequired) {
|
30652 | if (props[propName] === null) {
|
30653 | return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
30654 | }
|
30655 | return new PropTypeError('The ' + locationName + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
30656 | }
|
30657 | return null;
|
30658 | } else {
|
30659 | return validate(props, propName, componentName, location, propFullName);
|
30660 | }
|
30661 | }
|
30662 |
|
30663 | var chainedCheckType = checkType.bind(null, false);
|
30664 | chainedCheckType.isRequired = checkType.bind(null, true);
|
30665 |
|
30666 | return chainedCheckType;
|
30667 | }
|
30668 |
|
30669 | function createPrimitiveTypeChecker(expectedType) {
|
30670 | function validate(props, propName, componentName, location, propFullName, secret) {
|
30671 | var propValue = props[propName];
|
30672 | var propType = getPropType(propValue);
|
30673 | if (propType !== expectedType) {
|
30674 | var locationName = ReactPropTypeLocationNames[location];
|
30675 |
|
30676 |
|
30677 |
|
30678 | var preciseType = getPreciseType(propValue);
|
30679 |
|
30680 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
30681 | }
|
30682 | return null;
|
30683 | }
|
30684 | return createChainableTypeChecker(validate);
|
30685 | }
|
30686 |
|
30687 | function createAnyTypeChecker() {
|
30688 | return createChainableTypeChecker(emptyFunction.thatReturns(null));
|
30689 | }
|
30690 |
|
30691 | function createArrayOfTypeChecker(typeChecker) {
|
30692 | function validate(props, propName, componentName, location, propFullName) {
|
30693 | if (typeof typeChecker !== 'function') {
|
30694 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
30695 | }
|
30696 | var propValue = props[propName];
|
30697 | if (!Array.isArray(propValue)) {
|
30698 | var locationName = ReactPropTypeLocationNames[location];
|
30699 | var propType = getPropType(propValue);
|
30700 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
30701 | }
|
30702 | for (var i = 0; i < propValue.length; i++) {
|
30703 | var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
30704 | if (error instanceof Error) {
|
30705 | return error;
|
30706 | }
|
30707 | }
|
30708 | return null;
|
30709 | }
|
30710 | return createChainableTypeChecker(validate);
|
30711 | }
|
30712 |
|
30713 | function createElementTypeChecker() {
|
30714 | function validate(props, propName, componentName, location, propFullName) {
|
30715 | var propValue = props[propName];
|
30716 | if (!ReactElement.isValidElement(propValue)) {
|
30717 | var locationName = ReactPropTypeLocationNames[location];
|
30718 | var propType = getPropType(propValue);
|
30719 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
30720 | }
|
30721 | return null;
|
30722 | }
|
30723 | return createChainableTypeChecker(validate);
|
30724 | }
|
30725 |
|
30726 | function createInstanceTypeChecker(expectedClass) {
|
30727 | function validate(props, propName, componentName, location, propFullName) {
|
30728 | if (!(props[propName] instanceof expectedClass)) {
|
30729 | var locationName = ReactPropTypeLocationNames[location];
|
30730 | var expectedClassName = expectedClass.name || ANONYMOUS;
|
30731 | var actualClassName = getClassName(props[propName]);
|
30732 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
30733 | }
|
30734 | return null;
|
30735 | }
|
30736 | return createChainableTypeChecker(validate);
|
30737 | }
|
30738 |
|
30739 | function createEnumTypeChecker(expectedValues) {
|
30740 | if (!Array.isArray(expectedValues)) {
|
30741 | true ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
|
30742 | return emptyFunction.thatReturnsNull;
|
30743 | }
|
30744 |
|
30745 | function validate(props, propName, componentName, location, propFullName) {
|
30746 | var propValue = props[propName];
|
30747 | for (var i = 0; i < expectedValues.length; i++) {
|
30748 | if (is(propValue, expectedValues[i])) {
|
30749 | return null;
|
30750 | }
|
30751 | }
|
30752 |
|
30753 | var locationName = ReactPropTypeLocationNames[location];
|
30754 | var valuesString = JSON.stringify(expectedValues);
|
30755 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
30756 | }
|
30757 | return createChainableTypeChecker(validate);
|
30758 | }
|
30759 |
|
30760 | function createObjectOfTypeChecker(typeChecker) {
|
30761 | function validate(props, propName, componentName, location, propFullName) {
|
30762 | if (typeof typeChecker !== 'function') {
|
30763 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
30764 | }
|
30765 | var propValue = props[propName];
|
30766 | var propType = getPropType(propValue);
|
30767 | if (propType !== 'object') {
|
30768 | var locationName = ReactPropTypeLocationNames[location];
|
30769 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
30770 | }
|
30771 | for (var key in propValue) {
|
30772 | if (propValue.hasOwnProperty(key)) {
|
30773 | var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
30774 | if (error instanceof Error) {
|
30775 | return error;
|
30776 | }
|
30777 | }
|
30778 | }
|
30779 | return null;
|
30780 | }
|
30781 | return createChainableTypeChecker(validate);
|
30782 | }
|
30783 |
|
30784 | function createUnionTypeChecker(arrayOfTypeCheckers) {
|
30785 | if (!Array.isArray(arrayOfTypeCheckers)) {
|
30786 | true ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
30787 | return emptyFunction.thatReturnsNull;
|
30788 | }
|
30789 |
|
30790 | function validate(props, propName, componentName, location, propFullName) {
|
30791 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
30792 | var checker = arrayOfTypeCheckers[i];
|
30793 | if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
30794 | return null;
|
30795 | }
|
30796 | }
|
30797 |
|
30798 | var locationName = ReactPropTypeLocationNames[location];
|
30799 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
30800 | }
|
30801 | return createChainableTypeChecker(validate);
|
30802 | }
|
30803 |
|
30804 | function createNodeChecker() {
|
30805 | function validate(props, propName, componentName, location, propFullName) {
|
30806 | if (!isNode(props[propName])) {
|
30807 | var locationName = ReactPropTypeLocationNames[location];
|
30808 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
30809 | }
|
30810 | return null;
|
30811 | }
|
30812 | return createChainableTypeChecker(validate);
|
30813 | }
|
30814 |
|
30815 | function createShapeTypeChecker(shapeTypes) {
|
30816 | function validate(props, propName, componentName, location, propFullName) {
|
30817 | var propValue = props[propName];
|
30818 | var propType = getPropType(propValue);
|
30819 | if (propType !== 'object') {
|
30820 | var locationName = ReactPropTypeLocationNames[location];
|
30821 | return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
30822 | }
|
30823 | for (var key in shapeTypes) {
|
30824 | var checker = shapeTypes[key];
|
30825 | if (!checker) {
|
30826 | continue;
|
30827 | }
|
30828 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
30829 | if (error) {
|
30830 | return error;
|
30831 | }
|
30832 | }
|
30833 | return null;
|
30834 | }
|
30835 | return createChainableTypeChecker(validate);
|
30836 | }
|
30837 |
|
30838 | function isNode(propValue) {
|
30839 | switch (typeof propValue) {
|
30840 | case 'number':
|
30841 | case 'string':
|
30842 | case 'undefined':
|
30843 | return true;
|
30844 | case 'boolean':
|
30845 | return !propValue;
|
30846 | case 'object':
|
30847 | if (Array.isArray(propValue)) {
|
30848 | return propValue.every(isNode);
|
30849 | }
|
30850 | if (propValue === null || ReactElement.isValidElement(propValue)) {
|
30851 | return true;
|
30852 | }
|
30853 |
|
30854 | var iteratorFn = getIteratorFn(propValue);
|
30855 | if (iteratorFn) {
|
30856 | var iterator = iteratorFn.call(propValue);
|
30857 | var step;
|
30858 | if (iteratorFn !== propValue.entries) {
|
30859 | while (!(step = iterator.next()).done) {
|
30860 | if (!isNode(step.value)) {
|
30861 | return false;
|
30862 | }
|
30863 | }
|
30864 | } else {
|
30865 |
|
30866 | while (!(step = iterator.next()).done) {
|
30867 | var entry = step.value;
|
30868 | if (entry) {
|
30869 | if (!isNode(entry[1])) {
|
30870 | return false;
|
30871 | }
|
30872 | }
|
30873 | }
|
30874 | }
|
30875 | } else {
|
30876 | return false;
|
30877 | }
|
30878 |
|
30879 | return true;
|
30880 | default:
|
30881 | return false;
|
30882 | }
|
30883 | }
|
30884 |
|
30885 | function isSymbol(propType, propValue) {
|
30886 |
|
30887 | if (propType === 'symbol') {
|
30888 | return true;
|
30889 | }
|
30890 |
|
30891 |
|
30892 | if (propValue['@@toStringTag'] === 'Symbol') {
|
30893 | return true;
|
30894 | }
|
30895 |
|
30896 |
|
30897 | if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
30898 | return true;
|
30899 | }
|
30900 |
|
30901 | return false;
|
30902 | }
|
30903 |
|
30904 |
|
30905 | function getPropType(propValue) {
|
30906 | var propType = typeof propValue;
|
30907 | if (Array.isArray(propValue)) {
|
30908 | return 'array';
|
30909 | }
|
30910 | if (propValue instanceof RegExp) {
|
30911 |
|
30912 |
|
30913 |
|
30914 | return 'object';
|
30915 | }
|
30916 | if (isSymbol(propType, propValue)) {
|
30917 | return 'symbol';
|
30918 | }
|
30919 | return propType;
|
30920 | }
|
30921 |
|
30922 |
|
30923 |
|
30924 | function getPreciseType(propValue) {
|
30925 | var propType = getPropType(propValue);
|
30926 | if (propType === 'object') {
|
30927 | if (propValue instanceof Date) {
|
30928 | return 'date';
|
30929 | } else if (propValue instanceof RegExp) {
|
30930 | return 'regexp';
|
30931 | }
|
30932 | }
|
30933 | return propType;
|
30934 | }
|
30935 |
|
30936 |
|
30937 | function getClassName(propValue) {
|
30938 | if (!propValue.constructor || !propValue.constructor.name) {
|
30939 | return ANONYMOUS;
|
30940 | }
|
30941 | return propValue.constructor.name;
|
30942 | }
|
30943 |
|
30944 | module.exports = ReactPropTypes;
|
30945 |
|
30946 | },
|
30947 |
|
30948 | function(module, exports, __webpack_require__) {
|
30949 |
|
30950 | |
30951 |
|
30952 |
|
30953 |
|
30954 |
|
30955 |
|
30956 |
|
30957 |
|
30958 |
|
30959 |
|
30960 | 'use strict';
|
30961 |
|
30962 | var _assign = __webpack_require__(7);
|
30963 |
|
30964 | var ReactComponent = __webpack_require__(55);
|
30965 | var ReactNoopUpdateQueue = __webpack_require__(56);
|
30966 |
|
30967 | var emptyObject = __webpack_require__(24);
|
30968 |
|
30969 | |
30970 |
|
30971 |
|
30972 | function ReactPureComponent(props, context, updater) {
|
30973 |
|
30974 | this.props = props;
|
30975 | this.context = context;
|
30976 | this.refs = emptyObject;
|
30977 |
|
30978 |
|
30979 | this.updater = updater || ReactNoopUpdateQueue;
|
30980 | }
|
30981 |
|
30982 | function ComponentDummy() {}
|
30983 | ComponentDummy.prototype = ReactComponent.prototype;
|
30984 | ReactPureComponent.prototype = new ComponentDummy();
|
30985 | ReactPureComponent.prototype.constructor = ReactPureComponent;
|
30986 |
|
30987 | _assign(ReactPureComponent.prototype, ReactComponent.prototype);
|
30988 | ReactPureComponent.prototype.isPureReactComponent = true;
|
30989 |
|
30990 | module.exports = ReactPureComponent;
|
30991 |
|
30992 | },
|
30993 |
|
30994 | function(module, exports, __webpack_require__) {
|
30995 |
|
30996 | |
30997 |
|
30998 |
|
30999 |
|
31000 |
|
31001 |
|
31002 |
|
31003 |
|
31004 |
|
31005 |
|
31006 | 'use strict';
|
31007 |
|
31008 | var flattenChildren = __webpack_require__(266);
|
31009 |
|
31010 | var ReactTransitionChildMapping = {
|
31011 | |
31012 |
|
31013 |
|
31014 |
|
31015 |
|
31016 |
|
31017 |
|
31018 |
|
31019 | getChildMapping: function (children, selfDebugID) {
|
31020 | if (!children) {
|
31021 | return children;
|
31022 | }
|
31023 |
|
31024 | if (true) {
|
31025 | return flattenChildren(children, selfDebugID);
|
31026 | }
|
31027 |
|
31028 | return flattenChildren(children);
|
31029 | },
|
31030 |
|
31031 | |
31032 |
|
31033 |
|
31034 |
|
31035 |
|
31036 |
|
31037 |
|
31038 |
|
31039 |
|
31040 |
|
31041 |
|
31042 |
|
31043 |
|
31044 |
|
31045 |
|
31046 |
|
31047 |
|
31048 | mergeChildMappings: function (prev, next) {
|
31049 | prev = prev || {};
|
31050 | next = next || {};
|
31051 |
|
31052 | function getValueForKey(key) {
|
31053 | if (next.hasOwnProperty(key)) {
|
31054 | return next[key];
|
31055 | } else {
|
31056 | return prev[key];
|
31057 | }
|
31058 | }
|
31059 |
|
31060 |
|
31061 |
|
31062 | var nextKeysPending = {};
|
31063 |
|
31064 | var pendingKeys = [];
|
31065 | for (var prevKey in prev) {
|
31066 | if (next.hasOwnProperty(prevKey)) {
|
31067 | if (pendingKeys.length) {
|
31068 | nextKeysPending[prevKey] = pendingKeys;
|
31069 | pendingKeys = [];
|
31070 | }
|
31071 | } else {
|
31072 | pendingKeys.push(prevKey);
|
31073 | }
|
31074 | }
|
31075 |
|
31076 | var i;
|
31077 | var childMapping = {};
|
31078 | for (var nextKey in next) {
|
31079 | if (nextKeysPending.hasOwnProperty(nextKey)) {
|
31080 | for (i = 0; i < nextKeysPending[nextKey].length; i++) {
|
31081 | var pendingNextKey = nextKeysPending[nextKey][i];
|
31082 | childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
|
31083 | }
|
31084 | }
|
31085 | childMapping[nextKey] = getValueForKey(nextKey);
|
31086 | }
|
31087 |
|
31088 |
|
31089 | for (i = 0; i < pendingKeys.length; i++) {
|
31090 | childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
|
31091 | }
|
31092 |
|
31093 | return childMapping;
|
31094 | }
|
31095 | };
|
31096 |
|
31097 | module.exports = ReactTransitionChildMapping;
|
31098 |
|
31099 | },
|
31100 |
|
31101 | function(module, exports, __webpack_require__) {
|
31102 |
|
31103 | |
31104 |
|
31105 |
|
31106 |
|
31107 |
|
31108 |
|
31109 |
|
31110 |
|
31111 |
|
31112 |
|
31113 | 'use strict';
|
31114 |
|
31115 | var ExecutionEnvironment = __webpack_require__(9);
|
31116 |
|
31117 | var getVendorPrefixedEventName = __webpack_require__(93);
|
31118 |
|
31119 | var endEvents = [];
|
31120 |
|
31121 | function detectEvents() {
|
31122 | var animEnd = getVendorPrefixedEventName('animationend');
|
31123 | var transEnd = getVendorPrefixedEventName('transitionend');
|
31124 |
|
31125 | if (animEnd) {
|
31126 | endEvents.push(animEnd);
|
31127 | }
|
31128 |
|
31129 | if (transEnd) {
|
31130 | endEvents.push(transEnd);
|
31131 | }
|
31132 | }
|
31133 |
|
31134 | if (ExecutionEnvironment.canUseDOM) {
|
31135 | detectEvents();
|
31136 | }
|
31137 |
|
31138 |
|
31139 |
|
31140 |
|
31141 |
|
31142 |
|
31143 | function addEventListener(node, eventName, eventListener) {
|
31144 | node.addEventListener(eventName, eventListener, false);
|
31145 | }
|
31146 |
|
31147 | function removeEventListener(node, eventName, eventListener) {
|
31148 | node.removeEventListener(eventName, eventListener, false);
|
31149 | }
|
31150 |
|
31151 | var ReactTransitionEvents = {
|
31152 | addEndEventListener: function (node, eventListener) {
|
31153 | if (endEvents.length === 0) {
|
31154 |
|
31155 |
|
31156 | window.setTimeout(eventListener, 0);
|
31157 | return;
|
31158 | }
|
31159 | endEvents.forEach(function (endEvent) {
|
31160 | addEventListener(node, endEvent, eventListener);
|
31161 | });
|
31162 | },
|
31163 |
|
31164 | removeEndEventListener: function (node, eventListener) {
|
31165 | if (endEvents.length === 0) {
|
31166 | return;
|
31167 | }
|
31168 | endEvents.forEach(function (endEvent) {
|
31169 | removeEventListener(node, endEvent, eventListener);
|
31170 | });
|
31171 | }
|
31172 | };
|
31173 |
|
31174 | module.exports = ReactTransitionEvents;
|
31175 |
|
31176 | },
|
31177 |
|
31178 | function(module, exports, __webpack_require__) {
|
31179 |
|
31180 | |
31181 |
|
31182 |
|
31183 |
|
31184 |
|
31185 |
|
31186 |
|
31187 |
|
31188 |
|
31189 |
|
31190 | 'use strict';
|
31191 |
|
31192 | var _assign = __webpack_require__(7);
|
31193 |
|
31194 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
31195 |
|
31196 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
31197 |
|
31198 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
31199 |
|
31200 | var React = __webpack_require__(15);
|
31201 | var ReactAddonsDOMDependencies = __webpack_require__(99);
|
31202 | var ReactTransitionChildMapping = __webpack_require__(261);
|
31203 |
|
31204 | var emptyFunction = __webpack_require__(11);
|
31205 |
|
31206 | |
31207 |
|
31208 |
|
31209 |
|
31210 |
|
31211 |
|
31212 | var ReactTransitionGroup = function (_React$Component) {
|
31213 | _inherits(ReactTransitionGroup, _React$Component);
|
31214 |
|
31215 | function ReactTransitionGroup() {
|
31216 | var _temp, _this, _ret;
|
31217 |
|
31218 | _classCallCheck(this, ReactTransitionGroup);
|
31219 |
|
31220 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
31221 | args[_key] = arguments[_key];
|
31222 | }
|
31223 |
|
31224 | return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
|
31225 |
|
31226 | children: ReactTransitionChildMapping.getChildMapping(_this.props.children)
|
31227 | }, _this.performAppear = function (key) {
|
31228 | _this.currentlyTransitioningKeys[key] = true;
|
31229 |
|
31230 | var component = _this.refs[key];
|
31231 |
|
31232 | if (component.componentWillAppear) {
|
31233 | component.componentWillAppear(_this._handleDoneAppearing.bind(_this, key));
|
31234 | } else {
|
31235 | _this._handleDoneAppearing(key);
|
31236 | }
|
31237 | }, _this._handleDoneAppearing = function (key) {
|
31238 | var component = _this.refs[key];
|
31239 | if (component.componentDidAppear) {
|
31240 | component.componentDidAppear();
|
31241 | }
|
31242 |
|
31243 | delete _this.currentlyTransitioningKeys[key];
|
31244 |
|
31245 | var currentChildMapping;
|
31246 | if (true) {
|
31247 | currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children, ReactAddonsDOMDependencies.getReactInstanceMap().get(_this)._debugID);
|
31248 | } else {
|
31249 | currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children);
|
31250 | }
|
31251 |
|
31252 | if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {
|
31253 |
|
31254 | _this.performLeave(key);
|
31255 | }
|
31256 | }, _this.performEnter = function (key) {
|
31257 | _this.currentlyTransitioningKeys[key] = true;
|
31258 |
|
31259 | var component = _this.refs[key];
|
31260 |
|
31261 | if (component.componentWillEnter) {
|
31262 | component.componentWillEnter(_this._handleDoneEntering.bind(_this, key));
|
31263 | } else {
|
31264 | _this._handleDoneEntering(key);
|
31265 | }
|
31266 | }, _this._handleDoneEntering = function (key) {
|
31267 | var component = _this.refs[key];
|
31268 | if (component.componentDidEnter) {
|
31269 | component.componentDidEnter();
|
31270 | }
|
31271 |
|
31272 | delete _this.currentlyTransitioningKeys[key];
|
31273 |
|
31274 | var currentChildMapping;
|
31275 | if (true) {
|
31276 | currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children, ReactAddonsDOMDependencies.getReactInstanceMap().get(_this)._debugID);
|
31277 | } else {
|
31278 | currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children);
|
31279 | }
|
31280 |
|
31281 | if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {
|
31282 |
|
31283 | _this.performLeave(key);
|
31284 | }
|
31285 | }, _this.performLeave = function (key) {
|
31286 | _this.currentlyTransitioningKeys[key] = true;
|
31287 |
|
31288 | var component = _this.refs[key];
|
31289 | if (component.componentWillLeave) {
|
31290 | component.componentWillLeave(_this._handleDoneLeaving.bind(_this, key));
|
31291 | } else {
|
31292 |
|
31293 |
|
31294 |
|
31295 | _this._handleDoneLeaving(key);
|
31296 | }
|
31297 | }, _this._handleDoneLeaving = function (key) {
|
31298 | var component = _this.refs[key];
|
31299 |
|
31300 | if (component.componentDidLeave) {
|
31301 | component.componentDidLeave();
|
31302 | }
|
31303 |
|
31304 | delete _this.currentlyTransitioningKeys[key];
|
31305 |
|
31306 | var currentChildMapping;
|
31307 | if (true) {
|
31308 | currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children, ReactAddonsDOMDependencies.getReactInstanceMap().get(_this)._debugID);
|
31309 | } else {
|
31310 | currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children);
|
31311 | }
|
31312 |
|
31313 | if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) {
|
31314 |
|
31315 | _this.performEnter(key);
|
31316 | } else {
|
31317 | _this.setState(function (state) {
|
31318 | var newChildren = _assign({}, state.children);
|
31319 | delete newChildren[key];
|
31320 | return { children: newChildren };
|
31321 | });
|
31322 | }
|
31323 | }, _temp), _possibleConstructorReturn(_this, _ret);
|
31324 | }
|
31325 |
|
31326 | ReactTransitionGroup.prototype.componentWillMount = function componentWillMount() {
|
31327 | this.currentlyTransitioningKeys = {};
|
31328 | this.keysToEnter = [];
|
31329 | this.keysToLeave = [];
|
31330 | };
|
31331 |
|
31332 | ReactTransitionGroup.prototype.componentDidMount = function componentDidMount() {
|
31333 | var initialChildMapping = this.state.children;
|
31334 | for (var key in initialChildMapping) {
|
31335 | if (initialChildMapping[key]) {
|
31336 | this.performAppear(key);
|
31337 | }
|
31338 | }
|
31339 | };
|
31340 |
|
31341 | ReactTransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
31342 | var nextChildMapping;
|
31343 | if (true) {
|
31344 | nextChildMapping = ReactTransitionChildMapping.getChildMapping(nextProps.children, ReactAddonsDOMDependencies.getReactInstanceMap().get(this)._debugID);
|
31345 | } else {
|
31346 | nextChildMapping = ReactTransitionChildMapping.getChildMapping(nextProps.children);
|
31347 | }
|
31348 | var prevChildMapping = this.state.children;
|
31349 |
|
31350 | this.setState({
|
31351 | children: ReactTransitionChildMapping.mergeChildMappings(prevChildMapping, nextChildMapping)
|
31352 | });
|
31353 |
|
31354 | var key;
|
31355 |
|
31356 | for (key in nextChildMapping) {
|
31357 | var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key);
|
31358 | if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) {
|
31359 | this.keysToEnter.push(key);
|
31360 | }
|
31361 | }
|
31362 |
|
31363 | for (key in prevChildMapping) {
|
31364 | var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key);
|
31365 | if (prevChildMapping[key] && !hasNext && !this.currentlyTransitioningKeys[key]) {
|
31366 | this.keysToLeave.push(key);
|
31367 | }
|
31368 | }
|
31369 |
|
31370 |
|
31371 | };
|
31372 |
|
31373 | ReactTransitionGroup.prototype.componentDidUpdate = function componentDidUpdate() {
|
31374 | var keysToEnter = this.keysToEnter;
|
31375 | this.keysToEnter = [];
|
31376 | keysToEnter.forEach(this.performEnter);
|
31377 |
|
31378 | var keysToLeave = this.keysToLeave;
|
31379 | this.keysToLeave = [];
|
31380 | keysToLeave.forEach(this.performLeave);
|
31381 | };
|
31382 |
|
31383 | ReactTransitionGroup.prototype.render = function render() {
|
31384 |
|
31385 |
|
31386 | var childrenToRender = [];
|
31387 | for (var key in this.state.children) {
|
31388 | var child = this.state.children[key];
|
31389 | if (child) {
|
31390 |
|
31391 |
|
31392 |
|
31393 |
|
31394 |
|
31395 | childrenToRender.push(React.cloneElement(this.props.childFactory(child), { ref: key, key: key }));
|
31396 | }
|
31397 | }
|
31398 |
|
31399 |
|
31400 | var props = _assign({}, this.props);
|
31401 | delete props.transitionLeave;
|
31402 | delete props.transitionName;
|
31403 | delete props.transitionAppear;
|
31404 | delete props.transitionEnter;
|
31405 | delete props.childFactory;
|
31406 | delete props.transitionLeaveTimeout;
|
31407 | delete props.transitionEnterTimeout;
|
31408 | delete props.transitionAppearTimeout;
|
31409 | delete props.component;
|
31410 |
|
31411 | return React.createElement(this.props.component, props, childrenToRender);
|
31412 | };
|
31413 |
|
31414 | return ReactTransitionGroup;
|
31415 | }(React.Component);
|
31416 |
|
31417 | ReactTransitionGroup.displayName = 'ReactTransitionGroup';
|
31418 | ReactTransitionGroup.propTypes = {
|
31419 | component: React.PropTypes.any,
|
31420 | childFactory: React.PropTypes.func
|
31421 | };
|
31422 | ReactTransitionGroup.defaultProps = {
|
31423 | component: 'span',
|
31424 | childFactory: emptyFunction.thatReturnsArgument
|
31425 | };
|
31426 |
|
31427 |
|
31428 | module.exports = ReactTransitionGroup;
|
31429 |
|
31430 | },
|
31431 |
|
31432 | function(module, exports) {
|
31433 |
|
31434 | |
31435 |
|
31436 |
|
31437 |
|
31438 |
|
31439 |
|
31440 |
|
31441 |
|
31442 |
|
31443 |
|
31444 | 'use strict';
|
31445 |
|
31446 | module.exports = '15.4.1';
|
31447 |
|
31448 | },
|
31449 |
|
31450 | function(module, exports, __webpack_require__) {
|
31451 |
|
31452 | (function(process) { |
31453 |
|
31454 |
|
31455 |
|
31456 |
|
31457 |
|
31458 |
|
31459 |
|
31460 |
|
31461 |
|
31462 | 'use strict';
|
31463 |
|
31464 | var _prodInvariant = __webpack_require__(23);
|
31465 |
|
31466 | var ReactPropTypeLocationNames = __webpack_require__(57);
|
31467 | var ReactPropTypesSecret = __webpack_require__(102);
|
31468 |
|
31469 | var invariant = __webpack_require__(4);
|
31470 | var warning = __webpack_require__(5);
|
31471 |
|
31472 | var ReactComponentTreeHook;
|
31473 |
|
31474 | if (typeof process !== 'undefined' && process.env && ("development") === 'test') {
|
31475 |
|
31476 |
|
31477 |
|
31478 |
|
31479 |
|
31480 | ReactComponentTreeHook = __webpack_require__(10);
|
31481 | }
|
31482 |
|
31483 | var loggedTypeFailures = {};
|
31484 |
|
31485 | |
31486 |
|
31487 |
|
31488 |
|
31489 |
|
31490 |
|
31491 |
|
31492 |
|
31493 |
|
31494 |
|
31495 |
|
31496 |
|
31497 | function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
|
31498 | for (var typeSpecName in typeSpecs) {
|
31499 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
31500 | var error;
|
31501 |
|
31502 |
|
31503 |
|
31504 | try {
|
31505 |
|
31506 |
|
31507 | !(typeof typeSpecs[typeSpecName] === 'function') ? true ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
|
31508 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
31509 | } catch (ex) {
|
31510 | error = ex;
|
31511 | }
|
31512 | true ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
|
31513 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
31514 |
|
31515 |
|
31516 | loggedTypeFailures[error.message] = true;
|
31517 |
|
31518 | var componentStackInfo = '';
|
31519 |
|
31520 | if (true) {
|
31521 | if (!ReactComponentTreeHook) {
|
31522 | ReactComponentTreeHook = __webpack_require__(10);
|
31523 | }
|
31524 | if (debugID !== null) {
|
31525 | componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
|
31526 | } else if (element !== null) {
|
31527 | componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
|
31528 | }
|
31529 | }
|
31530 |
|
31531 | true ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
|
31532 | }
|
31533 | }
|
31534 | }
|
31535 | }
|
31536 |
|
31537 | module.exports = checkReactTypeSpec;
|
31538 | }.call(exports, __webpack_require__(28)))
|
31539 |
|
31540 | },
|
31541 |
|
31542 | function(module, exports, __webpack_require__) {
|
31543 |
|
31544 | (function(process) { |
31545 |
|
31546 |
|
31547 |
|
31548 |
|
31549 |
|
31550 |
|
31551 |
|
31552 |
|
31553 |
|
31554 |
|
31555 | 'use strict';
|
31556 |
|
31557 | var KeyEscapeUtils = __webpack_require__(98);
|
31558 | var traverseAllChildren = __webpack_require__(104);
|
31559 | var warning = __webpack_require__(5);
|
31560 |
|
31561 | var ReactComponentTreeHook;
|
31562 |
|
31563 | if (typeof process !== 'undefined' && process.env && ("development") === 'test') {
|
31564 |
|
31565 |
|
31566 |
|
31567 |
|
31568 |
|
31569 | ReactComponentTreeHook = __webpack_require__(10);
|
31570 | }
|
31571 |
|
31572 | |
31573 |
|
31574 |
|
31575 |
|
31576 |
|
31577 |
|
31578 | function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {
|
31579 |
|
31580 | if (traverseContext && typeof traverseContext === 'object') {
|
31581 | var result = traverseContext;
|
31582 | var keyUnique = result[name] === undefined;
|
31583 | if (true) {
|
31584 | if (!ReactComponentTreeHook) {
|
31585 | ReactComponentTreeHook = __webpack_require__(10);
|
31586 | }
|
31587 | if (!keyUnique) {
|
31588 | true ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
|
31589 | }
|
31590 | }
|
31591 | if (keyUnique && child != null) {
|
31592 | result[name] = child;
|
31593 | }
|
31594 | }
|
31595 | }
|
31596 |
|
31597 | |
31598 |
|
31599 |
|
31600 |
|
31601 |
|
31602 | function flattenChildren(children, selfDebugID) {
|
31603 | if (children == null) {
|
31604 | return children;
|
31605 | }
|
31606 | var result = {};
|
31607 |
|
31608 | if (true) {
|
31609 | traverseAllChildren(children, function (traverseContext, child, name) {
|
31610 | return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);
|
31611 | }, result);
|
31612 | } else {
|
31613 | traverseAllChildren(children, flattenSingleChildIntoContext, result);
|
31614 | }
|
31615 | return result;
|
31616 | }
|
31617 |
|
31618 | module.exports = flattenChildren;
|
31619 | }.call(exports, __webpack_require__(28)))
|
31620 |
|
31621 | },
|
31622 |
|
31623 | function(module, exports, __webpack_require__) {
|
31624 |
|
31625 | var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
31626 |
|
31627 | (function(root, factory) {
|
31628 | if (true) {
|
31629 | !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
31630 | } else if (typeof exports === 'object') {
|
31631 | module.exports = factory(require, exports, module);
|
31632 | } else {
|
31633 | root.Tether = factory();
|
31634 | }
|
31635 | }(this, function(require, exports, module) {
|
31636 |
|
31637 | 'use strict';
|
31638 |
|
31639 | var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
31640 |
|
31641 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
31642 |
|
31643 | var TetherBase = undefined;
|
31644 | if (typeof TetherBase === 'undefined') {
|
31645 | TetherBase = { modules: [] };
|
31646 | }
|
31647 |
|
31648 | var zeroElement = null;
|
31649 |
|
31650 |
|
31651 |
|
31652 | function getActualBoundingClientRect(node) {
|
31653 | var boundingRect = node.getBoundingClientRect();
|
31654 |
|
31655 |
|
31656 |
|
31657 | var rect = {};
|
31658 | for (var k in boundingRect) {
|
31659 | rect[k] = boundingRect[k];
|
31660 | }
|
31661 |
|
31662 | if (node.ownerDocument !== document) {
|
31663 | var _frameElement = node.ownerDocument.defaultView.frameElement;
|
31664 | if (_frameElement) {
|
31665 | var frameRect = getActualBoundingClientRect(_frameElement);
|
31666 | rect.top += frameRect.top;
|
31667 | rect.bottom += frameRect.top;
|
31668 | rect.left += frameRect.left;
|
31669 | rect.right += frameRect.left;
|
31670 | }
|
31671 | }
|
31672 |
|
31673 | return rect;
|
31674 | }
|
31675 |
|
31676 | function getScrollParents(el) {
|
31677 |
|
31678 |
|
31679 | var computedStyle = getComputedStyle(el) || {};
|
31680 | var position = computedStyle.position;
|
31681 | var parents = [];
|
31682 |
|
31683 | if (position === 'fixed') {
|
31684 | return [el];
|
31685 | }
|
31686 |
|
31687 | var parent = el;
|
31688 | while ((parent = parent.parentNode) && parent && parent.nodeType === 1) {
|
31689 | var style = undefined;
|
31690 | try {
|
31691 | style = getComputedStyle(parent);
|
31692 | } catch (err) {}
|
31693 |
|
31694 | if (typeof style === 'undefined' || style === null) {
|
31695 | parents.push(parent);
|
31696 | return parents;
|
31697 | }
|
31698 |
|
31699 | var _style = style;
|
31700 | var overflow = _style.overflow;
|
31701 | var overflowX = _style.overflowX;
|
31702 | var overflowY = _style.overflowY;
|
31703 |
|
31704 | if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) {
|
31705 | if (position !== 'absolute' || ['relative', 'absolute', 'fixed'].indexOf(style.position) >= 0) {
|
31706 | parents.push(parent);
|
31707 | }
|
31708 | }
|
31709 | }
|
31710 |
|
31711 | parents.push(el.ownerDocument.body);
|
31712 |
|
31713 |
|
31714 | if (el.ownerDocument !== document) {
|
31715 | parents.push(el.ownerDocument.defaultView);
|
31716 | }
|
31717 |
|
31718 | return parents;
|
31719 | }
|
31720 |
|
31721 | var uniqueId = (function () {
|
31722 | var id = 0;
|
31723 | return function () {
|
31724 | return ++id;
|
31725 | };
|
31726 | })();
|
31727 |
|
31728 | var zeroPosCache = {};
|
31729 | var getOrigin = function getOrigin() {
|
31730 |
|
31731 |
|
31732 |
|
31733 |
|
31734 | var node = zeroElement;
|
31735 | if (!node || !document.body.contains(node)) {
|
31736 | node = document.createElement('div');
|
31737 | node.setAttribute('data-tether-id', uniqueId());
|
31738 | extend(node.style, {
|
31739 | top: 0,
|
31740 | left: 0,
|
31741 | position: 'absolute'
|
31742 | });
|
31743 |
|
31744 | document.body.appendChild(node);
|
31745 |
|
31746 | zeroElement = node;
|
31747 | }
|
31748 |
|
31749 | var id = node.getAttribute('data-tether-id');
|
31750 | if (typeof zeroPosCache[id] === 'undefined') {
|
31751 | zeroPosCache[id] = getActualBoundingClientRect(node);
|
31752 |
|
31753 |
|
31754 | defer(function () {
|
31755 | delete zeroPosCache[id];
|
31756 | });
|
31757 | }
|
31758 |
|
31759 | return zeroPosCache[id];
|
31760 | };
|
31761 |
|
31762 | function removeUtilElements() {
|
31763 | if (zeroElement) {
|
31764 | document.body.removeChild(zeroElement);
|
31765 | }
|
31766 | zeroElement = null;
|
31767 | };
|
31768 |
|
31769 | function getBounds(el) {
|
31770 | var doc = undefined;
|
31771 | if (el === document) {
|
31772 | doc = document;
|
31773 | el = document.documentElement;
|
31774 | } else {
|
31775 | doc = el.ownerDocument;
|
31776 | }
|
31777 |
|
31778 | var docEl = doc.documentElement;
|
31779 |
|
31780 | var box = getActualBoundingClientRect(el);
|
31781 |
|
31782 | var origin = getOrigin();
|
31783 |
|
31784 | box.top -= origin.top;
|
31785 | box.left -= origin.left;
|
31786 |
|
31787 | if (typeof box.width === 'undefined') {
|
31788 | box.width = document.body.scrollWidth - box.left - box.right;
|
31789 | }
|
31790 | if (typeof box.height === 'undefined') {
|
31791 | box.height = document.body.scrollHeight - box.top - box.bottom;
|
31792 | }
|
31793 |
|
31794 | box.top = box.top - docEl.clientTop;
|
31795 | box.left = box.left - docEl.clientLeft;
|
31796 | box.right = doc.body.clientWidth - box.width - box.left;
|
31797 | box.bottom = doc.body.clientHeight - box.height - box.top;
|
31798 |
|
31799 | return box;
|
31800 | }
|
31801 |
|
31802 | function getOffsetParent(el) {
|
31803 | return el.offsetParent || document.documentElement;
|
31804 | }
|
31805 |
|
31806 | var _scrollBarSize = null;
|
31807 | function getScrollBarSize() {
|
31808 | if (_scrollBarSize) {
|
31809 | return _scrollBarSize;
|
31810 | }
|
31811 | var inner = document.createElement('div');
|
31812 | inner.style.width = '100%';
|
31813 | inner.style.height = '200px';
|
31814 |
|
31815 | var outer = document.createElement('div');
|
31816 | extend(outer.style, {
|
31817 | position: 'absolute',
|
31818 | top: 0,
|
31819 | left: 0,
|
31820 | pointerEvents: 'none',
|
31821 | visibility: 'hidden',
|
31822 | width: '200px',
|
31823 | height: '150px',
|
31824 | overflow: 'hidden'
|
31825 | });
|
31826 |
|
31827 | outer.appendChild(inner);
|
31828 |
|
31829 | document.body.appendChild(outer);
|
31830 |
|
31831 | var widthContained = inner.offsetWidth;
|
31832 | outer.style.overflow = 'scroll';
|
31833 | var widthScroll = inner.offsetWidth;
|
31834 |
|
31835 | if (widthContained === widthScroll) {
|
31836 | widthScroll = outer.clientWidth;
|
31837 | }
|
31838 |
|
31839 | document.body.removeChild(outer);
|
31840 |
|
31841 | var width = widthContained - widthScroll;
|
31842 |
|
31843 | _scrollBarSize = { width: width, height: width };
|
31844 | return _scrollBarSize;
|
31845 | }
|
31846 |
|
31847 | function extend() {
|
31848 | var out = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
31849 |
|
31850 | var args = [];
|
31851 |
|
31852 | Array.prototype.push.apply(args, arguments);
|
31853 |
|
31854 | args.slice(1).forEach(function (obj) {
|
31855 | if (obj) {
|
31856 | for (var key in obj) {
|
31857 | if (({}).hasOwnProperty.call(obj, key)) {
|
31858 | out[key] = obj[key];
|
31859 | }
|
31860 | }
|
31861 | }
|
31862 | });
|
31863 |
|
31864 | return out;
|
31865 | }
|
31866 |
|
31867 | function removeClass(el, name) {
|
31868 | if (typeof el.classList !== 'undefined') {
|
31869 | name.split(' ').forEach(function (cls) {
|
31870 | if (cls.trim()) {
|
31871 | el.classList.remove(cls);
|
31872 | }
|
31873 | });
|
31874 | } else {
|
31875 | var regex = new RegExp('(^| )' + name.split(' ').join('|') + '( |$)', 'gi');
|
31876 | var className = getClassName(el).replace(regex, ' ');
|
31877 | setClassName(el, className);
|
31878 | }
|
31879 | }
|
31880 |
|
31881 | function addClass(el, name) {
|
31882 | if (typeof el.classList !== 'undefined') {
|
31883 | name.split(' ').forEach(function (cls) {
|
31884 | if (cls.trim()) {
|
31885 | el.classList.add(cls);
|
31886 | }
|
31887 | });
|
31888 | } else {
|
31889 | removeClass(el, name);
|
31890 | var cls = getClassName(el) + (' ' + name);
|
31891 | setClassName(el, cls);
|
31892 | }
|
31893 | }
|
31894 |
|
31895 | function hasClass(el, name) {
|
31896 | if (typeof el.classList !== 'undefined') {
|
31897 | return el.classList.contains(name);
|
31898 | }
|
31899 | var className = getClassName(el);
|
31900 | return new RegExp('(^| )' + name + '( |$)', 'gi').test(className);
|
31901 | }
|
31902 |
|
31903 | function getClassName(el) {
|
31904 |
|
31905 |
|
31906 | if (el.className instanceof el.ownerDocument.defaultView.SVGAnimatedString) {
|
31907 | return el.className.baseVal;
|
31908 | }
|
31909 | return el.className;
|
31910 | }
|
31911 |
|
31912 | function setClassName(el, className) {
|
31913 | el.setAttribute('class', className);
|
31914 | }
|
31915 |
|
31916 | function updateClasses(el, add, all) {
|
31917 |
|
31918 |
|
31919 | all.forEach(function (cls) {
|
31920 | if (add.indexOf(cls) === -1 && hasClass(el, cls)) {
|
31921 | removeClass(el, cls);
|
31922 | }
|
31923 | });
|
31924 |
|
31925 | add.forEach(function (cls) {
|
31926 | if (!hasClass(el, cls)) {
|
31927 | addClass(el, cls);
|
31928 | }
|
31929 | });
|
31930 | }
|
31931 |
|
31932 | var deferred = [];
|
31933 |
|
31934 | var defer = function defer(fn) {
|
31935 | deferred.push(fn);
|
31936 | };
|
31937 |
|
31938 | var flush = function flush() {
|
31939 | var fn = undefined;
|
31940 | while (fn = deferred.pop()) {
|
31941 | fn();
|
31942 | }
|
31943 | };
|
31944 |
|
31945 | var Evented = (function () {
|
31946 | function Evented() {
|
31947 | _classCallCheck(this, Evented);
|
31948 | }
|
31949 |
|
31950 | _createClass(Evented, [{
|
31951 | key: 'on',
|
31952 | value: function on(event, handler, ctx) {
|
31953 | var once = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];
|
31954 |
|
31955 | if (typeof this.bindings === 'undefined') {
|
31956 | this.bindings = {};
|
31957 | }
|
31958 | if (typeof this.bindings[event] === 'undefined') {
|
31959 | this.bindings[event] = [];
|
31960 | }
|
31961 | this.bindings[event].push({ handler: handler, ctx: ctx, once: once });
|
31962 | }
|
31963 | }, {
|
31964 | key: 'once',
|
31965 | value: function once(event, handler, ctx) {
|
31966 | this.on(event, handler, ctx, true);
|
31967 | }
|
31968 | }, {
|
31969 | key: 'off',
|
31970 | value: function off(event, handler) {
|
31971 | if (typeof this.bindings === 'undefined' || typeof this.bindings[event] === 'undefined') {
|
31972 | return;
|
31973 | }
|
31974 |
|
31975 | if (typeof handler === 'undefined') {
|
31976 | delete this.bindings[event];
|
31977 | } else {
|
31978 | var i = 0;
|
31979 | while (i < this.bindings[event].length) {
|
31980 | if (this.bindings[event][i].handler === handler) {
|
31981 | this.bindings[event].splice(i, 1);
|
31982 | } else {
|
31983 | ++i;
|
31984 | }
|
31985 | }
|
31986 | }
|
31987 | }
|
31988 | }, {
|
31989 | key: 'trigger',
|
31990 | value: function trigger(event) {
|
31991 | if (typeof this.bindings !== 'undefined' && this.bindings[event]) {
|
31992 | var i = 0;
|
31993 |
|
31994 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
31995 | args[_key - 1] = arguments[_key];
|
31996 | }
|
31997 |
|
31998 | while (i < this.bindings[event].length) {
|
31999 | var _bindings$event$i = this.bindings[event][i];
|
32000 | var handler = _bindings$event$i.handler;
|
32001 | var ctx = _bindings$event$i.ctx;
|
32002 | var once = _bindings$event$i.once;
|
32003 |
|
32004 | var context = ctx;
|
32005 | if (typeof context === 'undefined') {
|
32006 | context = this;
|
32007 | }
|
32008 |
|
32009 | handler.apply(context, args);
|
32010 |
|
32011 | if (once) {
|
32012 | this.bindings[event].splice(i, 1);
|
32013 | } else {
|
32014 | ++i;
|
32015 | }
|
32016 | }
|
32017 | }
|
32018 | }
|
32019 | }]);
|
32020 |
|
32021 | return Evented;
|
32022 | })();
|
32023 |
|
32024 | TetherBase.Utils = {
|
32025 | getActualBoundingClientRect: getActualBoundingClientRect,
|
32026 | getScrollParents: getScrollParents,
|
32027 | getBounds: getBounds,
|
32028 | getOffsetParent: getOffsetParent,
|
32029 | extend: extend,
|
32030 | addClass: addClass,
|
32031 | removeClass: removeClass,
|
32032 | hasClass: hasClass,
|
32033 | updateClasses: updateClasses,
|
32034 | defer: defer,
|
32035 | flush: flush,
|
32036 | uniqueId: uniqueId,
|
32037 | Evented: Evented,
|
32038 | getScrollBarSize: getScrollBarSize,
|
32039 | removeUtilElements: removeUtilElements
|
32040 | };
|
32041 |
|
32042 |
|
32043 | 'use strict';
|
32044 |
|
32045 | var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
|
32046 |
|
32047 | var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
32048 |
|
32049 | var _get = function get(_x6, _x7, _x8) { var _again = true; _function: while (_again) { var object = _x6, property = _x7, receiver = _x8; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x6 = parent; _x7 = property; _x8 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
32050 |
|
32051 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
32052 |
|
32053 | function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
32054 |
|
32055 | if (typeof TetherBase === 'undefined') {
|
32056 | throw new Error('You must include the utils.js file before tether.js');
|
32057 | }
|
32058 |
|
32059 | var _TetherBase$Utils = TetherBase.Utils;
|
32060 | var getScrollParents = _TetherBase$Utils.getScrollParents;
|
32061 | var getBounds = _TetherBase$Utils.getBounds;
|
32062 | var getOffsetParent = _TetherBase$Utils.getOffsetParent;
|
32063 | var extend = _TetherBase$Utils.extend;
|
32064 | var addClass = _TetherBase$Utils.addClass;
|
32065 | var removeClass = _TetherBase$Utils.removeClass;
|
32066 | var updateClasses = _TetherBase$Utils.updateClasses;
|
32067 | var defer = _TetherBase$Utils.defer;
|
32068 | var flush = _TetherBase$Utils.flush;
|
32069 | var getScrollBarSize = _TetherBase$Utils.getScrollBarSize;
|
32070 | var removeUtilElements = _TetherBase$Utils.removeUtilElements;
|
32071 |
|
32072 | function within(a, b) {
|
32073 | var diff = arguments.length <= 2 || arguments[2] === undefined ? 1 : arguments[2];
|
32074 |
|
32075 | return a + diff >= b && b >= a - diff;
|
32076 | }
|
32077 |
|
32078 | var transformKey = (function () {
|
32079 | if (typeof document === 'undefined') {
|
32080 | return '';
|
32081 | }
|
32082 | var el = document.createElement('div');
|
32083 |
|
32084 | var transforms = ['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform'];
|
32085 | for (var i = 0; i < transforms.length; ++i) {
|
32086 | var key = transforms[i];
|
32087 | if (el.style[key] !== undefined) {
|
32088 | return key;
|
32089 | }
|
32090 | }
|
32091 | })();
|
32092 |
|
32093 | var tethers = [];
|
32094 |
|
32095 | var position = function position() {
|
32096 | tethers.forEach(function (tether) {
|
32097 | tether.position(false);
|
32098 | });
|
32099 | flush();
|
32100 | };
|
32101 |
|
32102 | function now() {
|
32103 | if (typeof performance !== 'undefined' && typeof performance.now !== 'undefined') {
|
32104 | return performance.now();
|
32105 | }
|
32106 | return +new Date();
|
32107 | }
|
32108 |
|
32109 | (function () {
|
32110 | var lastCall = null;
|
32111 | var lastDuration = null;
|
32112 | var pendingTimeout = null;
|
32113 |
|
32114 | var tick = function tick() {
|
32115 | if (typeof lastDuration !== 'undefined' && lastDuration > 16) {
|
32116 |
|
32117 | lastDuration = Math.min(lastDuration - 16, 250);
|
32118 |
|
32119 |
|
32120 | pendingTimeout = setTimeout(tick, 250);
|
32121 | return;
|
32122 | }
|
32123 |
|
32124 | if (typeof lastCall !== 'undefined' && now() - lastCall < 10) {
|
32125 |
|
32126 | return;
|
32127 | }
|
32128 |
|
32129 | if (pendingTimeout != null) {
|
32130 | clearTimeout(pendingTimeout);
|
32131 | pendingTimeout = null;
|
32132 | }
|
32133 |
|
32134 | lastCall = now();
|
32135 | position();
|
32136 | lastDuration = now() - lastCall;
|
32137 | };
|
32138 |
|
32139 | if (typeof window !== 'undefined' && typeof window.addEventListener !== 'undefined') {
|
32140 | ['resize', 'scroll', 'touchmove'].forEach(function (event) {
|
32141 | window.addEventListener(event, tick);
|
32142 | });
|
32143 | }
|
32144 | })();
|
32145 |
|
32146 | var MIRROR_LR = {
|
32147 | center: 'center',
|
32148 | left: 'right',
|
32149 | right: 'left'
|
32150 | };
|
32151 |
|
32152 | var MIRROR_TB = {
|
32153 | middle: 'middle',
|
32154 | top: 'bottom',
|
32155 | bottom: 'top'
|
32156 | };
|
32157 |
|
32158 | var OFFSET_MAP = {
|
32159 | top: 0,
|
32160 | left: 0,
|
32161 | middle: '50%',
|
32162 | center: '50%',
|
32163 | bottom: '100%',
|
32164 | right: '100%'
|
32165 | };
|
32166 |
|
32167 | var autoToFixedAttachment = function autoToFixedAttachment(attachment, relativeToAttachment) {
|
32168 | var left = attachment.left;
|
32169 | var top = attachment.top;
|
32170 |
|
32171 | if (left === 'auto') {
|
32172 | left = MIRROR_LR[relativeToAttachment.left];
|
32173 | }
|
32174 |
|
32175 | if (top === 'auto') {
|
32176 | top = MIRROR_TB[relativeToAttachment.top];
|
32177 | }
|
32178 |
|
32179 | return { left: left, top: top };
|
32180 | };
|
32181 |
|
32182 | var attachmentToOffset = function attachmentToOffset(attachment) {
|
32183 | var left = attachment.left;
|
32184 | var top = attachment.top;
|
32185 |
|
32186 | if (typeof OFFSET_MAP[attachment.left] !== 'undefined') {
|
32187 | left = OFFSET_MAP[attachment.left];
|
32188 | }
|
32189 |
|
32190 | if (typeof OFFSET_MAP[attachment.top] !== 'undefined') {
|
32191 | top = OFFSET_MAP[attachment.top];
|
32192 | }
|
32193 |
|
32194 | return { left: left, top: top };
|
32195 | };
|
32196 |
|
32197 | function addOffset() {
|
32198 | var out = { top: 0, left: 0 };
|
32199 |
|
32200 | for (var _len = arguments.length, offsets = Array(_len), _key = 0; _key < _len; _key++) {
|
32201 | offsets[_key] = arguments[_key];
|
32202 | }
|
32203 |
|
32204 | offsets.forEach(function (_ref) {
|
32205 | var top = _ref.top;
|
32206 | var left = _ref.left;
|
32207 |
|
32208 | if (typeof top === 'string') {
|
32209 | top = parseFloat(top, 10);
|
32210 | }
|
32211 | if (typeof left === 'string') {
|
32212 | left = parseFloat(left, 10);
|
32213 | }
|
32214 |
|
32215 | out.top += top;
|
32216 | out.left += left;
|
32217 | });
|
32218 |
|
32219 | return out;
|
32220 | }
|
32221 |
|
32222 | function offsetToPx(offset, size) {
|
32223 | if (typeof offset.left === 'string' && offset.left.indexOf('%') !== -1) {
|
32224 | offset.left = parseFloat(offset.left, 10) / 100 * size.width;
|
32225 | }
|
32226 | if (typeof offset.top === 'string' && offset.top.indexOf('%') !== -1) {
|
32227 | offset.top = parseFloat(offset.top, 10) / 100 * size.height;
|
32228 | }
|
32229 |
|
32230 | return offset;
|
32231 | }
|
32232 |
|
32233 | var parseOffset = function parseOffset(value) {
|
32234 | var _value$split = value.split(' ');
|
32235 |
|
32236 | var _value$split2 = _slicedToArray(_value$split, 2);
|
32237 |
|
32238 | var top = _value$split2[0];
|
32239 | var left = _value$split2[1];
|
32240 |
|
32241 | return { top: top, left: left };
|
32242 | };
|
32243 | var parseAttachment = parseOffset;
|
32244 |
|
32245 | var TetherClass = (function (_Evented) {
|
32246 | _inherits(TetherClass, _Evented);
|
32247 |
|
32248 | function TetherClass(options) {
|
32249 | var _this = this;
|
32250 |
|
32251 | _classCallCheck(this, TetherClass);
|
32252 |
|
32253 | _get(Object.getPrototypeOf(TetherClass.prototype), 'constructor', this).call(this);
|
32254 | this.position = this.position.bind(this);
|
32255 |
|
32256 | tethers.push(this);
|
32257 |
|
32258 | this.history = [];
|
32259 |
|
32260 | this.setOptions(options, false);
|
32261 |
|
32262 | TetherBase.modules.forEach(function (module) {
|
32263 | if (typeof module.initialize !== 'undefined') {
|
32264 | module.initialize.call(_this);
|
32265 | }
|
32266 | });
|
32267 |
|
32268 | this.position();
|
32269 | }
|
32270 |
|
32271 | _createClass(TetherClass, [{
|
32272 | key: 'getClass',
|
32273 | value: function getClass() {
|
32274 | var key = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];
|
32275 | var classes = this.options.classes;
|
32276 |
|
32277 | if (typeof classes !== 'undefined' && classes[key]) {
|
32278 | return this.options.classes[key];
|
32279 | } else if (this.options.classPrefix) {
|
32280 | return this.options.classPrefix + '-' + key;
|
32281 | } else {
|
32282 | return key;
|
32283 | }
|
32284 | }
|
32285 | }, {
|
32286 | key: 'setOptions',
|
32287 | value: function setOptions(options) {
|
32288 | var _this2 = this;
|
32289 |
|
32290 | var pos = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];
|
32291 |
|
32292 | var defaults = {
|
32293 | offset: '0 0',
|
32294 | targetOffset: '0 0',
|
32295 | targetAttachment: 'auto auto',
|
32296 | classPrefix: 'tether'
|
32297 | };
|
32298 |
|
32299 | this.options = extend(defaults, options);
|
32300 |
|
32301 | var _options = this.options;
|
32302 | var element = _options.element;
|
32303 | var target = _options.target;
|
32304 | var targetModifier = _options.targetModifier;
|
32305 |
|
32306 | this.element = element;
|
32307 | this.target = target;
|
32308 | this.targetModifier = targetModifier;
|
32309 |
|
32310 | if (this.target === 'viewport') {
|
32311 | this.target = document.body;
|
32312 | this.targetModifier = 'visible';
|
32313 | } else if (this.target === 'scroll-handle') {
|
32314 | this.target = document.body;
|
32315 | this.targetModifier = 'scroll-handle';
|
32316 | }
|
32317 |
|
32318 | ['element', 'target'].forEach(function (key) {
|
32319 | if (typeof _this2[key] === 'undefined') {
|
32320 | throw new Error('Tether Error: Both element and target must be defined');
|
32321 | }
|
32322 |
|
32323 | if (typeof _this2[key].jquery !== 'undefined') {
|
32324 | _this2[key] = _this2[key][0];
|
32325 | } else if (typeof _this2[key] === 'string') {
|
32326 | _this2[key] = document.querySelector(_this2[key]);
|
32327 | }
|
32328 | });
|
32329 |
|
32330 | addClass(this.element, this.getClass('element'));
|
32331 | if (!(this.options.addTargetClasses === false)) {
|
32332 | addClass(this.target, this.getClass('target'));
|
32333 | }
|
32334 |
|
32335 | if (!this.options.attachment) {
|
32336 | throw new Error('Tether Error: You must provide an attachment');
|
32337 | }
|
32338 |
|
32339 | this.targetAttachment = parseAttachment(this.options.targetAttachment);
|
32340 | this.attachment = parseAttachment(this.options.attachment);
|
32341 | this.offset = parseOffset(this.options.offset);
|
32342 | this.targetOffset = parseOffset(this.options.targetOffset);
|
32343 |
|
32344 | if (typeof this.scrollParents !== 'undefined') {
|
32345 | this.disable();
|
32346 | }
|
32347 |
|
32348 | if (this.targetModifier === 'scroll-handle') {
|
32349 | this.scrollParents = [this.target];
|
32350 | } else {
|
32351 | this.scrollParents = getScrollParents(this.target);
|
32352 | }
|
32353 |
|
32354 | if (!(this.options.enabled === false)) {
|
32355 | this.enable(pos);
|
32356 | }
|
32357 | }
|
32358 | }, {
|
32359 | key: 'getTargetBounds',
|
32360 | value: function getTargetBounds() {
|
32361 | if (typeof this.targetModifier !== 'undefined') {
|
32362 | if (this.targetModifier === 'visible') {
|
32363 | if (this.target === document.body) {
|
32364 | return { top: pageYOffset, left: pageXOffset, height: innerHeight, width: innerWidth };
|
32365 | } else {
|
32366 | var bounds = getBounds(this.target);
|
32367 |
|
32368 | var out = {
|
32369 | height: bounds.height,
|
32370 | width: bounds.width,
|
32371 | top: bounds.top,
|
32372 | left: bounds.left
|
32373 | };
|
32374 |
|
32375 | out.height = Math.min(out.height, bounds.height - (pageYOffset - bounds.top));
|
32376 | out.height = Math.min(out.height, bounds.height - (bounds.top + bounds.height - (pageYOffset + innerHeight)));
|
32377 | out.height = Math.min(innerHeight, out.height);
|
32378 | out.height -= 2;
|
32379 |
|
32380 | out.width = Math.min(out.width, bounds.width - (pageXOffset - bounds.left));
|
32381 | out.width = Math.min(out.width, bounds.width - (bounds.left + bounds.width - (pageXOffset + innerWidth)));
|
32382 | out.width = Math.min(innerWidth, out.width);
|
32383 | out.width -= 2;
|
32384 |
|
32385 | if (out.top < pageYOffset) {
|
32386 | out.top = pageYOffset;
|
32387 | }
|
32388 | if (out.left < pageXOffset) {
|
32389 | out.left = pageXOffset;
|
32390 | }
|
32391 |
|
32392 | return out;
|
32393 | }
|
32394 | } else if (this.targetModifier === 'scroll-handle') {
|
32395 | var bounds = undefined;
|
32396 | var target = this.target;
|
32397 | if (target === document.body) {
|
32398 | target = document.documentElement;
|
32399 |
|
32400 | bounds = {
|
32401 | left: pageXOffset,
|
32402 | top: pageYOffset,
|
32403 | height: innerHeight,
|
32404 | width: innerWidth
|
32405 | };
|
32406 | } else {
|
32407 | bounds = getBounds(target);
|
32408 | }
|
32409 |
|
32410 | var style = getComputedStyle(target);
|
32411 |
|
32412 | var hasBottomScroll = target.scrollWidth > target.clientWidth || [style.overflow, style.overflowX].indexOf('scroll') >= 0 || this.target !== document.body;
|
32413 |
|
32414 | var scrollBottom = 0;
|
32415 | if (hasBottomScroll) {
|
32416 | scrollBottom = 15;
|
32417 | }
|
32418 |
|
32419 | var height = bounds.height - parseFloat(style.borderTopWidth) - parseFloat(style.borderBottomWidth) - scrollBottom;
|
32420 |
|
32421 | var out = {
|
32422 | width: 15,
|
32423 | height: height * 0.975 * (height / target.scrollHeight),
|
32424 | left: bounds.left + bounds.width - parseFloat(style.borderLeftWidth) - 15
|
32425 | };
|
32426 |
|
32427 | var fitAdj = 0;
|
32428 | if (height < 408 && this.target === document.body) {
|
32429 | fitAdj = -0.00011 * Math.pow(height, 2) - 0.00727 * height + 22.58;
|
32430 | }
|
32431 |
|
32432 | if (this.target !== document.body) {
|
32433 | out.height = Math.max(out.height, 24);
|
32434 | }
|
32435 |
|
32436 | var scrollPercentage = this.target.scrollTop / (target.scrollHeight - height);
|
32437 | out.top = scrollPercentage * (height - out.height - fitAdj) + bounds.top + parseFloat(style.borderTopWidth);
|
32438 |
|
32439 | if (this.target === document.body) {
|
32440 | out.height = Math.max(out.height, 24);
|
32441 | }
|
32442 |
|
32443 | return out;
|
32444 | }
|
32445 | } else {
|
32446 | return getBounds(this.target);
|
32447 | }
|
32448 | }
|
32449 | }, {
|
32450 | key: 'clearCache',
|
32451 | value: function clearCache() {
|
32452 | this._cache = {};
|
32453 | }
|
32454 | }, {
|
32455 | key: 'cache',
|
32456 | value: function cache(k, getter) {
|
32457 |
|
32458 |
|
32459 | if (typeof this._cache === 'undefined') {
|
32460 | this._cache = {};
|
32461 | }
|
32462 |
|
32463 | if (typeof this._cache[k] === 'undefined') {
|
32464 | this._cache[k] = getter.call(this);
|
32465 | }
|
32466 |
|
32467 | return this._cache[k];
|
32468 | }
|
32469 | }, {
|
32470 | key: 'enable',
|
32471 | value: function enable() {
|
32472 | var _this3 = this;
|
32473 |
|
32474 | var pos = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
|
32475 |
|
32476 | if (!(this.options.addTargetClasses === false)) {
|
32477 | addClass(this.target, this.getClass('enabled'));
|
32478 | }
|
32479 | addClass(this.element, this.getClass('enabled'));
|
32480 | this.enabled = true;
|
32481 |
|
32482 | this.scrollParents.forEach(function (parent) {
|
32483 | if (parent !== _this3.target.ownerDocument) {
|
32484 | parent.addEventListener('scroll', _this3.position);
|
32485 | }
|
32486 | });
|
32487 |
|
32488 | if (pos) {
|
32489 | this.position();
|
32490 | }
|
32491 | }
|
32492 | }, {
|
32493 | key: 'disable',
|
32494 | value: function disable() {
|
32495 | var _this4 = this;
|
32496 |
|
32497 | removeClass(this.target, this.getClass('enabled'));
|
32498 | removeClass(this.element, this.getClass('enabled'));
|
32499 | this.enabled = false;
|
32500 |
|
32501 | if (typeof this.scrollParents !== 'undefined') {
|
32502 | this.scrollParents.forEach(function (parent) {
|
32503 | parent.removeEventListener('scroll', _this4.position);
|
32504 | });
|
32505 | }
|
32506 | }
|
32507 | }, {
|
32508 | key: 'destroy',
|
32509 | value: function destroy() {
|
32510 | var _this5 = this;
|
32511 |
|
32512 | this.disable();
|
32513 |
|
32514 | tethers.forEach(function (tether, i) {
|
32515 | if (tether === _this5) {
|
32516 | tethers.splice(i, 1);
|
32517 | }
|
32518 | });
|
32519 |
|
32520 |
|
32521 | if (tethers.length === 0) {
|
32522 | removeUtilElements();
|
32523 | }
|
32524 | }
|
32525 | }, {
|
32526 | key: 'updateAttachClasses',
|
32527 | value: function updateAttachClasses(elementAttach, targetAttach) {
|
32528 | var _this6 = this;
|
32529 |
|
32530 | elementAttach = elementAttach || this.attachment;
|
32531 | targetAttach = targetAttach || this.targetAttachment;
|
32532 | var sides = ['left', 'top', 'bottom', 'right', 'middle', 'center'];
|
32533 |
|
32534 | if (typeof this._addAttachClasses !== 'undefined' && this._addAttachClasses.length) {
|
32535 |
|
32536 |
|
32537 |
|
32538 | this._addAttachClasses.splice(0, this._addAttachClasses.length);
|
32539 | }
|
32540 |
|
32541 | if (typeof this._addAttachClasses === 'undefined') {
|
32542 | this._addAttachClasses = [];
|
32543 | }
|
32544 | var add = this._addAttachClasses;
|
32545 |
|
32546 | if (elementAttach.top) {
|
32547 | add.push(this.getClass('element-attached') + '-' + elementAttach.top);
|
32548 | }
|
32549 | if (elementAttach.left) {
|
32550 | add.push(this.getClass('element-attached') + '-' + elementAttach.left);
|
32551 | }
|
32552 | if (targetAttach.top) {
|
32553 | add.push(this.getClass('target-attached') + '-' + targetAttach.top);
|
32554 | }
|
32555 | if (targetAttach.left) {
|
32556 | add.push(this.getClass('target-attached') + '-' + targetAttach.left);
|
32557 | }
|
32558 |
|
32559 | var all = [];
|
32560 | sides.forEach(function (side) {
|
32561 | all.push(_this6.getClass('element-attached') + '-' + side);
|
32562 | all.push(_this6.getClass('target-attached') + '-' + side);
|
32563 | });
|
32564 |
|
32565 | defer(function () {
|
32566 | if (!(typeof _this6._addAttachClasses !== 'undefined')) {
|
32567 | return;
|
32568 | }
|
32569 |
|
32570 | updateClasses(_this6.element, _this6._addAttachClasses, all);
|
32571 | if (!(_this6.options.addTargetClasses === false)) {
|
32572 | updateClasses(_this6.target, _this6._addAttachClasses, all);
|
32573 | }
|
32574 |
|
32575 | delete _this6._addAttachClasses;
|
32576 | });
|
32577 | }
|
32578 | }, {
|
32579 | key: 'position',
|
32580 | value: function position() {
|
32581 | var _this7 = this;
|
32582 |
|
32583 | var flushChanges = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
|
32584 |
|
32585 |
|
32586 |
|
32587 |
|
32588 | if (!this.enabled) {
|
32589 | return;
|
32590 | }
|
32591 |
|
32592 | this.clearCache();
|
32593 |
|
32594 |
|
32595 | var targetAttachment = autoToFixedAttachment(this.targetAttachment, this.attachment);
|
32596 |
|
32597 | this.updateAttachClasses(this.attachment, targetAttachment);
|
32598 |
|
32599 | var elementPos = this.cache('element-bounds', function () {
|
32600 | return getBounds(_this7.element);
|
32601 | });
|
32602 |
|
32603 | var width = elementPos.width;
|
32604 | var height = elementPos.height;
|
32605 |
|
32606 | if (width === 0 && height === 0 && typeof this.lastSize !== 'undefined') {
|
32607 | var _lastSize = this.lastSize;
|
32608 |
|
32609 |
|
32610 |
|
32611 | width = _lastSize.width;
|
32612 | height = _lastSize.height;
|
32613 | } else {
|
32614 | this.lastSize = { width: width, height: height };
|
32615 | }
|
32616 |
|
32617 | var targetPos = this.cache('target-bounds', function () {
|
32618 | return _this7.getTargetBounds();
|
32619 | });
|
32620 | var targetSize = targetPos;
|
32621 |
|
32622 |
|
32623 | var offset = offsetToPx(attachmentToOffset(this.attachment), { width: width, height: height });
|
32624 | var targetOffset = offsetToPx(attachmentToOffset(targetAttachment), targetSize);
|
32625 |
|
32626 | var manualOffset = offsetToPx(this.offset, { width: width, height: height });
|
32627 | var manualTargetOffset = offsetToPx(this.targetOffset, targetSize);
|
32628 |
|
32629 |
|
32630 | offset = addOffset(offset, manualOffset);
|
32631 | targetOffset = addOffset(targetOffset, manualTargetOffset);
|
32632 |
|
32633 |
|
32634 | var left = targetPos.left + targetOffset.left - offset.left;
|
32635 | var top = targetPos.top + targetOffset.top - offset.top;
|
32636 |
|
32637 | for (var i = 0; i < TetherBase.modules.length; ++i) {
|
32638 | var _module2 = TetherBase.modules[i];
|
32639 | var ret = _module2.position.call(this, {
|
32640 | left: left,
|
32641 | top: top,
|
32642 | targetAttachment: targetAttachment,
|
32643 | targetPos: targetPos,
|
32644 | elementPos: elementPos,
|
32645 | offset: offset,
|
32646 | targetOffset: targetOffset,
|
32647 | manualOffset: manualOffset,
|
32648 | manualTargetOffset: manualTargetOffset,
|
32649 | scrollbarSize: scrollbarSize,
|
32650 | attachment: this.attachment
|
32651 | });
|
32652 |
|
32653 | if (ret === false) {
|
32654 | return false;
|
32655 | } else if (typeof ret === 'undefined' || typeof ret !== 'object') {
|
32656 | continue;
|
32657 | } else {
|
32658 | top = ret.top;
|
32659 | left = ret.left;
|
32660 | }
|
32661 | }
|
32662 |
|
32663 |
|
32664 |
|
32665 |
|
32666 | var next = {
|
32667 |
|
32668 |
|
32669 | page: {
|
32670 | top: top,
|
32671 | left: left
|
32672 | },
|
32673 |
|
32674 |
|
32675 | viewport: {
|
32676 | top: top - pageYOffset,
|
32677 | bottom: pageYOffset - top - height + innerHeight,
|
32678 | left: left - pageXOffset,
|
32679 | right: pageXOffset - left - width + innerWidth
|
32680 | }
|
32681 | };
|
32682 |
|
32683 | var doc = this.target.ownerDocument;
|
32684 | var win = doc.defaultView;
|
32685 |
|
32686 | var scrollbarSize = undefined;
|
32687 | if (win.innerHeight > doc.documentElement.clientHeight) {
|
32688 | scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);
|
32689 | next.viewport.bottom -= scrollbarSize.height;
|
32690 | }
|
32691 |
|
32692 | if (win.innerWidth > doc.documentElement.clientWidth) {
|
32693 | scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);
|
32694 | next.viewport.right -= scrollbarSize.width;
|
32695 | }
|
32696 |
|
32697 | if (['', 'static'].indexOf(doc.body.style.position) === -1 || ['', 'static'].indexOf(doc.body.parentElement.style.position) === -1) {
|
32698 |
|
32699 | next.page.bottom = doc.body.scrollHeight - top - height;
|
32700 | next.page.right = doc.body.scrollWidth - left - width;
|
32701 | }
|
32702 |
|
32703 | if (typeof this.options.optimizations !== 'undefined' && this.options.optimizations.moveElement !== false && !(typeof this.targetModifier !== 'undefined')) {
|
32704 | (function () {
|
32705 | var offsetParent = _this7.cache('target-offsetparent', function () {
|
32706 | return getOffsetParent(_this7.target);
|
32707 | });
|
32708 | var offsetPosition = _this7.cache('target-offsetparent-bounds', function () {
|
32709 | return getBounds(offsetParent);
|
32710 | });
|
32711 | var offsetParentStyle = getComputedStyle(offsetParent);
|
32712 | var offsetParentSize = offsetPosition;
|
32713 |
|
32714 | var offsetBorder = {};
|
32715 | ['Top', 'Left', 'Bottom', 'Right'].forEach(function (side) {
|
32716 | offsetBorder[side.toLowerCase()] = parseFloat(offsetParentStyle['border' + side + 'Width']);
|
32717 | });
|
32718 |
|
32719 | offsetPosition.right = doc.body.scrollWidth - offsetPosition.left - offsetParentSize.width + offsetBorder.right;
|
32720 | offsetPosition.bottom = doc.body.scrollHeight - offsetPosition.top - offsetParentSize.height + offsetBorder.bottom;
|
32721 |
|
32722 | if (next.page.top >= offsetPosition.top + offsetBorder.top && next.page.bottom >= offsetPosition.bottom) {
|
32723 | if (next.page.left >= offsetPosition.left + offsetBorder.left && next.page.right >= offsetPosition.right) {
|
32724 |
|
32725 | var scrollTop = offsetParent.scrollTop;
|
32726 | var scrollLeft = offsetParent.scrollLeft;
|
32727 |
|
32728 |
|
32729 |
|
32730 | next.offset = {
|
32731 | top: next.page.top - offsetPosition.top + scrollTop - offsetBorder.top,
|
32732 | left: next.page.left - offsetPosition.left + scrollLeft - offsetBorder.left
|
32733 | };
|
32734 | }
|
32735 | }
|
32736 | })();
|
32737 | }
|
32738 |
|
32739 |
|
32740 |
|
32741 |
|
32742 | this.move(next);
|
32743 |
|
32744 | this.history.unshift(next);
|
32745 |
|
32746 | if (this.history.length > 3) {
|
32747 | this.history.pop();
|
32748 | }
|
32749 |
|
32750 | if (flushChanges) {
|
32751 | flush();
|
32752 | }
|
32753 |
|
32754 | return true;
|
32755 | }
|
32756 |
|
32757 |
|
32758 | }, {
|
32759 | key: 'move',
|
32760 | value: function move(pos) {
|
32761 | var _this8 = this;
|
32762 |
|
32763 | if (!(typeof this.element.parentNode !== 'undefined')) {
|
32764 | return;
|
32765 | }
|
32766 |
|
32767 | var same = {};
|
32768 |
|
32769 | for (var type in pos) {
|
32770 | same[type] = {};
|
32771 |
|
32772 | for (var key in pos[type]) {
|
32773 | var found = false;
|
32774 |
|
32775 | for (var i = 0; i < this.history.length; ++i) {
|
32776 | var point = this.history[i];
|
32777 | if (typeof point[type] !== 'undefined' && !within(point[type][key], pos[type][key])) {
|
32778 | found = true;
|
32779 | break;
|
32780 | }
|
32781 | }
|
32782 |
|
32783 | if (!found) {
|
32784 | same[type][key] = true;
|
32785 | }
|
32786 | }
|
32787 | }
|
32788 |
|
32789 | var css = { top: '', left: '', right: '', bottom: '' };
|
32790 |
|
32791 | var transcribe = function transcribe(_same, _pos) {
|
32792 | var hasOptimizations = typeof _this8.options.optimizations !== 'undefined';
|
32793 | var gpu = hasOptimizations ? _this8.options.optimizations.gpu : null;
|
32794 | if (gpu !== false) {
|
32795 | var yPos = undefined,
|
32796 | xPos = undefined;
|
32797 | if (_same.top) {
|
32798 | css.top = 0;
|
32799 | yPos = _pos.top;
|
32800 | } else {
|
32801 | css.bottom = 0;
|
32802 | yPos = -_pos.bottom;
|
32803 | }
|
32804 |
|
32805 | if (_same.left) {
|
32806 | css.left = 0;
|
32807 | xPos = _pos.left;
|
32808 | } else {
|
32809 | css.right = 0;
|
32810 | xPos = -_pos.right;
|
32811 | }
|
32812 |
|
32813 | if (window.matchMedia) {
|
32814 |
|
32815 | var retina = window.matchMedia('only screen and (min-resolution: 1.3dppx)').matches || window.matchMedia('only screen and (-webkit-min-device-pixel-ratio: 1.3)').matches;
|
32816 | if (!retina) {
|
32817 | xPos = Math.round(xPos);
|
32818 | yPos = Math.round(yPos);
|
32819 | }
|
32820 | }
|
32821 |
|
32822 | css[transformKey] = 'translateX(' + xPos + 'px) translateY(' + yPos + 'px)';
|
32823 |
|
32824 | if (transformKey !== 'msTransform') {
|
32825 |
|
32826 |
|
32827 | css[transformKey] += " translateZ(0)";
|
32828 | }
|
32829 | } else {
|
32830 | if (_same.top) {
|
32831 | css.top = _pos.top + 'px';
|
32832 | } else {
|
32833 | css.bottom = _pos.bottom + 'px';
|
32834 | }
|
32835 |
|
32836 | if (_same.left) {
|
32837 | css.left = _pos.left + 'px';
|
32838 | } else {
|
32839 | css.right = _pos.right + 'px';
|
32840 | }
|
32841 | }
|
32842 | };
|
32843 |
|
32844 | var moved = false;
|
32845 | if ((same.page.top || same.page.bottom) && (same.page.left || same.page.right)) {
|
32846 | css.position = 'absolute';
|
32847 | transcribe(same.page, pos.page);
|
32848 | } else if ((same.viewport.top || same.viewport.bottom) && (same.viewport.left || same.viewport.right)) {
|
32849 | css.position = 'fixed';
|
32850 | transcribe(same.viewport, pos.viewport);
|
32851 | } else if (typeof same.offset !== 'undefined' && same.offset.top && same.offset.left) {
|
32852 | (function () {
|
32853 | css.position = 'absolute';
|
32854 | var offsetParent = _this8.cache('target-offsetparent', function () {
|
32855 | return getOffsetParent(_this8.target);
|
32856 | });
|
32857 |
|
32858 | if (getOffsetParent(_this8.element) !== offsetParent) {
|
32859 | defer(function () {
|
32860 | _this8.element.parentNode.removeChild(_this8.element);
|
32861 | offsetParent.appendChild(_this8.element);
|
32862 | });
|
32863 | }
|
32864 |
|
32865 | transcribe(same.offset, pos.offset);
|
32866 | moved = true;
|
32867 | })();
|
32868 | } else {
|
32869 | css.position = 'absolute';
|
32870 | transcribe({ top: true, left: true }, pos.page);
|
32871 | }
|
32872 |
|
32873 | if (!moved) {
|
32874 | if (this.options.bodyElement) {
|
32875 | this.options.bodyElement.appendChild(this.element);
|
32876 | } else {
|
32877 | var offsetParentIsBody = true;
|
32878 | var currentNode = this.element.parentNode;
|
32879 | while (currentNode && currentNode.nodeType === 1 && currentNode.tagName !== 'BODY') {
|
32880 | if (getComputedStyle(currentNode).position !== 'static') {
|
32881 | offsetParentIsBody = false;
|
32882 | break;
|
32883 | }
|
32884 |
|
32885 | currentNode = currentNode.parentNode;
|
32886 | }
|
32887 |
|
32888 | if (!offsetParentIsBody) {
|
32889 | this.element.parentNode.removeChild(this.element);
|
32890 | this.element.ownerDocument.body.appendChild(this.element);
|
32891 | }
|
32892 | }
|
32893 | }
|
32894 |
|
32895 |
|
32896 | var writeCSS = {};
|
32897 | var write = false;
|
32898 | for (var key in css) {
|
32899 | var val = css[key];
|
32900 | var elVal = this.element.style[key];
|
32901 |
|
32902 | if (elVal !== val) {
|
32903 | write = true;
|
32904 | writeCSS[key] = val;
|
32905 | }
|
32906 | }
|
32907 |
|
32908 | if (write) {
|
32909 | defer(function () {
|
32910 | extend(_this8.element.style, writeCSS);
|
32911 | _this8.trigger('repositioned');
|
32912 | });
|
32913 | }
|
32914 | }
|
32915 | }]);
|
32916 |
|
32917 | return TetherClass;
|
32918 | })(Evented);
|
32919 |
|
32920 | TetherClass.modules = [];
|
32921 |
|
32922 | TetherBase.position = position;
|
32923 |
|
32924 | var Tether = extend(TetherClass, TetherBase);
|
32925 |
|
32926 |
|
32927 | 'use strict';
|
32928 |
|
32929 | var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
|
32930 |
|
32931 | var _TetherBase$Utils = TetherBase.Utils;
|
32932 | var getBounds = _TetherBase$Utils.getBounds;
|
32933 | var extend = _TetherBase$Utils.extend;
|
32934 | var updateClasses = _TetherBase$Utils.updateClasses;
|
32935 | var defer = _TetherBase$Utils.defer;
|
32936 |
|
32937 | var BOUNDS_FORMAT = ['left', 'top', 'right', 'bottom'];
|
32938 |
|
32939 | function getBoundingRect(tether, to) {
|
32940 | if (to === 'scrollParent') {
|
32941 | to = tether.scrollParents[0];
|
32942 | } else if (to === 'window') {
|
32943 | to = [pageXOffset, pageYOffset, innerWidth + pageXOffset, innerHeight + pageYOffset];
|
32944 | }
|
32945 |
|
32946 | if (to === document) {
|
32947 | to = to.documentElement;
|
32948 | }
|
32949 |
|
32950 | if (typeof to.nodeType !== 'undefined') {
|
32951 | (function () {
|
32952 | var node = to;
|
32953 | var size = getBounds(to);
|
32954 | var pos = size;
|
32955 | var style = getComputedStyle(to);
|
32956 |
|
32957 | to = [pos.left, pos.top, size.width + pos.left, size.height + pos.top];
|
32958 |
|
32959 |
|
32960 | if (node.ownerDocument !== document) {
|
32961 | var win = node.ownerDocument.defaultView;
|
32962 | to[0] += win.pageXOffset;
|
32963 | to[1] += win.pageYOffset;
|
32964 | to[2] += win.pageXOffset;
|
32965 | to[3] += win.pageYOffset;
|
32966 | }
|
32967 |
|
32968 | BOUNDS_FORMAT.forEach(function (side, i) {
|
32969 | side = side[0].toUpperCase() + side.substr(1);
|
32970 | if (side === 'Top' || side === 'Left') {
|
32971 | to[i] += parseFloat(style['border' + side + 'Width']);
|
32972 | } else {
|
32973 | to[i] -= parseFloat(style['border' + side + 'Width']);
|
32974 | }
|
32975 | });
|
32976 | })();
|
32977 | }
|
32978 |
|
32979 | return to;
|
32980 | }
|
32981 |
|
32982 | TetherBase.modules.push({
|
32983 | position: function position(_ref) {
|
32984 | var _this = this;
|
32985 |
|
32986 | var top = _ref.top;
|
32987 | var left = _ref.left;
|
32988 | var targetAttachment = _ref.targetAttachment;
|
32989 |
|
32990 | if (!this.options.constraints) {
|
32991 | return true;
|
32992 | }
|
32993 |
|
32994 | var _cache = this.cache('element-bounds', function () {
|
32995 | return getBounds(_this.element);
|
32996 | });
|
32997 |
|
32998 | var height = _cache.height;
|
32999 | var width = _cache.width;
|
33000 |
|
33001 | if (width === 0 && height === 0 && typeof this.lastSize !== 'undefined') {
|
33002 | var _lastSize = this.lastSize;
|
33003 |
|
33004 |
|
33005 |
|
33006 | width = _lastSize.width;
|
33007 | height = _lastSize.height;
|
33008 | }
|
33009 |
|
33010 | var targetSize = this.cache('target-bounds', function () {
|
33011 | return _this.getTargetBounds();
|
33012 | });
|
33013 |
|
33014 | var targetHeight = targetSize.height;
|
33015 | var targetWidth = targetSize.width;
|
33016 |
|
33017 | var allClasses = [this.getClass('pinned'), this.getClass('out-of-bounds')];
|
33018 |
|
33019 | this.options.constraints.forEach(function (constraint) {
|
33020 | var outOfBoundsClass = constraint.outOfBoundsClass;
|
33021 | var pinnedClass = constraint.pinnedClass;
|
33022 |
|
33023 | if (outOfBoundsClass) {
|
33024 | allClasses.push(outOfBoundsClass);
|
33025 | }
|
33026 | if (pinnedClass) {
|
33027 | allClasses.push(pinnedClass);
|
33028 | }
|
33029 | });
|
33030 |
|
33031 | allClasses.forEach(function (cls) {
|
33032 | ['left', 'top', 'right', 'bottom'].forEach(function (side) {
|
33033 | allClasses.push(cls + '-' + side);
|
33034 | });
|
33035 | });
|
33036 |
|
33037 | var addClasses = [];
|
33038 |
|
33039 | var tAttachment = extend({}, targetAttachment);
|
33040 | var eAttachment = extend({}, this.attachment);
|
33041 |
|
33042 | this.options.constraints.forEach(function (constraint) {
|
33043 | var to = constraint.to;
|
33044 | var attachment = constraint.attachment;
|
33045 | var pin = constraint.pin;
|
33046 |
|
33047 | if (typeof attachment === 'undefined') {
|
33048 | attachment = '';
|
33049 | }
|
33050 |
|
33051 | var changeAttachX = undefined,
|
33052 | changeAttachY = undefined;
|
33053 | if (attachment.indexOf(' ') >= 0) {
|
33054 | var _attachment$split = attachment.split(' ');
|
33055 |
|
33056 | var _attachment$split2 = _slicedToArray(_attachment$split, 2);
|
33057 |
|
33058 | changeAttachY = _attachment$split2[0];
|
33059 | changeAttachX = _attachment$split2[1];
|
33060 | } else {
|
33061 | changeAttachX = changeAttachY = attachment;
|
33062 | }
|
33063 |
|
33064 | var bounds = getBoundingRect(_this, to);
|
33065 |
|
33066 | if (changeAttachY === 'target' || changeAttachY === 'both') {
|
33067 | if (top < bounds[1] && tAttachment.top === 'top') {
|
33068 | top += targetHeight;
|
33069 | tAttachment.top = 'bottom';
|
33070 | }
|
33071 |
|
33072 | if (top + height > bounds[3] && tAttachment.top === 'bottom') {
|
33073 | top -= targetHeight;
|
33074 | tAttachment.top = 'top';
|
33075 | }
|
33076 | }
|
33077 |
|
33078 | if (changeAttachY === 'together') {
|
33079 | if (tAttachment.top === 'top') {
|
33080 | if (eAttachment.top === 'bottom' && top < bounds[1]) {
|
33081 | top += targetHeight;
|
33082 | tAttachment.top = 'bottom';
|
33083 |
|
33084 | top += height;
|
33085 | eAttachment.top = 'top';
|
33086 | } else if (eAttachment.top === 'top' && top + height > bounds[3] && top - (height - targetHeight) >= bounds[1]) {
|
33087 | top -= height - targetHeight;
|
33088 | tAttachment.top = 'bottom';
|
33089 |
|
33090 | eAttachment.top = 'bottom';
|
33091 | }
|
33092 | }
|
33093 |
|
33094 | if (tAttachment.top === 'bottom') {
|
33095 | if (eAttachment.top === 'top' && top + height > bounds[3]) {
|
33096 | top -= targetHeight;
|
33097 | tAttachment.top = 'top';
|
33098 |
|
33099 | top -= height;
|
33100 | eAttachment.top = 'bottom';
|
33101 | } else if (eAttachment.top === 'bottom' && top < bounds[1] && top + (height * 2 - targetHeight) <= bounds[3]) {
|
33102 | top += height - targetHeight;
|
33103 | tAttachment.top = 'top';
|
33104 |
|
33105 | eAttachment.top = 'top';
|
33106 | }
|
33107 | }
|
33108 |
|
33109 | if (tAttachment.top === 'middle') {
|
33110 | if (top + height > bounds[3] && eAttachment.top === 'top') {
|
33111 | top -= height;
|
33112 | eAttachment.top = 'bottom';
|
33113 | } else if (top < bounds[1] && eAttachment.top === 'bottom') {
|
33114 | top += height;
|
33115 | eAttachment.top = 'top';
|
33116 | }
|
33117 | }
|
33118 | }
|
33119 |
|
33120 | if (changeAttachX === 'target' || changeAttachX === 'both') {
|
33121 | if (left < bounds[0] && tAttachment.left === 'left') {
|
33122 | left += targetWidth;
|
33123 | tAttachment.left = 'right';
|
33124 | }
|
33125 |
|
33126 | if (left + width > bounds[2] && tAttachment.left === 'right') {
|
33127 | left -= targetWidth;
|
33128 | tAttachment.left = 'left';
|
33129 | }
|
33130 | }
|
33131 |
|
33132 | if (changeAttachX === 'together') {
|
33133 | if (left < bounds[0] && tAttachment.left === 'left') {
|
33134 | if (eAttachment.left === 'right') {
|
33135 | left += targetWidth;
|
33136 | tAttachment.left = 'right';
|
33137 |
|
33138 | left += width;
|
33139 | eAttachment.left = 'left';
|
33140 | } else if (eAttachment.left === 'left') {
|
33141 | left += targetWidth;
|
33142 | tAttachment.left = 'right';
|
33143 |
|
33144 | left -= width;
|
33145 | eAttachment.left = 'right';
|
33146 | }
|
33147 | } else if (left + width > bounds[2] && tAttachment.left === 'right') {
|
33148 | if (eAttachment.left === 'left') {
|
33149 | left -= targetWidth;
|
33150 | tAttachment.left = 'left';
|
33151 |
|
33152 | left -= width;
|
33153 | eAttachment.left = 'right';
|
33154 | } else if (eAttachment.left === 'right') {
|
33155 | left -= targetWidth;
|
33156 | tAttachment.left = 'left';
|
33157 |
|
33158 | left += width;
|
33159 | eAttachment.left = 'left';
|
33160 | }
|
33161 | } else if (tAttachment.left === 'center') {
|
33162 | if (left + width > bounds[2] && eAttachment.left === 'left') {
|
33163 | left -= width;
|
33164 | eAttachment.left = 'right';
|
33165 | } else if (left < bounds[0] && eAttachment.left === 'right') {
|
33166 | left += width;
|
33167 | eAttachment.left = 'left';
|
33168 | }
|
33169 | }
|
33170 | }
|
33171 |
|
33172 | if (changeAttachY === 'element' || changeAttachY === 'both') {
|
33173 | if (top < bounds[1] && eAttachment.top === 'bottom') {
|
33174 | top += height;
|
33175 | eAttachment.top = 'top';
|
33176 | }
|
33177 |
|
33178 | if (top + height > bounds[3] && eAttachment.top === 'top') {
|
33179 | top -= height;
|
33180 | eAttachment.top = 'bottom';
|
33181 | }
|
33182 | }
|
33183 |
|
33184 | if (changeAttachX === 'element' || changeAttachX === 'both') {
|
33185 | if (left < bounds[0]) {
|
33186 | if (eAttachment.left === 'right') {
|
33187 | left += width;
|
33188 | eAttachment.left = 'left';
|
33189 | } else if (eAttachment.left === 'center') {
|
33190 | left += width / 2;
|
33191 | eAttachment.left = 'left';
|
33192 | }
|
33193 | }
|
33194 |
|
33195 | if (left + width > bounds[2]) {
|
33196 | if (eAttachment.left === 'left') {
|
33197 | left -= width;
|
33198 | eAttachment.left = 'right';
|
33199 | } else if (eAttachment.left === 'center') {
|
33200 | left -= width / 2;
|
33201 | eAttachment.left = 'right';
|
33202 | }
|
33203 | }
|
33204 | }
|
33205 |
|
33206 | if (typeof pin === 'string') {
|
33207 | pin = pin.split(',').map(function (p) {
|
33208 | return p.trim();
|
33209 | });
|
33210 | } else if (pin === true) {
|
33211 | pin = ['top', 'left', 'right', 'bottom'];
|
33212 | }
|
33213 |
|
33214 | pin = pin || [];
|
33215 |
|
33216 | var pinned = [];
|
33217 | var oob = [];
|
33218 |
|
33219 | if (top < bounds[1]) {
|
33220 | if (pin.indexOf('top') >= 0) {
|
33221 | top = bounds[1];
|
33222 | pinned.push('top');
|
33223 | } else {
|
33224 | oob.push('top');
|
33225 | }
|
33226 | }
|
33227 |
|
33228 | if (top + height > bounds[3]) {
|
33229 | if (pin.indexOf('bottom') >= 0) {
|
33230 | top = bounds[3] - height;
|
33231 | pinned.push('bottom');
|
33232 | } else {
|
33233 | oob.push('bottom');
|
33234 | }
|
33235 | }
|
33236 |
|
33237 | if (left < bounds[0]) {
|
33238 | if (pin.indexOf('left') >= 0) {
|
33239 | left = bounds[0];
|
33240 | pinned.push('left');
|
33241 | } else {
|
33242 | oob.push('left');
|
33243 | }
|
33244 | }
|
33245 |
|
33246 | if (left + width > bounds[2]) {
|
33247 | if (pin.indexOf('right') >= 0) {
|
33248 | left = bounds[2] - width;
|
33249 | pinned.push('right');
|
33250 | } else {
|
33251 | oob.push('right');
|
33252 | }
|
33253 | }
|
33254 |
|
33255 | if (pinned.length) {
|
33256 | (function () {
|
33257 | var pinnedClass = undefined;
|
33258 | if (typeof _this.options.pinnedClass !== 'undefined') {
|
33259 | pinnedClass = _this.options.pinnedClass;
|
33260 | } else {
|
33261 | pinnedClass = _this.getClass('pinned');
|
33262 | }
|
33263 |
|
33264 | addClasses.push(pinnedClass);
|
33265 | pinned.forEach(function (side) {
|
33266 | addClasses.push(pinnedClass + '-' + side);
|
33267 | });
|
33268 | })();
|
33269 | }
|
33270 |
|
33271 | if (oob.length) {
|
33272 | (function () {
|
33273 | var oobClass = undefined;
|
33274 | if (typeof _this.options.outOfBoundsClass !== 'undefined') {
|
33275 | oobClass = _this.options.outOfBoundsClass;
|
33276 | } else {
|
33277 | oobClass = _this.getClass('out-of-bounds');
|
33278 | }
|
33279 |
|
33280 | addClasses.push(oobClass);
|
33281 | oob.forEach(function (side) {
|
33282 | addClasses.push(oobClass + '-' + side);
|
33283 | });
|
33284 | })();
|
33285 | }
|
33286 |
|
33287 | if (pinned.indexOf('left') >= 0 || pinned.indexOf('right') >= 0) {
|
33288 | eAttachment.left = tAttachment.left = false;
|
33289 | }
|
33290 | if (pinned.indexOf('top') >= 0 || pinned.indexOf('bottom') >= 0) {
|
33291 | eAttachment.top = tAttachment.top = false;
|
33292 | }
|
33293 |
|
33294 | if (tAttachment.top !== targetAttachment.top || tAttachment.left !== targetAttachment.left || eAttachment.top !== _this.attachment.top || eAttachment.left !== _this.attachment.left) {
|
33295 | _this.updateAttachClasses(eAttachment, tAttachment);
|
33296 | _this.trigger('update', {
|
33297 | attachment: eAttachment,
|
33298 | targetAttachment: tAttachment
|
33299 | });
|
33300 | }
|
33301 | });
|
33302 |
|
33303 | defer(function () {
|
33304 | if (!(_this.options.addTargetClasses === false)) {
|
33305 | updateClasses(_this.target, addClasses, allClasses);
|
33306 | }
|
33307 | updateClasses(_this.element, addClasses, allClasses);
|
33308 | });
|
33309 |
|
33310 | return { top: top, left: left };
|
33311 | }
|
33312 | });
|
33313 |
|
33314 |
|
33315 | 'use strict';
|
33316 |
|
33317 | var _TetherBase$Utils = TetherBase.Utils;
|
33318 | var getBounds = _TetherBase$Utils.getBounds;
|
33319 | var updateClasses = _TetherBase$Utils.updateClasses;
|
33320 | var defer = _TetherBase$Utils.defer;
|
33321 |
|
33322 | TetherBase.modules.push({
|
33323 | position: function position(_ref) {
|
33324 | var _this = this;
|
33325 |
|
33326 | var top = _ref.top;
|
33327 | var left = _ref.left;
|
33328 |
|
33329 | var _cache = this.cache('element-bounds', function () {
|
33330 | return getBounds(_this.element);
|
33331 | });
|
33332 |
|
33333 | var height = _cache.height;
|
33334 | var width = _cache.width;
|
33335 |
|
33336 | var targetPos = this.getTargetBounds();
|
33337 |
|
33338 | var bottom = top + height;
|
33339 | var right = left + width;
|
33340 |
|
33341 | var abutted = [];
|
33342 | if (top <= targetPos.bottom && bottom >= targetPos.top) {
|
33343 | ['left', 'right'].forEach(function (side) {
|
33344 | var targetPosSide = targetPos[side];
|
33345 | if (targetPosSide === left || targetPosSide === right) {
|
33346 | abutted.push(side);
|
33347 | }
|
33348 | });
|
33349 | }
|
33350 |
|
33351 | if (left <= targetPos.right && right >= targetPos.left) {
|
33352 | ['top', 'bottom'].forEach(function (side) {
|
33353 | var targetPosSide = targetPos[side];
|
33354 | if (targetPosSide === top || targetPosSide === bottom) {
|
33355 | abutted.push(side);
|
33356 | }
|
33357 | });
|
33358 | }
|
33359 |
|
33360 | var allClasses = [];
|
33361 | var addClasses = [];
|
33362 |
|
33363 | var sides = ['left', 'top', 'right', 'bottom'];
|
33364 | allClasses.push(this.getClass('abutted'));
|
33365 | sides.forEach(function (side) {
|
33366 | allClasses.push(_this.getClass('abutted') + '-' + side);
|
33367 | });
|
33368 |
|
33369 | if (abutted.length) {
|
33370 | addClasses.push(this.getClass('abutted'));
|
33371 | }
|
33372 |
|
33373 | abutted.forEach(function (side) {
|
33374 | addClasses.push(_this.getClass('abutted') + '-' + side);
|
33375 | });
|
33376 |
|
33377 | defer(function () {
|
33378 | if (!(_this.options.addTargetClasses === false)) {
|
33379 | updateClasses(_this.target, addClasses, allClasses);
|
33380 | }
|
33381 | updateClasses(_this.element, addClasses, allClasses);
|
33382 | });
|
33383 |
|
33384 | return true;
|
33385 | }
|
33386 | });
|
33387 |
|
33388 |
|
33389 | 'use strict';
|
33390 |
|
33391 | var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
|
33392 |
|
33393 | TetherBase.modules.push({
|
33394 | position: function position(_ref) {
|
33395 | var top = _ref.top;
|
33396 | var left = _ref.left;
|
33397 |
|
33398 | if (!this.options.shift) {
|
33399 | return;
|
33400 | }
|
33401 |
|
33402 | var shift = this.options.shift;
|
33403 | if (typeof this.options.shift === 'function') {
|
33404 | shift = this.options.shift.call(this, { top: top, left: left });
|
33405 | }
|
33406 |
|
33407 | var shiftTop = undefined,
|
33408 | shiftLeft = undefined;
|
33409 | if (typeof shift === 'string') {
|
33410 | shift = shift.split(' ');
|
33411 | shift[1] = shift[1] || shift[0];
|
33412 |
|
33413 | var _shift = shift;
|
33414 |
|
33415 | var _shift2 = _slicedToArray(_shift, 2);
|
33416 |
|
33417 | shiftTop = _shift2[0];
|
33418 | shiftLeft = _shift2[1];
|
33419 |
|
33420 | shiftTop = parseFloat(shiftTop, 10);
|
33421 | shiftLeft = parseFloat(shiftLeft, 10);
|
33422 | } else {
|
33423 | shiftTop = shift.top;
|
33424 | shiftLeft = shift.left;
|
33425 | }
|
33426 |
|
33427 | top += shiftTop;
|
33428 | left += shiftLeft;
|
33429 |
|
33430 | return { top: top, left: left };
|
33431 | }
|
33432 | });
|
33433 | return Tether;
|
33434 |
|
33435 | }));
|
33436 |
|
33437 |
|
33438 | },
|
33439 |
|
33440 | function(module, exports) {
|
33441 |
|
33442 | module.exports = __WEBPACK_EXTERNAL_MODULE_268__;
|
33443 |
|
33444 | }
|
33445 | ])
|
33446 | });
|
33447 | ;
|
33448 |
|
\ | No newline at end of file |