Socket
Socket
Sign inDemoInstall

react-router

Package Overview
Dependencies
Maintainers
4
Versions
498
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router - npm Package Compare versions

Comparing version 4.0.0-alpha.4 to 4.0.0-alpha.5

Broadcasts.js

28

BrowserRouter.js

@@ -11,5 +11,5 @@ 'use strict';

var _BrowserHistory = require('react-history/BrowserHistory');
var _createBrowserHistory = require('history/createBrowserHistory');
var _BrowserHistory2 = _interopRequireDefault(_BrowserHistory);
var _createBrowserHistory2 = _interopRequireDefault(_createBrowserHistory);

@@ -20,2 +20,6 @@ var _StaticRouter = require('./StaticRouter');

var _History = require('./History');
var _History2 = _interopRequireDefault(_History);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -25,5 +29,2 @@

/**
* A router that uses the HTML5 history API.
*/
var BrowserRouter = function BrowserRouter(_ref) {

@@ -35,11 +36,14 @@ var basename = _ref.basename;

var props = _objectWithoutProperties(_ref, ['basename', 'forceRefresh', 'getUserConfirmation', 'keyLength']);
var routerProps = _objectWithoutProperties(_ref, ['basename', 'forceRefresh', 'getUserConfirmation', 'keyLength']);
return _react2.default.createElement(
_BrowserHistory2.default,
_History2.default,
{
basename: basename,
forceRefresh: forceRefresh,
getUserConfirmation: getUserConfirmation,
keyLength: keyLength
createHistory: _createBrowserHistory2.default,
historyOptions: {
basename: basename,
forceRefresh: forceRefresh,
getUserConfirmation: getUserConfirmation,
keyLength: keyLength
}
},

@@ -57,3 +61,3 @@ function (_ref2) {

blockTransitions: history.block
}, props));
}, routerProps));
}

@@ -60,0 +64,0 @@ );

@@ -11,6 +11,12 @@ 'use strict';

var _HashHistory = require('react-history/HashHistory');
var _createHashHistory = require('history/createHashHistory');
var _HashHistory2 = _interopRequireDefault(_HashHistory);
var _createHashHistory2 = _interopRequireDefault(_createHashHistory);
var _History = require('./History');
var _History2 = _interopRequireDefault(_History);
var _PathUtils = require('history/PathUtils');
var _StaticRouter = require('./StaticRouter');

@@ -24,2 +30,23 @@

var createHref = function createHref(hashType) {
return function (path) {
var newPath = void 0;
switch (hashType) {
case 'hashbang':
newPath = path.charAt(0) === '!' ? path : '!/' + (0, _PathUtils.stripLeadingSlash)(path);
break;
case 'noslash':
newPath = (0, _PathUtils.stripLeadingSlash)(path);
break;
case 'slash':
default:
newPath = (0, _PathUtils.addLeadingSlash)(path);
break;
}
return '#' + newPath;
};
};
/**

@@ -33,10 +60,13 @@ * A router that uses the URL hash.

var props = _objectWithoutProperties(_ref, ['basename', 'getUserConfirmation', 'hashType']);
var routerProps = _objectWithoutProperties(_ref, ['basename', 'getUserConfirmation', 'hashType']);
return _react2.default.createElement(
_HashHistory2.default,
_History2.default,
{
basename: basename,
getUserConfirmation: getUserConfirmation,
hashType: hashType
createHistory: _createHashHistory2.default,
historyOptions: {
basename: basename,
getUserConfirmation: getUserConfirmation,
hashType: hashType
}
},

@@ -53,4 +83,5 @@ function (_ref2) {

onReplace: history.replace,
blockTransitions: history.block
}, props));
blockTransitions: history.block,
createHref: createHref(hashType)
}, routerProps));
}

@@ -57,0 +88,0 @@ );

@@ -18,5 +18,5 @@ 'use strict';

var _Prompt = require('react-history/Prompt');
var _NavigationPrompt2 = require('./NavigationPrompt');
var _Prompt2 = _interopRequireDefault(_Prompt);
var _NavigationPrompt3 = _interopRequireDefault(_NavigationPrompt2);

@@ -66,3 +66,3 @@ var _Redirect2 = require('./Redirect');

exports.Miss = _Miss3.default;
exports.NavigationPrompt = _Prompt2.default;
exports.NavigationPrompt = _NavigationPrompt3.default;
exports.Redirect = _Redirect3.default;

@@ -69,0 +69,0 @@

@@ -5,3 +5,3 @@ 'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

@@ -14,3 +14,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; };

var _locationBroadcast = require('./locationBroadcast');
var _Broadcasts = require('./Broadcasts');

@@ -48,6 +48,12 @@ var _PropTypes = require('./PropTypes');

event.preventDefault();
_this.context.router.transitionTo(_this.props.to);
_this.handleTransition();
}
}, _this.handleTransition = function () {
_this.context.router.transitionTo(_this.props.to);
var router = _this.context.router;
var _this$props = _this.props;
var to = _this$props.to;
var replace = _this$props.replace;
var navigate = replace ? router.replaceWith : router.transitionTo;
navigate(to);
}, _temp), _possibleConstructorReturn(_this, _ret);

@@ -59,29 +65,43 @@ }

var router = this.context.router;
var _props = this.props;
var to = _props.to;
var style = _props.style;
var activeStyle = _props.activeStyle;
var className = _props.className;
var activeClassName = _props.activeClassName;
var propLocation = _props.location;
var getIsActive = _props.isActive;
var activeOnlyWhenExact = _props.activeOnlyWhenExact;
var replace = _props.replace;
var children = _props.children;
var rest = _objectWithoutProperties(_props, ['to', 'style', 'activeStyle', 'className', 'activeClassName', 'location', 'isActive', 'activeOnlyWhenExact', 'replace', 'children']);
var apatheticToIsActive = activeClassName === '' && Object.keys(activeStyle).length === 0 && typeof children !== 'function';
if (apatheticToIsActive) {
return _react2.default.createElement('a', _extends({
href: router ? router.createHref(to) : to,
onClick: this.handleClick,
style: style,
className: className,
children: children
}, rest));
}
return _react2.default.createElement(
_locationBroadcast.LocationSubscriber,
_Broadcasts.LocationSubscriber,
null,
function (contextLocation) {
var router = _this2.context.router;
var _props = _this2.props;
var to = _props.to;
var style = _props.style;
var activeStyle = _props.activeStyle;
var className = _props.className;
var activeClassName = _props.activeClassName;
var propLocation = _props.location;
var getIsActive = _props.isActive;
var activeOnlyWhenExact = _props.activeOnlyWhenExact;
var location = propLocation || contextLocation;
var rest = _objectWithoutProperties(_props, ['to', 'style', 'activeStyle', 'className', 'activeClassName', 'location', 'isActive', 'activeOnlyWhenExact']);
var isActive = getIsActive(location, createLocationDescriptor(to), _this2.props);
var currentLocation = propLocation || contextLocation;
var isActive = getIsActive(currentLocation, createLocationDescriptor(to), _this2.props);
// If children is a function, we are using a Function as Children Component
// so useful values will be passed down to the children function.
if (typeof rest.children == 'function') {
return rest.children({
if (typeof children == 'function') {
return children({
isActive: isActive,
currentLocation: currentLocation,
location: location,
href: router ? router.createHref(to) : to,

@@ -97,8 +117,9 @@ onClick: _this2.handleClick,

// any attempt at changing to use <Match>
return _react2.default.createElement('a', _extends({}, rest, {
return _react2.default.createElement('a', _extends({
href: router ? router.createHref(to) : to,
onClick: _this2.handleClick,
style: isActive ? _extends({}, style, activeStyle) : style,
className: isActive ? [className, activeClassName].join(' ').trim() : className
}));
className: isActive ? [className, activeClassName].join(' ').trim() : className,
children: children
}, rest));
}

@@ -112,2 +133,3 @@ );

Link.defaultProps = {
replace: false,
activeOnlyWhenExact: false,

@@ -130,2 +152,3 @@ className: '',

to: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.object]).isRequired,
replace: _react.PropTypes.bool,
activeStyle: _react.PropTypes.object,

@@ -132,0 +155,0 @@ activeClassName: _react.PropTypes.string,

@@ -8,3 +8,3 @@ 'use strict';

var _LocationUtils = require('react-history/LocationUtils');
var _LocationUtils = require('history/LocationUtils');

@@ -18,3 +18,3 @@ Object.defineProperty(exports, 'locationsAreEqual', {

var _PathUtils = require('react-history/PathUtils');
var _PathUtils = require('history/PathUtils');

@@ -21,0 +21,0 @@ var createRouterLocation = exports.createRouterLocation = function createRouterLocation(input, parseQueryString, stringifyQuery) {

@@ -19,3 +19,3 @@ 'use strict';

var _locationBroadcast = require('./locationBroadcast');
var _Broadcasts = require('./Broadcasts');

@@ -113,3 +113,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

return _react2.default.createElement(
_locationBroadcast.LocationSubscriber,
_Broadcasts.LocationSubscriber,
null,

@@ -116,0 +116,0 @@ function (locationContext) {

@@ -9,13 +9,23 @@ 'use strict';

var _MatcherCache = require('./MatcherCache');
var _MatcherCache2 = _interopRequireDefault(_MatcherCache);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var cache = {};
// cache[exactly][pattern] contains getMatcher(pattern, exactly)
var cache = {
true: new _MatcherCache2.default(),
false: new _MatcherCache2.default()
};
var getMatcher = function getMatcher(pattern) {
var matcher = cache[pattern];
var getMatcher = function getMatcher(pattern, exactly) {
var exactlyStr = exactly ? 'true' : 'false';
var matcher = cache[exactlyStr].get(pattern);
if (!matcher) {
var keys = [];
var regex = (0, _pathToRegexp2.default)(pattern, keys);
matcher = cache[pattern] = { keys: keys, regex: regex };
var regex = (0, _pathToRegexp2.default)(pattern, keys, { end: exactly, strict: true });
matcher = { keys: keys, regex: regex };
cache[exactlyStr].set(pattern, matcher);
}

@@ -26,9 +36,5 @@

var truncatePathnameToPattern = function truncatePathnameToPattern(pathname, pattern) {
return pathname.split('/').slice(0, pattern.split('/').length).join('/');
};
var parseParams = function parseParams(pattern, match, keys) {
return match.slice(1).reduce(function (params, value, index) {
params[keys[index].name] = value;
params[keys[index].name] = decodeURIComponent(value);
return params;

@@ -48,15 +54,14 @@ }, {});

} else {
if (!matchExactly && parent && pattern.charAt(0) !== '/') {
if (parent && pattern.charAt(0) !== '/') {
pattern = parent.pathname + (parent.pathname.charAt(parent.pathname.length - 1) !== '/' ? '/' : '') + pattern;
}
var matcher = getMatcher(pattern);
var pathname = matchExactly ? location.pathname : truncatePathnameToPattern(location.pathname, pattern);
var match = matcher.regex.exec(pathname);
var matcher = getMatcher(pattern, matchExactly);
var match = matcher.regex.exec(location.pathname);
if (match) {
var params = parseParams(pattern, match, matcher.keys);
var locationLength = location.pathname.split('/').length;
var patternLength = pattern.split('/').length;
var isExact = locationLength === patternLength;
var pathname = match[0];
var isExact = pathname === location.pathname;
return { params: params, isExact: isExact, pathname: pathname };

@@ -63,0 +68,0 @@ } else {

@@ -86,11 +86,6 @@ 'use strict';

if (this.subscribers.length) {
var hadMatches = this.hasMatches;
this.hasMatches = this.matches.length !== 0;
// optimization, don't notify if nothing changed initial will be null, so
// we can get initial render correct
if (this.hasMatches !== hadMatches) {
this.subscribers.forEach(function (fn) {
return fn(_this3.hasMatches);
});
}
this.subscribers.forEach(function (fn) {
return fn(_this3.hasMatches);
});
}

@@ -97,0 +92,0 @@ };

@@ -11,5 +11,5 @@ 'use strict';

var _MemoryHistory = require('react-history/MemoryHistory');
var _createMemoryHistory = require('history/createMemoryHistory');
var _MemoryHistory2 = _interopRequireDefault(_MemoryHistory);
var _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory);

@@ -20,2 +20,6 @@ var _StaticRouter = require('./StaticRouter');

var _History = require('./History');
var _History2 = _interopRequireDefault(_History);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -25,5 +29,2 @@

/**
* A router that stores all locations in memory.
*/
var MemoryRouter = function MemoryRouter(_ref) {

@@ -35,11 +36,14 @@ var getUserConfirmation = _ref.getUserConfirmation;

var props = _objectWithoutProperties(_ref, ['getUserConfirmation', 'initialEntries', 'initialIndex', 'keyLength']);
var routerProps = _objectWithoutProperties(_ref, ['getUserConfirmation', 'initialEntries', 'initialIndex', 'keyLength']);
return _react2.default.createElement(
_MemoryHistory2.default,
_History2.default,
{
getUserConfirmation: getUserConfirmation,
initialEntries: initialEntries,
initialIndex: initialIndex,
keyLength: keyLength
createHistory: _createMemoryHistory2.default,
historyOptions: {
getUserConfirmation: getUserConfirmation,
initialEntries: initialEntries,
initialIndex: initialIndex,
keyLength: keyLength
}
},

@@ -56,3 +60,3 @@ function (_ref2) {

blockTransitions: history.block
}, props));
}, routerProps));
}

@@ -59,0 +63,0 @@ );

@@ -5,8 +5,74 @@ 'use strict';

var _Prompt = require('react-history/Prompt');
var _react = require('react');
var _Prompt2 = _interopRequireDefault(_Prompt);
var _react2 = _interopRequireDefault(_react);
var _PropTypes = require('./PropTypes');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = _Prompt2.default;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var NavigationPrompt = function (_React$Component) {
_inherits(NavigationPrompt, _React$Component);
function NavigationPrompt() {
_classCallCheck(this, NavigationPrompt);
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
}
NavigationPrompt.prototype.block = function block() {
if (!this.teardownPrompt) this.teardownPrompt = this.context.history.block(this.props.message);
};
NavigationPrompt.prototype.unblock = function unblock() {
if (this.teardownPrompt) {
this.teardownPrompt();
this.teardownPrompt = null;
}
};
NavigationPrompt.prototype.componentWillMount = function componentWillMount() {
if (this.props.when) this.block();
};
NavigationPrompt.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
if (nextProps.when) {
this.block();
} else {
this.unblock();
}
};
NavigationPrompt.prototype.componentWillUnmount = function componentWillUnmount() {
this.unblock();
};
NavigationPrompt.prototype.render = function render() {
return null;
};
return NavigationPrompt;
}(_react2.default.Component);
NavigationPrompt.contextTypes = {
history: _PropTypes.historyContext.isRequired
};
NavigationPrompt.defaultProps = {
when: true
};
if (process.env.NODE_ENV !== 'production') {
NavigationPrompt.propTypes = {
when: _react.PropTypes.bool,
message: _react.PropTypes.oneOfType([_react.PropTypes.func, _react.PropTypes.string]).isRequired
};
}
exports.default = NavigationPrompt;

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

