3 lines
157 KiB
JavaScript
3 lines
157 KiB
JavaScript
|
/*! For license information please see 2.c57af0e2.chunk.js.LICENSE.txt */
|
||
|
(this["webpackJsonpmy-website"]=this["webpackJsonpmy-website"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(29)},function(e,t,n){"use strict";e.exports=n(23)},function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return x})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return N})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return S}));var r=n(5),a=n(1),o=n.n(a),l=(n(10),n(6)),i=n(18),u=n(4),c=n(3),s=n(19),f=n.n(s),d=(n(20),n(8)),p=(n(22),function(e){var t=Object(i.a)();return t.displayName=e,t}("Router-History")),h=function(e){var t=Object(i.a)();return t.displayName=e,t}("Router"),m=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._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return o.a.createElement(h.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(p.Provider,{children:this.props.children||null,value:this.props.history}))},t}(o.a.Component);o.a.Component;var v=function(e){function t(){return e.apply(this,arguments)||this}Object(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}(o.a.Component);var y={},g=0;function b(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(y[e])return y[e];var t=f.a.compile(e);return g<1e4&&(y[e]=t,g++),t}(e)(t,{pretty:!0})}function w(e){var t=e.computedMatch,n=e.to,r=e.push,a=void 0!==r&&r;return o.a.createElement(h.Consumer,null,(function(e){e||Object(u.a)(!1);var r=e.history,i=e.staticContext,s=a?r.push:r.replace,f=Object(l.c)(t?"string"===typeof n?b(n,t.params):Object(c.a)({},n,{pathname:b(n.pathname,t.params)}):n);return i?(s(f),null):o.a.createElement(v,{onMount:function(){s(f)},onUpdate:function(e,t){var n=Object(l.c)(t.to);Object(l.f)(n,Object(c.a)({},f,{key:n.key}))||s(f)},to:n})}))}var k={},E=0;function S(e,t){void 0===t&&(t={}),("string"===typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,a=n.exact,o=void 0!==a&&a,l=n.strict,i=void 0!==l&&l,u=n.sensitive,c=void 0!==u&&u;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=k[n]||(k[n]={});if(r[e])return r[e];var a=[],o={regexp:f()(e,a,t),keys:a};return E<1e4&&(r[e]=o,E++),o}(n,{end:o,strict:i,sensitive:c}),a=r.regexp,l=r.keys,u=a.exec(e);if(!u)return null;var s=u[0],d=u.slice(1),p=e===s;return o&&!p?null:{path:n,url:"/"===n&&""===s?"/":s,isExact:p,params:l.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var x=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(h.Consumer,null,(function(t){t||Object(u.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?S(n.pathname,e.props):t.match,a=Object(c.a)({},t,{location:n,match:r}),l=e.props,i=l.children,s=l.component,f=l.render;return Array.isArray(i)&&0===i.length&&(i=null),o.a.createElement(h.Provider,{value:a},a.match?i?"function"===typeof i?i(a):i:s?o.a.createElement(s,a):f?f(a):null:"function"===typeof i?i(a):null)}))},t}(o.a.Component);function _(e){return"/"===e.charAt(0)?e:"/"+e}function C(e,t){if(!e)return t;var n=_(e);ret
|
||
|
//# sourceMappingURL=2.c57af0e2.chunk.js.map
|