@ahooksjs/use-url-state
Advanced tools
Comparing version 3.4.1 to 3.5.0
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React")):"function"==typeof define&&define.amd?define(["React"],e):"object"==typeof exports?exports.ahooksUseUrlState=e(require("React")):t.ahooksUseUrlState=e(t.React)}(this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=18)}([function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}n.d(e,"a",(function(){return o}))},function(t,e,n){t.exports=n(13)()},function(t,e,n){"use strict";const r=n(9),o=n(10),i=n(11),a=n(12);function c(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function u(t,e){return e.encode?e.strict?r(t):encodeURIComponent(t):t}function s(t,e){return e.decode?o(t):t}function p(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function f(t){const e=(t=p(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function l(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function h(t,e){c((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const n=function(t){let e;switch(t.arrayFormat){case"index":return(t,n,r)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===r[t]&&(r[t]={}),r[t][e[1]]=n):r[t]=n};case"bracket":return(t,n,r)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==r[t]?r[t]=[].concat(r[t],n):r[t]=[n]:r[t]=n};case"comma":case"separator":return(e,n,r)=>{const o="string"==typeof n&&n.includes(t.arrayFormatSeparator),i="string"==typeof n&&!o&&s(n,t).includes(t.arrayFormatSeparator);n=i?s(n,t):n;const a=o||i?n.split(t.arrayFormatSeparator).map(e=>s(e,t)):null===n?n:s(n,t);r[e]=a};default:return(t,e,n)=>{void 0!==n[t]?n[t]=[].concat(n[t],e):n[t]=e}}}(e),r=Object.create(null);if("string"!=typeof t)return r;if(!(t=t.trim().replace(/^[?#&]/,"")))return r;for(const o of t.split("&")){if(""===o)continue;let[t,a]=i(e.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator"].includes(e.arrayFormat)?a:s(a,e),n(s(t,e),a,r)}for(const t of Object.keys(r)){const n=r[t];if("object"==typeof n&&null!==n)for(const t of Object.keys(n))n[t]=l(n[t],e);else r[t]=l(n,e)}return!1===e.sort?r:(!0===e.sort?Object.keys(r).sort():Object.keys(r).sort(e.sort)).reduce((t,e)=>{const n=r[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=function t(e){return Array.isArray(e)?e.sort():"object"==typeof e?t(Object.keys(e)).sort((t,e)=>Number(t)-Number(e)).map(t=>e[t]):e}(n):t[e]=n,t},Object.create(null))}e.extract=f,e.parse=h,e.stringify=(t,e)=>{if(!t)return"";c((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const n=n=>e.skipNull&&null==t[n]||e.skipEmptyString&&""===t[n],r=function(t){switch(t.arrayFormat){case"index":return e=>(n,r)=>{const o=n.length;return void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[u(e,t),"[",o,"]"].join("")]:[...n,[u(e,t),"[",u(o,t),"]=",u(r,t)].join("")]};case"bracket":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[u(e,t),"[]"].join("")]:[...n,[u(e,t),"[]=",u(r,t)].join("")];case"comma":case"separator":return e=>(n,r)=>null==r||0===r.length?n:0===n.length?[[u(e,t),"=",u(r,t)].join("")]:[[n,u(r,t)].join(t.arrayFormatSeparator)];default:return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,u(e,t)]:[...n,[u(e,t),"=",u(r,t)].join("")]}}(e),o={};for(const e of Object.keys(t))n(e)||(o[e]=t[e]);const i=Object.keys(o);return!1!==e.sort&&i.sort(e.sort),i.map(n=>{const o=t[n];return void 0===o?"":null===o?u(n,e):Array.isArray(o)?o.reduce(r(n),[]).join("&"):u(n,e)+"="+u(o,e)}).filter(t=>t.length>0).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[n,r]=i(t,"#");return Object.assign({url:n.split("?")[0]||"",query:h(f(t),e)},e&&e.parseFragmentIdentifier&&r?{fragmentIdentifier:s(r,e)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0},n);const r=p(t.url).split("?")[0]||"",o=e.extract(t.url),i=e.parse(o,{sort:!1}),a=Object.assign(i,t.query);let c=e.stringify(a,n);c&&(c="?"+c);let s=function(t){let e="";const n=t.indexOf("#");return-1!==n&&(e=t.slice(n)),e}(t.url);return t.fragmentIdentifier&&(s="#"+u(t.fragmentIdentifier,n)),`${r}${c}${s}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0},r);const{url:o,query:i,fragmentIdentifier:c}=e.parseUrl(t,r);return e.stringifyUrl({url:o,query:a(i,n),fragmentIdentifier:c},r)},e.exclude=(t,n,r)=>{const o=Array.isArray(n)?t=>!n.includes(t):(t,e)=>!n(t,e);return e.pick(t,o,r)}},function(t,e,n){"use strict";(function(t){var r=n(0),o=n.n(r),i=n(1),a=n(2),c=n.n(a),u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:{};function s(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,r){t=n,e.forEach((function(e){return e(t,r)}))}}}var p=o.a.createContext||function(t,e){var n,o,a,p="__create-react-context-"+((u[a="__global_unique_id__"]=(u[a]||0)+1)+"__"),f=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).emitter=s(e.props.value),e}Object(i.a)(n,t);var r=n.prototype;return r.getChildContext=function(){var t;return(t={})[p]=this.emitter,t},r.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):1073741823,0!==(n|=0)&&this.emitter.set(t.value,n))}var i,a},r.render=function(){return this.props.children},n}(r.Component);f.childContextTypes=((n={})[p]=c.a.object.isRequired,n);var l=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!=((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}Object(i.a)(n,e);var r=n.prototype;return r.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=null==e?1073741823:e},r.componentDidMount=function(){this.context[p]&&this.context[p].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=null==t?1073741823:t},r.componentWillUnmount=function(){this.context[p]&&this.context[p].off(this.onUpdate)},r.getValue=function(){return this.context[p]?this.context[p].get():t},r.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(r.Component);return l.contextTypes=((o={})[p]=c.a.object,o),{Provider:f,Consumer:l}};e.a=p}).call(this,n(15))},function(t,e,n){var r=n(16);t.exports=h,t.exports.parse=i,t.exports.compile=function(t,e){return c(i(t,e),e)},t.exports.tokensToFunction=c,t.exports.tokensToRegExp=l;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(t,e){for(var n,r=[],i=0,a=0,c="",p=e&&e.delimiter||"/";null!=(n=o.exec(t));){var f=n[0],l=n[1],h=n.index;if(c+=t.slice(a,h),a=h+f.length,l)c+=l[1];else{var d=t[a],y=n[2],m=n[3],v=n[4],g=n[5],b=n[6],x=n[7];c&&(r.push(c),c="");var O=null!=y&&null!=d&&d!==y,j="+"===b||"*"===b,w="?"===b||"*"===b,E=n[2]||p,S=v||g;r.push({name:m||i++,prefix:y||"",delimiter:E,optional:w,repeat:j,partial:O,asterisk:!!x,pattern:S?s(S):x?".*":"[^"+u(E)+"]+?"})}}return a<t.length&&(c+=t.substr(a)),c&&r.push(c),r}function a(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function c(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="",c=e||{},u=(o||{}).pretty?a:encodeURIComponent,s=0;s<t.length;s++){var p=t[s];if("string"!=typeof p){var f,l=c[p.name];if(null==l){if(p.optional){p.partial&&(i+=p.prefix);continue}throw new TypeError('Expected "'+p.name+'" to be defined')}if(r(l)){if(!p.repeat)throw new TypeError('Expected "'+p.name+'" to not repeat, but received `'+JSON.stringify(l)+"`");if(0===l.length){if(p.optional)continue;throw new TypeError('Expected "'+p.name+'" to not be empty')}for(var h=0;h<l.length;h++){if(f=u(l[h]),!n[s].test(f))throw new TypeError('Expected all "'+p.name+'" to match "'+p.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===h?p.prefix:p.delimiter)+f}}else{if(f=p.asterisk?encodeURI(l).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):u(l),!n[s].test(f))throw new TypeError('Expected "'+p.name+'" to match "'+p.pattern+'", but received "'+f+'"');i+=p.prefix+f}}else i+=p}return i}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function p(t,e){return t.keys=e,t}function f(t){return t&&t.sensitive?"":"i"}function l(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 s=t[c];if("string"==typeof s)a+=u(s);else{var l=u(s.prefix),h="(?:"+s.pattern+")";e.push(s),s.repeat&&(h+="(?:"+l+h+")*"),a+=h=s.optional?s.partial?l+"("+h+")?":"(?:"+l+"("+h+"))?":l+"("+h+")"}}var d=u(n.delimiter||"/"),y=a.slice(-d.length)===d;return o||(a=(y?a.slice(0,-d.length):a)+"(?:"+d+"(?=$))?"),a+=i?"$":o&&y?"":"(?="+d+"|$)",p(new RegExp("^"+a,f(n)),e)}function h(t,e,n){return r(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 p(t,e)}(t,e):r(t)?function(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(h(t[o],e,n).source);return p(new RegExp("(?:"+r.join("|")+")",f(n)),e)}(t,e,n):function(t,e,n){return l(i(t,n),e,n)}(t,e,n)}},,function(t,e,n){"use strict";t.exports=n(17)},function(t,e,n){"use strict";var r=n(7),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function u(t){return r.isMemo(t)?a:c[t.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=a;var s=Object.defineProperty,p=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,l=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(d){var o=h(n);o&&o!==d&&t(e,o,r)}var a=p(n);f&&(a=a.concat(f(n)));for(var c=u(e),y=u(n),m=0;m<a.length;++m){var v=a[m];if(!(i[v]||r&&r[v]||y&&y[v]||c&&c[v])){var g=l(n,v);try{s(e,v,g)}catch(t){}}}}return e}},function(t,e,n){"use strict";t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase())},function(t,e,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function i(t,e){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],i(n),i(r))}function a(t){try{return decodeURIComponent(t)}catch(o){for(var e=t.match(r),n=1;n<e.length;n++)e=(t=i(e,n).join("")).match(r);return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=o.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch(t){var r=a(n[0]);r!==n[0]&&(e[n[0]]=r)}n=o.exec(t)}e["%C2"]="�";for(var i=Object.keys(e),c=0;c<i.length;c++){var u=i[c];t=t.replace(new RegExp(u,"g"),e[u])}return t}(t)}}},function(t,e,n){"use strict";t.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];const n=t.indexOf(e);return-1===n?[t]:[t.slice(0,n),t.slice(n+e.length)]}},function(t,e,n){"use strict";t.exports=function(t,e){for(var n={},r=Object.keys(t),o=Array.isArray(e),i=0;i<r.length;i++){var a=r[i],c=t[a];(o?-1!==e.indexOf(a):e(a,c,t))&&(n[a]=c)}return n}},function(t,e,n){"use strict";var r=n(14);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,a){if(a!==r){var c=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 c.name="Invariant Violation",c}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,n){"use strict"; | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React")):"function"==typeof define&&define.amd?define(["React"],e):"object"==typeof exports?exports.ahooksUseUrlState=e(require("React")):t.ahooksUseUrlState=e(t.React)}(this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=18)}([function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}n.d(e,"a",(function(){return o}))},function(t,e,n){t.exports=n(14)()},function(t,e,n){"use strict";const r=n(9),o=n(10),i=n(11),a=n(12);function c(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function u(t,e){return e.encode?e.strict?r(t):encodeURIComponent(t):t}function s(t,e){return e.decode?o(t):t}function p(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function f(t){const e=(t=p(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function l(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function h(t,e){c((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const n=function(t){let e;switch(t.arrayFormat){case"index":return(t,n,r)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===r[t]&&(r[t]={}),r[t][e[1]]=n):r[t]=n};case"bracket":return(t,n,r)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==r[t]?r[t]=[].concat(r[t],n):r[t]=[n]:r[t]=n};case"comma":case"separator":return(e,n,r)=>{const o="string"==typeof n&&n.includes(t.arrayFormatSeparator),i="string"==typeof n&&!o&&s(n,t).includes(t.arrayFormatSeparator);n=i?s(n,t):n;const a=o||i?n.split(t.arrayFormatSeparator).map(e=>s(e,t)):null===n?n:s(n,t);r[e]=a};default:return(t,e,n)=>{void 0!==n[t]?n[t]=[].concat(n[t],e):n[t]=e}}}(e),r=Object.create(null);if("string"!=typeof t)return r;if(!(t=t.trim().replace(/^[?#&]/,"")))return r;for(const o of t.split("&")){if(""===o)continue;let[t,a]=i(e.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator"].includes(e.arrayFormat)?a:s(a,e),n(s(t,e),a,r)}for(const t of Object.keys(r)){const n=r[t];if("object"==typeof n&&null!==n)for(const t of Object.keys(n))n[t]=l(n[t],e);else r[t]=l(n,e)}return!1===e.sort?r:(!0===e.sort?Object.keys(r).sort():Object.keys(r).sort(e.sort)).reduce((t,e)=>{const n=r[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=function t(e){return Array.isArray(e)?e.sort():"object"==typeof e?t(Object.keys(e)).sort((t,e)=>Number(t)-Number(e)).map(t=>e[t]):e}(n):t[e]=n,t},Object.create(null))}e.extract=f,e.parse=h,e.stringify=(t,e)=>{if(!t)return"";c((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const n=n=>e.skipNull&&null==t[n]||e.skipEmptyString&&""===t[n],r=function(t){switch(t.arrayFormat){case"index":return e=>(n,r)=>{const o=n.length;return void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[u(e,t),"[",o,"]"].join("")]:[...n,[u(e,t),"[",u(o,t),"]=",u(r,t)].join("")]};case"bracket":return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,[u(e,t),"[]"].join("")]:[...n,[u(e,t),"[]=",u(r,t)].join("")];case"comma":case"separator":return e=>(n,r)=>null==r||0===r.length?n:0===n.length?[[u(e,t),"=",u(r,t)].join("")]:[[n,u(r,t)].join(t.arrayFormatSeparator)];default:return e=>(n,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?n:null===r?[...n,u(e,t)]:[...n,[u(e,t),"=",u(r,t)].join("")]}}(e),o={};for(const e of Object.keys(t))n(e)||(o[e]=t[e]);const i=Object.keys(o);return!1!==e.sort&&i.sort(e.sort),i.map(n=>{const o=t[n];return void 0===o?"":null===o?u(n,e):Array.isArray(o)?o.reduce(r(n),[]).join("&"):u(n,e)+"="+u(o,e)}).filter(t=>t.length>0).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[n,r]=i(t,"#");return Object.assign({url:n.split("?")[0]||"",query:h(f(t),e)},e&&e.parseFragmentIdentifier&&r?{fragmentIdentifier:s(r,e)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0},n);const r=p(t.url).split("?")[0]||"",o=e.extract(t.url),i=e.parse(o,{sort:!1}),a=Object.assign(i,t.query);let c=e.stringify(a,n);c&&(c="?"+c);let s=function(t){let e="";const n=t.indexOf("#");return-1!==n&&(e=t.slice(n)),e}(t.url);return t.fragmentIdentifier&&(s="#"+u(t.fragmentIdentifier,n)),`${r}${c}${s}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0},r);const{url:o,query:i,fragmentIdentifier:c}=e.parseUrl(t,r);return e.stringifyUrl({url:o,query:a(i,n),fragmentIdentifier:c},r)},e.exclude=(t,n,r)=>{const o=Array.isArray(n)?t=>!n.includes(t):(t,e)=>!n(t,e);return e.pick(t,o,r)}},function(t,e,n){"use strict";(function(t){var r=n(0),o=n.n(r),i=n(1),a=n(2),c=n.n(a),u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:{};function s(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,r){t=n,e.forEach((function(e){return e(t,r)}))}}}var p=o.a.createContext||function(t,e){var n,o,a,p="__create-react-context-"+((u[a="__global_unique_id__"]=(u[a]||0)+1)+"__"),f=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).emitter=s(e.props.value),e}Object(i.a)(n,t);var r=n.prototype;return r.getChildContext=function(){var t;return(t={})[p]=this.emitter,t},r.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):1073741823,0!==(n|=0)&&this.emitter.set(t.value,n))}var i,a},r.render=function(){return this.props.children},n}(r.Component);f.childContextTypes=((n={})[p]=c.a.object.isRequired,n);var l=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!=((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}Object(i.a)(n,e);var r=n.prototype;return r.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=null==e?1073741823:e},r.componentDidMount=function(){this.context[p]&&this.context[p].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=null==t?1073741823:t},r.componentWillUnmount=function(){this.context[p]&&this.context[p].off(this.onUpdate)},r.getValue=function(){return this.context[p]?this.context[p].get():t},r.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(r.Component);return l.contextTypes=((o={})[p]=c.a.object,o),{Provider:f,Consumer:l}};e.a=p}).call(this,n(13))},function(t,e,n){var r=n(16);t.exports=h,t.exports.parse=i,t.exports.compile=function(t,e){return c(i(t,e),e)},t.exports.tokensToFunction=c,t.exports.tokensToRegExp=l;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(t,e){for(var n,r=[],i=0,a=0,c="",p=e&&e.delimiter||"/";null!=(n=o.exec(t));){var f=n[0],l=n[1],h=n.index;if(c+=t.slice(a,h),a=h+f.length,l)c+=l[1];else{var d=t[a],y=n[2],m=n[3],v=n[4],g=n[5],b=n[6],x=n[7];c&&(r.push(c),c="");var O=null!=y&&null!=d&&d!==y,j="+"===b||"*"===b,w="?"===b||"*"===b,E=n[2]||p,S=v||g;r.push({name:m||i++,prefix:y||"",delimiter:E,optional:w,repeat:j,partial:O,asterisk:!!x,pattern:S?s(S):x?".*":"[^"+u(E)+"]+?"})}}return a<t.length&&(c+=t.substr(a)),c&&r.push(c),r}function a(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function c(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="",c=e||{},u=(o||{}).pretty?a:encodeURIComponent,s=0;s<t.length;s++){var p=t[s];if("string"!=typeof p){var f,l=c[p.name];if(null==l){if(p.optional){p.partial&&(i+=p.prefix);continue}throw new TypeError('Expected "'+p.name+'" to be defined')}if(r(l)){if(!p.repeat)throw new TypeError('Expected "'+p.name+'" to not repeat, but received `'+JSON.stringify(l)+"`");if(0===l.length){if(p.optional)continue;throw new TypeError('Expected "'+p.name+'" to not be empty')}for(var h=0;h<l.length;h++){if(f=u(l[h]),!n[s].test(f))throw new TypeError('Expected all "'+p.name+'" to match "'+p.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===h?p.prefix:p.delimiter)+f}}else{if(f=p.asterisk?encodeURI(l).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):u(l),!n[s].test(f))throw new TypeError('Expected "'+p.name+'" to match "'+p.pattern+'", but received "'+f+'"');i+=p.prefix+f}}else i+=p}return i}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function p(t,e){return t.keys=e,t}function f(t){return t&&t.sensitive?"":"i"}function l(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 s=t[c];if("string"==typeof s)a+=u(s);else{var l=u(s.prefix),h="(?:"+s.pattern+")";e.push(s),s.repeat&&(h+="(?:"+l+h+")*"),a+=h=s.optional?s.partial?l+"("+h+")?":"(?:"+l+"("+h+"))?":l+"("+h+")"}}var d=u(n.delimiter||"/"),y=a.slice(-d.length)===d;return o||(a=(y?a.slice(0,-d.length):a)+"(?:"+d+"(?=$))?"),a+=i?"$":o&&y?"":"(?="+d+"|$)",p(new RegExp("^"+a,f(n)),e)}function h(t,e,n){return r(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 p(t,e)}(t,e):r(t)?function(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(h(t[o],e,n).source);return p(new RegExp("(?:"+r.join("|")+")",f(n)),e)}(t,e,n):function(t,e,n){return l(i(t,n),e,n)}(t,e,n)}},,function(t,e,n){"use strict";t.exports=n(17)},function(t,e,n){"use strict";var r=n(7),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function u(t){return r.isMemo(t)?a:c[t.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=a;var s=Object.defineProperty,p=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,l=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(d){var o=h(n);o&&o!==d&&t(e,o,r)}var a=p(n);f&&(a=a.concat(f(n)));for(var c=u(e),y=u(n),m=0;m<a.length;++m){var v=a[m];if(!(i[v]||r&&r[v]||y&&y[v]||c&&c[v])){var g=l(n,v);try{s(e,v,g)}catch(t){}}}}return e}},function(t,e,n){"use strict";t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase())},function(t,e,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function i(t,e){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],i(n),i(r))}function a(t){try{return decodeURIComponent(t)}catch(o){for(var e=t.match(r),n=1;n<e.length;n++)e=(t=i(e,n).join("")).match(r);return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=o.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch(t){var r=a(n[0]);r!==n[0]&&(e[n[0]]=r)}n=o.exec(t)}e["%C2"]="�";for(var i=Object.keys(e),c=0;c<i.length;c++){var u=i[c];t=t.replace(new RegExp(u,"g"),e[u])}return t}(t)}}},function(t,e,n){"use strict";t.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];const n=t.indexOf(e);return-1===n?[t]:[t.slice(0,n),t.slice(n+e.length)]}},function(t,e,n){"use strict";t.exports=function(t,e){for(var n={},r=Object.keys(t),o=Array.isArray(e),i=0;i<r.length;i++){var a=r[i],c=t[a];(o?-1!==e.indexOf(a):e(a,c,t))&&(n[a]=c)}return n}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=n(15);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,a){if(a!==r){var c=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 c.name="Invariant Violation",c}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,n){"use strict"; | ||
/** @license React v16.13.1 | ||
@@ -9,2 +9,2 @@ * react-is.production.min.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,c=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,p=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,l=r?Symbol.for("react.concurrent_mode"):60111,h=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,x=r?Symbol.for("react.responder"):60118,O=r?Symbol.for("react.scope"):60119;function j(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case o:switch(t=t.type){case f:case l:case a:case u:case c:case d:return t;default:switch(t=t&&t.$$typeof){case p:case h:case v:case m:case s:return t;default:return e}}case i:return e}}}function w(t){return j(t)===l}e.AsyncMode=f,e.ConcurrentMode=l,e.ContextConsumer=p,e.ContextProvider=s,e.Element=o,e.ForwardRef=h,e.Fragment=a,e.Lazy=v,e.Memo=m,e.Portal=i,e.Profiler=u,e.StrictMode=c,e.Suspense=d,e.isAsyncMode=function(t){return w(t)||j(t)===f},e.isConcurrentMode=w,e.isContextConsumer=function(t){return j(t)===p},e.isContextProvider=function(t){return j(t)===s},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===o},e.isForwardRef=function(t){return j(t)===h},e.isFragment=function(t){return j(t)===a},e.isLazy=function(t){return j(t)===v},e.isMemo=function(t){return j(t)===m},e.isPortal=function(t){return j(t)===i},e.isProfiler=function(t){return j(t)===u},e.isStrictMode=function(t){return j(t)===c},e.isSuspense=function(t){return j(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===a||t===l||t===u||t===c||t===d||t===y||"object"==typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===m||t.$$typeof===s||t.$$typeof===p||t.$$typeof===h||t.$$typeof===b||t.$$typeof===x||t.$$typeof===O||t.$$typeof===g)},e.typeOf=j},function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"MemoryRouter",(function(){return A})),n.d(r,"Prompt",(function(){return M})),n.d(r,"Redirect",(function(){return L})),n.d(r,"Route",(function(){return q})),n.d(r,"Router",(function(){return _})),n.d(r,"StaticRouter",(function(){return Y})),n.d(r,"Switch",(function(){return K})),n.d(r,"__HistoryContext",(function(){return T})),n.d(r,"__RouterContext",(function(){return $})),n.d(r,"generatePath",(function(){return I})),n.d(r,"matchPath",(function(){return H})),n.d(r,"useHistory",(function(){return Z})),n.d(r,"useLocation",(function(){return tt})),n.d(r,"useParams",(function(){return et})),n.d(r,"useRouteMatch",(function(){return nt})),n.d(r,"withRouter",(function(){return Q}));var o=n(0),i=n.n(o),a=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},c=function(){var t=a(Object(o.useState)({}),2)[1];return Object(o.useCallback)((function(){return t({})}),[])};var u=function(t){var e=Object(o.useRef)(t);e.current=Object(o.useMemo)((function(){return t}),[t]);var n=Object(o.useRef)();return n.current||(n.current=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.current.apply(this,t)}),n.current},s=n(3),p=n(1);n(2);function f(){return(f=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 l(t){return"/"===t.charAt(0)}function h(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 d=function(t,e){void 0===e&&(e="");var n,r=t&&t.split("/")||[],o=e&&e.split("/")||[],i=t&&l(t),a=e&&l(e),c=i||a;if(t&&l(t)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var u=o[o.length-1];n="."===u||".."===u||""===u}else n=!1;for(var s=0,p=o.length;p>=0;p--){var f=o[p];"."===f?h(o,p):".."===f?(h(o,p),s++):s&&(h(o,p),s--)}if(!c)for(;s--;s)o.unshift("..");!c||""===o[0]||o[0]&&l(o[0])||o.unshift("");var d=o.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};function y(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}var m=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,r){return t(e,n[r])}));if("object"==typeof e||"object"==typeof n){var r=y(e),o=y(n);return r!==e||o!==n?t(r,o):Object.keys(Object.assign({},e,n)).every((function(r){return t(e[r],n[r])}))}return!1},v="Invariant failed";function g(t,e){if(!t)throw new Error(v)}function b(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 x(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=f({},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=d(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function O(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach((function(t){return t.apply(void 0,n)}))}}}"undefined"==typeof window||!window.document||window.document.createElement;function j(t,e,n){return Math.min(Math.max(t,e),n)}function w(t){void 0===t&&(t={});var e=t,n=e.getUserConfirmation,r=e.initialEntries,o=void 0===r?["/"]:r,i=e.initialIndex,a=void 0===i?0:i,c=e.keyLength,u=void 0===c?6:c,s=O();function p(t){f(v,t),v.length=v.entries.length,s.notifyListeners(v.location,v.action)}function l(){return Math.random().toString(36).substr(2,u)}var h=j(a,0,o.length-1),d=o.map((function(t){return x(t,void 0,"string"==typeof t?l():t.key||l())})),y=b;function m(t){var e=j(v.index+t,0,v.entries.length-1),r=v.entries[e];s.confirmTransitionTo(r,"POP",n,(function(t){t?p({action:"POP",location:r,index:e}):p()}))}var v={length:d.length,action:"POP",location:d[h],index:h,entries:d,createHref:y,push:function(t,e){var r=x(t,e,l(),v.location);s.confirmTransitionTo(r,"PUSH",n,(function(t){if(t){var e=v.index+1,n=v.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),p({action:"PUSH",location:r,index:e,entries:n})}}))},replace:function(t,e){var r=x(t,e,l(),v.location);s.confirmTransitionTo(r,"REPLACE",n,(function(t){t&&(v.entries[v.index]=r,p({action:"REPLACE",location:r}))}))},go:m,goBack:function(){m(-1)},goForward:function(){m(1)},canGo:function(t){var e=v.index+t;return e>=0&&e<v.entries.length},block:function(t){return void 0===t&&(t=!1),s.setPrompt(t)},listen:function(t){return s.appendListener(t)}};return v}var E=n(4),S=n(5),C=n.n(S);n(7);function R(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}var P=n(8),k=n.n(P),T=function(t){var e=Object(E.a)();return e.displayName=t,e}("Router-History"),$=function(t){var e=Object(E.a)();return e.displayName=t,e}("Router"),_=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._isMounted?n.setState({location:t}):n._pendingLocation=t}))),n}Object(p.a)(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var n=e.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 i.a.createElement($.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},i.a.createElement(T.Provider,{children:this.props.children||null,value:this.props.history}))},e}(i.a.Component);var A=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).history=w(e.props),e}return Object(p.a)(e,t),e.prototype.render=function(){return i.a.createElement(_,{history:this.history,children:this.props.children})},e}(i.a.Component);var U=function(t){function e(){return t.apply(this,arguments)||this}Object(p.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.a.Component);function M(t){var e=t.message,n=t.when,r=void 0===n||n;return i.a.createElement($.Consumer,null,(function(t){if(t||g(!1),!r||t.staticContext)return null;var n=t.history.block;return i.a.createElement(U,{onMount:function(t){t.release=n(e)},onUpdate:function(t,r){r.message!==e&&(t.release(),t.release=n(e))},onUnmount:function(t){t.release()},message:e})}))}var F={},N=0;function I(t,e){return void 0===t&&(t="/"),void 0===e&&(e={}),"/"===t?t:function(t){if(F[t])return F[t];var e=C.a.compile(t);return N<1e4&&(F[t]=e,N++),e}(t)(e,{pretty:!0})}function L(t){var e=t.computedMatch,n=t.to,r=t.push,o=void 0!==r&&r;return i.a.createElement($.Consumer,null,(function(t){t||g(!1);var r=t.history,a=t.staticContext,c=o?r.push:r.replace,u=x(e?"string"==typeof n?I(n,e.params):f({},n,{pathname:I(n.pathname,e.params)}):n);return a?(c(u),null):i.a.createElement(U,{onMount:function(){c(u)},onUpdate:function(t,e){var n,r,o=x(e.to);n=o,r=f({},u,{key:o.key}),n.pathname===r.pathname&&n.search===r.search&&n.hash===r.hash&&n.key===r.key&&m(n.state,r.state)||c(u)},to:n})}))}var B={},D=0;function H(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=B[n]||(B[n]={});if(r[t])return r[t];var o=[],i={regexp:C()(t,o,e),keys:o};return D<1e4&&(r[t]=i,D++),i}(n,{end:i,strict:c,sensitive:s}),o=r.regexp,a=r.keys,u=o.exec(t);if(!u)return null;var p=u[0],f=u.slice(1),l=t===p;return i&&!l?null:{path:n,url:"/"===n&&""===p?"/":p,isExact:l,params:a.reduce((function(t,e,n){return t[e.name]=f[n],t}),{})}}),null)}var q=function(t){function e(){return t.apply(this,arguments)||this}return Object(p.a)(e,t),e.prototype.render=function(){var t=this;return i.a.createElement($.Consumer,null,(function(e){e||g(!1);var n=t.props.location||e.location,r=f({},e,{location:n,match:t.props.computedMatch?t.props.computedMatch:t.props.path?H(n.pathname,t.props):e.match}),o=t.props,a=o.children,c=o.component,u=o.render;return Array.isArray(a)&&0===a.length&&(a=null),i.a.createElement($.Provider,{value:r},r.match?a?"function"==typeof a?a(r):a:c?i.a.createElement(c,r):u?u(r):null:"function"==typeof a?a(r):null)}))},e}(i.a.Component);function W(t){return"/"===t.charAt(0)?t:"/"+t}function V(t,e){if(!t)return e;var n=W(t);return 0!==e.pathname.indexOf(n)?e:f({},e,{pathname:e.pathname.substr(n.length)})}function z(t){return"string"==typeof t?t:b(t)}function J(t){return function(){g(!1)}}function G(){}var Y=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).handlePush=function(t){return e.navigateTo(t,"PUSH")},e.handleReplace=function(t){return e.navigateTo(t,"REPLACE")},e.handleListen=function(){return G},e.handleBlock=function(){return G},e}Object(p.a)(e,t);var n=e.prototype;return n.navigateTo=function(t,e){var n=this.props,r=n.basename,o=void 0===r?"":r,i=n.context,a=void 0===i?{}:i;a.action=e,a.location=function(t,e){return t?f({},e,{pathname:W(t)+e.pathname}):e}(o,x(t)),a.url=z(a.location)},n.render=function(){var t=this.props,e=t.basename,n=void 0===e?"":e,r=t.context,o=void 0===r?{}:r,a=t.location,c=void 0===a?"/":a,u=R(t,["basename","context","location"]),s={createHref:function(t){return W(n+z(t))},action:"POP",location:V(n,x(c)),push:this.handlePush,replace:this.handleReplace,go:J(),goBack:J(),goForward:J(),listen:this.handleListen,block:this.handleBlock};return i.a.createElement(_,f({},u,{history:s,staticContext:o}))},e}(i.a.Component);var K=function(t){function e(){return t.apply(this,arguments)||this}return Object(p.a)(e,t),e.prototype.render=function(){var t=this;return i.a.createElement($.Consumer,null,(function(e){e||g(!1);var n,r,o=t.props.location||e.location;return i.a.Children.forEach(t.props.children,(function(t){if(null==r&&i.a.isValidElement(t)){n=t;var a=t.props.path||t.props.from;r=a?H(o.pathname,f({},t.props,{path:a})):e.match}})),r?i.a.cloneElement(n,{location:o,computedMatch:r}):null}))},e}(i.a.Component);function Q(t){var e="withRouter("+(t.displayName||t.name)+")",n=function(e){var n=e.wrappedComponentRef,r=R(e,["wrappedComponentRef"]);return i.a.createElement($.Consumer,null,(function(e){return e||g(!1),i.a.createElement(t,f({},r,e,{ref:n}))}))};return n.displayName=e,n.WrappedComponent=t,k()(n,t)}var X=i.a.useContext;function Z(){return X(T)}function tt(){return X($).location}function et(){var t=X($).match;return t?t.params:{}}function nt(t){var e=tt(),n=X($).match;return t?H(e.pathname,t):n}var rt=function(){return(rt=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}).apply(this,arguments)},ot=r,it={parseNumbers:!1,parseBooleans:!1},at={skipNull:!1,skipEmptyString:!1};e.default=function(t,e){var n,r,i=e||{},a=i.navigateMode,p=void 0===a?"push":a,f=i.parseOptions,l=i.stringifyOptions,h=rt(rt({},it),f),d=rt(rt({},at),l),y=ot.useLocation(),m=null===(n=ot.useHistory)||void 0===n?void 0:n.call(ot),v=null===(r=ot.useNavigate)||void 0===r?void 0:r.call(ot),g=c(),b=Object(o.useRef)("function"==typeof t?t():t||{}),x=Object(o.useMemo)((function(){return Object(s.parse)(y.search,h)}),[y.search]),O=Object(o.useMemo)((function(){return rt(rt({},b.current),x)}),[x]);return[O,u((function(t){var e="function"==typeof t?t(O):t;g(),m&&m[p]({hash:y.hash,search:Object(s.stringify)(rt(rt({},x),e),d)||"?"}),v&&v({hash:y.hash,search:Object(s.stringify)(rt(rt({},x),e),d)||"?"},{replace:"replace"===p})}))]}}])})); | ||
*/var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,c=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,p=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,l=r?Symbol.for("react.concurrent_mode"):60111,h=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,x=r?Symbol.for("react.responder"):60118,O=r?Symbol.for("react.scope"):60119;function j(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case o:switch(t=t.type){case f:case l:case a:case u:case c:case d:return t;default:switch(t=t&&t.$$typeof){case p:case h:case v:case m:case s:return t;default:return e}}case i:return e}}}function w(t){return j(t)===l}e.AsyncMode=f,e.ConcurrentMode=l,e.ContextConsumer=p,e.ContextProvider=s,e.Element=o,e.ForwardRef=h,e.Fragment=a,e.Lazy=v,e.Memo=m,e.Portal=i,e.Profiler=u,e.StrictMode=c,e.Suspense=d,e.isAsyncMode=function(t){return w(t)||j(t)===f},e.isConcurrentMode=w,e.isContextConsumer=function(t){return j(t)===p},e.isContextProvider=function(t){return j(t)===s},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===o},e.isForwardRef=function(t){return j(t)===h},e.isFragment=function(t){return j(t)===a},e.isLazy=function(t){return j(t)===v},e.isMemo=function(t){return j(t)===m},e.isPortal=function(t){return j(t)===i},e.isProfiler=function(t){return j(t)===u},e.isStrictMode=function(t){return j(t)===c},e.isSuspense=function(t){return j(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===a||t===l||t===u||t===c||t===d||t===y||"object"==typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===m||t.$$typeof===s||t.$$typeof===p||t.$$typeof===h||t.$$typeof===b||t.$$typeof===x||t.$$typeof===O||t.$$typeof===g)},e.typeOf=j},function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"MemoryRouter",(function(){return A})),n.d(r,"Prompt",(function(){return M})),n.d(r,"Redirect",(function(){return L})),n.d(r,"Route",(function(){return q})),n.d(r,"Router",(function(){return _})),n.d(r,"StaticRouter",(function(){return Y})),n.d(r,"Switch",(function(){return K})),n.d(r,"__HistoryContext",(function(){return T})),n.d(r,"__RouterContext",(function(){return $})),n.d(r,"generatePath",(function(){return I})),n.d(r,"matchPath",(function(){return H})),n.d(r,"useHistory",(function(){return Z})),n.d(r,"useLocation",(function(){return tt})),n.d(r,"useParams",(function(){return et})),n.d(r,"useRouteMatch",(function(){return nt})),n.d(r,"withRouter",(function(){return Q}));var o=n(0),i=n.n(o),a=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},c=function(){var t=a(Object(o.useState)({}),2)[1];return Object(o.useCallback)((function(){return t({})}),[])};var u=function(t){var e=Object(o.useRef)(t);e.current=Object(o.useMemo)((function(){return t}),[t]);var n=Object(o.useRef)();return n.current||(n.current=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.current.apply(this,t)}),n.current},s=n(3),p=n(1);function f(){return(f=Object.assign?Object.assign.bind():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 l(t){return"/"===t.charAt(0)}function h(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 d=function(t,e){void 0===e&&(e="");var n,r=t&&t.split("/")||[],o=e&&e.split("/")||[],i=t&&l(t),a=e&&l(e),c=i||a;if(t&&l(t)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var u=o[o.length-1];n="."===u||".."===u||""===u}else n=!1;for(var s=0,p=o.length;p>=0;p--){var f=o[p];"."===f?h(o,p):".."===f?(h(o,p),s++):s&&(h(o,p),s--)}if(!c)for(;s--;s)o.unshift("..");!c||""===o[0]||o[0]&&l(o[0])||o.unshift("");var d=o.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};function y(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}var m=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,r){return t(e,n[r])}));if("object"==typeof e||"object"==typeof n){var r=y(e),o=y(n);return r!==e||o!==n?t(r,o):Object.keys(Object.assign({},e,n)).every((function(r){return t(e[r],n[r])}))}return!1},v="Invariant failed";function g(t,e){if(!t)throw new Error(v)}function b(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 x(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=f({},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=d(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function O(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach((function(t){return t.apply(void 0,n)}))}}}"undefined"==typeof window||!window.document||window.document.createElement;function j(t,e,n){return Math.min(Math.max(t,e),n)}function w(t){void 0===t&&(t={});var e=t,n=e.getUserConfirmation,r=e.initialEntries,o=void 0===r?["/"]:r,i=e.initialIndex,a=void 0===i?0:i,c=e.keyLength,u=void 0===c?6:c,s=O();function p(t){f(v,t),v.length=v.entries.length,s.notifyListeners(v.location,v.action)}function l(){return Math.random().toString(36).substr(2,u)}var h=j(a,0,o.length-1),d=o.map((function(t){return x(t,void 0,"string"==typeof t?l():t.key||l())})),y=b;function m(t){var e=j(v.index+t,0,v.entries.length-1),r=v.entries[e];s.confirmTransitionTo(r,"POP",n,(function(t){t?p({action:"POP",location:r,index:e}):p()}))}var v={length:d.length,action:"POP",location:d[h],index:h,entries:d,createHref:y,push:function(t,e){var r=x(t,e,l(),v.location);s.confirmTransitionTo(r,"PUSH",n,(function(t){if(t){var e=v.index+1,n=v.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),p({action:"PUSH",location:r,index:e,entries:n})}}))},replace:function(t,e){var r=x(t,e,l(),v.location);s.confirmTransitionTo(r,"REPLACE",n,(function(t){t&&(v.entries[v.index]=r,p({action:"REPLACE",location:r}))}))},go:m,goBack:function(){m(-1)},goForward:function(){m(1)},canGo:function(t){var e=v.index+t;return e>=0&&e<v.entries.length},block:function(t){return void 0===t&&(t=!1),s.setPrompt(t)},listen:function(t){return s.appendListener(t)}};return v}var E=n(4),S=n(5),C=n.n(S);n(7);function P(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}var R=n(8),k=n.n(R),T=function(t){var e=Object(E.a)();return e.displayName=t,e}("Router-History"),$=function(t){var e=Object(E.a)();return e.displayName=t,e}("Router"),_=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._isMounted?n.setState({location:t}):n._pendingLocation=t}))),n}Object(p.a)(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var n=e.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 i.a.createElement($.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},i.a.createElement(T.Provider,{children:this.props.children||null,value:this.props.history}))},e}(i.a.Component);var A=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).history=w(e.props),e}return Object(p.a)(e,t),e.prototype.render=function(){return i.a.createElement(_,{history:this.history,children:this.props.children})},e}(i.a.Component);var U=function(t){function e(){return t.apply(this,arguments)||this}Object(p.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.a.Component);function M(t){var e=t.message,n=t.when,r=void 0===n||n;return i.a.createElement($.Consumer,null,(function(t){if(t||g(!1),!r||t.staticContext)return null;var n=t.history.block;return i.a.createElement(U,{onMount:function(t){t.release=n(e)},onUpdate:function(t,r){r.message!==e&&(t.release(),t.release=n(e))},onUnmount:function(t){t.release()},message:e})}))}var F={},N=0;function I(t,e){return void 0===t&&(t="/"),void 0===e&&(e={}),"/"===t?t:function(t){if(F[t])return F[t];var e=C.a.compile(t);return N<1e4&&(F[t]=e,N++),e}(t)(e,{pretty:!0})}function L(t){var e=t.computedMatch,n=t.to,r=t.push,o=void 0!==r&&r;return i.a.createElement($.Consumer,null,(function(t){t||g(!1);var r=t.history,a=t.staticContext,c=o?r.push:r.replace,u=x(e?"string"==typeof n?I(n,e.params):f({},n,{pathname:I(n.pathname,e.params)}):n);return a?(c(u),null):i.a.createElement(U,{onMount:function(){c(u)},onUpdate:function(t,e){var n,r,o=x(e.to);n=o,r=f({},u,{key:o.key}),n.pathname===r.pathname&&n.search===r.search&&n.hash===r.hash&&n.key===r.key&&m(n.state,r.state)||c(u)},to:n})}))}var B={},D=0;function H(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=B[n]||(B[n]={});if(r[t])return r[t];var o=[],i={regexp:C()(t,o,e),keys:o};return D<1e4&&(r[t]=i,D++),i}(n,{end:i,strict:c,sensitive:s}),o=r.regexp,a=r.keys,u=o.exec(t);if(!u)return null;var p=u[0],f=u.slice(1),l=t===p;return i&&!l?null:{path:n,url:"/"===n&&""===p?"/":p,isExact:l,params:a.reduce((function(t,e,n){return t[e.name]=f[n],t}),{})}}),null)}var q=function(t){function e(){return t.apply(this,arguments)||this}return Object(p.a)(e,t),e.prototype.render=function(){var t=this;return i.a.createElement($.Consumer,null,(function(e){e||g(!1);var n=t.props.location||e.location,r=f({},e,{location:n,match:t.props.computedMatch?t.props.computedMatch:t.props.path?H(n.pathname,t.props):e.match}),o=t.props,a=o.children,c=o.component,u=o.render;return Array.isArray(a)&&0===a.length&&(a=null),i.a.createElement($.Provider,{value:r},r.match?a?"function"==typeof a?a(r):a:c?i.a.createElement(c,r):u?u(r):null:"function"==typeof a?a(r):null)}))},e}(i.a.Component);function W(t){return"/"===t.charAt(0)?t:"/"+t}function V(t,e){if(!t)return e;var n=W(t);return 0!==e.pathname.indexOf(n)?e:f({},e,{pathname:e.pathname.substr(n.length)})}function z(t){return"string"==typeof t?t:b(t)}function J(t){return function(){g(!1)}}function G(){}var Y=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).handlePush=function(t){return e.navigateTo(t,"PUSH")},e.handleReplace=function(t){return e.navigateTo(t,"REPLACE")},e.handleListen=function(){return G},e.handleBlock=function(){return G},e}Object(p.a)(e,t);var n=e.prototype;return n.navigateTo=function(t,e){var n=this.props,r=n.basename,o=void 0===r?"":r,i=n.context,a=void 0===i?{}:i;a.action=e,a.location=function(t,e){return t?f({},e,{pathname:W(t)+e.pathname}):e}(o,x(t)),a.url=z(a.location)},n.render=function(){var t=this.props,e=t.basename,n=void 0===e?"":e,r=t.context,o=void 0===r?{}:r,a=t.location,c=void 0===a?"/":a,u=P(t,["basename","context","location"]),s={createHref:function(t){return W(n+z(t))},action:"POP",location:V(n,x(c)),push:this.handlePush,replace:this.handleReplace,go:J(),goBack:J(),goForward:J(),listen:this.handleListen,block:this.handleBlock};return i.a.createElement(_,f({},u,{history:s,staticContext:o}))},e}(i.a.Component);var K=function(t){function e(){return t.apply(this,arguments)||this}return Object(p.a)(e,t),e.prototype.render=function(){var t=this;return i.a.createElement($.Consumer,null,(function(e){e||g(!1);var n,r,o=t.props.location||e.location;return i.a.Children.forEach(t.props.children,(function(t){if(null==r&&i.a.isValidElement(t)){n=t;var a=t.props.path||t.props.from;r=a?H(o.pathname,f({},t.props,{path:a})):e.match}})),r?i.a.cloneElement(n,{location:o,computedMatch:r}):null}))},e}(i.a.Component);function Q(t){var e="withRouter("+(t.displayName||t.name)+")",n=function(e){var n=e.wrappedComponentRef,r=P(e,["wrappedComponentRef"]);return i.a.createElement($.Consumer,null,(function(e){return e||g(!1),i.a.createElement(t,f({},r,e,{ref:n}))}))};return n.displayName=e,n.WrappedComponent=t,k()(n,t)}var X=i.a.useContext;function Z(){return X(T)}function tt(){return X($).location}function et(){var t=X($).match;return t?t.params:{}}function nt(t){var e=tt(),n=X($).match;return t?H(e.pathname,t):n}var rt=function(){return(rt=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}).apply(this,arguments)},ot=r,it={parseNumbers:!1,parseBooleans:!1},at={skipNull:!1,skipEmptyString:!1};e.default=function(t,e){var n,r,i=e||{},a=i.navigateMode,p=void 0===a?"push":a,f=i.parseOptions,l=i.stringifyOptions,h=rt(rt({},it),f),d=rt(rt({},at),l),y=ot.useLocation(),m=null===(n=ot.useHistory)||void 0===n?void 0:n.call(ot),v=null===(r=ot.useNavigate)||void 0===r?void 0:r.call(ot),g=c(),b=Object(o.useRef)("function"==typeof t?t():t||{}),x=Object(o.useMemo)((function(){return Object(s.parse)(y.search,h)}),[y.search]),O=Object(o.useMemo)((function(){return rt(rt({},b.current),x)}),[x]);return[O,u((function(t){var e="function"==typeof t?t(O):t;g(),m&&m[p]({hash:y.hash,search:Object(s.stringify)(rt(rt({},x),e),d)||"?"}),v&&v({hash:y.hash,search:Object(s.stringify)(rt(rt({},x),e),d)||"?"},{replace:"replace"===p})}))]}}])})); |
{ | ||
"name": "@ahooksjs/use-url-state", | ||
"version": "3.4.1", | ||
"version": "3.5.0", | ||
"description": "A hook that stores the state into url query parameters.", | ||
@@ -19,7 +19,4 @@ "main": "./lib/index.js", | ||
}, | ||
"scripts": { | ||
"build": "gulp && webpack-cli" | ||
}, | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.com/" | ||
"registry": "https://registry.npmjs.org/" | ||
}, | ||
@@ -39,3 +36,6 @@ "license": "MIT", | ||
}, | ||
"gitHead": "051a2ad3f159337d222b6c2657548d9a7e09415f" | ||
} | ||
"gitHead": "11f6ad571bd365c95ecb9409ca3050cbbfc9b34a", | ||
"scripts": { | ||
"build": "gulp && webpack-cli" | ||
} | ||
} |
@@ -18,3 +18,8 @@ # useUrlState | ||
``` | ||
Or with pnpm | ||
```bash | ||
pnpm add @ahooksjs/use-url-state | ||
``` | ||
## Example | ||
@@ -21,0 +26,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
40546
34
2