This commit is contained in:
3
node_modules/react-router-dom/BrowserRouter.js
generated
vendored
Normal file
3
node_modules/react-router-dom/BrowserRouter.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("BrowserRouter");
|
||||
module.exports = require("./index.js").BrowserRouter;
|
||||
3
node_modules/react-router-dom/HashRouter.js
generated
vendored
Normal file
3
node_modules/react-router-dom/HashRouter.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("HashRouter");
|
||||
module.exports = require("./index.js").HashRouter;
|
||||
22
node_modules/react-router-dom/LICENSE
generated
vendored
Normal file
22
node_modules/react-router-dom/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) React Training 2015-2019
|
||||
Copyright (c) Remix Software 2020-2022
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
3
node_modules/react-router-dom/Link.js
generated
vendored
Normal file
3
node_modules/react-router-dom/Link.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("Link");
|
||||
module.exports = require("./index.js").Link;
|
||||
3
node_modules/react-router-dom/MemoryRouter.js
generated
vendored
Normal file
3
node_modules/react-router-dom/MemoryRouter.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("MemoryRouter");
|
||||
module.exports = require("./index.js").MemoryRouter;
|
||||
3
node_modules/react-router-dom/NavLink.js
generated
vendored
Normal file
3
node_modules/react-router-dom/NavLink.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("NavLink");
|
||||
module.exports = require("./index.js").NavLink;
|
||||
3
node_modules/react-router-dom/Prompt.js
generated
vendored
Normal file
3
node_modules/react-router-dom/Prompt.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("Prompt");
|
||||
module.exports = require("./index.js").Prompt;
|
||||
37
node_modules/react-router-dom/README.md
generated
vendored
Normal file
37
node_modules/react-router-dom/README.md
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
# react-router-dom
|
||||
|
||||
DOM bindings for [React Router](https://reactrouter.com).
|
||||
|
||||
## Installation
|
||||
|
||||
Using [npm](https://www.npmjs.com/):
|
||||
|
||||
$ npm install --save react-router-dom
|
||||
|
||||
Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else:
|
||||
|
||||
```js
|
||||
// using ES6 modules
|
||||
import { BrowserRouter, Route, Link } from "react-router-dom";
|
||||
|
||||
// using CommonJS modules
|
||||
const BrowserRouter = require("react-router-dom").BrowserRouter;
|
||||
const Route = require("react-router-dom").Route;
|
||||
const Link = require("react-router-dom").Link;
|
||||
```
|
||||
|
||||
The UMD build is also available on [unpkg](https://unpkg.com):
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/react-router-dom/umd/react-router-dom.min.js"></script>
|
||||
```
|
||||
|
||||
You can find the library on `window.ReactRouterDOM`.
|
||||
|
||||
## Issues
|
||||
|
||||
If you find a bug, please file an issue on [our issue tracker on GitHub](https://github.com/remix-run/react-router/issues).
|
||||
|
||||
## Credits
|
||||
|
||||
React Router is built and maintained by [Remix Software](https://remix.run).
|
||||
3
node_modules/react-router-dom/Redirect.js
generated
vendored
Normal file
3
node_modules/react-router-dom/Redirect.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("Redirect");
|
||||
module.exports = require("./index.js").Redirect;
|
||||
3
node_modules/react-router-dom/Route.js
generated
vendored
Normal file
3
node_modules/react-router-dom/Route.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("Route");
|
||||
module.exports = require("./index.js").Route;
|
||||
3
node_modules/react-router-dom/Router.js
generated
vendored
Normal file
3
node_modules/react-router-dom/Router.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("Router");
|
||||
module.exports = require("./index.js").Router;
|
||||
3
node_modules/react-router-dom/StaticRouter.js
generated
vendored
Normal file
3
node_modules/react-router-dom/StaticRouter.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("StaticRouter");
|
||||
module.exports = require("./index.js").StaticRouter;
|
||||
3
node_modules/react-router-dom/Switch.js
generated
vendored
Normal file
3
node_modules/react-router-dom/Switch.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("Switch");
|
||||
module.exports = require("./index.js").Switch;
|
||||
455
node_modules/react-router-dom/cjs/react-router-dom.js
generated
vendored
Normal file
455
node_modules/react-router-dom/cjs/react-router-dom.js
generated
vendored
Normal file
@@ -0,0 +1,455 @@
|
||||
'use strict';
|
||||
|
||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||
|
||||
var reactRouter = require('react-router');
|
||||
var React = _interopDefault(require('react'));
|
||||
var history = require('history');
|
||||
var PropTypes = _interopDefault(require('prop-types'));
|
||||
var warning = _interopDefault(require('tiny-warning'));
|
||||
var invariant = _interopDefault(require('tiny-invariant'));
|
||||
|
||||
function _extends() {
|
||||
_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;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
function _inheritsLoose(subClass, superClass) {
|
||||
subClass.prototype = Object.create(superClass.prototype);
|
||||
subClass.prototype.constructor = subClass;
|
||||
|
||||
_setPrototypeOf(subClass, superClass);
|
||||
}
|
||||
|
||||
function _setPrototypeOf(o, p) {
|
||||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
||||
o.__proto__ = p;
|
||||
return o;
|
||||
};
|
||||
|
||||
return _setPrototypeOf(o, p);
|
||||
}
|
||||
|
||||
function _objectWithoutPropertiesLoose(source, excluded) {
|
||||
if (source == null) return {};
|
||||
var target = {};
|
||||
var sourceKeys = Object.keys(source);
|
||||
var key, i;
|
||||
|
||||
for (i = 0; i < sourceKeys.length; i++) {
|
||||
key = sourceKeys[i];
|
||||
if (excluded.indexOf(key) >= 0) continue;
|
||||
target[key] = source[key];
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* The public API for a <Router> that uses HTML5 history.
|
||||
*/
|
||||
|
||||
var BrowserRouter = /*#__PURE__*/function (_React$Component) {
|
||||
_inheritsLoose(BrowserRouter, _React$Component);
|
||||
|
||||
function BrowserRouter() {
|
||||
var _this;
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
||||
_this.history = history.createBrowserHistory(_this.props);
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = BrowserRouter.prototype;
|
||||
|
||||
_proto.render = function render() {
|
||||
return /*#__PURE__*/React.createElement(reactRouter.Router, {
|
||||
history: this.history,
|
||||
children: this.props.children
|
||||
});
|
||||
};
|
||||
|
||||
return BrowserRouter;
|
||||
}(React.Component);
|
||||
|
||||
{
|
||||
BrowserRouter.propTypes = {
|
||||
basename: PropTypes.string,
|
||||
children: PropTypes.node,
|
||||
forceRefresh: PropTypes.bool,
|
||||
getUserConfirmation: PropTypes.func,
|
||||
keyLength: PropTypes.number
|
||||
};
|
||||
|
||||
BrowserRouter.prototype.componentDidMount = function () {
|
||||
warning(!this.props.history, "<BrowserRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { BrowserRouter as Router }`.") ;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The public API for a <Router> that uses window.location.hash.
|
||||
*/
|
||||
|
||||
var HashRouter = /*#__PURE__*/function (_React$Component) {
|
||||
_inheritsLoose(HashRouter, _React$Component);
|
||||
|
||||
function HashRouter() {
|
||||
var _this;
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
||||
_this.history = history.createHashHistory(_this.props);
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = HashRouter.prototype;
|
||||
|
||||
_proto.render = function render() {
|
||||
return /*#__PURE__*/React.createElement(reactRouter.Router, {
|
||||
history: this.history,
|
||||
children: this.props.children
|
||||
});
|
||||
};
|
||||
|
||||
return HashRouter;
|
||||
}(React.Component);
|
||||
|
||||
{
|
||||
HashRouter.propTypes = {
|
||||
basename: PropTypes.string,
|
||||
children: PropTypes.node,
|
||||
getUserConfirmation: PropTypes.func,
|
||||
hashType: PropTypes.oneOf(["hashbang", "noslash", "slash"])
|
||||
};
|
||||
|
||||
HashRouter.prototype.componentDidMount = function () {
|
||||
warning(!this.props.history, "<HashRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { HashRouter as Router }`.") ;
|
||||
};
|
||||
}
|
||||
|
||||
var resolveToLocation = function resolveToLocation(to, currentLocation) {
|
||||
return typeof to === "function" ? to(currentLocation) : to;
|
||||
};
|
||||
var normalizeToLocation = function normalizeToLocation(to, currentLocation) {
|
||||
return typeof to === "string" ? history.createLocation(to, null, null, currentLocation) : to;
|
||||
};
|
||||
|
||||
var forwardRefShim = function forwardRefShim(C) {
|
||||
return C;
|
||||
};
|
||||
|
||||
var forwardRef = React.forwardRef;
|
||||
|
||||
if (typeof forwardRef === "undefined") {
|
||||
forwardRef = forwardRefShim;
|
||||
}
|
||||
|
||||
function isModifiedEvent(event) {
|
||||
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
||||
}
|
||||
|
||||
var LinkAnchor = forwardRef(function (_ref, forwardedRef) {
|
||||
var innerRef = _ref.innerRef,
|
||||
navigate = _ref.navigate,
|
||||
_onClick = _ref.onClick,
|
||||
rest = _objectWithoutPropertiesLoose(_ref, ["innerRef", "navigate", "onClick"]);
|
||||
|
||||
var target = rest.target;
|
||||
|
||||
var props = _extends({}, rest, {
|
||||
onClick: function onClick(event) {
|
||||
try {
|
||||
if (_onClick) _onClick(event);
|
||||
} catch (ex) {
|
||||
event.preventDefault();
|
||||
throw ex;
|
||||
}
|
||||
|
||||
if (!event.defaultPrevented && // onClick prevented default
|
||||
event.button === 0 && ( // ignore everything but left clicks
|
||||
!target || target === "_self") && // let browser handle "target=_blank" etc.
|
||||
!isModifiedEvent(event) // ignore clicks with modifier keys
|
||||
) {
|
||||
event.preventDefault();
|
||||
navigate();
|
||||
}
|
||||
}
|
||||
}); // React 15 compat
|
||||
|
||||
|
||||
if (forwardRefShim !== forwardRef) {
|
||||
props.ref = forwardedRef || innerRef;
|
||||
} else {
|
||||
props.ref = innerRef;
|
||||
}
|
||||
/* eslint-disable-next-line jsx-a11y/anchor-has-content */
|
||||
|
||||
|
||||
return /*#__PURE__*/React.createElement("a", props);
|
||||
});
|
||||
|
||||
{
|
||||
LinkAnchor.displayName = "LinkAnchor";
|
||||
}
|
||||
/**
|
||||
* The public API for rendering a history-aware <a>.
|
||||
*/
|
||||
|
||||
|
||||
var Link = forwardRef(function (_ref2, forwardedRef) {
|
||||
var _ref2$component = _ref2.component,
|
||||
component = _ref2$component === void 0 ? LinkAnchor : _ref2$component,
|
||||
replace = _ref2.replace,
|
||||
to = _ref2.to,
|
||||
innerRef = _ref2.innerRef,
|
||||
rest = _objectWithoutPropertiesLoose(_ref2, ["component", "replace", "to", "innerRef"]);
|
||||
|
||||
return /*#__PURE__*/React.createElement(reactRouter.__RouterContext.Consumer, null, function (context) {
|
||||
!context ? invariant(false, "You should not use <Link> outside a <Router>") : void 0;
|
||||
var history$1 = context.history;
|
||||
var location = normalizeToLocation(resolveToLocation(to, context.location), context.location);
|
||||
var href = location ? history$1.createHref(location) : "";
|
||||
|
||||
var props = _extends({}, rest, {
|
||||
href: href,
|
||||
navigate: function navigate() {
|
||||
var location = resolveToLocation(to, context.location);
|
||||
var isDuplicateNavigation = history.createPath(context.location) === history.createPath(normalizeToLocation(location));
|
||||
var method = replace || isDuplicateNavigation ? history$1.replace : history$1.push;
|
||||
method(location);
|
||||
}
|
||||
}); // React 15 compat
|
||||
|
||||
|
||||
if (forwardRefShim !== forwardRef) {
|
||||
props.ref = forwardedRef || innerRef;
|
||||
} else {
|
||||
props.innerRef = innerRef;
|
||||
}
|
||||
|
||||
return /*#__PURE__*/React.createElement(component, props);
|
||||
});
|
||||
});
|
||||
|
||||
{
|
||||
var toType = PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.func]);
|
||||
var refType = PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.shape({
|
||||
current: PropTypes.any
|
||||
})]);
|
||||
Link.displayName = "Link";
|
||||
Link.propTypes = {
|
||||
innerRef: refType,
|
||||
onClick: PropTypes.func,
|
||||
replace: PropTypes.bool,
|
||||
target: PropTypes.string,
|
||||
to: toType.isRequired
|
||||
};
|
||||
}
|
||||
|
||||
var forwardRefShim$1 = function forwardRefShim(C) {
|
||||
return C;
|
||||
};
|
||||
|
||||
var forwardRef$1 = React.forwardRef;
|
||||
|
||||
if (typeof forwardRef$1 === "undefined") {
|
||||
forwardRef$1 = forwardRefShim$1;
|
||||
}
|
||||
|
||||
function joinClassnames() {
|
||||
for (var _len = arguments.length, classnames = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
classnames[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
return classnames.filter(function (i) {
|
||||
return i;
|
||||
}).join(" ");
|
||||
}
|
||||
/**
|
||||
* A <Link> wrapper that knows if it's "active" or not.
|
||||
*/
|
||||
|
||||
|
||||
var NavLink = forwardRef$1(function (_ref, forwardedRef) {
|
||||
var _ref$ariaCurrent = _ref["aria-current"],
|
||||
ariaCurrent = _ref$ariaCurrent === void 0 ? "page" : _ref$ariaCurrent,
|
||||
_ref$activeClassName = _ref.activeClassName,
|
||||
activeClassName = _ref$activeClassName === void 0 ? "active" : _ref$activeClassName,
|
||||
activeStyle = _ref.activeStyle,
|
||||
classNameProp = _ref.className,
|
||||
exact = _ref.exact,
|
||||
isActiveProp = _ref.isActive,
|
||||
locationProp = _ref.location,
|
||||
sensitive = _ref.sensitive,
|
||||
strict = _ref.strict,
|
||||
styleProp = _ref.style,
|
||||
to = _ref.to,
|
||||
innerRef = _ref.innerRef,
|
||||
rest = _objectWithoutPropertiesLoose(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "sensitive", "strict", "style", "to", "innerRef"]);
|
||||
|
||||
return /*#__PURE__*/React.createElement(reactRouter.__RouterContext.Consumer, null, function (context) {
|
||||
!context ? invariant(false, "You should not use <NavLink> outside a <Router>") : void 0;
|
||||
var currentLocation = locationProp || context.location;
|
||||
var toLocation = normalizeToLocation(resolveToLocation(to, currentLocation), currentLocation);
|
||||
var path = toLocation.pathname; // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202
|
||||
|
||||
var escapedPath = path && path.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
|
||||
var match = escapedPath ? reactRouter.matchPath(currentLocation.pathname, {
|
||||
path: escapedPath,
|
||||
exact: exact,
|
||||
sensitive: sensitive,
|
||||
strict: strict
|
||||
}) : null;
|
||||
var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);
|
||||
var className = typeof classNameProp === "function" ? classNameProp(isActive) : classNameProp;
|
||||
var style = typeof styleProp === "function" ? styleProp(isActive) : styleProp;
|
||||
|
||||
if (isActive) {
|
||||
className = joinClassnames(className, activeClassName);
|
||||
style = _extends({}, style, activeStyle);
|
||||
}
|
||||
|
||||
var props = _extends({
|
||||
"aria-current": isActive && ariaCurrent || null,
|
||||
className: className,
|
||||
style: style,
|
||||
to: toLocation
|
||||
}, rest); // React 15 compat
|
||||
|
||||
|
||||
if (forwardRefShim$1 !== forwardRef$1) {
|
||||
props.ref = forwardedRef || innerRef;
|
||||
} else {
|
||||
props.innerRef = innerRef;
|
||||
}
|
||||
|
||||
return /*#__PURE__*/React.createElement(Link, props);
|
||||
});
|
||||
});
|
||||
|
||||
{
|
||||
NavLink.displayName = "NavLink";
|
||||
var ariaCurrentType = PropTypes.oneOf(["page", "step", "location", "date", "time", "true", "false"]);
|
||||
NavLink.propTypes = _extends({}, Link.propTypes, {
|
||||
"aria-current": ariaCurrentType,
|
||||
activeClassName: PropTypes.string,
|
||||
activeStyle: PropTypes.object,
|
||||
className: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
||||
exact: PropTypes.bool,
|
||||
isActive: PropTypes.func,
|
||||
location: PropTypes.object,
|
||||
sensitive: PropTypes.bool,
|
||||
strict: PropTypes.bool,
|
||||
style: PropTypes.oneOfType([PropTypes.object, PropTypes.func])
|
||||
});
|
||||
}
|
||||
|
||||
Object.defineProperty(exports, 'MemoryRouter', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.MemoryRouter;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'Prompt', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.Prompt;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'Redirect', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.Redirect;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'Route', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.Route;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'Router', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.Router;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'StaticRouter', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.StaticRouter;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'Switch', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.Switch;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'generatePath', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.generatePath;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'matchPath', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.matchPath;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'useHistory', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.useHistory;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'useLocation', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.useLocation;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'useParams', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.useParams;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'useRouteMatch', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.useRouteMatch;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'withRouter', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.withRouter;
|
||||
}
|
||||
});
|
||||
exports.BrowserRouter = BrowserRouter;
|
||||
exports.HashRouter = HashRouter;
|
||||
exports.Link = Link;
|
||||
exports.NavLink = NavLink;
|
||||
//# sourceMappingURL=react-router-dom.js.map
|
||||
1
node_modules/react-router-dom/cjs/react-router-dom.js.map
generated
vendored
Normal file
1
node_modules/react-router-dom/cjs/react-router-dom.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
node_modules/react-router-dom/cjs/react-router-dom.min.js
generated
vendored
Normal file
2
node_modules/react-router-dom/cjs/react-router-dom.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/react-router-dom/cjs/react-router-dom.min.js.map
generated
vendored
Normal file
1
node_modules/react-router-dom/cjs/react-router-dom.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5
node_modules/react-router-dom/es/BrowserRouter.js
generated
vendored
Normal file
5
node_modules/react-router-dom/es/BrowserRouter.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("BrowserRouter");
|
||||
|
||||
import { BrowserRouter } from "../esm/react-router-dom.js";
|
||||
export default BrowserRouter;
|
||||
5
node_modules/react-router-dom/es/HashRouter.js
generated
vendored
Normal file
5
node_modules/react-router-dom/es/HashRouter.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("HashRouter");
|
||||
|
||||
import { HashRouter } from "../esm/react-router-dom.js";
|
||||
export default HashRouter;
|
||||
5
node_modules/react-router-dom/es/Link.js
generated
vendored
Normal file
5
node_modules/react-router-dom/es/Link.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Link");
|
||||
|
||||
import { Link } from "../esm/react-router-dom.js";
|
||||
export default Link;
|
||||
5
node_modules/react-router-dom/es/MemoryRouter.js
generated
vendored
Normal file
5
node_modules/react-router-dom/es/MemoryRouter.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("MemoryRouter");
|
||||
|
||||
import { MemoryRouter } from "../esm/react-router-dom.js";
|
||||
export default MemoryRouter;
|
||||
5
node_modules/react-router-dom/es/NavLink.js
generated
vendored
Normal file
5
node_modules/react-router-dom/es/NavLink.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("NavLink");
|
||||
|
||||
import { NavLink } from "../esm/react-router-dom.js";
|
||||
export default NavLink;
|
||||
5
node_modules/react-router-dom/es/Prompt.js
generated
vendored
Normal file
5
node_modules/react-router-dom/es/Prompt.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Prompt");
|
||||
|
||||
import { Prompt } from "../esm/react-router-dom.js";
|
||||
export default Prompt;
|
||||
5
node_modules/react-router-dom/es/Redirect.js
generated
vendored
Normal file
5
node_modules/react-router-dom/es/Redirect.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Redirect");
|
||||
|
||||
import { Redirect } from "../esm/react-router-dom.js";
|
||||
export default Redirect;
|
||||
5
node_modules/react-router-dom/es/Route.js
generated
vendored
Normal file
5
node_modules/react-router-dom/es/Route.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Route");
|
||||
|
||||
import { Route } from "../esm/react-router-dom.js";
|
||||
export default Route;
|
||||
5
node_modules/react-router-dom/es/Router.js
generated
vendored
Normal file
5
node_modules/react-router-dom/es/Router.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Router");
|
||||
|
||||
import { Router } from "../esm/react-router-dom.js";
|
||||
export default Router;
|
||||
5
node_modules/react-router-dom/es/StaticRouter.js
generated
vendored
Normal file
5
node_modules/react-router-dom/es/StaticRouter.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("StaticRouter");
|
||||
|
||||
import { StaticRouter } from "../esm/react-router-dom.js";
|
||||
export default StaticRouter;
|
||||
5
node_modules/react-router-dom/es/Switch.js
generated
vendored
Normal file
5
node_modules/react-router-dom/es/Switch.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Switch");
|
||||
|
||||
import { Switch } from "../esm/react-router-dom.js";
|
||||
export default Switch;
|
||||
5
node_modules/react-router-dom/es/generatePath.js
generated
vendored
Normal file
5
node_modules/react-router-dom/es/generatePath.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("generatePath");
|
||||
|
||||
import { generatePath } from "../esm/react-router-dom.js";
|
||||
export default generatePath;
|
||||
5
node_modules/react-router-dom/es/matchPath.js
generated
vendored
Normal file
5
node_modules/react-router-dom/es/matchPath.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("matchPath");
|
||||
|
||||
import { matchPath } from "../esm/react-router-dom.js";
|
||||
export default matchPath;
|
||||
34
node_modules/react-router-dom/es/warnAboutDeprecatedESMImport.js
generated
vendored
Normal file
34
node_modules/react-router-dom/es/warnAboutDeprecatedESMImport.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/* eslint-disable prefer-arrow-callback, no-empty */
|
||||
var printWarning = function() {};
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
printWarning = function(format, subs) {
|
||||
var index = 0;
|
||||
var message =
|
||||
"Warning: " +
|
||||
(subs.length > 0
|
||||
? format.replace(/%s/g, function() {
|
||||
return subs[index++];
|
||||
})
|
||||
: format);
|
||||
|
||||
if (typeof console !== "undefined") {
|
||||
console.error(message);
|
||||
}
|
||||
|
||||
try {
|
||||
// --- Welcome to debugging React Router ---
|
||||
// This error was thrown as a convenience so that you can use the
|
||||
// stack trace to find the callsite that triggered this warning.
|
||||
throw new Error(message);
|
||||
} catch (e) {}
|
||||
};
|
||||
}
|
||||
|
||||
export default function(member) {
|
||||
printWarning(
|
||||
'Please use `import { %s } from "react-router-dom"` instead of `import %s from "react-router-dom/es/%s"`. ' +
|
||||
"Support for the latter will be removed in the next major release.",
|
||||
[member, member]
|
||||
);
|
||||
}
|
||||
5
node_modules/react-router-dom/es/withRouter.js
generated
vendored
Normal file
5
node_modules/react-router-dom/es/withRouter.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("withRouter");
|
||||
|
||||
import { withRouter } from "../esm/react-router-dom.js";
|
||||
export default withRouter;
|
||||
319
node_modules/react-router-dom/esm/react-router-dom.js
generated
vendored
Normal file
319
node_modules/react-router-dom/esm/react-router-dom.js
generated
vendored
Normal file
@@ -0,0 +1,319 @@
|
||||
import { Router, __RouterContext, matchPath } from 'react-router';
|
||||
export { MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter } from 'react-router';
|
||||
import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';
|
||||
import React from 'react';
|
||||
import { createBrowserHistory, createHashHistory, createLocation, createPath } from 'history';
|
||||
import PropTypes from 'prop-types';
|
||||
import warning from 'tiny-warning';
|
||||
import _extends from '@babel/runtime/helpers/esm/extends';
|
||||
import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';
|
||||
import invariant from 'tiny-invariant';
|
||||
|
||||
/**
|
||||
* The public API for a <Router> that uses HTML5 history.
|
||||
*/
|
||||
|
||||
var BrowserRouter = /*#__PURE__*/function (_React$Component) {
|
||||
_inheritsLoose(BrowserRouter, _React$Component);
|
||||
|
||||
function BrowserRouter() {
|
||||
var _this;
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
||||
_this.history = createBrowserHistory(_this.props);
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = BrowserRouter.prototype;
|
||||
|
||||
_proto.render = function render() {
|
||||
return /*#__PURE__*/React.createElement(Router, {
|
||||
history: this.history,
|
||||
children: this.props.children
|
||||
});
|
||||
};
|
||||
|
||||
return BrowserRouter;
|
||||
}(React.Component);
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
BrowserRouter.propTypes = {
|
||||
basename: PropTypes.string,
|
||||
children: PropTypes.node,
|
||||
forceRefresh: PropTypes.bool,
|
||||
getUserConfirmation: PropTypes.func,
|
||||
keyLength: PropTypes.number
|
||||
};
|
||||
|
||||
BrowserRouter.prototype.componentDidMount = function () {
|
||||
process.env.NODE_ENV !== "production" ? warning(!this.props.history, "<BrowserRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { BrowserRouter as Router }`.") : void 0;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The public API for a <Router> that uses window.location.hash.
|
||||
*/
|
||||
|
||||
var HashRouter = /*#__PURE__*/function (_React$Component) {
|
||||
_inheritsLoose(HashRouter, _React$Component);
|
||||
|
||||
function HashRouter() {
|
||||
var _this;
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
||||
_this.history = createHashHistory(_this.props);
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = HashRouter.prototype;
|
||||
|
||||
_proto.render = function render() {
|
||||
return /*#__PURE__*/React.createElement(Router, {
|
||||
history: this.history,
|
||||
children: this.props.children
|
||||
});
|
||||
};
|
||||
|
||||
return HashRouter;
|
||||
}(React.Component);
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
HashRouter.propTypes = {
|
||||
basename: PropTypes.string,
|
||||
children: PropTypes.node,
|
||||
getUserConfirmation: PropTypes.func,
|
||||
hashType: PropTypes.oneOf(["hashbang", "noslash", "slash"])
|
||||
};
|
||||
|
||||
HashRouter.prototype.componentDidMount = function () {
|
||||
process.env.NODE_ENV !== "production" ? warning(!this.props.history, "<HashRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { HashRouter as Router }`.") : void 0;
|
||||
};
|
||||
}
|
||||
|
||||
var resolveToLocation = function resolveToLocation(to, currentLocation) {
|
||||
return typeof to === "function" ? to(currentLocation) : to;
|
||||
};
|
||||
var normalizeToLocation = function normalizeToLocation(to, currentLocation) {
|
||||
return typeof to === "string" ? createLocation(to, null, null, currentLocation) : to;
|
||||
};
|
||||
|
||||
var forwardRefShim = function forwardRefShim(C) {
|
||||
return C;
|
||||
};
|
||||
|
||||
var forwardRef = React.forwardRef;
|
||||
|
||||
if (typeof forwardRef === "undefined") {
|
||||
forwardRef = forwardRefShim;
|
||||
}
|
||||
|
||||
function isModifiedEvent(event) {
|
||||
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
||||
}
|
||||
|
||||
var LinkAnchor = forwardRef(function (_ref, forwardedRef) {
|
||||
var innerRef = _ref.innerRef,
|
||||
navigate = _ref.navigate,
|
||||
_onClick = _ref.onClick,
|
||||
rest = _objectWithoutPropertiesLoose(_ref, ["innerRef", "navigate", "onClick"]);
|
||||
|
||||
var target = rest.target;
|
||||
|
||||
var props = _extends({}, rest, {
|
||||
onClick: function onClick(event) {
|
||||
try {
|
||||
if (_onClick) _onClick(event);
|
||||
} catch (ex) {
|
||||
event.preventDefault();
|
||||
throw ex;
|
||||
}
|
||||
|
||||
if (!event.defaultPrevented && // onClick prevented default
|
||||
event.button === 0 && ( // ignore everything but left clicks
|
||||
!target || target === "_self") && // let browser handle "target=_blank" etc.
|
||||
!isModifiedEvent(event) // ignore clicks with modifier keys
|
||||
) {
|
||||
event.preventDefault();
|
||||
navigate();
|
||||
}
|
||||
}
|
||||
}); // React 15 compat
|
||||
|
||||
|
||||
if (forwardRefShim !== forwardRef) {
|
||||
props.ref = forwardedRef || innerRef;
|
||||
} else {
|
||||
props.ref = innerRef;
|
||||
}
|
||||
/* eslint-disable-next-line jsx-a11y/anchor-has-content */
|
||||
|
||||
|
||||
return /*#__PURE__*/React.createElement("a", props);
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
LinkAnchor.displayName = "LinkAnchor";
|
||||
}
|
||||
/**
|
||||
* The public API for rendering a history-aware <a>.
|
||||
*/
|
||||
|
||||
|
||||
var Link = forwardRef(function (_ref2, forwardedRef) {
|
||||
var _ref2$component = _ref2.component,
|
||||
component = _ref2$component === void 0 ? LinkAnchor : _ref2$component,
|
||||
replace = _ref2.replace,
|
||||
to = _ref2.to,
|
||||
innerRef = _ref2.innerRef,
|
||||
rest = _objectWithoutPropertiesLoose(_ref2, ["component", "replace", "to", "innerRef"]);
|
||||
|
||||
return /*#__PURE__*/React.createElement(__RouterContext.Consumer, null, function (context) {
|
||||
!context ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <Link> outside a <Router>") : invariant(false) : void 0;
|
||||
var history = context.history;
|
||||
var location = normalizeToLocation(resolveToLocation(to, context.location), context.location);
|
||||
var href = location ? history.createHref(location) : "";
|
||||
|
||||
var props = _extends({}, rest, {
|
||||
href: href,
|
||||
navigate: function navigate() {
|
||||
var location = resolveToLocation(to, context.location);
|
||||
var isDuplicateNavigation = createPath(context.location) === createPath(normalizeToLocation(location));
|
||||
var method = replace || isDuplicateNavigation ? history.replace : history.push;
|
||||
method(location);
|
||||
}
|
||||
}); // React 15 compat
|
||||
|
||||
|
||||
if (forwardRefShim !== forwardRef) {
|
||||
props.ref = forwardedRef || innerRef;
|
||||
} else {
|
||||
props.innerRef = innerRef;
|
||||
}
|
||||
|
||||
return /*#__PURE__*/React.createElement(component, props);
|
||||
});
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
var toType = PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.func]);
|
||||
var refType = PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.shape({
|
||||
current: PropTypes.any
|
||||
})]);
|
||||
Link.displayName = "Link";
|
||||
Link.propTypes = {
|
||||
innerRef: refType,
|
||||
onClick: PropTypes.func,
|
||||
replace: PropTypes.bool,
|
||||
target: PropTypes.string,
|
||||
to: toType.isRequired
|
||||
};
|
||||
}
|
||||
|
||||
var forwardRefShim$1 = function forwardRefShim(C) {
|
||||
return C;
|
||||
};
|
||||
|
||||
var forwardRef$1 = React.forwardRef;
|
||||
|
||||
if (typeof forwardRef$1 === "undefined") {
|
||||
forwardRef$1 = forwardRefShim$1;
|
||||
}
|
||||
|
||||
function joinClassnames() {
|
||||
for (var _len = arguments.length, classnames = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
classnames[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
return classnames.filter(function (i) {
|
||||
return i;
|
||||
}).join(" ");
|
||||
}
|
||||
/**
|
||||
* A <Link> wrapper that knows if it's "active" or not.
|
||||
*/
|
||||
|
||||
|
||||
var NavLink = forwardRef$1(function (_ref, forwardedRef) {
|
||||
var _ref$ariaCurrent = _ref["aria-current"],
|
||||
ariaCurrent = _ref$ariaCurrent === void 0 ? "page" : _ref$ariaCurrent,
|
||||
_ref$activeClassName = _ref.activeClassName,
|
||||
activeClassName = _ref$activeClassName === void 0 ? "active" : _ref$activeClassName,
|
||||
activeStyle = _ref.activeStyle,
|
||||
classNameProp = _ref.className,
|
||||
exact = _ref.exact,
|
||||
isActiveProp = _ref.isActive,
|
||||
locationProp = _ref.location,
|
||||
sensitive = _ref.sensitive,
|
||||
strict = _ref.strict,
|
||||
styleProp = _ref.style,
|
||||
to = _ref.to,
|
||||
innerRef = _ref.innerRef,
|
||||
rest = _objectWithoutPropertiesLoose(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "sensitive", "strict", "style", "to", "innerRef"]);
|
||||
|
||||
return /*#__PURE__*/React.createElement(__RouterContext.Consumer, null, function (context) {
|
||||
!context ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <NavLink> outside a <Router>") : invariant(false) : void 0;
|
||||
var currentLocation = locationProp || context.location;
|
||||
var toLocation = normalizeToLocation(resolveToLocation(to, currentLocation), currentLocation);
|
||||
var path = toLocation.pathname; // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202
|
||||
|
||||
var escapedPath = path && path.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
|
||||
var match = escapedPath ? matchPath(currentLocation.pathname, {
|
||||
path: escapedPath,
|
||||
exact: exact,
|
||||
sensitive: sensitive,
|
||||
strict: strict
|
||||
}) : null;
|
||||
var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);
|
||||
var className = typeof classNameProp === "function" ? classNameProp(isActive) : classNameProp;
|
||||
var style = typeof styleProp === "function" ? styleProp(isActive) : styleProp;
|
||||
|
||||
if (isActive) {
|
||||
className = joinClassnames(className, activeClassName);
|
||||
style = _extends({}, style, activeStyle);
|
||||
}
|
||||
|
||||
var props = _extends({
|
||||
"aria-current": isActive && ariaCurrent || null,
|
||||
className: className,
|
||||
style: style,
|
||||
to: toLocation
|
||||
}, rest); // React 15 compat
|
||||
|
||||
|
||||
if (forwardRefShim$1 !== forwardRef$1) {
|
||||
props.ref = forwardedRef || innerRef;
|
||||
} else {
|
||||
props.innerRef = innerRef;
|
||||
}
|
||||
|
||||
return /*#__PURE__*/React.createElement(Link, props);
|
||||
});
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
NavLink.displayName = "NavLink";
|
||||
var ariaCurrentType = PropTypes.oneOf(["page", "step", "location", "date", "time", "true", "false"]);
|
||||
NavLink.propTypes = _extends({}, Link.propTypes, {
|
||||
"aria-current": ariaCurrentType,
|
||||
activeClassName: PropTypes.string,
|
||||
activeStyle: PropTypes.object,
|
||||
className: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
||||
exact: PropTypes.bool,
|
||||
isActive: PropTypes.func,
|
||||
location: PropTypes.object,
|
||||
sensitive: PropTypes.bool,
|
||||
strict: PropTypes.bool,
|
||||
style: PropTypes.oneOfType([PropTypes.object, PropTypes.func])
|
||||
});
|
||||
}
|
||||
|
||||
export { BrowserRouter, HashRouter, Link, NavLink };
|
||||
//# sourceMappingURL=react-router-dom.js.map
|
||||
1
node_modules/react-router-dom/esm/react-router-dom.js.map
generated
vendored
Normal file
1
node_modules/react-router-dom/esm/react-router-dom.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/react-router-dom/generatePath.js
generated
vendored
Normal file
3
node_modules/react-router-dom/generatePath.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("generatePath");
|
||||
module.exports = require("./index.js").generatePath;
|
||||
7
node_modules/react-router-dom/index.js
generated
vendored
Normal file
7
node_modules/react-router-dom/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
module.exports = require("./cjs/react-router-dom.min.js");
|
||||
} else {
|
||||
module.exports = require("./cjs/react-router-dom.js");
|
||||
}
|
||||
3
node_modules/react-router-dom/matchPath.js
generated
vendored
Normal file
3
node_modules/react-router-dom/matchPath.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("matchPath");
|
||||
module.exports = require("./index.js").matchPath;
|
||||
36
node_modules/react-router-dom/modules/BrowserRouter.js
generated
vendored
Normal file
36
node_modules/react-router-dom/modules/BrowserRouter.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import React from "react";
|
||||
import { Router } from "react-router";
|
||||
import { createBrowserHistory as createHistory } from "history";
|
||||
import PropTypes from "prop-types";
|
||||
import warning from "tiny-warning";
|
||||
|
||||
/**
|
||||
* The public API for a <Router> that uses HTML5 history.
|
||||
*/
|
||||
class BrowserRouter extends React.Component {
|
||||
history = createHistory(this.props);
|
||||
|
||||
render() {
|
||||
return <Router history={this.history} children={this.props.children} />;
|
||||
}
|
||||
}
|
||||
|
||||
if (__DEV__) {
|
||||
BrowserRouter.propTypes = {
|
||||
basename: PropTypes.string,
|
||||
children: PropTypes.node,
|
||||
forceRefresh: PropTypes.bool,
|
||||
getUserConfirmation: PropTypes.func,
|
||||
keyLength: PropTypes.number
|
||||
};
|
||||
|
||||
BrowserRouter.prototype.componentDidMount = function() {
|
||||
warning(
|
||||
!this.props.history,
|
||||
"<BrowserRouter> ignores the history prop. To use a custom history, " +
|
||||
"use `import { Router }` instead of `import { BrowserRouter as Router }`."
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export default BrowserRouter;
|
||||
35
node_modules/react-router-dom/modules/HashRouter.js
generated
vendored
Normal file
35
node_modules/react-router-dom/modules/HashRouter.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import React from "react";
|
||||
import { Router } from "react-router";
|
||||
import { createHashHistory as createHistory } from "history";
|
||||
import PropTypes from "prop-types";
|
||||
import warning from "tiny-warning";
|
||||
|
||||
/**
|
||||
* The public API for a <Router> that uses window.location.hash.
|
||||
*/
|
||||
class HashRouter extends React.Component {
|
||||
history = createHistory(this.props);
|
||||
|
||||
render() {
|
||||
return <Router history={this.history} children={this.props.children} />;
|
||||
}
|
||||
}
|
||||
|
||||
if (__DEV__) {
|
||||
HashRouter.propTypes = {
|
||||
basename: PropTypes.string,
|
||||
children: PropTypes.node,
|
||||
getUserConfirmation: PropTypes.func,
|
||||
hashType: PropTypes.oneOf(["hashbang", "noslash", "slash"])
|
||||
};
|
||||
|
||||
HashRouter.prototype.componentDidMount = function() {
|
||||
warning(
|
||||
!this.props.history,
|
||||
"<HashRouter> ignores the history prop. To use a custom history, " +
|
||||
"use `import { Router }` instead of `import { HashRouter as Router }`."
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export default HashRouter;
|
||||
148
node_modules/react-router-dom/modules/Link.js
generated
vendored
Normal file
148
node_modules/react-router-dom/modules/Link.js
generated
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
import React from "react";
|
||||
import { __RouterContext as RouterContext } from "react-router";
|
||||
import { createPath } from 'history';
|
||||
import PropTypes from "prop-types";
|
||||
import invariant from "tiny-invariant";
|
||||
import {
|
||||
resolveToLocation,
|
||||
normalizeToLocation
|
||||
} from "./utils/locationUtils.js";
|
||||
|
||||
// React 15 compat
|
||||
const forwardRefShim = C => C;
|
||||
let { forwardRef } = React;
|
||||
if (typeof forwardRef === "undefined") {
|
||||
forwardRef = forwardRefShim;
|
||||
}
|
||||
|
||||
function isModifiedEvent(event) {
|
||||
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
||||
}
|
||||
|
||||
const LinkAnchor = forwardRef(
|
||||
(
|
||||
{
|
||||
innerRef, // TODO: deprecate
|
||||
navigate,
|
||||
onClick,
|
||||
...rest
|
||||
},
|
||||
forwardedRef
|
||||
) => {
|
||||
const { target } = rest;
|
||||
|
||||
let props = {
|
||||
...rest,
|
||||
onClick: event => {
|
||||
try {
|
||||
if (onClick) onClick(event);
|
||||
} catch (ex) {
|
||||
event.preventDefault();
|
||||
throw ex;
|
||||
}
|
||||
|
||||
if (
|
||||
!event.defaultPrevented && // onClick prevented default
|
||||
event.button === 0 && // ignore everything but left clicks
|
||||
(!target || target === "_self") && // let browser handle "target=_blank" etc.
|
||||
!isModifiedEvent(event) // ignore clicks with modifier keys
|
||||
) {
|
||||
event.preventDefault();
|
||||
navigate();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// React 15 compat
|
||||
if (forwardRefShim !== forwardRef) {
|
||||
props.ref = forwardedRef || innerRef;
|
||||
} else {
|
||||
props.ref = innerRef;
|
||||
}
|
||||
|
||||
/* eslint-disable-next-line jsx-a11y/anchor-has-content */
|
||||
return <a {...props} />;
|
||||
}
|
||||
);
|
||||
|
||||
if (__DEV__) {
|
||||
LinkAnchor.displayName = "LinkAnchor";
|
||||
}
|
||||
|
||||
/**
|
||||
* The public API for rendering a history-aware <a>.
|
||||
*/
|
||||
const Link = forwardRef(
|
||||
(
|
||||
{
|
||||
component = LinkAnchor,
|
||||
replace,
|
||||
to,
|
||||
innerRef, // TODO: deprecate
|
||||
...rest
|
||||
},
|
||||
forwardedRef
|
||||
) => {
|
||||
return (
|
||||
<RouterContext.Consumer>
|
||||
{context => {
|
||||
invariant(context, "You should not use <Link> outside a <Router>");
|
||||
|
||||
const { history } = context;
|
||||
|
||||
const location = normalizeToLocation(
|
||||
resolveToLocation(to, context.location),
|
||||
context.location
|
||||
);
|
||||
|
||||
const href = location ? history.createHref(location) : "";
|
||||
const props = {
|
||||
...rest,
|
||||
href,
|
||||
navigate() {
|
||||
const location = resolveToLocation(to, context.location);
|
||||
const isDuplicateNavigation = createPath(context.location) === createPath(normalizeToLocation(location));
|
||||
const method = (replace || isDuplicateNavigation) ? history.replace : history.push;
|
||||
|
||||
method(location);
|
||||
}
|
||||
};
|
||||
|
||||
// React 15 compat
|
||||
if (forwardRefShim !== forwardRef) {
|
||||
props.ref = forwardedRef || innerRef;
|
||||
} else {
|
||||
props.innerRef = innerRef;
|
||||
}
|
||||
|
||||
return React.createElement(component, props);
|
||||
}}
|
||||
</RouterContext.Consumer>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
if (__DEV__) {
|
||||
const toType = PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.object,
|
||||
PropTypes.func
|
||||
]);
|
||||
const refType = PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.func,
|
||||
PropTypes.shape({ current: PropTypes.any })
|
||||
]);
|
||||
|
||||
Link.displayName = "Link";
|
||||
|
||||
Link.propTypes = {
|
||||
innerRef: refType,
|
||||
onClick: PropTypes.func,
|
||||
replace: PropTypes.bool,
|
||||
target: PropTypes.string,
|
||||
to: toType.isRequired
|
||||
};
|
||||
}
|
||||
|
||||
export default Link;
|
||||
134
node_modules/react-router-dom/modules/NavLink.js
generated
vendored
Normal file
134
node_modules/react-router-dom/modules/NavLink.js
generated
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
import React from "react";
|
||||
import { __RouterContext as RouterContext, matchPath } from "react-router";
|
||||
import PropTypes from "prop-types";
|
||||
import invariant from "tiny-invariant";
|
||||
import Link from "./Link.js";
|
||||
import {
|
||||
resolveToLocation,
|
||||
normalizeToLocation
|
||||
} from "./utils/locationUtils.js";
|
||||
|
||||
// React 15 compat
|
||||
const forwardRefShim = C => C;
|
||||
let { forwardRef } = React;
|
||||
if (typeof forwardRef === "undefined") {
|
||||
forwardRef = forwardRefShim;
|
||||
}
|
||||
|
||||
function joinClassnames(...classnames) {
|
||||
return classnames.filter(i => i).join(" ");
|
||||
}
|
||||
|
||||
/**
|
||||
* A <Link> wrapper that knows if it's "active" or not.
|
||||
*/
|
||||
const NavLink = forwardRef(
|
||||
(
|
||||
{
|
||||
"aria-current": ariaCurrent = "page",
|
||||
activeClassName = "active", // TODO: deprecate
|
||||
activeStyle, // TODO: deprecate
|
||||
className: classNameProp,
|
||||
exact,
|
||||
isActive: isActiveProp,
|
||||
location: locationProp,
|
||||
sensitive,
|
||||
strict,
|
||||
style: styleProp,
|
||||
to,
|
||||
innerRef, // TODO: deprecate
|
||||
...rest
|
||||
},
|
||||
forwardedRef
|
||||
) => {
|
||||
return (
|
||||
<RouterContext.Consumer>
|
||||
{context => {
|
||||
invariant(context, "You should not use <NavLink> outside a <Router>");
|
||||
|
||||
const currentLocation = locationProp || context.location;
|
||||
const toLocation = normalizeToLocation(
|
||||
resolveToLocation(to, currentLocation),
|
||||
currentLocation
|
||||
);
|
||||
const { pathname: path } = toLocation;
|
||||
// Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202
|
||||
const escapedPath =
|
||||
path && path.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
|
||||
|
||||
const match = escapedPath
|
||||
? matchPath(currentLocation.pathname, {
|
||||
path: escapedPath,
|
||||
exact,
|
||||
sensitive,
|
||||
strict
|
||||
})
|
||||
: null;
|
||||
const isActive = !!(isActiveProp
|
||||
? isActiveProp(match, currentLocation)
|
||||
: match);
|
||||
|
||||
let className =
|
||||
typeof classNameProp === "function"
|
||||
? classNameProp(isActive)
|
||||
: classNameProp;
|
||||
|
||||
let style =
|
||||
typeof styleProp === "function" ? styleProp(isActive) : styleProp;
|
||||
|
||||
if (isActive) {
|
||||
className = joinClassnames(className, activeClassName);
|
||||
style = { ...style, ...activeStyle };
|
||||
}
|
||||
|
||||
const props = {
|
||||
"aria-current": (isActive && ariaCurrent) || null,
|
||||
className,
|
||||
style,
|
||||
to: toLocation,
|
||||
...rest
|
||||
};
|
||||
|
||||
// React 15 compat
|
||||
if (forwardRefShim !== forwardRef) {
|
||||
props.ref = forwardedRef || innerRef;
|
||||
} else {
|
||||
props.innerRef = innerRef;
|
||||
}
|
||||
|
||||
return <Link {...props} />;
|
||||
}}
|
||||
</RouterContext.Consumer>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
if (__DEV__) {
|
||||
NavLink.displayName = "NavLink";
|
||||
|
||||
const ariaCurrentType = PropTypes.oneOf([
|
||||
"page",
|
||||
"step",
|
||||
"location",
|
||||
"date",
|
||||
"time",
|
||||
"true",
|
||||
"false"
|
||||
]);
|
||||
|
||||
NavLink.propTypes = {
|
||||
...Link.propTypes,
|
||||
"aria-current": ariaCurrentType,
|
||||
activeClassName: PropTypes.string,
|
||||
activeStyle: PropTypes.object,
|
||||
className: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
||||
exact: PropTypes.bool,
|
||||
isActive: PropTypes.func,
|
||||
location: PropTypes.object,
|
||||
sensitive: PropTypes.bool,
|
||||
strict: PropTypes.bool,
|
||||
style: PropTypes.oneOfType([PropTypes.object, PropTypes.func])
|
||||
};
|
||||
}
|
||||
|
||||
export default NavLink;
|
||||
21
node_modules/react-router-dom/modules/index.js
generated
vendored
Normal file
21
node_modules/react-router-dom/modules/index.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
export {
|
||||
MemoryRouter,
|
||||
Prompt,
|
||||
Redirect,
|
||||
Route,
|
||||
Router,
|
||||
StaticRouter,
|
||||
Switch,
|
||||
generatePath,
|
||||
matchPath,
|
||||
withRouter,
|
||||
useHistory,
|
||||
useLocation,
|
||||
useParams,
|
||||
useRouteMatch
|
||||
} from "react-router";
|
||||
|
||||
export { default as BrowserRouter } from "./BrowserRouter.js";
|
||||
export { default as HashRouter } from "./HashRouter.js";
|
||||
export { default as Link } from "./Link.js";
|
||||
export { default as NavLink } from "./NavLink.js";
|
||||
10
node_modules/react-router-dom/modules/utils/locationUtils.js
generated
vendored
Normal file
10
node_modules/react-router-dom/modules/utils/locationUtils.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { createLocation } from "history";
|
||||
|
||||
export const resolveToLocation = (to, currentLocation) =>
|
||||
typeof to === "function" ? to(currentLocation) : to;
|
||||
|
||||
export const normalizeToLocation = (to, currentLocation) => {
|
||||
return typeof to === "string"
|
||||
? createLocation(to, null, null, currentLocation)
|
||||
: to;
|
||||
};
|
||||
71
node_modules/react-router-dom/package.json
generated
vendored
Normal file
71
node_modules/react-router-dom/package.json
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"name": "react-router-dom",
|
||||
"version": "5.3.4",
|
||||
"description": "DOM bindings for React Router",
|
||||
"homepage": "https://reactrouter.com/",
|
||||
"repository": {
|
||||
"url": "https://github.com/remix-run/react-router.git",
|
||||
"type": "git",
|
||||
"directory": "packages/react-router-dom"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": "Remix Software <hello@remix.run>",
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"BrowserRouter.js",
|
||||
"HashRouter.js",
|
||||
"Link.js",
|
||||
"MemoryRouter.js",
|
||||
"NavLink.js",
|
||||
"Prompt.js",
|
||||
"Redirect.js",
|
||||
"Route.js",
|
||||
"Router.js",
|
||||
"StaticRouter.js",
|
||||
"Switch.js",
|
||||
"cjs",
|
||||
"es",
|
||||
"esm",
|
||||
"index.js",
|
||||
"generatePath.js",
|
||||
"matchPath.js",
|
||||
"modules/*.js",
|
||||
"modules/utils/*.js",
|
||||
"withRouter.js",
|
||||
"warnAboutDeprecatedCJSRequire.js",
|
||||
"umd"
|
||||
],
|
||||
"main": "index.js",
|
||||
"module": "esm/react-router-dom.js",
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"lint": "eslint modules"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=15"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.13",
|
||||
"history": "^4.9.0",
|
||||
"loose-envify": "^1.3.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"react-router": "5.3.4",
|
||||
"tiny-invariant": "^1.0.2",
|
||||
"tiny-warning": "^1.0.0"
|
||||
},
|
||||
"browserify": {
|
||||
"transform": [
|
||||
"loose-envify"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"react",
|
||||
"router",
|
||||
"route",
|
||||
"routing",
|
||||
"history",
|
||||
"link"
|
||||
]
|
||||
}
|
||||
3986
node_modules/react-router-dom/umd/react-router-dom.js
generated
vendored
Normal file
3986
node_modules/react-router-dom/umd/react-router-dom.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/react-router-dom/umd/react-router-dom.js.map
generated
vendored
Normal file
1
node_modules/react-router-dom/umd/react-router-dom.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
node_modules/react-router-dom/umd/react-router-dom.min.js
generated
vendored
Normal file
2
node_modules/react-router-dom/umd/react-router-dom.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/react-router-dom/umd/react-router-dom.min.js.map
generated
vendored
Normal file
1
node_modules/react-router-dom/umd/react-router-dom.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
36
node_modules/react-router-dom/warnAboutDeprecatedCJSRequire.js
generated
vendored
Normal file
36
node_modules/react-router-dom/warnAboutDeprecatedCJSRequire.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/* eslint-disable prefer-arrow-callback, no-empty */
|
||||
"use strict";
|
||||
|
||||
var printWarning = function() {};
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
printWarning = function(format, subs) {
|
||||
var index = 0;
|
||||
var message =
|
||||
"Warning: " +
|
||||
(subs.length > 0
|
||||
? format.replace(/%s/g, function() {
|
||||
return subs[index++];
|
||||
})
|
||||
: format);
|
||||
|
||||
if (typeof console !== "undefined") {
|
||||
console.error(message);
|
||||
}
|
||||
|
||||
try {
|
||||
// --- Welcome to debugging React Router ---
|
||||
// This error was thrown as a convenience so that you can use the
|
||||
// stack trace to find the callsite that triggered this warning.
|
||||
throw new Error(message);
|
||||
} catch (e) {}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = function(member) {
|
||||
printWarning(
|
||||
'Please use `require("react-router-dom").%s` instead of `require("react-router-dom/%s")`. ' +
|
||||
"Support for the latter will be removed in the next major release.",
|
||||
[member, member]
|
||||
);
|
||||
};
|
||||
3
node_modules/react-router-dom/withRouter.js
generated
vendored
Normal file
3
node_modules/react-router-dom/withRouter.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("withRouter");
|
||||
module.exports = require("./index.js").withRouter;
|
||||
Reference in New Issue
Block a user