UNPKG

21.3 kBJavaScriptView Raw
1!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t.ReactRouter={},t.React)}(this,function(t,a){"use strict";var s="default"in a?a.default:a;function r(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t,e){return t(e={exports:{}},e.exports),e.exports}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}})()&&Object.assign;function p(){}var l=n(function(t){t.exports=function(){function t(t,e,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}var n={array:t.isRequired=t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=p,n.PropTypes=n}()});function b(){return(b=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function h(t){return"/"===t.charAt(0)}function d(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}var f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var m="Invariant failed";function y(t,e){if(!t)throw new Error(m)}function x(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function w(t,e,n,r){var o;"string"==typeof t?(o=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(o=b({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],r=e&&e.split("/")||[],o=t&&h(t),i=e&&h(e),a=o||i;if(t&&h(t)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var c=void 0;if(r.length){var u=r[r.length-1];c="."===u||".."===u||""===u}else c=!1;for(var s=0,p=r.length;0<=p;p--){var l=r[p];"."===l?d(r,p):".."===l?(d(r,p),s++):s&&(d(r,p),s--)}if(!a)for(;s--;s)r.unshift("..");!a||""===r[0]||r[0]&&h(r[0])||r.unshift("");var f=r.join("/");return c&&"/"!==f.substr(-1)&&(f+="/"),f}(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function v(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&function n(e,r){if(e===r)return!0;if(null==e||null==r)return!1;if(Array.isArray(e))return Array.isArray(r)&&e.length===r.length&&e.every(function(t,e){return n(t,r[e])});var t=void 0===e?"undefined":f(e);if(t!==(void 0===r?"undefined":f(r)))return!1;if("object"!==t)return!1;var o=e.valueOf(),i=r.valueOf();if(o!==e||i!==r)return n(o,i);var a=Object.keys(e),c=Object.keys(r);return a.length===c.length&&a.every(function(t){return n(e[t],r[t])})}(t.state,e.state)}"undefined"==typeof window||!window.document||window.document.createElement;function C(t,e,n){return Math.min(Math.max(t,e),n)}function g(t){void 0===t&&(t={});var i,r,e=t,o=e.getUserConfirmation,n=e.initialEntries,a=void 0===n?["/"]:n,c=e.initialIndex,u=void 0===c?0:c,s=e.keyLength,p=void 0===s?6:s,l=(i=null,r=[],{setPrompt:function(t){return i=t,function(){i===t&&(i=null)}},confirmTransitionTo:function(t,e,n,r){if(null!=i){var o="function"==typeof i?i(t,e):i;"string"==typeof o?"function"==typeof n?n(o,r):r(!0):r(!1!==o)}else r(!0)},appendListener:function(t){var e=!0;function n(){e&&t.apply(void 0,arguments)}return r.push(n),function(){e=!1,r=r.filter(function(t){return t!==n})}},notifyListeners:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];r.forEach(function(t){return t.apply(void 0,e)})}});function f(t){b(g,t),g.length=g.entries.length,l.notifyListeners(g.location,g.action)}function h(){return Math.random().toString(36).substr(2,p)}var d=C(u,0,a.length-1),m=a.map(function(t){return w(t,void 0,"string"==typeof t?h():t.key||h())}),y=x;function v(t){var e=C(g.index+t,0,g.entries.length-1),n=g.entries[e];l.confirmTransitionTo(n,"POP",o,function(t){t?f({action:"POP",location:n,index:e}):f()})}var g={length:m.length,action:"POP",location:m[d],index:d,entries:m,createHref:y,push:function(t,e){var r=w(t,e,h(),g.location);l.confirmTransitionTo(r,"PUSH",o,function(t){if(t){var e=g.index+1,n=g.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),f({action:"PUSH",location:r,index:e,entries:n})}})},replace:function(t,e){var n="REPLACE",r=w(t,e,h(),g.location);l.confirmTransitionTo(r,n,o,function(t){t&&(g.entries[g.index]=r,f({action:n,location:r}))})},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(t){var e=g.index+t;return 0<=e&&e<g.entries.length},block:function(t){return void 0===t&&(t=!1),l.setPrompt(t)},listen:function(t){return l.appendListener(t)}};return g}var P="__global_unique_id__";function E(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function O(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function R(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var S=1073741823;var _=s.createContext||function(n,c){var t,e,r="__create-react-context-"+(u[P]=(u[P]||0)+1)+"__",o=function(a){function t(){for(var t,n,r,e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return E(R(t=a.call.apply(a,[this].concat(o))||this),"emitter",(n=t.props.value,r=[],{on:function(t){r.push(t)},off:function(e){r=r.filter(function(t){return t!==e})},get:function(){return n},set:function(t,e){n=t,r.forEach(function(t){return t(n,e)})}})),t}O(t,a);var e=t.prototype;return e.getChildContext=function(){var t;return(t={})[r]=this.emitter,t},e.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var e,n=this.props.value,r=t.value;((o=n)===(i=r)?0!==o||1/o==1/i:o!=o&&i!=i)?e=0:(e="function"==typeof c?c(n,r):S,0!=(e|=0)&&this.emitter.set(t.value,e))}var o,i},e.render=function(){return this.props.children},t}(a.Component);E(o,"childContextTypes",((t={})[r]=l.object.isRequired,t));var i=function(o){function t(){for(var n,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return E(R(n=o.call.apply(o,[this].concat(e))||this),"observedBits",void 0),E(R(n),"state",{value:n.getValue()}),E(R(n),"onUpdate",function(t,e){0!=((0|n.observedBits)&e)&&n.setState({value:n.getValue()})}),n}O(t,o);var e=t.prototype;return e.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=null==e?S:e},e.componentDidMount=function(){this.context[r]&&this.context[r].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=null==t?S:t},e.componentWillUnmount=function(){this.context[r]&&this.context[r].off(this.onUpdate)},e.getValue=function(){return this.context[r]?this.context[r].get():n},e.render=function(){return t=this.props.children,(Array.isArray(t)?t[0]:t)(this.state.value);var t},t}(a.Component);return E(i,"contextTypes",((e={})[r]=l.object,e)),{Provider:o,Consumer:i}},j=function(t){var e=_();return e.displayName=t,e}("Router"),M=function(n){function t(t){var e;return(e=n.call(this,t)||this).state={location:t.history.location},e._isMounted=!1,e._pendingLocation=null,t.staticContext||(e.unlisten=t.history.listen(function(t){e._isMounted?e.setState({location:t}):e._pendingLocation=t})),e}r(t,n),t.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var e=t.prototype;return e.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},e.componentWillUnmount=function(){this.unlisten&&this.unlisten()},e.render=function(){return s.createElement(j.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},t}(s.Component),T=function(o){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=o.call.apply(o,[this].concat(n))||this).history=g(t.props),t}return r(t,o),t.prototype.render=function(){return s.createElement(M,{history:this.history,children:this.props.children})},t}(s.Component),A=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(t){this.props.onUpdate&&this.props.onUpdate.call(this,this,t)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},e}(s.Component);var k=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},$=z,U=N,F=function(t,e){return V(N(t,e))},L=V,I=J,B=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function N(t,e){for(var n,r,o=[],i=0,a=0,c="",u=e&&e.delimiter||"/";null!=(n=B.exec(t));){var s=n[0],p=n[1],l=n.index;if(c+=t.slice(a,l),a=l+s.length,p)c+=p[1];else{var f=t[a],h=n[2],d=n[3],m=n[4],y=n[5],v=n[6],g=n[7];c&&(o.push(c),c="");var b=null!=h&&null!=f&&f!==h,x="+"===v||"*"===v,w="?"===v||"*"===v,C=n[2]||u,P=m||y;o.push({name:d||i++,prefix:h||"",delimiter:C,optional:w,repeat:x,partial:b,asterisk:!!g,pattern:P?(r=P,r.replace(/([=!:$\/()])/g,"\\$1")):g?".*":"[^"+W(C)+"]+?"})}}return a<t.length&&(c+=t.substr(a)),c&&o.push(c),o}function D(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function V(p){for(var l=new Array(p.length),t=0;t<p.length;t++)"object"==typeof p[t]&&(l[t]=new RegExp("^(?:"+p[t].pattern+")$"));return function(t,e){for(var n="",r=t||{},o=(e||{}).pretty?D:encodeURIComponent,i=0;i<p.length;i++){var a=p[i];if("string"!=typeof a){var c,u=r[a.name];if(null==u){if(a.optional){a.partial&&(n+=a.prefix);continue}throw new TypeError('Expected "'+a.name+'" to be defined')}if(k(u)){if(!a.repeat)throw new TypeError('Expected "'+a.name+'" to not repeat, but received `'+JSON.stringify(u)+"`");if(0===u.length){if(a.optional)continue;throw new TypeError('Expected "'+a.name+'" to not be empty')}for(var s=0;s<u.length;s++){if(c=o(u[s]),!l[i].test(c))throw new TypeError('Expected all "'+a.name+'" to match "'+a.pattern+'", but received `'+JSON.stringify(c)+"`");n+=(0===s?a.prefix:a.delimiter)+c}}else{if(c=a.asterisk?encodeURI(u).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):o(u),!l[i].test(c))throw new TypeError('Expected "'+a.name+'" to match "'+a.pattern+'", but received "'+c+'"');n+=a.prefix+c}}else n+=a}return n}}function W(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function q(t,e){return t.keys=e,t}function H(t){return t.sensitive?"":"i"}function J(t,e,n){k(e)||(n=e||n,e=[]);for(var r=(n=n||{}).strict,o=!1!==n.end,i="",a=0;a<t.length;a++){var c=t[a];if("string"==typeof c)i+=W(c);else{var u=W(c.prefix),s="(?:"+c.pattern+")";e.push(c),c.repeat&&(s+="(?:"+u+s+")*"),i+=s=c.optional?c.partial?u+"("+s+")?":"(?:"+u+"("+s+"))?":u+"("+s+")"}}var p=W(n.delimiter||"/"),l=i.slice(-p.length)===p;return r||(i=(l?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=o?"$":r&&l?"":"(?="+p+"|$)",q(new RegExp("^"+i,H(n)),e)}function z(t,e,n){return k(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return q(t,e)}(t,e):k(t)?function(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(z(t[o],e,n).source);return q(new RegExp("(?:"+r.join("|")+")",H(n)),e)}(t,e,n):(r=e,J(N(t,o=n),r,o));var r,o}$.parse=U,$.compile=F,$.tokensToFunction=L,$.tokensToRegExp=I;var G={},Y=1e4,K=0;function Q(t,e){return void 0===t&&(t="/"),void 0===e&&(e={}),"/"===t?t:function(t){if(G[t])return G[t];var e=$.compile(t);return K<Y&&(G[t]=e,K++),e}(t)(e,{pretty:!0})}var X=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,p=n?Symbol.for("react.concurrent_mode"):60111,l=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.memo"):60115,d=n?Symbol.for("react.lazy"):60116;function m(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case p:case i:case c:case a:return t;default:switch(t=t&&t.$$typeof){case s:case l:case u:return t;default:return e}}case o:return e}}}function y(t){return m(t)===p}e.typeOf=m,e.AsyncMode=p,e.ConcurrentMode=p,e.ContextConsumer=s,e.ContextProvider=u,e.Element=r,e.ForwardRef=l,e.Fragment=i,e.Profiler=c,e.Portal=o,e.StrictMode=a,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===p||t===c||t===a||t===f||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===h||t.$$typeof===u||t.$$typeof===s||t.$$typeof===l)},e.isAsyncMode=function(t){return y(t)},e.isConcurrentMode=y,e.isContextConsumer=function(t){return m(t)===s},e.isContextProvider=function(t){return m(t)===u},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},e.isForwardRef=function(t){return m(t)===l},e.isFragment=function(t){return m(t)===i},e.isProfiler=function(t){return m(t)===c},e.isPortal=function(t){return m(t)===o},e.isStrictMode=function(t){return m(t)===a}});e(X);X.typeOf,X.AsyncMode,X.ConcurrentMode,X.ContextConsumer,X.ContextProvider,X.Element,X.ForwardRef,X.Fragment,X.Profiler,X.Portal,X.StrictMode,X.isValidElementType,X.isAsyncMode,X.isConcurrentMode,X.isContextConsumer,X.isContextProvider,X.isElement,X.isForwardRef,X.isFragment,X.isProfiler,X.isPortal,X.isStrictMode;var Z=n(function(t,e){});e(Z);Z.typeOf,Z.AsyncMode,Z.ConcurrentMode,Z.ContextConsumer,Z.ContextProvider,Z.Element,Z.ForwardRef,Z.Fragment,Z.Profiler,Z.Portal,Z.StrictMode,Z.isValidElementType,Z.isAsyncMode,Z.isConcurrentMode,Z.isContextConsumer,Z.isContextProvider,Z.isElement,Z.isForwardRef,Z.isFragment,Z.isProfiler,Z.isPortal,Z.isStrictMode;var tt=n(function(t){t.exports=X}),et=(tt.isValidElementType,{}),nt=1e4,rt=0;function ot(s,t){void 0===t&&(t={}),"string"==typeof t&&(t={path:t});var e=t,n=e.path,r=e.exact,p=void 0!==r&&r,o=e.strict,l=void 0!==o&&o,i=e.sensitive,f=void 0!==i&&i;return[].concat(n).reduce(function(t,e){if(!e)return null;if(t)return t;var n=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=et[n]||(et[n]={});if(r[t])return r[t];var o=[],i={regexp:$(t,o,e),keys:o};return rt<nt&&(r[t]=i,rt++),i}(e,{end:p,strict:l,sensitive:f}),r=n.regexp,o=n.keys,i=r.exec(s);if(!i)return null;var a=i[0],c=i.slice(1),u=s===a;return p&&!u?null:{path:e,url:"/"===e&&""===a?"/":a,isExact:u,params:o.reduce(function(t,e,n){return t[e.name]=c[n],t},{})}},null)}var it=function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(){var u=this;return s.createElement(j.Consumer,null,function(t){t||y(!1);var e,n=u.props.location||t.location,r=b({},t,{location:n,match:u.props.computedMatch?u.props.computedMatch:u.props.path?ot(n.pathname,u.props):t.match}),o=u.props,i=o.children,a=o.component,c=o.render;return Array.isArray(i)&&0===i.length&&(i=null),"function"==typeof i&&void 0===(i=i(r))&&(i=null),s.createElement(j.Provider,{value:r},i&&(e=i,0!==s.Children.count(e))?i:r.match?a?s.createElement(a,r):c?c(r):null:null)})},e}(s.Component);function at(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],0<=e.indexOf(n)||(o[n]=t[n]);return o}function ct(t){return"/"===t.charAt(0)?t:"/"+t}function ut(t){return"string"==typeof t?t:x(t)}function st(t){return function(){y(!1)}}function pt(){}var lt=function(o){function t(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))||this).handlePush=function(t){return e.navigateTo(t,"PUSH")},e.handleReplace=function(t){return e.navigateTo(t,"REPLACE")},e.handleListen=function(){return pt},e.handleBlock=function(){return pt},e}r(t,o);var e=t.prototype;return e.navigateTo=function(t,e){var n,r,o=this.props,i=o.basename,a=void 0===i?"":i,c=o.context,u=void 0===c?{}:c;u.action=e,u.location=(n=a,r=w(t),n?b({},r,{pathname:ct(n)+r.pathname}):r),u.url=ut(u.location)},e.render=function(){var t=this.props,e=t.basename,n=void 0===e?"":e,r=t.context,o=void 0===r?{}:r,i=t.location,a=void 0===i?"/":i,c=at(t,["basename","context","location"]),u={createHref:function(t){return ct(n+ut(t))},action:"POP",location:function(t,e){if(!t)return e;var n=ct(t);return 0!==e.pathname.indexOf(n)?e:b({},e,{pathname:e.pathname.substr(n.length)})}(n,w(a)),push:this.handlePush,replace:this.handleReplace,go:st(),goBack:st(),goForward:st(),listen:this.handleListen,block:this.handleBlock};return s.createElement(M,b({},c,{history:u,staticContext:o}))},t}(s.Component),ft=function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(){var t=this;return s.createElement(j.Consumer,null,function(n){n||y(!1);var r,o,i=t.props.location||n.location;return s.Children.forEach(t.props.children,function(t){if(null==o&&s.isValidElement(t)){var e=(r=t).props.path||t.props.from;o=e?ot(i.pathname,b({},t.props,{path:e})):n.match}}),o?s.cloneElement(r,{location:i,computedMatch:o}):null})},e}(s.Component),ht={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},dt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mt={};mt[tt.ForwardRef]={$$typeof:!0,render:!0};var yt=Object.defineProperty,vt=Object.getOwnPropertyNames,gt=Object.getOwnPropertySymbols,bt=Object.getOwnPropertyDescriptor,xt=Object.getPrototypeOf,wt=Object.prototype;var Ct=function t(e,n,r){if("string"==typeof n)return e;if(wt){var o=xt(n);o&&o!==wt&&t(e,o,r)}var i=vt(n);gt&&(i=i.concat(gt(n)));for(var a=mt[e.$$typeof]||ht,c=mt[n.$$typeof]||ht,u=0;u<i.length;++u){var s=i[u];if(!(dt[s]||r&&r[s]||c&&c[s]||a&&a[s])){var p=bt(n,s);try{yt(e,s,p)}catch(t){}}}return e};t.MemoryRouter=T,t.Prompt=function(t){var r=t.message,e=t.when,o=void 0===e||e;return s.createElement(j.Consumer,null,function(t){if(t||y(!1),!o||t.staticContext)return null;var n=t.history.block;return s.createElement(A,{onMount:function(t){t.release=n(r)},onUpdate:function(t,e){e.message!==r&&(t.release(),t.release=n(r))},onUnmount:function(t){t.release()},message:r})})},t.Redirect=function(t){var i=t.computedMatch,a=t.to,e=t.push,c=void 0!==e&&e;return s.createElement(j.Consumer,null,function(t){t||y(!1);var e=t.history,n=t.staticContext,r=c?e.push:e.replace,o=w(i?"string"==typeof a?Q(a,i.params):b({},a,{pathname:Q(a.pathname,i.params)}):a);return n?(r(o),null):s.createElement(A,{onMount:function(){r(o)},onUpdate:function(t,e){var n=w(e.to);v(n,b({},o,{key:n.key}))||r(o)},to:a})})},t.Route=it,t.Router=M,t.StaticRouter=lt,t.Switch=ft,t.generatePath=Q,t.matchPath=ot,t.withRouter=function(r){var t="withRouter("+(r.displayName||r.name)+")",e=function(t){var e=t.wrappedComponentRef,n=at(t,["wrappedComponentRef"]);return s.createElement(j.Consumer,null,function(t){return t||y(!1),s.createElement(r,b({},n,t,{ref:e}))})};return e.displayName=t,e.WrappedComponent=r,Ct(e,r)},t.__RouterContext=j,Object.defineProperty(t,"__esModule",{value:!0})});