(self.webpackChunkui=self.webpackChunkui||[]).push([[20],{121:(e,t,n)=>{var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,l=c||s||Function("return this")(),f=Object.prototype.toString,d=Math.max,v=Math.min,g=function(){return l.Date.now()};function w(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(w(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=w(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=u.test(e);return n||a.test(e)?i(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,u,a,i,c,s=0,l=!1,f=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,u=o;return r=o=void 0,s=t,a=e.apply(u,n)}function m(e){var n=e-c;return void 0===c||n>=t||n<0||f&&e-s>=u}function k(){var e=g();if(m(e))return h(e);i=setTimeout(k,function(e){var n=t-(e-c);return f?v(n,u-(e-s)):n}(e))}function h(e){return i=void 0,p&&r?y(e):(r=o=void 0,a)}function C(){var e=g(),n=m(e);if(r=arguments,o=this,c=e,n){if(void 0===i)return function(e){return s=e,i=setTimeout(k,t),l?y(e):a}(c);if(f)return i=setTimeout(k,t),y(c)}return void 0===i&&(i=setTimeout(k,t)),a}return t=b(t)||0,w(n)&&(l=!!n.leading,u=(f="maxWait"in n)?d(b(n.maxWait)||0,t):u,p="trailing"in n?!!n.trailing:p),C.cancel=function(){void 0!==i&&clearTimeout(i),s=0,r=c=o=i=void 0},C.flush=function(){return void 0===i?a:h(g())},C}},62:(e,t,n)=>{"use strict";n.d(t,{a:()=>a,b:()=>s});var r=n(24);n(121);var o="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function u(e,t,n,u){const a=(0,r.useRef)(t);o((()=>{a.current=t}),[t]),(0,r.useEffect)((()=>{const t=(null==n?void 0:n.current)??window;if(!t||!t.addEventListener)return;const r=e=>{a.current(e)};return t.addEventListener(e,r,u),()=>{t.removeEventListener(e,r,u)}}),[e,n,u])}function a({countStart:e,countStop:t=0,intervalMs:n=1e3,isIncrement:u=!1}){const{count:a,increment:i,decrement:c,reset:s}=function(e){const[t,n]=(0,r.useState)(e??0);return{count:t,increment:(0,r.useCallback)((()=>{n((e=>e+1))}),[]),decrement:(0,r.useCallback)((()=>{n((e=>e-1))}),[]),reset:(0,r.useCallback)((()=>{n(e??0)}),[e]),setCount:n}}(e),{value:l,setTrue:f,setFalse:d}=function(e=!1){if("boolean"!=typeof e)throw new Error("defaultValue must be `true` or `false`");const[t,n]=(0,r.useState)(e),o=(0,r.useCallback)((()=>{n(!0)}),[]),u=(0,r.useCallback)((()=>{n(!1)}),[]),a=(0,r.useCallback)((()=>{n((e=>!e))}),[]);return{value:t,setValue:n,setTrue:o,setFalse:u,toggle:a}}(!1),v=(0,r.useCallback)((()=>{d(),s()}),[d,s]);return function(e,t){const n=(0,r.useRef)(e);o((()=>{n.current=e}),[e]),(0,r.useEffect)((()=>{if(null===t)return;const e=setInterval((()=>{n.current()}),t);return()=>{clearInterval(e)}}),[t])}((0,r.useCallback)((()=>{a!==t?u?i():c():d()}),[a,t,c,i,u,d]),l?n:null),[a,{startCountdown:f,stopCountdown:d,resetCountdown:v}]}function i(e){const t=(0,r.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return o((()=>{t.current=e}),[e]),(0,r.useCallback)(((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[t])}var c="undefined"==typeof window;function s(e,t,n={}){const{initializeWithValue:o=!0}=n,a=(0,r.useCallback)((e=>n.serializer?n.serializer(e):JSON.stringify(e)),[n]),s=(0,r.useCallback)((e=>{if(n.deserializer)return n.deserializer(e);if("undefined"===e)return;const r=t instanceof Function?t():t;let o;try{o=JSON.parse(e)}catch(e){return console.error("Error parsing JSON:",e),r}return o}),[n,t]),l=(0,r.useCallback)((()=>{const n=t instanceof Function?t():t;if(c)return n;try{const t=window.localStorage.getItem(e);return t?s(t):n}catch(t){return console.warn(`Error reading localStorage key “${e}”:`,t),n}}),[t,e,s]),[f,d]=(0,r.useState)((()=>o?l():t instanceof Function?t():t)),v=i((t=>{c&&console.warn(`Tried setting localStorage key “${e}” even though environment is not a client`);try{const n=t instanceof Function?t(l()):t;window.localStorage.setItem(e,a(n)),d(n),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(t){console.warn(`Error setting localStorage key “${e}”:`,t)}})),g=i((()=>{c&&console.warn(`Tried removing localStorage key “${e}” even though environment is not a client`);const n=t instanceof Function?t():t;window.localStorage.removeItem(e),d(n),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}));(0,r.useEffect)((()=>{d(l())}),[e]);const w=(0,r.useCallback)((t=>{t.key&&t.key!==e||d(l())}),[e,l]);return u("storage",w),u("local-storage",w),[f,v,g]}}}]);