(self.webpackChunkui=self.webpackChunkui||[]).push([[13],{102:(e,t,n)=>{var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,u=/^0o[0-7]+$/i,s=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,a="object"==typeof self&&self&&self.Object===Object&&self,l=c||a||Function("return this")(),d=Object.prototype.toString,f=Math.max,g=Math.min,v=function(){return l.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function w(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||u.test(e)?s(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,i,u,s,c,a=0,l=!1,d=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,i=o;return r=o=void 0,a=t,u=e.apply(i,n)}function b(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-a>=i}function k(){var e=v();if(b(e))return S(e);s=setTimeout(k,function(e){var n=t-(e-c);return d?g(n,i-(e-a)):n}(e))}function S(e){return s=void 0,y&&r?p(e):(r=o=void 0,u)}function m(){var e=v(),n=b(e);if(r=arguments,o=this,c=e,n){if(void 0===s)return function(e){return a=e,s=setTimeout(k,t),l?p(e):u}(c);if(d)return s=setTimeout(k,t),p(c)}return void 0===s&&(s=setTimeout(k,t)),u}return t=w(t)||0,h(n)&&(l=!!n.leading,i=(d="maxWait"in n)?f(w(n.maxWait)||0,t):i,y="trailing"in n?!!n.trailing:y),m.cancel=function(){void 0!==s&&clearTimeout(s),a=0,r=c=o=s=void 0},m.flush=function(){return void 0===s?u:S(v())},m}},46:(e,t,n)=>{"use strict";var r=n(28);function o(e){return e&&e.__esModule?e:{default:e}}var i=o(n(102));function u(e=!1){if("boolean"!=typeof e)throw new Error("defaultValue must be `true` or `false`");const[t,n]=r.useState(e),o=r.useCallback((()=>{n(!0)}),[]),i=r.useCallback((()=>{n(!1)}),[]),u=r.useCallback((()=>{n((e=>!e))}),[]);return{value:t,setValue:n,setTrue:o,setFalse:i,toggle:u}}var s="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function c(e,t,n,o){const i=r.useRef(t);s((()=>{i.current=t}),[t]),r.useEffect((()=>{const t=(null==n?void 0:n.current)??window;if(!t||!t.addEventListener)return;const r=e=>{i.current(e)};return t.addEventListener(e,r,o),()=>{t.removeEventListener(e,r,o)}}),[e,n,o])}function a(e){const[t,n]=r.useState(e??0);return{count:t,increment:r.useCallback((()=>{n((e=>e+1))}),[]),decrement:r.useCallback((()=>{n((e=>e-1))}),[]),reset:r.useCallback((()=>{n(e??0)}),[e]),setCount:n}}function l(e,t){const n=r.useRef(e);s((()=>{n.current=e}),[e]),r.useEffect((()=>{if(null===t)return;const e=setInterval((()=>{n.current()}),t);return()=>{clearInterval(e)}}),[t])}function d(e){const t=r.useRef((()=>{throw new Error("Cannot call an event handler while rendering.")}));return s((()=>{t.current=e}),[e]),r.useCallback(((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[t])}var f="undefined"==typeof window;function g(e,t,n={}){const{initializeWithValue:o=!0}=n,i=r.useCallback((e=>n.serializer?n.serializer(e):JSON.stringify(e)),[n]),u=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]),s=r.useCallback((()=>{const n=t instanceof Function?t():t;if(f)return n;try{const t=window.localStorage.getItem(e);return t?u(t):n}catch(t){return console.warn(`Error reading localStorage key “${e}”:`,t),n}}),[t,e,u]),[a,l]=r.useState((()=>o?s():t instanceof Function?t():t)),g=d((t=>{f&&console.warn(`Tried setting localStorage key “${e}” even though environment is not a client`);try{const n=t instanceof Function?t(s()):t;window.localStorage.setItem(e,i(n)),l(n),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(t){console.warn(`Error setting localStorage key “${e}”:`,t)}})),v=d((()=>{f&&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),l(n),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}));r.useEffect((()=>{l(s())}),[e]);const h=r.useCallback((t=>{t.key&&t.key!==e||l(s())}),[e,s]);return c("storage",h),c("local-storage",h),[a,g,v]}var v="undefined"==typeof window;function h(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){const o=e=>v?t:window.matchMedia(e).matches,[i,u]=r.useState((()=>n?o(e):t));function c(){u(o(e))}return s((()=>{const t=window.matchMedia(e);return c(),t.addListener?t.addListener(c):t.addEventListener("change",c),()=>{t.removeListener?t.removeListener(c):t.removeEventListener("change",c)}}),[e]),i}var w="usehooks-ts-dark-mode";function y(e){const t=r.useRef(e);t.current=e,r.useEffect((()=>()=>{t.current()}),[])}function p(e,t=500,n){const o=r.useRef();y((()=>{o.current&&o.current.cancel()}));const u=r.useMemo((()=>{const r=i.default(e,t,n),u=(...e)=>r(...e);return u.cancel=()=>{r.cancel()},u.isPending=()=>!!o.current,u.flush=()=>r.flush(),u}),[e,t,n]);return r.useEffect((()=>{o.current=i.default(e,t,n)}),[e,t,n]),u}function b(){const e=r.useRef(!1);return r.useEffect((()=>(e.current=!0,()=>{e.current=!1})),[]),r.useCallback((()=>e.current),[])}var k="undefined"==typeof window,S={width:void 0,height:void 0};function m(e,t,n){return e[t]?Array.isArray(e[t])?e[t][0][n]:e[t][n]:"contentBoxSize"===t?e.contentRect["inlineSize"===n?"width":"height"]:void 0}var C="undefined"==typeof window,E=new Map,z="undefined"==typeof window,O="undefined"==typeof window,R="undefined"==typeof window;t.useBoolean=u,t.useClickAnyWhere=function(e){c("click",(t=>{e(t)}))},t.useCopyToClipboard=function(){const[e,t]=r.useState(null);return[e,r.useCallback((async e=>{if(!(null==navigator?void 0:navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(e),t(e),!0}catch(e){return console.warn("Copy failed",e),t(null),!1}}),[])]},t.useCountdown=function({countStart:e,countStop:t=0,intervalMs:n=1e3,isIncrement:o=!1}){const{count:i,increment:s,decrement:c,reset:d}=a(e),{value:f,setTrue:g,setFalse:v}=u(!1),h=r.useCallback((()=>{v(),d()}),[v,d]);return l(r.useCallback((()=>{i!==t?o?s():c():v()}),[i,t,c,s,o,v]),f?n:null),[i,{startCountdown:g,stopCountdown:v,resetCountdown:h}]},t.useCounter=a,t.useDarkMode=function(e={}){const{defaultValue:t,localStorageKey:n=w,initializeWithValue:r=!0}=e,o=h("(prefers-color-scheme: dark)",{initializeWithValue:r,defaultValue:t}),[i,u]=g(n,t??o??!1,{initializeWithValue:r});return s((()=>{o!==i&&u(o)}),[o]),{isDarkMode:i,toggle:()=>{u((e=>!e))},enable:()=>{u(!0)},disable:()=>{u(!1)},set:e=>{u(e)}}},t.useDebounceCallback=p,t.useDebounceValue=function(e,t,n){const o=(null==n?void 0:n.equalityFn)??((e,t)=>e===t),i=e instanceof Function?e():e,[u,s]=r.useState(i),c=r.useRef(i),a=p(s,t,n);return o(c.current,i)||(a(i),c.current=i),[u,a]},t.useDocumentTitle=function(e,t={}){const{preserveTitleOnUnmount:n=!0}=t,o=r.useRef(null);s((()=>{o.current=window.document.title}),[]),s((()=>{window.document.title=e}),[e]),y((()=>{!n&&o.current&&(window.document.title=o.current)}))},t.useEventCallback=d,t.useEventListener=c,t.useHover=function(e){const[t,n]=r.useState(!1);return c("mouseenter",(()=>{n(!0)}),e),c("mouseleave",(()=>{n(!1)}),e),t},t.useIntersectionObserver=function({threshold:e=0,root:t=null,rootMargin:n="0%",freezeOnceVisible:o=!1,initialIsIntersecting:i=!1,onChange:u}={}){var s;const[c,a]=r.useState(null),[l,d]=r.useState((()=>({isIntersecting:i,entry:void 0}))),f=r.useRef();f.current=u;const g=(null==(s=l.entry)?void 0:s.isIntersecting)&&o;r.useEffect((()=>{if(!c)return;if(!("IntersectionObserver"in window))return;if(g)return;let r;const i=new IntersectionObserver((e=>{const t=Array.isArray(i.thresholds)?i.thresholds:[i.thresholds];e.forEach((e=>{const n=e.isIntersecting&&t.some((t=>e.intersectionRatio>=t));d({isIntersecting:n,entry:e}),f.current&&f.current(n,e),n&&o&&r&&(r(),r=void 0)}))}),{threshold:e,root:t,rootMargin:n});return i.observe(c),()=>{i.disconnect()}}),[c,JSON.stringify(e),t,n,g,o]);const v=r.useRef(null);r.useEffect((()=>{var e;c||!(null==(e=l.entry)?void 0:e.target)||o||g||v.current===l.entry.target||(v.current=l.entry.target,d({isIntersecting:i,entry:void 0}))}),[c,l.entry,o,g,i]);const h=[a,!!l.isIntersecting,l.entry];return h.ref=h[0],h.isIntersecting=h[1],h.entry=h[2],h},t.useInterval=l,t.useIsClient=function(){const[e,t]=r.useState(!1);return r.useEffect((()=>{t(!0)}),[]),e},t.useIsMounted=b,t.useIsomorphicLayoutEffect=s,t.useLocalStorage=g,t.useMap=function(e=new Map){const[t,n]=r.useState(new Map(e));return[t,{set:r.useCallback(((e,t)=>{n((n=>{const r=new Map(n);return r.set(e,t),r}))}),[]),setAll:r.useCallback((e=>{n((()=>new Map(e)))}),[]),remove:r.useCallback((e=>{n((t=>{const n=new Map(t);return n.delete(e),n}))}),[]),reset:r.useCallback((()=>{n((()=>new Map))}),[])}]},t.useMediaQuery=h,t.useOnClickOutside=function(e,t,n="mousedown",r={}){c(n,(n=>{const r=n.target;r&&r.isConnected&&(Array.isArray(e)?e.filter((e=>Boolean(e.current))).every((e=>e.current&&!e.current.contains(r))):e.current&&!e.current.contains(r))&&t(n)}),void 0,r)},t.useReadLocalStorage=function(e,t={}){let{initializeWithValue:n=!0}=t;k&&(n=!1);const o=r.useCallback((e=>{if(t.deserializer)return t.deserializer(e);if("undefined"===e)return;let n;try{n=JSON.parse(e)}catch(e){return console.error("Error parsing JSON:",e),null}return n}),[t]),i=r.useCallback((()=>{if(k)return null;try{const t=window.localStorage.getItem(e);return t?o(t):null}catch(t){return console.warn(`Error reading localStorage key “${e}”:`,t),null}}),[e,o]),[u,s]=r.useState((()=>{if(n)return i()}));r.useEffect((()=>{s(i())}),[e]);const a=r.useCallback((t=>{t.key&&t.key!==e||s(i())}),[e,i]);return c("storage",a),c("local-storage",a),u},t.useResizeObserver=function(e){const{ref:t,box:n="content-box"}=e,[{width:o,height:i},u]=r.useState(S),s=b(),c=r.useRef({...S}),a=r.useRef(void 0);return a.current=e.onResize,r.useEffect((()=>{if(!t.current)return;if("undefined"==typeof window||!("ResizeObserver"in window))return;const e=new ResizeObserver((([e])=>{const t="border-box"===n?"borderBoxSize":"device-pixel-content-box"===n?"devicePixelContentBoxSize":"contentBoxSize",r=m(e,t,"inlineSize"),o=m(e,t,"blockSize");if(c.current.width!==r||c.current.height!==o){const e={width:r,height:o};c.current.width=r,c.current.height=o,a.current?a.current(e):s()&&u(e)}}));return e.observe(t.current,{box:n}),()=>{e.disconnect()}}),[n,t,s]),{width:o,height:i}},t.useScreen=function(e={}){let{initializeWithValue:t=!0}=e;C&&(t=!1);const n=()=>{if(!C)return window.screen},[o,i]=r.useState((()=>{if(t)return n()})),u=p(i,e.debounceDelay);function a(){const t=n(),r=e.debounceDelay?u:i;if(t){const{width:e,height:n,availHeight:o,availWidth:i,colorDepth:u,orientation:s,pixelDepth:c}=t;r({width:e,height:n,availHeight:o,availWidth:i,colorDepth:u,orientation:s,pixelDepth:c})}}return c("resize",a),s((()=>{a()}),[]),o},t.useScript=function(e,t){const[n,o]=r.useState((()=>!e||(null==t?void 0:t.shouldPreventLoad)?"idle":"undefined"==typeof window?"loading":E.get(e)??"loading"));return r.useEffect((()=>{if(!e||(null==t?void 0:t.shouldPreventLoad))return;const n=E.get(e);if("ready"===n||"error"===n)return void o(n);const r=function(e){const t=document.querySelector(`script[src="${e}"]`),n=null==t?void 0:t.getAttribute("data-status");return{node:t,status:n}}(e);let i=r.node;if(i)o(r.status??n??"loading");else{i=document.createElement("script"),i.src=e,i.async=!0,(null==t?void 0:t.id)&&(i.id=t.id),i.setAttribute("data-status","loading"),document.body.appendChild(i);const n=e=>{const t="load"===e.type?"ready":"error";null==i||i.setAttribute("data-status",t)};i.addEventListener("load",n),i.addEventListener("error",n)}const u=t=>{const n="load"===t.type?"ready":"error";o(n),E.set(e,n)};return i.addEventListener("load",u),i.addEventListener("error",u),()=>{i&&(i.removeEventListener("load",u),i.removeEventListener("error",u)),i&&(null==t?void 0:t.removeOnUnmount)&&(i.remove(),E.delete(e))}}),[e,null==t?void 0:t.shouldPreventLoad,null==t?void 0:t.removeOnUnmount,null==t?void 0:t.id]),n},t.useScrollLock=function(e={}){const{autoLock:t=!0,lockTarget:n,widthReflow:o=!0}=e,[i,u]=r.useState(!1),c=r.useRef(null),a=r.useRef(null),l=()=>{if(c.current){const{overflow:e,paddingRight:t}=c.current.style;if(a.current={overflow:e,paddingRight:t},o){const e=c.current===document.body?window.innerWidth:c.current.offsetWidth,t=parseInt(window.getComputedStyle(c.current).paddingRight,10)||0,n=e-c.current.scrollWidth;c.current.style.paddingRight=`${n+t}px`}c.current.style.overflow="hidden",u(!0)}},d=()=>{c.current&&a.current&&(c.current.style.overflow=a.current.overflow,o&&(c.current.style.paddingRight=a.current.paddingRight)),u(!1)};return s((()=>{if(!z)return n&&(c.current="string"==typeof n?document.querySelector(n):n),c.current||(c.current=document.body),t&&l(),()=>{d()}}),[t,n,o]),{isLocked:i,lock:l,unlock:d}},t.useSessionStorage=function(e,t,n={}){const{initializeWithValue:o=!0}=n,i=r.useCallback((e=>n.serializer?n.serializer(e):JSON.stringify(e)),[n]),u=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]),s=r.useCallback((()=>{const n=t instanceof Function?t():t;if(O)return n;try{const t=window.sessionStorage.getItem(e);return t?u(t):n}catch(t){return console.warn(`Error reading sessionStorage key “${e}”:`,t),n}}),[t,e,u]),[a,l]=r.useState((()=>o?s():t instanceof Function?t():t)),f=d((t=>{O&&console.warn(`Tried setting sessionStorage key “${e}” even though environment is not a client`);try{const n=t instanceof Function?t(s()):t;window.sessionStorage.setItem(e,i(n)),l(n),window.dispatchEvent(new StorageEvent("session-storage",{key:e}))}catch(t){console.warn(`Error setting sessionStorage key “${e}”:`,t)}})),g=d((()=>{O&&console.warn(`Tried removing sessionStorage key “${e}” even though environment is not a client`);const n=t instanceof Function?t():t;window.sessionStorage.removeItem(e),l(n),window.dispatchEvent(new StorageEvent("session-storage",{key:e}))}));r.useEffect((()=>{l(s())}),[e]);const v=r.useCallback((t=>{t.key&&t.key!==e||l(s())}),[e,s]);return c("storage",v),c("session-storage",v),[a,f,g]},t.useStep=function(e){const[t,n]=r.useState(1),o=t+1<=e,i=t-1>0,u=r.useCallback((r=>{const o=r instanceof Function?r(t):r;if(!(o>=1&&o<=e))throw new Error("Step not valid");n(o)}),[e,t]),s=r.useCallback((()=>{o&&n((e=>e+1))}),[o]),c=r.useCallback((()=>{i&&n((e=>e-1))}),[i]),a=r.useCallback((()=>{n(1)}),[]);return[t,{goToNextStep:s,goToPrevStep:c,canGoToNextStep:o,canGoToPrevStep:i,setStep:u,reset:a}]},t.useTernaryDarkMode=function({defaultValue:e="system",localStorageKey:t="usehooks-ts-ternary-dark-mode",initializeWithValue:n=!0}={}){const r=h("(prefers-color-scheme: dark)",{initializeWithValue:n}),[o,i]=g(t,e,{initializeWithValue:n});return{isDarkMode:"dark"===o||"system"===o&&r,ternaryDarkMode:o,setTernaryDarkMode:i,toggleTernaryDarkMode:()=>{const e=["light","system","dark"];i((t=>{const n=(e.indexOf(t)+1)%e.length;return e[n]}))}}},t.useTimeout=function(e,t){const n=r.useRef(e);s((()=>{n.current=e}),[e]),r.useEffect((()=>{if(!t&&0!==t)return;const e=setTimeout((()=>{n.current()}),t);return()=>{clearTimeout(e)}}),[t])},t.useToggle=function(e){const[t,n]=r.useState(!!e);return[t,r.useCallback((()=>{n((e=>!e))}),[]),n]},t.useUnmount=y,t.useWindowSize=function(e={}){let{initializeWithValue:t=!0}=e;R&&(t=!1);const[n,o]=r.useState((()=>t?{width:window.innerWidth,height:window.innerHeight}:{width:void 0,height:void 0})),i=p(o,e.debounceDelay);function u(){(e.debounceDelay?i:o)({width:window.innerWidth,height:window.innerHeight})}return c("resize",u),s((()=>{u()}),[]),n}}}]);