Socket
Socket
Sign inDemoInstall

react-router-dom

Package Overview
Dependencies
Maintainers
2
Versions
412
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router-dom - npm Package Compare versions

Comparing version 4.3.1 to 4.4.0-alpha.0

RouterContext.js

2

es/index.js

@@ -19,2 +19,4 @@ import _BrowserRouter from "./BrowserRouter";

export { _Router as Router };
import RouterContext from "./RouterContext";
import _StaticRouter from "./StaticRouter";

@@ -21,0 +23,0 @@ export { _StaticRouter as StaticRouter };

71

es/Link.js

@@ -15,2 +15,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

import { createLocation } from "history";
import RouterContext from "./RouterContext";

@@ -37,24 +38,25 @@ var isModifiedEvent = function isModifiedEvent(event) {

return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {
if (_this.props.onClick) _this.props.onClick(event);
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (history) {
return function (event) {
if (_this.props.onClick) _this.props.onClick(event);
if (!event.defaultPrevented && // onClick prevented default
event.button === 0 && // ignore everything but left clicks
!_this.props.target && // let browser handle "target=_blank" etc.
!isModifiedEvent(event) // ignore clicks with modifier keys
) {
event.preventDefault();
if (!event.defaultPrevented && // onClick prevented default
event.button === 0 && // ignore everything but left clicks
!_this.props.target && // let browser handle "target=_blank" etc.
!isModifiedEvent(event) // ignore clicks with modifier keys
) {
event.preventDefault();
var history = _this.context.router.history;
var _this$props = _this.props,
replace = _this$props.replace,
to = _this$props.to;
var _this$props = _this.props,
replace = _this$props.replace,
to = _this$props.to;
if (replace) {
history.replace(to);
} else {
history.push(to);
if (replace) {
history.replace(to);
} else {
history.push(to);
}
}
}
};
}, _temp), _possibleConstructorReturn(_this, _ret);

@@ -64,2 +66,4 @@ }

Link.prototype.render = function render() {
var _this2 = this;
var _props = this.props,

@@ -71,12 +75,24 @@ replace = _props.replace,

invariant(this.context.router, "You should not use <Link> outside a <Router>");
invariant(to !== undefined, 'You must specify the "to" property');
var history = this.context.router.history;
return React.createElement(
RouterContext.Consumer,
null,
function (_ref) {
var router = _ref.router;
var location = typeof to === "string" ? createLocation(to, null, null, history.location) : to;
invariant(router, "You should not use <Link> outside a <Router>");
var href = history.createHref(location);
return React.createElement("a", _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));
var history = router.history;
var location = typeof to === "string" ? createLocation(to, null, null, history.location) : to;
var href = history.createHref(location);
return React.createElement("a", _extends({}, props, {
onClick: _this2.handleClick(history),
href: href,
ref: innerRef
}));
}
);
};

@@ -97,13 +113,4 @@

};
Link.contextTypes = {
router: PropTypes.shape({
history: PropTypes.shape({
push: PropTypes.func.isRequired,
replace: PropTypes.func.isRequired,
createHref: PropTypes.func.isRequired
}).isRequired
}).isRequired
};
export default Link;

@@ -42,2 +42,6 @@ "use strict";

var _RouterContext = require("./RouterContext");
var _RouterContext2 = _interopRequireDefault(_RouterContext);
var _StaticRouter2 = require("./StaticRouter");

@@ -44,0 +48,0 @@

@@ -21,2 +21,6 @@ "use strict";

var _RouterContext = require("./RouterContext");
var _RouterContext2 = _interopRequireDefault(_RouterContext);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -52,24 +56,25 @@

return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {
if (_this.props.onClick) _this.props.onClick(event);
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (history) {
return function (event) {
if (_this.props.onClick) _this.props.onClick(event);
if (!event.defaultPrevented && // onClick prevented default
event.button === 0 && // ignore everything but left clicks
!_this.props.target && // let browser handle "target=_blank" etc.
!isModifiedEvent(event) // ignore clicks with modifier keys
) {
event.preventDefault();
if (!event.defaultPrevented && // onClick prevented default
event.button === 0 && // ignore everything but left clicks
!_this.props.target && // let browser handle "target=_blank" etc.
!isModifiedEvent(event) // ignore clicks with modifier keys
) {
event.preventDefault();
var history = _this.context.router.history;
var _this$props = _this.props,
replace = _this$props.replace,
to = _this$props.to;
var _this$props = _this.props,
replace = _this$props.replace,
to = _this$props.to;
if (replace) {
history.replace(to);
} else {
history.push(to);
if (replace) {
history.replace(to);
} else {
history.push(to);
}
}
}
};
}, _temp), _possibleConstructorReturn(_this, _ret);

@@ -79,2 +84,4 @@ }

Link.prototype.render = function render() {
var _this2 = this;
var _props = this.props,

@@ -86,12 +93,24 @@ replace = _props.replace,

(0, _invariant2.default)(this.context.router, "You should not use <Link> outside a <Router>");
(0, _invariant2.default)(to !== undefined, 'You must specify the "to" property');
var history = this.context.router.history;
return _react2.default.createElement(
_RouterContext2.default.Consumer,
null,
function (_ref) {
var router = _ref.router;
var location = typeof to === "string" ? (0, _history.createLocation)(to, null, null, history.location) : to;
(0, _invariant2.default)(router, "You should not use <Link> outside a <Router>");
var href = history.createHref(location);
return _react2.default.createElement("a", _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));
var history = router.history;
var location = typeof to === "string" ? (0, _history.createLocation)(to, null, null, history.location) : to;
var href = history.createHref(location);
return _react2.default.createElement("a", _extends({}, props, {
onClick: _this2.handleClick(history),
href: href,
ref: innerRef
}));
}
);
};

@@ -112,11 +131,2 @@

};
Link.contextTypes = {
router: _propTypes2.default.shape({
history: _propTypes2.default.shape({
push: _propTypes2.default.func.isRequired,
replace: _propTypes2.default.func.isRequired,
createHref: _propTypes2.default.func.isRequired
}).isRequired
}).isRequired
};
exports.default = Link;
{
"name": "react-router-dom",
"version": "4.3.1",
"version": "4.4.0-alpha.0",
"description": "DOM bindings for React Router",

@@ -21,2 +21,3 @@ "repository": "ReactTraining/react-router",

"Router.js",
"RouterContext.js",
"StaticRouter.js",

@@ -50,4 +51,3 @@ "Switch.js",

"prop-types": "^15.6.1",
"react-router": "^4.3.1",
"warning": "^4.0.1"
"react-router": "^4.4.0-alpha.0"
},

@@ -80,3 +80,4 @@ "devDependencies": {

"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-uglify": "^3.0.0"
"rollup-plugin-uglify": "^3.0.0",
"warning": "^4.0.1"
},

