← Back
Editing: routing.min.js
(globalThis.itsecWebpackJsonP=globalThis.itsecWebpackJsonP||[]).push([[9427],{7e3:(t,e,n)=>{"use strict";n.d(e,{xn:()=>r.xn,HX:()=>_,fr:()=>r.fr,pE:()=>g,sq:()=>R,IQ:()=>r.IQ});var r=n(41645),o=n(51609),i=n(86663),a=Object.prototype.hasOwnProperty;function c(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}function u(t,e,n){var r,o;if(c(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var i=Object.keys(t),u=Object.keys(e);if(i.length!==u.length)return!1;for(var s=0;s<i.length;s++){var l=null!==(o=null===(r=null==n?void 0:n[i[s]])||void 0===r?void 0:r.equals)&&void 0!==o?o:c;if(!a.call(e,i[s])||!l(t[i[s]],e[i[s]]))return!1}return!0}function s(t,e,n){void 0===n&&(n=u);var r=(null==t.current||null==e)&&t.current===e||!n(t.current,e);o.useEffect((function(){r&&(t.current=e)}),[t,e,r])}function l(t){return"object"==typeof t?"undefined"!=typeof window?t.search:(0,i.extract)(""+t.pathname+(t.search?t.search:"")):""}var p=o.createContext({location:{},getLocation:function(){return{}},setLocation:function(){}});function f(){return o.useContext(p)}function h(t){var e=t.history,n=t.location,i=t.children,a=t.stringifyOptions,c=o.useRef(n);o.useEffect((function(){c.current=n}),[n]);var u=o.useCallback((function(){return c.current}),[c]),s=o.useCallback((function(t,n){c.current=function(t,e,n,o){switch(void 0===n&&(n="pushIn"),n){case"replace":case"push":return(0,r.Nt)(t,e,o);default:return(0,r.st)(t,e,o)}}(t,null==e||null==e.location?c.current:e.location,n,a),e&&function(t,e,n){switch(void 0===n&&(n="pushIn"),n){case"pushIn":case"push":t.push(e);break;default:t.replace(e)}}(e,c.current,n)}),[e,a]);return o.createElement(p.Provider,{value:{location:n,getLocation:u,setLocation:s}},i)}var v,d,m=(v=undefined,d=(0,i.parse)(v||""),function(t){return v!==t&&(v=t,d=(0,i.parse)(v)),d});function y(t,e,n,r,o,i){var a,c=!u(r.current,n),s=null!==(a=n.equals)&&void 0!==a?a:u,p=m(l(t)),f=!u(o.current,p[e]),h=f?p[e]:o.current;if(!f&&!c&&void 0!==i.current)return i.current;var v=n.decode(h);return(null!=i.current&&null!=v||i.current!==v)&&s(i.current,v)?i.current:v}var g=function(t,e){void 0===e&&(e=r.fr);var n=f(),i=n.location,a=n.getLocation,c=n.setLocation,u=m(l(i)),p=o.useRef(),h=o.useRef(e),v=o.useRef(),d=y(i,t,e,h,p,v);s(p,u[t]),s(h,e),s(v,d,e.equals);var g={paramConfig:e,name:t,setLocation:c,getLocation:a},x=o.useRef(g);x.current=g;var C=o.useCallback((function(t,e){var n,r,o=x.current;if("function"==typeof t){var i=y(o.getLocation(),o.name,o.paramConfig,h,p,v);v.current=i,r=o.paramConfig.encode(t(i))}else r=o.paramConfig.encode(t);o.setLocation(((n={})[o.name]=r,n),e)}),[]);return[d,C]};function x(t,e,n,r,o,i){var a=!u(n.current,e),c=m(l(t));if(r.current===c&&!a&&void 0!==o.current)return{encodedValues:o.current,decodedValues:i.current};for(var s=o.current||{},p=i.current||{},f={},h={},v=0,d=Object.keys(e);v<d.length;v++){var y=d[v],g=e[y],x=void 0,C=void 0;!u(s[y],c[y])||void 0===s[y]&&void 0===p[y]?(x=c[y],C=g.decode(x)):(x=s[y],C=p[y]),f[y]=x,h[y]=C}return{encodedValues:f,decodedValues:u(i.current,h,e)?i.current:h}}var C,E,w,A,R=function(t){var e=f(),n=e.location,i=e.getLocation,a=e.setLocation,c=m(l(n)),p=o.useRef(t),h=o.useRef(c),v=o.useRef(void 0),d=o.useRef({}),y=x(n,t=u(t,p.current)?p.current:t,p,h,v,d),g=y.encodedValues,C=y.decodedValues;s(h,c),s(p,t),s(v,g),s(d,C,(function(e,n){return u(e,n,t)}));var E={paramConfigMap:t,setLocation:a,getLocation:i},w=o.useRef(E);return w.current=E,[C,o.useCallback((function(t,e){var n,o=w.current;if("function"==typeof t){var i=x(o.getLocation(),o.paramConfigMap,p,h,v,d).decodedValues;d.current=i,n=(0,r.Vl)(o.paramConfigMap,t(i))}else n=(0,r.Vl)(o.paramConfigMap,t);o.setLocation(n,e)}),[])]},b=function(){return b=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},b.apply(this,arguments)};function k(t){if(t===w&&null!=A)return A;var e={replace:function(e){t.navigate(e.protocol+"//"+e.host+e.pathname+e.search,{replace:!0})},push:function(e){t.navigate(e.protocol+"//"+e.host+e.pathname+e.search,{replace:!1})},get location(){return t.location}};return w=t,A=e,e}function L(t){var e=void 0===t?{}:t,n=e.history,r=e.location;if("undefined"!=typeof window&&(n||(n=function(t){if(t===C&&null!=E)return E;var e={replace:function(e){t.replaceState(e.state,"",e.protocol+"//"+e.host+e.pathname+e.search)},push:function(e){t.pushState(e.state,"",e.protocol+"//"+e.host+e.pathname+e.search)},get location(){return window.location}};return C=t,E=e,e}(window.history)),r||(r=window.location)),!r)throw new Error("\n Could not read the location. Is the router wired up correctly?\n ");return{history:n,location:r}}function _(t){var e=t.children,n=t.ReactRouterRoute,r=t.reachHistory,i=t.history,a=t.location,c=t.stringifyOptions,s=o.useRef(c),l=u(s.current,c)?s.current:c;return o.useEffect((function(){s.current=l}),[l]),n?o.createElement(n,null,(function(t){return o.createElement(h,b({stringifyOptions:l},L(t)),e)})):r?o.createElement(h,b({stringifyOptions:l},L({history:k(r),location:a})),e):o.createElement(h,b({stringifyOptions:l},L({history:i,location:a})),e)}},8505:(t,e,n)=>{var r=n(9375);t.exports=function t(e,n,o){return r(n)||(o=n||o,n=[]),o=o||{},e 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 p(t,e)}(e,n):r(e)?function(e,n,r){for(var o=[],i=0;i<e.length;i++)o.push(t(e[i],n,r).source);return p(new RegExp("(?:"+o.join("|")+")",f(r)),n)}(e,n,o):function(t,e,n){return h(i(t,n),e,n)}(e,n,o)},t.exports.parse=i,t.exports.compile=function(t,e){return u(i(t,e),e)},t.exports.tokensToFunction=u,t.exports.tokensToRegExp=h;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(t,e){for(var n,r=[],i=0,c=0,u="",s=e&&e.delimiter||"/";null!=(n=o.exec(t));){var p=n[0],f=n[1],h=n.index;if(u+=t.slice(c,h),c=h+p.length,f)u+=f[1];else{var v=t[c],d=n[2],m=n[3],y=n[4],g=n[5],x=n[6],C=n[7];u&&(r.push(u),u="");var E=null!=d&&null!=v&&v!==d,w="+"===x||"*"===x,A="?"===x||"*"===x,R=d||s,b=y||g,k=d||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:m||i++,prefix:d||"",delimiter:R,optional:A,repeat:w,partial:E,asterisk:!!C,pattern:b?l(b):C?".*":a(R,k)})}}return c<t.length&&(u+=t.substr(c)),u&&r.push(u),r}function a(t,e){return!e||e.indexOf(t)>-1?"[^"+s(t)+"]+?":s(e)+"|(?:(?!"+s(e)+")[^"+s(t)+"])+?"}function c(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function u(t,e){for(var n=new Array(t.length),o=0;o<t.length;o++)"object"==typeof t[o]&&(n[o]=new RegExp("^(?:"+t[o].pattern+")$",f(e)));return function(e,o){for(var i="",a=e||{},u=(o||{}).pretty?c:encodeURIComponent,s=0;s<t.length;s++){var l=t[s];if("string"!=typeof l){var p,f=a[l.name];if(null==f){if(l.optional){l.partial&&(i+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(f)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(f)+"`");if(0===f.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var h=0;h<f.length;h++){if(p=u(f[h]),!n[s].test(p))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(p)+"`");i+=(0===h?l.prefix:l.delimiter)+p}}else{if(p=l.asterisk?encodeURI(f).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):u(f),!n[s].test(p))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+p+'"');i+=l.prefix+p}}else i+=l}return i}}function s(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function l(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function p(t,e){return t.keys=e,t}function f(t){return t&&t.sensitive?"":"i"}function h(t,e,n){r(e)||(n=e||n,e=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",c=0;c<t.length;c++){var u=t[c];if("string"==typeof u)a+=s(u);else{var l=s(u.prefix),h="(?:"+u.pattern+")";e.push(u),u.repeat&&(h+="(?:"+l+h+")*"),a+=h=u.optional?u.partial?l+"("+h+")?":"(?:"+l+"("+h+"))?":l+"("+h+")"}}var v=s(n.delimiter||"/"),d=a.slice(-v.length)===v;return o||(a=(d?a.slice(0,-v.length):a)+"(?:"+v+"(?=$))?"),a+=i?"$":o&&d?"":"(?="+v+"|$)",p(new RegExp("^"+a,f(n)),e)}},9375:t=>{t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},54625:(t,e,n)=>{"use strict";n.d(e,{N_:()=>d,k2:()=>g});var r=n(56347),o=(n(77387),n(51609)),i=n.n(o),a=n(17929),c=n(58168),u=n(98587),s=n(11561);i().Component,i().Component;var l=function(t,e){return"function"==typeof t?t(e):t},p=function(t,e){return"string"==typeof t?(0,a.yJ)(t,null,null,e):t},f=function(t){return t},h=i().forwardRef;void 0===h&&(h=f);var v=h((function(t,e){var n=t.innerRef,r=t.navigate,o=t.onClick,a=(0,u.A)(t,["innerRef","navigate","onClick"]),s=a.target,l=(0,c.A)({},a,{onClick:function(t){try{o&&o(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||s&&"_self"!==s||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),r())}});return l.ref=f!==h&&e||n,i().createElement("a",l)})),d=h((function(t,e){var n=t.component,o=void 0===n?v:n,d=t.replace,m=t.to,y=t.innerRef,g=(0,u.A)(t,["component","replace","to","innerRef"]);return i().createElement(r.XZ.Consumer,null,(function(t){t||(0,s.A)(!1);var n=t.history,r=p(l(m,t.location),t.location),u=r?n.createHref(r):"",v=(0,c.A)({},g,{href:u,navigate:function(){var e=l(m,t.location),r=(0,a.AO)(t.location)===(0,a.AO)(p(e));(d||r?n.replace:n.push)(e)}});return f!==h?v.ref=e||y:v.innerRef=y,i().createElement(o,v)}))})),m=function(t){return t},y=i().forwardRef;void 0===y&&(y=m);var g=y((function(t,e){var n=t["aria-current"],o=void 0===n?"page":n,a=t.activeClassName,f=void 0===a?"active":a,h=t.activeStyle,v=t.className,g=t.exact,x=t.isActive,C=t.location,E=t.sensitive,w=t.strict,A=t.style,R=t.to,b=t.innerRef,k=(0,u.A)(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return i().createElement(r.XZ.Consumer,null,(function(t){t||(0,s.A)(!1);var n=C||t.location,a=p(l(R,n),n),u=a.pathname,L=u&&u.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),_=L?(0,r.B6)(n.pathname,{path:L,exact:g,sensitive:E,strict:w}):null,M=!!(x?x(_,n):_),O="function"==typeof v?v(M):v,j="function"==typeof A?A(M):A;M&&(O=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.filter((function(t){return t})).join(" ")}(O,f),j=(0,c.A)({},j,h));var U=(0,c.A)({"aria-current":M&&o||null,className:O,style:j,to:a},k);return m!==y?U.ref=e||b:U.innerRef=b,i().createElement(d,U)}))}))},56347:(t,e,n)=>{"use strict";n.d(e,{B6:()=>M,Ix:()=>x,W5:()=>S,W6:()=>T,XZ:()=>g,dO:()=>j,g:()=>P,qh:()=>O,rd:()=>b,zy:()=>V});var r=n(77387),o=n(51609),i=n.n(o),a=n(5556),c=n.n(a),u=n(17929),s=n(11561),l=n(58168),p=n(8505),f=n.n(p),h=(n(44363),n(98587),n(4146),1073741823),v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},d=i().createContext||function(t,e){var n,o,a,u="__create-react-context-"+((v[a="__global_unique_id__"]=(v[a]||0)+1)+"__"),s=function(t){function n(){for(var e,n,r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))||this).emitter=(n=e.props.value,r=[],{on:function(t){r.push(t)},off:function(t){r=r.filter((function(e){return e!==t}))},get:function(){return n},set:function(t,e){n=t,r.forEach((function(t){return t(n,e)}))}}),e}(0,r.A)(n,t);var o=n.prototype;return o.getChildContext=function(){var t;return(t={})[u]=this.emitter,t},o.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var n,r=this.props.value,o=t.value;((i=r)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?n=0:(n="function"==typeof e?e(r,o):h,0!=(n|=0)&&this.emitter.set(t.value,n))}var i,a},o.render=function(){return this.props.children},n}(i().Component);s.childContextTypes=((n={})[u]=c().object.isRequired,n);var l=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).observedBits=void 0,t.state={value:t.getValue()},t.onUpdate=function(e,n){t.observedBits&n&&t.setState({value:t.getValue()})},t}(0,r.A)(n,e);var o=n.prototype;return o.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=null==e?h:e},o.componentDidMount=function(){this.context[u]&&this.context[u].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=null==t?h:t},o.componentWillUnmount=function(){this.context[u]&&this.context[u].off(this.onUpdate)},o.getValue=function(){return this.context[u]?this.context[u].get():t},o.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(i().Component);return l.contextTypes=((o={})[u]=c().object,o),{Provider:s,Consumer:l}},m=function(t){var e=d();return e.displayName=t,e},y=m("Router-History"),g=m("Router"),x=function(t){function e(e){var n;return(n=t.call(this,e)||this).state={location:e.history.location},n._isMounted=!1,n._pendingLocation=null,e.staticContext||(n.unlisten=e.history.listen((function(t){n._pendingLocation=t}))),n}(0,r.A)(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var n=e.prototype;return n.componentDidMount=function(){var t=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(e){t._isMounted&&t.setState({location:e})}))),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(g.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},i().createElement(y.Provider,{children:this.props.children||null,value:this.props.history}))},e}(i().Component);i().Component;var C=function(t){function e(){return t.apply(this,arguments)||this}(0,r.A)(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}(i().Component),E={},w=1e4,A=0;function R(t,e){return void 0===t&&(t="/"),void 0===e&&(e={}),"/"===t?t:function(t){if(E[t])return E[t];var e=f().compile(t);return A<w&&(E[t]=e,A++),e}(t)(e,{pretty:!0})}function b(t){var e=t.computedMatch,n=t.to,r=t.push,o=void 0!==r&&r;return i().createElement(g.Consumer,null,(function(t){t||(0,s.A)(!1);var r=t.history,a=t.staticContext,c=o?r.push:r.replace,p=(0,u.yJ)(e?"string"==typeof n?R(n,e.params):(0,l.A)({},n,{pathname:R(n.pathname,e.params)}):n);return a?(c(p),null):i().createElement(C,{onMount:function(){c(p)},onUpdate:function(t,e){var n=(0,u.yJ)(e.to);(0,u.Fu)(n,(0,l.A)({},p,{key:n.key}))||c(p)},to:n})}))}var k={},L=1e4,_=0;function M(t,e){void 0===e&&(e={}),("string"==typeof e||Array.isArray(e))&&(e={path:e});var n=e,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,c=void 0!==a&&a,u=n.sensitive,s=void 0!==u&&u;return[].concat(r).reduce((function(e,n){if(!n&&""!==n)return null;if(e)return e;var r=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=k[n]||(k[n]={});if(r[t])return r[t];var o=[],i={regexp:f()(t,o,e),keys:o};return _<L&&(r[t]=i,_++),i}(n,{end:i,strict:c,sensitive:s}),o=r.regexp,a=r.keys,u=o.exec(t);if(!u)return null;var l=u[0],p=u.slice(1),h=t===l;return i&&!h?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:h,params:a.reduce((function(t,e,n){return t[e.name]=p[n],t}),{})}}),null)}var O=function(t){function e(){return t.apply(this,arguments)||this}return(0,r.A)(e,t),e.prototype.render=function(){var t=this;return i().createElement(g.Consumer,null,(function(e){e||(0,s.A)(!1);var n=t.props.location||e.location,r=t.props.computedMatch?t.props.computedMatch:t.props.path?M(n.pathname,t.props):e.match,o=(0,l.A)({},e,{location:n,match:r}),a=t.props,c=a.children,u=a.component,p=a.render;return Array.isArray(c)&&function(t){return 0===i().Children.count(t)}(c)&&(c=null),i().createElement(g.Provider,{value:o},o.match?c?"function"==typeof c?c(o):c:u?i().createElement(u,o):p?p(o):null:"function"==typeof c?c(o):null)}))},e}(i().Component);i().Component;var j=function(t){function e(){return t.apply(this,arguments)||this}return(0,r.A)(e,t),e.prototype.render=function(){var t=this;return i().createElement(g.Consumer,null,(function(e){e||(0,s.A)(!1);var n,r,o=t.props.location||e.location;return i().Children.forEach(t.props.children,(function(t){if(null==r&&i().isValidElement(t)){n=t;var a=t.props.path||t.props.from;r=a?M(o.pathname,(0,l.A)({},t.props,{path:a})):e.match}})),r?i().cloneElement(n,{location:o,computedMatch:r}):null}))},e}(i().Component),U=i().useContext;function T(){return U(y)}function V(){return U(g).location}function P(){var t=U(g).match;return t?t.params:{}}function S(t){var e=V(),n=U(g).match;return t?M(e.pathname,t):n}}}]);
Save File
Cancel