(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{1362:(e,t,a)=>{"use strict";a.d(t,{D:()=>m,ThemeProvider:()=>c});var r=a(2115),s=(e,t,a,r,s,n,l,o)=>{let i=document.documentElement,m=["light","dark"];function c(t){var a;(Array.isArray(e)?e:[e]).forEach(e=>{let a="class"===e,r=a&&n?s.map(e=>n[e]||e):s;a?(i.classList.remove(...r),i.classList.add(n&&n[t]?n[t]:t)):i.setAttribute(e,t)}),a=t,o&&m.includes(a)&&(i.style.colorScheme=a)}if(r)c(r);else try{let e=localStorage.getItem(t)||a,r=l&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(r)}catch(e){}},n=["light","dark"],l="(prefers-color-scheme: dark)",o=r.createContext(void 0),i={setTheme:e=>{},themes:[]},m=()=>{var e;return null!=(e=r.useContext(o))?e:i},c=e=>r.useContext(o)?r.createElement(r.Fragment,null,e.children):r.createElement(u,{...e}),d=["light","dark"],u=e=>{let{forcedTheme:t,disableTransitionOnChange:a=!1,enableSystem:s=!0,enableColorScheme:i=!0,storageKey:m="theme",themes:c=d,defaultTheme:u=s?"system":"light",attribute:v="data-theme",value:p,children:g,nonce:_,scriptProps:S}=e,[k,E]=r.useState(()=>y(m,u)),[w,C]=r.useState(()=>"system"===k?b():k),T=p?Object.values(p):c,L=r.useCallback(e=>{let t=e;if(!t)return;"system"===e&&s&&(t=b());let r=p?p[t]:t,l=a?f(_):null,o=document.documentElement,m=e=>{"class"===e?(o.classList.remove(...T),r&&o.classList.add(r)):e.startsWith("data-")&&(r?o.setAttribute(e,r):o.removeAttribute(e))};if(Array.isArray(v)?v.forEach(m):m(v),i){let e=n.includes(u)?u:null,a=n.includes(t)?t:e;o.style.colorScheme=a}null==l||l()},[_]),N=r.useCallback(e=>{let t="function"==typeof e?e(k):e;E(t);try{localStorage.setItem(m,t)}catch(e){}},[k]),P=r.useCallback(e=>{C(b(e)),"system"===k&&s&&!t&&L("system")},[k,t]);r.useEffect(()=>{let e=window.matchMedia(l);return e.addListener(P),P(e),()=>e.removeListener(P)},[P]),r.useEffect(()=>{let e=e=>{e.key===m&&(e.newValue?E(e.newValue):N(u))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[N]),r.useEffect(()=>{L(null!=t?t:k)},[t,k]);let A=r.useMemo(()=>({theme:k,setTheme:N,forcedTheme:t,resolvedTheme:"system"===k?w:k,themes:s?[...c,"system"]:c,systemTheme:s?w:void 0}),[k,N,t,w,s,c]);return r.createElement(o.Provider,{value:A},r.createElement(h,{forcedTheme:t,storageKey:m,attribute:v,enableSystem:s,enableColorScheme:i,defaultTheme:u,value:p,themes:c,nonce:_,scriptProps:S}),g)},h=r.memo(e=>{let{forcedTheme:t,storageKey:a,attribute:n,enableSystem:l,enableColorScheme:o,defaultTheme:i,value:m,themes:c,nonce:d,scriptProps:u}=e,h=JSON.stringify([n,a,i,t,c,m,l,o]).slice(1,-1);return r.createElement("script",{...u,suppressHydrationWarning:!0,nonce:"",dangerouslySetInnerHTML:{__html:"(".concat(s.toString(),")(").concat(h,")")}})}),y=(e,t)=>{let a;try{a=localStorage.getItem(e)||void 0}catch(e){}return a||t},f=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},b=e=>(e||(e=window.matchMedia(l)),e.matches?"dark":"light")},4049:(e,t,a)=>{Promise.resolve().then(a.bind(a,1362)),Promise.resolve().then(a.t.bind(a,5688,23)),Promise.resolve().then(a.t.bind(a,9432,23)),Promise.resolve().then(a.t.bind(a,9324,23))},5688:e=>{e.exports={style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"},className:"__className_5cfdac",variable:"__variable_5cfdac"}},9324:()=>{},9432:e=>{e.exports={style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"},className:"__className_9a8899",variable:"__variable_9a8899"}}},e=>{var t=t=>e(e.s=t);e.O(0,[261,441,684,358],()=>t(4049)),_N_E=e.O()}]);