## [v4.3.0]
> Sep 29, 2016
- Allow relative pathnames in `history.push` and `history.replace` ([#135])
[v4.3.0]: https://github.com/mjackson/history/compare/v4.2.1...v4.3.0
[#135]: https://github.com/mjackson/history/issues/135
## [v4.2.1]
> Sep 29, 2016
- Fixed `createLocation` defaults when using objects instead of strings
[v4.2.1]: https://github.com/mjackson/history/compare/v4.2.0...v4.2.1
## [v4.2.0]

@@ -2,0 +17,0 @@ > Sep 15, 2016

@@ -165,3 +165,3 @@ 'use strict';

var action = 'PUSH';
var location = (0, _LocationUtils.createLocation)(path, state, createKey());
var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);

@@ -202,3 +202,3 @@ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {

var action = 'REPLACE';
var location = (0, _LocationUtils.createLocation)(path, state, createKey());
var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);

@@ -205,0 +205,0 @@ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {

@@ -186,3 +186,3 @@ 'use strict';

var action = 'PUSH';
var location = (0, _LocationUtils.createLocation)(path);
var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location);

@@ -222,3 +222,3 @@ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {

var action = 'REPLACE';
var location = (0, _LocationUtils.createLocation)(path);
var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location);

@@ -225,0 +225,0 @@ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {

@@ -55,3 +55,3 @@ 'use strict';

var entries = initialEntries.map(function (entry, index) {
return typeof entry === 'string' ? (0, _LocationUtils.createLocation)(entry, index ? createKey() : undefined) : entry;
return typeof entry === 'string' ? (0, _LocationUtils.createLocation)(entry, undefined, index ? createKey() : undefined) : (0, _LocationUtils.createLocation)(entry, undefined, index ? entry.key || createKey() : undefined);
});

@@ -65,3 +65,3 @@

var action = 'PUSH';
var location = (0, _LocationUtils.createLocation)(path, state, createKey());
var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);

@@ -94,3 +94,3 @@ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {

var action = 'REPLACE';
var location = (0, _LocationUtils.createLocation)(path, state, createKey());
var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);

@@ -97,0 +97,0 @@ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {

@@ -10,5 +10,11 @@ 'use strict';

var _resolvePathname = require('resolve-pathname');
var _resolvePathname2 = _interopRequireDefault(_resolvePathname);
var _PathUtils = require('./PathUtils');
var createLocation = exports.createLocation = function createLocation(path, state, key) {
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var createLocation = exports.createLocation = function createLocation(path, state, key, currentLocation) {
var location = void 0;

@@ -23,7 +29,15 @@ if (typeof path === 'string') {

if (!location.pathname) location.pathname = '/';
if (location.pathname === undefined) location.pathname = '';
if (location.search && location.search.charAt(0) !== '?') location.search = '?' + location.search;
if (location.search) {
if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
} else {
location.search = '';
}
if (location.hash && location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
if (location.hash) {
if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
} else {
location.hash = '';
}

@@ -35,2 +49,11 @@ if (state !== undefined && location.state === undefined) location.state = state;

if (currentLocation) {
// Resolve incomplete/relative pathname relative to current location.
if (!location.pathname) {
location.pathname = currentLocation.pathname;
} else if (location.pathname.charAt(0) !== '/') {
location.pathname = (0, _resolvePathname2.default)(location.pathname, currentLocation.pathname);
}
}
return location;

@@ -54,8 +77,8 @@ };

} else if (typeofA === 'object') {
var keysOfA = Object.keys(a);
var keysOfB = Object.keys(b);
var aKeys = Object.keys(a);
var bKeys = Object.keys(b);
if (keysOfA.length !== keysOfB.length) return false;
if (aKeys.length !== bKeys.length) return false;
return keysOfA.every(function (key) {
return aKeys.every(function (key) {
return looseEqual(a[key], b[key]);

@@ -62,0 +85,0 @@ });

{
"_args": [
[
"history@^4.2.0",
"/Users/ryanflorence/Code/github/reacttraining/react-router/node_modules/react-history"
]
],
"_from": "history@>=4.2.0 <5.0.0",
"_id": "history@4.2.0",
"_inCache": true,
"_installable": true,
"_location": "/history",
"_nodeVersion": "6.4.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/history-4.2.0.tgz_1473978516880_0.027491586050018668"
"name": "history",
"version": "4.3.0",
"description": "Manage session history with JavaScript",
"repository": "mjackson/history",
"author": "Michael Jackson",
"license": "MIT",
"scripts": {
"start": "webpack-dev-server -d --content-base ./ --history-api-fallback --inline modules/index.js",
"build-lib": "babel ./modules -d . --ignore '__tests__'",
"build-umd": "webpack modules/index.js umd/history.js",
"build-min": "webpack -p modules/index.js umd/history.min.js",
"build": "node ./scripts/build.js",
"release": "node ./scripts/release.js",
"prepublish": "node ./scripts/build.js",
"test": "npm run lint && karma start",
"lint": "eslint modules"
},
"_npmUser": {
"email": "mjijackson@gmail.com",
"name": "mjackson"
},
"_npmVersion": "3.10.3",
"_phantomChildren": {},
"_requested": {
"name": "history",
"raw": "history@^4.2.0",
"rawSpec": "^4.2.0",
"scope": null,
"spec": ">=4.2.0 <5.0.0",
"type": "range"
},
"_requiredBy": [
"/react-history"
],
"_resolved": "https://registry.npmjs.org/history/-/history-4.2.0.tgz",
"_shasum": "c90efa2d51c11bc0ebbbc0d8334dc95bbd254cad",
"_shrinkwrap": null,
"_spec": "history@^4.2.0",
"_where": "/Users/ryanflorence/Code/github/reacttraining/react-router/node_modules/react-history",
"author": {
"name": "Michael Jackson"
},
"browserify": {
"transform": [
"loose-envify"
]
},
"bugs": {
"url": "https://github.com/mjackson/history/issues"
},
"dependencies": {
"invariant": "^2.2.1",
"loose-envify": "^1.2.0",
"resolve-pathname": "^2.0.0",
"warning": "^3.0.0"
},
"description": "Manage session history with JavaScript",
"devDependencies": {
"babel-cli": "^6.10.1",
"babel-core": "^6.9.1",
"babel-eslint": "^6.0.4",
"babel-eslint": "^7.0.0",
"babel-loader": "^6.2.4",

@@ -68,3 +36,3 @@ "babel-plugin-dev-expression": "^0.2.1",

"eslint": "^3.3.0",
"eslint-plugin-import": "^1.8.1",
"eslint-plugin-import": "^2.0.0",
"expect": "^1.20.1",

@@ -87,39 +55,11 @@ "gzip-size": "^3.0.0",

},
"directories": {},
"dist": {
"shasum": "c90efa2d51c11bc0ebbbc0d8334dc95bbd254cad",
"tarball": "https://registry.npmjs.org/history/-/history-4.2.0.tgz"
"browserify": {
"transform": [
"loose-envify"
]
},
"gitHead": "b37e9c868022b2bb7c57efdfdc2252e4447c32da",
"homepage": "https://github.com/mjackson/history#readme",
"keywords": [
"history",
"location"
],
"license": "MIT",
"maintainers": [
{
"name": "mjackson",
"email": "mjijackson@gmail.com"
}
],
"name": "history",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/mjackson/history.git"
},
"scripts": {
"build": "node ./scripts/build.js",
"build-lib": "babel ./modules -d . --ignore '__tests__'",
"build-min": "webpack -p modules/index.js umd/history.min.js",
"build-umd": "webpack modules/index.js umd/history.js",
"lint": "eslint modules",
"prepublish": "node ./scripts/build.js",
"release": "node ./scripts/release.js",
"start": "webpack-dev-server -d --content-base ./ --history-api-fallback --inline modules/index.js",
"test": "npm run lint && karma start"
},
"version": "4.2.0"
]
}

@@ -45,2 +45,3 @@ 'use strict';

var path = pathname || '/';

@@ -47,0 +48,0 @@

@@ -77,3 +77,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

var _PathUtils = __webpack_require__(2);
var _PathUtils = __webpack_require__(3);

@@ -93,11 +93,11 @@ Object.defineProperty(exports, 'parsePath', {

var _createBrowserHistory2 = __webpack_require__(3);
var _createBrowserHistory2 = __webpack_require__(4);
var _createBrowserHistory3 = _interopRequireDefault(_createBrowserHistory2);
var _createHashHistory2 = __webpack_require__(9);
var _createHashHistory2 = __webpack_require__(10);
var _createHashHistory3 = _interopRequireDefault(_createHashHistory2);
var _createMemoryHistory2 = __webpack_require__(10);
var _createMemoryHistory2 = __webpack_require__(11);

@@ -125,5 +125,11 @@ var _createMemoryHistory3 = _interopRequireDefault(_createMemoryHistory2);

var _PathUtils = __webpack_require__(2);
var _resolvePathname = __webpack_require__(2);
var createLocation = exports.createLocation = function createLocation(path, state, key) {
var _resolvePathname2 = _interopRequireDefault(_resolvePathname);
var _PathUtils = __webpack_require__(3);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var createLocation = exports.createLocation = function createLocation(path, state, key, currentLocation) {
var location = void 0;

@@ -138,7 +144,15 @@ if (typeof path === 'string') {

if (!location.pathname) location.pathname = '/';
if (location.pathname === undefined) location.pathname = '';
if (location.search && location.search.charAt(0) !== '?') location.search = '?' + location.search;
if (location.search) {
if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
} else {
location.search = '';
}
if (location.hash && location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
if (location.hash) {
if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
} else {
location.hash = '';
}

@@ -150,2 +164,11 @@ if (state !== undefined && location.state === undefined) location.state = state;

if (currentLocation) {
// Resolve incomplete/relative pathname relative to current location.
if (!location.pathname) {
location.pathname = currentLocation.pathname;
} else if (location.pathname.charAt(0) !== '/') {
location.pathname = (0, _resolvePathname2.default)(location.pathname, currentLocation.pathname);
}
}
return location;

@@ -169,8 +192,8 @@ };

} else if (typeofA === 'object') {
var keysOfA = Object.keys(a);
var keysOfB = Object.keys(b);
var aKeys = Object.keys(a);
var bKeys = Object.keys(b);
if (keysOfA.length !== keysOfB.length) return false;
if (aKeys.length !== bKeys.length) return false;
return keysOfA.every(function (key) {
return aKeys.every(function (key) {
return looseEqual(a[key], b[key]);

@@ -189,2 +212,8 @@ });

/* 2 */
/***/ function(module, exports, __webpack_require__) {
!function(t,e){ true?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.resolvePathname=e():t.resolvePathname=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e){"use strict";var r=function(t){return"/"===t.charAt(0)},n=function(t,e){for(var r=e,n=r+1,o=t.length;o>n;r+=1,n+=1)t[r]=t[n];t.pop()},o=function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1],o=t&&t.split("/")||[],i=e&&e.split("/")||[],f=t&&r(t),s=e&&r(e),u=f||s;if(t&&r(t)?i=o:o.length&&(i.pop(),i=i.concat(o)),!i.length)return"/";var p=void 0;if(i.length){var a=i[i.length-1];p="."===a||".."===a||""===a}else p=!1;for(var c=0,l=i.length;l>=0;l--){var v=i[l];"."===v?n(i,l):".."===v?(n(i,l),c++):c&&(n(i,l),c--)}if(!u)for(;c--;c)i.unshift("..");!u||""===i[0]||i[0]&&r(i[0])||i.unshift("");var d=i.join("/");return p&&"/"!==d.substr(-1)&&(d+="/"),d};t.exports=o}])});
/***/ },
/* 3 */
/***/ function(module, exports) {

@@ -236,2 +265,3 @@

var path = pathname || '/';

@@ -247,3 +277,3 @@

/***/ },
/* 3 */
/* 4 */
/***/ function(module, exports, __webpack_require__) {

@@ -259,7 +289,7 @@

var _warning = __webpack_require__(4);
var _warning = __webpack_require__(5);
var _warning2 = _interopRequireDefault(_warning);
var _invariant = __webpack_require__(5);
var _invariant = __webpack_require__(6);

@@ -270,11 +300,11 @@ var _invariant2 = _interopRequireDefault(_invariant);

var _PathUtils = __webpack_require__(2);
var _PathUtils = __webpack_require__(3);
var _createTransitionManager = __webpack_require__(6);
var _createTransitionManager = __webpack_require__(7);
var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);
var _ExecutionEnvironment = __webpack_require__(7);
var _ExecutionEnvironment = __webpack_require__(8);
var _DOMUtils = __webpack_require__(8);
var _DOMUtils = __webpack_require__(9);

@@ -417,3 +447,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var action = 'PUSH';
var location = (0, _LocationUtils.createLocation)(path, state, createKey());
var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);

@@ -454,3 +484,3 @@ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {

var action = 'REPLACE';
var location = (0, _LocationUtils.createLocation)(path, state, createKey());
var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);

@@ -564,3 +594,3 @@ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {

/***/ },
/* 4 */
/* 5 */
/***/ function(module, exports, __webpack_require__) {

@@ -631,3 +661,3 @@

/***/ },
/* 5 */
/* 6 */
/***/ function(module, exports, __webpack_require__) {

@@ -689,3 +719,3 @@

/***/ },
/* 6 */
/* 7 */
/***/ function(module, exports, __webpack_require__) {

@@ -697,3 +727,3 @@

var _warning = __webpack_require__(4);
var _warning = __webpack_require__(5);

@@ -774,3 +804,3 @@ var _warning2 = _interopRequireDefault(_warning);

/***/ },
/* 7 */
/* 8 */
/***/ function(module, exports) {

@@ -784,3 +814,3 @@

/***/ },
/* 8 */
/* 9 */
/***/ function(module, exports) {

@@ -834,3 +864,3 @@

/***/ },
/* 9 */
/* 10 */
/***/ function(module, exports, __webpack_require__) {

@@ -844,7 +874,7 @@

var _warning = __webpack_require__(4);
var _warning = __webpack_require__(5);
var _warning2 = _interopRequireDefault(_warning);
var _invariant = __webpack_require__(5);
var _invariant = __webpack_require__(6);

@@ -855,11 +885,11 @@ var _invariant2 = _interopRequireDefault(_invariant);

var _PathUtils = __webpack_require__(2);
var _PathUtils = __webpack_require__(3);
var _createTransitionManager = __webpack_require__(6);
var _createTransitionManager = __webpack_require__(7);
var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);
var _ExecutionEnvironment = __webpack_require__(7);
var _ExecutionEnvironment = __webpack_require__(8);
var _DOMUtils = __webpack_require__(8);
var _DOMUtils = __webpack_require__(9);

@@ -1025,3 +1055,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var action = 'PUSH';
var location = (0, _LocationUtils.createLocation)(path);
var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location);

@@ -1061,3 +1091,3 @@ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {

var action = 'REPLACE';
var location = (0, _LocationUtils.createLocation)(path);
var location = (0, _LocationUtils.createLocation)(path, undefined, undefined, history.location);

@@ -1164,3 +1194,3 @@ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {

/***/ },
/* 10 */
/* 11 */
/***/ function(module, exports, __webpack_require__) {

@@ -1176,3 +1206,3 @@

var _warning = __webpack_require__(4);
var _warning = __webpack_require__(5);

@@ -1183,3 +1213,3 @@ var _warning2 = _interopRequireDefault(_warning);

var _createTransitionManager = __webpack_require__(6);
var _createTransitionManager = __webpack_require__(7);

@@ -1224,3 +1254,3 @@ var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);

var entries = initialEntries.map(function (entry, index) {
return typeof entry === 'string' ? (0, _LocationUtils.createLocation)(entry, index ? createKey() : undefined) : entry;
return typeof entry === 'string' ? (0, _LocationUtils.createLocation)(entry, undefined, index ? createKey() : undefined) : (0, _LocationUtils.createLocation)(entry, undefined, index ? entry.key || createKey() : undefined);
});

@@ -1234,3 +1264,3 @@

var action = 'PUSH';
var location = (0, _LocationUtils.createLocation)(path, state, createKey());
var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);

@@ -1263,3 +1293,3 @@ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {

var action = 'REPLACE';
var location = (0, _LocationUtils.createLocation)(path, state, createKey());
var location = (0, _LocationUtils.createLocation)(path, state, createKey(), history.location);

@@ -1266,0 +1296,0 @@ transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {

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

!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.History=t():n.History=t()}(this,function(){return function(n){function t(o){if(e[o])return e[o].exports;var r=e[o]={exports:{},id:o,loaded:!1};return n[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var e={};return t.m=n,t.c=e,t.p="",t(0)}([function(n,t,e){"use strict";function o(n){return n&&n.__esModule?n:{"default":n}}t.__esModule=!0,t.createPath=t.parsePath=t.locationsAreEqual=t.createLocation=t.createMemoryHistory=t.createHashHistory=t.createBrowserHistory=void 0;var r=e(1);Object.defineProperty(t,"createLocation",{enumerable:!0,get:function(){return r.createLocation}}),Object.defineProperty(t,"locationsAreEqual",{enumerable:!0,get:function(){return r.locationsAreEqual}});var i=e(2);Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return i.parsePath}}),Object.defineProperty(t,"createPath",{enumerable:!0,get:function(){return i.createPath}});var a=e(8),c=o(a),u=e(9),s=o(u),f=e(10),l=o(f);t.createBrowserHistory=c["default"],t.createHashHistory=s["default"],t.createMemoryHistory=l["default"]},function(n,t,e){"use strict";t.__esModule=!0,t.locationsAreEqual=t.createLocation=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n},r=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n},i=e(2),a=(t.createLocation=function(n,t,e){var o=void 0;return"string"==typeof n?(o=(0,i.parsePath)(n),o.state=t):(o=r({},n),o.pathname||(o.pathname="/"),o.search&&"?"!==o.search.charAt(0)&&(o.search="?"+o.search),o.hash&&"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash),void 0!==t&&void 0===o.state&&(o.state=t)),o.key=e,o},function c(n,t){if(null==n)return n==t;var e="undefined"==typeof n?"undefined":o(n),r="undefined"==typeof t?"undefined":o(t);if(e!==r)return!1;if(Array.isArray(n))return!(!Array.isArray(t)||n.length!==t.length)&&n.every(function(n,e){return c(n,t[e])});if("object"===e){var i=Object.keys(n),a=Object.keys(t);return i.length===a.length&&i.every(function(e){return c(n[e],t[e])})}return n===t});t.locationsAreEqual=function(n,t){return n.pathname===t.pathname&&n.search===t.search&&n.hash===t.hash&&n.key===t.key&&a(n.state,t.state)}},function(n,t){"use strict";t.__esModule=!0;t.addLeadingSlash=function(n){return"/"===n.charAt(0)?n:"/"+n},t.stripLeadingSlash=function(n){return"/"===n.charAt(0)?n.substr(1):n},t.stripPrefix=function(n,t){return 0===n.indexOf(t)?n.substr(t.length):n},t.parsePath=function(n){var t=n||"/",e="",o="",r=t.indexOf("#");r!==-1&&(o=t.substr(r),t=t.substr(0,r));var i=t.indexOf("?");return i!==-1&&(e=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===e?"":e,hash:"#"===o?"":o}},t.createPath=function(n){var t=n.pathname,e=n.search,o=n.hash,r=t||"/";return e&&"?"!==e&&(r+="?"===e.charAt(0)?e:"?"+e),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r}},function(n,t,e){"use strict";var o=function(){};n.exports=o},function(n,t,e){"use strict";function o(n){return n&&n.__esModule?n:{"default":n}}t.__esModule=!0;var r=e(3),i=(o(r),function(){var n=null,t=function(t){return n=t,function(){n===t&&(n=null)}},e=function(t,e,o,r){if(null!=n){var i="function"==typeof n?n(t,e):n;"string"==typeof i?"function"==typeof o?o(i,r):r(!0):r(i!==!1)}else r(!0)},o=[],r=function(n){return o.push(n),function(){o=o.filter(function(t){return t!==n})}},i=function(){for(var n=arguments.length,t=Array(n),e=0;e<n;e++)t[e]=arguments[e];return o.forEach(function(n){return n.apply(void 0,t)})};return{setPrompt:t,confirmTransitionTo:e,appendListener:r,notifyListeners:i}});t["default"]=i},function(n,t){"use strict";t.__esModule=!0;t.addEventListener=function(n,t,e){return n.addEventListener?n.addEventListener(t,e,!1):n.attachEvent("on"+t,e)},t.removeEventListener=function(n,t,e){return n.removeEventListener?n.removeEventListener(t,e,!1):n.detachEvent("on"+t,e)},t.getConfirmation=function(n,t){return t(window.confirm(n))},t.supportsHistory=function(){var n=window.navigator.userAgent;return(n.indexOf("Android 2.")===-1&&n.indexOf("Android 4.0")===-1||n.indexOf("Mobile Safari")===-1||n.indexOf("Chrome")!==-1||n.indexOf("Windows Phone")!==-1)&&(window.history&&"pushState"in window.history)},t.supportsPopStateOnHashChange=function(){return window.navigator.userAgent.indexOf("Trident")===-1},t.supportsGoWithoutReloadUsingHash=function(){return window.navigator.userAgent.indexOf("Firefox")===-1}},function(n,t){"use strict";t.__esModule=!0;t.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(n,t,e){"use strict";var o=function(n,t,e,o,r,i,a,c){if(!n){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[e,o,r,i,a,c],f=0;u=new Error(t.replace(/%s/g,function(){return s[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};n.exports=o},function(n,t,e){"use strict";function o(n){return n&&n.__esModule?n:{"default":n}}t.__esModule=!0;var r=("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n},Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n}),i=e(3),a=(o(i),e(7)),c=o(a),u=e(1),s=e(2),f=e(4),l=o(f),d=e(6),h=e(5),v="popstate",p="hashchange",y=function(){try{return window.history.state||{}}catch(n){return{}}},g=function(){var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];d.canUseDOM?void 0:(0,c["default"])(!1);var t=window.history,e=(0,h.supportsHistory)(),o=!(0,h.supportsPopStateOnHashChange)(),i=n.basename,a=void 0===i?"":i,f=n.forceRefresh,g=void 0!==f&&f,m=n.getUserConfirmation,w=void 0===m?h.getConfirmation:m,P=n.keyLength,b=void 0===P?6:P,O=function(n){var t=n||{},e=t.key,o=t.state,i=window.location,c=i.pathname,u=i.search,f=i.hash,l=c+u+f;return a&&(l=(0,s.stripPrefix)(l,a)),r({},(0,s.parsePath)(l),{state:o,key:e})},x=function(){return Math.random().toString(36).substr(2,b)},L=(0,l["default"])(),E=function(n){r(W,n),W.length=t.length,L.notifyListeners(W.location,W.action)},S=function(n){void 0!==n.state&&k(O(n.state))},_=function(){k(O(y()))},A=!1,k=function(n){A?(A=!1,E()):!function(){var t="POP";L.confirmTransitionTo(n,t,w,function(e){e?E({action:t,location:n}):M(n)})}()},M=function(n){var t=W.location,e=H.indexOf(t.key);e===-1&&(e=0);var o=H.indexOf(n.key);o===-1&&(o=0);var r=e-o;r&&(A=!0,U(r))},T=O(y()),H=[T.key],j=function(n,o){var r="PUSH",i=(0,u.createLocation)(n,o,x());L.confirmTransitionTo(i,r,w,function(n){if(n){var o=a+(0,s.createPath)(i),c=i.key,u=i.state;if(e)if(t.pushState({key:c,state:u},null,o),g)window.location.href=o;else{var f=H.indexOf(W.location.key),l=H.slice(0,f===-1?0:f+1);l.push(i.key),H=l,E({action:r,location:i})}else window.location.href=o}})},C=function(n,o){var r="REPLACE",i=(0,u.createLocation)(n,o,x());L.confirmTransitionTo(i,r,w,function(n){if(n){var o=a+(0,s.createPath)(i),c=i.key,u=i.state;if(e)if(t.replaceState({key:c,state:u},null,o),g)window.location.replace(o);else{var f=H.indexOf(W.location.key);f!==-1&&(H[f]=i.key),E({action:r,location:i})}else window.location.replace(o)}})},U=function(n){t.go(n)},q=function(){return U(-1)},R=function(){return U(1)},B=0,I=function(n){B+=n,1===B?((0,h.addEventListener)(window,v,S),o&&(0,h.addEventListener)(window,p,_)):0===B&&((0,h.removeEventListener)(window,v,S),o&&(0,h.removeEventListener)(window,p,_))},F=!1,D=function(){var n=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],t=L.setPrompt(n);return F||(I(1),F=!0),function(){return F&&(F=!1,I(-1)),t()}},G=function(n){var t=L.appendListener(n);return I(1),function(){return I(-1),t()}},W={length:t.length,action:"POP",location:T,push:j,replace:C,go:U,goBack:q,goForward:R,block:D,listen:G};return W};t["default"]=g},function(n,t,e){"use strict";function o(n){return n&&n.__esModule?n:{"default":n}}t.__esModule=!0;var r=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n},i=e(3),a=(o(i),e(7)),c=o(a),u=e(1),s=e(2),f=e(4),l=o(f),d=e(6),h=e(5),v="hashchange",p={hashbang:{encodePath:function(n){return"!"===n.charAt(0)?n:"!/"+(0,s.stripLeadingSlash)(n)},decodePath:function(n){return"!"===n.charAt(0)?n.substr(1):n}},noslash:{encodePath:s.stripLeadingSlash,decodePath:s.addLeadingSlash},slash:{encodePath:s.addLeadingSlash,decodePath:s.addLeadingSlash}},y=function(){var n=window.location.href,t=n.indexOf("#");return t===-1?"":n.substring(t+1)},g=function(n){return window.location.hash=n},m=function(n){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+n)},w=function(){var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];d.canUseDOM?void 0:(0,c["default"])(!1);var t=window.history,e=((0,h.supportsGoWithoutReloadUsingHash)(),n.basename),o=void 0===e?"":e,i=n.getUserConfirmation,a=void 0===i?h.getConfirmation:i,f=n.hashType,w=void 0===f?"slash":f,P=p[w],b=P.encodePath,O=P.decodePath,x=function(){var n=O(y());return o&&(n=(0,s.stripPrefix)(n,o)),(0,s.parsePath)(n)},L=(0,l["default"])(),E=function(n){r(z,n),z.length=t.length,L.notifyListeners(z.location,z.action)},S=!1,_=null,A=function(){var n=y(),t=b(n);if(n!==t)m(t);else{var e=x(),o=z.location;if(!S&&(0,u.locationsAreEqual)(o,e))return;if(_===(0,s.createPath)(e))return;_=null,k(e)}},k=function(n){S?(S=!1,E()):!function(){var t="POP";L.confirmTransitionTo(n,t,a,function(e){e?E({action:t,location:n}):M(n)})}()},M=function(n){var t=z.location,e=C.lastIndexOf((0,s.createPath)(t));e===-1&&(e=0);var o=C.lastIndexOf((0,s.createPath)(n));o===-1&&(o=0);var r=e-o;r&&(S=!0,R(r))},T=y(),H=b(T);T!==H&&m(H);var j=x(),C=[(0,s.createPath)(j)],U=function(n,t){var e="PUSH",r=(0,u.createLocation)(n);L.confirmTransitionTo(r,e,a,function(n){if(n){var t=(0,s.createPath)(r),i=b(o+t),a=y()!==i;if(a){_=t,g(i);var c=C.lastIndexOf((0,s.createPath)(z.location)),u=C.slice(0,c===-1?0:c+1);u.push(t),C=u,E({action:e,location:r})}else E()}})},q=function(n,t){var e="REPLACE",r=(0,u.createLocation)(n);L.confirmTransitionTo(r,e,a,function(n){if(n){var t=(0,s.createPath)(r),i=b(o+t),a=y()!==i;a&&(_=t,m(i));var c=C.indexOf((0,s.createPath)(z.location));c!==-1&&(C[c]=t),E({action:e,location:r})}})},R=function(n){t.go(n)},B=function(){return R(-1)},I=function(){return R(1)},F=0,D=function(n){F+=n,1===F?(0,h.addEventListener)(window,v,A):0===F&&(0,h.removeEventListener)(window,v,A)},G=!1,W=function(){var n=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],t=L.setPrompt(n);return G||(D(1),G=!0),function(){return G&&(G=!1,D(-1)),t()}},V=function(n){var t=L.appendListener(n);return D(1),function(){return D(-1),t()}},z={length:t.length,action:"POP",location:j,push:U,replace:q,go:R,goBack:B,goForward:I,block:W,listen:V};return z};t["default"]=w},function(n,t,e){"use strict";function o(n){return n&&n.__esModule?n:{"default":n}}t.__esModule=!0;var r=("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n},Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n}),i=e(3),a=(o(i),e(1)),c=e(4),u=o(c),s=function(n,t,e){return Math.min(Math.max(n,t),e)},f=function(){var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=n.getUserConfirmation,e=n.initialEntries,o=void 0===e?["/"]:e,i=n.initialIndex,c=void 0===i?0:i,f=n.keyLength,l=void 0===f?6:f,d=(0,u["default"])(),h=function(n){r(E,n),E.length=E.entries.length,d.notifyListeners(E.location,E.action)},v=function(){return Math.random().toString(36).substr(2,l)},p=s(c,0,o.length-1),y=o.map(function(n,t){return"string"==typeof n?(0,a.createLocation)(n,t?v():void 0):n}),g=function(n,e){var o="PUSH",r=(0,a.createLocation)(n,e,v());d.confirmTransitionTo(r,o,t,function(n){if(n){var t=E.index,e=t+1,i=E.entries.slice(0);i.length>e?i.splice(e,i.length-e,r):i.push(r),h({action:o,location:r,index:e,entries:i})}})},m=function(n,e){var o="REPLACE",r=(0,a.createLocation)(n,e,v());d.confirmTransitionTo(r,o,t,function(n){n&&(E.entries[E.index]=r,h({action:o,location:r}))})},w=function(n){var e=s(E.index+n,0,E.entries.length-1),o="POP",r=E.entries[e];d.confirmTransitionTo(r,o,t,function(n){n?h({action:o,location:r,index:e}):h()})},P=function(){return w(-1)},b=function(){return w(1)},O=function(n){var t=E.index+n;return t>=0&&t<E.entries.length},x=function(){var n=!(arguments.length<=0||void 0===arguments[0])&&arguments[0];return d.setPrompt(n)},L=function(n){return d.appendListener(n)},E={length:y.length,action:"POP",location:y[p],index:p,entries:y,push:g,replace:m,go:w,goBack:P,goForward:b,canGo:O,block:x,listen:L};return E};t["default"]=f}])});
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.History=n():t.History=n()}(this,function(){return function(t){function n(o){if(e[o])return e[o].exports;var r=e[o]={exports:{},id:o,loaded:!1};return t[o].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0,n.createPath=n.parsePath=n.locationsAreEqual=n.createLocation=n.createMemoryHistory=n.createHashHistory=n.createBrowserHistory=void 0;var r=e(1);Object.defineProperty(n,"createLocation",{enumerable:!0,get:function(){return r.createLocation}}),Object.defineProperty(n,"locationsAreEqual",{enumerable:!0,get:function(){return r.locationsAreEqual}});var i=e(2);Object.defineProperty(n,"parsePath",{enumerable:!0,get:function(){return i.parsePath}}),Object.defineProperty(n,"createPath",{enumerable:!0,get:function(){return i.createPath}});var a=e(8),c=o(a),u=e(9),s=o(u),f=e(10),l=o(f);n.createBrowserHistory=c["default"],n.createHashHistory=s["default"],n.createMemoryHistory=l["default"]},function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0,n.locationsAreEqual=n.createLocation=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},a=e(11),c=o(a),u=e(2),s=(n.createLocation=function(t,n,e,o){var r=void 0;return"string"==typeof t?(r=(0,u.parsePath)(t),r.state=n):(r=i({},t),void 0===r.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!==n&&void 0===r.state&&(r.state=n)),r.key=e,o&&(r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=(0,c["default"])(r.pathname,o.pathname)):r.pathname=o.pathname),r},function f(t,n){if(null==t)return t==n;var e="undefined"==typeof t?"undefined":r(t),o="undefined"==typeof n?"undefined":r(n);if(e!==o)return!1;if(Array.isArray(t))return!(!Array.isArray(n)||t.length!==n.length)&&t.every(function(t,e){return f(t,n[e])});if("object"===e){var i=Object.keys(t),a=Object.keys(n);return i.length===a.length&&i.every(function(e){return f(t[e],n[e])})}return t===n});n.locationsAreEqual=function(t,n){return t.pathname===n.pathname&&t.search===n.search&&t.hash===n.hash&&t.key===n.key&&s(t.state,n.state)}},function(t,n){"use strict";n.__esModule=!0;n.addLeadingSlash=function(t){return"/"===t.charAt(0)?t:"/"+t},n.stripLeadingSlash=function(t){return"/"===t.charAt(0)?t.substr(1):t},n.stripPrefix=function(t,n){return 0===t.indexOf(n)?t.substr(n.length):t},n.parsePath=function(t){var n=t||"/",e="",o="",r=n.indexOf("#");r!==-1&&(o=n.substr(r),n=n.substr(0,r));var i=n.indexOf("?");return i!==-1&&(e=n.substr(i),n=n.substr(0,i)),{pathname:n,search:"?"===e?"":e,hash:"#"===o?"":o}},n.createPath=function(t){var n=t.pathname,e=t.search,o=t.hash,r=n||"/";return e&&"?"!==e&&(r+="?"===e.charAt(0)?e:"?"+e),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r}},function(t,n,e){"use strict";var o=function(){};t.exports=o},function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0;var r=e(3),i=(o(r),function(){var t=null,n=function(n){return t=n,function(){t===n&&(t=null)}},e=function(n,e,o,r){if(null!=t){var i="function"==typeof t?t(n,e):t;"string"==typeof i?"function"==typeof o?o(i,r):r(!0):r(i!==!1)}else r(!0)},o=[],r=function(t){return o.push(t),function(){o=o.filter(function(n){return n!==t})}},i=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return o.forEach(function(t){return t.apply(void 0,n)})};return{setPrompt:n,confirmTransitionTo:e,appendListener:r,notifyListeners:i}});n["default"]=i},function(t,n){"use strict";n.__esModule=!0;n.addEventListener=function(t,n,e){return t.addEventListener?t.addEventListener(n,e,!1):t.attachEvent("on"+n,e)},n.removeEventListener=function(t,n,e){return t.removeEventListener?t.removeEventListener(n,e,!1):t.detachEvent("on"+n,e)},n.getConfirmation=function(t,n){return n(window.confirm(t))},n.supportsHistory=function(){var t=window.navigator.userAgent;return(t.indexOf("Android 2.")===-1&&t.indexOf("Android 4.0")===-1||t.indexOf("Mobile Safari")===-1||t.indexOf("Chrome")!==-1||t.indexOf("Windows Phone")!==-1)&&(window.history&&"pushState"in window.history)},n.supportsPopStateOnHashChange=function(){return window.navigator.userAgent.indexOf("Trident")===-1},n.supportsGoWithoutReloadUsingHash=function(){return window.navigator.userAgent.indexOf("Firefox")===-1}},function(t,n){"use strict";n.__esModule=!0;n.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(t,n,e){"use strict";var o=function(t,n,e,o,r,i,a,c){if(!t){var u;if(void 0===n)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[e,o,r,i,a,c],f=0;u=new Error(n.replace(/%s/g,function(){return s[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};t.exports=o},function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0;var r=("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t}),i=e(3),a=(o(i),e(7)),c=o(a),u=e(1),s=e(2),f=e(4),l=o(f),d=e(6),h=e(5),v="popstate",p="hashchange",y=function(){try{return window.history.state||{}}catch(t){return{}}},g=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];d.canUseDOM?void 0:(0,c["default"])(!1);var n=window.history,e=(0,h.supportsHistory)(),o=!(0,h.supportsPopStateOnHashChange)(),i=t.basename,a=void 0===i?"":i,f=t.forceRefresh,g=void 0!==f&&f,m=t.getUserConfirmation,w=void 0===m?h.getConfirmation:m,P=t.keyLength,b=void 0===P?6:P,x=function(t){var n=t||{},e=n.key,o=n.state,i=window.location,c=i.pathname,u=i.search,f=i.hash,l=c+u+f;return a&&(l=(0,s.stripPrefix)(l,a)),r({},(0,s.parsePath)(l),{state:o,key:e})},O=function(){return Math.random().toString(36).substr(2,b)},L=(0,l["default"])(),E=function(t){r(W,t),W.length=n.length,L.notifyListeners(W.location,W.action)},S=function(t){void 0!==t.state&&k(x(t.state))},_=function(){k(x(y()))},A=!1,k=function(t){A?(A=!1,E()):!function(){var n="POP";L.confirmTransitionTo(t,n,w,function(e){e?E({action:n,location:t}):M(t)})}()},M=function(t){var n=W.location,e=j.indexOf(n.key);e===-1&&(e=0);var o=j.indexOf(t.key);o===-1&&(o=0);var r=e-o;r&&(A=!0,U(r))},T=x(y()),j=[T.key],H=function(t,o){var r="PUSH",i=(0,u.createLocation)(t,o,O(),W.location);L.confirmTransitionTo(i,r,w,function(t){if(t){var o=a+(0,s.createPath)(i),c=i.key,u=i.state;if(e)if(n.pushState({key:c,state:u},null,o),g)window.location.href=o;else{var f=j.indexOf(W.location.key),l=j.slice(0,f===-1?0:f+1);l.push(i.key),j=l,E({action:r,location:i})}else window.location.href=o}})},C=function(t,o){var r="REPLACE",i=(0,u.createLocation)(t,o,O(),W.location);L.confirmTransitionTo(i,r,w,function(t){if(t){var o=a+(0,s.createPath)(i),c=i.key,u=i.state;if(e)if(n.replaceState({key:c,state:u},null,o),g)window.location.replace(o);else{var f=j.indexOf(W.location.key);f!==-1&&(j[f]=i.key),E({action:r,location:i})}else window.location.replace(o)}})},U=function(t){n.go(t)},q=function(){return U(-1)},R=function(){return U(1)},B=0,I=function(t){B+=t,1===B?((0,h.addEventListener)(window,v,S),o&&(0,h.addEventListener)(window,p,_)):0===B&&((0,h.removeEventListener)(window,v,S),o&&(0,h.removeEventListener)(window,p,_))},F=!1,D=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],n=L.setPrompt(t);return F||(I(1),F=!0),function(){return F&&(F=!1,I(-1)),n()}},G=function(t){var n=L.appendListener(t);return I(1),function(){return I(-1),n()}},W={length:n.length,action:"POP",location:T,push:H,replace:C,go:U,goBack:q,goForward:R,block:D,listen:G};return W};n["default"]=g},function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0;var r=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},i=e(3),a=(o(i),e(7)),c=o(a),u=e(1),s=e(2),f=e(4),l=o(f),d=e(6),h=e(5),v="hashchange",p={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+(0,s.stripLeadingSlash)(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:s.stripLeadingSlash,decodePath:s.addLeadingSlash},slash:{encodePath:s.addLeadingSlash,decodePath:s.addLeadingSlash}},y=function(){var t=window.location.href,n=t.indexOf("#");return n===-1?"":t.substring(n+1)},g=function(t){return window.location.hash=t},m=function(t){var n=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,n>=0?n:0)+"#"+t)},w=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];d.canUseDOM?void 0:(0,c["default"])(!1);var n=window.history,e=((0,h.supportsGoWithoutReloadUsingHash)(),t.basename),o=void 0===e?"":e,i=t.getUserConfirmation,a=void 0===i?h.getConfirmation:i,f=t.hashType,w=void 0===f?"slash":f,P=p[w],b=P.encodePath,x=P.decodePath,O=function(){var t=x(y());return o&&(t=(0,s.stripPrefix)(t,o)),(0,s.parsePath)(t)},L=(0,l["default"])(),E=function(t){r(z,t),z.length=n.length,L.notifyListeners(z.location,z.action)},S=!1,_=null,A=function(){var t=y(),n=b(t);if(t!==n)m(n);else{var e=O(),o=z.location;if(!S&&(0,u.locationsAreEqual)(o,e))return;if(_===(0,s.createPath)(e))return;_=null,k(e)}},k=function(t){S?(S=!1,E()):!function(){var n="POP";L.confirmTransitionTo(t,n,a,function(e){e?E({action:n,location:t}):M(t)})}()},M=function(t){var n=z.location,e=C.lastIndexOf((0,s.createPath)(n));e===-1&&(e=0);var o=C.lastIndexOf((0,s.createPath)(t));o===-1&&(o=0);var r=e-o;r&&(S=!0,R(r))},T=y(),j=b(T);T!==j&&m(j);var H=O(),C=[(0,s.createPath)(H)],U=function(t,n){var e="PUSH",r=(0,u.createLocation)(t,void 0,void 0,z.location);L.confirmTransitionTo(r,e,a,function(t){if(t){var n=(0,s.createPath)(r),i=b(o+n),a=y()!==i;if(a){_=n,g(i);var c=C.lastIndexOf((0,s.createPath)(z.location)),u=C.slice(0,c===-1?0:c+1);u.push(n),C=u,E({action:e,location:r})}else E()}})},q=function(t,n){var e="REPLACE",r=(0,u.createLocation)(t,void 0,void 0,z.location);L.confirmTransitionTo(r,e,a,function(t){if(t){var n=(0,s.createPath)(r),i=b(o+n),a=y()!==i;a&&(_=n,m(i));var c=C.indexOf((0,s.createPath)(z.location));c!==-1&&(C[c]=n),E({action:e,location:r})}})},R=function(t){n.go(t)},B=function(){return R(-1)},I=function(){return R(1)},F=0,D=function(t){F+=t,1===F?(0,h.addEventListener)(window,v,A):0===F&&(0,h.removeEventListener)(window,v,A)},G=!1,W=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],n=L.setPrompt(t);return G||(D(1),G=!0),function(){return G&&(G=!1,D(-1)),n()}},V=function(t){var n=L.appendListener(t);return D(1),function(){return D(-1),n()}},z={length:n.length,action:"POP",location:H,push:U,replace:q,go:R,goBack:B,goForward:I,block:W,listen:V};return z};n["default"]=w},function(t,n,e){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0;var r=("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t}),i=e(3),a=(o(i),e(1)),c=e(4),u=o(c),s=function(t,n,e){return Math.min(Math.max(t,n),e)},f=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=t.getUserConfirmation,e=t.initialEntries,o=void 0===e?["/"]:e,i=t.initialIndex,c=void 0===i?0:i,f=t.keyLength,l=void 0===f?6:f,d=(0,u["default"])(),h=function(t){r(E,t),E.length=E.entries.length,d.notifyListeners(E.location,E.action)},v=function(){return Math.random().toString(36).substr(2,l)},p=s(c,0,o.length-1),y=o.map(function(t,n){return"string"==typeof t?(0,a.createLocation)(t,void 0,n?v():void 0):(0,a.createLocation)(t,void 0,n?t.key||v():void 0)}),g=function(t,e){var o="PUSH",r=(0,a.createLocation)(t,e,v(),E.location);d.confirmTransitionTo(r,o,n,function(t){if(t){var n=E.index,e=n+1,i=E.entries.slice(0);i.length>e?i.splice(e,i.length-e,r):i.push(r),h({action:o,location:r,index:e,entries:i})}})},m=function(t,e){var o="REPLACE",r=(0,a.createLocation)(t,e,v(),E.location);d.confirmTransitionTo(r,o,n,function(t){t&&(E.entries[E.index]=r,h({action:o,location:r}))})},w=function(t){var e=s(E.index+t,0,E.entries.length-1),o="POP",r=E.entries[e];d.confirmTransitionTo(r,o,n,function(t){t?h({action:o,location:r,index:e}):h()})},P=function(){return w(-1)},b=function(){return w(1)},x=function(t){var n=E.index+t;return n>=0&&n<E.entries.length},O=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0];return d.setPrompt(t)},L=function(t){return d.appendListener(t)},E={length:y.length,action:"POP",location:y[p],index:p,entries:y,push:g,replace:m,go:w,goBack:P,goForward:b,canGo:x,block:O,listen:L};return E};n["default"]=f},function(t,n,e){!function(n,e){t.exports=e()}(this,function(){return function(t){function n(o){if(e[o])return e[o].exports;var r=e[o]={exports:{},id:o,loaded:!1};return t[o].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n){"use strict";var e=function(t){return"/"===t.charAt(0)},o=function(t,n){for(var e=n,o=e+1,r=t.length;r>o;e+=1,o+=1)t[e]=t[o];t.pop()},r=function(t){var n=arguments.length<=1||void 0===arguments[1]?"":arguments[1],r=t&&t.split("/")||[],i=n&&n.split("/")||[],a=t&&e(t),c=n&&e(n),u=a||c;if(t&&e(t)?i=r:r.length&&(i.pop(),i=i.concat(r)),!i.length)return"/";var s=void 0;if(i.length){var f=i[i.length-1];s="."===f||".."===f||""===f}else s=!1;for(var l=0,d=i.length;d>=0;d--){var h=i[d];"."===h?o(i,d):".."===h?(o(i,d),l++):l&&(o(i,d),l--)}if(!u)for(;l--;l)i.unshift("..");!u||""===i[0]||i[0]&&e(i[0])||i.unshift("");var v=i.join("/");return s&&"/"!==v.substr(-1)&&(v+="/"),v};t.exports=r}])})}])});
{
"name": "react-router",
"version": "4.0.0-alpha.4",
"version": "4.0.0-alpha.5",
"description": "Declarative routing for React",

@@ -19,8 +19,9 @@ "repository": "ReactTraining/react-router",

"release": "node ./scripts/release.js",
"build-lib": "babel ./modules -d . --ignore '__tests__'",
"build-lib": "babel ./modules -d . --ignore __tests__",
"build-umd": "webpack modules/index.js umd/react-router.js",
"build-min": "webpack -p modules/index.js umd/react-router.min.js",
"build": "node ./scripts/build.js",
"watch": "babel ./modules -d . --ignore __tests__ --watch",
"prepublish": "node ./scripts/build.js",
"clean": "rm $(ls modules | grep -v __)",
"clean": "node ./scripts/clean.js",
"test": "npm run lint && karma start",

@@ -33,3 +34,3 @@ "lint": "eslint modules"

"react-broadcast": "^0.1.1",
"react-history": "^0.14.0"
"history": "^4.3.0"
},

@@ -36,0 +37,0 @@ "peerDependencies": {

'use strict';
exports.__esModule = true;
exports.routerContext = exports.location = exports.history = exports.matchContext = exports.action = undefined;
exports.routerContext = exports.historyContext = exports.location = exports.history = exports.matchContext = exports.action = undefined;

@@ -31,2 +31,14 @@ var _react = require('react');

var historyContext = exports.historyContext = _react.PropTypes.shape({
action: action.isRequired,
location: location.isRequired,
push: _react.PropTypes.func.isRequired,
replace: _react.PropTypes.func.isRequired,
go: _react.PropTypes.func.isRequired,
goBack: _react.PropTypes.func.isRequired,
goForward: _react.PropTypes.func.isRequired,
canGo: _react.PropTypes.func,
block: _react.PropTypes.func.isRequired
});
var routerContext = exports.routerContext = _react.PropTypes.shape({

@@ -33,0 +45,0 @@ transitionTo: _react.PropTypes.func.isRequired,

@@ -38,5 +38,11 @@ 'use strict';

var router = this.context.router;
var _props = this.props;
var to = _props.to;
var push = _props.push;
// so that folks can unit test w/o hassle
if (router) router.replaceWith(this.props.to);
if (router) {
var navigate = push ? router.transitionTo : router.replaceWith;
navigate(to);
}
};

@@ -51,2 +57,5 @@

Redirect.defaultProps = {
push: false
};
Redirect.contextTypes = {

@@ -60,3 +69,4 @@ router: _PropTypes.routerContext,

Redirect.propTypes = {
to: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.object]).isRequired
to: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.object]).isRequired,
push: _react.PropTypes.bool
};

@@ -63,0 +73,0 @@ }

@@ -15,3 +15,3 @@ 'use strict';

var _locationBroadcast = require('./locationBroadcast');
var _Broadcasts = require('./Broadcasts');

@@ -51,7 +51,7 @@ var _LocationUtils = require('./LocationUtils');

}, _this.blockTransitions = function (prompt) {
_this.props.blockTransitions(prompt);
return _this.props.blockTransitions(prompt);
}, _this.createHref = function (to) {
var path = (0, _LocationUtils.createRouterPath)(to, _this.props.stringifyQuery);
if (_this.props.basename) path = _this.props.basename + path;
if (_this.props.basename) if (path === '/') path = _this.props.basename;else if (path.length >= 2 && path.charAt(0) === '/' && path.charAt(1) === '?') path = _this.props.basename + path.substring(1);else path = _this.props.basename + path;

@@ -107,3 +107,3 @@ return _this.props.createHref(path);

return _react2.default.createElement(
_locationBroadcast.LocationBroadcast,
_Broadcasts.LocationBroadcast,
{ value: location },

@@ -110,0 +110,0 @@ _react2.default.createElement(

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

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactRouter=e(require("react")):t.ReactRouter=e(t.React)}(this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function o(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.propTypes=e.createServerRenderContext=e.matchPattern=e.StaticRouter=e.ServerRouter=e.MemoryRouter=e.HashRouter=e.BrowserRouter=e.Redirect=e.NavigationPrompt=e.Miss=e.Match=e.Link=void 0;var i=n(18),a=o(i),c=n(20),u=o(c),s=n(22),f=o(s),l=n(41),p=o(l),h=n(23),d=o(h),y=n(16),v=o(y),b=n(17),m=o(b),g=n(21),P=o(g),O=n(24),w=o(O),x=n(3),_=o(x),T=n(12),j=o(T),R=n(25),E=o(R),C=n(2),M=r(C);e.Link=a["default"],e.Match=u["default"],e.Miss=f["default"],e.NavigationPrompt=p["default"],e.Redirect=d["default"],e.BrowserRouter=v["default"],e.HashRouter=m["default"],e.MemoryRouter=P["default"],e.ServerRouter=w["default"],e.StaticRouter=_["default"],e.matchPattern=j["default"],e.createServerRenderContext=E["default"],e.propTypes=M},function(e,n){e.exports=t},function(t,e,n){"use strict";e.__esModule=!0,e.routerContext=e.location=e.history=e.matchContext=e.action=void 0;var r=n(1);e.action=r.PropTypes.oneOf(["PUSH","REPLACE","POP"]),e.matchContext=r.PropTypes.shape({addMatch:r.PropTypes.func.isRequired,removeMatch:r.PropTypes.func.isRequired}),e.history=r.PropTypes.shape({listen:r.PropTypes.func.isRequired,listenBefore:r.PropTypes.func.isRequired,push:r.PropTypes.func.isRequired,replace:r.PropTypes.func.isRequired,go:r.PropTypes.func.isRequired}),e.location=r.PropTypes.shape({pathname:r.PropTypes.string.isRequired,search:r.PropTypes.string.isRequired,hash:r.PropTypes.string.isRequired,state:r.PropTypes.any,key:r.PropTypes.string}),e.routerContext=r.PropTypes.shape({transitionTo:r.PropTypes.func.isRequired,replaceWith:r.PropTypes.func.isRequired,blockTransitions:r.PropTypes.func.isRequired,createHref:r.PropTypes.func.isRequired})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=n(1),u=r(c),s=n(32),f=n(11),l=r(f),p=n(8),h=n(19),d=n(2),y=function(t){return(0,s.stringify)(t).replace(/%20/g,"+")},v=function(t){function e(){var n,r,a;o(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(u))),r.transitionTo=function(t){r.props.onPush(r.createLocation(t))},r.replaceWith=function(t){r.props.onReplace(r.createLocation(t))},r.blockTransitions=function(t){r.props.blockTransitions(t)},r.createHref=function(t){var e=(0,h.createRouterPath)(t,r.props.stringifyQuery);return r.props.basename&&(e=r.props.basename+e),r.props.createHref(e)},r.state={location:null},a=n,i(r,a)}return a(e,t),e.prototype.createLocation=function(t){var e=this.props,n=e.parseQueryString,r=e.stringifyQuery;return(0,h.createRouterLocation)(t,n,r)},e.prototype.getRouterContext=function(){return{transitionTo:this.transitionTo,replaceWith:this.replaceWith,blockTransitions:this.blockTransitions,createHref:this.createHref}},e.prototype.getChildContext=function(){return{router:this.getRouterContext()}},e.prototype.componentWillMount=function(){this.setState({location:this.createLocation(this.props.location)})},e.prototype.componentWillReceiveProps=function(t){var e=this.createLocation(t.location);(0,h.locationsAreEqual)(this.state.location,e)||this.setState({location:e})},e.prototype.render=function(){var t=this.state.location,e=this.props,n=e.action,r=e.children;return u["default"].createElement(p.LocationBroadcast,{value:t},u["default"].createElement(l["default"],null,"function"==typeof r?r({action:n,location:t,router:this.getRouterContext()}):u["default"].Children.only(r)))},e}(u["default"].Component);v.defaultProps={stringifyQuery:y,parseQueryString:s.parse,createHref:function(t){return t}},v.childContextTypes={router:d.routerContext.isRequired},e["default"]=v},function(t,e,n){"use strict";e.__esModule=!0,e.locationsAreEqual=e.createLocation=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(5),a=(e.createLocation=function(t,e,n){var r=void 0;return"string"==typeof t?(r=(0,i.parsePath)(t),r.state=e):(r=o({},t),r.pathname||(r.pathname="/"),r.search&&"?"!==r.search.charAt(0)&&(r.search="?"+r.search),r.hash&&"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash),void 0!==e&&void 0===r.state&&(r.state=e)),r.key=n,r},function c(t,e){if(null==t)return t==e;var n="undefined"==typeof t?"undefined":r(t),o="undefined"==typeof e?"undefined":r(e);if(n!==o)return!1;if(Array.isArray(t))return!(!Array.isArray(e)||t.length!==e.length)&&t.every(function(t,n){return c(t,e[n])});if("object"===n){var i=Object.keys(t),a=Object.keys(e);return i.length===a.length&&i.every(function(n){return c(t[n],e[n])})}return t===e});e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&a(t.state,e.state)}},function(t,e){"use strict";e.__esModule=!0;e.addLeadingSlash=function(t){return"/"===t.charAt(0)?t:"/"+t},e.stripLeadingSlash=function(t){return"/"===t.charAt(0)?t.substr(1):t},e.stripPrefix=function(t,e){return 0===t.indexOf(e)?t.substr(e.length):t},e.parsePath=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");o!==-1&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return i!==-1&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}},e.createPath=function(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},function(t,e,n){"use strict";var r=function(t,e,n,r,o,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,r,o,i,a,c],f=0;u=new Error(e.replace(/%s/g,function(){return s[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};t.exports=r},function(t,e,n){"use strict";var r=function(){};t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.LocationSubscriber=e.LocationBroadcast=void 0;var o=n(1),i=r(o),a=n(35),c="location",u=function(t){var e=t.children,n=t.value;return i["default"].createElement(a.Broadcast,{channel:c,value:n,children:e})},s=function(t){var e=t.children;return i["default"].createElement(a.Subscriber,{channel:c,children:e})};e.LocationBroadcast=u,e.LocationSubscriber=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(7),i=(r(o),function(){var t=null,e=function(e){return t=e,function(){t===e&&(t=null)}},n=function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(i!==!1)}else o(!0)},r=[],o=function(t){return r.push(t),function(){r=r.filter(function(e){return e!==t})}},i=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return r.forEach(function(t){return t.apply(void 0,e)})};return{setPrompt:e,confirmTransitionTo:n,appendListener:o,notifyListeners:i}});e["default"]=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=n(1),u=r(c),s=n(15),f=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.getChildContext=function(){return{history:this.history}},e.prototype.setupHistory=function(t){var e=this,n=t.createHistory,r=t.historyOptions;this.history=n(r),this.unlisten=this.history.listen(function(){return e.forceUpdate()})},e.prototype.componentWillMount=function(){this.setupHistory(this.props)},e.prototype.componentWillReceiveProps=function(t){var e=this.props.historyOptions,n=t.historyOptions,r=!1;for(var o in n)if(n[o]!==e[o]){r=!0;break}r&&(this.unlisten(),this.setupHistory(t))},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.history,e=t.location,n=t.action;return this.props.children({history:t,location:e,action:n})},e}(u["default"].Component);f.propTypes={children:c.PropTypes.func.isRequired,createHistory:c.PropTypes.func.isRequired,historyOptions:c.PropTypes.object},f.childContextTypes={history:s.historyContext.isRequired},e["default"]=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=n(1),u=r(c),s=n(2),f=function(t){function e(n){o(this,e);var r=i(this,t.call(this,n));return r.addMatch=function(t){r.matches.push(t)},r.removeMatch=function(t){r.matches.splice(r.matches.indexOf(t),1)},r.matches=[],r.subscribers=[],r.hasMatches=null,r.serverRouterIndex=null,r}return a(e,t),e.prototype.getChildContext=function(){var t=this;return{match:{addMatch:this.addMatch,removeMatch:this.removeMatch,matches:this.matches,parent:this.props.match,serverRouterIndex:this.serverRouterIndex,subscribe:function(e){return t.subscribers.push(e),function(){t.subscribers.splice(t.subscribers.indexOf(e),1)}}}}},e.prototype.componentDidUpdate=function(){this.notifySubscribers()},e.prototype.componentWillMount=function(){var t=this.context.serverRouter;t&&(this.serverRouterIndex=t.registerMatchContext(this.matches))},e.prototype.componentDidMount=function(){this.notifySubscribers()},e.prototype.notifySubscribers=function(){var t=this;if(this.subscribers.length){var e=this.hasMatches;this.hasMatches=0!==this.matches.length,this.hasMatches!==e&&this.subscribers.forEach(function(e){return e(t.hasMatches)})}},e.prototype.render=function(){return this.props.children},e}(u["default"].Component);f.childContextTypes={match:s.matchContext.isRequired},f.contextTypes={serverRouter:c.PropTypes.object},e["default"]=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(31),i=r(o),a={},c=function(t){var e=a[t];if(!e){var n=[],r=(0,i["default"])(t,n);e=a[t]={keys:n,regex:r}}return e},u=function(t,e){return t.split("/").slice(0,e.split("/").length).join("/")},s=function(t,e,n){return e.slice(1).reduce(function(t,e,r){return t[n[r].name]=e,t},{})},f=function(t,e,n,r){var o=!n&&"/"===t;if(o)return{params:null,isExact:"/"===e.pathname,pathname:"/"};!n&&r&&"/"!==t.charAt(0)&&(t=r.pathname+("/"!==r.pathname.charAt(r.pathname.length-1)?"/":"")+t);var i=c(t),a=n?e.pathname:u(e.pathname,t),f=i.regex.exec(a);if(f){var l=s(t,f,i.keys),p=e.pathname.split("/").length,h=t.split("/").length,d=p===h;return{params:l,isExact:d,pathname:a}}return null};e["default"]=f},function(t,e){"use strict";e.__esModule=!0;e.addEventListener=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},e.removeEventListener=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},e.getConfirmation=function(t,e){return e(window.confirm(t))},e.supportsHistory=function(){var t=window.navigator.userAgent;return(t.indexOf("Android 2.")===-1&&t.indexOf("Android 4.0")===-1||t.indexOf("Mobile Safari")===-1||t.indexOf("Chrome")!==-1||t.indexOf("Windows Phone")!==-1)&&(window.history&&"pushState"in window.history)},e.supportsPopStateOnHashChange=function(){return window.navigator.userAgent.indexOf("Trident")===-1},e.supportsGoWithoutReloadUsingHash=function(){return window.navigator.userAgent.indexOf("Firefox")===-1}},function(t,e){"use strict";e.__esModule=!0;e.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(t,e,n){"use strict";e.__esModule=!0,e.historyContext=e.location=e.action=void 0;var r=n(1),o=e.action=r.PropTypes.oneOf(["PUSH","REPLACE","POP"]),i=e.location=r.PropTypes.shape({pathname:r.PropTypes.string.isRequired,search:r.PropTypes.string.isRequired,hash:r.PropTypes.string.isRequired,state:r.PropTypes.object,key:r.PropTypes.string});e.historyContext=r.PropTypes.shape({action:o.isRequired,location:i.isRequired,push:r.PropTypes.func.isRequired,replace:r.PropTypes.func.isRequired,go:r.PropTypes.func.isRequired,goBack:r.PropTypes.func.isRequired,goForward:r.PropTypes.func.isRequired,canGo:r.PropTypes.func,block:r.PropTypes.func.isRequired})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(1),c=r(a),u=n(36),s=r(u),f=n(3),l=r(f),p=function(t){var e=t.basename,n=t.forceRefresh,r=t.getUserConfirmation,a=t.keyLength,u=o(t,["basename","forceRefresh","getUserConfirmation","keyLength"]);return c["default"].createElement(s["default"],{basename:e,forceRefresh:n,getUserConfirmation:r,keyLength:a},function(t){var n=t.history,r=t.action,o=t.location;return c["default"].createElement(l["default"],i({action:r,location:o,basename:e,onPush:n.push,onReplace:n.replace,blockTransitions:n.block},u))})};e["default"]=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(1),c=r(a),u=n(37),s=r(u),f=n(3),l=r(f),p=function(t){var e=t.basename,n=t.getUserConfirmation,r=t.hashType,a=o(t,["basename","getUserConfirmation","hashType"]);return c["default"].createElement(s["default"],{basename:e,getUserConfirmation:n,hashType:r},function(t){var n=t.history,r=t.action,o=t.location;return c["default"].createElement(l["default"],i({action:r,location:o,basename:e,onPush:n.push,onReplace:n.replace,blockTransitions:n.block},a))})};e["default"]=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(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 c(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.__esModule=!0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f=n(1),l=r(f),p=n(8),h=n(2),d=function(t){function e(){var n,r,o;i(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=a(this,t.call.apply(t,[this].concat(u))),r.handleClick=function(t){r.props.onClick&&r.props.onClick(t),t.defaultPrevented||r.props.target||g(t)||!m(t)||(t.preventDefault(),r.context.router.transitionTo(r.props.to))},r.handleTransition=function(){r.context.router.transitionTo(r.props.to)},o=n,a(r,o)}return c(e,t),e.prototype.render=function(){var t=this;return l["default"].createElement(p.LocationSubscriber,null,function(e){var n=t.context.router,r=t.props,i=r.to,a=r.style,c=r.activeStyle,u=r.className,f=r.activeClassName,p=r.location,h=r.isActive,d=(r.activeOnlyWhenExact,o(r,["to","style","activeStyle","className","activeClassName","location","isActive","activeOnlyWhenExact"])),v=p||e,b=h(v,y(i),t.props);return"function"==typeof d.children?d.children({isActive:b,currentLocation:v,href:n?n.createHref(i):i,onClick:t.handleClick,transition:t.handleTransition}):l["default"].createElement("a",s({},d,{href:n?n.createHref(i):i,onClick:t.handleClick,style:b?s({},a,c):a,className:b?[u,f].join(" ").trim():u}))})},e}(l["default"].Component);d.defaultProps={activeOnlyWhenExact:!1,className:"",activeClassName:"",style:{},activeStyle:{},isActive:function(t,e,n){return v(e.pathname,t.pathname,n.activeOnlyWhenExact)&&b(e.query,t.query)}},d.contextTypes={router:h.routerContext};var y=function(t){return"object"===("undefined"==typeof t?"undefined":u(t))?t:{pathname:t}},v=function(t,e,n){return n?e===t:0===e.indexOf(t)},b=function(t,e){return null==e?null==t:null==t||P(t,e)},m=function(t){return 0===t.button},g=function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)},P=function O(t,e){if(t==e)return!0;if(null==t||null==e)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every(function(t,n){return O(t,e[n])});if("object"===("undefined"==typeof t?"undefined":u(t))){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))if(void 0===t[n]){if(void 0!==e[n])return!1}else{if(!Object.prototype.hasOwnProperty.call(e,n))return!1;if(!O(t[n],e[n]))return!1}return!0}return String(t)===String(e)};e["default"]=d},function(t,e,n){"use strict";e.__esModule=!0,e.createRouterPath=e.createRouterLocation=e.locationsAreEqual=void 0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=n(38);Object.defineProperty(e,"locationsAreEqual",{enumerable:!0,get:function(){return o.locationsAreEqual}});var i=n(40);e.createRouterLocation=function(t,e,n){if("string"==typeof t){var r=(0,i.parsePath)(t);return r.query=""!==r.search?e(r.search):null,r}return{pathname:t.pathname||"",search:t.search||(t.query?"?"+n(t.query):""),hash:t.hash||"",state:t.state||null,query:t.query||(t.search?e(t.search):null)}},e.createRouterPath=function(t,e){return"string"==typeof t?t:(0,i.createPath)(r({},t,{search:t.search||(t.query?"?"+e(t.query):"")}))}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=n(1),s=r(u),f=n(11),l=r(f),p=n(12),h=r(p),d=n(8),y=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.registerMatch=function(){var t=this.context.match,e=this.props.match;e&&t&&t.addMatch(e)},e.prototype.componentWillMount=function(){this.context.serverRouter&&this.registerMatch()},e.prototype.componentDidMount=function(){this.context.serverRouter||this.registerMatch()},e.prototype.componentDidUpdate=function(t){var e=this.context.match;e&&(t.match&&!this.props.match?e.removeMatch(t.match):!t.match&&this.props.match&&e.addMatch(this.props.match))},e.prototype.componentWillUnmount=function(){this.props.match&&this.context.match.removeMatch(this.props.match)},e.prototype.render=function(){return s["default"].Children.only(this.props.children)},e}(s["default"].Component);y.contextTypes={match:u.PropTypes.object,serverRouter:u.PropTypes.object};var v=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.render=function(){var t=this;return s["default"].createElement(d.LocationSubscriber,null,function(e){var n=t.props,r=n.children,o=n.render,i=n.component,a=n.pattern,u=n.location,f=n.exactly,p=t.context.match,d=u||e,v=p&&p.parent,b=(0,h["default"])(a,d,f,v),m=c({},b,{location:d,pattern:a});return s["default"].createElement(y,{match:b},s["default"].createElement(l["default"],{match:b},r?r(c({matched:!!b},m)):b?o?o(m):s["default"].createElement(i,m):null))})},e}(s["default"].Component);v.defaultProps={exactly:!1},v.contextTypes={location:u.PropTypes.object,match:u.PropTypes.object},e["default"]=v},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(1),c=r(a),u=n(39),s=r(u),f=n(3),l=r(f),p=function(t){var e=t.getUserConfirmation,n=t.initialEntries,r=t.initialIndex,a=t.keyLength,u=o(t,["getUserConfirmation","initialEntries","initialIndex","keyLength"]);return c["default"].createElement(s["default"],{getUserConfirmation:e,initialEntries:n,initialIndex:r,keyLength:a},function(t){var e=t.history,n=t.action,r=t.location;return c["default"].createElement(l["default"],i({action:n,location:r,onPush:e.push,onReplace:e.replace,blockTransitions:e.block},u))})};e["default"]=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=n(1),u=r(c),s=(n(2),function(t){function e(n,r){o(this,e);var a=i(this,t.call(this,n,r));return r.match&&!r.serverRouter&&(a.unsubscribe=a.context.match.subscribe(function(t){a.setState({noMatchesInContext:!t})})),r.serverRouter&&r.serverRouter.registerMissPresence(r.match.serverRouterIndex),a.state={noMatchesInContext:!1},a}return a(e,t),e.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.render=function n(){var t=this.props,n=t.render,e=t.component,r=this.state.noMatchesInContext,o=this.props.location,i=o||this.context.location,a=this.context,c=a.serverRouter,s=a.match,f=c&&c.missedAtIndex(s.serverRouterIndex);return r||f?n?n({location:i}):u["default"].createElement(e,{location:i}):null},e}(u["default"].Component));s.contextTypes={match:c.PropTypes.object,location:c.PropTypes.object,serverRouter:c.PropTypes.object},e["default"]=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=n(1),u=r(c),s=n(2),f=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){this.context.serverRouter&&this.redirect()},e.prototype.componentDidMount=function(){this.redirect()},e.prototype.redirect=function(){var t=this.context.router;t&&t.replaceWith(this.props.to)},e.prototype.render=function(){return null},e}(u["default"].Component);f.contextTypes={router:s.routerContext,serverRouter:c.PropTypes.object},e["default"]=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(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 c(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.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=n(1),f=r(s),l=n(3),p=r(l),h=function(t){function e(){return i(this,e),a(this,t.apply(this,arguments))}return c(e,t),e.prototype.getChildContext=function(){return{serverRouter:this.props.context}},e.prototype.render=function(){var t=this.props,e=t.context,n=t.location,r=o(t,["context","location"]),i=function(t){e.setRedirect(t)};return f["default"].createElement(p["default"],u({action:"POP",location:n,onReplace:i,onPush:i},r))},e}(f["default"].Component);h.childContextTypes={serverRouter:s.PropTypes.object.isRequired},e["default"]=h},function(t,e){"use strict";e.__esModule=!0;var n=function(){},r=function(){var t=!1,e=null,r=[],o=t?n:function(t){e||(e=t)},i=t?n:function(t){return r.push({hasMissComponent:!1,matchesByIdentity:t})-1},a=t?n:function(t){r[t].hasMissComponent=!0},c=function(){t=!0;var n=r.some(function(t,e){return u(e)});return{redirect:e,missed:n}},u=function(t){var e=r[t];return 0===e.matchesByIdentity.length&&e.hasMissComponent};return{setRedirect:o,registerMatchContext:i,registerMissPresence:a,getResult:c,missedAtIndex:u}};e["default"]=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}),i=n(7),a=(r(i),n(6)),c=r(a),u=n(4),s=n(5),f=n(9),l=r(f),p=n(14),h=n(13),d="popstate",y="hashchange",v=function(){try{return window.history.state||{}}catch(t){return{}}},b=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];p.canUseDOM?void 0:(0,c["default"])(!1);var e=window.history,n=(0,h.supportsHistory)(),r=!(0,h.supportsPopStateOnHashChange)(),i=t.basename,a=void 0===i?"":i,f=t.forceRefresh,b=void 0!==f&&f,m=t.getUserConfirmation,g=void 0===m?h.getConfirmation:m,P=t.keyLength,O=void 0===P?6:P,w=function(t){var e=t||{},n=e.key,r=e.state,i=window.location,c=i.pathname,u=i.search,f=i.hash,l=c+u+f;return a&&(l=(0,s.stripPrefix)(l,a)),o({},(0,s.parsePath)(l),{state:r,key:n})},x=function(){return Math.random().toString(36).substr(2,O)},_=(0,l["default"])(),T=function(t){o($,t),$.length=e.length,_.notifyListeners($.location,$.action)},j=function(t){void 0!==t.state&&C(w(t.state))},R=function(){C(w(v()))},E=!1,C=function(t){E?(E=!1,T()):!function(){var e="POP";_.confirmTransitionTo(t,e,g,function(n){n?T({action:e,location:t}):M(t)})}()},M=function(t){var e=$.location,n=k.indexOf(e.key);n===-1&&(n=0);var r=k.indexOf(t.key);r===-1&&(r=0);var o=n-r;o&&(E=!0,A(o))},S=w(v()),k=[S.key],L=function(t,r){var o="PUSH",i=(0,u.createLocation)(t,r,x());_.confirmTransitionTo(i,o,g,function(t){if(t){var r=a+(0,s.createPath)(i),c=i.key,u=i.state;if(n)if(e.pushState({key:c,state:u},null,r),b)window.location.href=r;else{var f=k.indexOf($.location.key),l=k.slice(0,f===-1?0:f+1);l.push(i.key),k=l,T({action:o,location:i})}else window.location.href=r}})},q=function(t,r){var o="REPLACE",i=(0,u.createLocation)(t,r,x());_.confirmTransitionTo(i,o,g,function(t){if(t){var r=a+(0,s.createPath)(i),c=i.key,u=i.state;if(n)if(e.replaceState({key:c,state:u},null,r),b)window.location.replace(r);else{var f=k.indexOf($.location.key);f!==-1&&(k[f]=i.key),T({action:o,location:i})}else window.location.replace(r)}})},A=function(t){e.go(t)},U=function(){return A(-1)},I=function(){return A(1)},H=0,W=function(t){H+=t,1===H?((0,h.addEventListener)(window,d,j),r&&(0,h.addEventListener)(window,y,R)):0===H&&((0,h.removeEventListener)(window,d,j),r&&(0,h.removeEventListener)(window,y,R))},B=!1,N=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=_.setPrompt(t);return B||(W(1),B=!0),function(){return B&&(B=!1,W(-1)),e()}},D=function(t){var e=_.appendListener(t);return W(1),function(){return W(-1),e()}},$={length:e.length,action:"POP",location:S,push:L,replace:q,go:A,goBack:U,goForward:I,block:N,listen:D};return $};e["default"]=b},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(7),a=(r(i),n(6)),c=r(a),u=n(4),s=n(5),f=n(9),l=r(f),p=n(14),h=n(13),d="hashchange",y={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+(0,
s.stripLeadingSlash)(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:s.stripLeadingSlash,decodePath:s.addLeadingSlash},slash:{encodePath:s.addLeadingSlash,decodePath:s.addLeadingSlash}},v=function(){var t=window.location.href,e=t.indexOf("#");return e===-1?"":t.substring(e+1)},b=function(t){return window.location.hash=t},m=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)},g=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];p.canUseDOM?void 0:(0,c["default"])(!1);var e=window.history,n=((0,h.supportsGoWithoutReloadUsingHash)(),t.basename),r=void 0===n?"":n,i=t.getUserConfirmation,a=void 0===i?h.getConfirmation:i,f=t.hashType,g=void 0===f?"slash":f,P=y[g],O=P.encodePath,w=P.decodePath,x=function(){var t=w(v());return r&&(t=(0,s.stripPrefix)(t,r)),(0,s.parsePath)(t)},_=(0,l["default"])(),T=function(t){o(Q,t),Q.length=e.length,_.notifyListeners(Q.location,Q.action)},j=!1,R=null,E=function(){var t=v(),e=O(t);if(t!==e)m(e);else{var n=x(),r=Q.location;if(!j&&(0,u.locationsAreEqual)(r,n))return;if(R===(0,s.createPath)(n))return;R=null,C(n)}},C=function(t){j?(j=!1,T()):!function(){var e="POP";_.confirmTransitionTo(t,e,a,function(n){n?T({action:e,location:t}):M(t)})}()},M=function(t){var e=Q.location,n=q.lastIndexOf((0,s.createPath)(e));n===-1&&(n=0);var r=q.lastIndexOf((0,s.createPath)(t));r===-1&&(r=0);var o=n-r;o&&(j=!0,I(o))},S=v(),k=O(S);S!==k&&m(k);var L=x(),q=[(0,s.createPath)(L)],A=function(t,e){var n="PUSH",o=(0,u.createLocation)(t);_.confirmTransitionTo(o,n,a,function(t){if(t){var e=(0,s.createPath)(o),i=O(r+e),a=v()!==i;if(a){R=e,b(i);var c=q.lastIndexOf((0,s.createPath)(Q.location)),u=q.slice(0,c===-1?0:c+1);u.push(e),q=u,T({action:n,location:o})}else T()}})},U=function(t,e){var n="REPLACE",o=(0,u.createLocation)(t);_.confirmTransitionTo(o,n,a,function(t){if(t){var e=(0,s.createPath)(o),i=O(r+e),a=v()!==i;a&&(R=e,m(i));var c=q.indexOf((0,s.createPath)(Q.location));c!==-1&&(q[c]=e),T({action:n,location:o})}})},I=function(t){e.go(t)},H=function(){return I(-1)},W=function(){return I(1)},B=0,N=function(t){B+=t,1===B?(0,h.addEventListener)(window,d,E):0===B&&(0,h.removeEventListener)(window,d,E)},D=!1,$=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=_.setPrompt(t);return D||(N(1),D=!0),function(){return D&&(D=!1,N(-1)),e()}},F=function(t){var e=_.appendListener(t);return N(1),function(){return N(-1),e()}},Q={length:e.length,action:"POP",location:L,push:A,replace:U,go:I,goBack:H,goForward:W,block:$,listen:F};return Q};e["default"]=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}),i=n(7),a=(r(i),n(4)),c=n(9),u=r(c),s=function(t,e,n){return Math.min(Math.max(t,e),n)},f=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=t.getUserConfirmation,n=t.initialEntries,r=void 0===n?["/"]:n,i=t.initialIndex,c=void 0===i?0:i,f=t.keyLength,l=void 0===f?6:f,p=(0,u["default"])(),h=function(t){o(T,t),T.length=T.entries.length,p.notifyListeners(T.location,T.action)},d=function(){return Math.random().toString(36).substr(2,l)},y=s(c,0,r.length-1),v=r.map(function(t,e){return"string"==typeof t?(0,a.createLocation)(t,e?d():void 0):t}),b=function(t,n){var r="PUSH",o=(0,a.createLocation)(t,n,d());p.confirmTransitionTo(o,r,e,function(t){if(t){var e=T.index,n=e+1,i=T.entries.slice(0);i.length>n?i.splice(n,i.length-n,o):i.push(o),h({action:r,location:o,index:n,entries:i})}})},m=function(t,n){var r="REPLACE",o=(0,a.createLocation)(t,n,d());p.confirmTransitionTo(o,r,e,function(t){t&&(T.entries[T.index]=o,h({action:r,location:o}))})},g=function(t){var n=s(T.index+t,0,T.entries.length-1),r="POP",o=T.entries[n];p.confirmTransitionTo(o,r,e,function(t){t?h({action:r,location:o,index:n}):h()})},P=function(){return g(-1)},O=function(){return g(1)},w=function(t){var e=T.index+t;return e>=0&&e<T.entries.length},x=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0];return p.setPrompt(t)},_=function(t){return p.appendListener(t)},T={length:v.length,action:"POP",location:v[y],index:y,entries:v,push:b,replace:m,go:g,goBack:P,goForward:O,canGo:w,block:x,listen:_};return T};e["default"]=f},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function r(){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;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=r()?Object.assign:function(t,e){for(var r,a,c=n(t),u=1;u<arguments.length;u++){r=Object(arguments[u]);for(var s in r)o.call(r,s)&&(c[s]=r[s]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var f=0;f<a.length;f++)i.call(r,a[f])&&(c[a[f]]=r[a[f]])}}return c}},function(t,e,n){function r(t){for(var e,n=[],r=0,o=0,i="";null!=(e=m.exec(t));){var a=e[0],c=e[1],u=e.index;if(i+=t.slice(o,u),o=u+a.length,c)i+=c[1];else{var f=t[o],l=e[2],p=e[3],h=e[4],d=e[5],y=e[6],v=e[7];i&&(n.push(i),i="");var b=null!=l&&null!=f&&f!==l,g="+"===y||"*"===y,P="?"===y||"*"===y,O=e[2]||"/",w=h||d||(v?".*":"[^"+O+"]+?");n.push({name:p||r++,prefix:l||"",delimiter:O,optional:P,repeat:g,partial:b,asterisk:!!v,pattern:s(w)})}}return o<t.length&&(i+=t.substr(o)),i&&n.push(i),n}function o(t){return c(r(t))}function i(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function a(t){return encodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function c(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,r){for(var o="",c=n||{},u=r||{},s=u.pretty?i:encodeURIComponent,f=0;f<t.length;f++){var l=t[f];if("string"!=typeof l){var p,h=c[l.name];if(null==h){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(b(h)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var d=0;d<h.length;d++){if(p=s(h[d]),!e[f].test(p))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(p)+"`");o+=(0===d?l.prefix:l.delimiter)+p}}else{if(p=l.asterisk?a(h):s(h),!e[f].test(p))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+p+'"');o+=l.prefix+p}}else o+=l}return o}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function f(t,e){return t.keys=e,t}function l(t){return t.sensitive?"":"i"}function p(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return f(t,e)}function h(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(v(t[o],e,n).source);var i=new RegExp("(?:"+r.join("|")+")",l(n));return f(i,e)}function d(t,e,n){for(var o=r(t),i=y(o,n),a=0;a<o.length;a++)"string"!=typeof o[a]&&e.push(o[a]);return f(i,e)}function y(t,e){e=e||{};for(var n=e.strict,r=e.end!==!1,o="",i=t[t.length-1],a="string"==typeof i&&/\/$/.test(i),c=0;c<t.length;c++){var s=t[c];if("string"==typeof s)o+=u(s);else{var f=u(s.prefix),p="(?:"+s.pattern+")";s.repeat&&(p+="(?:"+f+p+")*"),p=s.optional?s.partial?f+"("+p+")?":"(?:"+f+"("+p+"))?":f+"("+p+")",o+=p}}return n||(o=(a?o.slice(0,-2):o)+"(?:\\/(?=$))?"),o+=r?"$":n&&a?"":"(?=\\/|$)",new RegExp("^"+o,l(e))}function v(t,e,n){return e=e||[],b(e)?n||(n={}):(n=e,e=[]),t instanceof RegExp?p(t,e):b(t)?h(t,e,n):d(t,e,n)}var b=n(29);t.exports=v,t.exports.parse=r,t.exports.compile=o,t.exports.tokensToFunction=c,t.exports.tokensToRegExp=y;var m=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},function(t,e,n){"use strict";function r(t,e){return e.encode?e.strict?o(t):encodeURIComponent(t):t}var o=n(42),i=n(30);e.extract=function(t){return t.split("?")[1]||""},e.parse=function(t){var e=Object.create(null);return"string"!=typeof t?e:(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=n.shift(),o=n.length>0?n.join("="):void 0;r=decodeURIComponent(r),o=void 0===o?null:decodeURIComponent(o),void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]}),e):e},e.stringify=function(t,e){var n={encode:!0,strict:!0};return e=i(n,e),t?Object.keys(t).sort().map(function(n){var o=t[n];if(void 0===o)return"";if(null===o)return r(n,e);if(Array.isArray(o)){var i=[];return o.slice().forEach(function(t){void 0!==t&&(null===t?i.push(r(n,e)):i.push(r(n,e)+"="+r(t,e)))}),i.join("&")}return r(n,e)+"="+r(o,e)}).filter(function(t){return t.length>0}).join("&"):""}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=n(6),s=r(u),f=n(1),l=r(f),p=function(t){var e=[],n=t;return{publish:function(t){n=t,e.forEach(function(t){return t(n)})},subscribe:function(t){return e.push(t),t(n),function(){return e=e.filter(function(e){return e!==t})}}}},h=function(t){function e(){var n,r,a;o(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(u))),r.broadcast=p(r.props.value),a=n,i(r,a)}return a(e,t),e.prototype.getBroadcastsContext=function(){var t,e=this.props.channel,n=this.context.broadcasts;return c({},n,(t={},t[e]=this.broadcast.subscribe,t))},e.prototype.getChildContext=function(){return{broadcasts:this.getBroadcastsContext()}},e.prototype.componentWillReceiveProps=function(t){this.props.channel!==t.channel?(0,s["default"])(!1):void 0,this.props.value!==t.value&&this.broadcast.publish(t.value)},e.prototype.render=function(){return l["default"].Children.only(this.props.children)},e}(l["default"].Component);h.contextTypes={broadcasts:f.PropTypes.object},h.childContextTypes={broadcasts:f.PropTypes.object.isRequired},e["default"]=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=n(6),u=r(c),s=n(1),f=r(s),l=function(t){function e(){var n,r,a;o(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(u))),r.state={value:null},a=n,i(r,a)}return a(e,t),e.prototype.componentWillMount=function(){var t=this,e=this.props.channel;if(this.context.broadcasts){var n=this.context.broadcasts[e];"function"!=typeof n?(0,u["default"])(!1):void 0,this.unsubscribe=n(function(e){t.setState({value:e})})}},e.prototype.componentWillUnmount=function(){this.unsubscribe()},e.prototype.render=function(){return this.props.children(this.state.value)},e}(f["default"].Component);l.contextTypes={broadcasts:f["default"].PropTypes.object},e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.Subscriber=e.Broadcast=void 0;var o=n(33),i=r(o),a=n(34),c=r(a);e.Broadcast=i["default"],e.Subscriber=c["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}e.__esModule=!0;var i=n(1),a=r(i),c=n(26),u=r(c),s=n(10),f=r(s),l=function(t){var e=t.children,n=o(t,["children"]);return a["default"].createElement(f["default"],{children:e,createHistory:u["default"],historyOptions:n})};l.propTypes={children:i.PropTypes.func.isRequired,basename:i.PropTypes.string,forceRefresh:i.PropTypes.bool,getUserConfirmation:i.PropTypes.func,keyLength:i.PropTypes.number},e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}e.__esModule=!0;var i=n(1),a=r(i),c=n(27),u=r(c),s=n(10),f=r(s),l=function(t){var e=t.children,n=o(t,["children"]);return a["default"].createElement(f["default"],{children:e,createHistory:u["default"],historyOptions:n})};l.propTypes={children:i.PropTypes.func.isRequired,basename:i.PropTypes.string,getUserConfirmation:i.PropTypes.func,hashType:i.PropTypes.oneOf(["hashbang","noslash","slash"])},e["default"]=l},function(t,e,n){"use strict";e.__esModule=!0;var r=n(4);Object.defineProperty(e,"createLocation",{enumerable:!0,get:function(){return r.createLocation}}),Object.defineProperty(e,"locationsAreEqual",{enumerable:!0,get:function(){return r.locationsAreEqual}})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}e.__esModule=!0;var i=n(1),a=r(i),c=n(28),u=r(c),s=n(10),f=r(s),l=function(t){var e=t.children,n=o(t,["children"]);return a["default"].createElement(f["default"],{children:e,createHistory:u["default"],historyOptions:n})};l.propTypes={children:i.PropTypes.func.isRequired,getUserConfirmation:i.PropTypes.func,initialEntries:i.PropTypes.array,initialIndex:i.PropTypes.number,keyLength:i.PropTypes.number},e["default"]=l},function(t,e,n){"use strict";e.__esModule=!0;var r=n(5);Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return r.parsePath}}),Object.defineProperty(e,"createPath",{enumerable:!0,get:function(){return r.createPath}})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=n(1),u=r(c),s=n(15),f=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.block=function(){this.teardownPrompt||(this.teardownPrompt=this.context.history.block(this.props.message))},e.prototype.unblock=function(){this.teardownPrompt&&(this.teardownPrompt(),this.teardownPrompt=null)},e.prototype.componentWillMount=function(){this.props.when&&this.block()},e.prototype.componentWillReceiveProps=function(t){t.when?this.block():this.unblock()},e.prototype.componentWillUnmount=function(){this.unblock()},e.prototype.render=function(){return null},e}(u["default"].Component);f.contextTypes={history:s.historyContext.isRequired},f.propTypes={when:c.PropTypes.bool,message:c.PropTypes.oneOfType([c.PropTypes.func,c.PropTypes.string]).isRequired},f.defaultProps={when:!0},e["default"]=f},function(t,e){"use strict";t.exports=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactRouter=e(require("react")):t.ReactRouter=e(t.React)}(this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function o(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.propTypes=e.createServerRenderContext=e.matchPattern=e.StaticRouter=e.ServerRouter=e.MemoryRouter=e.HashRouter=e.BrowserRouter=e.Redirect=e.NavigationPrompt=e.Miss=e.Match=e.Link=void 0;var i=n(17),a=o(i),c=n(19),u=o(c),s=n(22),f=o(s),l=n(23),p=o(l),h=n(24),d=o(h),y=n(15),v=o(y),b=n(16),m=o(b),g=n(21),w=o(g),O=n(25),x=o(O),P=n(3),_=o(P),j=n(12),T=o(j),R=n(26),C=o(R),E=n(2),M=r(E);e.Link=a["default"],e.Match=u["default"],e.Miss=f["default"],e.NavigationPrompt=p["default"],e.Redirect=d["default"],e.BrowserRouter=v["default"],e.HashRouter=m["default"],e.MemoryRouter=w["default"],e.ServerRouter=x["default"],e.StaticRouter=_["default"],e.matchPattern=T["default"],e.createServerRenderContext=C["default"],e.propTypes=M},function(e,n){e.exports=t},function(t,e,n){"use strict";e.__esModule=!0,e.routerContext=e.historyContext=e.location=e.history=e.matchContext=e.action=void 0;var r=n(1),o=e.action=r.PropTypes.oneOf(["PUSH","REPLACE","POP"]),i=(e.matchContext=r.PropTypes.shape({addMatch:r.PropTypes.func.isRequired,removeMatch:r.PropTypes.func.isRequired}),e.history=r.PropTypes.shape({listen:r.PropTypes.func.isRequired,listenBefore:r.PropTypes.func.isRequired,push:r.PropTypes.func.isRequired,replace:r.PropTypes.func.isRequired,go:r.PropTypes.func.isRequired}),e.location=r.PropTypes.shape({pathname:r.PropTypes.string.isRequired,search:r.PropTypes.string.isRequired,hash:r.PropTypes.string.isRequired,state:r.PropTypes.any,key:r.PropTypes.string}));e.historyContext=r.PropTypes.shape({action:o.isRequired,location:i.isRequired,push:r.PropTypes.func.isRequired,replace:r.PropTypes.func.isRequired,go:r.PropTypes.func.isRequired,goBack:r.PropTypes.func.isRequired,goForward:r.PropTypes.func.isRequired,canGo:r.PropTypes.func,block:r.PropTypes.func.isRequired}),e.routerContext=r.PropTypes.shape({transitionTo:r.PropTypes.func.isRequired,replaceWith:r.PropTypes.func.isRequired,blockTransitions:r.PropTypes.func.isRequired,createHref:r.PropTypes.func.isRequired})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=n(1),u=r(c),s=n(33),f=n(11),l=r(f),p=n(8),h=n(18),d=n(2),y=function(t){return(0,s.stringify)(t).replace(/%20/g,"+")},v=function(t){function e(){var n,r,a;o(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(u))),r.transitionTo=function(t){r.props.onPush(r.createLocation(t))},r.replaceWith=function(t){r.props.onReplace(r.createLocation(t))},r.blockTransitions=function(t){return r.props.blockTransitions(t)},r.createHref=function(t){var e=(0,h.createRouterPath)(t,r.props.stringifyQuery);return r.props.basename&&(e="/"===e?r.props.basename:e.length>=2&&"/"===e.charAt(0)&&"?"===e.charAt(1)?r.props.basename+e.substring(1):r.props.basename+e),r.props.createHref(e)},r.state={location:null},a=n,i(r,a)}return a(e,t),e.prototype.createLocation=function(t){var e=this.props,n=e.parseQueryString,r=e.stringifyQuery;return(0,h.createRouterLocation)(t,n,r)},e.prototype.getRouterContext=function(){return{transitionTo:this.transitionTo,replaceWith:this.replaceWith,blockTransitions:this.blockTransitions,createHref:this.createHref}},e.prototype.getChildContext=function(){return{router:this.getRouterContext()}},e.prototype.componentWillMount=function(){this.setState({location:this.createLocation(this.props.location)})},e.prototype.componentWillReceiveProps=function(t){var e=this.createLocation(t.location);(0,h.locationsAreEqual)(this.state.location,e)||this.setState({location:e})},e.prototype.render=function(){var t=this.state.location,e=this.props,n=e.action,r=e.children;return u["default"].createElement(p.LocationBroadcast,{value:t},u["default"].createElement(l["default"],null,"function"==typeof r?r({action:n,location:t,router:this.getRouterContext()}):u["default"].Children.only(r)))},e}(u["default"].Component);v.defaultProps={stringifyQuery:y,parseQueryString:s.parse,createHref:function(t){return t}},v.childContextTypes={router:d.routerContext.isRequired},e["default"]=v},function(t,e){"use strict";e.__esModule=!0;e.addLeadingSlash=function(t){return"/"===t.charAt(0)?t:"/"+t},e.stripLeadingSlash=function(t){return"/"===t.charAt(0)?t.substr(1):t},e.stripPrefix=function(t,e){return 0===t.indexOf(e)?t.substr(e.length):t},e.parsePath=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");o!==-1&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return i!==-1&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}},e.createPath=function(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.locationsAreEqual=e.createLocation=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(37),c=r(a),u=n(4),s=(e.createLocation=function(t,e,n,r){var o=void 0;return"string"==typeof t?(o=(0,u.parsePath)(t),o.state=e):(o=i({},t),void 0===o.pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e)),o.key=n,r&&(o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=(0,c["default"])(o.pathname,r.pathname)):o.pathname=r.pathname),o},function f(t,e){if(null==t)return t==e;var n="undefined"==typeof t?"undefined":o(t),r="undefined"==typeof e?"undefined":o(e);if(n!==r)return!1;if(Array.isArray(t))return!(!Array.isArray(e)||t.length!==e.length)&&t.every(function(t,n){return f(t,e[n])});if("object"===n){var i=Object.keys(t),a=Object.keys(e);return i.length===a.length&&i.every(function(n){return f(t[n],e[n])})}return t===e});e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&s(t.state,e.state)}},function(t,e,n){"use strict";var r=function(t,e,n,r,o,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,r,o,i,a,c],f=0;u=new Error(e.replace(/%s/g,function(){return s[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};t.exports=r},function(t,e,n){"use strict";var r=function(){};t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.LocationSubscriber=e.LocationBroadcast=void 0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(1),a=r(i),c=n(36),u="location";e.LocationBroadcast=function(t){return a["default"].createElement(c.Broadcast,o({},t,{channel:u}))},e.LocationSubscriber=function(t){return a["default"].createElement(c.Subscriber,o({},t,{channel:u}))}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=n(1),u=r(c),s=n(2),f=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.getChildContext=function(){return{history:this.history}},e.prototype.componentWillMount=function(){var t=this,e=this.props,n=e.createHistory,r=e.historyOptions;this.history=n(r),this.unlisten=this.history.listen(function(){return t.forceUpdate()})},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.history,e=t.location,n=t.action;return this.props.children({history:t,location:e,action:n})},e}(u["default"].Component);f.childContextTypes={history:s.historyContext.isRequired},e["default"]=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(7),i=(r(o),function(){var t=null,e=function(e){return t=e,function(){t===e&&(t=null)}},n=function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(i!==!1)}else o(!0)},r=[],o=function(t){return r.push(t),function(){r=r.filter(function(e){return e!==t})}},i=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return r.forEach(function(t){return t.apply(void 0,e)})};return{setPrompt:e,confirmTransitionTo:n,appendListener:o,notifyListeners:i}});e["default"]=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=n(1),u=r(c),s=n(2),f=function(t){function e(n){o(this,e);var r=i(this,t.call(this,n));return r.addMatch=function(t){r.matches.push(t)},r.removeMatch=function(t){r.matches.splice(r.matches.indexOf(t),1)},r.matches=[],r.subscribers=[],r.hasMatches=null,r.serverRouterIndex=null,r}return a(e,t),e.prototype.getChildContext=function(){var t=this;return{match:{addMatch:this.addMatch,removeMatch:this.removeMatch,matches:this.matches,parent:this.props.match,serverRouterIndex:this.serverRouterIndex,subscribe:function(e){return t.subscribers.push(e),function(){t.subscribers.splice(t.subscribers.indexOf(e),1)}}}}},e.prototype.componentDidUpdate=function(){this.notifySubscribers()},e.prototype.componentWillMount=function(){var t=this.context.serverRouter;t&&(this.serverRouterIndex=t.registerMatchContext(this.matches))},e.prototype.componentDidMount=function(){this.notifySubscribers()},e.prototype.notifySubscribers=function(){var t=this;this.subscribers.length&&(this.hasMatches=0!==this.matches.length,this.subscribers.forEach(function(e){return e(t.hasMatches)}))},e.prototype.render=function(){return this.props.children},e}(u["default"].Component);f.childContextTypes={match:s.matchContext.isRequired},f.contextTypes={serverRouter:c.PropTypes.object},e["default"]=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(32),i=r(o),a=n(20),c=r(a),u={"true":new c["default"],"false":new c["default"]},s=function(t,e){var n=e?"true":"false",r=u[n].get(t);if(!r){var o=[],a=(0,i["default"])(t,o,{end:e,strict:!0});r={keys:o,regex:a},u[n].set(t,r)}return r},f=function(t,e,n){return e.slice(1).reduce(function(t,e,r){return t[n[r].name]=decodeURIComponent(e),t},{})},l=function(t,e,n,r){var o=!n&&"/"===t;if(o)return{params:null,isExact:"/"===e.pathname,pathname:"/"};r&&"/"!==t.charAt(0)&&(t=r.pathname+("/"!==r.pathname.charAt(r.pathname.length-1)?"/":"")+t);var i=s(t,n),a=i.regex.exec(e.pathname);if(a){var c=f(t,a,i.keys),u=a[0],l=u===e.pathname;return{params:c,isExact:l,pathname:u}}return null};e["default"]=l},function(t,e){"use strict";e.__esModule=!0;e.addEventListener=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},e.removeEventListener=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},e.getConfirmation=function(t,e){return e(window.confirm(t))},e.supportsHistory=function(){var t=window.navigator.userAgent;return(t.indexOf("Android 2.")===-1&&t.indexOf("Android 4.0")===-1||t.indexOf("Mobile Safari")===-1||t.indexOf("Chrome")!==-1||t.indexOf("Windows Phone")!==-1)&&(window.history&&"pushState"in window.history)},e.supportsPopStateOnHashChange=function(){return window.navigator.userAgent.indexOf("Trident")===-1},e.supportsGoWithoutReloadUsingHash=function(){return window.navigator.userAgent.indexOf("Firefox")===-1}},function(t,e){"use strict";e.__esModule=!0;e.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(1),c=r(a),u=n(27),s=r(u),f=n(3),l=r(f),p=n(9),h=r(p),d=function(t){var e=t.basename,n=t.forceRefresh,r=t.getUserConfirmation,a=t.keyLength,u=o(t,["basename","forceRefresh","getUserConfirmation","keyLength"]);return c["default"].createElement(h["default"],{createHistory:s["default"],historyOptions:{basename:e,forceRefresh:n,getUserConfirmation:r,keyLength:a}},function(t){var n=t.history,r=t.action,o=t.location;return c["default"].createElement(l["default"],i({action:r,location:o,basename:e,onPush:n.push,onReplace:n.replace,blockTransitions:n.block},u))})};e["default"]=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(1),c=r(a),u=n(28),s=r(u),f=n(9),l=r(f),p=n(4),h=n(3),d=r(h),y=function(t){return function(e){var n=void 0;switch(t){case"hashbang":n="!"===e.charAt(0)?e:"!/"+(0,p.stripLeadingSlash)(e);break;case"noslash":n=(0,p.stripLeadingSlash)(e);break;case"slash":default:n=(0,p.addLeadingSlash)(e)}return"#"+n}},v=function(t){var e=t.basename,n=t.getUserConfirmation,r=t.hashType,a=o(t,["basename","getUserConfirmation","hashType"]);return c["default"].createElement(l["default"],{createHistory:s["default"],historyOptions:{basename:e,getUserConfirmation:n,hashType:r}},function(t){var n=t.history,o=t.action,u=t.location;return c["default"].createElement(d["default"],i({action:o,location:u,basename:e,onPush:n.push,onReplace:n.replace,blockTransitions:n.block,createHref:y(r)},a))})};e["default"]=v},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(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 c(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.__esModule=!0;var 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},s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f=n(1),l=r(f),p=n(8),h=n(2),d=function(t){function e(){var n,r,o;i(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=a(this,t.call.apply(t,[this].concat(u))),r.handleClick=function(t){r.props.onClick&&r.props.onClick(t),t.defaultPrevented||r.props.target||g(t)||!m(t)||(t.preventDefault(),r.handleTransition())},r.handleTransition=function(){var t=r.context.router,e=r.props,n=e.to,o=e.replace,i=o?t.replaceWith:t.transitionTo;i(n)},o=n,a(r,o)}return c(e,t),e.prototype.render=function(){var t=this,e=this.context.router,n=this.props,r=n.to,i=n.style,a=n.activeStyle,c=n.className,u=n.activeClassName,f=n.location,h=n.isActive,d=(n.activeOnlyWhenExact,n.replace,n.children),v=o(n,["to","style","activeStyle","className","activeClassName","location","isActive","activeOnlyWhenExact","replace","children"]),b=""===u&&0===Object.keys(a).length&&"function"!=typeof d;return b?l["default"].createElement("a",s({href:e?e.createHref(r):r,onClick:this.handleClick,style:i,className:c,children:d},v)):l["default"].createElement(p.LocationSubscriber,null,function(n){var o=f||n,p=h(o,y(r),t.props);return"function"==typeof d?d({isActive:p,location:o,href:e?e.createHref(r):r,onClick:t.handleClick,transition:t.handleTransition}):l["default"].createElement("a",s({href:e?e.createHref(r):r,onClick:t.handleClick,style:p?s({},i,a):i,className:p?[c,u].join(" ").trim():c,children:d},v))})},e}(l["default"].Component);d.defaultProps={replace:!1,activeOnlyWhenExact:!1,className:"",activeClassName:"",style:{},activeStyle:{},isActive:function(t,e,n){return v(e.pathname,t.pathname,n.activeOnlyWhenExact)&&b(e.query,t.query)}},d.contextTypes={router:h.routerContext};var y=function(t){return"object"===("undefined"==typeof t?"undefined":u(t))?t:{pathname:t}},v=function(t,e,n){return n?e===t:0===e.indexOf(t)},b=function(t,e){return null==e?null==t:null==t||w(t,e)},m=function(t){return 0===t.button},g=function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)},w=function O(t,e){if(t==e)return!0;if(null==t||null==e)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every(function(t,n){return O(t,e[n])});if("object"===("undefined"==typeof t?"undefined":u(t))){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))if(void 0===t[n]){if(void 0!==e[n])return!1}else{if(!Object.prototype.hasOwnProperty.call(e,n))return!1;if(!O(t[n],e[n]))return!1}return!0}return String(t)===String(e)};e["default"]=d},function(t,e,n){"use strict";e.__esModule=!0,e.createRouterPath=e.createRouterLocation=e.locationsAreEqual=void 0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=n(5);Object.defineProperty(e,"locationsAreEqual",{enumerable:!0,get:function(){return o.locationsAreEqual}});var i=n(4);e.createRouterLocation=function(t,e,n){if("string"==typeof t){var r=(0,i.parsePath)(t);return r.query=""!==r.search?e(r.search):null,r}return{pathname:t.pathname||"",search:t.search||(t.query?"?"+n(t.query):""),hash:t.hash||"",state:t.state||null,query:t.query||(t.search?e(t.search):null)}},e.createRouterPath=function(t,e){return"string"==typeof t?t:(0,i.createPath)(r({},t,{search:t.search||(t.query?"?"+e(t.query):"")}))}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=n(1),s=r(u),f=n(11),l=r(f),p=n(12),h=r(p),d=n(8),y=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.registerMatch=function(){var t=this.context.match,e=this.props.match;e&&t&&t.addMatch(e)},e.prototype.componentWillMount=function(){this.context.serverRouter&&this.registerMatch()},e.prototype.componentDidMount=function(){this.context.serverRouter||this.registerMatch()},e.prototype.componentDidUpdate=function(t){var e=this.context.match;e&&(t.match&&!this.props.match?e.removeMatch(t.match):!t.match&&this.props.match&&e.addMatch(this.props.match))},e.prototype.componentWillUnmount=function(){this.props.match&&this.context.match.removeMatch(this.props.match)},e.prototype.render=function(){return s["default"].Children.only(this.props.children)},e}(s["default"].Component);y.contextTypes={match:u.PropTypes.object,serverRouter:u.PropTypes.object};var v=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.render=function(){var t=this;return s["default"].createElement(d.LocationSubscriber,null,function(e){var n=t.props,r=n.children,o=n.render,i=n.component,a=n.pattern,u=n.location,f=n.exactly,p=t.context.match,d=u||e,v=p&&p.parent,b=(0,h["default"])(a,d,f,v),m=c({},b,{location:d,pattern:a});return s["default"].createElement(y,{match:b},s["default"].createElement(l["default"],{match:b},r?r(c({matched:!!b},m)):b?o?o(m):s["default"].createElement(i,m):null))})},e}(s["default"].Component);v.defaultProps={exactly:!1},v.contextTypes={location:u.PropTypes.object,match:u.PropTypes.object},e["default"]=v},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o={limit:200},i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,t),this.cache={},this.cachedKeys=[];var i=r({},o,e);this.options=i}return t.prototype.set=function(t,e){void 0===this.cache[t]&&this.cachedKeys.push(t),this.cache[t]=e,this.checkCacheLimit()},t.prototype.get=function(t){return this.cache[t]},t.prototype.checkCacheLimit=function(){if(this.cachedKeys.length>this.options.limit){var t=this.cachedKeys.shift();delete this.cache[t]}},t}();e["default"]=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(1),c=r(a),u=n(29),s=r(u),f=n(3),l=r(f),p=n(9),h=r(p),d=function(t){var e=t.getUserConfirmation,n=t.initialEntries,r=t.initialIndex,a=t.keyLength,u=o(t,["getUserConfirmation","initialEntries","initialIndex","keyLength"]);return c["default"].createElement(h["default"],{createHistory:s["default"],historyOptions:{getUserConfirmation:e,initialEntries:n,initialIndex:r,keyLength:a}},function(t){var e=t.history,n=t.action,r=t.location;return c["default"].createElement(l["default"],i({action:n,location:r,onPush:e.push,onReplace:e.replace,blockTransitions:e.block},u))})};e["default"]=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=n(1),u=r(c),s=(n(2),function(t){function e(n,r){o(this,e);var a=i(this,t.call(this,n,r));return r.match&&!r.serverRouter&&(a.unsubscribe=a.context.match.subscribe(function(t){a.setState({noMatchesInContext:!t})})),r.serverRouter&&r.serverRouter.registerMissPresence(r.match.serverRouterIndex),a.state={noMatchesInContext:!1},a}return a(e,t),e.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.render=function n(){var t=this.props,n=t.render,e=t.component,r=this.state.noMatchesInContext,o=this.props.location,i=o||this.context.location,a=this.context,c=a.serverRouter,s=a.match,f=c&&c.missedAtIndex(s.serverRouterIndex);return r||f?n?n({location:i}):u["default"].createElement(e,{location:i}):null},e}(u["default"].Component));s.contextTypes={match:c.PropTypes.object,location:c.PropTypes.object,serverRouter:c.PropTypes.object},e["default"]=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=n(1),u=r(c),s=n(2),f=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.block=function(){this.teardownPrompt||(this.teardownPrompt=this.context.history.block(this.props.message))},e.prototype.unblock=function(){this.teardownPrompt&&(this.teardownPrompt(),this.teardownPrompt=null)},e.prototype.componentWillMount=function(){this.props.when&&this.block()},e.prototype.componentWillReceiveProps=function(t){t.when?this.block():this.unblock()},e.prototype.componentWillUnmount=function(){this.unblock()},e.prototype.render=function(){return null},e}(u["default"].Component);f.contextTypes={history:s.historyContext.isRequired},f.defaultProps={when:!0},e["default"]=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=n(1),u=r(c),s=n(2),f=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return a(e,t),e.prototype.componentWillMount=function(){this.context.serverRouter&&this.redirect()},e.prototype.componentDidMount=function(){this.redirect()},e.prototype.redirect=function(){var t=this.context.router,e=this.props,n=e.to,r=e.push;if(t){var o=r?t.transitionTo:t.replaceWith;o(n)}},e.prototype.render=function(){return null},e}(u["default"].Component);f.defaultProps={push:!1},f.contextTypes={router:s.routerContext,serverRouter:c.PropTypes.object},e["default"]=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(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 c(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.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=n(1),f=r(s),l=n(3),p=r(l),h=function(t){function e(){return i(this,e),a(this,t.apply(this,arguments))}return c(e,t),e.prototype.getChildContext=function(){return{serverRouter:this.props.context}},e.prototype.render=function(){var t=this.props,e=t.context,n=t.location,r=o(t,["context","location"]),i=function(t){e.setRedirect(t)};return f["default"].createElement(p["default"],u({action:"POP",location:n,onReplace:i,onPush:i},r))},e}(f["default"].Component);h.childContextTypes={serverRouter:s.PropTypes.object.isRequired},e["default"]=h},function(t,e){"use strict";e.__esModule=!0;var n=function(){},r=function(){var t=!1,e=null,r=[],o=t?n:function(t){e||(e=t)},i=t?n:function(t){return r.push({hasMissComponent:!1,matchesByIdentity:t})-1},a=t?n:function(t){r[t].hasMissComponent=!0},c=function(){t=!0;var n=r.some(function(t,e){return u(e)});return{redirect:e,missed:n}},u=function(t){var e=r[t];return 0===e.matchesByIdentity.length&&e.hasMissComponent};return{setRedirect:o,registerMatchContext:i,registerMissPresence:a,getResult:c,missedAtIndex:u}};e["default"]=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}),i=n(7),a=(r(i),n(6)),c=r(a),u=n(5),s=n(4),f=n(10),l=r(f),p=n(14),h=n(13),d="popstate",y="hashchange",v=function(){try{return window.history.state||{}}catch(t){return{}}},b=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];p.canUseDOM?void 0:(0,c["default"])(!1);var e=window.history,n=(0,
h.supportsHistory)(),r=!(0,h.supportsPopStateOnHashChange)(),i=t.basename,a=void 0===i?"":i,f=t.forceRefresh,b=void 0!==f&&f,m=t.getUserConfirmation,g=void 0===m?h.getConfirmation:m,w=t.keyLength,O=void 0===w?6:w,x=function(t){var e=t||{},n=e.key,r=e.state,i=window.location,c=i.pathname,u=i.search,f=i.hash,l=c+u+f;return a&&(l=(0,s.stripPrefix)(l,a)),o({},(0,s.parsePath)(l),{state:r,key:n})},P=function(){return Math.random().toString(36).substr(2,O)},_=(0,l["default"])(),j=function(t){o($,t),$.length=e.length,_.notifyListeners($.location,$.action)},T=function(t){void 0!==t.state&&E(x(t.state))},R=function(){E(x(v()))},C=!1,E=function(t){C?(C=!1,j()):!function(){var e="POP";_.confirmTransitionTo(t,e,g,function(n){n?j({action:e,location:t}):M(t)})}()},M=function(t){var e=$.location,n=k.indexOf(e.key);n===-1&&(n=0);var r=k.indexOf(t.key);r===-1&&(r=0);var o=n-r;o&&(C=!0,q(o))},S=x(v()),k=[S.key],L=function(t,r){var o="PUSH",i=(0,u.createLocation)(t,r,P(),$.location);_.confirmTransitionTo(i,o,g,function(t){if(t){var r=a+(0,s.createPath)(i),c=i.key,u=i.state;if(n)if(e.pushState({key:c,state:u},null,r),b)window.location.href=r;else{var f=k.indexOf($.location.key),l=k.slice(0,f===-1?0:f+1);l.push(i.key),k=l,j({action:o,location:i})}else window.location.href=r}})},A=function(t,r){var o="REPLACE",i=(0,u.createLocation)(t,r,P(),$.location);_.confirmTransitionTo(i,o,g,function(t){if(t){var r=a+(0,s.createPath)(i),c=i.key,u=i.state;if(n)if(e.replaceState({key:c,state:u},null,r),b)window.location.replace(r);else{var f=k.indexOf($.location.key);f!==-1&&(k[f]=i.key),j({action:o,location:i})}else window.location.replace(r)}})},q=function(t){e.go(t)},U=function(){return q(-1)},I=function(){return q(1)},W=0,H=function(t){W+=t,1===W?((0,h.addEventListener)(window,d,T),r&&(0,h.addEventListener)(window,y,R)):0===W&&((0,h.removeEventListener)(window,d,T),r&&(0,h.removeEventListener)(window,y,R))},B=!1,N=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=_.setPrompt(t);return B||(H(1),B=!0),function(){return B&&(B=!1,H(-1)),e()}},D=function(t){var e=_.appendListener(t);return H(1),function(){return H(-1),e()}},$={length:e.length,action:"POP",location:S,push:L,replace:A,go:q,goBack:U,goForward:I,block:N,listen:D};return $};e["default"]=b},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(7),a=(r(i),n(6)),c=r(a),u=n(5),s=n(4),f=n(10),l=r(f),p=n(14),h=n(13),d="hashchange",y={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+(0,s.stripLeadingSlash)(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:s.stripLeadingSlash,decodePath:s.addLeadingSlash},slash:{encodePath:s.addLeadingSlash,decodePath:s.addLeadingSlash}},v=function(){var t=window.location.href,e=t.indexOf("#");return e===-1?"":t.substring(e+1)},b=function(t){return window.location.hash=t},m=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)},g=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];p.canUseDOM?void 0:(0,c["default"])(!1);var e=window.history,n=((0,h.supportsGoWithoutReloadUsingHash)(),t.basename),r=void 0===n?"":n,i=t.getUserConfirmation,a=void 0===i?h.getConfirmation:i,f=t.hashType,g=void 0===f?"slash":f,w=y[g],O=w.encodePath,x=w.decodePath,P=function(){var t=x(v());return r&&(t=(0,s.stripPrefix)(t,r)),(0,s.parsePath)(t)},_=(0,l["default"])(),j=function(t){o(F,t),F.length=e.length,_.notifyListeners(F.location,F.action)},T=!1,R=null,C=function(){var t=v(),e=O(t);if(t!==e)m(e);else{var n=P(),r=F.location;if(!T&&(0,u.locationsAreEqual)(r,n))return;if(R===(0,s.createPath)(n))return;R=null,E(n)}},E=function(t){T?(T=!1,j()):!function(){var e="POP";_.confirmTransitionTo(t,e,a,function(n){n?j({action:e,location:t}):M(t)})}()},M=function(t){var e=F.location,n=A.lastIndexOf((0,s.createPath)(e));n===-1&&(n=0);var r=A.lastIndexOf((0,s.createPath)(t));r===-1&&(r=0);var o=n-r;o&&(T=!0,I(o))},S=v(),k=O(S);S!==k&&m(k);var L=P(),A=[(0,s.createPath)(L)],q=function(t,e){var n="PUSH",o=(0,u.createLocation)(t,void 0,void 0,F.location);_.confirmTransitionTo(o,n,a,function(t){if(t){var e=(0,s.createPath)(o),i=O(r+e),a=v()!==i;if(a){R=e,b(i);var c=A.lastIndexOf((0,s.createPath)(F.location)),u=A.slice(0,c===-1?0:c+1);u.push(e),A=u,j({action:n,location:o})}else j()}})},U=function(t,e){var n="REPLACE",o=(0,u.createLocation)(t,void 0,void 0,F.location);_.confirmTransitionTo(o,n,a,function(t){if(t){var e=(0,s.createPath)(o),i=O(r+e),a=v()!==i;a&&(R=e,m(i));var c=A.indexOf((0,s.createPath)(F.location));c!==-1&&(A[c]=e),j({action:n,location:o})}})},I=function(t){e.go(t)},W=function(){return I(-1)},H=function(){return I(1)},B=0,N=function(t){B+=t,1===B?(0,h.addEventListener)(window,d,C):0===B&&(0,h.removeEventListener)(window,d,C)},D=!1,$=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=_.setPrompt(t);return D||(N(1),D=!0),function(){return D&&(D=!1,N(-1)),e()}},K=function(t){var e=_.appendListener(t);return N(1),function(){return N(-1),e()}},F={length:e.length,action:"POP",location:L,push:q,replace:U,go:I,goBack:W,goForward:H,block:$,listen:K};return F};e["default"]=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}),i=n(7),a=(r(i),n(5)),c=n(10),u=r(c),s=function(t,e,n){return Math.min(Math.max(t,e),n)},f=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=t.getUserConfirmation,n=t.initialEntries,r=void 0===n?["/"]:n,i=t.initialIndex,c=void 0===i?0:i,f=t.keyLength,l=void 0===f?6:f,p=(0,u["default"])(),h=function(t){o(j,t),j.length=j.entries.length,p.notifyListeners(j.location,j.action)},d=function(){return Math.random().toString(36).substr(2,l)},y=s(c,0,r.length-1),v=r.map(function(t,e){return"string"==typeof t?(0,a.createLocation)(t,void 0,e?d():void 0):(0,a.createLocation)(t,void 0,e?t.key||d():void 0)}),b=function(t,n){var r="PUSH",o=(0,a.createLocation)(t,n,d(),j.location);p.confirmTransitionTo(o,r,e,function(t){if(t){var e=j.index,n=e+1,i=j.entries.slice(0);i.length>n?i.splice(n,i.length-n,o):i.push(o),h({action:r,location:o,index:n,entries:i})}})},m=function(t,n){var r="REPLACE",o=(0,a.createLocation)(t,n,d(),j.location);p.confirmTransitionTo(o,r,e,function(t){t&&(j.entries[j.index]=o,h({action:r,location:o}))})},g=function(t){var n=s(j.index+t,0,j.entries.length-1),r="POP",o=j.entries[n];p.confirmTransitionTo(o,r,e,function(t){t?h({action:r,location:o,index:n}):h()})},w=function(){return g(-1)},O=function(){return g(1)},x=function(t){var e=j.index+t;return e>=0&&e<j.entries.length},P=function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0];return p.setPrompt(t)},_=function(t){return p.appendListener(t)},j={length:v.length,action:"POP",location:v[y],index:y,entries:v,push:b,replace:m,go:g,goBack:w,goForward:O,canGo:x,block:P,listen:_};return j};e["default"]=f},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function r(){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;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=r()?Object.assign:function(t,e){for(var r,a,c=n(t),u=1;u<arguments.length;u++){r=Object(arguments[u]);for(var s in r)o.call(r,s)&&(c[s]=r[s]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var f=0;f<a.length;f++)i.call(r,a[f])&&(c[a[f]]=r[a[f]])}}return c}},function(t,e,n){function r(t,e){for(var n,r=[],o=0,i=0,a="",c=e&&e.delimiter||"/";null!=(n=m.exec(t));){var f=n[0],l=n[1],p=n.index;if(a+=t.slice(i,p),i=p+f.length,l)a+=l[1];else{var h=t[i],d=n[2],y=n[3],v=n[4],b=n[5],g=n[6],w=n[7];a&&(r.push(a),a="");var O=null!=d&&null!=h&&h!==d,x="+"===g||"*"===g,P="?"===g||"*"===g,_=n[2]||c,j=v||b;r.push({name:y||o++,prefix:d||"",delimiter:_,optional:P,repeat:x,partial:O,asterisk:!!w,pattern:j?s(j):w?".*":"[^"+u(_)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&r.push(a),r}function o(t,e){return c(r(t,e))}function i(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function a(t){return encodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function c(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,r){for(var o="",c=n||{},u=r||{},s=u.pretty?i:encodeURIComponent,f=0;f<t.length;f++){var l=t[f];if("string"!=typeof l){var p,h=c[l.name];if(null==h){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(b(h)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var d=0;d<h.length;d++){if(p=s(h[d]),!e[f].test(p))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(p)+"`");o+=(0===d?l.prefix:l.delimiter)+p}}else{if(p=l.asterisk?a(h):s(h),!e[f].test(p))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+p+'"');o+=l.prefix+p}}else o+=l}return o}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function f(t,e){return t.keys=e,t}function l(t){return t.sensitive?"":"i"}function p(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return f(t,e)}function h(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(v(t[o],e,n).source);var i=new RegExp("(?:"+r.join("|")+")",l(n));return f(i,e)}function d(t,e,n){return y(r(t,n),e,n)}function y(t,e,n){b(e)||(n=e||n,e=[]),n=n||{};for(var r=n.strict,o=n.end!==!1,i="",a=t[t.length-1],c="string"==typeof a&&/\/$/.test(a),s=0;s<t.length;s++){var p=t[s];if("string"==typeof p)i+=u(p);else{var h=u(p.prefix),d="(?:"+p.pattern+")";e.push(p),p.repeat&&(d+="(?:"+h+d+")*"),d=p.optional?p.partial?h+"("+d+")?":"(?:"+h+"("+d+"))?":h+"("+d+")",i+=d}}return r||(i=(c?i.slice(0,-2):i)+"(?:\\/(?=$))?"),i+=o?"$":r&&c?"":"(?=\\/|$)",f(new RegExp("^"+i,l(n)),e)}function v(t,e,n){return b(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?p(t,e):b(t)?h(t,e,n):d(t,e,n)}var b=n(30);t.exports=v,t.exports.parse=r,t.exports.compile=o,t.exports.tokensToFunction=c,t.exports.tokensToRegExp=y;var m=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},function(t,e,n){"use strict";function r(t,e){return e.encode?e.strict?o(t):encodeURIComponent(t):t}var o=n(38),i=n(31);e.extract=function(t){return t.split("?")[1]||""},e.parse=function(t){var e=Object.create(null);return"string"!=typeof t?e:(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=n.shift(),o=n.length>0?n.join("="):void 0;r=decodeURIComponent(r),o=void 0===o?null:decodeURIComponent(o),void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]}),e):e},e.stringify=function(t,e){var n={encode:!0,strict:!0};return e=i(n,e),t?Object.keys(t).sort().map(function(n){var o=t[n];if(void 0===o)return"";if(null===o)return r(n,e);if(Array.isArray(o)){var i=[];return o.slice().forEach(function(t){void 0!==t&&(null===t?i.push(r(n,e)):i.push(r(n,e)+"="+r(t,e)))}),i.join("&")}return r(n,e)+"="+r(o,e)}).filter(function(t){return t.length>0}).join("&"):""}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=n(6),s=r(u),f=n(1),l=r(f),p=function(t){var e=[],n=t;return{publish:function(t){n=t,e.forEach(function(t){return t(n)})},subscribe:function(t){return e.push(t),t(n),function(){return e=e.filter(function(e){return e!==t})}}}},h=function(t){function e(){var n,r,a;o(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(u))),r.broadcast=p(r.props.value),a=n,i(r,a)}return a(e,t),e.prototype.getBroadcastsContext=function(){var t,e=this.props.channel,n=this.context.broadcasts;return c({},n,(t={},t[e]=this.broadcast.subscribe,t))},e.prototype.getChildContext=function(){return{broadcasts:this.getBroadcastsContext()}},e.prototype.componentWillReceiveProps=function(t){this.props.channel!==t.channel?(0,s["default"])(!1):void 0,this.props.value!==t.value&&this.broadcast.publish(t.value)},e.prototype.render=function(){return l["default"].Children.only(this.props.children)},e}(l["default"].Component);h.contextTypes={broadcasts:f.PropTypes.object},h.childContextTypes={broadcasts:f.PropTypes.object.isRequired},e["default"]=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 a(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.__esModule=!0;var c=n(6),u=r(c),s=n(1),f=r(s),l=function(t){function e(){var n,r,a;o(this,e);for(var c=arguments.length,u=Array(c),s=0;s<c;s++)u[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(u))),r.state={value:null},a=n,i(r,a)}return a(e,t),e.prototype.componentWillMount=function(){var t=this,e=this.props.channel;if(this.context.broadcasts){var n=this.context.broadcasts[e];"function"!=typeof n?(0,u["default"])(!1):void 0,this.unsubscribe=n(function(e){t.setState({value:e})})}},e.prototype.componentWillUnmount=function(){this.unsubscribe()},e.prototype.render=function(){return this.props.children(this.state.value)},e}(f["default"].Component);l.contextTypes={broadcasts:f["default"].PropTypes.object},e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.Subscriber=e.Broadcast=void 0;var o=n(34),i=r(o),a=n(35),c=r(a);e.Broadcast=i["default"],e.Subscriber=c["default"]},function(t,e){"use strict";var n=function(t){return"/"===t.charAt(0)},r=function(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()},o=function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1],o=t&&t.split("/")||[],i=e&&e.split("/")||[],a=t&&n(t),c=e&&n(e),u=a||c;if(t&&n(t)?i=o:o.length&&(i.pop(),i=i.concat(o)),!i.length)return"/";var s=void 0;if(i.length){var f=i[i.length-1];s="."===f||".."===f||""===f}else s=!1;for(var l=0,p=i.length;p>=0;p--){var h=i[p];"."===h?r(i,p):".."===h?(r(i,p),l++):l&&(r(i,p),l--)}if(!u)for(;l--;l)i.unshift("..");!u||""===i[0]||i[0]&&n(i[0])||i.unshift("");var d=i.join("/");return s&&"/"!==d.substr(-1)&&(d+="/"),d};t.exports=o},function(t,e){"use strict";t.exports=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}}])});

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