UNPKG

228 kBJavaScriptView Raw
1(function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory();
4 else if(typeof define === 'function' && define.amd)
5 define("react-route-hook", [], factory);
6 else if(typeof exports === 'object')
7 exports["react-route-hook"] = factory();
8 else
9 root["react-route-hook"] = factory();
10})(typeof self !== 'undefined' ? self : this, function() {
11return /******/ (function(modules) { // webpackBootstrap
12/******/ // The module cache
13/******/ var installedModules = {};
14/******/
15/******/ // The require function
16/******/ function __webpack_require__(moduleId) {
17/******/
18/******/ // Check if module is in cache
19/******/ if(installedModules[moduleId]) {
20/******/ return installedModules[moduleId].exports;
21/******/ }
22/******/ // Create a new module (and put it into the cache)
23/******/ var module = installedModules[moduleId] = {
24/******/ i: moduleId,
25/******/ l: false,
26/******/ exports: {}
27/******/ };
28/******/
29/******/ // Execute the module function
30/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31/******/
32/******/ // Flag the module as loaded
33/******/ module.l = true;
34/******/
35/******/ // Return the exports of the module
36/******/ return module.exports;
37/******/ }
38/******/
39/******/
40/******/ // expose the modules object (__webpack_modules__)
41/******/ __webpack_require__.m = modules;
42/******/
43/******/ // expose the module cache
44/******/ __webpack_require__.c = installedModules;
45/******/
46/******/ // define getter function for harmony exports
47/******/ __webpack_require__.d = function(exports, name, getter) {
48/******/ if(!__webpack_require__.o(exports, name)) {
49/******/ Object.defineProperty(exports, name, {
50/******/ configurable: false,
51/******/ enumerable: true,
52/******/ get: getter
53/******/ });
54/******/ }
55/******/ };
56/******/
57/******/ // getDefaultExport function for compatibility with non-harmony modules
58/******/ __webpack_require__.n = function(module) {
59/******/ var getter = module && module.__esModule ?
60/******/ function getDefault() { return module['default']; } :
61/******/ function getModuleExports() { return module; };
62/******/ __webpack_require__.d(getter, 'a', getter);
63/******/ return getter;
64/******/ };
65/******/
66/******/ // Object.prototype.hasOwnProperty.call
67/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
68/******/
69/******/ // __webpack_public_path__
70/******/ __webpack_require__.p = "";
71/******/
72/******/ // Load entry module and return exports
73/******/ return __webpack_require__(__webpack_require__.s = 15);
74/******/ })
75/************************************************************************/
76/******/ ([
77/* 0 */
78/***/ (function(module, exports) {
79
80// shim for using process in browser
81var process = module.exports = {};
82
83// cached from whatever global is present so that test runners that stub it
84// don't break things. But we need to wrap it in a try catch in case it is
85// wrapped in strict mode code which doesn't define any globals. It's inside a
86// function because try/catches deoptimize in certain engines.
87
88var cachedSetTimeout;
89var cachedClearTimeout;
90
91function defaultSetTimout() {
92 throw new Error('setTimeout has not been defined');
93}
94function defaultClearTimeout () {
95 throw new Error('clearTimeout has not been defined');
96}
97(function () {
98 try {
99 if (typeof setTimeout === 'function') {
100 cachedSetTimeout = setTimeout;
101 } else {
102 cachedSetTimeout = defaultSetTimout;
103 }
104 } catch (e) {
105 cachedSetTimeout = defaultSetTimout;
106 }
107 try {
108 if (typeof clearTimeout === 'function') {
109 cachedClearTimeout = clearTimeout;
110 } else {
111 cachedClearTimeout = defaultClearTimeout;
112 }
113 } catch (e) {
114 cachedClearTimeout = defaultClearTimeout;
115 }
116} ())
117function runTimeout(fun) {
118 if (cachedSetTimeout === setTimeout) {
119 //normal enviroments in sane situations
120 return setTimeout(fun, 0);
121 }
122 // if setTimeout wasn't available but was latter defined
123 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
124 cachedSetTimeout = setTimeout;
125 return setTimeout(fun, 0);
126 }
127 try {
128 // when when somebody has screwed with setTimeout but no I.E. maddness
129 return cachedSetTimeout(fun, 0);
130 } catch(e){
131 try {
132 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
133 return cachedSetTimeout.call(null, fun, 0);
134 } catch(e){
135 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
136 return cachedSetTimeout.call(this, fun, 0);
137 }
138 }
139
140
141}
142function runClearTimeout(marker) {
143 if (cachedClearTimeout === clearTimeout) {
144 //normal enviroments in sane situations
145 return clearTimeout(marker);
146 }
147 // if clearTimeout wasn't available but was latter defined
148 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
149 cachedClearTimeout = clearTimeout;
150 return clearTimeout(marker);
151 }
152 try {
153 // when when somebody has screwed with setTimeout but no I.E. maddness
154 return cachedClearTimeout(marker);
155 } catch (e){
156 try {
157 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
158 return cachedClearTimeout.call(null, marker);
159 } catch (e){
160 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
161 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
162 return cachedClearTimeout.call(this, marker);
163 }
164 }
165
166
167
168}
169var queue = [];
170var draining = false;
171var currentQueue;
172var queueIndex = -1;
173
174function cleanUpNextTick() {
175 if (!draining || !currentQueue) {
176 return;
177 }
178 draining = false;
179 if (currentQueue.length) {
180 queue = currentQueue.concat(queue);
181 } else {
182 queueIndex = -1;
183 }
184 if (queue.length) {
185 drainQueue();
186 }
187}
188
189function drainQueue() {
190 if (draining) {
191 return;
192 }
193 var timeout = runTimeout(cleanUpNextTick);
194 draining = true;
195
196 var len = queue.length;
197 while(len) {
198 currentQueue = queue;
199 queue = [];
200 while (++queueIndex < len) {
201 if (currentQueue) {
202 currentQueue[queueIndex].run();
203 }
204 }
205 queueIndex = -1;
206 len = queue.length;
207 }
208 currentQueue = null;
209 draining = false;
210 runClearTimeout(timeout);
211}
212
213process.nextTick = function (fun) {
214 var args = new Array(arguments.length - 1);
215 if (arguments.length > 1) {
216 for (var i = 1; i < arguments.length; i++) {
217 args[i - 1] = arguments[i];
218 }
219 }
220 queue.push(new Item(fun, args));
221 if (queue.length === 1 && !draining) {
222 runTimeout(drainQueue);
223 }
224};
225
226// v8 likes predictible objects
227function Item(fun, array) {
228 this.fun = fun;
229 this.array = array;
230}
231Item.prototype.run = function () {
232 this.fun.apply(null, this.array);
233};
234process.title = 'browser';
235process.browser = true;
236process.env = {};
237process.argv = [];
238process.version = ''; // empty string to avoid regexp issues
239process.versions = {};
240
241function noop() {}
242
243process.on = noop;
244process.addListener = noop;
245process.once = noop;
246process.off = noop;
247process.removeListener = noop;
248process.removeAllListeners = noop;
249process.emit = noop;
250process.prependListener = noop;
251process.prependOnceListener = noop;
252
253process.listeners = function (name) { return [] }
254
255process.binding = function (name) {
256 throw new Error('process.binding is not supported');
257};
258
259process.cwd = function () { return '/' };
260process.chdir = function (dir) {
261 throw new Error('process.chdir is not supported');
262};
263process.umask = function() { return 0; };
264
265
266/***/ }),
267/* 1 */
268/***/ (function(module, exports, __webpack_require__) {
269
270"use strict";
271/* WEBPACK VAR INJECTION */(function(process) {
272
273if (process.env.NODE_ENV === 'production') {
274 module.exports = __webpack_require__(17);
275} else {
276 module.exports = __webpack_require__(18);
277}
278
279/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
280
281/***/ }),
282/* 2 */
283/***/ (function(module, exports, __webpack_require__) {
284
285/* WEBPACK VAR INJECTION */(function(process) {/**
286 * Copyright (c) 2013-present, Facebook, Inc.
287 *
288 * This source code is licensed under the MIT license found in the
289 * LICENSE file in the root directory of this source tree.
290 */
291
292if (process.env.NODE_ENV !== 'production') {
293 var ReactIs = __webpack_require__(11);
294
295 // By explicitly using `prop-types` you are opting into new development behavior.
296 // http://fb.me/prop-types-in-prod
297 var throwOnDirectAccess = true;
298 module.exports = __webpack_require__(23)(ReactIs.isElement, throwOnDirectAccess);
299} else {
300 // By explicitly using `prop-types` you are opting into new production behavior.
301 // http://fb.me/prop-types-in-prod
302 module.exports = __webpack_require__(24)();
303}
304
305/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
306
307/***/ }),
308/* 3 */
309/***/ (function(module, exports, __webpack_require__) {
310
311"use strict";
312/* WEBPACK VAR INJECTION */(function(process) {/**
313 * Copyright (c) 2014-present, Facebook, Inc.
314 *
315 * This source code is licensed under the MIT license found in the
316 * LICENSE file in the root directory of this source tree.
317 */
318
319
320
321/**
322 * Similar to invariant but only logs a warning if the condition is not met.
323 * This can be used to log issues in development environments in critical
324 * paths. Removing the logging code for production environments will keep the
325 * same logic and follow the same code paths.
326 */
327
328var __DEV__ = process.env.NODE_ENV !== 'production';
329
330var warning = function() {};
331
332if (__DEV__) {
333 var printWarning = function printWarning(format, args) {
334 var len = arguments.length;
335 args = new Array(len > 1 ? len - 1 : 0);
336 for (var key = 1; key < len; key++) {
337 args[key - 1] = arguments[key];
338 }
339 var argIndex = 0;
340 var message = 'Warning: ' +
341 format.replace(/%s/g, function() {
342 return args[argIndex++];
343 });
344 if (typeof console !== 'undefined') {
345 console.error(message);
346 }
347 try {
348 // --- Welcome to debugging React ---
349 // This error was thrown as a convenience so that you can use this stack
350 // to find the callsite that caused this warning to fire.
351 throw new Error(message);
352 } catch (x) {}
353 }
354
355 warning = function(condition, format, args) {
356 var len = arguments.length;
357 args = new Array(len > 2 ? len - 2 : 0);
358 for (var key = 2; key < len; key++) {
359 args[key - 2] = arguments[key];
360 }
361 if (format === undefined) {
362 throw new Error(
363 '`warning(condition, format, ...args)` requires a warning ' +
364 'message argument'
365 );
366 }
367 if (!condition) {
368 printWarning.apply(null, [format].concat(args));
369 }
370 };
371}
372
373module.exports = warning;
374
375/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
376
377/***/ }),
378/* 4 */
379/***/ (function(module, exports, __webpack_require__) {
380
381"use strict";
382/* WEBPACK VAR INJECTION */(function(process) {/**
383 * Copyright (c) 2013-present, Facebook, Inc.
384 *
385 * This source code is licensed under the MIT license found in the
386 * LICENSE file in the root directory of this source tree.
387 */
388
389
390
391/**
392 * Use invariant() to assert state which your program assumes to be true.
393 *
394 * Provide sprintf-style format (only %s is supported) and arguments
395 * to provide information about what broke and what you were
396 * expecting.
397 *
398 * The invariant message will be stripped in production, but the invariant
399 * will remain to ensure logic does not differ in production.
400 */
401
402var invariant = function(condition, format, a, b, c, d, e, f) {
403 if (process.env.NODE_ENV !== 'production') {
404 if (format === undefined) {
405 throw new Error('invariant requires an error message argument');
406 }
407 }
408
409 if (!condition) {
410 var error;
411 if (format === undefined) {
412 error = new Error(
413 'Minified exception occurred; use the non-minified dev environment ' +
414 'for the full error message and additional helpful warnings.'
415 );
416 } else {
417 var args = [a, b, c, d, e, f];
418 var argIndex = 0;
419 error = new Error(
420 format.replace(/%s/g, function() { return args[argIndex++]; })
421 );
422 error.name = 'Invariant Violation';
423 }
424
425 error.framesToPop = 1; // we don't care about invariant's own frame
426 throw error;
427 }
428};
429
430module.exports = invariant;
431
432/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
433
434/***/ }),
435/* 5 */
436/***/ (function(module, exports, __webpack_require__) {
437
438"use strict";
439/*
440object-assign
441(c) Sindre Sorhus
442@license MIT
443*/
444
445
446/* eslint-disable no-unused-vars */
447var getOwnPropertySymbols = Object.getOwnPropertySymbols;
448var hasOwnProperty = Object.prototype.hasOwnProperty;
449var propIsEnumerable = Object.prototype.propertyIsEnumerable;
450
451function toObject(val) {
452 if (val === null || val === undefined) {
453 throw new TypeError('Object.assign cannot be called with null or undefined');
454 }
455
456 return Object(val);
457}
458
459function shouldUseNative() {
460 try {
461 if (!Object.assign) {
462 return false;
463 }
464
465 // Detect buggy property enumeration order in older V8 versions.
466
467 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
468 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
469 test1[5] = 'de';
470 if (Object.getOwnPropertyNames(test1)[0] === '5') {
471 return false;
472 }
473
474 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
475 var test2 = {};
476 for (var i = 0; i < 10; i++) {
477 test2['_' + String.fromCharCode(i)] = i;
478 }
479 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
480 return test2[n];
481 });
482 if (order2.join('') !== '0123456789') {
483 return false;
484 }
485
486 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
487 var test3 = {};
488 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
489 test3[letter] = letter;
490 });
491 if (Object.keys(Object.assign({}, test3)).join('') !==
492 'abcdefghijklmnopqrst') {
493 return false;
494 }
495
496 return true;
497 } catch (err) {
498 // We don't expect any of the above to throw, but better to be safe.
499 return false;
500 }
501}
502
503module.exports = shouldUseNative() ? Object.assign : function (target, source) {
504 var from;
505 var to = toObject(target);
506 var symbols;
507
508 for (var s = 1; s < arguments.length; s++) {
509 from = Object(arguments[s]);
510
511 for (var key in from) {
512 if (hasOwnProperty.call(from, key)) {
513 to[key] = from[key];
514 }
515 }
516
517 if (getOwnPropertySymbols) {
518 symbols = getOwnPropertySymbols(from);
519 for (var i = 0; i < symbols.length; i++) {
520 if (propIsEnumerable.call(from, symbols[i])) {
521 to[symbols[i]] = from[symbols[i]];
522 }
523 }
524 }
525 }
526
527 return to;
528};
529
530
531/***/ }),
532/* 6 */
533/***/ (function(module, exports, __webpack_require__) {
534
535"use strict";
536/**
537 * Copyright (c) 2013-present, Facebook, Inc.
538 *
539 * This source code is licensed under the MIT license found in the
540 * LICENSE file in the root directory of this source tree.
541 */
542
543
544
545var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
546
547module.exports = ReactPropTypesSecret;
548
549
550/***/ }),
551/* 7 */
552/***/ (function(module, __webpack_exports__, __webpack_require__) {
553
554"use strict";
555/* WEBPACK VAR INJECTION */(function(process) {/* unused harmony export createBrowserHistory */
556/* unused harmony export createHashHistory */
557/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createMemoryHistory; });
558/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createLocation; });
559/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return locationsAreEqual; });
560/* unused harmony export parsePath */
561/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return createPath; });
562/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = __webpack_require__(25);
563/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_resolve_pathname__ = __webpack_require__(26);
564/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_value_equal__ = __webpack_require__(27);
565/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_tiny_warning__ = __webpack_require__(28);
566/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_tiny_invariant__ = __webpack_require__(29);
567
568
569
570
571
572
573function addLeadingSlash(path) {
574 return path.charAt(0) === '/' ? path : '/' + path;
575}
576function stripLeadingSlash(path) {
577 return path.charAt(0) === '/' ? path.substr(1) : path;
578}
579function hasBasename(path, prefix) {
580 return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path);
581}
582function stripBasename(path, prefix) {
583 return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
584}
585function stripTrailingSlash(path) {
586 return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
587}
588function parsePath(path) {
589 var pathname = path || '/';
590 var search = '';
591 var hash = '';
592 var hashIndex = pathname.indexOf('#');
593
594 if (hashIndex !== -1) {
595 hash = pathname.substr(hashIndex);
596 pathname = pathname.substr(0, hashIndex);
597 }
598
599 var searchIndex = pathname.indexOf('?');
600
601 if (searchIndex !== -1) {
602 search = pathname.substr(searchIndex);
603 pathname = pathname.substr(0, searchIndex);
604 }
605
606 return {
607 pathname: pathname,
608 search: search === '?' ? '' : search,
609 hash: hash === '#' ? '' : hash
610 };
611}
612function createPath(location) {
613 var pathname = location.pathname,
614 search = location.search,
615 hash = location.hash;
616 var path = pathname || '/';
617 if (search && search !== '?') path += search.charAt(0) === '?' ? search : "?" + search;
618 if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : "#" + hash;
619 return path;
620}
621
622function createLocation(path, state, key, currentLocation) {
623 var location;
624
625 if (typeof path === 'string') {
626 // Two-arg form: push(path, state)
627 location = parsePath(path);
628 location.state = state;
629 } else {
630 // One-arg form: push(location)
631 location = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])({}, path);
632 if (location.pathname === undefined) location.pathname = '';
633
634 if (location.search) {
635 if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
636 } else {
637 location.search = '';
638 }
639
640 if (location.hash) {
641 if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
642 } else {
643 location.hash = '';
644 }
645
646 if (state !== undefined && location.state === undefined) location.state = state;
647 }
648
649 try {
650 location.pathname = decodeURI(location.pathname);
651 } catch (e) {
652 if (e instanceof URIError) {
653 throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
654 } else {
655 throw e;
656 }
657 }
658
659 if (key) location.key = key;
660
661 if (currentLocation) {
662 // Resolve incomplete/relative pathname relative to current location.
663 if (!location.pathname) {
664 location.pathname = currentLocation.pathname;
665 } else if (location.pathname.charAt(0) !== '/') {
666 location.pathname = Object(__WEBPACK_IMPORTED_MODULE_1_resolve_pathname__["a" /* default */])(location.pathname, currentLocation.pathname);
667 }
668 } else {
669 // When there is no prior location and pathname is empty, set it to /
670 if (!location.pathname) {
671 location.pathname = '/';
672 }
673 }
674
675 return location;
676}
677function locationsAreEqual(a, b) {
678 return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && Object(__WEBPACK_IMPORTED_MODULE_2_value_equal__["a" /* default */])(a.state, b.state);
679}
680
681function createTransitionManager() {
682 var prompt = null;
683
684 function setPrompt(nextPrompt) {
685 process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(prompt == null, 'A history supports only one prompt at a time') : void 0;
686 prompt = nextPrompt;
687 return function () {
688 if (prompt === nextPrompt) prompt = null;
689 };
690 }
691
692 function confirmTransitionTo(location, action, getUserConfirmation, callback) {
693 // TODO: If another transition starts while we're still confirming
694 // the previous one, we may end up in a weird state. Figure out the
695 // best way to handle this.
696 if (prompt != null) {
697 var result = typeof prompt === 'function' ? prompt(location, action) : prompt;
698
699 if (typeof result === 'string') {
700 if (typeof getUserConfirmation === 'function') {
701 getUserConfirmation(result, callback);
702 } else {
703 process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;
704 callback(true);
705 }
706 } else {
707 // Return false from a transition hook to cancel the transition.
708 callback(result !== false);
709 }
710 } else {
711 callback(true);
712 }
713 }
714
715 var listeners = [];
716
717 function appendListener(fn) {
718 var isActive = true;
719
720 function listener() {
721 if (isActive) fn.apply(void 0, arguments);
722 }
723
724 listeners.push(listener);
725 return function () {
726 isActive = false;
727 listeners = listeners.filter(function (item) {
728 return item !== listener;
729 });
730 };
731 }
732
733 function notifyListeners() {
734 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
735 args[_key] = arguments[_key];
736 }
737
738 listeners.forEach(function (listener) {
739 return listener.apply(void 0, args);
740 });
741 }
742
743 return {
744 setPrompt: setPrompt,
745 confirmTransitionTo: confirmTransitionTo,
746 appendListener: appendListener,
747 notifyListeners: notifyListeners
748 };
749}
750
751var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
752function getConfirmation(message, callback) {
753 callback(window.confirm(message)); // eslint-disable-line no-alert
754}
755/**
756 * Returns true if the HTML5 history API is supported. Taken from Modernizr.
757 *
758 * https://github.com/Modernizr/Modernizr/blob/master/LICENSE
759 * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
760 * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586
761 */
762
763function supportsHistory() {
764 var ua = window.navigator.userAgent;
765 if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;
766 return window.history && 'pushState' in window.history;
767}
768/**
769 * Returns true if browser fires popstate on hash change.
770 * IE10 and IE11 do not.
771 */
772
773function supportsPopStateOnHashChange() {
774 return window.navigator.userAgent.indexOf('Trident') === -1;
775}
776/**
777 * Returns false if using go(n) with hash history causes a full page reload.
778 */
779
780function supportsGoWithoutReloadUsingHash() {
781 return window.navigator.userAgent.indexOf('Firefox') === -1;
782}
783/**
784 * Returns true if a given popstate event is an extraneous WebKit event.
785 * Accounts for the fact that Chrome on iOS fires real popstate events
786 * containing undefined state when pressing the back button.
787 */
788
789function isExtraneousPopstateEvent(event) {
790 event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
791}
792
793var PopStateEvent = 'popstate';
794var HashChangeEvent = 'hashchange';
795
796function getHistoryState() {
797 try {
798 return window.history.state || {};
799 } catch (e) {
800 // IE 11 sometimes throws when accessing window.history.state
801 // See https://github.com/ReactTraining/history/pull/289
802 return {};
803 }
804}
805/**
806 * Creates a history object that uses the HTML5 history API including
807 * pushState, replaceState, and the popstate event.
808 */
809
810
811function createBrowserHistory(props) {
812 if (props === void 0) {
813 props = {};
814 }
815
816 !canUseDOM ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_4_tiny_invariant__["a" /* default */])(false, 'Browser history needs a DOM') : Object(__WEBPACK_IMPORTED_MODULE_4_tiny_invariant__["a" /* default */])(false) : void 0;
817 var globalHistory = window.history;
818 var canUseHistory = supportsHistory();
819 var needsHashChangeListener = !supportsPopStateOnHashChange();
820 var _props = props,
821 _props$forceRefresh = _props.forceRefresh,
822 forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,
823 _props$getUserConfirm = _props.getUserConfirmation,
824 getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
825 _props$keyLength = _props.keyLength,
826 keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
827 var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
828
829 function getDOMLocation(historyState) {
830 var _ref = historyState || {},
831 key = _ref.key,
832 state = _ref.state;
833
834 var _window$location = window.location,
835 pathname = _window$location.pathname,
836 search = _window$location.search,
837 hash = _window$location.hash;
838 var path = pathname + search + hash;
839 process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".') : void 0;
840 if (basename) path = stripBasename(path, basename);
841 return createLocation(path, state, key);
842 }
843
844 function createKey() {
845 return Math.random().toString(36).substr(2, keyLength);
846 }
847
848 var transitionManager = createTransitionManager();
849
850 function setState(nextState) {
851 Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState);
852
853 history.length = globalHistory.length;
854 transitionManager.notifyListeners(history.location, history.action);
855 }
856
857 function handlePopState(event) {
858 // Ignore extraneous popstate events in WebKit.
859 if (isExtraneousPopstateEvent(event)) return;
860 handlePop(getDOMLocation(event.state));
861 }
862
863 function handleHashChange() {
864 handlePop(getDOMLocation(getHistoryState()));
865 }
866
867 var forceNextPop = false;
868
869 function handlePop(location) {
870 if (forceNextPop) {
871 forceNextPop = false;
872 setState();
873 } else {
874 var action = 'POP';
875 transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
876 if (ok) {
877 setState({
878 action: action,
879 location: location
880 });
881 } else {
882 revertPop(location);
883 }
884 });
885 }
886 }
887
888 function revertPop(fromLocation) {
889 var toLocation = history.location; // TODO: We could probably make this more reliable by
890 // keeping a list of keys we've seen in sessionStorage.
891 // Instead, we just default to 0 for keys we don't know.
892
893 var toIndex = allKeys.indexOf(toLocation.key);
894 if (toIndex === -1) toIndex = 0;
895 var fromIndex = allKeys.indexOf(fromLocation.key);
896 if (fromIndex === -1) fromIndex = 0;
897 var delta = toIndex - fromIndex;
898
899 if (delta) {
900 forceNextPop = true;
901 go(delta);
902 }
903 }
904
905 var initialLocation = getDOMLocation(getHistoryState());
906 var allKeys = [initialLocation.key]; // Public interface
907
908 function createHref(location) {
909 return basename + createPath(location);
910 }
911
912 function push(path, state) {
913 process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
914 var action = 'PUSH';
915 var location = createLocation(path, state, createKey(), history.location);
916 transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
917 if (!ok) return;
918 var href = createHref(location);
919 var key = location.key,
920 state = location.state;
921
922 if (canUseHistory) {
923 globalHistory.pushState({
924 key: key,
925 state: state
926 }, null, href);
927
928 if (forceRefresh) {
929 window.location.href = href;
930 } else {
931 var prevIndex = allKeys.indexOf(history.location.key);
932 var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);
933 nextKeys.push(location.key);
934 allKeys = nextKeys;
935 setState({
936 action: action,
937 location: location
938 });
939 }
940 } else {
941 process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;
942 window.location.href = href;
943 }
944 });
945 }
946
947 function replace(path, state) {
948 process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
949 var action = 'REPLACE';
950 var location = createLocation(path, state, createKey(), history.location);
951 transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
952 if (!ok) return;
953 var href = createHref(location);
954 var key = location.key,
955 state = location.state;
956
957 if (canUseHistory) {
958 globalHistory.replaceState({
959 key: key,
960 state: state
961 }, null, href);
962
963 if (forceRefresh) {
964 window.location.replace(href);
965 } else {
966 var prevIndex = allKeys.indexOf(history.location.key);
967 if (prevIndex !== -1) allKeys[prevIndex] = location.key;
968 setState({
969 action: action,
970 location: location
971 });
972 }
973 } else {
974 process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;
975 window.location.replace(href);
976 }
977 });
978 }
979
980 function go(n) {
981 globalHistory.go(n);
982 }
983
984 function goBack() {
985 go(-1);
986 }
987
988 function goForward() {
989 go(1);
990 }
991
992 var listenerCount = 0;
993
994 function checkDOMListeners(delta) {
995 listenerCount += delta;
996
997 if (listenerCount === 1 && delta === 1) {
998 window.addEventListener(PopStateEvent, handlePopState);
999 if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);
1000 } else if (listenerCount === 0) {
1001 window.removeEventListener(PopStateEvent, handlePopState);
1002 if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);
1003 }
1004 }
1005
1006 var isBlocked = false;
1007
1008 function block(prompt) {
1009 if (prompt === void 0) {
1010 prompt = false;
1011 }
1012
1013 var unblock = transitionManager.setPrompt(prompt);
1014
1015 if (!isBlocked) {
1016 checkDOMListeners(1);
1017 isBlocked = true;
1018 }
1019
1020 return function () {
1021 if (isBlocked) {
1022 isBlocked = false;
1023 checkDOMListeners(-1);
1024 }
1025
1026 return unblock();
1027 };
1028 }
1029
1030 function listen(listener) {
1031 var unlisten = transitionManager.appendListener(listener);
1032 checkDOMListeners(1);
1033 return function () {
1034 checkDOMListeners(-1);
1035 unlisten();
1036 };
1037 }
1038
1039 var history = {
1040 length: globalHistory.length,
1041 action: 'POP',
1042 location: initialLocation,
1043 createHref: createHref,
1044 push: push,
1045 replace: replace,
1046 go: go,
1047 goBack: goBack,
1048 goForward: goForward,
1049 block: block,
1050 listen: listen
1051 };
1052 return history;
1053}
1054
1055var HashChangeEvent$1 = 'hashchange';
1056var HashPathCoders = {
1057 hashbang: {
1058 encodePath: function encodePath(path) {
1059 return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);
1060 },
1061 decodePath: function decodePath(path) {
1062 return path.charAt(0) === '!' ? path.substr(1) : path;
1063 }
1064 },
1065 noslash: {
1066 encodePath: stripLeadingSlash,
1067 decodePath: addLeadingSlash
1068 },
1069 slash: {
1070 encodePath: addLeadingSlash,
1071 decodePath: addLeadingSlash
1072 }
1073};
1074
1075function getHashPath() {
1076 // We can't use window.location.hash here because it's not
1077 // consistent across browsers - Firefox will pre-decode it!
1078 var href = window.location.href;
1079 var hashIndex = href.indexOf('#');
1080 return hashIndex === -1 ? '' : href.substring(hashIndex + 1);
1081}
1082
1083function pushHashPath(path) {
1084 window.location.hash = path;
1085}
1086
1087function replaceHashPath(path) {
1088 var hashIndex = window.location.href.indexOf('#');
1089 window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);
1090}
1091
1092function createHashHistory(props) {
1093 if (props === void 0) {
1094 props = {};
1095 }
1096
1097 !canUseDOM ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_4_tiny_invariant__["a" /* default */])(false, 'Hash history needs a DOM') : Object(__WEBPACK_IMPORTED_MODULE_4_tiny_invariant__["a" /* default */])(false) : void 0;
1098 var globalHistory = window.history;
1099 var canGoWithoutReload = supportsGoWithoutReloadUsingHash();
1100 var _props = props,
1101 _props$getUserConfirm = _props.getUserConfirmation,
1102 getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
1103 _props$hashType = _props.hashType,
1104 hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;
1105 var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
1106 var _HashPathCoders$hashT = HashPathCoders[hashType],
1107 encodePath = _HashPathCoders$hashT.encodePath,
1108 decodePath = _HashPathCoders$hashT.decodePath;
1109
1110 function getDOMLocation() {
1111 var path = decodePath(getHashPath());
1112 process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".') : void 0;
1113 if (basename) path = stripBasename(path, basename);
1114 return createLocation(path);
1115 }
1116
1117 var transitionManager = createTransitionManager();
1118
1119 function setState(nextState) {
1120 Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState);
1121
1122 history.length = globalHistory.length;
1123 transitionManager.notifyListeners(history.location, history.action);
1124 }
1125
1126 var forceNextPop = false;
1127 var ignorePath = null;
1128
1129 function handleHashChange() {
1130 var path = getHashPath();
1131 var encodedPath = encodePath(path);
1132
1133 if (path !== encodedPath) {
1134 // Ensure we always have a properly-encoded hash.
1135 replaceHashPath(encodedPath);
1136 } else {
1137 var location = getDOMLocation();
1138 var prevLocation = history.location;
1139 if (!forceNextPop && locationsAreEqual(prevLocation, location)) return; // A hashchange doesn't always == location change.
1140
1141 if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.
1142
1143 ignorePath = null;
1144 handlePop(location);
1145 }
1146 }
1147
1148 function handlePop(location) {
1149 if (forceNextPop) {
1150 forceNextPop = false;
1151 setState();
1152 } else {
1153 var action = 'POP';
1154 transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
1155 if (ok) {
1156 setState({
1157 action: action,
1158 location: location
1159 });
1160 } else {
1161 revertPop(location);
1162 }
1163 });
1164 }
1165 }
1166
1167 function revertPop(fromLocation) {
1168 var toLocation = history.location; // TODO: We could probably make this more reliable by
1169 // keeping a list of paths we've seen in sessionStorage.
1170 // Instead, we just default to 0 for paths we don't know.
1171
1172 var toIndex = allPaths.lastIndexOf(createPath(toLocation));
1173 if (toIndex === -1) toIndex = 0;
1174 var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));
1175 if (fromIndex === -1) fromIndex = 0;
1176 var delta = toIndex - fromIndex;
1177
1178 if (delta) {
1179 forceNextPop = true;
1180 go(delta);
1181 }
1182 } // Ensure the hash is encoded properly before doing anything else.
1183
1184
1185 var path = getHashPath();
1186 var encodedPath = encodePath(path);
1187 if (path !== encodedPath) replaceHashPath(encodedPath);
1188 var initialLocation = getDOMLocation();
1189 var allPaths = [createPath(initialLocation)]; // Public interface
1190
1191 function createHref(location) {
1192 return '#' + encodePath(basename + createPath(location));
1193 }
1194
1195 function push(path, state) {
1196 process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;
1197 var action = 'PUSH';
1198 var location = createLocation(path, undefined, undefined, history.location);
1199 transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
1200 if (!ok) return;
1201 var path = createPath(location);
1202 var encodedPath = encodePath(basename + path);
1203 var hashChanged = getHashPath() !== encodedPath;
1204
1205 if (hashChanged) {
1206 // We cannot tell if a hashchange was caused by a PUSH, so we'd
1207 // rather setState here and ignore the hashchange. The caveat here
1208 // is that other hash histories in the page will consider it a POP.
1209 ignorePath = path;
1210 pushHashPath(encodedPath);
1211 var prevIndex = allPaths.lastIndexOf(createPath(history.location));
1212 var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1);
1213 nextPaths.push(path);
1214 allPaths = nextPaths;
1215 setState({
1216 action: action,
1217 location: location
1218 });
1219 } else {
1220 process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;
1221 setState();
1222 }
1223 });
1224 }
1225
1226 function replace(path, state) {
1227 process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;
1228 var action = 'REPLACE';
1229 var location = createLocation(path, undefined, undefined, history.location);
1230 transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
1231 if (!ok) return;
1232 var path = createPath(location);
1233 var encodedPath = encodePath(basename + path);
1234 var hashChanged = getHashPath() !== encodedPath;
1235
1236 if (hashChanged) {
1237 // We cannot tell if a hashchange was caused by a REPLACE, so we'd
1238 // rather setState here and ignore the hashchange. The caveat here
1239 // is that other hash histories in the page will consider it a POP.
1240 ignorePath = path;
1241 replaceHashPath(encodedPath);
1242 }
1243
1244 var prevIndex = allPaths.indexOf(createPath(history.location));
1245 if (prevIndex !== -1) allPaths[prevIndex] = path;
1246 setState({
1247 action: action,
1248 location: location
1249 });
1250 });
1251 }
1252
1253 function go(n) {
1254 process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;
1255 globalHistory.go(n);
1256 }
1257
1258 function goBack() {
1259 go(-1);
1260 }
1261
1262 function goForward() {
1263 go(1);
1264 }
1265
1266 var listenerCount = 0;
1267
1268 function checkDOMListeners(delta) {
1269 listenerCount += delta;
1270
1271 if (listenerCount === 1 && delta === 1) {
1272 window.addEventListener(HashChangeEvent$1, handleHashChange);
1273 } else if (listenerCount === 0) {
1274 window.removeEventListener(HashChangeEvent$1, handleHashChange);
1275 }
1276 }
1277
1278 var isBlocked = false;
1279
1280 function block(prompt) {
1281 if (prompt === void 0) {
1282 prompt = false;
1283 }
1284
1285 var unblock = transitionManager.setPrompt(prompt);
1286
1287 if (!isBlocked) {
1288 checkDOMListeners(1);
1289 isBlocked = true;
1290 }
1291
1292 return function () {
1293 if (isBlocked) {
1294 isBlocked = false;
1295 checkDOMListeners(-1);
1296 }
1297
1298 return unblock();
1299 };
1300 }
1301
1302 function listen(listener) {
1303 var unlisten = transitionManager.appendListener(listener);
1304 checkDOMListeners(1);
1305 return function () {
1306 checkDOMListeners(-1);
1307 unlisten();
1308 };
1309 }
1310
1311 var history = {
1312 length: globalHistory.length,
1313 action: 'POP',
1314 location: initialLocation,
1315 createHref: createHref,
1316 push: push,
1317 replace: replace,
1318 go: go,
1319 goBack: goBack,
1320 goForward: goForward,
1321 block: block,
1322 listen: listen
1323 };
1324 return history;
1325}
1326
1327function clamp(n, lowerBound, upperBound) {
1328 return Math.min(Math.max(n, lowerBound), upperBound);
1329}
1330/**
1331 * Creates a history object that stores locations in memory.
1332 */
1333
1334
1335function createMemoryHistory(props) {
1336 if (props === void 0) {
1337 props = {};
1338 }
1339
1340 var _props = props,
1341 getUserConfirmation = _props.getUserConfirmation,
1342 _props$initialEntries = _props.initialEntries,
1343 initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,
1344 _props$initialIndex = _props.initialIndex,
1345 initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,
1346 _props$keyLength = _props.keyLength,
1347 keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
1348 var transitionManager = createTransitionManager();
1349
1350 function setState(nextState) {
1351 Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState);
1352
1353 history.length = history.entries.length;
1354 transitionManager.notifyListeners(history.location, history.action);
1355 }
1356
1357 function createKey() {
1358 return Math.random().toString(36).substr(2, keyLength);
1359 }
1360
1361 var index = clamp(initialIndex, 0, initialEntries.length - 1);
1362 var entries = initialEntries.map(function (entry) {
1363 return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());
1364 }); // Public interface
1365
1366 var createHref = createPath;
1367
1368 function push(path, state) {
1369 process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
1370 var action = 'PUSH';
1371 var location = createLocation(path, state, createKey(), history.location);
1372 transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
1373 if (!ok) return;
1374 var prevIndex = history.index;
1375 var nextIndex = prevIndex + 1;
1376 var nextEntries = history.entries.slice(0);
1377
1378 if (nextEntries.length > nextIndex) {
1379 nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);
1380 } else {
1381 nextEntries.push(location);
1382 }
1383
1384 setState({
1385 action: action,
1386 location: location,
1387 index: nextIndex,
1388 entries: nextEntries
1389 });
1390 });
1391 }
1392
1393 function replace(path, state) {
1394 process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_3_tiny_warning__["a" /* default */])(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
1395 var action = 'REPLACE';
1396 var location = createLocation(path, state, createKey(), history.location);
1397 transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
1398 if (!ok) return;
1399 history.entries[history.index] = location;
1400 setState({
1401 action: action,
1402 location: location
1403 });
1404 });
1405 }
1406
1407 function go(n) {
1408 var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);
1409 var action = 'POP';
1410 var location = history.entries[nextIndex];
1411 transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
1412 if (ok) {
1413 setState({
1414 action: action,
1415 location: location,
1416 index: nextIndex
1417 });
1418 } else {
1419 // Mimic the behavior of DOM histories by
1420 // causing a render after a cancelled POP.
1421 setState();
1422 }
1423 });
1424 }
1425
1426 function goBack() {
1427 go(-1);
1428 }
1429
1430 function goForward() {
1431 go(1);
1432 }
1433
1434 function canGo(n) {
1435 var nextIndex = history.index + n;
1436 return nextIndex >= 0 && nextIndex < history.entries.length;
1437 }
1438
1439 function block(prompt) {
1440 if (prompt === void 0) {
1441 prompt = false;
1442 }
1443
1444 return transitionManager.setPrompt(prompt);
1445 }
1446
1447 function listen(listener) {
1448 return transitionManager.appendListener(listener);
1449 }
1450
1451 var history = {
1452 length: entries.length,
1453 action: 'POP',
1454 location: entries[index],
1455 index: index,
1456 entries: entries,
1457 createHref: createHref,
1458 push: push,
1459 replace: replace,
1460 go: go,
1461 goBack: goBack,
1462 goForward: goForward,
1463 canGo: canGo,
1464 block: block,
1465 listen: listen
1466 };
1467 return history;
1468}
1469
1470
1471
1472/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(0)))
1473
1474/***/ }),
1475/* 8 */
1476/***/ (function(module, __webpack_exports__, __webpack_require__) {
1477
1478"use strict";
1479/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);
1480/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
1481/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(4);
1482/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
1483/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(1);
1484/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
1485/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(2);
1486/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
1487var _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; };
1488
1489function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1490
1491function _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; }
1492
1493function _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; }
1494
1495
1496
1497
1498
1499
1500/**
1501 * The public API for putting history on context.
1502 */
1503
1504var Router = function (_React$Component) {
1505 _inherits(Router, _React$Component);
1506
1507 function Router() {
1508 var _temp, _this, _ret;
1509
1510 _classCallCheck(this, Router);
1511
1512 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
1513 args[_key] = arguments[_key];
1514 }
1515
1516 return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
1517 match: _this.computeMatch(_this.props.history.location.pathname)
1518 }, _temp), _possibleConstructorReturn(_this, _ret);
1519 }
1520
1521 Router.prototype.getChildContext = function getChildContext() {
1522 return {
1523 router: _extends({}, this.context.router, {
1524 history: this.props.history,
1525 route: {
1526 location: this.props.history.location,
1527 match: this.state.match
1528 }
1529 })
1530 };
1531 };
1532
1533 Router.prototype.computeMatch = function computeMatch(pathname) {
1534 return {
1535 path: "/",
1536 url: "/",
1537 params: {},
1538 isExact: pathname === "/"
1539 };
1540 };
1541
1542 Router.prototype.componentWillMount = function componentWillMount() {
1543 var _this2 = this;
1544
1545 var _props = this.props,
1546 children = _props.children,
1547 history = _props.history;
1548
1549
1550 __WEBPACK_IMPORTED_MODULE_1_invariant___default()(children == null || __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 1, "A <Router> may have only one child element");
1551
1552 // Do this here so we can setState when a <Redirect> changes the
1553 // location in componentWillMount. This happens e.g. when doing
1554 // server rendering using a <StaticRouter>.
1555 this.unlisten = history.listen(function () {
1556 _this2.setState({
1557 match: _this2.computeMatch(history.location.pathname)
1558 });
1559 });
1560 };
1561
1562 Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
1563 __WEBPACK_IMPORTED_MODULE_0_warning___default()(this.props.history === nextProps.history, "You cannot change <Router history>");
1564 };
1565
1566 Router.prototype.componentWillUnmount = function componentWillUnmount() {
1567 this.unlisten();
1568 };
1569
1570 Router.prototype.render = function render() {
1571 var children = this.props.children;
1572
1573 return children ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children) : null;
1574 };
1575
1576 return Router;
1577}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);
1578
1579Router.propTypes = {
1580 history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,
1581 children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node
1582};
1583Router.contextTypes = {
1584 router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object
1585};
1586Router.childContextTypes = {
1587 router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired
1588};
1589
1590
1591/* harmony default export */ __webpack_exports__["a"] = (Router);
1592
1593/***/ }),
1594/* 9 */
1595/***/ (function(module, __webpack_exports__, __webpack_require__) {
1596
1597"use strict";
1598/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(13);
1599/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__);
1600
1601
1602var patternCache = {};
1603var cacheLimit = 10000;
1604var cacheCount = 0;
1605
1606var compilePath = function compilePath(pattern, options) {
1607 var cacheKey = "" + options.end + options.strict + options.sensitive;
1608 var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});
1609
1610 if (cache[pattern]) return cache[pattern];
1611
1612 var keys = [];
1613 var re = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default()(pattern, keys, options);
1614 var compiledPattern = { re: re, keys: keys };
1615
1616 if (cacheCount < cacheLimit) {
1617 cache[pattern] = compiledPattern;
1618 cacheCount++;
1619 }
1620
1621 return compiledPattern;
1622};
1623
1624/**
1625 * Public API for matching a URL pathname to a path pattern.
1626 */
1627var matchPath = function matchPath(pathname) {
1628 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1629 var parent = arguments[2];
1630
1631 if (typeof options === "string") options = { path: options };
1632
1633 var _options = options,
1634 path = _options.path,
1635 _options$exact = _options.exact,
1636 exact = _options$exact === undefined ? false : _options$exact,
1637 _options$strict = _options.strict,
1638 strict = _options$strict === undefined ? false : _options$strict,
1639 _options$sensitive = _options.sensitive,
1640 sensitive = _options$sensitive === undefined ? false : _options$sensitive;
1641
1642
1643 if (path == null) return parent;
1644
1645 var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),
1646 re = _compilePath.re,
1647 keys = _compilePath.keys;
1648
1649 var match = re.exec(pathname);
1650
1651 if (!match) return null;
1652
1653 var url = match[0],
1654 values = match.slice(1);
1655
1656 var isExact = pathname === url;
1657
1658 if (exact && !isExact) return null;
1659
1660 return {
1661 path: path, // the path pattern used to match
1662 url: path === "/" && url === "" ? "/" : url, // the matched portion of the URL
1663 isExact: isExact, // whether or not we matched exactly
1664 params: keys.reduce(function (memo, key, index) {
1665 memo[key.name] = values[index];
1666 return memo;
1667 }, {})
1668 };
1669};
1670
1671/* harmony default export */ __webpack_exports__["a"] = (matchPath);
1672
1673/***/ }),
1674/* 10 */
1675/***/ (function(module, exports, __webpack_require__) {
1676
1677"use strict";
1678/* WEBPACK VAR INJECTION */(function(process) {/**
1679 * Copyright (c) 2013-present, Facebook, Inc.
1680 *
1681 * This source code is licensed under the MIT license found in the
1682 * LICENSE file in the root directory of this source tree.
1683 */
1684
1685
1686
1687var printWarning = function() {};
1688
1689if (process.env.NODE_ENV !== 'production') {
1690 var ReactPropTypesSecret = __webpack_require__(6);
1691 var loggedTypeFailures = {};
1692 var has = Function.call.bind(Object.prototype.hasOwnProperty);
1693
1694 printWarning = function(text) {
1695 var message = 'Warning: ' + text;
1696 if (typeof console !== 'undefined') {
1697 console.error(message);
1698 }
1699 try {
1700 // --- Welcome to debugging React ---
1701 // This error was thrown as a convenience so that you can use this stack
1702 // to find the callsite that caused this warning to fire.
1703 throw new Error(message);
1704 } catch (x) {}
1705 };
1706}
1707
1708/**
1709 * Assert that the values match with the type specs.
1710 * Error messages are memorized and will only be shown once.
1711 *
1712 * @param {object} typeSpecs Map of name to a ReactPropType
1713 * @param {object} values Runtime values that need to be type-checked
1714 * @param {string} location e.g. "prop", "context", "child context"
1715 * @param {string} componentName Name of the component for error messages.
1716 * @param {?Function} getStack Returns the component stack.
1717 * @private
1718 */
1719function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
1720 if (process.env.NODE_ENV !== 'production') {
1721 for (var typeSpecName in typeSpecs) {
1722 if (has(typeSpecs, typeSpecName)) {
1723 var error;
1724 // Prop type validation may throw. In case they do, we don't want to
1725 // fail the render phase where it didn't fail before. So we log it.
1726 // After these have been cleaned up, we'll let them throw.
1727 try {
1728 // This is intentionally an invariant that gets caught. It's the same
1729 // behavior as without this statement except with a better message.
1730 if (typeof typeSpecs[typeSpecName] !== 'function') {
1731 var err = Error(
1732 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
1733 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
1734 );
1735 err.name = 'Invariant Violation';
1736 throw err;
1737 }
1738 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
1739 } catch (ex) {
1740 error = ex;
1741 }
1742 if (error && !(error instanceof Error)) {
1743 printWarning(
1744 (componentName || 'React class') + ': type specification of ' +
1745 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
1746 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
1747 'You may have forgotten to pass an argument to the type checker ' +
1748 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
1749 'shape all require an argument).'
1750 );
1751 }
1752 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
1753 // Only monitor this failure once because there tends to be a lot of the
1754 // same error.
1755 loggedTypeFailures[error.message] = true;
1756
1757 var stack = getStack ? getStack() : '';
1758
1759 printWarning(
1760 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
1761 );
1762 }
1763 }
1764 }
1765 }
1766}
1767
1768/**
1769 * Resets warning cache when testing.
1770 *
1771 * @private
1772 */
1773checkPropTypes.resetWarningCache = function() {
1774 if (process.env.NODE_ENV !== 'production') {
1775 loggedTypeFailures = {};
1776 }
1777}
1778
1779module.exports = checkPropTypes;
1780
1781/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
1782
1783/***/ }),
1784/* 11 */
1785/***/ (function(module, exports, __webpack_require__) {
1786
1787"use strict";
1788/* WEBPACK VAR INJECTION */(function(process) {
1789
1790if (process.env.NODE_ENV === 'production') {
1791 module.exports = __webpack_require__(21);
1792} else {
1793 module.exports = __webpack_require__(22);
1794}
1795
1796/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
1797
1798/***/ }),
1799/* 12 */
1800/***/ (function(module, __webpack_exports__, __webpack_require__) {
1801
1802"use strict";
1803/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(13);
1804/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__);
1805
1806
1807var patternCache = {};
1808var cacheLimit = 10000;
1809var cacheCount = 0;
1810
1811var compileGenerator = function compileGenerator(pattern) {
1812 var cacheKey = pattern;
1813 var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});
1814
1815 if (cache[pattern]) return cache[pattern];
1816
1817 var compiledGenerator = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default.a.compile(pattern);
1818
1819 if (cacheCount < cacheLimit) {
1820 cache[pattern] = compiledGenerator;
1821 cacheCount++;
1822 }
1823
1824 return compiledGenerator;
1825};
1826
1827/**
1828 * Public API for generating a URL pathname from a pattern and parameters.
1829 */
1830var generatePath = function generatePath() {
1831 var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "/";
1832 var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1833
1834 if (pattern === "/") {
1835 return pattern;
1836 }
1837 var generator = compileGenerator(pattern);
1838 return generator(params, { pretty: true });
1839};
1840
1841/* harmony default export */ __webpack_exports__["a"] = (generatePath);
1842
1843/***/ }),
1844/* 13 */
1845/***/ (function(module, exports, __webpack_require__) {
1846
1847var isarray = __webpack_require__(32)
1848
1849/**
1850 * Expose `pathToRegexp`.
1851 */
1852module.exports = pathToRegexp
1853module.exports.parse = parse
1854module.exports.compile = compile
1855module.exports.tokensToFunction = tokensToFunction
1856module.exports.tokensToRegExp = tokensToRegExp
1857
1858/**
1859 * The main path matching regexp utility.
1860 *
1861 * @type {RegExp}
1862 */
1863var PATH_REGEXP = new RegExp([
1864 // Match escaped characters that would otherwise appear in future matches.
1865 // This allows the user to escape special characters that won't transform.
1866 '(\\\\.)',
1867 // Match Express-style parameters and un-named parameters with a prefix
1868 // and optional suffixes. Matches appear as:
1869 //
1870 // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
1871 // "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
1872 // "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
1873 '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
1874].join('|'), 'g')
1875
1876/**
1877 * Parse a string for the raw tokens.
1878 *
1879 * @param {string} str
1880 * @param {Object=} options
1881 * @return {!Array}
1882 */
1883function parse (str, options) {
1884 var tokens = []
1885 var key = 0
1886 var index = 0
1887 var path = ''
1888 var defaultDelimiter = options && options.delimiter || '/'
1889 var res
1890
1891 while ((res = PATH_REGEXP.exec(str)) != null) {
1892 var m = res[0]
1893 var escaped = res[1]
1894 var offset = res.index
1895 path += str.slice(index, offset)
1896 index = offset + m.length
1897
1898 // Ignore already escaped sequences.
1899 if (escaped) {
1900 path += escaped[1]
1901 continue
1902 }
1903
1904 var next = str[index]
1905 var prefix = res[2]
1906 var name = res[3]
1907 var capture = res[4]
1908 var group = res[5]
1909 var modifier = res[6]
1910 var asterisk = res[7]
1911
1912 // Push the current path onto the tokens.
1913 if (path) {
1914 tokens.push(path)
1915 path = ''
1916 }
1917
1918 var partial = prefix != null && next != null && next !== prefix
1919 var repeat = modifier === '+' || modifier === '*'
1920 var optional = modifier === '?' || modifier === '*'
1921 var delimiter = res[2] || defaultDelimiter
1922 var pattern = capture || group
1923
1924 tokens.push({
1925 name: name || key++,
1926 prefix: prefix || '',
1927 delimiter: delimiter,
1928 optional: optional,
1929 repeat: repeat,
1930 partial: partial,
1931 asterisk: !!asterisk,
1932 pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
1933 })
1934 }
1935
1936 // Match any characters still remaining.
1937 if (index < str.length) {
1938 path += str.substr(index)
1939 }
1940
1941 // If the path exists, push it onto the end.
1942 if (path) {
1943 tokens.push(path)
1944 }
1945
1946 return tokens
1947}
1948
1949/**
1950 * Compile a string to a template function for the path.
1951 *
1952 * @param {string} str
1953 * @param {Object=} options
1954 * @return {!function(Object=, Object=)}
1955 */
1956function compile (str, options) {
1957 return tokensToFunction(parse(str, options))
1958}
1959
1960/**
1961 * Prettier encoding of URI path segments.
1962 *
1963 * @param {string}
1964 * @return {string}
1965 */
1966function encodeURIComponentPretty (str) {
1967 return encodeURI(str).replace(/[\/?#]/g, function (c) {
1968 return '%' + c.charCodeAt(0).toString(16).toUpperCase()
1969 })
1970}
1971
1972/**
1973 * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
1974 *
1975 * @param {string}
1976 * @return {string}
1977 */
1978function encodeAsterisk (str) {
1979 return encodeURI(str).replace(/[?#]/g, function (c) {
1980 return '%' + c.charCodeAt(0).toString(16).toUpperCase()
1981 })
1982}
1983
1984/**
1985 * Expose a method for transforming tokens into the path function.
1986 */
1987function tokensToFunction (tokens) {
1988 // Compile all the tokens into regexps.
1989 var matches = new Array(tokens.length)
1990
1991 // Compile all the patterns before compilation.
1992 for (var i = 0; i < tokens.length; i++) {
1993 if (typeof tokens[i] === 'object') {
1994 matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')
1995 }
1996 }
1997
1998 return function (obj, opts) {
1999 var path = ''
2000 var data = obj || {}
2001 var options = opts || {}
2002 var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
2003
2004 for (var i = 0; i < tokens.length; i++) {
2005 var token = tokens[i]
2006
2007 if (typeof token === 'string') {
2008 path += token
2009
2010 continue
2011 }
2012
2013 var value = data[token.name]
2014 var segment
2015
2016 if (value == null) {
2017 if (token.optional) {
2018 // Prepend partial segment prefixes.
2019 if (token.partial) {
2020 path += token.prefix
2021 }
2022
2023 continue
2024 } else {
2025 throw new TypeError('Expected "' + token.name + '" to be defined')
2026 }
2027 }
2028
2029 if (isarray(value)) {
2030 if (!token.repeat) {
2031 throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
2032 }
2033
2034 if (value.length === 0) {
2035 if (token.optional) {
2036 continue
2037 } else {
2038 throw new TypeError('Expected "' + token.name + '" to not be empty')
2039 }
2040 }
2041
2042 for (var j = 0; j < value.length; j++) {
2043 segment = encode(value[j])
2044
2045 if (!matches[i].test(segment)) {
2046 throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
2047 }
2048
2049 path += (j === 0 ? token.prefix : token.delimiter) + segment
2050 }
2051
2052 continue
2053 }
2054
2055 segment = token.asterisk ? encodeAsterisk(value) : encode(value)
2056
2057 if (!matches[i].test(segment)) {
2058 throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
2059 }
2060
2061 path += token.prefix + segment
2062 }
2063
2064 return path
2065 }
2066}
2067
2068/**
2069 * Escape a regular expression string.
2070 *
2071 * @param {string} str
2072 * @return {string}
2073 */
2074function escapeString (str) {
2075 return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
2076}
2077
2078/**
2079 * Escape the capturing group by escaping special characters and meaning.
2080 *
2081 * @param {string} group
2082 * @return {string}
2083 */
2084function escapeGroup (group) {
2085 return group.replace(/([=!:$\/()])/g, '\\$1')
2086}
2087
2088/**
2089 * Attach the keys as a property of the regexp.
2090 *
2091 * @param {!RegExp} re
2092 * @param {Array} keys
2093 * @return {!RegExp}
2094 */
2095function attachKeys (re, keys) {
2096 re.keys = keys
2097 return re
2098}
2099
2100/**
2101 * Get the flags for a regexp from the options.
2102 *
2103 * @param {Object} options
2104 * @return {string}
2105 */
2106function flags (options) {
2107 return options.sensitive ? '' : 'i'
2108}
2109
2110/**
2111 * Pull out keys from a regexp.
2112 *
2113 * @param {!RegExp} path
2114 * @param {!Array} keys
2115 * @return {!RegExp}
2116 */
2117function regexpToRegexp (path, keys) {
2118 // Use a negative lookahead to match only capturing groups.
2119 var groups = path.source.match(/\((?!\?)/g)
2120
2121 if (groups) {
2122 for (var i = 0; i < groups.length; i++) {
2123 keys.push({
2124 name: i,
2125 prefix: null,
2126 delimiter: null,
2127 optional: false,
2128 repeat: false,
2129 partial: false,
2130 asterisk: false,
2131 pattern: null
2132 })
2133 }
2134 }
2135
2136 return attachKeys(path, keys)
2137}
2138
2139/**
2140 * Transform an array into a regexp.
2141 *
2142 * @param {!Array} path
2143 * @param {Array} keys
2144 * @param {!Object} options
2145 * @return {!RegExp}
2146 */
2147function arrayToRegexp (path, keys, options) {
2148 var parts = []
2149
2150 for (var i = 0; i < path.length; i++) {
2151 parts.push(pathToRegexp(path[i], keys, options).source)
2152 }
2153
2154 var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
2155
2156 return attachKeys(regexp, keys)
2157}
2158
2159/**
2160 * Create a path regexp from string input.
2161 *
2162 * @param {string} path
2163 * @param {!Array} keys
2164 * @param {!Object} options
2165 * @return {!RegExp}
2166 */
2167function stringToRegexp (path, keys, options) {
2168 return tokensToRegExp(parse(path, options), keys, options)
2169}
2170
2171/**
2172 * Expose a function for taking tokens and returning a RegExp.
2173 *
2174 * @param {!Array} tokens
2175 * @param {(Array|Object)=} keys
2176 * @param {Object=} options
2177 * @return {!RegExp}
2178 */
2179function tokensToRegExp (tokens, keys, options) {
2180 if (!isarray(keys)) {
2181 options = /** @type {!Object} */ (keys || options)
2182 keys = []
2183 }
2184
2185 options = options || {}
2186
2187 var strict = options.strict
2188 var end = options.end !== false
2189 var route = ''
2190
2191 // Iterate over the tokens and create our regexp string.
2192 for (var i = 0; i < tokens.length; i++) {
2193 var token = tokens[i]
2194
2195 if (typeof token === 'string') {
2196 route += escapeString(token)
2197 } else {
2198 var prefix = escapeString(token.prefix)
2199 var capture = '(?:' + token.pattern + ')'
2200
2201 keys.push(token)
2202
2203 if (token.repeat) {
2204 capture += '(?:' + prefix + capture + ')*'
2205 }
2206
2207 if (token.optional) {
2208 if (!token.partial) {
2209 capture = '(?:' + prefix + '(' + capture + '))?'
2210 } else {
2211 capture = prefix + '(' + capture + ')?'
2212 }
2213 } else {
2214 capture = prefix + '(' + capture + ')'
2215 }
2216
2217 route += capture
2218 }
2219 }
2220
2221 var delimiter = escapeString(options.delimiter || '/')
2222 var endsWithDelimiter = route.slice(-delimiter.length) === delimiter
2223
2224 // In non-strict mode we allow a slash at the end of match. If the path to
2225 // match already ends with a slash, we remove it for consistency. The slash
2226 // is valid at the end of a path match, not in the middle. This is important
2227 // in non-ending mode, where "/test/" shouldn't match "/test//route".
2228 if (!strict) {
2229 route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'
2230 }
2231
2232 if (end) {
2233 route += '$'
2234 } else {
2235 // In non-ending mode, we need the capturing groups to match as much as
2236 // possible by using a positive lookahead to the end or next path segment.
2237 route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'
2238 }
2239
2240 return attachKeys(new RegExp('^' + route, flags(options)), keys)
2241}
2242
2243/**
2244 * Normalize the given path string, returning a regular expression.
2245 *
2246 * An empty array can be passed in for the keys, which will hold the
2247 * placeholder key descriptions. For example, using `/user/:id`, `keys` will
2248 * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
2249 *
2250 * @param {(string|RegExp|Array)} path
2251 * @param {(Array|Object)=} keys
2252 * @param {Object=} options
2253 * @return {!RegExp}
2254 */
2255function pathToRegexp (path, keys, options) {
2256 if (!isarray(keys)) {
2257 options = /** @type {!Object} */ (keys || options)
2258 keys = []
2259 }
2260
2261 options = options || {}
2262
2263 if (path instanceof RegExp) {
2264 return regexpToRegexp(path, /** @type {!Array} */ (keys))
2265 }
2266
2267 if (isarray(path)) {
2268 return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
2269 }
2270
2271 return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
2272}
2273
2274
2275/***/ }),
2276/* 14 */
2277/***/ (function(module, __webpack_exports__, __webpack_require__) {
2278
2279"use strict";
2280/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);
2281/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
2282/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(4);
2283/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
2284/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(1);
2285/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
2286/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(2);
2287/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
2288/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(9);
2289var _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; };
2290
2291function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2292
2293function _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; }
2294
2295function _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; }
2296
2297
2298
2299
2300
2301
2302
2303var isEmptyChildren = function isEmptyChildren(children) {
2304 return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 0;
2305};
2306
2307/**
2308 * The public API for matching a single path and rendering.
2309 */
2310
2311var Route = function (_React$Component) {
2312 _inherits(Route, _React$Component);
2313
2314 function Route() {
2315 var _temp, _this, _ret;
2316
2317 _classCallCheck(this, Route);
2318
2319 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
2320 args[_key] = arguments[_key];
2321 }
2322
2323 return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
2324 match: _this.computeMatch(_this.props, _this.context.router)
2325 }, _temp), _possibleConstructorReturn(_this, _ret);
2326 }
2327
2328 Route.prototype.getChildContext = function getChildContext() {
2329 return {
2330 router: _extends({}, this.context.router, {
2331 route: {
2332 location: this.props.location || this.context.router.route.location,
2333 match: this.state.match
2334 }
2335 })
2336 };
2337 };
2338
2339 Route.prototype.computeMatch = function computeMatch(_ref, router) {
2340 var computedMatch = _ref.computedMatch,
2341 location = _ref.location,
2342 path = _ref.path,
2343 strict = _ref.strict,
2344 exact = _ref.exact,
2345 sensitive = _ref.sensitive;
2346
2347 if (computedMatch) return computedMatch; // <Switch> already computed the match for us
2348
2349 __WEBPACK_IMPORTED_MODULE_1_invariant___default()(router, "You should not use <Route> or withRouter() outside a <Router>");
2350
2351 var route = router.route;
2352
2353 var pathname = (location || route.location).pathname;
2354
2355 return Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__["a" /* default */])(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);
2356 };
2357
2358 Route.prototype.componentWillMount = function componentWillMount() {
2359 __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.render), "You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored");
2360
2361 __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), "You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored");
2362
2363 __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), "You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored");
2364 };
2365
2366 Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {
2367 __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(nextProps.location && !this.props.location), '<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.');
2368
2369 __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(!nextProps.location && this.props.location), '<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.');
2370
2371 this.setState({
2372 match: this.computeMatch(nextProps, nextContext.router)
2373 });
2374 };
2375
2376 Route.prototype.render = function render() {
2377 var match = this.state.match;
2378 var _props = this.props,
2379 children = _props.children,
2380 component = _props.component,
2381 render = _props.render;
2382 var _context$router = this.context.router,
2383 history = _context$router.history,
2384 route = _context$router.route,
2385 staticContext = _context$router.staticContext;
2386
2387 var location = this.props.location || route.location;
2388 var props = { match: match, location: location, history: history, staticContext: staticContext };
2389
2390 if (component) return match ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(component, props) : null;
2391
2392 if (render) return match ? render(props) : null;
2393
2394 if (typeof children === "function") return children(props);
2395
2396 if (children && !isEmptyChildren(children)) return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children);
2397
2398 return null;
2399 };
2400
2401 return Route;
2402}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);
2403
2404Route.propTypes = {
2405 computedMatch: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object, // private, from <Switch>
2406 path: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,
2407 exact: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,
2408 strict: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,
2409 sensitive: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool,
2410 component: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,
2411 render: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,
2412 children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node]),
2413 location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object
2414};
2415Route.contextTypes = {
2416 router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({
2417 history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,
2418 route: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,
2419 staticContext: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object
2420 })
2421};
2422Route.childContextTypes = {
2423 router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired
2424};
2425
2426
2427/* harmony default export */ __webpack_exports__["a"] = (Route);
2428
2429/***/ }),
2430/* 15 */
2431/***/ (function(module, exports, __webpack_require__) {
2432
2433"use strict";
2434
2435
2436Object.defineProperty(exports, "__esModule", {
2437 value: true
2438});
2439
2440var _RouteHook = __webpack_require__(16);
2441
2442var _RouteHook2 = _interopRequireDefault(_RouteHook);
2443
2444function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2445
2446exports.default = _RouteHook2.default;
2447
2448/***/ }),
2449/* 16 */
2450/***/ (function(module, exports, __webpack_require__) {
2451
2452"use strict";
2453
2454
2455Object.defineProperty(exports, "__esModule", {
2456 value: true
2457});
2458
2459var _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; };
2460
2461var _react = __webpack_require__(1);
2462
2463var _react2 = _interopRequireDefault(_react);
2464
2465var _reactRouter = __webpack_require__(19);
2466
2467var _propTypes = __webpack_require__(2);
2468
2469var _propTypes2 = _interopRequireDefault(_propTypes);
2470
2471var _HigherComponent = __webpack_require__(37);
2472
2473var _HigherComponent2 = _interopRequireDefault(_HigherComponent);
2474
2475function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2476
2477function _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; }
2478
2479var RouteHook = function RouteHook(_ref) {
2480 var path = _ref.path,
2481 exact = _ref.exact,
2482 strict = _ref.strict,
2483 rest = _objectWithoutProperties(_ref, ['path', 'exact', 'strict']);
2484
2485 return _react2.default.createElement(_reactRouter.Route, {
2486 path: path,
2487 exact: exact,
2488 strict: strict,
2489 render: function render(routerProps) {
2490 return _react2.default.createElement(_HigherComponent2.default, _extends({ routerProps: routerProps }, rest));
2491 }
2492 });
2493};
2494
2495RouteHook.propTypes = {
2496 path: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]).isRequired,
2497 exact: _propTypes2.default.bool,
2498 strict: _propTypes2.default.bool
2499
2500};
2501
2502RouteHook.defaultProps = {
2503 exact: false,
2504 strict: false
2505};
2506
2507exports.default = RouteHook;
2508
2509/***/ }),
2510/* 17 */
2511/***/ (function(module, exports, __webpack_require__) {
2512
2513"use strict";
2514/** @license React v16.8.6
2515 * react.production.min.js
2516 *
2517 * Copyright (c) Facebook, Inc. and its affiliates.
2518 *
2519 * This source code is licensed under the MIT license found in the
2520 * LICENSE file in the root directory of this source tree.
2521 */
2522
2523var k=__webpack_require__(5),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.concurrent_mode"):60111,y=n?Symbol.for("react.forward_ref"):60112,z=n?Symbol.for("react.suspense"):60113,aa=n?Symbol.for("react.memo"):
252460115,ba=n?Symbol.for("react.lazy"):60116,A="function"===typeof Symbol&&Symbol.iterator;function ca(a,b,d,c,e,g,h,f){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[d,c,e,g,h,f],m=0;a=Error(b.replace(/%s/g,function(){return l[m++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}}
2525function B(a){for(var b=arguments.length-1,d="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)d+="&args[]="+encodeURIComponent(arguments[c+1]);ca(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",d)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D={};
2526function E(a,b,d){this.props=a;this.context=b;this.refs=D;this.updater=d||C}E.prototype.isReactComponent={};E.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?B("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(a,b,d){this.props=a;this.context=b;this.refs=D;this.updater=d||C}var H=G.prototype=new F;
2527H.constructor=G;k(H,E.prototype);H.isPureReactComponent=!0;var I={current:null},J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};
2528function M(a,b,d){var c=void 0,e={},g=null,h=null;if(null!=b)for(c in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(g=""+b.key),b)K.call(b,c)&&!L.hasOwnProperty(c)&&(e[c]=b[c]);var f=arguments.length-2;if(1===f)e.children=d;else if(1<f){for(var l=Array(f),m=0;m<f;m++)l[m]=arguments[m+2];e.children=l}if(a&&a.defaultProps)for(c in f=a.defaultProps,f)void 0===e[c]&&(e[c]=f[c]);return{$$typeof:p,type:a,key:g,ref:h,props:e,_owner:J.current}}
2529function da(a,b){return{$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function N(a){return"object"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var O=/\/+/g,P=[];function Q(a,b,d,c){if(P.length){var e=P.pop();e.result=a;e.keyPrefix=b;e.func=d;e.context=c;e.count=0;return e}return{result:a,keyPrefix:b,func:d,context:c,count:0}}
2530function R(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>P.length&&P.push(a)}
2531function S(a,b,d,c){var e=typeof a;if("undefined"===e||"boolean"===e)a=null;var g=!1;if(null===a)g=!0;else switch(e){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0}}if(g)return d(c,a,""===b?"."+T(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var h=0;h<a.length;h++){e=a[h];var f=b+T(e,h);g+=S(e,f,d,c)}else if(null===a||"object"!==typeof a?f=null:(f=A&&a[A]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),h=
25320;!(e=a.next()).done;)e=e.value,f=b+T(e,h++),g+=S(e,f,d,c);else"object"===e&&(d=""+a,B("31","[object Object]"===d?"object with keys {"+Object.keys(a).join(", ")+"}":d,""));return g}function U(a,b,d){return null==a?0:S(a,"",b,d)}function T(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function ea(a,b){a.func.call(a.context,b,a.count++)}
2533function fa(a,b,d){var c=a.result,e=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?V(a,c,d,function(a){return a}):null!=a&&(N(a)&&(a=da(a,e+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(O,"$&/")+"/")+d)),c.push(a))}function V(a,b,d,c,e){var g="";null!=d&&(g=(""+d).replace(O,"$&/")+"/");b=Q(b,g,c,e);U(a,fa,b);R(b)}function W(){var a=I.current;null===a?B("321"):void 0;return a}
2534var X={Children:{map:function(a,b,d){if(null==a)return a;var c=[];V(a,c,null,b,d);return c},forEach:function(a,b,d){if(null==a)return a;b=Q(null,null,b,d);U(a,ea,b);R(b)},count:function(a){return U(a,function(){return null},null)},toArray:function(a){var b=[];V(a,b,null,function(a){return a});return b},only:function(a){N(a)?void 0:B("143");return a}},createRef:function(){return{current:null}},Component:E,PureComponent:G,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,
2535_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v,_context:a};return a.Consumer=a},forwardRef:function(a){return{$$typeof:y,render:a}},lazy:function(a){return{$$typeof:ba,_ctor:a,_status:-1,_result:null}},memo:function(a,b){return{$$typeof:aa,type:a,compare:void 0===b?null:b}},useCallback:function(a,b){return W().useCallback(a,b)},useContext:function(a,b){return W().useContext(a,b)},useEffect:function(a,b){return W().useEffect(a,b)},useImperativeHandle:function(a,
2536b,d){return W().useImperativeHandle(a,b,d)},useDebugValue:function(){},useLayoutEffect:function(a,b){return W().useLayoutEffect(a,b)},useMemo:function(a,b){return W().useMemo(a,b)},useReducer:function(a,b,d){return W().useReducer(a,b,d)},useRef:function(a){return W().useRef(a)},useState:function(a){return W().useState(a)},Fragment:r,StrictMode:t,Suspense:z,createElement:M,cloneElement:function(a,b,d){null===a||void 0===a?B("267",a):void 0;var c=void 0,e=k({},a.props),g=a.key,h=a.ref,f=a._owner;if(null!=
2537b){void 0!==b.ref&&(h=b.ref,f=J.current);void 0!==b.key&&(g=""+b.key);var l=void 0;a.type&&a.type.defaultProps&&(l=a.type.defaultProps);for(c in b)K.call(b,c)&&!L.hasOwnProperty(c)&&(e[c]=void 0===b[c]&&void 0!==l?l[c]:b[c])}c=arguments.length-2;if(1===c)e.children=d;else if(1<c){l=Array(c);for(var m=0;m<c;m++)l[m]=arguments[m+2];e.children=l}return{$$typeof:p,type:a.type,key:g,ref:h,props:e,_owner:f}},createFactory:function(a){var b=M.bind(null,a);b.type=a;return b},isValidElement:N,version:"16.8.6",
2538unstable_ConcurrentMode:x,unstable_Profiler:u,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:I,ReactCurrentOwner:J,assign:k}},Y={default:X},Z=Y&&X||Y;module.exports=Z.default||Z;
2539
2540
2541/***/ }),
2542/* 18 */
2543/***/ (function(module, exports, __webpack_require__) {
2544
2545"use strict";
2546/* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.8.6
2547 * react.development.js
2548 *
2549 * Copyright (c) Facebook, Inc. and its affiliates.
2550 *
2551 * This source code is licensed under the MIT license found in the
2552 * LICENSE file in the root directory of this source tree.
2553 */
2554
2555
2556
2557
2558
2559if (process.env.NODE_ENV !== "production") {
2560 (function() {
2561'use strict';
2562
2563var _assign = __webpack_require__(5);
2564var checkPropTypes = __webpack_require__(10);
2565
2566// TODO: this is special because it gets imported during build.
2567
2568var ReactVersion = '16.8.6';
2569
2570// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
2571// nor polyfill, then a plain number is used for performance.
2572var hasSymbol = typeof Symbol === 'function' && Symbol.for;
2573
2574var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
2575var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
2576var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
2577var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
2578var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
2579var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
2580var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
2581
2582var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
2583var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
2584var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
2585var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
2586var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
2587
2588var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
2589var FAUX_ITERATOR_SYMBOL = '@@iterator';
2590
2591function getIteratorFn(maybeIterable) {
2592 if (maybeIterable === null || typeof maybeIterable !== 'object') {
2593 return null;
2594 }
2595 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
2596 if (typeof maybeIterator === 'function') {
2597 return maybeIterator;
2598 }
2599 return null;
2600}
2601
2602/**
2603 * Use invariant() to assert state which your program assumes to be true.
2604 *
2605 * Provide sprintf-style format (only %s is supported) and arguments
2606 * to provide information about what broke and what you were
2607 * expecting.
2608 *
2609 * The invariant message will be stripped in production, but the invariant
2610 * will remain to ensure logic does not differ in production.
2611 */
2612
2613var validateFormat = function () {};
2614
2615{
2616 validateFormat = function (format) {
2617 if (format === undefined) {
2618 throw new Error('invariant requires an error message argument');
2619 }
2620 };
2621}
2622
2623function invariant(condition, format, a, b, c, d, e, f) {
2624 validateFormat(format);
2625
2626 if (!condition) {
2627 var error = void 0;
2628 if (format === undefined) {
2629 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
2630 } else {
2631 var args = [a, b, c, d, e, f];
2632 var argIndex = 0;
2633 error = new Error(format.replace(/%s/g, function () {
2634 return args[argIndex++];
2635 }));
2636 error.name = 'Invariant Violation';
2637 }
2638
2639 error.framesToPop = 1; // we don't care about invariant's own frame
2640 throw error;
2641 }
2642}
2643
2644// Relying on the `invariant()` implementation lets us
2645// preserve the format and params in the www builds.
2646
2647/**
2648 * Forked from fbjs/warning:
2649 * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
2650 *
2651 * Only change is we use console.warn instead of console.error,
2652 * and do nothing when 'console' is not supported.
2653 * This really simplifies the code.
2654 * ---
2655 * Similar to invariant but only logs a warning if the condition is not met.
2656 * This can be used to log issues in development environments in critical
2657 * paths. Removing the logging code for production environments will keep the
2658 * same logic and follow the same code paths.
2659 */
2660
2661var lowPriorityWarning = function () {};
2662
2663{
2664 var printWarning = function (format) {
2665 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2666 args[_key - 1] = arguments[_key];
2667 }
2668
2669 var argIndex = 0;
2670 var message = 'Warning: ' + format.replace(/%s/g, function () {
2671 return args[argIndex++];
2672 });
2673 if (typeof console !== 'undefined') {
2674 console.warn(message);
2675 }
2676 try {
2677 // --- Welcome to debugging React ---
2678 // This error was thrown as a convenience so that you can use this stack
2679 // to find the callsite that caused this warning to fire.
2680 throw new Error(message);
2681 } catch (x) {}
2682 };
2683
2684 lowPriorityWarning = function (condition, format) {
2685 if (format === undefined) {
2686 throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
2687 }
2688 if (!condition) {
2689 for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
2690 args[_key2 - 2] = arguments[_key2];
2691 }
2692
2693 printWarning.apply(undefined, [format].concat(args));
2694 }
2695 };
2696}
2697
2698var lowPriorityWarning$1 = lowPriorityWarning;
2699
2700/**
2701 * Similar to invariant but only logs a warning if the condition is not met.
2702 * This can be used to log issues in development environments in critical
2703 * paths. Removing the logging code for production environments will keep the
2704 * same logic and follow the same code paths.
2705 */
2706
2707var warningWithoutStack = function () {};
2708
2709{
2710 warningWithoutStack = function (condition, format) {
2711 for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
2712 args[_key - 2] = arguments[_key];
2713 }
2714
2715 if (format === undefined) {
2716 throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
2717 }
2718 if (args.length > 8) {
2719 // Check before the condition to catch violations early.
2720 throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
2721 }
2722 if (condition) {
2723 return;
2724 }
2725 if (typeof console !== 'undefined') {
2726 var argsWithFormat = args.map(function (item) {
2727 return '' + item;
2728 });
2729 argsWithFormat.unshift('Warning: ' + format);
2730
2731 // We intentionally don't use spread (or .apply) directly because it
2732 // breaks IE9: https://github.com/facebook/react/issues/13610
2733 Function.prototype.apply.call(console.error, console, argsWithFormat);
2734 }
2735 try {
2736 // --- Welcome to debugging React ---
2737 // This error was thrown as a convenience so that you can use this stack
2738 // to find the callsite that caused this warning to fire.
2739 var argIndex = 0;
2740 var message = 'Warning: ' + format.replace(/%s/g, function () {
2741 return args[argIndex++];
2742 });
2743 throw new Error(message);
2744 } catch (x) {}
2745 };
2746}
2747
2748var warningWithoutStack$1 = warningWithoutStack;
2749
2750var didWarnStateUpdateForUnmountedComponent = {};
2751
2752function warnNoop(publicInstance, callerName) {
2753 {
2754 var _constructor = publicInstance.constructor;
2755 var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
2756 var warningKey = componentName + '.' + callerName;
2757 if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
2758 return;
2759 }
2760 warningWithoutStack$1(false, "Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
2761 didWarnStateUpdateForUnmountedComponent[warningKey] = true;
2762 }
2763}
2764
2765/**
2766 * This is the abstract API for an update queue.
2767 */
2768var ReactNoopUpdateQueue = {
2769 /**
2770 * Checks whether or not this composite component is mounted.
2771 * @param {ReactClass} publicInstance The instance we want to test.
2772 * @return {boolean} True if mounted, false otherwise.
2773 * @protected
2774 * @final
2775 */
2776 isMounted: function (publicInstance) {
2777 return false;
2778 },
2779
2780 /**
2781 * Forces an update. This should only be invoked when it is known with
2782 * certainty that we are **not** in a DOM transaction.
2783 *
2784 * You may want to call this when you know that some deeper aspect of the
2785 * component's state has changed but `setState` was not called.
2786 *
2787 * This will not invoke `shouldComponentUpdate`, but it will invoke
2788 * `componentWillUpdate` and `componentDidUpdate`.
2789 *
2790 * @param {ReactClass} publicInstance The instance that should rerender.
2791 * @param {?function} callback Called after component is updated.
2792 * @param {?string} callerName name of the calling function in the public API.
2793 * @internal
2794 */
2795 enqueueForceUpdate: function (publicInstance, callback, callerName) {
2796 warnNoop(publicInstance, 'forceUpdate');
2797 },
2798
2799 /**
2800 * Replaces all of the state. Always use this or `setState` to mutate state.
2801 * You should treat `this.state` as immutable.
2802 *
2803 * There is no guarantee that `this.state` will be immediately updated, so
2804 * accessing `this.state` after calling this method may return the old value.
2805 *
2806 * @param {ReactClass} publicInstance The instance that should rerender.
2807 * @param {object} completeState Next state.
2808 * @param {?function} callback Called after component is updated.
2809 * @param {?string} callerName name of the calling function in the public API.
2810 * @internal
2811 */
2812 enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
2813 warnNoop(publicInstance, 'replaceState');
2814 },
2815
2816 /**
2817 * Sets a subset of the state. This only exists because _pendingState is
2818 * internal. This provides a merging strategy that is not available to deep
2819 * properties which is confusing. TODO: Expose pendingState or don't use it
2820 * during the merge.
2821 *
2822 * @param {ReactClass} publicInstance The instance that should rerender.
2823 * @param {object} partialState Next partial state to be merged with state.
2824 * @param {?function} callback Called after component is updated.
2825 * @param {?string} Name of the calling function in the public API.
2826 * @internal
2827 */
2828 enqueueSetState: function (publicInstance, partialState, callback, callerName) {
2829 warnNoop(publicInstance, 'setState');
2830 }
2831};
2832
2833var emptyObject = {};
2834{
2835 Object.freeze(emptyObject);
2836}
2837
2838/**
2839 * Base class helpers for the updating state of a component.
2840 */
2841function Component(props, context, updater) {
2842 this.props = props;
2843 this.context = context;
2844 // If a component has string refs, we will assign a different object later.
2845 this.refs = emptyObject;
2846 // We initialize the default updater but the real one gets injected by the
2847 // renderer.
2848 this.updater = updater || ReactNoopUpdateQueue;
2849}
2850
2851Component.prototype.isReactComponent = {};
2852
2853/**
2854 * Sets a subset of the state. Always use this to mutate
2855 * state. You should treat `this.state` as immutable.
2856 *
2857 * There is no guarantee that `this.state` will be immediately updated, so
2858 * accessing `this.state` after calling this method may return the old value.
2859 *
2860 * There is no guarantee that calls to `setState` will run synchronously,
2861 * as they may eventually be batched together. You can provide an optional
2862 * callback that will be executed when the call to setState is actually
2863 * completed.
2864 *
2865 * When a function is provided to setState, it will be called at some point in
2866 * the future (not synchronously). It will be called with the up to date
2867 * component arguments (state, props, context). These values can be different
2868 * from this.* because your function may be called after receiveProps but before
2869 * shouldComponentUpdate, and this new state, props, and context will not yet be
2870 * assigned to this.
2871 *
2872 * @param {object|function} partialState Next partial state or function to
2873 * produce next partial state to be merged with current state.
2874 * @param {?function} callback Called after state is updated.
2875 * @final
2876 * @protected
2877 */
2878Component.prototype.setState = function (partialState, callback) {
2879 !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;
2880 this.updater.enqueueSetState(this, partialState, callback, 'setState');
2881};
2882
2883/**
2884 * Forces an update. This should only be invoked when it is known with
2885 * certainty that we are **not** in a DOM transaction.
2886 *
2887 * You may want to call this when you know that some deeper aspect of the
2888 * component's state has changed but `setState` was not called.
2889 *
2890 * This will not invoke `shouldComponentUpdate`, but it will invoke
2891 * `componentWillUpdate` and `componentDidUpdate`.
2892 *
2893 * @param {?function} callback Called after update is complete.
2894 * @final
2895 * @protected
2896 */
2897Component.prototype.forceUpdate = function (callback) {
2898 this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
2899};
2900
2901/**
2902 * Deprecated APIs. These APIs used to exist on classic React classes but since
2903 * we would like to deprecate them, we're not going to move them over to this
2904 * modern base class. Instead, we define a getter that warns if it's accessed.
2905 */
2906{
2907 var deprecatedAPIs = {
2908 isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
2909 replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
2910 };
2911 var defineDeprecationWarning = function (methodName, info) {
2912 Object.defineProperty(Component.prototype, methodName, {
2913 get: function () {
2914 lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
2915 return undefined;
2916 }
2917 });
2918 };
2919 for (var fnName in deprecatedAPIs) {
2920 if (deprecatedAPIs.hasOwnProperty(fnName)) {
2921 defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
2922 }
2923 }
2924}
2925
2926function ComponentDummy() {}
2927ComponentDummy.prototype = Component.prototype;
2928
2929/**
2930 * Convenience component with default shallow equality check for sCU.
2931 */
2932function PureComponent(props, context, updater) {
2933 this.props = props;
2934 this.context = context;
2935 // If a component has string refs, we will assign a different object later.
2936 this.refs = emptyObject;
2937 this.updater = updater || ReactNoopUpdateQueue;
2938}
2939
2940var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
2941pureComponentPrototype.constructor = PureComponent;
2942// Avoid an extra prototype jump for these methods.
2943_assign(pureComponentPrototype, Component.prototype);
2944pureComponentPrototype.isPureReactComponent = true;
2945
2946// an immutable object with a single mutable value
2947function createRef() {
2948 var refObject = {
2949 current: null
2950 };
2951 {
2952 Object.seal(refObject);
2953 }
2954 return refObject;
2955}
2956
2957/**
2958 * Keeps track of the current dispatcher.
2959 */
2960var ReactCurrentDispatcher = {
2961 /**
2962 * @internal
2963 * @type {ReactComponent}
2964 */
2965 current: null
2966};
2967
2968/**
2969 * Keeps track of the current owner.
2970 *
2971 * The current owner is the component who should own any components that are
2972 * currently being constructed.
2973 */
2974var ReactCurrentOwner = {
2975 /**
2976 * @internal
2977 * @type {ReactComponent}
2978 */
2979 current: null
2980};
2981
2982var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
2983
2984var describeComponentFrame = function (name, source, ownerName) {
2985 var sourceInfo = '';
2986 if (source) {
2987 var path = source.fileName;
2988 var fileName = path.replace(BEFORE_SLASH_RE, '');
2989 {
2990 // In DEV, include code for a common special case:
2991 // prefer "folder/index.js" instead of just "index.js".
2992 if (/^index\./.test(fileName)) {
2993 var match = path.match(BEFORE_SLASH_RE);
2994 if (match) {
2995 var pathBeforeSlash = match[1];
2996 if (pathBeforeSlash) {
2997 var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
2998 fileName = folderName + '/' + fileName;
2999 }
3000 }
3001 }
3002 }
3003 sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
3004 } else if (ownerName) {
3005 sourceInfo = ' (created by ' + ownerName + ')';
3006 }
3007 return '\n in ' + (name || 'Unknown') + sourceInfo;
3008};
3009
3010var Resolved = 1;
3011
3012
3013function refineResolvedLazyComponent(lazyComponent) {
3014 return lazyComponent._status === Resolved ? lazyComponent._result : null;
3015}
3016
3017function getWrappedName(outerType, innerType, wrapperName) {
3018 var functionName = innerType.displayName || innerType.name || '';
3019 return outerType.displayName || (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName);
3020}
3021
3022function getComponentName(type) {
3023 if (type == null) {
3024 // Host root, text node or just invalid type.
3025 return null;
3026 }
3027 {
3028 if (typeof type.tag === 'number') {
3029 warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
3030 }
3031 }
3032 if (typeof type === 'function') {
3033 return type.displayName || type.name || null;
3034 }
3035 if (typeof type === 'string') {
3036 return type;
3037 }
3038 switch (type) {
3039 case REACT_CONCURRENT_MODE_TYPE:
3040 return 'ConcurrentMode';
3041 case REACT_FRAGMENT_TYPE:
3042 return 'Fragment';
3043 case REACT_PORTAL_TYPE:
3044 return 'Portal';
3045 case REACT_PROFILER_TYPE:
3046 return 'Profiler';
3047 case REACT_STRICT_MODE_TYPE:
3048 return 'StrictMode';
3049 case REACT_SUSPENSE_TYPE:
3050 return 'Suspense';
3051 }
3052 if (typeof type === 'object') {
3053 switch (type.$$typeof) {
3054 case REACT_CONTEXT_TYPE:
3055 return 'Context.Consumer';
3056 case REACT_PROVIDER_TYPE:
3057 return 'Context.Provider';
3058 case REACT_FORWARD_REF_TYPE:
3059 return getWrappedName(type, type.render, 'ForwardRef');
3060 case REACT_MEMO_TYPE:
3061 return getComponentName(type.type);
3062 case REACT_LAZY_TYPE:
3063 {
3064 var thenable = type;
3065 var resolvedThenable = refineResolvedLazyComponent(thenable);
3066 if (resolvedThenable) {
3067 return getComponentName(resolvedThenable);
3068 }
3069 }
3070 }
3071 }
3072 return null;
3073}
3074
3075var ReactDebugCurrentFrame = {};
3076
3077var currentlyValidatingElement = null;
3078
3079function setCurrentlyValidatingElement(element) {
3080 {
3081 currentlyValidatingElement = element;
3082 }
3083}
3084
3085{
3086 // Stack implementation injected by the current renderer.
3087 ReactDebugCurrentFrame.getCurrentStack = null;
3088
3089 ReactDebugCurrentFrame.getStackAddendum = function () {
3090 var stack = '';
3091
3092 // Add an extra top frame while an element is being validated
3093 if (currentlyValidatingElement) {
3094 var name = getComponentName(currentlyValidatingElement.type);
3095 var owner = currentlyValidatingElement._owner;
3096 stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
3097 }
3098
3099 // Delegate to the injected renderer-specific implementation
3100 var impl = ReactDebugCurrentFrame.getCurrentStack;
3101 if (impl) {
3102 stack += impl() || '';
3103 }
3104
3105 return stack;
3106 };
3107}
3108
3109var ReactSharedInternals = {
3110 ReactCurrentDispatcher: ReactCurrentDispatcher,
3111 ReactCurrentOwner: ReactCurrentOwner,
3112 // Used by renderers to avoid bundling object-assign twice in UMD bundles:
3113 assign: _assign
3114};
3115
3116{
3117 _assign(ReactSharedInternals, {
3118 // These should not be included in production.
3119 ReactDebugCurrentFrame: ReactDebugCurrentFrame,
3120 // Shim for React DOM 16.0.0 which still destructured (but not used) this.
3121 // TODO: remove in React 17.0.
3122 ReactComponentTreeHook: {}
3123 });
3124}
3125
3126/**
3127 * Similar to invariant but only logs a warning if the condition is not met.
3128 * This can be used to log issues in development environments in critical
3129 * paths. Removing the logging code for production environments will keep the
3130 * same logic and follow the same code paths.
3131 */
3132
3133var warning = warningWithoutStack$1;
3134
3135{
3136 warning = function (condition, format) {
3137 if (condition) {
3138 return;
3139 }
3140 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
3141 var stack = ReactDebugCurrentFrame.getStackAddendum();
3142 // eslint-disable-next-line react-internal/warning-and-invariant-args
3143
3144 for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
3145 args[_key - 2] = arguments[_key];
3146 }
3147
3148 warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));
3149 };
3150}
3151
3152var warning$1 = warning;
3153
3154var hasOwnProperty = Object.prototype.hasOwnProperty;
3155
3156var RESERVED_PROPS = {
3157 key: true,
3158 ref: true,
3159 __self: true,
3160 __source: true
3161};
3162
3163var specialPropKeyWarningShown = void 0;
3164var specialPropRefWarningShown = void 0;
3165
3166function hasValidRef(config) {
3167 {
3168 if (hasOwnProperty.call(config, 'ref')) {
3169 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
3170 if (getter && getter.isReactWarning) {
3171 return false;
3172 }
3173 }
3174 }
3175 return config.ref !== undefined;
3176}
3177
3178function hasValidKey(config) {
3179 {
3180 if (hasOwnProperty.call(config, 'key')) {
3181 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
3182 if (getter && getter.isReactWarning) {
3183 return false;
3184 }
3185 }
3186 }
3187 return config.key !== undefined;
3188}
3189
3190function defineKeyPropWarningGetter(props, displayName) {
3191 var warnAboutAccessingKey = function () {
3192 if (!specialPropKeyWarningShown) {
3193 specialPropKeyWarningShown = true;
3194 warningWithoutStack$1(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);
3195 }
3196 };
3197 warnAboutAccessingKey.isReactWarning = true;
3198 Object.defineProperty(props, 'key', {
3199 get: warnAboutAccessingKey,
3200 configurable: true
3201 });
3202}
3203
3204function defineRefPropWarningGetter(props, displayName) {
3205 var warnAboutAccessingRef = function () {
3206 if (!specialPropRefWarningShown) {
3207 specialPropRefWarningShown = true;
3208 warningWithoutStack$1(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);
3209 }
3210 };
3211 warnAboutAccessingRef.isReactWarning = true;
3212 Object.defineProperty(props, 'ref', {
3213 get: warnAboutAccessingRef,
3214 configurable: true
3215 });
3216}
3217
3218/**
3219 * Factory method to create a new React element. This no longer adheres to
3220 * the class pattern, so do not use new to call it. Also, no instanceof check
3221 * will work. Instead test $$typeof field against Symbol.for('react.element') to check
3222 * if something is a React Element.
3223 *
3224 * @param {*} type
3225 * @param {*} key
3226 * @param {string|object} ref
3227 * @param {*} self A *temporary* helper to detect places where `this` is
3228 * different from the `owner` when React.createElement is called, so that we
3229 * can warn. We want to get rid of owner and replace string `ref`s with arrow
3230 * functions, and as long as `this` and owner are the same, there will be no
3231 * change in behavior.
3232 * @param {*} source An annotation object (added by a transpiler or otherwise)
3233 * indicating filename, line number, and/or other information.
3234 * @param {*} owner
3235 * @param {*} props
3236 * @internal
3237 */
3238var ReactElement = function (type, key, ref, self, source, owner, props) {
3239 var element = {
3240 // This tag allows us to uniquely identify this as a React Element
3241 $$typeof: REACT_ELEMENT_TYPE,
3242
3243 // Built-in properties that belong on the element
3244 type: type,
3245 key: key,
3246 ref: ref,
3247 props: props,
3248
3249 // Record the component responsible for creating this element.
3250 _owner: owner
3251 };
3252
3253 {
3254 // The validation flag is currently mutative. We put it on
3255 // an external backing store so that we can freeze the whole object.
3256 // This can be replaced with a WeakMap once they are implemented in
3257 // commonly used development environments.
3258 element._store = {};
3259
3260 // To make comparing ReactElements easier for testing purposes, we make
3261 // the validation flag non-enumerable (where possible, which should
3262 // include every environment we run tests in), so the test framework
3263 // ignores it.
3264 Object.defineProperty(element._store, 'validated', {
3265 configurable: false,
3266 enumerable: false,
3267 writable: true,
3268 value: false
3269 });
3270 // self and source are DEV only properties.
3271 Object.defineProperty(element, '_self', {
3272 configurable: false,
3273 enumerable: false,
3274 writable: false,
3275 value: self
3276 });
3277 // Two elements created in two different places should be considered
3278 // equal for testing purposes and therefore we hide it from enumeration.
3279 Object.defineProperty(element, '_source', {
3280 configurable: false,
3281 enumerable: false,
3282 writable: false,
3283 value: source
3284 });
3285 if (Object.freeze) {
3286 Object.freeze(element.props);
3287 Object.freeze(element);
3288 }
3289 }
3290
3291 return element;
3292};
3293
3294/**
3295 * Create and return a new ReactElement of the given type.
3296 * See https://reactjs.org/docs/react-api.html#createelement
3297 */
3298function createElement(type, config, children) {
3299 var propName = void 0;
3300
3301 // Reserved names are extracted
3302 var props = {};
3303
3304 var key = null;
3305 var ref = null;
3306 var self = null;
3307 var source = null;
3308
3309 if (config != null) {
3310 if (hasValidRef(config)) {
3311 ref = config.ref;
3312 }
3313 if (hasValidKey(config)) {
3314 key = '' + config.key;
3315 }
3316
3317 self = config.__self === undefined ? null : config.__self;
3318 source = config.__source === undefined ? null : config.__source;
3319 // Remaining properties are added to a new props object
3320 for (propName in config) {
3321 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
3322 props[propName] = config[propName];
3323 }
3324 }
3325 }
3326
3327 // Children can be more than one argument, and those are transferred onto
3328 // the newly allocated props object.
3329 var childrenLength = arguments.length - 2;
3330 if (childrenLength === 1) {
3331 props.children = children;
3332 } else if (childrenLength > 1) {
3333 var childArray = Array(childrenLength);
3334 for (var i = 0; i < childrenLength; i++) {
3335 childArray[i] = arguments[i + 2];
3336 }
3337 {
3338 if (Object.freeze) {
3339 Object.freeze(childArray);
3340 }
3341 }
3342 props.children = childArray;
3343 }
3344
3345 // Resolve default props
3346 if (type && type.defaultProps) {
3347 var defaultProps = type.defaultProps;
3348 for (propName in defaultProps) {
3349 if (props[propName] === undefined) {
3350 props[propName] = defaultProps[propName];
3351 }
3352 }
3353 }
3354 {
3355 if (key || ref) {
3356 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
3357 if (key) {
3358 defineKeyPropWarningGetter(props, displayName);
3359 }
3360 if (ref) {
3361 defineRefPropWarningGetter(props, displayName);
3362 }
3363 }
3364 }
3365 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
3366}
3367
3368/**
3369 * Return a function that produces ReactElements of a given type.
3370 * See https://reactjs.org/docs/react-api.html#createfactory
3371 */
3372
3373
3374function cloneAndReplaceKey(oldElement, newKey) {
3375 var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
3376
3377 return newElement;
3378}
3379
3380/**
3381 * Clone and return a new ReactElement using element as the starting point.
3382 * See https://reactjs.org/docs/react-api.html#cloneelement
3383 */
3384function cloneElement(element, config, children) {
3385 !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;
3386
3387 var propName = void 0;
3388
3389 // Original props are copied
3390 var props = _assign({}, element.props);
3391
3392 // Reserved names are extracted
3393 var key = element.key;
3394 var ref = element.ref;
3395 // Self is preserved since the owner is preserved.
3396 var self = element._self;
3397 // Source is preserved since cloneElement is unlikely to be targeted by a
3398 // transpiler, and the original source is probably a better indicator of the
3399 // true owner.
3400 var source = element._source;
3401
3402 // Owner will be preserved, unless ref is overridden
3403 var owner = element._owner;
3404
3405 if (config != null) {
3406 if (hasValidRef(config)) {
3407 // Silently steal the ref from the parent.
3408 ref = config.ref;
3409 owner = ReactCurrentOwner.current;
3410 }
3411 if (hasValidKey(config)) {
3412 key = '' + config.key;
3413 }
3414
3415 // Remaining properties override existing props
3416 var defaultProps = void 0;
3417 if (element.type && element.type.defaultProps) {
3418 defaultProps = element.type.defaultProps;
3419 }
3420 for (propName in config) {
3421 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
3422 if (config[propName] === undefined && defaultProps !== undefined) {
3423 // Resolve default props
3424 props[propName] = defaultProps[propName];
3425 } else {
3426 props[propName] = config[propName];
3427 }
3428 }
3429 }
3430 }
3431
3432 // Children can be more than one argument, and those are transferred onto
3433 // the newly allocated props object.
3434 var childrenLength = arguments.length - 2;
3435 if (childrenLength === 1) {
3436 props.children = children;
3437 } else if (childrenLength > 1) {
3438 var childArray = Array(childrenLength);
3439 for (var i = 0; i < childrenLength; i++) {
3440 childArray[i] = arguments[i + 2];
3441 }
3442 props.children = childArray;
3443 }
3444
3445 return ReactElement(element.type, key, ref, self, source, owner, props);
3446}
3447
3448/**
3449 * Verifies the object is a ReactElement.
3450 * See https://reactjs.org/docs/react-api.html#isvalidelement
3451 * @param {?object} object
3452 * @return {boolean} True if `object` is a ReactElement.
3453 * @final
3454 */
3455function isValidElement(object) {
3456 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
3457}
3458
3459var SEPARATOR = '.';
3460var SUBSEPARATOR = ':';
3461
3462/**
3463 * Escape and wrap key so it is safe to use as a reactid
3464 *
3465 * @param {string} key to be escaped.
3466 * @return {string} the escaped key.
3467 */
3468function escape(key) {
3469 var escapeRegex = /[=:]/g;
3470 var escaperLookup = {
3471 '=': '=0',
3472 ':': '=2'
3473 };
3474 var escapedString = ('' + key).replace(escapeRegex, function (match) {
3475 return escaperLookup[match];
3476 });
3477
3478 return '$' + escapedString;
3479}
3480
3481/**
3482 * TODO: Test that a single child and an array with one item have the same key
3483 * pattern.
3484 */
3485
3486var didWarnAboutMaps = false;
3487
3488var userProvidedKeyEscapeRegex = /\/+/g;
3489function escapeUserProvidedKey(text) {
3490 return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
3491}
3492
3493var POOL_SIZE = 10;
3494var traverseContextPool = [];
3495function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
3496 if (traverseContextPool.length) {
3497 var traverseContext = traverseContextPool.pop();
3498 traverseContext.result = mapResult;
3499 traverseContext.keyPrefix = keyPrefix;
3500 traverseContext.func = mapFunction;
3501 traverseContext.context = mapContext;
3502 traverseContext.count = 0;
3503 return traverseContext;
3504 } else {
3505 return {
3506 result: mapResult,
3507 keyPrefix: keyPrefix,
3508 func: mapFunction,
3509 context: mapContext,
3510 count: 0
3511 };
3512 }
3513}
3514
3515function releaseTraverseContext(traverseContext) {
3516 traverseContext.result = null;
3517 traverseContext.keyPrefix = null;
3518 traverseContext.func = null;
3519 traverseContext.context = null;
3520 traverseContext.count = 0;
3521 if (traverseContextPool.length < POOL_SIZE) {
3522 traverseContextPool.push(traverseContext);
3523 }
3524}
3525
3526/**
3527 * @param {?*} children Children tree container.
3528 * @param {!string} nameSoFar Name of the key path so far.
3529 * @param {!function} callback Callback to invoke with each child found.
3530 * @param {?*} traverseContext Used to pass information throughout the traversal
3531 * process.
3532 * @return {!number} The number of children in this subtree.
3533 */
3534function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
3535 var type = typeof children;
3536
3537 if (type === 'undefined' || type === 'boolean') {
3538 // All of the above are perceived as null.
3539 children = null;
3540 }
3541
3542 var invokeCallback = false;
3543
3544 if (children === null) {
3545 invokeCallback = true;
3546 } else {
3547 switch (type) {
3548 case 'string':
3549 case 'number':
3550 invokeCallback = true;
3551 break;
3552 case 'object':
3553 switch (children.$$typeof) {
3554 case REACT_ELEMENT_TYPE:
3555 case REACT_PORTAL_TYPE:
3556 invokeCallback = true;
3557 }
3558 }
3559 }
3560
3561 if (invokeCallback) {
3562 callback(traverseContext, children,
3563 // If it's the only child, treat the name as if it was wrapped in an array
3564 // so that it's consistent if the number of children grows.
3565 nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
3566 return 1;
3567 }
3568
3569 var child = void 0;
3570 var nextName = void 0;
3571 var subtreeCount = 0; // Count of children found in the current subtree.
3572 var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
3573
3574 if (Array.isArray(children)) {
3575 for (var i = 0; i < children.length; i++) {
3576 child = children[i];
3577 nextName = nextNamePrefix + getComponentKey(child, i);
3578 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
3579 }
3580 } else {
3581 var iteratorFn = getIteratorFn(children);
3582 if (typeof iteratorFn === 'function') {
3583 {
3584 // Warn about using Maps as children
3585 if (iteratorFn === children.entries) {
3586 !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;
3587 didWarnAboutMaps = true;
3588 }
3589 }
3590
3591 var iterator = iteratorFn.call(children);
3592 var step = void 0;
3593 var ii = 0;
3594 while (!(step = iterator.next()).done) {
3595 child = step.value;
3596 nextName = nextNamePrefix + getComponentKey(child, ii++);
3597 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
3598 }
3599 } else if (type === 'object') {
3600 var addendum = '';
3601 {
3602 addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
3603 }
3604 var childrenString = '' + children;
3605 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);
3606 }
3607 }
3608
3609 return subtreeCount;
3610}
3611
3612/**
3613 * Traverses children that are typically specified as `props.children`, but
3614 * might also be specified through attributes:
3615 *
3616 * - `traverseAllChildren(this.props.children, ...)`
3617 * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
3618 *
3619 * The `traverseContext` is an optional argument that is passed through the
3620 * entire traversal. It can be used to store accumulations or anything else that
3621 * the callback might find relevant.
3622 *
3623 * @param {?*} children Children tree object.
3624 * @param {!function} callback To invoke upon traversing each child.
3625 * @param {?*} traverseContext Context for traversal.
3626 * @return {!number} The number of children in this subtree.
3627 */
3628function traverseAllChildren(children, callback, traverseContext) {
3629 if (children == null) {
3630 return 0;
3631 }
3632
3633 return traverseAllChildrenImpl(children, '', callback, traverseContext);
3634}
3635
3636/**
3637 * Generate a key string that identifies a component within a set.
3638 *
3639 * @param {*} component A component that could contain a manual key.
3640 * @param {number} index Index that is used if a manual key is not provided.
3641 * @return {string}
3642 */
3643function getComponentKey(component, index) {
3644 // Do some typechecking here since we call this blindly. We want to ensure
3645 // that we don't block potential future ES APIs.
3646 if (typeof component === 'object' && component !== null && component.key != null) {
3647 // Explicit key
3648 return escape(component.key);
3649 }
3650 // Implicit key determined by the index in the set
3651 return index.toString(36);
3652}
3653
3654function forEachSingleChild(bookKeeping, child, name) {
3655 var func = bookKeeping.func,
3656 context = bookKeeping.context;
3657
3658 func.call(context, child, bookKeeping.count++);
3659}
3660
3661/**
3662 * Iterates through children that are typically specified as `props.children`.
3663 *
3664 * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
3665 *
3666 * The provided forEachFunc(child, index) will be called for each
3667 * leaf child.
3668 *
3669 * @param {?*} children Children tree container.
3670 * @param {function(*, int)} forEachFunc
3671 * @param {*} forEachContext Context for forEachContext.
3672 */
3673function forEachChildren(children, forEachFunc, forEachContext) {
3674 if (children == null) {
3675 return children;
3676 }
3677 var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
3678 traverseAllChildren(children, forEachSingleChild, traverseContext);
3679 releaseTraverseContext(traverseContext);
3680}
3681
3682function mapSingleChildIntoContext(bookKeeping, child, childKey) {
3683 var result = bookKeeping.result,
3684 keyPrefix = bookKeeping.keyPrefix,
3685 func = bookKeeping.func,
3686 context = bookKeeping.context;
3687
3688
3689 var mappedChild = func.call(context, child, bookKeeping.count++);
3690 if (Array.isArray(mappedChild)) {
3691 mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
3692 return c;
3693 });
3694 } else if (mappedChild != null) {
3695 if (isValidElement(mappedChild)) {
3696 mappedChild = cloneAndReplaceKey(mappedChild,
3697 // Keep both the (mapped) and old keys if they differ, just as
3698 // traverseAllChildren used to do for objects as children
3699 keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
3700 }
3701 result.push(mappedChild);
3702 }
3703}
3704
3705function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
3706 var escapedPrefix = '';
3707 if (prefix != null) {
3708 escapedPrefix = escapeUserProvidedKey(prefix) + '/';
3709 }
3710 var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
3711 traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
3712 releaseTraverseContext(traverseContext);
3713}
3714
3715/**
3716 * Maps children that are typically specified as `props.children`.
3717 *
3718 * See https://reactjs.org/docs/react-api.html#reactchildrenmap
3719 *
3720 * The provided mapFunction(child, key, index) will be called for each
3721 * leaf child.
3722 *
3723 * @param {?*} children Children tree container.
3724 * @param {function(*, int)} func The map function.
3725 * @param {*} context Context for mapFunction.
3726 * @return {object} Object containing the ordered map of results.
3727 */
3728function mapChildren(children, func, context) {
3729 if (children == null) {
3730 return children;
3731 }
3732 var result = [];
3733 mapIntoWithKeyPrefixInternal(children, result, null, func, context);
3734 return result;
3735}
3736
3737/**
3738 * Count the number of children that are typically specified as
3739 * `props.children`.
3740 *
3741 * See https://reactjs.org/docs/react-api.html#reactchildrencount
3742 *
3743 * @param {?*} children Children tree container.
3744 * @return {number} The number of children.
3745 */
3746function countChildren(children) {
3747 return traverseAllChildren(children, function () {
3748 return null;
3749 }, null);
3750}
3751
3752/**
3753 * Flatten a children object (typically specified as `props.children`) and
3754 * return an array with appropriately re-keyed children.
3755 *
3756 * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
3757 */
3758function toArray(children) {
3759 var result = [];
3760 mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
3761 return child;
3762 });
3763 return result;
3764}
3765
3766/**
3767 * Returns the first child in a collection of children and verifies that there
3768 * is only one child in the collection.
3769 *
3770 * See https://reactjs.org/docs/react-api.html#reactchildrenonly
3771 *
3772 * The current implementation of this function assumes that a single child gets
3773 * passed without a wrapper, but the purpose of this helper function is to
3774 * abstract away the particular structure of children.
3775 *
3776 * @param {?object} children Child collection structure.
3777 * @return {ReactElement} The first and only `ReactElement` contained in the
3778 * structure.
3779 */
3780function onlyChild(children) {
3781 !isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0;
3782 return children;
3783}
3784
3785function createContext(defaultValue, calculateChangedBits) {
3786 if (calculateChangedBits === undefined) {
3787 calculateChangedBits = null;
3788 } else {
3789 {
3790 !(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warningWithoutStack$1(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0;
3791 }
3792 }
3793
3794 var context = {
3795 $$typeof: REACT_CONTEXT_TYPE,
3796 _calculateChangedBits: calculateChangedBits,
3797 // As a workaround to support multiple concurrent renderers, we categorize
3798 // some renderers as primary and others as secondary. We only expect
3799 // there to be two concurrent renderers at most: React Native (primary) and
3800 // Fabric (secondary); React DOM (primary) and React ART (secondary).
3801 // Secondary renderers store their context values on separate fields.
3802 _currentValue: defaultValue,
3803 _currentValue2: defaultValue,
3804 // Used to track how many concurrent renderers this context currently
3805 // supports within in a single renderer. Such as parallel server rendering.
3806 _threadCount: 0,
3807 // These are circular
3808 Provider: null,
3809 Consumer: null
3810 };
3811
3812 context.Provider = {
3813 $$typeof: REACT_PROVIDER_TYPE,
3814 _context: context
3815 };
3816
3817 var hasWarnedAboutUsingNestedContextConsumers = false;
3818 var hasWarnedAboutUsingConsumerProvider = false;
3819
3820 {
3821 // A separate object, but proxies back to the original context object for
3822 // backwards compatibility. It has a different $$typeof, so we can properly
3823 // warn for the incorrect usage of Context as a Consumer.
3824 var Consumer = {
3825 $$typeof: REACT_CONTEXT_TYPE,
3826 _context: context,
3827 _calculateChangedBits: context._calculateChangedBits
3828 };
3829 // $FlowFixMe: Flow complains about not setting a value, which is intentional here
3830 Object.defineProperties(Consumer, {
3831 Provider: {
3832 get: function () {
3833 if (!hasWarnedAboutUsingConsumerProvider) {
3834 hasWarnedAboutUsingConsumerProvider = true;
3835 warning$1(false, 'Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
3836 }
3837 return context.Provider;
3838 },
3839 set: function (_Provider) {
3840 context.Provider = _Provider;
3841 }
3842 },
3843 _currentValue: {
3844 get: function () {
3845 return context._currentValue;
3846 },
3847 set: function (_currentValue) {
3848 context._currentValue = _currentValue;
3849 }
3850 },
3851 _currentValue2: {
3852 get: function () {
3853 return context._currentValue2;
3854 },
3855 set: function (_currentValue2) {
3856 context._currentValue2 = _currentValue2;
3857 }
3858 },
3859 _threadCount: {
3860 get: function () {
3861 return context._threadCount;
3862 },
3863 set: function (_threadCount) {
3864 context._threadCount = _threadCount;
3865 }
3866 },
3867 Consumer: {
3868 get: function () {
3869 if (!hasWarnedAboutUsingNestedContextConsumers) {
3870 hasWarnedAboutUsingNestedContextConsumers = true;
3871 warning$1(false, 'Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
3872 }
3873 return context.Consumer;
3874 }
3875 }
3876 });
3877 // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
3878 context.Consumer = Consumer;
3879 }
3880
3881 {
3882 context._currentRenderer = null;
3883 context._currentRenderer2 = null;
3884 }
3885
3886 return context;
3887}
3888
3889function lazy(ctor) {
3890 var lazyType = {
3891 $$typeof: REACT_LAZY_TYPE,
3892 _ctor: ctor,
3893 // React uses these fields to store the result.
3894 _status: -1,
3895 _result: null
3896 };
3897
3898 {
3899 // In production, this would just set it on the object.
3900 var defaultProps = void 0;
3901 var propTypes = void 0;
3902 Object.defineProperties(lazyType, {
3903 defaultProps: {
3904 configurable: true,
3905 get: function () {
3906 return defaultProps;
3907 },
3908 set: function (newDefaultProps) {
3909 warning$1(false, 'React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
3910 defaultProps = newDefaultProps;
3911 // Match production behavior more closely:
3912 Object.defineProperty(lazyType, 'defaultProps', {
3913 enumerable: true
3914 });
3915 }
3916 },
3917 propTypes: {
3918 configurable: true,
3919 get: function () {
3920 return propTypes;
3921 },
3922 set: function (newPropTypes) {
3923 warning$1(false, 'React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
3924 propTypes = newPropTypes;
3925 // Match production behavior more closely:
3926 Object.defineProperty(lazyType, 'propTypes', {
3927 enumerable: true
3928 });
3929 }
3930 }
3931 });
3932 }
3933
3934 return lazyType;
3935}
3936
3937function forwardRef(render) {
3938 {
3939 if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
3940 warningWithoutStack$1(false, 'forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
3941 } else if (typeof render !== 'function') {
3942 warningWithoutStack$1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
3943 } else {
3944 !(
3945 // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object
3946 render.length === 0 || render.length === 2) ? warningWithoutStack$1(false, 'forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.') : void 0;
3947 }
3948
3949 if (render != null) {
3950 !(render.defaultProps == null && render.propTypes == null) ? warningWithoutStack$1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0;
3951 }
3952 }
3953
3954 return {
3955 $$typeof: REACT_FORWARD_REF_TYPE,
3956 render: render
3957 };
3958}
3959
3960function isValidElementType(type) {
3961 return typeof type === 'string' || typeof type === 'function' ||
3962 // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
3963 type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
3964}
3965
3966function memo(type, compare) {
3967 {
3968 if (!isValidElementType(type)) {
3969 warningWithoutStack$1(false, 'memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
3970 }
3971 }
3972 return {
3973 $$typeof: REACT_MEMO_TYPE,
3974 type: type,
3975 compare: compare === undefined ? null : compare
3976 };
3977}
3978
3979function resolveDispatcher() {
3980 var dispatcher = ReactCurrentDispatcher.current;
3981 !(dispatcher !== null) ? invariant(false, 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.') : void 0;
3982 return dispatcher;
3983}
3984
3985function useContext(Context, unstable_observedBits) {
3986 var dispatcher = resolveDispatcher();
3987 {
3988 !(unstable_observedBits === undefined) ? warning$1(false, 'useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : '') : void 0;
3989
3990 // TODO: add a more generic warning for invalid values.
3991 if (Context._context !== undefined) {
3992 var realContext = Context._context;
3993 // Don't deduplicate because this legitimately causes bugs
3994 // and nobody should be using this in existing code.
3995 if (realContext.Consumer === Context) {
3996 warning$1(false, 'Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
3997 } else if (realContext.Provider === Context) {
3998 warning$1(false, 'Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
3999 }
4000 }
4001 }
4002 return dispatcher.useContext(Context, unstable_observedBits);
4003}
4004
4005function useState(initialState) {
4006 var dispatcher = resolveDispatcher();
4007 return dispatcher.useState(initialState);
4008}
4009
4010function useReducer(reducer, initialArg, init) {
4011 var dispatcher = resolveDispatcher();
4012 return dispatcher.useReducer(reducer, initialArg, init);
4013}
4014
4015function useRef(initialValue) {
4016 var dispatcher = resolveDispatcher();
4017 return dispatcher.useRef(initialValue);
4018}
4019
4020function useEffect(create, inputs) {
4021 var dispatcher = resolveDispatcher();
4022 return dispatcher.useEffect(create, inputs);
4023}
4024
4025function useLayoutEffect(create, inputs) {
4026 var dispatcher = resolveDispatcher();
4027 return dispatcher.useLayoutEffect(create, inputs);
4028}
4029
4030function useCallback(callback, inputs) {
4031 var dispatcher = resolveDispatcher();
4032 return dispatcher.useCallback(callback, inputs);
4033}
4034
4035function useMemo(create, inputs) {
4036 var dispatcher = resolveDispatcher();
4037 return dispatcher.useMemo(create, inputs);
4038}
4039
4040function useImperativeHandle(ref, create, inputs) {
4041 var dispatcher = resolveDispatcher();
4042 return dispatcher.useImperativeHandle(ref, create, inputs);
4043}
4044
4045function useDebugValue(value, formatterFn) {
4046 {
4047 var dispatcher = resolveDispatcher();
4048 return dispatcher.useDebugValue(value, formatterFn);
4049 }
4050}
4051
4052/**
4053 * ReactElementValidator provides a wrapper around a element factory
4054 * which validates the props passed to the element. This is intended to be
4055 * used only in DEV and could be replaced by a static type checker for languages
4056 * that support it.
4057 */
4058
4059var propTypesMisspellWarningShown = void 0;
4060
4061{
4062 propTypesMisspellWarningShown = false;
4063}
4064
4065function getDeclarationErrorAddendum() {
4066 if (ReactCurrentOwner.current) {
4067 var name = getComponentName(ReactCurrentOwner.current.type);
4068 if (name) {
4069 return '\n\nCheck the render method of `' + name + '`.';
4070 }
4071 }
4072 return '';
4073}
4074
4075function getSourceInfoErrorAddendum(elementProps) {
4076 if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
4077 var source = elementProps.__source;
4078 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
4079 var lineNumber = source.lineNumber;
4080 return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
4081 }
4082 return '';
4083}
4084
4085/**
4086 * Warn if there's no key explicitly set on dynamic arrays of children or
4087 * object keys are not valid. This allows us to keep track of children between
4088 * updates.
4089 */
4090var ownerHasKeyUseWarning = {};
4091
4092function getCurrentComponentErrorInfo(parentType) {
4093 var info = getDeclarationErrorAddendum();
4094
4095 if (!info) {
4096 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
4097 if (parentName) {
4098 info = '\n\nCheck the top-level render call using <' + parentName + '>.';
4099 }
4100 }
4101 return info;
4102}
4103
4104/**
4105 * Warn if the element doesn't have an explicit key assigned to it.
4106 * This element is in an array. The array could grow and shrink or be
4107 * reordered. All children that haven't already been validated are required to
4108 * have a "key" property assigned to it. Error statuses are cached so a warning
4109 * will only be shown once.
4110 *
4111 * @internal
4112 * @param {ReactElement} element Element that requires a key.
4113 * @param {*} parentType element's parent's type.
4114 */
4115function validateExplicitKey(element, parentType) {
4116 if (!element._store || element._store.validated || element.key != null) {
4117 return;
4118 }
4119 element._store.validated = true;
4120
4121 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
4122 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
4123 return;
4124 }
4125 ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
4126
4127 // Usually the current owner is the offender, but if it accepts children as a
4128 // property, it may be the creator of the child that's responsible for
4129 // assigning it a key.
4130 var childOwner = '';
4131 if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
4132 // Give the component that originally created this child.
4133 childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.';
4134 }
4135
4136 setCurrentlyValidatingElement(element);
4137 {
4138 warning$1(false, 'Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
4139 }
4140 setCurrentlyValidatingElement(null);
4141}
4142
4143/**
4144 * Ensure that every element either is passed in a static location, in an
4145 * array with an explicit keys property defined, or in an object literal
4146 * with valid key property.
4147 *
4148 * @internal
4149 * @param {ReactNode} node Statically passed child of any type.
4150 * @param {*} parentType node's parent's type.
4151 */
4152function validateChildKeys(node, parentType) {
4153 if (typeof node !== 'object') {
4154 return;
4155 }
4156 if (Array.isArray(node)) {
4157 for (var i = 0; i < node.length; i++) {
4158 var child = node[i];
4159 if (isValidElement(child)) {
4160 validateExplicitKey(child, parentType);
4161 }
4162 }
4163 } else if (isValidElement(node)) {
4164 // This element was passed in a valid location.
4165 if (node._store) {
4166 node._store.validated = true;
4167 }
4168 } else if (node) {
4169 var iteratorFn = getIteratorFn(node);
4170 if (typeof iteratorFn === 'function') {
4171 // Entry iterators used to provide implicit keys,
4172 // but now we print a separate warning for them later.
4173 if (iteratorFn !== node.entries) {
4174 var iterator = iteratorFn.call(node);
4175 var step = void 0;
4176 while (!(step = iterator.next()).done) {
4177 if (isValidElement(step.value)) {
4178 validateExplicitKey(step.value, parentType);
4179 }
4180 }
4181 }
4182 }
4183 }
4184}
4185
4186/**
4187 * Given an element, validate that its props follow the propTypes definition,
4188 * provided by the type.
4189 *
4190 * @param {ReactElement} element
4191 */
4192function validatePropTypes(element) {
4193 var type = element.type;
4194 if (type === null || type === undefined || typeof type === 'string') {
4195 return;
4196 }
4197 var name = getComponentName(type);
4198 var propTypes = void 0;
4199 if (typeof type === 'function') {
4200 propTypes = type.propTypes;
4201 } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE ||
4202 // Note: Memo only checks outer props here.
4203 // Inner props are checked in the reconciler.
4204 type.$$typeof === REACT_MEMO_TYPE)) {
4205 propTypes = type.propTypes;
4206 } else {
4207 return;
4208 }
4209 if (propTypes) {
4210 setCurrentlyValidatingElement(element);
4211 checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
4212 setCurrentlyValidatingElement(null);
4213 } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
4214 propTypesMisspellWarningShown = true;
4215 warningWithoutStack$1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
4216 }
4217 if (typeof type.getDefaultProps === 'function') {
4218 !type.getDefaultProps.isReactClassApproved ? warningWithoutStack$1(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
4219 }
4220}
4221
4222/**
4223 * Given a fragment, validate that it can only be provided with fragment props
4224 * @param {ReactElement} fragment
4225 */
4226function validateFragmentProps(fragment) {
4227 setCurrentlyValidatingElement(fragment);
4228
4229 var keys = Object.keys(fragment.props);
4230 for (var i = 0; i < keys.length; i++) {
4231 var key = keys[i];
4232 if (key !== 'children' && key !== 'key') {
4233 warning$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
4234 break;
4235 }
4236 }
4237
4238 if (fragment.ref !== null) {
4239 warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.');
4240 }
4241
4242 setCurrentlyValidatingElement(null);
4243}
4244
4245function createElementWithValidation(type, props, children) {
4246 var validType = isValidElementType(type);
4247
4248 // We warn in this case but don't throw. We expect the element creation to
4249 // succeed and there will likely be errors in render.
4250 if (!validType) {
4251 var info = '';
4252 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
4253 info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
4254 }
4255
4256 var sourceInfo = getSourceInfoErrorAddendum(props);
4257 if (sourceInfo) {
4258 info += sourceInfo;
4259 } else {
4260 info += getDeclarationErrorAddendum();
4261 }
4262
4263 var typeString = void 0;
4264 if (type === null) {
4265 typeString = 'null';
4266 } else if (Array.isArray(type)) {
4267 typeString = 'array';
4268 } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
4269 typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />';
4270 info = ' Did you accidentally export a JSX literal instead of a component?';
4271 } else {
4272 typeString = typeof type;
4273 }
4274
4275 warning$1(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
4276 }
4277
4278 var element = createElement.apply(this, arguments);
4279
4280 // The result can be nullish if a mock or a custom function is used.
4281 // TODO: Drop this when these are no longer allowed as the type argument.
4282 if (element == null) {
4283 return element;
4284 }
4285
4286 // Skip key warning if the type isn't valid since our key validation logic
4287 // doesn't expect a non-string/function type and can throw confusing errors.
4288 // We don't want exception behavior to differ between dev and prod.
4289 // (Rendering will throw with a helpful message and as soon as the type is
4290 // fixed, the key warnings will appear.)
4291 if (validType) {
4292 for (var i = 2; i < arguments.length; i++) {
4293 validateChildKeys(arguments[i], type);
4294 }
4295 }
4296
4297 if (type === REACT_FRAGMENT_TYPE) {
4298 validateFragmentProps(element);
4299 } else {
4300 validatePropTypes(element);
4301 }
4302
4303 return element;
4304}
4305
4306function createFactoryWithValidation(type) {
4307 var validatedFactory = createElementWithValidation.bind(null, type);
4308 validatedFactory.type = type;
4309 // Legacy hook: remove it
4310 {
4311 Object.defineProperty(validatedFactory, 'type', {
4312 enumerable: false,
4313 get: function () {
4314 lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
4315 Object.defineProperty(this, 'type', {
4316 value: type
4317 });
4318 return type;
4319 }
4320 });
4321 }
4322
4323 return validatedFactory;
4324}
4325
4326function cloneElementWithValidation(element, props, children) {
4327 var newElement = cloneElement.apply(this, arguments);
4328 for (var i = 2; i < arguments.length; i++) {
4329 validateChildKeys(arguments[i], newElement.type);
4330 }
4331 validatePropTypes(newElement);
4332 return newElement;
4333}
4334
4335// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
4336
4337
4338// In some cases, StrictMode should also double-render lifecycles.
4339// This can be confusing for tests though,
4340// And it can be bad for performance in production.
4341// This feature flag can be used to control the behavior:
4342
4343
4344// To preserve the "Pause on caught exceptions" behavior of the debugger, we
4345// replay the begin phase of a failed component inside invokeGuardedCallback.
4346
4347
4348// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
4349
4350
4351// Gather advanced timing metrics for Profiler subtrees.
4352
4353
4354// Trace which interactions trigger each commit.
4355
4356
4357// Only used in www builds.
4358 // TODO: true? Here it might just be false.
4359
4360// Only used in www builds.
4361
4362
4363// Only used in www builds.
4364
4365
4366// React Fire: prevent the value and checked attributes from syncing
4367// with their related DOM properties
4368
4369
4370// These APIs will no longer be "unstable" in the upcoming 16.7 release,
4371// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
4372var enableStableConcurrentModeAPIs = false;
4373
4374var React = {
4375 Children: {
4376 map: mapChildren,
4377 forEach: forEachChildren,
4378 count: countChildren,
4379 toArray: toArray,
4380 only: onlyChild
4381 },
4382
4383 createRef: createRef,
4384 Component: Component,
4385 PureComponent: PureComponent,
4386
4387 createContext: createContext,
4388 forwardRef: forwardRef,
4389 lazy: lazy,
4390 memo: memo,
4391
4392 useCallback: useCallback,
4393 useContext: useContext,
4394 useEffect: useEffect,
4395 useImperativeHandle: useImperativeHandle,
4396 useDebugValue: useDebugValue,
4397 useLayoutEffect: useLayoutEffect,
4398 useMemo: useMemo,
4399 useReducer: useReducer,
4400 useRef: useRef,
4401 useState: useState,
4402
4403 Fragment: REACT_FRAGMENT_TYPE,
4404 StrictMode: REACT_STRICT_MODE_TYPE,
4405 Suspense: REACT_SUSPENSE_TYPE,
4406
4407 createElement: createElementWithValidation,
4408 cloneElement: cloneElementWithValidation,
4409 createFactory: createFactoryWithValidation,
4410 isValidElement: isValidElement,
4411
4412 version: ReactVersion,
4413
4414 unstable_ConcurrentMode: REACT_CONCURRENT_MODE_TYPE,
4415 unstable_Profiler: REACT_PROFILER_TYPE,
4416
4417 __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals
4418};
4419
4420// Note: some APIs are added with feature flags.
4421// Make sure that stable builds for open source
4422// don't modify the React object to avoid deopts.
4423// Also let's not expose their names in stable builds.
4424
4425if (enableStableConcurrentModeAPIs) {
4426 React.ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
4427 React.Profiler = REACT_PROFILER_TYPE;
4428 React.unstable_ConcurrentMode = undefined;
4429 React.unstable_Profiler = undefined;
4430}
4431
4432
4433
4434var React$2 = Object.freeze({
4435 default: React
4436});
4437
4438var React$3 = ( React$2 && React ) || React$2;
4439
4440// TODO: decide on the top-level export form.
4441// This is hacky but makes it work with both Rollup and Jest.
4442var react = React$3.default || React$3;
4443
4444module.exports = react;
4445 })();
4446}
4447
4448/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
4449
4450/***/ }),
4451/* 19 */
4452/***/ (function(module, __webpack_exports__, __webpack_require__) {
4453
4454"use strict";
4455Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
4456/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemoryRouter__ = __webpack_require__(20);
4457/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MemoryRouter", function() { return __WEBPACK_IMPORTED_MODULE_0__MemoryRouter__["a"]; });
4458/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Prompt__ = __webpack_require__(30);
4459/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Prompt", function() { return __WEBPACK_IMPORTED_MODULE_1__Prompt__["a"]; });
4460/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Redirect__ = __webpack_require__(31);
4461/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_2__Redirect__["a"]; });
4462/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(14);
4463/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_3__Route__["a"]; });
4464/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(8);
4465/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_4__Router__["a"]; });
4466/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__StaticRouter__ = __webpack_require__(33);
4467/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "StaticRouter", function() { return __WEBPACK_IMPORTED_MODULE_5__StaticRouter__["a"]; });
4468/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Switch__ = __webpack_require__(34);
4469/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return __WEBPACK_IMPORTED_MODULE_6__Switch__["a"]; });
4470/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__generatePath__ = __webpack_require__(12);
4471/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "generatePath", function() { return __WEBPACK_IMPORTED_MODULE_7__generatePath__["a"]; });
4472/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__matchPath__ = __webpack_require__(9);
4473/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "matchPath", function() { return __WEBPACK_IMPORTED_MODULE_8__matchPath__["a"]; });
4474/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__withRouter__ = __webpack_require__(35);
4475/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return __WEBPACK_IMPORTED_MODULE_9__withRouter__["a"]; });
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497/***/ }),
4498/* 20 */
4499/***/ (function(module, __webpack_exports__, __webpack_require__) {
4500
4501"use strict";
4502/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);
4503/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
4504/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1);
4505/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
4506/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(2);
4507/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
4508/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(7);
4509/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(8);
4510function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4511
4512function _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; }
4513
4514function _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; }
4515
4516
4517
4518
4519
4520
4521
4522/**
4523 * The public API for a <Router> that stores location in memory.
4524 */
4525
4526var MemoryRouter = function (_React$Component) {
4527 _inherits(MemoryRouter, _React$Component);
4528
4529 function MemoryRouter() {
4530 var _temp, _this, _ret;
4531
4532 _classCallCheck(this, MemoryRouter);
4533
4534 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
4535 args[_key] = arguments[_key];
4536 }
4537
4538 return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = Object(__WEBPACK_IMPORTED_MODULE_3_history__["b" /* createMemoryHistory */])(_this.props), _temp), _possibleConstructorReturn(_this, _ret);
4539 }
4540
4541 MemoryRouter.prototype.componentWillMount = function componentWillMount() {
4542 __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, "<MemoryRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { MemoryRouter as Router }`.");
4543 };
4544
4545 MemoryRouter.prototype.render = function render() {
4546 return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__Router__["a" /* default */], { history: this.history, children: this.props.children });
4547 };
4548
4549 return MemoryRouter;
4550}(__WEBPACK_IMPORTED_MODULE_1_react___default.a.Component);
4551
4552MemoryRouter.propTypes = {
4553 initialEntries: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.array,
4554 initialIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,
4555 getUserConfirmation: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func,
4556 keyLength: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.number,
4557 children: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.node
4558};
4559
4560
4561/* harmony default export */ __webpack_exports__["a"] = (MemoryRouter);
4562
4563/***/ }),
4564/* 21 */
4565/***/ (function(module, exports, __webpack_require__) {
4566
4567"use strict";
4568/** @license React v16.8.6
4569 * react-is.production.min.js
4570 *
4571 * Copyright (c) Facebook, Inc. and its affiliates.
4572 *
4573 * This source code is licensed under the MIT license found in the
4574 * LICENSE file in the root directory of this source tree.
4575 */
4576
4577Object.defineProperty(exports,"__esModule",{value:!0});
4578var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.memo"):
457960115,r=b?Symbol.for("react.lazy"):60116;function t(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;
4580exports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||"object"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k};
4581exports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f};
4582exports.isSuspense=function(a){return t(a)===p};
4583
4584
4585/***/ }),
4586/* 22 */
4587/***/ (function(module, exports, __webpack_require__) {
4588
4589"use strict";
4590/* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.8.6
4591 * react-is.development.js
4592 *
4593 * Copyright (c) Facebook, Inc. and its affiliates.
4594 *
4595 * This source code is licensed under the MIT license found in the
4596 * LICENSE file in the root directory of this source tree.
4597 */
4598
4599
4600
4601
4602
4603if (process.env.NODE_ENV !== "production") {
4604 (function() {
4605'use strict';
4606
4607Object.defineProperty(exports, '__esModule', { value: true });
4608
4609// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
4610// nor polyfill, then a plain number is used for performance.
4611var hasSymbol = typeof Symbol === 'function' && Symbol.for;
4612
4613var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
4614var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
4615var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
4616var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
4617var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
4618var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
4619var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
4620var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
4621var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
4622var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
4623var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
4624var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
4625var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
4626
4627function isValidElementType(type) {
4628 return typeof type === 'string' || typeof type === 'function' ||
4629 // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
4630 type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
4631}
4632
4633/**
4634 * Forked from fbjs/warning:
4635 * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
4636 *
4637 * Only change is we use console.warn instead of console.error,
4638 * and do nothing when 'console' is not supported.
4639 * This really simplifies the code.
4640 * ---
4641 * Similar to invariant but only logs a warning if the condition is not met.
4642 * This can be used to log issues in development environments in critical
4643 * paths. Removing the logging code for production environments will keep the
4644 * same logic and follow the same code paths.
4645 */
4646
4647var lowPriorityWarning = function () {};
4648
4649{
4650 var printWarning = function (format) {
4651 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
4652 args[_key - 1] = arguments[_key];
4653 }
4654
4655 var argIndex = 0;
4656 var message = 'Warning: ' + format.replace(/%s/g, function () {
4657 return args[argIndex++];
4658 });
4659 if (typeof console !== 'undefined') {
4660 console.warn(message);
4661 }
4662 try {
4663 // --- Welcome to debugging React ---
4664 // This error was thrown as a convenience so that you can use this stack
4665 // to find the callsite that caused this warning to fire.
4666 throw new Error(message);
4667 } catch (x) {}
4668 };
4669
4670 lowPriorityWarning = function (condition, format) {
4671 if (format === undefined) {
4672 throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
4673 }
4674 if (!condition) {
4675 for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
4676 args[_key2 - 2] = arguments[_key2];
4677 }
4678
4679 printWarning.apply(undefined, [format].concat(args));
4680 }
4681 };
4682}
4683
4684var lowPriorityWarning$1 = lowPriorityWarning;
4685
4686function typeOf(object) {
4687 if (typeof object === 'object' && object !== null) {
4688 var $$typeof = object.$$typeof;
4689 switch ($$typeof) {
4690 case REACT_ELEMENT_TYPE:
4691 var type = object.type;
4692
4693 switch (type) {
4694 case REACT_ASYNC_MODE_TYPE:
4695 case REACT_CONCURRENT_MODE_TYPE:
4696 case REACT_FRAGMENT_TYPE:
4697 case REACT_PROFILER_TYPE:
4698 case REACT_STRICT_MODE_TYPE:
4699 case REACT_SUSPENSE_TYPE:
4700 return type;
4701 default:
4702 var $$typeofType = type && type.$$typeof;
4703
4704 switch ($$typeofType) {
4705 case REACT_CONTEXT_TYPE:
4706 case REACT_FORWARD_REF_TYPE:
4707 case REACT_PROVIDER_TYPE:
4708 return $$typeofType;
4709 default:
4710 return $$typeof;
4711 }
4712 }
4713 case REACT_LAZY_TYPE:
4714 case REACT_MEMO_TYPE:
4715 case REACT_PORTAL_TYPE:
4716 return $$typeof;
4717 }
4718 }
4719
4720 return undefined;
4721}
4722
4723// AsyncMode is deprecated along with isAsyncMode
4724var AsyncMode = REACT_ASYNC_MODE_TYPE;
4725var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
4726var ContextConsumer = REACT_CONTEXT_TYPE;
4727var ContextProvider = REACT_PROVIDER_TYPE;
4728var Element = REACT_ELEMENT_TYPE;
4729var ForwardRef = REACT_FORWARD_REF_TYPE;
4730var Fragment = REACT_FRAGMENT_TYPE;
4731var Lazy = REACT_LAZY_TYPE;
4732var Memo = REACT_MEMO_TYPE;
4733var Portal = REACT_PORTAL_TYPE;
4734var Profiler = REACT_PROFILER_TYPE;
4735var StrictMode = REACT_STRICT_MODE_TYPE;
4736var Suspense = REACT_SUSPENSE_TYPE;
4737
4738var hasWarnedAboutDeprecatedIsAsyncMode = false;
4739
4740// AsyncMode should be deprecated
4741function isAsyncMode(object) {
4742 {
4743 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
4744 hasWarnedAboutDeprecatedIsAsyncMode = true;
4745 lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
4746 }
4747 }
4748 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
4749}
4750function isConcurrentMode(object) {
4751 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
4752}
4753function isContextConsumer(object) {
4754 return typeOf(object) === REACT_CONTEXT_TYPE;
4755}
4756function isContextProvider(object) {
4757 return typeOf(object) === REACT_PROVIDER_TYPE;
4758}
4759function isElement(object) {
4760 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
4761}
4762function isForwardRef(object) {
4763 return typeOf(object) === REACT_FORWARD_REF_TYPE;
4764}
4765function isFragment(object) {
4766 return typeOf(object) === REACT_FRAGMENT_TYPE;
4767}
4768function isLazy(object) {
4769 return typeOf(object) === REACT_LAZY_TYPE;
4770}
4771function isMemo(object) {
4772 return typeOf(object) === REACT_MEMO_TYPE;
4773}
4774function isPortal(object) {
4775 return typeOf(object) === REACT_PORTAL_TYPE;
4776}
4777function isProfiler(object) {
4778 return typeOf(object) === REACT_PROFILER_TYPE;
4779}
4780function isStrictMode(object) {
4781 return typeOf(object) === REACT_STRICT_MODE_TYPE;
4782}
4783function isSuspense(object) {
4784 return typeOf(object) === REACT_SUSPENSE_TYPE;
4785}
4786
4787exports.typeOf = typeOf;
4788exports.AsyncMode = AsyncMode;
4789exports.ConcurrentMode = ConcurrentMode;
4790exports.ContextConsumer = ContextConsumer;
4791exports.ContextProvider = ContextProvider;
4792exports.Element = Element;
4793exports.ForwardRef = ForwardRef;
4794exports.Fragment = Fragment;
4795exports.Lazy = Lazy;
4796exports.Memo = Memo;
4797exports.Portal = Portal;
4798exports.Profiler = Profiler;
4799exports.StrictMode = StrictMode;
4800exports.Suspense = Suspense;
4801exports.isValidElementType = isValidElementType;
4802exports.isAsyncMode = isAsyncMode;
4803exports.isConcurrentMode = isConcurrentMode;
4804exports.isContextConsumer = isContextConsumer;
4805exports.isContextProvider = isContextProvider;
4806exports.isElement = isElement;
4807exports.isForwardRef = isForwardRef;
4808exports.isFragment = isFragment;
4809exports.isLazy = isLazy;
4810exports.isMemo = isMemo;
4811exports.isPortal = isPortal;
4812exports.isProfiler = isProfiler;
4813exports.isStrictMode = isStrictMode;
4814exports.isSuspense = isSuspense;
4815 })();
4816}
4817
4818/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
4819
4820/***/ }),
4821/* 23 */
4822/***/ (function(module, exports, __webpack_require__) {
4823
4824"use strict";
4825/* WEBPACK VAR INJECTION */(function(process) {/**
4826 * Copyright (c) 2013-present, Facebook, Inc.
4827 *
4828 * This source code is licensed under the MIT license found in the
4829 * LICENSE file in the root directory of this source tree.
4830 */
4831
4832
4833
4834var ReactIs = __webpack_require__(11);
4835var assign = __webpack_require__(5);
4836
4837var ReactPropTypesSecret = __webpack_require__(6);
4838var checkPropTypes = __webpack_require__(10);
4839
4840var has = Function.call.bind(Object.prototype.hasOwnProperty);
4841var printWarning = function() {};
4842
4843if (process.env.NODE_ENV !== 'production') {
4844 printWarning = function(text) {
4845 var message = 'Warning: ' + text;
4846 if (typeof console !== 'undefined') {
4847 console.error(message);
4848 }
4849 try {
4850 // --- Welcome to debugging React ---
4851 // This error was thrown as a convenience so that you can use this stack
4852 // to find the callsite that caused this warning to fire.
4853 throw new Error(message);
4854 } catch (x) {}
4855 };
4856}
4857
4858function emptyFunctionThatReturnsNull() {
4859 return null;
4860}
4861
4862module.exports = function(isValidElement, throwOnDirectAccess) {
4863 /* global Symbol */
4864 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
4865 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
4866
4867 /**
4868 * Returns the iterator method function contained on the iterable object.
4869 *
4870 * Be sure to invoke the function with the iterable as context:
4871 *
4872 * var iteratorFn = getIteratorFn(myIterable);
4873 * if (iteratorFn) {
4874 * var iterator = iteratorFn.call(myIterable);
4875 * ...
4876 * }
4877 *
4878 * @param {?object} maybeIterable
4879 * @return {?function}
4880 */
4881 function getIteratorFn(maybeIterable) {
4882 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
4883 if (typeof iteratorFn === 'function') {
4884 return iteratorFn;
4885 }
4886 }
4887
4888 /**
4889 * Collection of methods that allow declaration and validation of props that are
4890 * supplied to React components. Example usage:
4891 *
4892 * var Props = require('ReactPropTypes');
4893 * var MyArticle = React.createClass({
4894 * propTypes: {
4895 * // An optional string prop named "description".
4896 * description: Props.string,
4897 *
4898 * // A required enum prop named "category".
4899 * category: Props.oneOf(['News','Photos']).isRequired,
4900 *
4901 * // A prop named "dialog" that requires an instance of Dialog.
4902 * dialog: Props.instanceOf(Dialog).isRequired
4903 * },
4904 * render: function() { ... }
4905 * });
4906 *
4907 * A more formal specification of how these methods are used:
4908 *
4909 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
4910 * decl := ReactPropTypes.{type}(.isRequired)?
4911 *
4912 * Each and every declaration produces a function with the same signature. This
4913 * allows the creation of custom validation functions. For example:
4914 *
4915 * var MyLink = React.createClass({
4916 * propTypes: {
4917 * // An optional string or URI prop named "href".
4918 * href: function(props, propName, componentName) {
4919 * var propValue = props[propName];
4920 * if (propValue != null && typeof propValue !== 'string' &&
4921 * !(propValue instanceof URI)) {
4922 * return new Error(
4923 * 'Expected a string or an URI for ' + propName + ' in ' +
4924 * componentName
4925 * );
4926 * }
4927 * }
4928 * },
4929 * render: function() {...}
4930 * });
4931 *
4932 * @internal
4933 */
4934
4935 var ANONYMOUS = '<<anonymous>>';
4936
4937 // Important!
4938 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
4939 var ReactPropTypes = {
4940 array: createPrimitiveTypeChecker('array'),
4941 bool: createPrimitiveTypeChecker('boolean'),
4942 func: createPrimitiveTypeChecker('function'),
4943 number: createPrimitiveTypeChecker('number'),
4944 object: createPrimitiveTypeChecker('object'),
4945 string: createPrimitiveTypeChecker('string'),
4946 symbol: createPrimitiveTypeChecker('symbol'),
4947
4948 any: createAnyTypeChecker(),
4949 arrayOf: createArrayOfTypeChecker,
4950 element: createElementTypeChecker(),
4951 elementType: createElementTypeTypeChecker(),
4952 instanceOf: createInstanceTypeChecker,
4953 node: createNodeChecker(),
4954 objectOf: createObjectOfTypeChecker,
4955 oneOf: createEnumTypeChecker,
4956 oneOfType: createUnionTypeChecker,
4957 shape: createShapeTypeChecker,
4958 exact: createStrictShapeTypeChecker,
4959 };
4960
4961 /**
4962 * inlined Object.is polyfill to avoid requiring consumers ship their own
4963 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
4964 */
4965 /*eslint-disable no-self-compare*/
4966 function is(x, y) {
4967 // SameValue algorithm
4968 if (x === y) {
4969 // Steps 1-5, 7-10
4970 // Steps 6.b-6.e: +0 != -0
4971 return x !== 0 || 1 / x === 1 / y;
4972 } else {
4973 // Step 6.a: NaN == NaN
4974 return x !== x && y !== y;
4975 }
4976 }
4977 /*eslint-enable no-self-compare*/
4978
4979 /**
4980 * We use an Error-like object for backward compatibility as people may call
4981 * PropTypes directly and inspect their output. However, we don't use real
4982 * Errors anymore. We don't inspect their stack anyway, and creating them
4983 * is prohibitively expensive if they are created too often, such as what
4984 * happens in oneOfType() for any type before the one that matched.
4985 */
4986 function PropTypeError(message) {
4987 this.message = message;
4988 this.stack = '';
4989 }
4990 // Make `instanceof Error` still work for returned errors.
4991 PropTypeError.prototype = Error.prototype;
4992
4993 function createChainableTypeChecker(validate) {
4994 if (process.env.NODE_ENV !== 'production') {
4995 var manualPropTypeCallCache = {};
4996 var manualPropTypeWarningCount = 0;
4997 }
4998 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
4999 componentName = componentName || ANONYMOUS;
5000 propFullName = propFullName || propName;
5001
5002 if (secret !== ReactPropTypesSecret) {
5003 if (throwOnDirectAccess) {
5004 // New behavior only for users of `prop-types` package
5005 var err = new Error(
5006 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
5007 'Use `PropTypes.checkPropTypes()` to call them. ' +
5008 'Read more at http://fb.me/use-check-prop-types'
5009 );
5010 err.name = 'Invariant Violation';
5011 throw err;
5012 } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
5013 // Old behavior for people using React.PropTypes
5014 var cacheKey = componentName + ':' + propName;
5015 if (
5016 !manualPropTypeCallCache[cacheKey] &&
5017 // Avoid spamming the console because they are often not actionable except for lib authors
5018 manualPropTypeWarningCount < 3
5019 ) {
5020 printWarning(
5021 'You are manually calling a React.PropTypes validation ' +
5022 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
5023 'and will throw in the standalone `prop-types` package. ' +
5024 'You may be seeing this warning due to a third-party PropTypes ' +
5025 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
5026 );
5027 manualPropTypeCallCache[cacheKey] = true;
5028 manualPropTypeWarningCount++;
5029 }
5030 }
5031 }
5032 if (props[propName] == null) {
5033 if (isRequired) {
5034 if (props[propName] === null) {
5035 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
5036 }
5037 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
5038 }
5039 return null;
5040 } else {
5041 return validate(props, propName, componentName, location, propFullName);
5042 }
5043 }
5044
5045 var chainedCheckType = checkType.bind(null, false);
5046 chainedCheckType.isRequired = checkType.bind(null, true);
5047
5048 return chainedCheckType;
5049 }
5050
5051 function createPrimitiveTypeChecker(expectedType) {
5052 function validate(props, propName, componentName, location, propFullName, secret) {
5053 var propValue = props[propName];
5054 var propType = getPropType(propValue);
5055 if (propType !== expectedType) {
5056 // `propValue` being instance of, say, date/regexp, pass the 'object'
5057 // check, but we can offer a more precise error message here rather than
5058 // 'of type `object`'.
5059 var preciseType = getPreciseType(propValue);
5060
5061 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
5062 }
5063 return null;
5064 }
5065 return createChainableTypeChecker(validate);
5066 }
5067
5068 function createAnyTypeChecker() {
5069 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
5070 }
5071
5072 function createArrayOfTypeChecker(typeChecker) {
5073 function validate(props, propName, componentName, location, propFullName) {
5074 if (typeof typeChecker !== 'function') {
5075 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
5076 }
5077 var propValue = props[propName];
5078 if (!Array.isArray(propValue)) {
5079 var propType = getPropType(propValue);
5080 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
5081 }
5082 for (var i = 0; i < propValue.length; i++) {
5083 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
5084 if (error instanceof Error) {
5085 return error;
5086 }
5087 }
5088 return null;
5089 }
5090 return createChainableTypeChecker(validate);
5091 }
5092
5093 function createElementTypeChecker() {
5094 function validate(props, propName, componentName, location, propFullName) {
5095 var propValue = props[propName];
5096 if (!isValidElement(propValue)) {
5097 var propType = getPropType(propValue);
5098 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
5099 }
5100 return null;
5101 }
5102 return createChainableTypeChecker(validate);
5103 }
5104
5105 function createElementTypeTypeChecker() {
5106 function validate(props, propName, componentName, location, propFullName) {
5107 var propValue = props[propName];
5108 if (!ReactIs.isValidElementType(propValue)) {
5109 var propType = getPropType(propValue);
5110 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
5111 }
5112 return null;
5113 }
5114 return createChainableTypeChecker(validate);
5115 }
5116
5117 function createInstanceTypeChecker(expectedClass) {
5118 function validate(props, propName, componentName, location, propFullName) {
5119 if (!(props[propName] instanceof expectedClass)) {
5120 var expectedClassName = expectedClass.name || ANONYMOUS;
5121 var actualClassName = getClassName(props[propName]);
5122 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
5123 }
5124 return null;
5125 }
5126 return createChainableTypeChecker(validate);
5127 }
5128
5129 function createEnumTypeChecker(expectedValues) {
5130 if (!Array.isArray(expectedValues)) {
5131 if (process.env.NODE_ENV !== 'production') {
5132 if (arguments.length > 1) {
5133 printWarning(
5134 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
5135 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
5136 );
5137 } else {
5138 printWarning('Invalid argument supplied to oneOf, expected an array.');
5139 }
5140 }
5141 return emptyFunctionThatReturnsNull;
5142 }
5143
5144 function validate(props, propName, componentName, location, propFullName) {
5145 var propValue = props[propName];
5146 for (var i = 0; i < expectedValues.length; i++) {
5147 if (is(propValue, expectedValues[i])) {
5148 return null;
5149 }
5150 }
5151
5152 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
5153 var type = getPreciseType(value);
5154 if (type === 'symbol') {
5155 return String(value);
5156 }
5157 return value;
5158 });
5159 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
5160 }
5161 return createChainableTypeChecker(validate);
5162 }
5163
5164 function createObjectOfTypeChecker(typeChecker) {
5165 function validate(props, propName, componentName, location, propFullName) {
5166 if (typeof typeChecker !== 'function') {
5167 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
5168 }
5169 var propValue = props[propName];
5170 var propType = getPropType(propValue);
5171 if (propType !== 'object') {
5172 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
5173 }
5174 for (var key in propValue) {
5175 if (has(propValue, key)) {
5176 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5177 if (error instanceof Error) {
5178 return error;
5179 }
5180 }
5181 }
5182 return null;
5183 }
5184 return createChainableTypeChecker(validate);
5185 }
5186
5187 function createUnionTypeChecker(arrayOfTypeCheckers) {
5188 if (!Array.isArray(arrayOfTypeCheckers)) {
5189 process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
5190 return emptyFunctionThatReturnsNull;
5191 }
5192
5193 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5194 var checker = arrayOfTypeCheckers[i];
5195 if (typeof checker !== 'function') {
5196 printWarning(
5197 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
5198 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
5199 );
5200 return emptyFunctionThatReturnsNull;
5201 }
5202 }
5203
5204 function validate(props, propName, componentName, location, propFullName) {
5205 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5206 var checker = arrayOfTypeCheckers[i];
5207 if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
5208 return null;
5209 }
5210 }
5211
5212 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
5213 }
5214 return createChainableTypeChecker(validate);
5215 }
5216
5217 function createNodeChecker() {
5218 function validate(props, propName, componentName, location, propFullName) {
5219 if (!isNode(props[propName])) {
5220 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
5221 }
5222 return null;
5223 }
5224 return createChainableTypeChecker(validate);
5225 }
5226
5227 function createShapeTypeChecker(shapeTypes) {
5228 function validate(props, propName, componentName, location, propFullName) {
5229 var propValue = props[propName];
5230 var propType = getPropType(propValue);
5231 if (propType !== 'object') {
5232 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5233 }
5234 for (var key in shapeTypes) {
5235 var checker = shapeTypes[key];
5236 if (!checker) {
5237 continue;
5238 }
5239 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5240 if (error) {
5241 return error;
5242 }
5243 }
5244 return null;
5245 }
5246 return createChainableTypeChecker(validate);
5247 }
5248
5249 function createStrictShapeTypeChecker(shapeTypes) {
5250 function validate(props, propName, componentName, location, propFullName) {
5251 var propValue = props[propName];
5252 var propType = getPropType(propValue);
5253 if (propType !== 'object') {
5254 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5255 }
5256 // We need to check all keys in case some are required but missing from
5257 // props.
5258 var allKeys = assign({}, props[propName], shapeTypes);
5259 for (var key in allKeys) {
5260 var checker = shapeTypes[key];
5261 if (!checker) {
5262 return new PropTypeError(
5263 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
5264 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
5265 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
5266 );
5267 }
5268 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5269 if (error) {
5270 return error;
5271 }
5272 }
5273 return null;
5274 }
5275
5276 return createChainableTypeChecker(validate);
5277 }
5278
5279 function isNode(propValue) {
5280 switch (typeof propValue) {
5281 case 'number':
5282 case 'string':
5283 case 'undefined':
5284 return true;
5285 case 'boolean':
5286 return !propValue;
5287 case 'object':
5288 if (Array.isArray(propValue)) {
5289 return propValue.every(isNode);
5290 }
5291 if (propValue === null || isValidElement(propValue)) {
5292 return true;
5293 }
5294
5295 var iteratorFn = getIteratorFn(propValue);
5296 if (iteratorFn) {
5297 var iterator = iteratorFn.call(propValue);
5298 var step;
5299 if (iteratorFn !== propValue.entries) {
5300 while (!(step = iterator.next()).done) {
5301 if (!isNode(step.value)) {
5302 return false;
5303 }
5304 }
5305 } else {
5306 // Iterator will provide entry [k,v] tuples rather than values.
5307 while (!(step = iterator.next()).done) {
5308 var entry = step.value;
5309 if (entry) {
5310 if (!isNode(entry[1])) {
5311 return false;
5312 }
5313 }
5314 }
5315 }
5316 } else {
5317 return false;
5318 }
5319
5320 return true;
5321 default:
5322 return false;
5323 }
5324 }
5325
5326 function isSymbol(propType, propValue) {
5327 // Native Symbol.
5328 if (propType === 'symbol') {
5329 return true;
5330 }
5331
5332 // falsy value can't be a Symbol
5333 if (!propValue) {
5334 return false;
5335 }
5336
5337 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
5338 if (propValue['@@toStringTag'] === 'Symbol') {
5339 return true;
5340 }
5341
5342 // Fallback for non-spec compliant Symbols which are polyfilled.
5343 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
5344 return true;
5345 }
5346
5347 return false;
5348 }
5349
5350 // Equivalent of `typeof` but with special handling for array and regexp.
5351 function getPropType(propValue) {
5352 var propType = typeof propValue;
5353 if (Array.isArray(propValue)) {
5354 return 'array';
5355 }
5356 if (propValue instanceof RegExp) {
5357 // Old webkits (at least until Android 4.0) return 'function' rather than
5358 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
5359 // passes PropTypes.object.
5360 return 'object';
5361 }
5362 if (isSymbol(propType, propValue)) {
5363 return 'symbol';
5364 }
5365 return propType;
5366 }
5367
5368 // This handles more types than `getPropType`. Only used for error messages.
5369 // See `createPrimitiveTypeChecker`.
5370 function getPreciseType(propValue) {
5371 if (typeof propValue === 'undefined' || propValue === null) {
5372 return '' + propValue;
5373 }
5374 var propType = getPropType(propValue);
5375 if (propType === 'object') {
5376 if (propValue instanceof Date) {
5377 return 'date';
5378 } else if (propValue instanceof RegExp) {
5379 return 'regexp';
5380 }
5381 }
5382 return propType;
5383 }
5384
5385 // Returns a string that is postfixed to a warning about an invalid type.
5386 // For example, "undefined" or "of type array"
5387 function getPostfixForTypeWarning(value) {
5388 var type = getPreciseType(value);
5389 switch (type) {
5390 case 'array':
5391 case 'object':
5392 return 'an ' + type;
5393 case 'boolean':
5394 case 'date':
5395 case 'regexp':
5396 return 'a ' + type;
5397 default:
5398 return type;
5399 }
5400 }
5401
5402 // Returns class name of the object, if any.
5403 function getClassName(propValue) {
5404 if (!propValue.constructor || !propValue.constructor.name) {
5405 return ANONYMOUS;
5406 }
5407 return propValue.constructor.name;
5408 }
5409
5410 ReactPropTypes.checkPropTypes = checkPropTypes;
5411 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
5412 ReactPropTypes.PropTypes = ReactPropTypes;
5413
5414 return ReactPropTypes;
5415};
5416
5417/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
5418
5419/***/ }),
5420/* 24 */
5421/***/ (function(module, exports, __webpack_require__) {
5422
5423"use strict";
5424/**
5425 * Copyright (c) 2013-present, Facebook, Inc.
5426 *
5427 * This source code is licensed under the MIT license found in the
5428 * LICENSE file in the root directory of this source tree.
5429 */
5430
5431
5432
5433var ReactPropTypesSecret = __webpack_require__(6);
5434
5435function emptyFunction() {}
5436function emptyFunctionWithReset() {}
5437emptyFunctionWithReset.resetWarningCache = emptyFunction;
5438
5439module.exports = function() {
5440 function shim(props, propName, componentName, location, propFullName, secret) {
5441 if (secret === ReactPropTypesSecret) {
5442 // It is still safe when called from React.
5443 return;
5444 }
5445 var err = new Error(
5446 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
5447 'Use PropTypes.checkPropTypes() to call them. ' +
5448 'Read more at http://fb.me/use-check-prop-types'
5449 );
5450 err.name = 'Invariant Violation';
5451 throw err;
5452 };
5453 shim.isRequired = shim;
5454 function getShim() {
5455 return shim;
5456 };
5457 // Important!
5458 // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
5459 var ReactPropTypes = {
5460 array: shim,
5461 bool: shim,
5462 func: shim,
5463 number: shim,
5464 object: shim,
5465 string: shim,
5466 symbol: shim,
5467
5468 any: shim,
5469 arrayOf: getShim,
5470 element: shim,
5471 elementType: shim,
5472 instanceOf: getShim,
5473 node: shim,
5474 objectOf: getShim,
5475 oneOf: getShim,
5476 oneOfType: getShim,
5477 shape: getShim,
5478 exact: getShim,
5479
5480 checkPropTypes: emptyFunctionWithReset,
5481 resetWarningCache: emptyFunction
5482 };
5483
5484 ReactPropTypes.PropTypes = ReactPropTypes;
5485
5486 return ReactPropTypes;
5487};
5488
5489
5490/***/ }),
5491/* 25 */
5492/***/ (function(module, __webpack_exports__, __webpack_require__) {
5493
5494"use strict";
5495/* harmony export (immutable) */ __webpack_exports__["a"] = _extends;
5496function _extends() {
5497 _extends = Object.assign || function (target) {
5498 for (var i = 1; i < arguments.length; i++) {
5499 var source = arguments[i];
5500
5501 for (var key in source) {
5502 if (Object.prototype.hasOwnProperty.call(source, key)) {
5503 target[key] = source[key];
5504 }
5505 }
5506 }
5507
5508 return target;
5509 };
5510
5511 return _extends.apply(this, arguments);
5512}
5513
5514/***/ }),
5515/* 26 */
5516/***/ (function(module, __webpack_exports__, __webpack_require__) {
5517
5518"use strict";
5519function isAbsolute(pathname) {
5520 return pathname.charAt(0) === '/';
5521}
5522
5523// About 1.5x faster than the two-arg version of Array#splice()
5524function spliceOne(list, index) {
5525 for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
5526 list[i] = list[k];
5527 }
5528
5529 list.pop();
5530}
5531
5532// This implementation is based heavily on node's url.parse
5533function resolvePathname(to) {
5534 var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
5535
5536 var toParts = to && to.split('/') || [];
5537 var fromParts = from && from.split('/') || [];
5538
5539 var isToAbs = to && isAbsolute(to);
5540 var isFromAbs = from && isAbsolute(from);
5541 var mustEndAbs = isToAbs || isFromAbs;
5542
5543 if (to && isAbsolute(to)) {
5544 // to is absolute
5545 fromParts = toParts;
5546 } else if (toParts.length) {
5547 // to is relative, drop the filename
5548 fromParts.pop();
5549 fromParts = fromParts.concat(toParts);
5550 }
5551
5552 if (!fromParts.length) return '/';
5553
5554 var hasTrailingSlash = void 0;
5555 if (fromParts.length) {
5556 var last = fromParts[fromParts.length - 1];
5557 hasTrailingSlash = last === '.' || last === '..' || last === '';
5558 } else {
5559 hasTrailingSlash = false;
5560 }
5561
5562 var up = 0;
5563 for (var i = fromParts.length; i >= 0; i--) {
5564 var part = fromParts[i];
5565
5566 if (part === '.') {
5567 spliceOne(fromParts, i);
5568 } else if (part === '..') {
5569 spliceOne(fromParts, i);
5570 up++;
5571 } else if (up) {
5572 spliceOne(fromParts, i);
5573 up--;
5574 }
5575 }
5576
5577 if (!mustEndAbs) for (; up--; up) {
5578 fromParts.unshift('..');
5579 }if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) fromParts.unshift('');
5580
5581 var result = fromParts.join('/');
5582
5583 if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';
5584
5585 return result;
5586}
5587
5588/* harmony default export */ __webpack_exports__["a"] = (resolvePathname);
5589
5590/***/ }),
5591/* 27 */
5592/***/ (function(module, __webpack_exports__, __webpack_require__) {
5593
5594"use strict";
5595var _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; };
5596
5597function valueEqual(a, b) {
5598 if (a === b) return true;
5599
5600 if (a == null || b == null) return false;
5601
5602 if (Array.isArray(a)) {
5603 return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {
5604 return valueEqual(item, b[index]);
5605 });
5606 }
5607
5608 var aType = typeof a === 'undefined' ? 'undefined' : _typeof(a);
5609 var bType = typeof b === 'undefined' ? 'undefined' : _typeof(b);
5610
5611 if (aType !== bType) return false;
5612
5613 if (aType === 'object') {
5614 var aValue = a.valueOf();
5615 var bValue = b.valueOf();
5616
5617 if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);
5618
5619 var aKeys = Object.keys(a);
5620 var bKeys = Object.keys(b);
5621
5622 if (aKeys.length !== bKeys.length) return false;
5623
5624 return aKeys.every(function (key) {
5625 return valueEqual(a[key], b[key]);
5626 });
5627 }
5628
5629 return false;
5630}
5631
5632/* harmony default export */ __webpack_exports__["a"] = (valueEqual);
5633
5634/***/ }),
5635/* 28 */
5636/***/ (function(module, __webpack_exports__, __webpack_require__) {
5637
5638"use strict";
5639/* WEBPACK VAR INJECTION */(function(process) {var isProduction = process.env.NODE_ENV === 'production';
5640function warning(condition, message) {
5641 if (!isProduction) {
5642 if (condition) {
5643 return;
5644 }
5645
5646 var text = "Warning: " + message;
5647
5648 if (typeof console !== 'undefined') {
5649 console.warn(text);
5650 }
5651
5652 try {
5653 throw Error(text);
5654 } catch (x) {}
5655 }
5656}
5657
5658/* harmony default export */ __webpack_exports__["a"] = (warning);
5659
5660/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(0)))
5661
5662/***/ }),
5663/* 29 */
5664/***/ (function(module, __webpack_exports__, __webpack_require__) {
5665
5666"use strict";
5667/* WEBPACK VAR INJECTION */(function(process) {var isProduction = process.env.NODE_ENV === 'production';
5668var prefix = 'Invariant failed';
5669function invariant(condition, message) {
5670 if (condition) {
5671 return;
5672 }
5673
5674 if (isProduction) {
5675 throw new Error(prefix);
5676 } else {
5677 throw new Error(prefix + ": " + (message || ''));
5678 }
5679}
5680
5681/* harmony default export */ __webpack_exports__["a"] = (invariant);
5682
5683/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(0)))
5684
5685/***/ }),
5686/* 30 */
5687/***/ (function(module, __webpack_exports__, __webpack_require__) {
5688
5689"use strict";
5690/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1);
5691/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
5692/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(2);
5693/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
5694/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(4);
5695/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
5696function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5697
5698function _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; }
5699
5700function _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; }
5701
5702
5703
5704
5705
5706/**
5707 * The public API for prompting the user before navigating away
5708 * from a screen with a component.
5709 */
5710
5711var Prompt = function (_React$Component) {
5712 _inherits(Prompt, _React$Component);
5713
5714 function Prompt() {
5715 _classCallCheck(this, Prompt);
5716
5717 return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
5718 }
5719
5720 Prompt.prototype.enable = function enable(message) {
5721 if (this.unblock) this.unblock();
5722
5723 this.unblock = this.context.router.history.block(message);
5724 };
5725
5726 Prompt.prototype.disable = function disable() {
5727 if (this.unblock) {
5728 this.unblock();
5729 this.unblock = null;
5730 }
5731 };
5732
5733 Prompt.prototype.componentWillMount = function componentWillMount() {
5734 __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.context.router, "You should not use <Prompt> outside a <Router>");
5735
5736 if (this.props.when) this.enable(this.props.message);
5737 };
5738
5739 Prompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
5740 if (nextProps.when) {
5741 if (!this.props.when || this.props.message !== nextProps.message) this.enable(nextProps.message);
5742 } else {
5743 this.disable();
5744 }
5745 };
5746
5747 Prompt.prototype.componentWillUnmount = function componentWillUnmount() {
5748 this.disable();
5749 };
5750
5751 Prompt.prototype.render = function render() {
5752 return null;
5753 };
5754
5755 return Prompt;
5756}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
5757
5758Prompt.propTypes = {
5759 when: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
5760 message: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired
5761};
5762Prompt.defaultProps = {
5763 when: true
5764};
5765Prompt.contextTypes = {
5766 router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
5767 history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
5768 block: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired
5769 }).isRequired
5770 }).isRequired
5771};
5772
5773
5774/* harmony default export */ __webpack_exports__["a"] = (Prompt);
5775
5776/***/ }),
5777/* 31 */
5778/***/ (function(module, __webpack_exports__, __webpack_require__) {
5779
5780"use strict";
5781/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1);
5782/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
5783/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(2);
5784/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
5785/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(3);
5786/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);
5787/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(4);
5788/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);
5789/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(7);
5790/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__generatePath__ = __webpack_require__(12);
5791var _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; };
5792
5793function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5794
5795function _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; }
5796
5797function _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; }
5798
5799
5800
5801
5802
5803
5804
5805
5806/**
5807 * The public API for updating the location programmatically
5808 * with a component.
5809 */
5810
5811var Redirect = function (_React$Component) {
5812 _inherits(Redirect, _React$Component);
5813
5814 function Redirect() {
5815 _classCallCheck(this, Redirect);
5816
5817 return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
5818 }
5819
5820 Redirect.prototype.isStatic = function isStatic() {
5821 return this.context.router && this.context.router.staticContext;
5822 };
5823
5824 Redirect.prototype.componentWillMount = function componentWillMount() {
5825 __WEBPACK_IMPORTED_MODULE_3_invariant___default()(this.context.router, "You should not use <Redirect> outside a <Router>");
5826
5827 if (this.isStatic()) this.perform();
5828 };
5829
5830 Redirect.prototype.componentDidMount = function componentDidMount() {
5831 if (!this.isStatic()) this.perform();
5832 };
5833
5834 Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
5835 var prevTo = Object(__WEBPACK_IMPORTED_MODULE_4_history__["a" /* createLocation */])(prevProps.to);
5836 var nextTo = Object(__WEBPACK_IMPORTED_MODULE_4_history__["a" /* createLocation */])(this.props.to);
5837
5838 if (Object(__WEBPACK_IMPORTED_MODULE_4_history__["d" /* locationsAreEqual */])(prevTo, nextTo)) {
5839 __WEBPACK_IMPORTED_MODULE_2_warning___default()(false, "You tried to redirect to the same route you're currently on: " + ("\"" + nextTo.pathname + nextTo.search + "\""));
5840 return;
5841 }
5842
5843 this.perform();
5844 };
5845
5846 Redirect.prototype.computeTo = function computeTo(_ref) {
5847 var computedMatch = _ref.computedMatch,
5848 to = _ref.to;
5849
5850 if (computedMatch) {
5851 if (typeof to === "string") {
5852 return Object(__WEBPACK_IMPORTED_MODULE_5__generatePath__["a" /* default */])(to, computedMatch.params);
5853 } else {
5854 return _extends({}, to, {
5855 pathname: Object(__WEBPACK_IMPORTED_MODULE_5__generatePath__["a" /* default */])(to.pathname, computedMatch.params)
5856 });
5857 }
5858 }
5859
5860 return to;
5861 };
5862
5863 Redirect.prototype.perform = function perform() {
5864 var history = this.context.router.history;
5865 var push = this.props.push;
5866
5867 var to = this.computeTo(this.props);
5868
5869 if (push) {
5870 history.push(to);
5871 } else {
5872 history.replace(to);
5873 }
5874 };
5875
5876 Redirect.prototype.render = function render() {
5877 return null;
5878 };
5879
5880 return Redirect;
5881}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
5882
5883Redirect.propTypes = {
5884 computedMatch: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object, // private, from <Switch>
5885 push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,
5886 from: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,
5887 to: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object]).isRequired
5888};
5889Redirect.defaultProps = {
5890 push: false
5891};
5892Redirect.contextTypes = {
5893 router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
5894 history: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
5895 push: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,
5896 replace: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired
5897 }).isRequired,
5898 staticContext: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
5899 }).isRequired
5900};
5901
5902
5903/* harmony default export */ __webpack_exports__["a"] = (Redirect);
5904
5905/***/ }),
5906/* 32 */
5907/***/ (function(module, exports) {
5908
5909module.exports = Array.isArray || function (arr) {
5910 return Object.prototype.toString.call(arr) == '[object Array]';
5911};
5912
5913
5914/***/ }),
5915/* 33 */
5916/***/ (function(module, __webpack_exports__, __webpack_require__) {
5917
5918"use strict";
5919/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(3);
5920/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
5921/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(4);
5922/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
5923/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(1);
5924/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
5925/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(2);
5926/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
5927/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(7);
5928/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Router__ = __webpack_require__(8);
5929var _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; };
5930
5931function _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; }
5932
5933function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5934
5935function _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; }
5936
5937function _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; }
5938
5939
5940
5941
5942
5943
5944
5945
5946var addLeadingSlash = function addLeadingSlash(path) {
5947 return path.charAt(0) === "/" ? path : "/" + path;
5948};
5949
5950var addBasename = function addBasename(basename, location) {
5951 if (!basename) return location;
5952
5953 return _extends({}, location, {
5954 pathname: addLeadingSlash(basename) + location.pathname
5955 });
5956};
5957
5958var stripBasename = function stripBasename(basename, location) {
5959 if (!basename) return location;
5960
5961 var base = addLeadingSlash(basename);
5962
5963 if (location.pathname.indexOf(base) !== 0) return location;
5964
5965 return _extends({}, location, {
5966 pathname: location.pathname.substr(base.length)
5967 });
5968};
5969
5970var createURL = function createURL(location) {
5971 return typeof location === "string" ? location : Object(__WEBPACK_IMPORTED_MODULE_4_history__["c" /* createPath */])(location);
5972};
5973
5974var staticHandler = function staticHandler(methodName) {
5975 return function () {
5976 __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false, "You cannot %s with <StaticRouter>", methodName);
5977 };
5978};
5979
5980var noop = function noop() {};
5981
5982/**
5983 * The public top-level API for a "static" <Router>, so-called because it
5984 * can't actually change the current location. Instead, it just records
5985 * location changes in a context object. Useful mainly in testing and
5986 * server-rendering scenarios.
5987 */
5988
5989var StaticRouter = function (_React$Component) {
5990 _inherits(StaticRouter, _React$Component);
5991
5992 function StaticRouter() {
5993 var _temp, _this, _ret;
5994
5995 _classCallCheck(this, StaticRouter);
5996
5997 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
5998 args[_key] = arguments[_key];
5999 }
6000
6001 return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.createHref = function (path) {
6002 return addLeadingSlash(_this.props.basename + createURL(path));
6003 }, _this.handlePush = function (location) {
6004 var _this$props = _this.props,
6005 basename = _this$props.basename,
6006 context = _this$props.context;
6007
6008 context.action = "PUSH";
6009 context.location = addBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__["a" /* createLocation */])(location));
6010 context.url = createURL(context.location);
6011 }, _this.handleReplace = function (location) {
6012 var _this$props2 = _this.props,
6013 basename = _this$props2.basename,
6014 context = _this$props2.context;
6015
6016 context.action = "REPLACE";
6017 context.location = addBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__["a" /* createLocation */])(location));
6018 context.url = createURL(context.location);
6019 }, _this.handleListen = function () {
6020 return noop;
6021 }, _this.handleBlock = function () {
6022 return noop;
6023 }, _temp), _possibleConstructorReturn(_this, _ret);
6024 }
6025
6026 StaticRouter.prototype.getChildContext = function getChildContext() {
6027 return {
6028 router: {
6029 staticContext: this.props.context
6030 }
6031 };
6032 };
6033
6034 StaticRouter.prototype.componentWillMount = function componentWillMount() {
6035 __WEBPACK_IMPORTED_MODULE_0_warning___default()(!this.props.history, "<StaticRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { StaticRouter as Router }`.");
6036 };
6037
6038 StaticRouter.prototype.render = function render() {
6039 var _props = this.props,
6040 basename = _props.basename,
6041 context = _props.context,
6042 location = _props.location,
6043 props = _objectWithoutProperties(_props, ["basename", "context", "location"]);
6044
6045 var history = {
6046 createHref: this.createHref,
6047 action: "POP",
6048 location: stripBasename(basename, Object(__WEBPACK_IMPORTED_MODULE_4_history__["a" /* createLocation */])(location)),
6049 push: this.handlePush,
6050 replace: this.handleReplace,
6051 go: staticHandler("go"),
6052 goBack: staticHandler("goBack"),
6053 goForward: staticHandler("goForward"),
6054 listen: this.handleListen,
6055 block: this.handleBlock
6056 };
6057
6058 return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__Router__["a" /* default */], _extends({}, props, { history: history }));
6059 };
6060
6061 return StaticRouter;
6062}(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);
6063
6064StaticRouter.propTypes = {
6065 basename: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string,
6066 context: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,
6067 location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object])
6068};
6069StaticRouter.defaultProps = {
6070 basename: "",
6071 location: "/"
6072};
6073StaticRouter.childContextTypes = {
6074 router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired
6075};
6076
6077
6078/* harmony default export */ __webpack_exports__["a"] = (StaticRouter);
6079
6080/***/ }),
6081/* 34 */
6082/***/ (function(module, __webpack_exports__, __webpack_require__) {
6083
6084"use strict";
6085/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1);
6086/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
6087/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(2);
6088/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
6089/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(3);
6090/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);
6091/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(4);
6092/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);
6093/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(9);
6094function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6095
6096function _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; }
6097
6098function _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; }
6099
6100
6101
6102
6103
6104
6105
6106/**
6107 * The public API for rendering the first <Route> that matches.
6108 */
6109
6110var Switch = function (_React$Component) {
6111 _inherits(Switch, _React$Component);
6112
6113 function Switch() {
6114 _classCallCheck(this, Switch);
6115
6116 return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
6117 }
6118
6119 Switch.prototype.componentWillMount = function componentWillMount() {
6120 __WEBPACK_IMPORTED_MODULE_3_invariant___default()(this.context.router, "You should not use <Switch> outside a <Router>");
6121 };
6122
6123 Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
6124 __WEBPACK_IMPORTED_MODULE_2_warning___default()(!(nextProps.location && !this.props.location), '<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.');
6125
6126 __WEBPACK_IMPORTED_MODULE_2_warning___default()(!(!nextProps.location && this.props.location), '<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.');
6127 };
6128
6129 Switch.prototype.render = function render() {
6130 var route = this.context.router.route;
6131 var children = this.props.children;
6132
6133 var location = this.props.location || route.location;
6134
6135 var match = void 0,
6136 child = void 0;
6137 __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) {
6138 if (match == null && __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) {
6139 var _element$props = element.props,
6140 pathProp = _element$props.path,
6141 exact = _element$props.exact,
6142 strict = _element$props.strict,
6143 sensitive = _element$props.sensitive,
6144 from = _element$props.from;
6145
6146 var path = pathProp || from;
6147
6148 child = element;
6149 match = Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__["a" /* default */])(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);
6150 }
6151 });
6152
6153 return match ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.cloneElement(child, { location: location, computedMatch: match }) : null;
6154 };
6155
6156 return Switch;
6157}(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
6158
6159Switch.contextTypes = {
6160 router: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({
6161 route: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired
6162 }).isRequired
6163};
6164Switch.propTypes = {
6165 children: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.node,
6166 location: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
6167};
6168
6169
6170/* harmony default export */ __webpack_exports__["a"] = (Switch);
6171
6172/***/ }),
6173/* 35 */
6174/***/ (function(module, __webpack_exports__, __webpack_require__) {
6175
6176"use strict";
6177/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1);
6178/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
6179/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(2);
6180/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
6181/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(36);
6182/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__);
6183/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(14);
6184var _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; };
6185
6186function _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; }
6187
6188
6189
6190
6191
6192
6193/**
6194 * A public higher-order component to access the imperative API
6195 */
6196var withRouter = function withRouter(Component) {
6197 var C = function C(props) {
6198 var wrappedComponentRef = props.wrappedComponentRef,
6199 remainingProps = _objectWithoutProperties(props, ["wrappedComponentRef"]);
6200
6201 return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__Route__["a" /* default */], {
6202 children: function children(routeComponentProps) {
6203 return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Component, _extends({}, remainingProps, routeComponentProps, {
6204 ref: wrappedComponentRef
6205 }));
6206 }
6207 });
6208 };
6209
6210 C.displayName = "withRouter(" + (Component.displayName || Component.name) + ")";
6211 C.WrappedComponent = Component;
6212 C.propTypes = {
6213 wrappedComponentRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func
6214 };
6215
6216 return __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default()(C, Component);
6217};
6218
6219/* harmony default export */ __webpack_exports__["a"] = (withRouter);
6220
6221/***/ }),
6222/* 36 */
6223/***/ (function(module, exports, __webpack_require__) {
6224
6225"use strict";
6226
6227
6228/**
6229 * Copyright 2015, Yahoo! Inc.
6230 * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
6231 */
6232var REACT_STATICS = {
6233 childContextTypes: true,
6234 contextTypes: true,
6235 defaultProps: true,
6236 displayName: true,
6237 getDefaultProps: true,
6238 getDerivedStateFromProps: true,
6239 mixins: true,
6240 propTypes: true,
6241 type: true
6242};
6243
6244var KNOWN_STATICS = {
6245 name: true,
6246 length: true,
6247 prototype: true,
6248 caller: true,
6249 callee: true,
6250 arguments: true,
6251 arity: true
6252};
6253
6254var defineProperty = Object.defineProperty;
6255var getOwnPropertyNames = Object.getOwnPropertyNames;
6256var getOwnPropertySymbols = Object.getOwnPropertySymbols;
6257var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
6258var getPrototypeOf = Object.getPrototypeOf;
6259var objectPrototype = getPrototypeOf && getPrototypeOf(Object);
6260
6261function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
6262 if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
6263
6264 if (objectPrototype) {
6265 var inheritedComponent = getPrototypeOf(sourceComponent);
6266 if (inheritedComponent && inheritedComponent !== objectPrototype) {
6267 hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
6268 }
6269 }
6270
6271 var keys = getOwnPropertyNames(sourceComponent);
6272
6273 if (getOwnPropertySymbols) {
6274 keys = keys.concat(getOwnPropertySymbols(sourceComponent));
6275 }
6276
6277 for (var i = 0; i < keys.length; ++i) {
6278 var key = keys[i];
6279 if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
6280 var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
6281 try { // Avoid failures from read-only properties
6282 defineProperty(targetComponent, key, descriptor);
6283 } catch (e) {}
6284 }
6285 }
6286
6287 return targetComponent;
6288 }
6289
6290 return targetComponent;
6291}
6292
6293module.exports = hoistNonReactStatics;
6294
6295
6296/***/ }),
6297/* 37 */
6298/***/ (function(module, exports, __webpack_require__) {
6299
6300"use strict";
6301
6302
6303Object.defineProperty(exports, "__esModule", {
6304 value: true
6305});
6306
6307var _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; }; }();
6308
6309var _react = __webpack_require__(1);
6310
6311var _react2 = _interopRequireDefault(_react);
6312
6313var _propTypes = __webpack_require__(2);
6314
6315var _propTypes2 = _interopRequireDefault(_propTypes);
6316
6317function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6318
6319function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6320
6321function _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; }
6322
6323function _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; }
6324
6325var HigherComponent = function (_React$Component) {
6326 _inherits(HigherComponent, _React$Component);
6327
6328 function HigherComponent() {
6329 _classCallCheck(this, HigherComponent);
6330
6331 return _possibleConstructorReturn(this, (HigherComponent.__proto__ || Object.getPrototypeOf(HigherComponent)).apply(this, arguments));
6332 }
6333
6334 _createClass(HigherComponent, [{
6335 key: 'componentDidMount',
6336 value: function componentDidMount() {
6337 this.props.onEnter(this.props.routerProps);
6338 }
6339 }, {
6340 key: 'componentWillReceiveProps',
6341 value: function componentWillReceiveProps(nextProps) {
6342 var _props$routerProps = this.props.routerProps,
6343 location = _props$routerProps.location,
6344 match = _props$routerProps.match;
6345 var _nextProps$routerProp = nextProps.routerProps,
6346 nextLocation = _nextProps$routerProp.location,
6347 nextMatch = _nextProps$routerProp.match;
6348
6349 if (match.path !== nextMatch.path) {
6350 nextProps.onEnter(nextProps.routerProps);
6351 } else if (location !== nextLocation) {
6352 this.props.onChange(nextProps.routerProps, this.props.routerProps);
6353 }
6354 }
6355 }, {
6356 key: 'componentWillUnmount',
6357 value: function componentWillUnmount() {
6358 this.props.onLeave(this.props.routerProps);
6359 }
6360 }, {
6361 key: 'render',
6362 value: function render() {
6363 var _props = this.props,
6364 Component = _props.component,
6365 Render = _props.render,
6366 routerProps = _props.routerProps;
6367
6368 if (Component) return _react2.default.createElement(Component, routerProps);
6369 return _react2.default.createElement(Render, routerProps);
6370 }
6371 }]);
6372
6373 return HigherComponent;
6374}(_react2.default.Component);
6375
6376exports.default = HigherComponent;
6377
6378
6379HigherComponent.propTypes = {
6380 component: _propTypes2.default.func,
6381 render: _propTypes2.default.func,
6382 onEnter: _propTypes2.default.func,
6383 routerProps: _propTypes2.default.shape({
6384 match: _propTypes2.default.object,
6385 history: _propTypes2.default.object,
6386 location: _propTypes2.default.object
6387 }).isRequired,
6388 onChange: _propTypes2.default.func,
6389 onLeave: _propTypes2.default.func
6390};
6391
6392HigherComponent.defaultProps = {
6393 component: null,
6394 render: null,
6395 onEnter: function onEnter() {},
6396 onChange: function onChange() {},
6397 onLeave: function onLeave() {}
6398};
6399
6400/***/ })
6401/******/ ]);
6402});
6403//# sourceMappingURL=index.js.map
\No newline at end of file