Build 533169stable
Module 873263
6,573 characters · in no known chunkDependencies
Required by (59)
1863528025608836781175587814358794197649145293153244160162177366200330238184254316264140278576312625334465349555351466352670354172360832394953409389417876421116458518467627475529498400511793549711553081556074570763571139595244603647621846642277663111663413744185760244767060767852772432795791885041885338885459897479936504959278983545998345998515
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{B6:()=>x,Ix:()=>y,W5:()=>Y,W6:()=>B,XZ:()=>S,dO:()=>F,g:()=>j,qh:()=>U,rd:()=>D,zy:()=>H});var r=n(238710),i=n(64700),s=n(655972),a=n.n(s),o=n(830845),l=n(258635),u=n(542113),c=n(353719),d=n.n(c);n(53635),n(725664),n(833871);var _=0x3fffffff,f="u">typeof globalThis?globalThis:"u">typeof window?window:void 0!==n.g?n.g:{};function p(){var e="__global_unique_id__";return f[e]=(f[e]||0)+1}function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function m(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter(function(t){return t!==e})},get:function(){return e},set:function(n,r){e=n,t.forEach(function(t){return t(e,r)})}}}function E(e){return Array.isArray(e)?e[0]:e}function g(e,t){var n,s,o="__create-react-context-"+p()+"__",l=function(e){function n(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).emitter=m(t.props.value),t}(0,r.A)(n,e);var i=n.prototype;return i.getChildContext=function(){var e;return(e={})[o]=this.emitter,e},i.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,i=e.value;h(r,i)?n=0:0!=(n=("function"==typeof t?t(r,i):_)|0)&&this.emitter.set(e.value,n)}},i.render=function(){return this.props.children},n}(i.Component);(n={})[o]=a().object.isRequired,l.childContextTypes=n;var u=function(t){function n(){for(var e,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,e.state={value:e.getValue()},e.onUpdate=function(t,n){(e.observedBits&n)!=0&&e.setState({value:e.getValue()})},e}(0,r.A)(n,t);var i=n.prototype;return i.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?_:t},i.componentDidMount=function(){this.context[o]&&this.context[o].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?_:e},i.componentWillUnmount=function(){this.context[o]&&this.context[o].off(this.onUpdate)},i.getValue=function(){return this.context[o]?this.context[o].get():e},i.render=function(){return E(this.props.children)(this.state.value)},n}(i.Component);return(s={})[o]=a().object,u.contextTypes=s,{Provider:l,Consumer:u}}var A=i.createContext||g,I=function(e){var t=A();return t.displayName=e,t},T=I("Router-History"),S=I("Router"),y=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen(function(e){n._pendingLocation=e})),n}(0,r.A)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(t){e._isMounted&&e.setState({location:t})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return i.createElement(S.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},i.createElement(T.Provider,{children:this.props.children||null,value:this.props.history}))},t}(i.Component);i.Component;var v=function(e){function t(){return e.apply(this,arguments)||this}(0,r.A)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(i.Component),N={},C=1e4,R=0;function O(e){if(N[e])return N[e];var t=d().compile(e);return R<C&&(N[e]=t,R++),t}function b(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:O(e)(t,{pretty:!0})}function D(e){var t=e.computedMatch,n=e.to,r=e.push,s=void 0!==r&&r;return i.createElement(S.Consumer,null,function(e){e||(0,l.A)(!1);var r=e.history,a=e.staticContext,c=s?r.push:r.replace,d=(0,o.yJ)(t?"string"==typeof n?b(n,t.params):(0,u.A)({},n,{pathname:b(n.pathname,t.params)}):n);return a?(c(d),null):i.createElement(v,{onMount:function(){c(d)},onUpdate:function(e,t){var n=(0,o.yJ)(t.to);(0,o.Fu)(n,(0,u.A)({},d,{key:n.key}))||c(d)},to:n})})}var L={},w=1e4,M=0;function P(e,t){var n=""+t.end+t.strict+t.sensitive,r=L[n]||(L[n]={});if(r[e])return r[e];var i=[],s={regexp:d()(e,i,t),keys:i};return M<w&&(r[e]=s,M++),s}function x(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,i=n.exact,s=void 0!==i&&i,a=n.strict,o=void 0!==a&&a,l=n.sensitive,u=void 0!==l&&l;return[].concat(r).reduce(function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=P(n,{end:s,strict:o,sensitive:u}),i=r.regexp,a=r.keys,l=i.exec(e);if(!l)return null;var c=l[0],d=l.slice(1),_=e===c;return s&&!_?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:_,params:a.reduce(function(e,t,n){return e[t.name]=d[n],e},{})}},null)}function k(e){return 0===i.Children.count(e)}var U=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.A)(t,e),t.prototype.render=function(){var e=this;return i.createElement(S.Consumer,null,function(t){t||(0,l.A)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?x(n.pathname,e.props):t.match,s=(0,u.A)({},t,{location:n,match:r}),a=e.props,o=a.children,c=a.component,d=a.render;return Array.isArray(o)&&k(o)&&(o=null),i.createElement(S.Provider,{value:s},s.match?o?"function"==typeof o?o(s):o:c?i.createElement(c,s):d?d(s):null:"function"==typeof o?o(s):null)})},t}(i.Component);function G(e){return"/"===e.charAt(0)?e:"/"+e}i.Component;var F=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.A)(t,e),t.prototype.render=function(){var e=this;return i.createElement(S.Consumer,null,function(t){t||(0,l.A)(!1);var n,r,s=e.props.location||t.location;return i.Children.forEach(e.props.children,function(e){if(null==r&&i.isValidElement(e)){n=e;var a=e.props.path||e.props.from;r=a?x(s.pathname,(0,u.A)({},e.props,{path:a})):t.match}}),r?i.cloneElement(n,{location:s,computedMatch:r}):null})},t}(i.Component),V=i.useContext;function B(){return V(T)}function H(){return V(S).location}function j(){var e=V(S).match;return e?e.params:{}}function Y(e){var t=H(),n=V(S).match;return e?x(t.pathname,e):n}}