react-router-dom
Advanced tools
Comparing version 0.0.0-experimental-b1ff171f to 0.0.0-experimental-ffd8c7d0
@@ -1,2 +0,2 @@ | ||
import{Router,useHref,useNavigate,useLocation,useResolvedLocation,useBlocker}from'react-router';import{createBrowserHistory,createHashHistory,createPath}from'history';import PropTypes from'prop-types';import{useRef,unstable_useTransition,useReducer,useLayoutEffect,createElement,forwardRef,useCallback,useMemo}from'react';export{MemoryRouter,Navigate,Outlet,Route,Router,Routes,createRoutesFromArray,createRoutesFromChildren,generatePath,matchPath,matchRoutes,resolveLocation,useBlocker,useHref,useInRouterContext,useLocation,useLocationPending,useMatch,useNavigate,useOutlet,useParams,useResolvedLocation,useRoutes}from'react-router';function n(){n=Object.assign||function(a){for(var c=1;c<arguments.length;c++){var b=arguments[c],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d])}return a};return n.apply(this,arguments)}function p(a,c){if(null==a)return{};var b={},d=Object.keys(a),f;for(f=0;f<d.length;f++){var e=d[f];0<=c.indexOf(e)||(b[e]=a[e])}return b} | ||
import{Router,useHref,useNavigate,useLocation,useResolvedPath,useBlocker}from'react-router';import{createBrowserHistory,createHashHistory,createPath}from'history';import PropTypes from'prop-types';import{useRef,unstable_useTransition,useReducer,useLayoutEffect,createElement,forwardRef,useCallback,useMemo}from'react';export{MemoryRouter,Navigate,Outlet,Route,Router,Routes,createRoutesFromArray,createRoutesFromChildren,generatePath,matchPath,matchRoutes,resolvePath,useBlocker,useHref,useInRouterContext,useLocation,useLocationPending,useMatch,useNavigate,useOutlet,useParams,useResolvedPath,useRoutes}from'react-router';function n(){n=Object.assign||function(a){for(var c=1;c<arguments.length;c++){var b=arguments[c],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d])}return a};return n.apply(this,arguments)}function p(a,c){if(null==a)return{};var b={},d=Object.keys(a),f;for(f=0;f<d.length;f++){var e=d[f];0<=c.indexOf(e)||(b[e]=a[e])}return b} | ||
function q(a,c){if(a){if("string"===typeof a)return r(a,c);var b=Object.prototype.toString.call(a).slice(8,-1);"Object"===b&&a.constructor&&(b=a.constructor.name);if("Map"===b||"Set"===b)return Array.from(b);if("Arguments"===b||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return r(a,c)}}function r(a,c){if(null==c||c>a.length)c=a.length;for(var b=0,d=Array(c);b<c;b++)d[b]=a[b];return d} | ||
@@ -8,6 +8,6 @@ function t(a){var c=0;if("undefined"===typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(a=q(a)))return function(){return c>=a.length?{done:!0}:{done:!1,value:a[c++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}c=a[Symbol.iterator]();return c.next.bind(c)}function v(a,c){if(!a){"undefined"!==typeof console&&console.warn(c);try{throw Error(c);}catch(b){}}} | ||
"production"!==process.env.NODE_ENV&&(x.displayName="HashRouter",x.propTypes={children:PropTypes.node,timeoutMs:PropTypes.number,window:PropTypes.object}); | ||
var y=forwardRef(function(a,c){var b=a.onClick,d=a.replace,f=void 0===d?!1:d,e=a.state,g=a.target,m=a.to;a=p(a,["onClick","replace","state","target","to"]);d=useHref(m);var k=useNavigate(),u=useLocation(),h=useResolvedLocation(m);return createElement("a",Object.assign({},a,{href:d,onClick:function(a){b&&b(a);a.defaultPrevented||0!==a.button||g&&"_self"!==g||a.metaKey||a.altKey||a.ctrlKey||a.shiftKey||(a.preventDefault(),a=!!f||createPath(u)===createPath(h),k(m,{replace:a,state:e}))},ref:c,target:g}))}); | ||
var y=forwardRef(function(a,c){var b=a.onClick,d=a.replace,f=void 0===d?!1:d,e=a.state,g=a.target,m=a.to;a=p(a,["onClick","replace","state","target","to"]);d=useHref(m);var k=useNavigate(),u=useLocation(),h=useResolvedPath(m);return createElement("a",Object.assign({},a,{href:d,onClick:function(a){b&&b(a);a.defaultPrevented||0!==a.button||g&&"_self"!==g||a.metaKey||a.altKey||a.ctrlKey||a.shiftKey||(a.preventDefault(),a=!!f||createPath(u)===createPath(h),k(m,{replace:a,state:e}))},ref:c,target:g}))}); | ||
"production"!==process.env.NODE_ENV&&(y.displayName="Link",y.propTypes={onClick:PropTypes.func,replace:PropTypes.bool,state:PropTypes.object,target:PropTypes.string,to:PropTypes.oneOfType([PropTypes.string,PropTypes.shape({pathname:PropTypes.string,search:PropTypes.string,hash:PropTypes.string})]).isRequired}); | ||
var z=forwardRef(function(a,c){var b=a["aria-current"],d=void 0===b?"page":b;b=a.activeClassName;var f=void 0===b?"active":b;b=a.activeStyle;var e=a.caseSensitive,g=void 0===e?!1:e;e=a.className;var m=void 0===e?"":e;e=a.end;var k=void 0===e?!1:e,u=a.style;e=a.to;a=p(a,"aria-current activeClassName activeStyle caseSensitive className end style to".split(" "));var h=useLocation(),l=useResolvedLocation(e);h=h.pathname;l=l.pathname;g||(h=h.toLowerCase(),l=l.toLowerCase());d=(g=k?h===l:h.startsWith(l))? | ||
d:void 0;f=[m,g?f:null].filter(Boolean).join(" ");b=n({},u,{},g?b:null);return createElement(y,Object.assign({},a,{"aria-current":d,className:f,ref:c,style:b,to:e}))}); | ||
var z=forwardRef(function(a,c){var b=a["aria-current"],d=void 0===b?"page":b;b=a.activeClassName;var f=void 0===b?"active":b;b=a.activeStyle;var e=a.caseSensitive,g=void 0===e?!1:e;e=a.className;var m=void 0===e?"":e;e=a.end;var k=void 0===e?!1:e,u=a.style;e=a.to;a=p(a,"aria-current activeClassName activeStyle caseSensitive className end style to".split(" "));var h=useLocation(),l=useResolvedPath(e);h=h.pathname;l=l.pathname;g||(h=h.toLowerCase(),l=l.toLowerCase());d=(g=k?h===l:h.startsWith(l))?d: | ||
void 0;f=[m,g?f:null].filter(Boolean).join(" ");b=n({},u,{},g?b:null);return createElement(y,Object.assign({},a,{"aria-current":d,className:f,ref:c,style:b,to:e}))}); | ||
"production"!==process.env.NODE_ENV&&(z.displayName="NavLink",z.propTypes=n({},y.propTypes,{"aria-current":PropTypes.oneOf("page step location date time true".split(" ")),activeClassName:PropTypes.string,activeStyle:PropTypes.object,className:PropTypes.string,style:PropTypes.object,to:PropTypes.oneOfType([PropTypes.string,PropTypes.shape({pathname:PropTypes.string,search:PropTypes.string,hash:PropTypes.string})]).isRequired}));function A(a){B(a.message,a.when);return null} | ||
@@ -14,0 +14,0 @@ "production"!==process.env.NODE_ENV&&(A.displayName="Prompt",A.propTypes={message:PropTypes.string,when:PropTypes.bool});function B(a,c){void 0===c&&(c=!0);var b=useCallback(function(b){window.confirm(a)&&b.retry()},[a]);useBlocker(b,c)}function C(a){void 0===a&&(a="");return new URLSearchParams("string"===typeof a||Array.isArray(a)||a instanceof URLSearchParams?a:Object.keys(a).reduce(function(c,b){var d=a[b];return c.concat(Array.isArray(d)?d.map(function(a){return[b,a]}):[[b,d]])},[]))} |
{ | ||
"name": "react-router-dom", | ||
"version": "0.0.0-experimental-b1ff171f", | ||
"version": "0.0.0-experimental-ffd8c7d0", | ||
"author": "React Training <hello@reacttraining.com>", | ||
@@ -13,9 +13,9 @@ "description": "Declarative routing for React web applications", | ||
"dependencies": { | ||
"history": "5.0.0-beta.9", | ||
"prop-types": "^15.7.2" | ||
"prop-types": "^15.7.2", | ||
"react-router": "0.0.0-experimental-ffd8c7d0" | ||
}, | ||
"peerDependencies": { | ||
"history": ">=5", | ||
"react": "0.0.0-experimental-33c3af284", | ||
"react-dom": "0.0.0-experimental-33c3af284", | ||
"react-router": "0.0.0-experimental-b1ff171f" | ||
"react-dom": "0.0.0-experimental-33c3af284" | ||
}, | ||
@@ -22,0 +22,0 @@ "sideEffects": false, |
@@ -1,8 +0,8 @@ | ||
import{Router,useHref,useNavigate,useLocation,useResolvedLocation,useBlocker}from'react-router';import{createBrowserHistory,createHashHistory,createPath}from'history';import PropTypes from'prop-types';import{useRef,unstable_useTransition,useReducer,useLayoutEffect,createElement,forwardRef,useCallback,useMemo}from'react';export{MemoryRouter,Navigate,Outlet,Route,Router,Routes,createRoutesFromArray,createRoutesFromChildren,generatePath,matchPath,matchRoutes,resolveLocation,useBlocker,useHref,useInRouterContext,useLocation,useLocationPending,useMatch,useNavigate,useOutlet,useParams,useResolvedLocation,useRoutes}from'react-router';function n(a,d){if(!a){"undefined"!==typeof console&&console.warn(d);try{throw Error(d);}catch(e){}}} | ||
import{Router,useHref,useNavigate,useLocation,useResolvedPath,useBlocker}from'react-router';import{createBrowserHistory,createHashHistory,createPath}from'history';import PropTypes from'prop-types';import{useRef,unstable_useTransition,useReducer,useLayoutEffect,createElement,forwardRef,useCallback,useMemo}from'react';export{MemoryRouter,Navigate,Outlet,Route,Router,Routes,createRoutesFromArray,createRoutesFromChildren,generatePath,matchPath,matchRoutes,resolvePath,useBlocker,useHref,useInRouterContext,useLocation,useLocationPending,useMatch,useNavigate,useOutlet,useParams,useResolvedPath,useRoutes}from'react-router';function n(a,d){if(!a){"undefined"!==typeof console&&console.warn(d);try{throw Error(d);}catch(e){}}} | ||
function p({children:a,timeoutMs:d=5E3,window:e}){let c=useRef();null==c.current&&(c.current=createBrowserHistory({window:e}));let [f,k]=unstable_useTransition({timeoutMs:d}),b=c.current,[g,l]=useReducer((a,c)=>c,{action:b.action,location:b.location});useLayoutEffect(()=>b.listen(a=>{f(()=>{l(a)})}),[b,f]);return createElement(Router,{children:a,action:g.action,location:g.location,navigator:b,pending:k})}p.displayName="BrowserRouter"; | ||
p.propTypes={children:PropTypes.node,timeoutMs:PropTypes.number,window:PropTypes.object};function q({children:a,timeoutMs:d=5E3,window:e}){let c=useRef();null==c.current&&(c.current=createHashHistory({window:e}));let [f,k]=unstable_useTransition({timeoutMs:d}),b=c.current,[g,l]=useReducer((a,c)=>c,{action:b.action,location:b.location});useLayoutEffect(()=>b.listen(a=>{f(()=>{l(a)})}),[b,f]);return createElement(Router,{children:a,action:g.action,location:g.location,navigator:b,pending:k})} | ||
q.displayName="HashRouter";q.propTypes={children:PropTypes.node,timeoutMs:PropTypes.number,window:PropTypes.object}; | ||
let t=forwardRef(function({onClick:a,replace:d=!1,state:e,target:c,to:f,...k},b){let g=useHref(f),l=useNavigate(),r=useLocation(),h=useResolvedLocation(f);return createElement("a",Object.assign({},k,{href:g,onClick:function(b){a&&a(b);b.defaultPrevented||0!==b.button||c&&"_self"!==c||b.metaKey||b.altKey||b.ctrlKey||b.shiftKey||(b.preventDefault(),b=!!d||createPath(r)===createPath(h),l(f,{replace:b,state:e}))},ref:b,target:c}))});t.displayName="Link"; | ||
let t=forwardRef(function({onClick:a,replace:d=!1,state:e,target:c,to:f,...k},b){let g=useHref(f),l=useNavigate(),r=useLocation(),h=useResolvedPath(f);return createElement("a",Object.assign({},k,{href:g,onClick:function(b){a&&a(b);b.defaultPrevented||0!==b.button||c&&"_self"!==c||b.metaKey||b.altKey||b.ctrlKey||b.shiftKey||(b.preventDefault(),b=!!d||createPath(r)===createPath(h),l(f,{replace:b,state:e}))},ref:b,target:c}))});t.displayName="Link"; | ||
t.propTypes={onClick:PropTypes.func,replace:PropTypes.bool,state:PropTypes.object,target:PropTypes.string,to:PropTypes.oneOfType([PropTypes.string,PropTypes.shape({pathname:PropTypes.string,search:PropTypes.string,hash:PropTypes.string})]).isRequired}; | ||
let u=forwardRef(function({"aria-current":a="page",activeClassName:d="active",activeStyle:e,caseSensitive:c=!1,className:f="",end:k=!1,style:b,to:g,...l},r){var h=useLocation(),m=useResolvedLocation(g);h=h.pathname;m=m.pathname;c||(h=h.toLowerCase(),m=m.toLowerCase());a=(c=k?h===m:h.startsWith(m))?a:void 0;d=[f,c?d:null].filter(Boolean).join(" ");return createElement(t,Object.assign({},l,{"aria-current":a,className:d,ref:r,style:{...b,...c?e:null},to:g}))});u.displayName="NavLink"; | ||
let u=forwardRef(function({"aria-current":a="page",activeClassName:d="active",activeStyle:e,caseSensitive:c=!1,className:f="",end:k=!1,style:b,to:g,...l},r){var h=useLocation(),m=useResolvedPath(g);h=h.pathname;m=m.pathname;c||(h=h.toLowerCase(),m=m.toLowerCase());a=(c=k?h===m:h.startsWith(m))?a:void 0;d=[f,c?d:null].filter(Boolean).join(" ");return createElement(t,Object.assign({},l,{"aria-current":a,className:d,ref:r,style:{...b,...c?e:null},to:g}))});u.displayName="NavLink"; | ||
u.propTypes={...t.propTypes,"aria-current":PropTypes.oneOf("page step location date time true".split(" ")),activeClassName:PropTypes.string,activeStyle:PropTypes.object,className:PropTypes.string,style:PropTypes.object,to:PropTypes.oneOfType([PropTypes.string,PropTypes.shape({pathname:PropTypes.string,search:PropTypes.string,hash:PropTypes.string})]).isRequired};function v({message:a,when:d}){w(a,d);return null}v.displayName="Prompt";v.propTypes={message:PropTypes.string,when:PropTypes.bool}; | ||
@@ -9,0 +9,0 @@ function w(a,d=!0){let e=useCallback(c=>{window.confirm(a)&&c.retry()},[a]);useBlocker(e,d)}function x(a=""){return new URLSearchParams("string"===typeof a||Array.isArray(a)||a instanceof URLSearchParams?a:Object.keys(a).reduce((d,e)=>{let c=a[e];return d.concat(Array.isArray(c)?c.map(a=>[e,a]):[[e,c]])},[]))} |
@@ -1,2 +0,2 @@ | ||
import{Router as e,useHref as t,useNavigate as r,useLocation as n,useResolvedLocation as a,useBlocker as o}from"react-router";import{createBrowserHistory as i,createHashHistory as c,createPath as s}from"history";import{useRef as u,unstable_useTransition as l,useReducer as m,useLayoutEffect as f,createElement as h,forwardRef as d,useCallback as p,useMemo as y}from"react";export{MemoryRouter,Navigate,Outlet,Route,Router,Routes,createRoutesFromArray,createRoutesFromChildren,generatePath,matchPath,matchRoutes,resolveLocation,useBlocker,useHref,useInRouterContext,useLocation,useLocationPending,useMatch,useNavigate,useOutlet,useParams,useResolvedLocation,useRoutes}from"react-router";let g=d((function({onClick:e,replace:o=!1,state:i,target:c,to:u,...l},m){let f=t(u),d=r(),p=n(),y=a(u);return h("a",Object.assign({},l,{href:f,onClick:function(t){e&&e(t),t.defaultPrevented||0!==t.button||c&&"_self"!==c||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||(t.preventDefault(),t=!!o||s(p)===s(y),d(u,{replace:t,state:i}))},ref:m,target:c}))})),v=d((function({"aria-current":e="page",activeClassName:t="active",activeStyle:r,caseSensitive:o=!1,className:i="",end:c=!1,style:s,to:u,...l},m){var f=n(),d=a(u);return f=f.pathname,d=d.pathname,o||(f=f.toLowerCase(),d=d.toLowerCase()),e=(o=c?f===d:f.startsWith(d))?e:void 0,t=[i,o?t:null].filter(Boolean).join(" "),h(g,Object.assign({},l,{"aria-current":e,className:t,ref:m,style:{...s,...o?r:null},to:u}))}));function w(e,t=!0){let r=p(t=>{window.confirm(e)&&t.retry()},[e]);o(r,t)}function R(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}function L({children:t,timeoutMs:r=5e3,window:n}){let a=u();null==a.current&&(a.current=i({window:n}));let[o,c]=l({timeoutMs:r}),s=a.current,[d,p]=m((e,t)=>t,{action:s.action,location:s.location});return f(()=>s.listen(e=>{o(()=>{p(e)})}),[s,o]),h(e,{children:t,action:d.action,location:d.location,navigator:s,pending:c})}function P({children:t,timeoutMs:r=5e3,window:n}){let a=u();null==a.current&&(a.current=c({window:n}));let[o,i]=l({timeoutMs:r}),s=a.current,[d,p]=m((e,t)=>t,{action:s.action,location:s.location});return f(()=>s.listen(e=>{o(()=>{p(e)})}),[s,o]),h(e,{children:t,action:d.action,location:d.location,navigator:s,pending:i})}function k({message:e,when:t}){return w(e,t),null}function C(e){let t=u(R(e)),a=n();e=y(()=>{let e=R(a.search);for(let r of t.current.keys())e.has(r)||t.current.getAll(r).forEach(t=>{e.append(r,t)});return e},[a.search]);let o=r();return[e,p((e,t)=>{o("?"+R(e),t)},[o])]}export{L as BrowserRouter,P as HashRouter,g as Link,v as NavLink,k as Prompt,R as createSearchParams,w as usePrompt,C as useSearchParams}; | ||
import{Router as e,useHref as t,useNavigate as r,useLocation as a,useResolvedPath as n,useBlocker as o}from"react-router";import{createBrowserHistory as i,createHashHistory as c,createPath as s}from"history";import{useRef as u,unstable_useTransition as l,useReducer as m,useLayoutEffect as f,createElement as h,forwardRef as d,useCallback as p,useMemo as y}from"react";export{MemoryRouter,Navigate,Outlet,Route,Router,Routes,createRoutesFromArray,createRoutesFromChildren,generatePath,matchPath,matchRoutes,resolvePath,useBlocker,useHref,useInRouterContext,useLocation,useLocationPending,useMatch,useNavigate,useOutlet,useParams,useResolvedPath,useRoutes}from"react-router";let g=d((function({onClick:e,replace:o=!1,state:i,target:c,to:u,...l},m){let f=t(u),d=r(),p=a(),y=n(u);return h("a",Object.assign({},l,{href:f,onClick:function(t){e&&e(t),t.defaultPrevented||0!==t.button||c&&"_self"!==c||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||(t.preventDefault(),t=!!o||s(p)===s(y),d(u,{replace:t,state:i}))},ref:m,target:c}))})),v=d((function({"aria-current":e="page",activeClassName:t="active",activeStyle:r,caseSensitive:o=!1,className:i="",end:c=!1,style:s,to:u,...l},m){var f=a(),d=n(u);return f=f.pathname,d=d.pathname,o||(f=f.toLowerCase(),d=d.toLowerCase()),e=(o=c?f===d:f.startsWith(d))?e:void 0,t=[i,o?t:null].filter(Boolean).join(" "),h(g,Object.assign({},l,{"aria-current":e,className:t,ref:m,style:{...s,...o?r:null},to:u}))}));function w(e,t=!0){let r=p(t=>{window.confirm(e)&&t.retry()},[e]);o(r,t)}function R(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(e=>[r,e]):[[r,a]])},[]))}function P({children:t,timeoutMs:r=5e3,window:a}){let n=u();null==n.current&&(n.current=i({window:a}));let[o,c]=l({timeoutMs:r}),s=n.current,[d,p]=m((e,t)=>t,{action:s.action,location:s.location});return f(()=>s.listen(e=>{o(()=>{p(e)})}),[s,o]),h(e,{children:t,action:d.action,location:d.location,navigator:s,pending:c})}function L({children:t,timeoutMs:r=5e3,window:a}){let n=u();null==n.current&&(n.current=c({window:a}));let[o,i]=l({timeoutMs:r}),s=n.current,[d,p]=m((e,t)=>t,{action:s.action,location:s.location});return f(()=>s.listen(e=>{o(()=>{p(e)})}),[s,o]),h(e,{children:t,action:d.action,location:d.location,navigator:s,pending:i})}function k({message:e,when:t}){return w(e,t),null}function C(e){let t=u(R(e)),n=a();e=y(()=>{let e=R(n.search);for(let r of t.current.keys())e.has(r)||t.current.getAll(r).forEach(t=>{e.append(r,t)});return e},[n.search]);let o=r();return[e,p((e,t)=>{o("?"+R(e),t)},[o])]}export{P as BrowserRouter,L as HashRouter,g as Link,v as NavLink,k as Prompt,R as createSearchParams,w as usePrompt,C as useSearchParams}; | ||
//# sourceMappingURL=react-router-dom.production.min.js.map |
'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PropTypes=require("prop-types"),history=require("history"),reactRouterDom=require("react-router-dom"); | ||
function StaticRouter({children:c,location:b="/"}){"string"===typeof b&&(b=history.parsePath(b));return React.createElement(reactRouterDom.Router,{children:c,action:history.Action.Pop,location:{pathname:b.pathname||"/",search:b.search||"",hash:b.hash||"",state:b.state||null,key:b.key||"default"},navigator:{createHref(a){return"string"===typeof a?a:history.createPath(a)},push(a){throw Error("You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a "+ | ||
`\`navigate(${JSON.stringify(a)})\` somewhere in your app.`);},replace(a){throw Error("You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a "+`\`navigate(${JSON.stringify(a)}, { replace: true })\` somewhere `+"in your app.");},go(a){throw Error(`You cannot use navigator.go(${a}) on the server because it is a stateless`+"environment. This error was probably triggered when you did a "+`\`navigate(${a})\` somewhere in your app.`); | ||
`\`navigate(${JSON.stringify(a)})\` somewhere in your app.`);},replace(a){throw Error("You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a "+`\`navigate(${JSON.stringify(a)}, { replace: true })\` somewhere `+"in your app.");},go(a){throw Error("You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a "+`\`navigate(${a})\` somewhere in your app.`); | ||
},back(){throw Error("You cannot use navigator.back() on the server because it is a stateless environment.");},forward(){throw Error("You cannot use navigator.forward() on the server because it is a stateless environment.");},block(){throw Error("You cannot use navigator.block() on the server because it is a stateless environment.");}},static:!0})} | ||
"production"!==process.env.NODE_ENV&&(StaticRouter.displayName="StaticRouter",StaticRouter.propTypes={children:PropTypes.node,location:PropTypes.oneOfType([PropTypes.string,PropTypes.shape({pathname:PropTypes.string,search:PropTypes.string,hash:PropTypes.string,state:PropTypes.object,key:PropTypes.string})])});exports.StaticRouter=StaticRouter; |
@@ -29,11 +29,11 @@ 'use strict';(function(d,m){"object"===typeof exports&&"undefined"!==typeof module?m(exports,require("react"),require("history"),require("react-router")):"function"===typeof define&&define.amd?define(["exports","react","history","react-router"],m):(d=d||self,m(d.ReactRouterDOM={},d.React,d.HistoryLibrary,d.ReactRouter))})(this,function(d,m,x,k){function y(){y=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b],l;for(l in c)Object.prototype.hasOwnProperty.call(c,l)&&(a[l]= | ||
n.resetWarningCache=F.resetWarningCache;return n.PropTypes=n},h=E(function(a){a.exports=fa(Q.isElement,!0)});I.displayName="BrowserRouter";I.propTypes={children:h.node,timeoutMs:h.number,window:h.object};J.displayName="HashRouter";J.propTypes={children:h.node,timeoutMs:h.number,window:h.object};var w=m.forwardRef(function(a,b){var c=a.onClick,d=a.replace,f=void 0===d?!1:d,g=a.state,h=a.target,q=a.to;a=M(a,["onClick","replace","state","target","to"]);d=k.useHref(q);var t=k.useNavigate(),v=k.useLocation(), | ||
p=k.useResolvedLocation(q);return m.createElement("a",Object.assign({},a,{href:d,onClick:function(a){c&&c(a);a.defaultPrevented||0!==a.button||h&&"_self"!==h||a.metaKey||a.altKey||a.ctrlKey||a.shiftKey||(a.preventDefault(),a=!!f||x.createPath(v)===x.createPath(p),t(q,{replace:a,state:g}))},ref:b,target:h}))});w.displayName="Link";w.propTypes={onClick:h.func,replace:h.bool,state:h.object,target:h.string,to:h.oneOfType([h.string,h.shape({pathname:h.string,search:h.string,hash:h.string})]).isRequired}; | ||
var L=m.forwardRef(function(a,b){var c=a["aria-current"],d=void 0===c?"page":c;c=a.activeClassName;var f=void 0===c?"active":c;c=a.activeStyle;var g=a.caseSensitive,h=void 0===g?!1:g;g=a.className;var q=void 0===g?"":g;g=a.end;var t=void 0===g?!1:g,v=a.style;g=a.to;a=M(a,"aria-current activeClassName activeStyle caseSensitive className end style to".split(" "));var p=k.useLocation(),n=k.useResolvedLocation(g);p=p.pathname;n=n.pathname;h||(p=p.toLowerCase(),n=n.toLowerCase());d=(h=t?p===n:p.startsWith(n))? | ||
d:void 0;f=[q,h?f:null].filter(Boolean).join(" ");c=y({},v,{},h?c:null);return m.createElement(w,Object.assign({},a,{"aria-current":d,className:f,ref:b,style:c,to:g}))});L.displayName="NavLink";L.propTypes=y({},w.propTypes,{"aria-current":h.oneOf("page step location date time true".split(" ")),activeClassName:h.string,activeStyle:h.object,className:h.string,style:h.object,to:h.oneOfType([h.string,h.shape({pathname:h.string,search:h.string,hash:h.string})]).isRequired});K.displayName="Prompt";K.propTypes= | ||
p=k.useResolvedPath(q);return m.createElement("a",Object.assign({},a,{href:d,onClick:function(a){c&&c(a);a.defaultPrevented||0!==a.button||h&&"_self"!==h||a.metaKey||a.altKey||a.ctrlKey||a.shiftKey||(a.preventDefault(),a=!!f||x.createPath(v)===x.createPath(p),t(q,{replace:a,state:g}))},ref:b,target:h}))});w.displayName="Link";w.propTypes={onClick:h.func,replace:h.bool,state:h.object,target:h.string,to:h.oneOfType([h.string,h.shape({pathname:h.string,search:h.string,hash:h.string})]).isRequired};var L= | ||
m.forwardRef(function(a,b){var c=a["aria-current"],d=void 0===c?"page":c;c=a.activeClassName;var f=void 0===c?"active":c;c=a.activeStyle;var g=a.caseSensitive,h=void 0===g?!1:g;g=a.className;var q=void 0===g?"":g;g=a.end;var t=void 0===g?!1:g,v=a.style;g=a.to;a=M(a,"aria-current activeClassName activeStyle caseSensitive className end style to".split(" "));var p=k.useLocation(),n=k.useResolvedPath(g);p=p.pathname;n=n.pathname;h||(p=p.toLowerCase(),n=n.toLowerCase());d=(h=t?p===n:p.startsWith(n))?d: | ||
void 0;f=[q,h?f:null].filter(Boolean).join(" ");c=y({},v,{},h?c:null);return m.createElement(w,Object.assign({},a,{"aria-current":d,className:f,ref:b,style:c,to:g}))});L.displayName="NavLink";L.propTypes=y({},w.propTypes,{"aria-current":h.oneOf("page step location date time true".split(" ")),activeClassName:h.string,activeStyle:h.object,className:h.string,style:h.object,to:h.oneOfType([h.string,h.shape({pathname:h.string,search:h.string,hash:h.string})]).isRequired});K.displayName="Prompt";K.propTypes= | ||
{message:h.string,when:h.bool};Object.defineProperty(d,"MemoryRouter",{enumerable:!0,get:function(){return k.MemoryRouter}});Object.defineProperty(d,"Navigate",{enumerable:!0,get:function(){return k.Navigate}});Object.defineProperty(d,"Outlet",{enumerable:!0,get:function(){return k.Outlet}});Object.defineProperty(d,"Route",{enumerable:!0,get:function(){return k.Route}});Object.defineProperty(d,"Router",{enumerable:!0,get:function(){return k.Router}});Object.defineProperty(d,"Routes",{enumerable:!0, | ||
get:function(){return k.Routes}});Object.defineProperty(d,"createRoutesFromArray",{enumerable:!0,get:function(){return k.createRoutesFromArray}});Object.defineProperty(d,"createRoutesFromChildren",{enumerable:!0,get:function(){return k.createRoutesFromChildren}});Object.defineProperty(d,"generatePath",{enumerable:!0,get:function(){return k.generatePath}});Object.defineProperty(d,"matchPath",{enumerable:!0,get:function(){return k.matchPath}});Object.defineProperty(d,"matchRoutes",{enumerable:!0,get:function(){return k.matchRoutes}}); | ||
Object.defineProperty(d,"resolveLocation",{enumerable:!0,get:function(){return k.resolveLocation}});Object.defineProperty(d,"useBlocker",{enumerable:!0,get:function(){return k.useBlocker}});Object.defineProperty(d,"useHref",{enumerable:!0,get:function(){return k.useHref}});Object.defineProperty(d,"useInRouterContext",{enumerable:!0,get:function(){return k.useInRouterContext}});Object.defineProperty(d,"useLocation",{enumerable:!0,get:function(){return k.useLocation}});Object.defineProperty(d,"useLocationPending", | ||
{enumerable:!0,get:function(){return k.useLocationPending}});Object.defineProperty(d,"useMatch",{enumerable:!0,get:function(){return k.useMatch}});Object.defineProperty(d,"useNavigate",{enumerable:!0,get:function(){return k.useNavigate}});Object.defineProperty(d,"useOutlet",{enumerable:!0,get:function(){return k.useOutlet}});Object.defineProperty(d,"useParams",{enumerable:!0,get:function(){return k.useParams}});Object.defineProperty(d,"useResolvedLocation",{enumerable:!0,get:function(){return k.useResolvedLocation}}); | ||
Object.defineProperty(d,"resolvePath",{enumerable:!0,get:function(){return k.resolvePath}});Object.defineProperty(d,"useBlocker",{enumerable:!0,get:function(){return k.useBlocker}});Object.defineProperty(d,"useHref",{enumerable:!0,get:function(){return k.useHref}});Object.defineProperty(d,"useInRouterContext",{enumerable:!0,get:function(){return k.useInRouterContext}});Object.defineProperty(d,"useLocation",{enumerable:!0,get:function(){return k.useLocation}});Object.defineProperty(d,"useLocationPending", | ||
{enumerable:!0,get:function(){return k.useLocationPending}});Object.defineProperty(d,"useMatch",{enumerable:!0,get:function(){return k.useMatch}});Object.defineProperty(d,"useNavigate",{enumerable:!0,get:function(){return k.useNavigate}});Object.defineProperty(d,"useOutlet",{enumerable:!0,get:function(){return k.useOutlet}});Object.defineProperty(d,"useParams",{enumerable:!0,get:function(){return k.useParams}});Object.defineProperty(d,"useResolvedPath",{enumerable:!0,get:function(){return k.useResolvedPath}}); | ||
Object.defineProperty(d,"useRoutes",{enumerable:!0,get:function(){return k.useRoutes}});d.BrowserRouter=I;d.HashRouter=J;d.Link=w;d.NavLink=L;d.Prompt=K;d.createSearchParams=A;d.usePrompt=O;d.useSearchParams=function(a){V("undefined"!==typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params\n\nIf you're unsure how to load polyfills, we recommend you check out https://polyfill.io/v3/ which provides some recommendations about how to load polyfills only for users that need them, instead of for every user."); | ||
var b=m.useRef(A(a)),c=k.useLocation();a=m.useMemo(function(){for(var a=A(c.search),d=function(){var c=h.value;a.has(c)||b.current.getAll(c).forEach(function(b){a.append(c,b)})},f=T(b.current.keys()),h;!(h=f()).done;)d();return a},[c.search]);var d=k.useNavigate(),f=m.useCallback(function(a,b){d("?"+A(a),b)},[d]);return[a,f]};Object.defineProperty(d,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=react-router-dom.development.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("history"),require("react-router")):"function"==typeof define&&define.amd?define(["exports","react","history","react-router"],t):t((e=e||self).ReactRouterDOM={},e.React,e.HistoryLibrary,e.ReactRouter)}(this,(function(e,t,r,n){function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e,t){if(null==e)return{};var r,n={},o=Object.keys(e);for(r=0;r<o.length;r++){var a=o[r];0<=t.indexOf(a)||(n[a]=e[a])}return n}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function c(e,r){void 0===r&&(r=!0);var o=t.useCallback((function(t){window.confirm(e)&&t.retry()}),[e]);n.useBlocker(o,r)}function s(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((function(t,r){var n=e[r];return t.concat(Array.isArray(n)?n.map((function(e){return[r,e]})):[[r,n]])}),[]))}var f=t.forwardRef((function(e,o){var u=e.onClick,i=e.replace,c=void 0!==i&&i,s=e.state,f=e.target,l=e.to;e=a(e,["onClick","replace","state","target","to"]),i=n.useHref(l);var d=n.useNavigate(),m=n.useLocation(),y=n.useResolvedLocation(l);return t.createElement("a",Object.assign({},e,{href:i,onClick:function(e){u&&u(e),e.defaultPrevented||0!==e.button||f&&"_self"!==f||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||(e.preventDefault(),e=!!c||r.createPath(m)===r.createPath(y),d(l,{replace:e,state:s}))},ref:o,target:f}))})),l=t.forwardRef((function(e,r){var u=e["aria-current"],i=void 0===u?"page":u,c=void 0===(u=e.activeClassName)?"active":u;u=e.activeStyle;var s=e.caseSensitive,l=void 0!==s&&s,d=void 0===(s=e.className)?"":s,m=void 0!==(s=e.end)&&s,y=e.style;s=e.to,e=a(e,"aria-current activeClassName activeStyle caseSensitive className end style to".split(" "));var b=n.useLocation(),v=n.useResolvedLocation(s);return b=b.pathname,v=v.pathname,l||(b=b.toLowerCase(),v=v.toLowerCase()),i=(l=m?b===v:b.startsWith(v))?i:void 0,c=[d,l?c:null].filter(Boolean).join(" "),u=o({},y,{},l?u:null),t.createElement(f,Object.assign({},e,{"aria-current":i,className:c,ref:r,style:u,to:s}))}));Object.defineProperty(e,"MemoryRouter",{enumerable:!0,get:function(){return n.MemoryRouter}}),Object.defineProperty(e,"Navigate",{enumerable:!0,get:function(){return n.Navigate}}),Object.defineProperty(e,"Outlet",{enumerable:!0,get:function(){return n.Outlet}}),Object.defineProperty(e,"Route",{enumerable:!0,get:function(){return n.Route}}),Object.defineProperty(e,"Router",{enumerable:!0,get:function(){return n.Router}}),Object.defineProperty(e,"Routes",{enumerable:!0,get:function(){return n.Routes}}),Object.defineProperty(e,"createRoutesFromArray",{enumerable:!0,get:function(){return n.createRoutesFromArray}}),Object.defineProperty(e,"createRoutesFromChildren",{enumerable:!0,get:function(){return n.createRoutesFromChildren}}),Object.defineProperty(e,"generatePath",{enumerable:!0,get:function(){return n.generatePath}}),Object.defineProperty(e,"matchPath",{enumerable:!0,get:function(){return n.matchPath}}),Object.defineProperty(e,"matchRoutes",{enumerable:!0,get:function(){return n.matchRoutes}}),Object.defineProperty(e,"resolveLocation",{enumerable:!0,get:function(){return n.resolveLocation}}),Object.defineProperty(e,"useBlocker",{enumerable:!0,get:function(){return n.useBlocker}}),Object.defineProperty(e,"useHref",{enumerable:!0,get:function(){return n.useHref}}),Object.defineProperty(e,"useInRouterContext",{enumerable:!0,get:function(){return n.useInRouterContext}}),Object.defineProperty(e,"useLocation",{enumerable:!0,get:function(){return n.useLocation}}),Object.defineProperty(e,"useLocationPending",{enumerable:!0,get:function(){return n.useLocationPending}}),Object.defineProperty(e,"useMatch",{enumerable:!0,get:function(){return n.useMatch}}),Object.defineProperty(e,"useNavigate",{enumerable:!0,get:function(){return n.useNavigate}}),Object.defineProperty(e,"useOutlet",{enumerable:!0,get:function(){return n.useOutlet}}),Object.defineProperty(e,"useParams",{enumerable:!0,get:function(){return n.useParams}}),Object.defineProperty(e,"useResolvedLocation",{enumerable:!0,get:function(){return n.useResolvedLocation}}),Object.defineProperty(e,"useRoutes",{enumerable:!0,get:function(){return n.useRoutes}}),e.BrowserRouter=function(e){var o=e.children,a=e.timeoutMs;a=void 0===a?5e3:a;var u=e.window;null==(e=t.useRef()).current&&(e.current=r.createBrowserHistory({window:u}));var i=(a=t.unstable_useTransition({timeoutMs:a}))[0];a=a[1];var c=e.current;u=(e=t.useReducer((function(e,t){return t}),{action:c.action,location:c.location}))[0];var s=e[1];return t.useLayoutEffect((function(){return c.listen((function(e){i((function(){s(e)}))}))}),[c,i]),t.createElement(n.Router,{children:o,action:u.action,location:u.location,navigator:c,pending:a})},e.HashRouter=function(e){var o=e.children,a=e.timeoutMs;a=void 0===a?5e3:a;var u=e.window;null==(e=t.useRef()).current&&(e.current=r.createHashHistory({window:u}));var i=(a=t.unstable_useTransition({timeoutMs:a}))[0];a=a[1];var c=e.current;u=(e=t.useReducer((function(e,t){return t}),{action:c.action,location:c.location}))[0];var s=e[1];return t.useLayoutEffect((function(){return c.listen((function(e){i((function(){s(e)}))}))}),[c,i]),t.createElement(n.Router,{children:o,action:u.action,location:u.location,navigator:c,pending:a})},e.Link=f,e.NavLink=l,e.Prompt=function(e){return c(e.message,e.when),null},e.createSearchParams=s,e.usePrompt=c,e.useSearchParams=function(e){var r=t.useRef(s(e)),o=n.useLocation();e=t.useMemo((function(){for(var e,t=s(o.search),n=function(){var n=e.value;t.has(n)||r.current.getAll(n).forEach((function(e){t.append(n,e)}))},a=i(r.current.keys());!(e=a()).done;)n();return t}),[o.search]);var a=n.useNavigate();return[e,t.useCallback((function(e,t){a("?"+s(e),t)}),[a])]},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("history"),require("react-router")):"function"==typeof define&&define.amd?define(["exports","react","history","react-router"],t):t((e=e||self).ReactRouterDOM={},e.React,e.HistoryLibrary,e.ReactRouter)}(this,(function(e,t,r,n){function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e,t){if(null==e)return{};var r,n={},o=Object.keys(e);for(r=0;r<o.length;r++){var a=o[r];0<=t.indexOf(a)||(n[a]=e[a])}return n}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function c(e,r){void 0===r&&(r=!0);var o=t.useCallback((function(t){window.confirm(e)&&t.retry()}),[e]);n.useBlocker(o,r)}function s(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((function(t,r){var n=e[r];return t.concat(Array.isArray(n)?n.map((function(e){return[r,e]})):[[r,n]])}),[]))}var f=t.forwardRef((function(e,o){var u=e.onClick,i=e.replace,c=void 0!==i&&i,s=e.state,f=e.target,l=e.to;e=a(e,["onClick","replace","state","target","to"]),i=n.useHref(l);var d=n.useNavigate(),m=n.useLocation(),y=n.useResolvedPath(l);return t.createElement("a",Object.assign({},e,{href:i,onClick:function(e){u&&u(e),e.defaultPrevented||0!==e.button||f&&"_self"!==f||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||(e.preventDefault(),e=!!c||r.createPath(m)===r.createPath(y),d(l,{replace:e,state:s}))},ref:o,target:f}))})),l=t.forwardRef((function(e,r){var u=e["aria-current"],i=void 0===u?"page":u,c=void 0===(u=e.activeClassName)?"active":u;u=e.activeStyle;var s=e.caseSensitive,l=void 0!==s&&s,d=void 0===(s=e.className)?"":s,m=void 0!==(s=e.end)&&s,y=e.style;s=e.to,e=a(e,"aria-current activeClassName activeStyle caseSensitive className end style to".split(" "));var b=n.useLocation(),v=n.useResolvedPath(s);return b=b.pathname,v=v.pathname,l||(b=b.toLowerCase(),v=v.toLowerCase()),i=(l=m?b===v:b.startsWith(v))?i:void 0,c=[d,l?c:null].filter(Boolean).join(" "),u=o({},y,{},l?u:null),t.createElement(f,Object.assign({},e,{"aria-current":i,className:c,ref:r,style:u,to:s}))}));Object.defineProperty(e,"MemoryRouter",{enumerable:!0,get:function(){return n.MemoryRouter}}),Object.defineProperty(e,"Navigate",{enumerable:!0,get:function(){return n.Navigate}}),Object.defineProperty(e,"Outlet",{enumerable:!0,get:function(){return n.Outlet}}),Object.defineProperty(e,"Route",{enumerable:!0,get:function(){return n.Route}}),Object.defineProperty(e,"Router",{enumerable:!0,get:function(){return n.Router}}),Object.defineProperty(e,"Routes",{enumerable:!0,get:function(){return n.Routes}}),Object.defineProperty(e,"createRoutesFromArray",{enumerable:!0,get:function(){return n.createRoutesFromArray}}),Object.defineProperty(e,"createRoutesFromChildren",{enumerable:!0,get:function(){return n.createRoutesFromChildren}}),Object.defineProperty(e,"generatePath",{enumerable:!0,get:function(){return n.generatePath}}),Object.defineProperty(e,"matchPath",{enumerable:!0,get:function(){return n.matchPath}}),Object.defineProperty(e,"matchRoutes",{enumerable:!0,get:function(){return n.matchRoutes}}),Object.defineProperty(e,"resolvePath",{enumerable:!0,get:function(){return n.resolvePath}}),Object.defineProperty(e,"useBlocker",{enumerable:!0,get:function(){return n.useBlocker}}),Object.defineProperty(e,"useHref",{enumerable:!0,get:function(){return n.useHref}}),Object.defineProperty(e,"useInRouterContext",{enumerable:!0,get:function(){return n.useInRouterContext}}),Object.defineProperty(e,"useLocation",{enumerable:!0,get:function(){return n.useLocation}}),Object.defineProperty(e,"useLocationPending",{enumerable:!0,get:function(){return n.useLocationPending}}),Object.defineProperty(e,"useMatch",{enumerable:!0,get:function(){return n.useMatch}}),Object.defineProperty(e,"useNavigate",{enumerable:!0,get:function(){return n.useNavigate}}),Object.defineProperty(e,"useOutlet",{enumerable:!0,get:function(){return n.useOutlet}}),Object.defineProperty(e,"useParams",{enumerable:!0,get:function(){return n.useParams}}),Object.defineProperty(e,"useResolvedPath",{enumerable:!0,get:function(){return n.useResolvedPath}}),Object.defineProperty(e,"useRoutes",{enumerable:!0,get:function(){return n.useRoutes}}),e.BrowserRouter=function(e){var o=e.children,a=e.timeoutMs;a=void 0===a?5e3:a;var u=e.window;null==(e=t.useRef()).current&&(e.current=r.createBrowserHistory({window:u}));var i=(a=t.unstable_useTransition({timeoutMs:a}))[0];a=a[1];var c=e.current;u=(e=t.useReducer((function(e,t){return t}),{action:c.action,location:c.location}))[0];var s=e[1];return t.useLayoutEffect((function(){return c.listen((function(e){i((function(){s(e)}))}))}),[c,i]),t.createElement(n.Router,{children:o,action:u.action,location:u.location,navigator:c,pending:a})},e.HashRouter=function(e){var o=e.children,a=e.timeoutMs;a=void 0===a?5e3:a;var u=e.window;null==(e=t.useRef()).current&&(e.current=r.createHashHistory({window:u}));var i=(a=t.unstable_useTransition({timeoutMs:a}))[0];a=a[1];var c=e.current;u=(e=t.useReducer((function(e,t){return t}),{action:c.action,location:c.location}))[0];var s=e[1];return t.useLayoutEffect((function(){return c.listen((function(e){i((function(){s(e)}))}))}),[c,i]),t.createElement(n.Router,{children:o,action:u.action,location:u.location,navigator:c,pending:a})},e.Link=f,e.NavLink=l,e.Prompt=function(e){return c(e.message,e.when),null},e.createSearchParams=s,e.usePrompt=c,e.useSearchParams=function(e){var r=t.useRef(s(e)),o=n.useLocation();e=t.useMemo((function(){for(var e,t=s(o.search),n=function(){var n=e.value;t.has(n)||r.current.getAll(n).forEach((function(e){t.append(n,e)}))},a=i(r.current.keys());!(e=a()).done;)n();return t}),[o.search]);var a=n.useNavigate();return[e,t.useCallback((function(e,t){a("?"+s(e),t)}),[a])]},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=react-router-dom.production.min.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18
439
11
265
116169
1
23
+ Addedhistory@5.3.0(transitive)
+ Addedreact-router@0.0.0-experimental-ffd8c7d0(transitive)
- Removedhistory@5.0.0-beta.9
- Removedhistory@5.0.0-beta.9(transitive)
- Removedreact-router@0.0.0-experimental-b1ff171f(transitive)