@@ -83,0 +84,0 @@ "browserify": {

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t.ReactRouterDOM={},t.React)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n=function(){};"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function o(t,e){return t(e={exports:{}},e.exports),e.exports}function r(t){return function(){return t}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t};var a=i,c=function(t){};var s=function(t,e,n,o,r,i,a,s){if(c(e),!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[n,o,r,i,a,s],l=0;(u=new Error(e.replace(/%s/g,function(){return p[l++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}},u=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}})()&&Object.assign;var f="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",h=o(function(t){t.exports=function(){function t(t,e,n,o,r,i){i!==f&&s(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=a,n.PropTypes=n,n}()}),d=function(t,e,n,o,r,i,a,c){if(!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,r,i,a,c],p=0;(s=new Error(e.replace(/%s/g,function(){return u[p++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}};function y(t){return"/"===t.charAt(0)}function v(t,e){for(var n=e,o=n+1,r=t.length;o<r;n+=1,o+=1)t[n]=t[o];t.pop()}var m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var b=function(t){return"/"===t.charAt(0)?t:"/"+t},g=function(t){return"/"===t.charAt(0)?t.substr(1):t},w=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)},O=function(t,e){return w(t,e)?t.substr(e.length):t},x=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},R=function(t){var e=t.pathname,n=t.search,o=t.hash,r=e||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r},P=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},j=function(t,e,n,o){var r=void 0;"string"==typeof t?(r=function(t){var e=t||"/",n="",o="",r=e.indexOf("#");-1!==r&&(o=e.substr(r),e=e.substr(0,r));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===o?"":o}}(t)).state=e:(void 0===(r=P({},t)).pathname&&(r.pathname=""),r.search?"?"!==r.search.charAt(0)&&(r.search="?"+r.search):r.search="",r.hash?"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash):r.hash="",void 0!==e&&void 0===r.state&&(r.state=e));try{r.pathname=decodeURI(r.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(r.key=n),o?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],o=e&&e.split("/")||[],r=t&&y(t),i=e&&y(e),a=r||i;if(t&&y(t)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var c=void 0;if(o.length){var s=o[o.length-1];c="."===s||".."===s||""===s}else c=!1;for(var u=0,p=o.length;p>=0;p--){var l=o[p];"."===l?v(o,p):".."===l?(v(o,p),u++):u&&(v(o,p),u--)}if(!a)for(;u--;u)o.unshift("..");!a||""===o[0]||o[0]&&y(o[0])||o.unshift("");var f=o.join("/");return c&&"/"!==f.substr(-1)&&(f+="/"),f}(r.pathname,o.pathname)):r.pathname=o.pathname:r.pathname||(r.pathname="/"),r},E=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every(function(e,o){return t(e,n[o])});var o=void 0===e?"undefined":m(e);if(o!==(void 0===n?"undefined":m(n)))return!1;if("object"===o){var r=e.valueOf(),i=n.valueOf();if(r!==e||i!==n)return t(r,i);var a=Object.keys(e),c=Object.keys(n);return a.length===c.length&&a.every(function(o){return t(e[o],n[o])})}return!1}(t.state,e.state)},T=function(){var t=null,e=[];return{setPrompt:function(e){return n(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,o,r,i){if(null!=t){var a="function"==typeof t?t(e,o):t;"string"==typeof a?"function"==typeof r?r(a,i):(n(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==a)}else i(!0)},appendListener:function(t){var n=!0,o=function(){n&&t.apply(void 0,arguments)};return e.push(o),function(){n=!1,e=e.filter(function(t){return t!==o})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];e.forEach(function(t){return t.apply(void 0,n)})}}},C=!("undefined"==typeof window||!window.document||!window.document.createElement),S=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},k=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},A=function(t,e){return e(window.confirm(t))},_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},L=function(){try{return window.history.state||{}}catch(t){return{}}},q=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d(C,"Browser history needs a DOM");var e,o=window.history,r=(-1===(e=window.navigator.userAgent).indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=t.forceRefresh,c=void 0!==a&&a,s=t.getUserConfirmation,u=void 0===s?A:s,p=t.keyLength,l=void 0===p?6:p,f=t.basename?x(b(t.basename)):"",h=function(t){var e=t||{},o=e.key,r=e.state,i=window.location,a=i.pathname+i.search+i.hash;return n(!f||w(a,f),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+a+'" to begin with "'+f+'".'),f&&(a=O(a,f)),j(a,r,o)},y=function(){return Math.random().toString(36).substr(2,l)},v=T(),m=function(t){M($,t),$.length=o.length,v.notifyListeners($.location,$.action)},g=function(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||q(h(t.state))},P=function(){q(h(L()))},E=!1,q=function(t){if(E)E=!1,m();else{v.confirmTransitionTo(t,"POP",u,function(e){e?m({action:"POP",location:t}):U(t)})}},U=function(t){var e=$.location,n=Y.indexOf(e.key);-1===n&&(n=0);var o=Y.indexOf(t.key);-1===o&&(o=0);var r=n-o;r&&(E=!0,I(r))},H=h(L()),Y=[H.key],W=function(t){return f+R(t)},I=function(t){o.go(t)},N=0,B=function(t){1===(N+=t)?(S(window,"popstate",g),i&&S(window,"hashchange",P)):0===N&&(k(window,"popstate",g),i&&k(window,"hashchange",P))},D=!1,$={length:o.length,action:"POP",location:H,createHref:W,push:function(t,e){n(!("object"===(void 0===t?"undefined":_(t))&&void 0!==t.state&&void 0!==e),"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");var i=j(t,e,y(),$.location);v.confirmTransitionTo(i,"PUSH",u,function(t){if(t){var e=W(i),a=i.key,s=i.state;if(r)if(o.pushState({key:a,state:s},null,e),c)window.location.href=e;else{var u=Y.indexOf($.location.key),p=Y.slice(0,-1===u?0:u+1);p.push(i.key),Y=p,m({action:"PUSH",location:i})}else n(void 0===s,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=e}})},replace:function(t,e){n(!("object"===(void 0===t?"undefined":_(t))&&void 0!==t.state&&void 0!==e),"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");var i=j(t,e,y(),$.location);v.confirmTransitionTo(i,"REPLACE",u,function(t){if(t){var e=W(i),a=i.key,s=i.state;if(r)if(o.replaceState({key:a,state:s},null,e),c)window.location.replace(e);else{var u=Y.indexOf($.location.key);-1!==u&&(Y[u]=i.key),m({action:"REPLACE",location:i})}else n(void 0===s,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(e)}})},go:I,goBack:function(){return I(-1)},goForward:function(){return I(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=v.setPrompt(t);return D||(B(1),D=!0),function(){return D&&(D=!1,B(-1)),e()}},listen:function(t){var e=v.appendListener(t);return B(1),function(){B(-1),e()}}};return $},U=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},H={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+g(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:g,decodePath:b},slash:{encodePath:b,decodePath:b}},Y=function(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)},W=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)},I=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d(C,"Hash history needs a DOM");var e=window.history,o=-1===window.navigator.userAgent.indexOf("Firefox"),r=t.getUserConfirmation,i=void 0===r?A:r,a=t.hashType,c=void 0===a?"slash":a,s=t.basename?x(b(t.basename)):"",u=H[c],p=u.encodePath,l=u.decodePath,f=function(){var t=l(Y());return n(!s||w(t,s),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+t+'" to begin with "'+s+'".'),s&&(t=O(t,s)),j(t)},h=T(),y=function(t){U(F,t),F.length=e.length,h.notifyListeners(F.location,F.action)},v=!1,m=null,g=function(){var t=Y(),e=p(t);if(t!==e)W(e);else{var n=f(),o=F.location;if(!v&&E(o,n))return;if(m===R(n))return;m=null,P(n)}},P=function(t){if(v)v=!1,y();else{h.confirmTransitionTo(t,"POP",i,function(e){e?y({action:"POP",location:t}):_(t)})}},_=function(t){var e=F.location,n=I.lastIndexOf(R(e));-1===n&&(n=0);var o=I.lastIndexOf(R(t));-1===o&&(o=0);var r=n-o;r&&(v=!0,N(r))},M=Y(),L=p(M);M!==L&&W(L);var q=f(),I=[R(q)],N=function(t){n(o,"Hash history go(n) causes a full page reload in this browser"),e.go(t)},B=0,D=function(t){1===(B+=t)?S(window,"hashchange",g):0===B&&k(window,"hashchange",g)},$=!1,F={length:e.length,action:"POP",location:q,createHref:function(t){return"#"+p(s+R(t))},push:function(t,e){n(void 0===e,"Hash history cannot push state; it is ignored");var o=j(t,void 0,void 0,F.location);h.confirmTransitionTo(o,"PUSH",i,function(t){if(t){var e=R(o),r=p(s+e);if(Y()!==r){m=e,function(t){window.location.hash=t}(r);var i=I.lastIndexOf(R(F.location)),a=I.slice(0,-1===i?0:i+1);a.push(e),I=a,y({action:"PUSH",location:o})}else n(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),y()}})},replace:function(t,e){n(void 0===e,"Hash history cannot replace state; it is ignored");var o=j(t,void 0,void 0,F.location);h.confirmTransitionTo(o,"REPLACE",i,function(t){if(t){var e=R(o),n=p(s+e);Y()!==n&&(m=e,W(n));var r=I.indexOf(R(F.location));-1!==r&&(I[r]=e),y({action:"REPLACE",location:o})}})},go:N,goBack:function(){return N(-1)},goForward:function(){return N(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=h.setPrompt(t);return $||(D(1),$=!0),function(){return $&&($=!1,D(-1)),e()}},listen:function(t){var e=h.appendListener(t);return D(1),function(){D(-1),e()}}};return F},N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},D=function(t,e,n){return Math.min(Math.max(t,e),n)},$=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,o=t.initialEntries,r=void 0===o?["/"]:o,i=t.initialIndex,a=void 0===i?0:i,c=t.keyLength,s=void 0===c?6:c,u=T(),p=function(t){B(v,t),v.length=v.entries.length,u.notifyListeners(v.location,v.action)},l=function(){return Math.random().toString(36).substr(2,s)},f=D(a,0,r.length-1),h=r.map(function(t){return j(t,void 0,"string"==typeof t?l():t.key||l())}),d=R,y=function(t){var n=D(v.index+t,0,v.entries.length-1),o=v.entries[n];u.confirmTransitionTo(o,"POP",e,function(t){t?p({action:"POP",location:o,index:n}):p()})},v={length:h.length,action:"POP",location:h[f],index:f,entries:h,createHref:d,push:function(t,o){n(!("object"===(void 0===t?"undefined":N(t))&&void 0!==t.state&&void 0!==o),"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");var r=j(t,o,l(),v.location);u.confirmTransitionTo(r,"PUSH",e,function(t){if(t){var e=v.index+1,n=v.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),p({action:"PUSH",location:r,index:e,entries:n})}})},replace:function(t,o){n(!("object"===(void 0===t?"undefined":N(t))&&void 0!==t.state&&void 0!==o),"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");var r=j(t,o,l(),v.location);u.confirmTransitionTo(r,"REPLACE",e,function(t){t&&(v.entries[v.index]=r,p({action:"REPLACE",location:r}))})},go:y,goBack:function(){return y(-1)},goForward:function(){return y(1)},canGo:function(t){var e=v.index+t;return e>=0&&e<v.entries.length},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return u.setPrompt(t)},listen:function(t){return u.appendListener(t)}};return v},F=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};function K(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var V=function(t){function o(){var e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=n=K(this,t.call.apply(t,[this].concat(i))),n.state={match:n.computeMatch(n.props.history.location.pathname)},K(n,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.getChildContext=function(){return{router:F({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},o.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},o.prototype.componentWillMount=function(){var t=this,n=this.props,o=n.children,r=n.history;d(null==o||1===e.Children.count(o),"A <Router> may have only one child element"),this.unlisten=r.listen(function(){t.setState({match:t.computeMatch(r.location.pathname)})})},o.prototype.componentWillReceiveProps=function(t){n(this.props.history===t.history,"You cannot change <Router history>")},o.prototype.componentWillUnmount=function(){this.unlisten()},o.prototype.render=function(){var t=this.props.children;return t?e.Children.only(t):null},o}(e.Component);V.propTypes={history:h.object.isRequired,children:h.node},V.contextTypes={router:h.object},V.childContextTypes={router:h.object.isRequired};var J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},z=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Q=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},X=function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},Z=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},tt=function(t){function n(){var e,o;G(this,n);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=o=Z(this,t.call.apply(t,[this].concat(i))),o.history=q(o.props),Z(o,e)}return Q(n,t),n.prototype.componentWillMount=function(){},n.prototype.render=function(){return e.createElement(V,{history:this.history,children:this.props.children})},n}(e.Component),et=function(t){function n(){var e,o;G(this,n);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=o=Z(this,t.call.apply(t,[this].concat(i))),o.history=I(o.props),Z(o,e)}return Q(n,t),n.prototype.componentWillMount=function(){},n.prototype.render=function(){return e.createElement(V,{history:this.history,children:this.props.children})},n}(e.Component),nt=function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)},ot=function(t){function n(){var e,o;G(this,n);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=o=Z(this,t.call.apply(t,[this].concat(i))),o.handleClick=function(t){if(o.props.onClick&&o.props.onClick(t),!t.defaultPrevented&&0===t.button&&!o.props.target&&!nt(t)){t.preventDefault();var e=o.context.router.history,n=o.props,r=n.replace,i=n.to;r?e.replace(i):e.push(i)}},Z(o,e)}return Q(n,t),n.prototype.render=function(){var t=this.props,n=(t.replace,t.to),o=t.innerRef,r=X(t,["replace","to","innerRef"]);this.context.router||d(!1),void 0===n&&d(!1);var i=this.context.router.history,a="string"==typeof n?j(n,null,null,i.location):n,c=i.createHref(a);return e.createElement("a",z({},r,{onClick:this.handleClick,href:c,ref:o}))},n}(e.Component);function rt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}ot.defaultProps={replace:!1},ot.contextTypes={router:h.shape({history:h.shape({push:h.func.isRequired,replace:h.func.isRequired,createHref:h.func.isRequired}).isRequired}).isRequired};var it=function(t){function o(){var e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=n=rt(this,t.call.apply(t,[this].concat(i))),n.history=$(n.props),rt(n,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.componentWillMount=function(){n(!this.props.history,"<MemoryRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},o.prototype.render=function(){return e.createElement(V,{history:this.history,children:this.props.children})},o}(e.Component);it.propTypes={initialEntries:h.array,initialIndex:h.number,getUserConfirmation:h.func,keyLength:h.number,children:h.node};var at={}.toString,ct=Array.isArray||function(t){return"[object Array]"==at.call(t)},st=xt,ut=dt,pt=function(t,e){return vt(dt(t,e))},lt=vt,ft=Ot,ht=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function dt(t,e){for(var n,o=[],r=0,i=0,a="",c=e&&e.delimiter||"/";null!=(n=ht.exec(t));){var s=n[0],u=n[1],p=n.index;if(a+=t.slice(i,p),i=p+s.length,u)a+=u[1];else{var l=t[i],f=n[2],h=n[3],d=n[4],y=n[5],v=n[6],m=n[7];a&&(o.push(a),a="");var b=null!=f&&null!=l&&l!==f,g="+"===v||"*"===v,w="?"===v||"*"===v,O=n[2]||c,x=d||y;o.push({name:h||r++,prefix:f||"",delimiter:O,optional:w,repeat:g,partial:b,asterisk:!!m,pattern:x?bt(x):m?".*":"[^"+mt(O)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&o.push(a),o}function yt(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function vt(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,o){for(var r="",i=n||{},a=(o||{}).pretty?yt:encodeURIComponent,c=0;c<t.length;c++){var s=t[c];if("string"!=typeof s){var u,p=i[s.name];if(null==p){if(s.optional){s.partial&&(r+=s.prefix);continue}throw new TypeError('Expected "'+s.name+'" to be defined')}if(ct(p)){if(!s.repeat)throw new TypeError('Expected "'+s.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(s.optional)continue;throw new TypeError('Expected "'+s.name+'" to not be empty')}for(var l=0;l<p.length;l++){if(u=a(p[l]),!e[c].test(u))throw new TypeError('Expected all "'+s.name+'" to match "'+s.pattern+'", but received `'+JSON.stringify(u)+"`");r+=(0===l?s.prefix:s.delimiter)+u}}else{if(u=s.asterisk?encodeURI(p).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):a(p),!e[c].test(u))throw new TypeError('Expected "'+s.name+'" to match "'+s.pattern+'", but received "'+u+'"');r+=s.prefix+u}}else r+=s}return r}}function mt(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function bt(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function gt(t,e){return t.keys=e,t}function wt(t){return t.sensitive?"":"i"}function Ot(t,e,n){ct(e)||(n=e||n,e=[]);for(var o=(n=n||{}).strict,r=!1!==n.end,i="",a=0;a<t.length;a++){var c=t[a];if("string"==typeof c)i+=mt(c);else{var s=mt(c.prefix),u="(?:"+c.pattern+")";e.push(c),c.repeat&&(u+="(?:"+s+u+")*"),i+=u=c.optional?c.partial?s+"("+u+")?":"(?:"+s+"("+u+"))?":s+"("+u+")"}}var p=mt(n.delimiter||"/"),l=i.slice(-p.length)===p;return o||(i=(l?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=r?"$":o&&l?"":"(?="+p+"|$)",gt(new RegExp("^"+i,wt(n)),e)}function xt(t,e,n){return ct(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var o=0;o<n.length;o++)e.push({name:o,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return gt(t,e)}(t,e):ct(t)?function(t,e,n){for(var o=[],r=0;r<t.length;r++)o.push(xt(t[r],e,n).source);return gt(new RegExp("(?:"+o.join("|")+")",wt(n)),e)}(t,e,n):function(t,e,n){return Ot(dt(t,n),e,n)}(t,e,n)}st.parse=ut,st.compile=pt,st.tokensToFunction=lt,st.tokensToRegExp=ft;var Rt={},Pt=0,jt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"==typeof e&&(e={path:e});var o=e,r=o.path,i=o.exact,a=void 0!==i&&i,c=o.strict,s=void 0!==c&&c,u=o.sensitive,p=void 0!==u&&u;if(null==r)return n;var l=function(t,e){var n=""+e.end+e.strict+e.sensitive,o=Rt[n]||(Rt[n]={});if(o[t])return o[t];var r=[],i={re:st(t,r,e),keys:r};return Pt<1e4&&(o[t]=i,Pt++),i}(r,{end:a,strict:s,sensitive:p}),f=l.re,h=l.keys,d=f.exec(t);if(!d)return null;var y=d[0],v=d.slice(1),m=t===y;return a&&!m?null:{path:r,url:"/"===r&&""===y?"/":y,isExact:m,params:h.reduce(function(t,e,n){return t[e.name]=v[n],t},{})}},Et=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};function Tt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var Ct=function(t){return 0===e.Children.count(t)},St=function(t){function o(){var e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=n=Tt(this,t.call.apply(t,[this].concat(i))),n.state={match:n.computeMatch(n.props,n.context.router)},Tt(n,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.getChildContext=function(){return{router:Et({},this.context.router,{route:{location:this.props.location||this.context.router.route.location,match:this.state.match}})}},o.prototype.computeMatch=function(t,e){var n=t.computedMatch,o=t.location,r=t.path,i=t.strict,a=t.exact,c=t.sensitive;if(n)return n;d(e,"You should not use <Route> or withRouter() outside a <Router>");var s=e.route,u=(o||s.location).pathname;return jt(u,{path:r,strict:i,exact:a,sensitive:c},s.match)},o.prototype.componentWillMount=function(){n(!(this.props.component&&this.props.render),"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored"),n(!(this.props.component&&this.props.children&&!Ct(this.props.children)),"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored"),n(!(this.props.render&&this.props.children&&!Ct(this.props.children)),"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored")},o.prototype.componentWillReceiveProps=function(t,e){n(!(t.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.'),n(!(!t.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.'),this.setState({match:this.computeMatch(t,e.router)})},o.prototype.render=function(){var t=this.state.match,n=this.props,o=n.children,r=n.component,i=n.render,a=this.context.router,c=a.history,s=a.route,u=a.staticContext,p={match:t,location:this.props.location||s.location,history:c,staticContext:u};return r?t?e.createElement(r,p):null:i?t?i(p):null:"function"==typeof o?o(p):o&&!Ct(o)?e.Children.only(o):null},o}(e.Component);St.propTypes={computedMatch:h.object,path:h.string,exact:h.bool,strict:h.bool,sensitive:h.bool,component:h.func,render:h.func,children:h.oneOfType([h.func,h.node]),location:h.object},St.contextTypes={router:h.shape({history:h.object.isRequired,route:h.object.isRequired,staticContext:h.object})},St.childContextTypes={router:h.object.isRequired};var kt=function(t){var n=t.to,o=t.exact,r=t.strict,i=t.location,a=t.activeClassName,c=t.className,s=t.activeStyle,u=t.style,p=t.isActive,l=t["aria-current"],f=X(t,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive","aria-current"]),h="object"===(void 0===n?"undefined":J(n))?n.pathname:n,d=h&&h.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1");return e.createElement(St,{path:d,exact:o,strict:r,location:i,children:function(t){var o=t.location,r=t.match,i=!!(p?p(r,o):r);return e.createElement(ot,z({to:n,className:i?[c,a].filter(function(t){return t}).join(" "):c,style:i?z({},u,s):u,"aria-current":i&&l||null},f))}})};kt.defaultProps={activeClassName:"active","aria-current":"page"};var At=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){d(this.context.router,"You should not use <Prompt> outside a <Router>"),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(e.Component);At.propTypes={when:h.bool,message:h.oneOfType([h.func,h.string]).isRequired},At.defaultProps={when:!0},At.contextTypes={router:h.shape({history:h.shape({block:h.func.isRequired}).isRequired}).isRequired};var _t={},Mt=0,Lt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===t?t:function(t){var e=t,n=_t[e]||(_t[e]={});if(n[t])return n[t];var o=st.compile(t);return Mt<1e4&&(n[t]=o,Mt++),o}(t)(e,{pretty:!0})},qt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};var Ut=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},e.prototype.componentWillMount=function(){d(this.context.router,"You should not use <Redirect> outside a <Router>"),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=j(t.to),o=j(this.props.to);E(e,o)?n(!1,"You tried to redirect to the same route you're currently on: \""+o.pathname+o.search+'"'):this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,n=t.to;return e?"string"==typeof n?Lt(n,e.params):qt({},n,{pathname:Lt(n.pathname,e.params)}):n},e.prototype.perform=function(){var t=this.context.router.history,e=this.props.push,n=this.computeTo(this.props);e?t.push(n):t.replace(n)},e.prototype.render=function(){return null},e}(e.Component);Ut.propTypes={computedMatch:h.object,push:h.bool,from:h.string,to:h.oneOfType([h.string,h.object]).isRequired},Ut.defaultProps={push:!1},Ut.contextTypes={router:h.shape({history:h.shape({push:h.func.isRequired,replace:h.func.isRequired}).isRequired,staticContext:h.object}).isRequired};var Ht=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};function Yt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var Wt=function(t){return"/"===t.charAt(0)?t:"/"+t},It=function(t,e){return t?Ht({},e,{pathname:Wt(t)+e.pathname}):e},Nt=function(t){return"string"==typeof t?t:R(t)},Bt=function(t){return function(){d(!1,"You cannot %s with <StaticRouter>",t)}},Dt=function(){},$t=function(t){function o(){var e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=n=Yt(this,t.call.apply(t,[this].concat(i))),n.createHref=function(t){return Wt(n.props.basename+Nt(t))},n.handlePush=function(t){var e=n.props,o=e.basename,r=e.context;r.action="PUSH",r.location=It(o,j(t)),r.url=Nt(r.location)},n.handleReplace=function(t){var e=n.props,o=e.basename,r=e.context;r.action="REPLACE",r.location=It(o,j(t)),r.url=Nt(r.location)},n.handleListen=function(){return Dt},n.handleBlock=function(){return Dt},Yt(n,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},o.prototype.componentWillMount=function(){n(!this.props.history,"<StaticRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},o.prototype.render=function(){var t=this.props,n=t.basename,o=(t.context,t.location),r=function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:function(t,e){if(!t)return e;var n=Wt(t);return 0!==e.pathname.indexOf(n)?e:Ht({},e,{pathname:e.pathname.substr(n.length)})}(n,j(o)),push:this.handlePush,replace:this.handleReplace,go:Bt("go"),goBack:Bt("goBack"),goForward:Bt("goForward"),listen:this.handleListen,block:this.handleBlock};return e.createElement(V,Ht({},r,{history:i}))},o}(e.Component);$t.propTypes={basename:h.string,context:h.object.isRequired,location:h.oneOfType([h.string,h.object])},$t.defaultProps={basename:"",location:"/"},$t.childContextTypes={router:h.object.isRequired};var Ft=function(t){function o(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.componentWillMount=function(){d(this.context.router,"You should not use <Switch> outside a <Router>")},o.prototype.componentWillReceiveProps=function(t){n(!(t.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.'),n(!(!t.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.')},o.prototype.render=function(){var t=this.context.router.route,n=this.props.children,o=this.props.location||t.location,r=void 0,i=void 0;return e.Children.forEach(n,function(n){if(null==r&&e.isValidElement(n)){var a=n.props,c=a.path,s=a.exact,u=a.strict,p=a.sensitive,l=a.from,f=c||l;i=n,r=jt(o.pathname,{path:f,exact:s,strict:u,sensitive:p},t.match)}}),r?e.cloneElement(i,{location:o,computedMatch:r}):null},o}(e.Component);Ft.contextTypes={router:h.shape({route:h.object.isRequired}).isRequired},Ft.propTypes={children:h.node,location:h.object};var Kt=o(function(t,e){var n,o,r,i,a,c,s,u;t.exports=(n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r=Object.defineProperty,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,s=Object.getPrototypeOf,u=s&&s(Object),function t(e,p,l){if("string"!=typeof p){if(u){var f=s(p);f&&f!==u&&t(e,f,l)}var h=i(p);a&&(h=h.concat(a(p)));for(var d=0;d<h.length;++d){var y=h[d];if(!(n[y]||o[y]||l&&l[y])){var v=c(p,y);try{r(e,y,v)}catch(t){}}}return e}return e})}),Vt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};t.BrowserRouter=tt,t.HashRouter=et,t.Link=ot,t.MemoryRouter=it,t.NavLink=kt,t.Prompt=At,t.Redirect=Ut,t.Route=St,t.Router=V,t.StaticRouter=$t,t.Switch=Ft,t.generatePath=Lt,t.matchPath=jt,t.withRouter=function(t){var n=function(n){var o=n.wrappedComponentRef,r=function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}(n,["wrappedComponentRef"]);return e.createElement(St,{children:function(n){return e.createElement(t,Vt({},r,n,{ref:o}))}})};return n.displayName="withRouter("+(t.displayName||t.name)+")",n.WrappedComponent=t,n.propTypes={wrappedComponentRef:h.func},Kt(n,t)},Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t.ReactRouterDOM={},t.React)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n=function(){},o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function i(t,e){return t(e={exports:{}},e.exports),e.exports}function a(t){return function(){return t}}var c=function(){};c.thatReturns=a,c.thatReturnsFalse=a(!1),c.thatReturnsTrue=a(!0),c.thatReturnsNull=a(null),c.thatReturnsThis=function(){return this},c.thatReturnsArgument=function(t){return t};var u=c,s=function(t){};var p=function(t,e,n,o,r,i,a,c){if(s(e),!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[n,o,r,i,a,c],l=0;(u=new Error(e.replace(/%s/g,function(){return p[l++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}},l=u,f=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}})()&&Object.assign;var y="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",v=i(function(t){t.exports=function(){function t(t,e,n,o,r,i){i!==y&&p(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=u,n.PropTypes=n,n}()}),m=function(t,e,n,o,r,i,a,c){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,o,r,i,a,c],p=0;(u=new Error(e.replace(/%s/g,function(){return s[p++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}};function b(t){return"/"===t.charAt(0)}function g(t,e){for(var n=e,o=n+1,r=t.length;o<r;n+=1,o+=1)t[n]=t[o];t.pop()}var w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var O=function(t){return"/"===t.charAt(0)?t:"/"+t},x=function(t){return"/"===t.charAt(0)?t.substr(1):t},P=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)},j=function(t,e){return P(t,e)?t.substr(e.length):t},R=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},E=function(t){var e=t.pathname,n=t.search,o=t.hash,r=e||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r},C=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},T=function(t,e,n,o){var r=void 0;"string"==typeof t?(r=function(t){var e=t||"/",n="",o="",r=e.indexOf("#");-1!==r&&(o=e.substr(r),e=e.substr(0,r));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===o?"":o}}(t)).state=e:(void 0===(r=C({},t)).pathname&&(r.pathname=""),r.search?"?"!==r.search.charAt(0)&&(r.search="?"+r.search):r.search="",r.hash?"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash):r.hash="",void 0!==e&&void 0===r.state&&(r.state=e));try{r.pathname=decodeURI(r.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(r.key=n),o?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],o=e&&e.split("/")||[],r=t&&b(t),i=e&&b(e),a=r||i;if(t&&b(t)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var c=void 0;if(o.length){var u=o[o.length-1];c="."===u||".."===u||""===u}else c=!1;for(var s=0,p=o.length;p>=0;p--){var l=o[p];"."===l?g(o,p):".."===l?(g(o,p),s++):s&&(g(o,p),s--)}if(!a)for(;s--;s)o.unshift("..");!a||""===o[0]||o[0]&&b(o[0])||o.unshift("");var f=o.join("/");return c&&"/"!==f.substr(-1)&&(f+="/"),f}(r.pathname,o.pathname)):r.pathname=o.pathname:r.pathname||(r.pathname="/"),r},S=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every(function(e,o){return t(e,n[o])});var o=void 0===e?"undefined":w(e);if(o!==(void 0===n?"undefined":w(n)))return!1;if("object"===o){var r=e.valueOf(),i=n.valueOf();if(r!==e||i!==n)return t(r,i);var a=Object.keys(e),c=Object.keys(n);return a.length===c.length&&a.every(function(o){return t(e[o],n[o])})}return!1}(t.state,e.state)},k=function(){var t=null,e=[];return{setPrompt:function(e){return n(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,o,r,i){if(null!=t){var a="function"==typeof t?t(e,o):t;"string"==typeof a?"function"==typeof r?r(a,i):(n(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==a)}else i(!0)},appendListener:function(t){var n=!0,o=function(){n&&t.apply(void 0,arguments)};return e.push(o),function(){n=!1,e=e.filter(function(t){return t!==o})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];e.forEach(function(t){return t.apply(void 0,n)})}}},_=!("undefined"==typeof window||!window.document||!window.document.createElement),A=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},M=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},L=function(t,e){return e(window.confirm(t))},U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},H=function(){try{return window.history.state||{}}catch(t){return{}}},W=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(_,"Browser history needs a DOM");var e,o=window.history,r=(-1===(e=window.navigator.userAgent).indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=t.forceRefresh,c=void 0!==a&&a,u=t.getUserConfirmation,s=void 0===u?L:u,p=t.keyLength,l=void 0===p?6:p,f=t.basename?R(O(t.basename)):"",h=function(t){var e=t||{},o=e.key,r=e.state,i=window.location,a=i.pathname+i.search+i.hash;return n(!f||P(a,f),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+a+'" to begin with "'+f+'".'),f&&(a=j(a,f)),T(a,r,o)},d=function(){return Math.random().toString(36).substr(2,l)},y=k(),v=function(t){q($,t),$.length=o.length,y.notifyListeners($.location,$.action)},b=function(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||x(h(t.state))},g=function(){x(h(H()))},w=!1,x=function(t){if(w)w=!1,v();else{y.confirmTransitionTo(t,"POP",s,function(e){e?v({action:"POP",location:t}):C(t)})}},C=function(t){var e=$.location,n=W.indexOf(e.key);-1===n&&(n=0);var o=W.indexOf(t.key);-1===o&&(o=0);var r=n-o;r&&(w=!0,B(r))},S=h(H()),W=[S.key],Y=function(t){return f+E(t)},B=function(t){o.go(t)},I=0,N=function(t){1===(I+=t)?(A(window,"popstate",b),i&&A(window,"hashchange",g)):0===I&&(M(window,"popstate",b),i&&M(window,"hashchange",g))},D=!1,$={length:o.length,action:"POP",location:S,createHref:Y,push:function(t,e){n(!("object"===(void 0===t?"undefined":U(t))&&void 0!==t.state&&void 0!==e),"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");var i=T(t,e,d(),$.location);y.confirmTransitionTo(i,"PUSH",s,function(t){if(t){var e=Y(i),a=i.key,u=i.state;if(r)if(o.pushState({key:a,state:u},null,e),c)window.location.href=e;else{var s=W.indexOf($.location.key),p=W.slice(0,-1===s?0:s+1);p.push(i.key),W=p,v({action:"PUSH",location:i})}else n(void 0===u,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=e}})},replace:function(t,e){n(!("object"===(void 0===t?"undefined":U(t))&&void 0!==t.state&&void 0!==e),"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");var i=T(t,e,d(),$.location);y.confirmTransitionTo(i,"REPLACE",s,function(t){if(t){var e=Y(i),a=i.key,u=i.state;if(r)if(o.replaceState({key:a,state:u},null,e),c)window.location.replace(e);else{var s=W.indexOf($.location.key);-1!==s&&(W[s]=i.key),v({action:"REPLACE",location:i})}else n(void 0===u,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(e)}})},go:B,goBack:function(){return B(-1)},goForward:function(){return B(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=y.setPrompt(t);return D||(N(1),D=!0),function(){return D&&(D=!1,N(-1)),e()}},listen:function(t){var e=y.appendListener(t);return N(1),function(){N(-1),e()}}};return $},Y=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},B={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+x(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:x,decodePath:O},slash:{encodePath:O,decodePath:O}},I=function(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)},N=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)},D=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(_,"Hash history needs a DOM");var e=window.history,o=-1===window.navigator.userAgent.indexOf("Firefox"),r=t.getUserConfirmation,i=void 0===r?L:r,a=t.hashType,c=void 0===a?"slash":a,u=t.basename?R(O(t.basename)):"",s=B[c],p=s.encodePath,l=s.decodePath,f=function(){var t=l(I());return n(!u||P(t,u),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+t+'" to begin with "'+u+'".'),u&&(t=j(t,u)),T(t)},h=k(),d=function(t){Y(F,t),F.length=e.length,h.notifyListeners(F.location,F.action)},y=!1,v=null,b=function(){var t=I(),e=p(t);if(t!==e)N(e);else{var n=f(),o=F.location;if(!y&&S(o,n))return;if(v===E(n))return;v=null,g(n)}},g=function(t){if(y)y=!1,d();else{h.confirmTransitionTo(t,"POP",i,function(e){e?d({action:"POP",location:t}):w(t)})}},w=function(t){var e=F.location,n=q.lastIndexOf(E(e));-1===n&&(n=0);var o=q.lastIndexOf(E(t));-1===o&&(o=0);var r=n-o;r&&(y=!0,H(r))},x=I(),C=p(x);x!==C&&N(C);var U=f(),q=[E(U)],H=function(t){n(o,"Hash history go(n) causes a full page reload in this browser"),e.go(t)},W=0,D=function(t){1===(W+=t)?A(window,"hashchange",b):0===W&&M(window,"hashchange",b)},$=!1,F={length:e.length,action:"POP",location:U,createHref:function(t){return"#"+p(u+E(t))},push:function(t,e){n(void 0===e,"Hash history cannot push state; it is ignored");var o=T(t,void 0,void 0,F.location);h.confirmTransitionTo(o,"PUSH",i,function(t){if(t){var e=E(o),r=p(u+e);if(I()!==r){v=e,function(t){window.location.hash=t}(r);var i=q.lastIndexOf(E(F.location)),a=q.slice(0,-1===i?0:i+1);a.push(e),q=a,d({action:"PUSH",location:o})}else n(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),d()}})},replace:function(t,e){n(void 0===e,"Hash history cannot replace state; it is ignored");var o=T(t,void 0,void 0,F.location);h.confirmTransitionTo(o,"REPLACE",i,function(t){if(t){var e=E(o),n=p(u+e);I()!==n&&(v=e,N(n));var r=q.indexOf(E(F.location));-1!==r&&(q[r]=e),d({action:"REPLACE",location:o})}})},go:H,goBack:function(){return H(-1)},goForward:function(){return H(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=h.setPrompt(t);return $||(D(1),$=!0),function(){return $&&($=!1,D(-1)),e()}},listen:function(t){var e=h.appendListener(t);return D(1),function(){D(-1),e()}}};return F},$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},V=function(t,e,n){return Math.min(Math.max(t,e),n)},K=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,o=t.initialEntries,r=void 0===o?["/"]:o,i=t.initialIndex,a=void 0===i?0:i,c=t.keyLength,u=void 0===c?6:c,s=k(),p=function(t){F(v,t),v.length=v.entries.length,s.notifyListeners(v.location,v.action)},l=function(){return Math.random().toString(36).substr(2,u)},f=V(a,0,r.length-1),h=r.map(function(t){return T(t,void 0,"string"==typeof t?l():t.key||l())}),d=E,y=function(t){var n=V(v.index+t,0,v.entries.length-1),o=v.entries[n];s.confirmTransitionTo(o,"POP",e,function(t){t?p({action:"POP",location:o,index:n}):p()})},v={length:h.length,action:"POP",location:h[f],index:f,entries:h,createHref:d,push:function(t,o){n(!("object"===(void 0===t?"undefined":$(t))&&void 0!==t.state&&void 0!==o),"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");var r=T(t,o,l(),v.location);s.confirmTransitionTo(r,"PUSH",e,function(t){if(t){var e=v.index+1,n=v.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),p({action:"PUSH",location:r,index:e,entries:n})}})},replace:function(t,o){n(!("object"===(void 0===t?"undefined":$(t))&&void 0!==t.state&&void 0!==o),"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");var r=T(t,o,l(),v.location);s.confirmTransitionTo(r,"REPLACE",e,function(t){t&&(v.entries[v.index]=r,p({action:"REPLACE",location:r}))})},go:y,goBack:function(){return y(-1)},goForward:function(){return y(1)},canGo:function(t){var e=v.index+t;return e>=0&&e<v.entries.length},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return s.setPrompt(t)},listen:function(t){return s.appendListener(t)}};return v},J="__global_unique_id__",G=function(){return o[J]=(o[J]||0)+1},z=i(function(t,n){n.__esModule=!0;i(e);var o=i(v),r=i(G);i(l);function i(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=1073741823;n.default=function(t,n){var i,p,l="__create-react-context-"+(0,r.default)()+"__",f=function(t){function e(){var n,o,r,i;a(this,e);for(var u=arguments.length,s=Array(u),p=0;p<u;p++)s[p]=arguments[p];return n=o=c(this,t.call.apply(t,[this].concat(s))),o.emitter=(r=o.props.value,i=[],{on:function(t){i.push(t)},off:function(t){i=i.filter(function(e){return e!==t})},get:function(){return r},set:function(t,e){r=t,i.forEach(function(t){return t(r,e)})}}),c(o,n)}return u(e,t),e.prototype.getChildContext=function(){var t;return(t={})[l]=this.emitter,t},e.prototype.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var e=this.props.value,o=t.value,r=void 0;((i=e)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?r=0:(r="function"==typeof n?n(e,o):s,0!=(r|=0)&&this.emitter.set(t.value,r))}var i,a},e.prototype.render=function(){return this.props.children},e}(e.Component);f.childContextTypes=((i={})[l]=o.default.object.isRequired,i);var h=function(e){function n(){var t,o;a(this,n);for(var r=arguments.length,i=Array(r),u=0;u<r;u++)i[u]=arguments[u];return t=o=c(this,e.call.apply(e,[this].concat(i))),o.state={value:o.getValue()},o.onUpdate=function(t,e){0!=((0|o.observedBits)&e)&&o.setState({value:o.getValue()})},c(o,t)}return u(n,e),n.prototype.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=void 0===e||null===e?s:e},n.prototype.componentDidMount=function(){this.context[l]&&this.context[l].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=void 0===t||null===t?s:t},n.prototype.componentWillUnmount=function(){this.context[l]&&this.context[l].off(this.onUpdate)},n.prototype.getValue=function(){return this.context[l]?this.context[l].get():t},n.prototype.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(e.Component);return h.contextTypes=((p={})[l]=o.default.object,p),{Provider:f,Consumer:h}},t.exports=n.default});r(z);var Q=r(i(function(t,n){n.__esModule=!0;var o=i(e),r=i(z);function i(t){return t&&t.__esModule?t:{default:t}}n.default=o.default.createContext||r.default,t.exports=n.default}))({}),X=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};function Z(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var tt=function(t){function o(){var e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=n=Z(this,t.call.apply(t,[this].concat(i))),n.state={match:n.computeMatch(n.props.history.location.pathname)},Z(n,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.getChildContext=function(){return{router:X({},this.props.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},o.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},o.prototype.componentWillMount=function(){var t=this,n=this.props,o=n.children,r=n.history;m(null==o||1===e.Children.count(o),"A <Router> may have only one child element"),this.unlisten=r.listen(function(){t.setState({match:t.computeMatch(r.location.pathname)})})},o.prototype.componentWillReceiveProps=function(t){n(this.props.history===t.history,"You cannot change <Router history>")},o.prototype.componentWillUnmount=function(){this.unlisten()},o.prototype.render=function(){var t=this.props.children;return e.createElement(Q.Provider,{value:this.getChildContext()},t?e.Children.only(t):null)},o}(e.Component);tt.propTypes={history:v.object.isRequired,children:v.node,router:v.object},tt.childContextTypes={router:v.object.isRequired};var et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nt=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ot=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},rt=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},it=function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},at=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},ct=function(t){function n(){var e,o;nt(this,n);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=o=at(this,t.call.apply(t,[this].concat(i))),o.history=W(o.props),at(o,e)}return rt(n,t),n.prototype.componentWillMount=function(){},n.prototype.render=function(){return e.createElement(tt,{history:this.history,children:this.props.children})},n}(e.Component),ut=function(t){function n(){var e,o;nt(this,n);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=o=at(this,t.call.apply(t,[this].concat(i))),o.history=D(o.props),at(o,e)}return rt(n,t),n.prototype.componentWillMount=function(){},n.prototype.render=function(){return e.createElement(tt,{history:this.history,children:this.props.children})},n}(e.Component),st=function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)},pt=function(t){function n(){var e,o;nt(this,n);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=o=at(this,t.call.apply(t,[this].concat(i))),o.handleClick=function(t){return function(e){if(o.props.onClick&&o.props.onClick(e),!e.defaultPrevented&&0===e.button&&!o.props.target&&!st(e)){e.preventDefault();var n=o.props,r=n.replace,i=n.to;r?t.replace(i):t.push(i)}}},at(o,e)}return rt(n,t),n.prototype.render=function(){var t=this,n=this.props,o=(n.replace,n.to),r=n.innerRef,i=it(n,["replace","to","innerRef"]);return void 0===o&&m(!1),e.createElement(Q.Consumer,null,function(n){var a=n.router;a||m(!1);var c=a.history,u="string"==typeof o?T(o,null,null,c.location):o,s=c.createHref(u);return e.createElement("a",ot({},i,{onClick:t.handleClick(c),href:s,ref:r}))})},n}(e.Component);function lt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}pt.defaultProps={replace:!1};var ft=function(t){function o(){var e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=n=lt(this,t.call.apply(t,[this].concat(i))),n.history=K(n.props),lt(n,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.componentWillMount=function(){n(!this.props.history,"<MemoryRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},o.prototype.render=function(){return e.createElement(tt,{history:this.history,children:this.props.children})},o}(e.Component);ft.propTypes={initialEntries:v.array,initialIndex:v.number,getUserConfirmation:v.func,keyLength:v.number,children:v.node};var ht={}.toString,dt=Array.isArray||function(t){return"[object Array]"==ht.call(t)},yt=St,vt=Ot,mt=function(t,e){return Pt(Ot(t,e))},bt=Pt,gt=Tt,wt=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function Ot(t,e){for(var n,o=[],r=0,i=0,a="",c=e&&e.delimiter||"/";null!=(n=wt.exec(t));){var u=n[0],s=n[1],p=n.index;if(a+=t.slice(i,p),i=p+u.length,s)a+=s[1];else{var l=t[i],f=n[2],h=n[3],d=n[4],y=n[5],v=n[6],m=n[7];a&&(o.push(a),a="");var b=null!=f&&null!=l&&l!==f,g="+"===v||"*"===v,w="?"===v||"*"===v,O=n[2]||c,x=d||y;o.push({name:h||r++,prefix:f||"",delimiter:O,optional:w,repeat:g,partial:b,asterisk:!!m,pattern:x?Rt(x):m?".*":"[^"+jt(O)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&o.push(a),o}function xt(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function Pt(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,o){for(var r="",i=n||{},a=(o||{}).pretty?xt:encodeURIComponent,c=0;c<t.length;c++){var u=t[c];if("string"!=typeof u){var s,p=i[u.name];if(null==p){if(u.optional){u.partial&&(r+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(dt(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var l=0;l<p.length;l++){if(s=a(p[l]),!e[c].test(s))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(s)+"`");r+=(0===l?u.prefix:u.delimiter)+s}}else{if(s=u.asterisk?encodeURI(p).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):a(p),!e[c].test(s))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+s+'"');r+=u.prefix+s}}else r+=u}return r}}function jt(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function Rt(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function Et(t,e){return t.keys=e,t}function Ct(t){return t.sensitive?"":"i"}function Tt(t,e,n){dt(e)||(n=e||n,e=[]);for(var o=(n=n||{}).strict,r=!1!==n.end,i="",a=0;a<t.length;a++){var c=t[a];if("string"==typeof c)i+=jt(c);else{var u=jt(c.prefix),s="(?:"+c.pattern+")";e.push(c),c.repeat&&(s+="(?:"+u+s+")*"),i+=s=c.optional?c.partial?u+"("+s+")?":"(?:"+u+"("+s+"))?":u+"("+s+")"}}var p=jt(n.delimiter||"/"),l=i.slice(-p.length)===p;return o||(i=(l?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=r?"$":o&&l?"":"(?="+p+"|$)",Et(new RegExp("^"+i,Ct(n)),e)}function St(t,e,n){return dt(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var o=0;o<n.length;o++)e.push({name:o,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return Et(t,e)}(t,e):dt(t)?function(t,e,n){for(var o=[],r=0;r<t.length;r++)o.push(St(t[r],e,n).source);return Et(new RegExp("(?:"+o.join("|")+")",Ct(n)),e)}(t,e,n):function(t,e,n){return Tt(Ot(t,n),e,n)}(t,e,n)}yt.parse=vt,yt.compile=mt,yt.tokensToFunction=bt,yt.tokensToRegExp=gt;var kt={},_t=0,At=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"==typeof e&&(e={path:e});var o=e,r=o.path,i=o.exact,a=void 0!==i&&i,c=o.strict,u=void 0!==c&&c,s=o.sensitive,p=void 0!==s&&s;if(null==r)return n;var l=function(t,e){var n=""+e.end+e.strict+e.sensitive,o=kt[n]||(kt[n]={});if(o[t])return o[t];var r=[],i={re:yt(t,r,e),keys:r};return _t<1e4&&(o[t]=i,_t++),i}(r,{end:a,strict:u,sensitive:p}),f=l.re,h=l.keys,d=f.exec(t);if(!d)return null;var y=d[0],v=d.slice(1),m=t===y;return a&&!m?null:{path:r,url:"/"===r&&""===y?"/":y,isExact:m,params:h.reduce(function(t,e,n){return t[e.name]=v[n],t},{})}},Mt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};function Lt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var Ut=function(t){return 0===e.Children.count(t)},qt=function(t){function o(){var e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=n=Lt(this,t.call.apply(t,[this].concat(i))),n.state={match:n.computeMatch(n.props)},Lt(n,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.getChildContext=function(){return{router:Mt({},this.props.router,{route:{location:this.props.location||this.props.router.route.location,match:this.state.match}})}},o.prototype.computeMatch=function(t){var e=t.computedMatch,n=t.router,o=t.location,r=t.path,i=t.strict,a=t.exact,c=t.sensitive;if(e)return e;m(n,"You should not use <Route> or withRouter() outside a <Router>");var u=n.route,s=(o||u.location).pathname;return At(s,{path:r,strict:i,exact:a,sensitive:c},u.match)},o.prototype.componentWillMount=function(){n(!(this.props.component&&this.props.render),"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored"),n(!(this.props.component&&this.props.children&&!Ut(this.props.children)),"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored"),n(!(this.props.render&&this.props.children&&!Ut(this.props.children)),"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored")},o.prototype.componentWillReceiveProps=function(t){n(!(t.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.'),n(!(!t.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.'),this.setState({match:this.computeMatch(t)})},o.prototype.renderChildren=function(){var t=this.state.match,n=this.props,o=n.children,r=n.component,i=n.render,a=n.router,c=a.history,u=a.route,s=a.staticContext,p={match:t,location:this.props.location||u.location,history:c,staticContext:s};return r?t?e.createElement(r,p):null:i?t?i(p):null:"function"==typeof o?o(p):o&&!Ut(o)?e.Children.only(o):null},o.prototype.render=function(){return e.createElement(Q.Provider,{value:this.getChildContext()},this.renderChildren())},o}(e.Component);qt.propTypes={computedMatch:v.object,path:v.string,exact:v.bool,strict:v.bool,sensitive:v.bool,component:v.func,render:v.func,children:v.oneOfType([v.func,v.node]),location:v.object,router:v.shape({history:v.object.isRequired,route:v.object.isRequired,staticContext:v.object})},qt.childContextTypes={router:v.object.isRequired};var Ht=function(t){return e.createElement(Q.Consumer,null,function(n){var o=n.router;return e.createElement(qt,Mt({},t,{router:o}))})},Wt=function(t){var n=t.to,o=t.exact,r=t.strict,i=t.location,a=t.activeClassName,c=t.className,u=t.activeStyle,s=t.style,p=t.isActive,l=t["aria-current"],f=it(t,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive","aria-current"]),h="object"===(void 0===n?"undefined":et(n))?n.pathname:n,d=h&&h.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1");return e.createElement(Ht,{path:d,exact:o,strict:r,location:i,children:function(t){var o=t.location,r=t.match,i=!!(p?p(r,o):r);return e.createElement(pt,ot({to:n,className:i?[c,a].filter(function(t){return t}).join(" "):c,style:i?ot({},s,u):s,"aria-current":i&&l||null},f))}})};Wt.defaultProps={activeClassName:"active","aria-current":"page"};var Yt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};var Bt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.props.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){m(this.props.router,"You should not use <Prompt> outside a <Router>"),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(e.Component);Bt.propTypes={when:v.bool,message:v.oneOfType([v.func,v.string]).isRequired,router:v.shape({history:v.shape({block:v.func.isRequired}).isRequired}).isRequired},Bt.defaultProps={when:!0};var It={},Nt=0,Dt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===t?t:function(t){var e=t,n=It[e]||(It[e]={});if(n[t])return n[t];var o=yt.compile(t);return Nt<1e4&&(n[t]=o,Nt++),o}(t)(e,{pretty:!0})},$t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};var Ft=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.isStatic=function(){return this.props.router&&this.props.router.staticContext},e.prototype.componentWillMount=function(){m(this.props.router,"You should not use <Redirect> outside a <Router>"),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=T(t.to),o=T(this.props.to);S(e,o)?n(!1,"You tried to redirect to the same route you're currently on: \""+o.pathname+o.search+'"'):this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,n=t.to;return e?"string"==typeof n?Dt(n,e.params):$t({},n,{pathname:Dt(n.pathname,e.params)}):n},e.prototype.perform=function(){var t=this.props,e=t.push,n=t.router.history,o=this.computeTo(this.props);e?n.push(o):n.replace(o)},e.prototype.render=function(){return null},e}(e.Component);Ft.propTypes={computedMatch:v.object,push:v.bool,from:v.string,to:v.oneOfType([v.string,v.object]).isRequired,router:v.shape({history:v.shape({push:v.func.isRequired,replace:v.func.isRequired}).isRequired,staticContext:v.object}).isRequired},Ft.defaultProps={push:!1};var Vt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};function Kt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var Jt=function(t){return"/"===t.charAt(0)?t:"/"+t},Gt=function(t,e){return t?Vt({},e,{pathname:Jt(t)+e.pathname}):e},zt=function(t){return"string"==typeof t?t:E(t)},Qt=function(t){return function(){m(!1,"You cannot %s with <StaticRouter>",t)}},Xt=function(){},Zt=function(t){function o(){var e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=n=Kt(this,t.call.apply(t,[this].concat(i))),n.createHref=function(t){return Jt(n.props.basename+zt(t))},n.handlePush=function(t){var e=n.props,o=e.basename,r=e.context;r.action="PUSH",r.location=Gt(o,T(t)),r.url=zt(r.location)},n.handleReplace=function(t){var e=n.props,o=e.basename,r=e.context;r.action="REPLACE",r.location=Gt(o,T(t)),r.url=zt(r.location)},n.handleListen=function(){return Xt},n.handleBlock=function(){return Xt},Kt(n,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},o.prototype.componentWillMount=function(){n(!this.props.history,"<StaticRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},o.prototype.render=function(){var t=this.props,n=t.basename,o=(t.context,t.location),r=function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:function(t,e){if(!t)return e;var n=Jt(t);return 0!==e.pathname.indexOf(n)?e:Vt({},e,{pathname:e.pathname.substr(n.length)})}(n,T(o)),push:this.handlePush,replace:this.handleReplace,go:Qt("go"),goBack:Qt("goBack"),goForward:Qt("goForward"),listen:this.handleListen,block:this.handleBlock};return e.createElement(tt,Vt({},r,{history:i,router:this.getChildContext().router}))},o}(e.Component);Zt.propTypes={basename:v.string,context:v.object.isRequired,location:v.oneOfType([v.string,v.object])},Zt.defaultProps={basename:"",location:"/"},Zt.childContextTypes={router:v.object.isRequired};var te=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};var ee=function(t){function o(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.componentWillMount=function(){m(this.props.router,"You should not use <Switch> outside a <Router>")},o.prototype.componentWillReceiveProps=function(t){n(!(t.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.'),n(!(!t.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.')},o.prototype.render=function(){var t=this.props.router.route,n=this.props.children,o=this.props.location||t.location,r=void 0,i=void 0;return e.Children.forEach(n,function(n){if(null==r&&e.isValidElement(n)){var a=n.props,c=a.path,u=a.exact,s=a.strict,p=a.sensitive,l=a.from,f=c||l;i=n,r=At(o.pathname,{path:f,exact:u,strict:s,sensitive:p},t.match)}}),r?e.cloneElement(i,{location:o,computedMatch:r}):null},o}(e.Component);ee.propTypes={children:v.node,location:v.object,router:v.shape({route:v.object.isRequired}).isRequired};var ne=i(function(t,e){var n,o,r,i,a,c,u,s;t.exports=(n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r=Object.defineProperty,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,s=u&&u(Object),function t(e,p,l){if("string"!=typeof p){if(s){var f=u(p);f&&f!==s&&t(e,f,l)}var h=i(p);a&&(h=h.concat(a(p)));for(var d=0;d<h.length;++d){var y=h[d];if(!(n[y]||o[y]||l&&l[y])){var v=c(p,y);try{r(e,y,v)}catch(t){}}}return e}return e})}),oe=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};t.BrowserRouter=ct,t.HashRouter=ut,t.Link=pt,t.MemoryRouter=ft,t.NavLink=Wt,t.Prompt=function(t){return e.createElement(Q.Consumer,null,function(n){var o=n.router;return e.createElement(Bt,Yt({},t,{router:o}))})},t.Redirect=function(t){return e.createElement(Q.Consumer,null,function(n){var o=n.router;return e.createElement(Ft,$t({},t,{router:o}))})},t.Route=Ht,t.Router=tt,t.StaticRouter=Zt,t.Switch=function(t){return e.createElement(Q.Consumer,null,function(n){var o=n.router;return e.createElement(ee,te({},t,{router:o}))})},t.generatePath=Dt,t.matchPath=At,t.withRouter=function(t){var n=function(n){var o=n.wrappedComponentRef,r=function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}(n,["wrappedComponentRef"]);return e.createElement(Ht,{children:function(n){return e.createElement(t,oe({},r,n,{ref:o}))}})};return n.displayName="withRouter("+(t.displayName||t.name)+")",n.WrappedComponent=t,n.propTypes={wrappedComponentRef:v.func},ne(n,t)},Object.defineProperty(t,"__esModule",{value:!0})});

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc