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