UNPKG

sports-widget

Version:

Sports Widgets is available as an npm package and can be used across multiple sites to display data for different Sports events.

26 lines 1.13 MB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Lib={},e.React)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}var a=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,n=e||function(){};return this.listeners.push(n),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==n})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}();function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l="undefined"==typeof window;function u(){}function c(e){return"number"==typeof e&&e>=0&&e!==1/0}function f(e){return Array.isArray(e)?e:[e]}function d(e,t){return e.filter((function(e){return-1===t.indexOf(e)}))}function p(e,t){return Math.max(e+(t||0)-Date.now(),0)}function h(e,t,n){return E(e)?"function"==typeof t?s({},n,{queryKey:e,queryFn:t}):s({},t,{queryKey:e}):e}function v(e,t,n){return E(e)?[s({},t,{queryKey:e}),n]:[e||{},t]}function m(e,t){var n=e.active,r=e.exact,o=e.fetching,i=e.inactive,a=e.predicate,s=e.queryKey,l=e.stale;if(E(s))if(r){if(t.queryHash!==y(s,t.options))return!1}else if(!x(t.queryKey,s))return!1;var u=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(n,i);if("none"===u)return!1;if("all"!==u){var c=t.isActive();if("active"===u&&!c)return!1;if("inactive"===u&&c)return!1}return("boolean"!=typeof l||t.isStale()===l)&&(("boolean"!=typeof o||t.isFetching()===o)&&!(a&&!a(t)))}function g(e,t){var n=e.exact,r=e.fetching,o=e.predicate,i=e.mutationKey;if(E(i)){if(!t.options.mutationKey)return!1;if(n){if(b(t.options.mutationKey)!==b(i))return!1}else if(!x(t.options.mutationKey,i))return!1}return("boolean"!=typeof r||"loading"===t.state.status===r)&&!(o&&!o(t))}function y(e,t){return((null==t?void 0:t.queryKeyHashFn)||b)(e)}function b(e){var t,n=f(e);return t=n,JSON.stringify(t,(function(e,t){return k(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))}function x(e,t){return w(f(e),f(t))}function w(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((function(n){return!w(e[n],t[n])})))}function C(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||k(e)&&k(t)){for(var r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,a=n?[]:{},s=0,l=0;l<i;l++){var u=n?l:o[l];a[u]=C(e[u],t[u]),a[u]===e[u]&&s++}return r===i&&s===r?e:a}return t}function k(e){if(!S(e))return!1;var t=e.constructor;if(void 0===t)return!0;var n=t.prototype;return!!S(n)&&!!n.hasOwnProperty("isPrototypeOf")}function S(e){return"[object Object]"===Object.prototype.toString.call(e)}function E(e){return"string"==typeof e||Array.isArray(e)}function _(e){Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}var O=new(function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.onSubscribe=function(){this.removeEventListener||this.setDefaultEventListener()},n.setEventListener=function(e){var t=this;this.removeEventListener&&this.removeEventListener(),this.removeEventListener=e((function(e){"boolean"==typeof e?t.setFocused(e):t.onFocus()}))},n.setFocused=function(e){this.focused=e,e&&this.onFocus()},n.onFocus=function(){this.listeners.forEach((function(e){e()}))},n.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},n.setDefaultEventListener=function(){var e;!l&&(null==(e=window)?void 0:e.addEventListener)&&this.setEventListener((function(e){var t=function(){return e()};return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),function(){window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}))},t}(a)),j=new(function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.onSubscribe=function(){this.removeEventListener||this.setDefaultEventListener()},n.setEventListener=function(e){var t=this;this.removeEventListener&&this.removeEventListener(),this.removeEventListener=e((function(e){"boolean"==typeof e?t.setOnline(e):t.onOnline()}))},n.setOnline=function(e){this.online=e,e&&this.onOnline()},n.onOnline=function(){this.listeners.forEach((function(e){e()}))},n.isOnline=function(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine},n.setDefaultEventListener=function(){var e;!l&&(null==(e=window)?void 0:e.addEventListener)&&this.setEventListener((function(e){var t=function(){return e()};return window.addEventListener("online",t,!1),window.addEventListener("offline",t,!1),function(){window.removeEventListener("online",t),window.removeEventListener("offline",t)}}))},t}(a));function P(e){return Math.min(1e3*Math.pow(2,e),3e4)}function T(e){return"function"==typeof(null==e?void 0:e.cancel)}var L=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function R(e){return e instanceof L}var V=function(e){var t,n,r,o,i=this,a=!1;this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){a=!0},this.continue=function(){return null==n?void 0:n()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise((function(e,t){r=e,o=t}));var s=function(t){i.isResolved||(i.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==n||n(),r(t))},l=function(t){i.isResolved||(i.isResolved=!0,null==e.onError||e.onError(t),null==n||n(),o(t))};!function r(){if(!i.isResolved){var o;try{o=e.fn()}catch(e){o=Promise.reject(e)}t=function(e){if(!i.isResolved&&(l(new L(e)),T(o)))try{o.cancel()}catch(e){}},i.isTransportCancelable=T(o),Promise.resolve(o).then(s).catch((function(t){var o,s;if(!i.isResolved){var u,c=null!=(o=e.retry)?o:3,f=null!=(s=e.retryDelay)?s:P,d="function"==typeof f?f(i.failureCount,t):f,p=!0===c||"number"==typeof c&&i.failureCount<c||"function"==typeof c&&c(i.failureCount,t);if(!a&&p)i.failureCount++,null==e.onFail||e.onFail(i.failureCount,t),(u=d,new Promise((function(e){setTimeout(e,u)}))).then((function(){if(!O.isFocused()||!j.isOnline())return new Promise((function(t){n=t,i.isPaused=!0,null==e.onPause||e.onPause()})).then((function(){n=void 0,i.isPaused=!1,null==e.onContinue||e.onContinue()}))})).then((function(){a?l(t):r()}));else l(t)}}))}}()},D=new(function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){this.transactions++;var t=e();return this.transactions--,this.transactions||this.flush(),t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):_((function(){t.notifyFn(e)}))},t.batchCalls=function(e){var t=this;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];t.schedule((function(){e.apply(void 0,r)}))}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&_((function(){e.batchNotifyFn((function(){t.forEach((function(t){e.notifyFn(t)}))}))}))},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}()),H=console||{error:u,warn:u,log:u};function M(){return H}var A=function(){function e(e){this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=s({},this.defaultOptions,e),this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e=this;this.clearGcTimeout(),c(this.cacheTime)&&(this.gcTimeout=setTimeout((function(){e.optionalRemove()}),this.cacheTime))},t.clearGcTimeout=function(){clearTimeout(this.gcTimeout),this.gcTimeout=void 0},t.optionalRemove=function(){this.observers.length||this.state.isFetching||this.cache.remove(this)},t.setData=function(e,t){var n,r,o=this.state.data,i=function(e,t){return"function"==typeof e?e(t):e}(e,o);return(null==(n=(r=this.options).isDataEqual)?void 0:n.call(r,o,i))?i=o:!1!==this.options.structuralSharing&&(i=C(o,i)),this.dispatch({data:i,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),i},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(u).catch(u):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some((function(e){return!1!==e.options.enabled}))},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((function(e){return e.getCurrentResult().isStale}))},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!p(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnWindowFocus()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnReconnect()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((function(t){return t!==e})),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var n,r,o=this;if(this.state.isFetching)if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise)return this.promise;if(e&&this.setOptions(e),!this.options.queryFn){var i=this.observers.find((function(e){return e.options.queryFn}));i&&this.setOptions(i.options)}var a,s,l=f(this.queryKey),u={queryKey:l,pageParam:void 0},c={fetchOptions:t,options:this.options,queryKey:l,state:this.state,fetchFn:function(){return o.options.queryFn?o.options.queryFn(u):Promise.reject("Missing queryFn")}};(null==(n=this.options.behavior)?void 0:n.onFetch)&&(null==(a=this.options.behavior)||a.onFetch(c));(this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(r=c.fetchOptions)?void 0:r.meta))||this.dispatch({type:"fetch",meta:null==(s=c.fetchOptions)?void 0:s.meta});return this.retryer=new V({fn:c.fetchFn,onSuccess:function(e){o.setData(e),0===o.cacheTime&&o.optionalRemove()},onError:function(e){R(e)&&e.silent||o.dispatch({type:"error",error:e}),R(e)||(o.cache.config.onError&&o.cache.config.onError(e,o),M().error(e)),0===o.cacheTime&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),D.batch((function(){t.observers.forEach((function(t){t.onQueryUpdate(e)})),t.cache.notify({query:t,type:"queryUpdated",action:e})}))},t.getDefaultState=function(e){var t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==e.initialData?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,r=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:r?"success":"idle"}},t.reducer=function(e,t){var n,r;switch(t.type){case"failed":return s({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return s({},e,{isPaused:!0});case"continue":return s({},e,{isPaused:!1});case"fetch":return s({},e,{fetchFailureCount:0,fetchMeta:null!=(n=t.meta)?n:null,isFetching:!0,isPaused:!1,status:e.dataUpdatedAt?e.status:"loading"});case"success":return s({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(r=t.dataUpdatedAt)?r:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var o=t.error;return R(o)&&o.revert&&this.revertState?s({},this.revertState):s({},e,{error:o,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return s({},e,{isInvalidated:!0});case"setState":return s({},e,t.state);default:return e}},e}(),I=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.queries=[],n.queriesMap={},n}i(t,e);var n=t.prototype;return n.build=function(e,t,n){var r,o=t.queryKey,i=null!=(r=t.queryHash)?r:y(o,t),a=this.get(i);return a||(a=new A({cache:this,queryKey:o,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o)}),this.add(a)),a},n.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},n.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((function(t){return t!==e})),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},n.clear=function(){var e=this;D.batch((function(){e.queries.forEach((function(t){e.remove(t)}))}))},n.get=function(e){return this.queriesMap[e]},n.getAll=function(){return this.queries},n.find=function(e,t){var n=v(e,t)[0];return void 0===n.exact&&(n.exact=!0),this.queries.find((function(e){return m(n,e)}))},n.findAll=function(e,t){var n=v(e,t)[0];return n?this.queries.filter((function(e){return m(n,e)})):this.queries},n.notify=function(e){var t=this;D.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){var e=this;D.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},n.onOnline=function(){var e=this;D.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(a),N=function(){function e(e){this.options=s({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(u).catch(u)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,n="loading"===this.state.status,r=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),r=r.then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),r.then((function(){return t.executeMutation()})).then((function(t){e=t})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return t.mutationCache.config.onError&&t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),M().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new V({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return s({},e,{failureCount:e.failureCount+1});case"pause":return s({},e,{isPaused:!0});case"continue":return s({},e,{isPaused:!1});case"loading":return s({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return s({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return s({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return s({},e,t.state);default:return e}}(this.state,e),D.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}();var F=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}i(t,e);var n=t.prototype;return n.build=function(e,t,n){var r=new N({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(r),r},n.add=function(e){this.mutations.push(e),this.notify(e)},n.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},n.clear=function(){var e=this;D.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},n.getAll=function(){return this.mutations},n.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((function(t){return g(e,t)}))},n.findAll=function(e){return this.mutations.filter((function(t){return g(e,t)}))},n.notify=function(e){var t=this;D.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return D.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(u)}))}),Promise.resolve())}))},t}(a);function z(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}var U=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new I,this.mutationCache=e.mutationCache||new F,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=O.subscribe((function(){O.isFocused()&&j.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=j.subscribe((function(){O.isFocused()&&j.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var n=v(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll(s({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data},t.setQueryData=function(e,t,n){var r=h(e),o=this.defaultQueryOptions(r);return this.queryCache.build(this,o).setData(t,n)},t.setQueriesData=function(e,t,n){var r=this;return D.batch((function(){return r.getQueryCache().findAll(e).map((function(e){var o=e.queryKey;return[o,r.setQueryData(o,t,n)]}))}))},t.getQueryState=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state},t.removeQueries=function(e,t){var n=v(e,t)[0],r=this.queryCache;D.batch((function(){r.findAll(n).forEach((function(e){r.remove(e)}))}))},t.resetQueries=function(e,t,n){var r=this,o=v(e,t,n),i=o[0],a=o[1],l=this.queryCache,u=s({},i,{active:!0});return D.batch((function(){return l.findAll(i).forEach((function(e){e.reset()})),r.refetchQueries(u,a)}))},t.cancelQueries=function(e,t,n){var r=this,o=v(e,t,n),i=o[0],a=o[1],s=void 0===a?{}:a;void 0===s.revert&&(s.revert=!0);var l=D.batch((function(){return r.queryCache.findAll(i).map((function(e){return e.cancel(s)}))}));return Promise.all(l).then(u).catch(u)},t.invalidateQueries=function(e,t,n){var r,o,i,a=this,l=v(e,t,n),u=l[0],c=l[1],f=s({},u,{active:null==(r=null!=(o=u.refetchActive)?o:u.active)||r,inactive:null!=(i=u.refetchInactive)&&i});return D.batch((function(){return a.queryCache.findAll(u).forEach((function(e){e.invalidate()})),a.refetchQueries(f,c)}))},t.refetchQueries=function(e,t,n){var r=this,o=v(e,t,n),i=o[0],a=o[1],s=D.batch((function(){return r.queryCache.findAll(i).map((function(e){return e.fetch()}))})),l=Promise.all(s).then(u);return(null==a?void 0:a.throwOnError)||(l=l.catch(u)),l},t.fetchQuery=function(e,t,n){var r=h(e,t,n),o=this.defaultQueryOptions(r);void 0===o.retry&&(o.retry=!1);var i=this.queryCache.build(this,o);return i.isStaleByTime(o.staleTime)?i.fetch(o):Promise.resolve(i.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(u).catch(u)},t.fetchInfiniteQuery=function(e,t,n){var r=h(e,t,n);return r.behavior={onFetch:function(e){e.fetchFn=function(){var t,n,r,o,i,a,s,l=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.fetchMore,u=null==l?void 0:l.pageParam,c="forward"===(null==l?void 0:l.direction),f="backward"===(null==l?void 0:l.direction),d=(null==(r=e.state.data)?void 0:r.pages)||[],p=(null==(o=e.state.data)?void 0:o.pageParams)||[],h=p,v=!1,m=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},g=function(t,n,r,o){if(v)return Promise.reject("Cancelled");if(void 0===r&&!n&&t.length)return Promise.resolve(t);var i={queryKey:e.queryKey,pageParam:r},a=m(i),s=Promise.resolve(a).then((function(e){return h=o?[r].concat(h):[].concat(h,[r]),o?[e].concat(t):[].concat(t,[e])}));return T(a)&&(s.cancel=a.cancel),s};if(d.length)if(c){var y=void 0!==u,b=y?u:z(e.options,d);i=g(d,y,b)}else if(f){var x=void 0!==u,w=x?u:(a=e.options,s=d,null==a.getPreviousPageParam?void 0:a.getPreviousPageParam(s[0],s));i=g(d,x,w,!0)}else!function(){h=[];var t=void 0===e.options.getNextPageParam;i=g([],t,p[0]);for(var n=function(n){i=i.then((function(r){var o=t?p[n]:z(e.options,r);return g(r,t,o)}))},r=1;r<d.length;r++)n(r)}();else i=g([]);var C=i.then((function(e){return{pages:e,pageParams:h}}));return C.cancel=function(){v=!0,T(i)&&i.cancel()},C}}},this.fetchQuery(r)},t.prefetchInfiniteQuery=function(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(u).catch(u)},t.cancelMutations=function(){var e=this,t=D.batch((function(){return e.mutationCache.getAll().map((function(e){return e.cancel()}))}));return Promise.all(t).then(u).catch(u)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var n=this.queryDefaults.find((function(t){return b(e)===b(t.queryKey)}));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find((function(t){return x(e,t.queryKey)})))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var n=this.mutationDefaults.find((function(t){return b(e)===b(t.mutationKey)}));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find((function(t){return x(e,t.mutationKey)})))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=s({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=y(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:s({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}(),Z=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.options=n,r.trackedProps=[],r.previousSelectError=null,r.bindMethods(),r.setOptions(n),r}i(t,e);var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){1===this.listeners.length&&(this.currentQuery.addObserver(this),W(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return e=this.currentQuery,!1!==(t=this.options).enabled&&("always"===t.refetchOnReconnect||!1!==t.refetchOnReconnect&&q(e,t));var e,t},n.shouldFetchOnWindowFocus=function(){return e=this.currentQuery,!1!==(t=this.options).enabled&&("always"===t.refetchOnWindowFocus||!1!==t.refetchOnWindowFocus&&q(e,t));var e,t},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(e,t){var n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();var o=this.hasListeners();o&&B(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!o||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout(),!o||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.refetchInterval===n.refetchInterval||this.updateRefetchInterval()},n.getOptimisticResult=function(e){var t=this.client.defaultQueryObserverOptions(e),n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(e){var t=this,n={};return Object.keys(e).forEach((function(r){Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:function(){var n=r;return t.trackedProps.includes(n)||t.trackedProps.push(n),e[n]}})})),n},n.getNextResult=function(e){var t=this;return new Promise((function(n,r){var o=t.subscribe((function(t){t.isFetching||(o(),t.isError&&(null==e?void 0:e.throwOnError)?r(t.error):n(t))}))}))},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(e){return this.fetch(e)},n.fetchOptimistic=function(e){var t=this,n=this.client.defaultQueryObserverOptions(e),r=this.client.getQueryCache().build(this.client,n);return r.fetch().then((function(){return t.createResult(r,n)}))},n.fetch=function(e){var t=this;return this.executeFetch(e).then((function(){return t.updateResult(),t.currentResult}))},n.executeFetch=function(e){this.updateQuery();var t=this.currentQuery.fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(u)),t},n.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!l&&!this.currentResult.isStale&&c(this.options.staleTime)){var t=p(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((function(){e.currentResult.isStale||e.updateResult()}),t)}},n.updateRefetchInterval=function(){var e=this;this.clearRefetchInterval(),!l&&!1!==this.options.enabled&&c(this.options.refetchInterval)&&(this.refetchIntervalId=setInterval((function(){(e.options.refetchIntervalInBackground||O.isFocused())&&e.executeFetch()}),this.options.refetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval()},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0},n.clearRefetchInterval=function(){clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0},n.createResult=function(e,t){var n,r=this.currentQuery,o=this.options,i=this.currentResult,a=this.currentResultState,s=this.currentResultOptions,l=e!==r,u=l?e.state:this.currentQueryInitialState,c=l?this.currentResult:this.previousQueryResult,f=e.state,d=f.dataUpdatedAt,p=f.error,h=f.errorUpdatedAt,v=f.isFetching,m=f.status,g=!1,y=!1;if(t.optimisticResults){var b=this.hasListeners(),x=!b&&W(e,t),w=b&&B(e,r,t,o);(x||w)&&(v=!0,d||(m="loading"))}if(t.keepPreviousData&&!f.dataUpdateCount&&(null==c?void 0:c.isSuccess)&&"error"!==m)n=c.data,d=c.dataUpdatedAt,m=c.status,g=!0;else if(t.select&&void 0!==f.data)if(i&&f.data===(null==a?void 0:a.data)&&t.select===(null==s?void 0:s.select)&&!this.previousSelectError)n=i.data;else try{n=t.select(f.data),!1!==t.structuralSharing&&(n=C(null==i?void 0:i.data,n)),this.previousSelectError=null}catch(e){M().error(e),p=e,this.previousSelectError=e,h=Date.now(),m="error"}else n=f.data;if(void 0!==t.placeholderData&&void 0===n&&"loading"===m){var k;if((null==i?void 0:i.isPlaceholderData)&&t.placeholderData===(null==s?void 0:s.placeholderData))k=i.data;else if(k="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==k)try{k=t.select(k),!1!==t.structuralSharing&&(k=C(null==i?void 0:i.data,k)),this.previousSelectError=null}catch(e){M().error(e),p=e,this.previousSelectError=e,h=Date.now(),m="error"}void 0!==k&&(m="success",n=k,y=!0)}return{status:m,isLoading:"loading"===m,isSuccess:"success"===m,isError:"error"===m,isIdle:"idle"===m,data:n,dataUpdatedAt:d,error:p,errorUpdatedAt:h,failureCount:f.fetchFailureCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:v,isLoadingError:"error"===m&&0===f.dataUpdatedAt,isPlaceholderData:y,isPreviousData:g,isRefetchError:"error"===m&&0!==f.dataUpdatedAt,isStale:q(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;if(e===t)return!1;var n=this.options,r=n.notifyOnChangeProps,o=n.notifyOnChangePropsExclusions;if(!r&&!o)return!0;if("tracked"===r&&!this.trackedProps.length)return!0;var i="tracked"===r?this.trackedProps:r;return Object.keys(e).some((function(n){var r=n,a=e[r]!==t[r],s=null==i?void 0:i.some((function(e){return e===n})),l=null==o?void 0:o.some((function(e){return e===n}));return a&&!l&&(!i||s)}))},n.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!function(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(this.currentResult,t)){var n={cache:!0};!1!==(null==e?void 0:e.listeners)&&this.shouldNotifyListeners(this.currentResult,t)&&(n.listeners=!0),this.notify(s({},n,e))}},n.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},n.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||R(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;D.batch((function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)})),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})}))},t}(a);function W(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||function(e,t){return!1!==t.enabled&&e.state.dataUpdatedAt>0&&("always"===t.refetchOnMount||!1!==t.refetchOnMount&&q(e,t))}(e,t)}function B(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&q(e,n)}function q(e,t){return e.isStaleByTime(t.staleTime)}var $=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.queries=[],r.result=[],r.observers=[],r.observersMap={},n&&r.setQueries(n),r}i(t,e);var n=t.prototype;return n.onSubscribe=function(){var e=this;1===this.listeners.length&&this.observers.forEach((function(t){t.subscribe((function(n){e.onUpdate(t,n)}))}))},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.destroy=function(){this.listeners=[],this.observers.forEach((function(e){e.destroy()}))},n.setQueries=function(e,t){this.queries=e,this.updateObservers(t)},n.getCurrentResult=function(){return this.result},n.getOptimisticResult=function(e){var t=this;return e.map((function(e){var n=t.client.defaultQueryObserverOptions(e);return t.getObserver(n).getOptimisticResult(n)}))},n.getObserver=function(e){var t=this.client.defaultQueryObserverOptions(e);return this.observersMap[t.queryHash]||new Z(this.client,t)},n.updateObservers=function(e){var t=this;D.batch((function(){var n=!1,r=t.observers,o=t.observersMap,i=[],a=[],s={};t.queries.forEach((function(l,u){var c=t.client.defaultQueryObserverOptions(l),f=c.queryHash,d=t.getObserver(c);o[f]&&d.setOptions(c,e),d!==r[u]&&(n=!0),a.push(d),i.push(d.getCurrentResult()),s[f]=d})),(r.length!==a.length||n)&&(t.observers=a,t.observersMap=s,t.result=i,t.hasListeners()&&(d(r,a).forEach((function(e){e.destroy()})),d(a,r).forEach((function(e){e.subscribe((function(n){t.onUpdate(e,n)}))})),t.notify()))}))},n.onUpdate=function(e,t){var n=this.observers.indexOf(e);-1!==n&&(this.result=function(e,t,n){var r=e.slice(0);return r[t]=n,r}(this.result,n,t),this.notify())},n.notify=function(){var e=this;D.batch((function(){e.listeners.forEach((function(t){t(e.result)}))}))},t}(a);function G(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}var Q={exports:{}},Y={},K=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;function ee(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var te=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,o=ee(e),i=1;i<arguments.length;i++){for(var a in n=Object(arguments[i]))X.call(n,a)&&(o[a]=n[a]);if(K){r=K(n);for(var s=0;s<r.length;s++)J.call(n,r[s])&&(o[r[s]]=n[r[s]])}}return o},ne={exports:{}},re={}; /** @license React v0.20.2 * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ !function(e){var t,n,r,o;if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,u=null,c=function(){if(null!==l)try{var t=e.unstable_now();l(!0,t),l=null}catch(e){throw setTimeout(c,0),e}};t=function(e){null!==l?setTimeout(t,0,e):(l=e,setTimeout(c,0))},n=function(e,t){u=setTimeout(e,t)},r=function(){clearTimeout(u)},e.unstable_shouldYield=function(){return!1},o=e.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,d=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var h=!1,v=null,m=-1,g=5,y=0;e.unstable_shouldYield=function(){return e.unstable_now()>=y},o=function(){},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):g=0<e?Math.floor(1e3/e):5};var b=new MessageChannel,x=b.port2;b.port1.onmessage=function(){if(null!==v){var t=e.unstable_now();y=t+g;try{v(!0,t)?x.postMessage(null):(h=!1,v=null)}catch(e){throw x.postMessage(null),e}}else h=!1},t=function(e){v=e,h||(h=!0,x.postMessage(null))},n=function(t,n){m=f((function(){t(e.unstable_now())}),n)},r=function(){d(m),m=-1}}function w(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<S(o,t)))break e;e[r]=t,e[n]=o,n=r}}function C(e){return void 0===(e=e[0])?null:e}function k(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,l=e[s];if(void 0!==a&&0>S(a,n))void 0!==l&&0>S(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==l&&0>S(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function S(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var E=[],_=[],O=1,j=null,P=3,T=!1,L=!1,R=!1;function V(e){for(var t=C(_);null!==t;){if(null===t.callback)k(_);else{if(!(t.startTime<=e))break;k(_),t.sortIndex=t.expirationTime,w(E,t)}t=C(_)}}function D(e){if(R=!1,V(e),!L)if(null!==C(E))L=!0,t(H);else{var r=C(_);null!==r&&n(D,r.startTime-e)}}function H(t,o){L=!1,R&&(R=!1,r()),T=!0;var i=P;try{for(V(o),j=C(E);null!==j&&(!(j.expirationTime>o)||t&&!e.unstable_shouldYield());){var a=j.callback;if("function"==typeof a){j.callback=null,P=j.priorityLevel;var s=a(j.expirationTime<=o);o=e.unstable_now(),"function"==typeof s?j.callback=s:j===C(E)&&k(E),V(o)}else k(E);j=C(E)}if(null!==j)var l=!0;else{var u=C(_);null!==u&&n(D,u.startTime-o),l=!1}return l}finally{j=null,P=i,T=!1}}var M=o;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){L||T||(L=!0,t(H))},e.unstable_getCurrentPriorityLevel=function(){return P},e.unstable_getFirstCallbackNode=function(){return C(E)},e.unstable_next=function(e){switch(P){case 1:case 2:case 3:var t=3;break;default:t=P}var n=P;P=t;try{return e()}finally{P=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=M,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=P;P=e;try{return t()}finally{P=n}},e.unstable_scheduleCallback=function(o,i,a){var s=e.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?s+a:s:a=s,o){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return o={id:O++,callback:i,priorityLevel:o,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>s?(o.sortIndex=a,w(_,o),null===C(E)&&o===C(_)&&(R?r():R=!0,n(D,a-s))):(o.sortIndex=l,w(E,o),L||T||(L=!0,t(H))),o},e.unstable_wrapCallback=function(e){var t=P;return function(){var n=P;P=t;try{return e.apply(this,arguments)}finally{P=n}}}}(re);var oe={}; /** @license React v0.20.2 * scheduler.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */!function(e){"production"!==process.env.NODE_ENV&&function(){var t,n,r,o;if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,u=null,c=function(){if(null!==l)try{var t=e.unstable_now();l(!0,t),l=null}catch(e){throw setTimeout(c,0),e}};t=function(e){null!==l?setTimeout(t,0,e):(l=e,setTimeout(c,0))},n=function(e,t){u=setTimeout(e,t)},r=function(){clearTimeout(u)},e.unstable_shouldYield=function(){return!1},o=e.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,d=window.clearTimeout;if("undefined"!=typeof console){var p=window.requestAnimationFrame,h=window.cancelAnimationFrame;"function"!=typeof p&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var v=!1,m=null,g=-1,y=5,b=0;e.unstable_shouldYield=function(){return e.unstable_now()>=b},o=function(){},e.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):y=e>0?Math.floor(1e3/e):5};var x=new MessageChannel,w=x.port2;x.port1.onmessage=function(){if(null!==m){var t=e.unstable_now();b=t+y;try{m(!0,t)?w.postMessage(null):(v=!1,m=null)}catch(e){throw w.postMessage(null),e}}else v=!1},t=function(e){m=e,v||(v=!0,w.postMessage(null))},n=function(t,n){g=f((function(){t(e.unstable_now())}),n)},r=function(){d(g),g=-1}}function C(e,t){var n=e.length;e.push(t),function(e,t,n){var r=n;for(;;){var o=r-1>>>1,i=e[o];if(!(void 0!==i&&E(i,t)>0))return;e[o]=t,e[r]=i,r=o}}(e,t,n)}function k(e){var t=e[0];return void 0===t?null:t}function S(e){var t=e[0];if(void 0!==t){var n=e.pop();return n!==t&&(e[0]=n,function(e,t,n){var r=n,o=e.length;for(;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,l=e[s];if(void 0!==a&&E(a,t)<0)void 0!==l&&E(l,a)<0?(e[r]=l,e[s]=t,r=s):(e[r]=a,e[i]=t,r=i);else{if(!(void 0!==l&&E(l,t)<0))return;e[r]=l,e[s]=t,r=s}}}(e,n,0)),t}return null}function E(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var _=[],O=[],j=1,P=null,T=3,L=!1,R=!1,V=!1;function D(e){for(var t=k(O);null!==t;){if(null===t.callback)S(O);else{if(!(t.startTime<=e))return;S(O),t.sortIndex=t.expirationTime,C(_,t)}t=k(O)}}function H(e){if(V=!1,D(e),!R)if(null!==k(_))R=!0,t(M);else{var r=k(O);null!==r&&n(H,r.startTime-e)}}function M(t,o){R=!1,V&&(V=!1,r()),L=!0;var i=T;try{return function(t,r){var o=r;D(o),P=k(_);for(;null!==P&&(!(P.expirationTime>o)||t&&!e.unstable_shouldYield());){var i=P.callback;if("function"==typeof i){P.callback=null,T=P.priorityLevel;var a=i(P.expirationTime<=o);o=e.unstable_now(),"function"==typeof a?P.callback=a:P===k(_)&&S(_),D(o)}else S(_);P=k(_)}if(null!==P)return!0;var s=k(O);return null!==s&&n(H,s.startTime-o),!1}(t,o)}finally{P=null,T=i,L=!1}}var A=o;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){R||L||(R=!0,t(M))},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return k(_)},e.unstable_next=function(e){var t;switch(T){case 1:case 2:case 3:t=3;break;default:t=T}var n=T;T=t;try{return e()}finally{T=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=A,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=T;T=e;try{return t()}finally{T=n}},e.unstable_scheduleCallback=function(o,i,a){var s,l,u=e.unstable_now();if("object"==typeof a&&null!==a){var c=a.delay;s="number"==typeof c&&c>0?u+c:u}else s=u;switch(o){case 1:l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;case 3:default:l=5e3}var f=s+l,d={id:j++,callback:i,priorityLevel:o,startTime:s,expirationTime:f,sortIndex:-1};return s>u?(d.sortIndex=s,C(O,d),null===k(_)&&d===k(O)&&(V?r():V=!0,n(H,s-u))):(d.sortIndex=f,C(_,d),R||L||(R=!0,t(M))),d},e.unstable_wrapCallback=function(e){var t=T;return function(){var n=T;T=t;try{return e.apply(this,arguments)}finally{T=n}}}}()}(oe),"production"===process.env.NODE_ENV?ne.exports=re:ne.exports=oe /** @license React v17.0.2 * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */;var ie=r.default,ae=te,se=ne.exports;function le(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!ie)throw Error(le(227));var ue=new Set,ce={};function fe(e,t){de(e,t),de(e+"Capture",t)}function de(e,t){for(ce[e]=t,e=0;e<t.length;e++)ue.add(t[e])}var pe=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),he=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ve=Object.prototype.hasOwnProperty,me={},ge={};function ye(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var be={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){be[e]=new ye(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];be[t]=new ye(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){be[e]=new ye(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){be[e]=new ye(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){be[e]=new ye(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){be[e]=new ye(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){be[e]=new ye(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){be[e]=new ye(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){be[e]=new ye(e,5,!1,e.toLowerCase(),null,!1,!1)}));var xe=/[\-:]([a-z])/g;function we(e){return e[1].toUpperCase()}function Ce(e,t,n,r){var o=be.hasOwnProperty(t)?be[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n