"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[30810],{8279:function(e,t,n){n.d(t,{$l:function(){return o},BN:function(){return x},DY:function(){return E},Fs:function(){return P},J$:function(){return q},JG:function(){return W},JN:function(){return m},LI:function(){return k},MA:function(){return K},PM:function(){return s},UG:function(){return Y},W6:function(){return V},i_:function(){return u},kY:function(){return H},ko:function(){return Z},kw:function(){return L},mf:function(){return l},o8:function(){return a},qC:function(){return D},s6:function(){return X},sj:function(){return M},u3:function(){return I},u_:function(){return J},w6:function(){return O},xD:function(){return ee}});var r=n(7328);let i=()=>{},u=i(),o=Object,a=e=>e===u,l=e=>"function"==typeof e,s=(e,t)=>({...e,...t}),c=e=>l(e.then),f=new WeakMap,d=0,g=e=>{let t,n;let r=typeof e,i=e&&e.constructor,u=i==Date;if(o(e)!==e||u||i==RegExp)t=u?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=f.get(e))return t;if(t=++d+"~",f.set(e,t),i==Array){for(n=0,t="@";n<e.length;n++)t+=g(e[n])+",";f.set(e,t)}if(i==o){t="#";let r=o.keys(e).sort();for(;!a(n=r.pop());)a(e[n])||(t+=n+":"+g(e[n])+",");f.set(e,t)}}return t},E=new WeakMap,w={},v={},_="undefined",h=typeof window!=_,p=typeof document!=_,y=()=>h&&typeof window.requestAnimationFrame!=_,m=(e,t)=>{let n=E.get(e);return[()=>!a(t)&&e.get(t)||w,r=>{if(!a(t)){let i=e.get(t);t in v||(v[t]=i),n[5](t,s(i,r),i||w)}},n[6],()=>!a(t)&&t in v?v[t]:!a(t)&&e.get(t)||w]},R=!0,[T,b]=h&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[i,i],S={initFocus:e=>(p&&document.addEventListener("visibilitychange",e),T("focus",e),()=>{p&&document.removeEventListener("visibilitychange",e),b("focus",e)}),initReconnect:e=>{let t=()=>{R=!0,e()},n=()=>{R=!1};return T("online",t),T("offline",n),()=>{b("online",t),b("offline",n)}}},O=!r.useId,V=!h||"Deno"in window,L=e=>y()?window.requestAnimationFrame(e):setTimeout(e,1),k=V?r.useEffect:r.useLayoutEffect,C="undefined"!=typeof navigator&&navigator.connection,N=!V&&C&&(["slow-2g","2g"].includes(C.effectiveType)||C.saveData),D=e=>{if(l(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?g(e):"",t]},A=0,I=()=>++A;var M={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function x(...e){let[t,n,r,i]=e,o=s({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),f=o.populateCache,d=o.rollbackOnError,g=o.optimisticData,w=e=>"function"==typeof d?d(e):!1!==d,v=o.throwOnError;if(l(n)){let e=[];for(let r of t.keys())!/^\$(inf|sub)\$/.test(r)&&n(t.get(r)._k)&&e.push(r);return Promise.all(e.map(_))}return _(n);async function _(n){let i;let[s]=D(n);if(!s)return;let[d,_]=m(t,s),[h,p,y,R]=E.get(t),T=()=>{let e=h[s];return(l(o.revalidate)?o.revalidate(d().data,n):!1!==o.revalidate)&&(delete y[s],delete R[s],e&&e[0])?e[0](2).then(()=>d().data):d().data};if(e.length<3)return T();let b=r,S=I();p[s]=[S,0];let O=!a(g),V=d(),L=V.data,k=V._c,C=a(k)?L:k;if(O&&_({data:g=l(g)?g(C,L):g,_c:C}),l(b))try{b=b(C)}catch(e){i=e}if(b&&c(b)){if(b=await b.catch(e=>{i=e}),S!==p[s][0]){if(i)throw i;return b}i&&O&&w(i)&&(f=!0,_({data:C,_c:u}))}if(f&&!i&&(l(f)?_({data:f(b,C),error:u,_c:u}):_({data:b,error:u,_c:u})),p[s][1]=I(),Promise.resolve(T()).then(()=>{_({_c:u})}),i){if(v)throw i;return}return b}}let j=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},F=(e,t)=>{if(!E.has(e)){let n=s(S,t),r={},o=x.bind(u,e),a=i,l={},c=(e,t)=>{let n=l[e]||[];return l[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},f=(t,n,r)=>{e.set(t,n);let i=l[t];if(i)for(let e of i)e(n,r)},d=()=>{if(!E.has(e)&&(E.set(e,[r,{},{},{},o,f,c]),!V)){let t=n.initFocus(setTimeout.bind(u,j.bind(u,r,0))),i=n.initReconnect(setTimeout.bind(u,j.bind(u,r,1)));a=()=>{t&&t(),i&&i(),E.delete(e)}}};return d(),[e,o,d,a]}return[e,E.get(e)[4]]},[P,W]=F(new Map),J=s({onLoadingSlow:i,onSuccess:i,onError:i,onErrorRetry:(e,t,n,r,i)=>{let u=n.errorRetryCount,o=i.retryCount,l=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;(a(u)||!(o>u))&&setTimeout(r,l,i)},onDiscarded:i,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:N?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:N?5e3:3e3,compare:(e,t)=>g(e)==g(t),isPaused:()=>!1,cache:P,mutate:W,fallback:{}},{isOnline:()=>R,isVisible:()=>{let e=p&&document.visibilityState;return a(e)||"hidden"!==e}}),$=(e,t)=>{let n=s(e,t);if(t){let{use:r,fallback:i}=e,{use:u,fallback:o}=t;r&&u&&(n.use=r.concat(u)),i&&o&&(n.fallback=s(i,o))}return n},U=(0,r.createContext)({}),q=e=>{let{value:t}=e,n=(0,r.useContext)(U),i=l(t),o=(0,r.useMemo)(()=>i?t(n):t,[i,n,t]),a=(0,r.useMemo)(()=>i?o:$(n,o),[i,n,o]),c=o&&o.provider,f=(0,r.useRef)(u);c&&!f.current&&(f.current=F(c(a.cache||P),o));let d=f.current;return d&&(a.cache=d[0],a.mutate=d[1]),k(()=>{if(d)return d[2]&&d[2](),d[3]},[]),(0,r.createElement)(U.Provider,s(e,{value:a}))},Y="$inf$",G=h&&window.__SWR_DEVTOOLS_USE__,B=G?window.__SWR_DEVTOOLS_USE__:[],z=e=>l(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],H=()=>s(J,(0,r.useContext)(U)),K=(e,t)=>{let[n,r]=D(e),[,,,i]=E.get(P);if(i[n])return i[n];let u=t(r);return i[n]=u,u},Q=B.concat(e=>(t,n,r)=>{let i=n&&((...e)=>{let[r]=D(t),[,,,i]=E.get(P);if(r.startsWith(Y))return n(...e);let u=i[r];return a(u)?n(...e):(delete i[r],u)});return e(t,i,r)}),X=e=>function(...t){let n=H(),[r,i,u]=z(t),o=$(n,u),a=e,{use:l}=o,s=(l||[]).concat(Q);for(let e=s.length;e--;)a=s[e](a);return a(r,i||o.fetcher||null,o)},Z=(e,t,n)=>{let r=t[e]||(t[e]=[]);return r.push(n),()=>{let e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},ee=(e,t)=>(...n)=>{let[r,i,u]=z(n),o=(u.use||[]).concat(t);return e(r,i,{...u,use:o})};G&&(window.__SWR_DEVTOOLS_REACT__=r)},30810:function(e,t,n){n.r(t),n.d(t,{SWRConfig:function(){return s},default:function(){return c},mutate:function(){return u.JG},preload:function(){return u.MA},unstable_serialize:function(){return o},useSWRConfig:function(){return u.kY}});var r=n(7328),i=n(58652),u=n(8279);let o=e=>(0,u.qC)(e)[0],a=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),l={dedupe:!0},s=u.$l.defineProperty(u.J$,"defaultValue",{value:u.u_}),c=(0,u.s6)((e,t,n)=>{let{cache:o,compare:s,suspense:c,fallbackData:f,revalidateOnMount:d,revalidateIfStale:g,refreshInterval:E,refreshWhenHidden:w,refreshWhenOffline:v,keepPreviousData:_}=n,[h,p,y,m]=u.DY.get(o),[R,T]=(0,u.qC)(e),b=(0,r.useRef)(!1),S=(0,r.useRef)(!1),O=(0,r.useRef)(R),V=(0,r.useRef)(t),L=(0,r.useRef)(n),k=()=>L.current,C=()=>k().isVisible()&&k().isOnline(),[N,D,A,I]=(0,u.JN)(o,R),M=(0,r.useRef)({}).current,x=(0,u.o8)(f)?n.fallback[R]:f,j=(e,t)=>{for(let n in M)if("data"===n){if(!s(e[n],t[n])&&(!(0,u.o8)(e[n])||!s(G,t[n])))return!1}else if(t[n]!==e[n])return!1;return!0},F=(0,r.useMemo)(()=>{let e=!!R&&!!t&&((0,u.o8)(d)?!k().isPaused()&&!c&&(!!(0,u.o8)(g)||g):d),n=t=>{let n=(0,u.PM)(t);return(delete n._k,e)?{isValidating:!0,isLoading:!0,...n}:n},r=N(),i=I(),o=n(r),a=r===i?o:n(i),l=o;return[()=>{let e=n(N());return j(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>a]},[o,R]),P=(0,i.useSyncExternalStore)((0,r.useCallback)(e=>A(R,(t,n)=>{j(n,t)||e()}),[o,R]),F[0],F[1]),W=!b.current,J=h[R]&&h[R].length>0,$=P.data,U=(0,u.o8)($)?x:$,q=P.error,Y=(0,r.useRef)(U),G=_?(0,u.o8)($)?Y.current:$:U,B=(!J||!!(0,u.o8)(q))&&(W&&!(0,u.o8)(d)?d:!k().isPaused()&&(c?!(0,u.o8)(U)&&g:(0,u.o8)(U)||g)),z=!!(R&&t&&W&&B),H=(0,u.o8)(P.isValidating)?z:P.isValidating,K=(0,u.o8)(P.isLoading)?z:P.isLoading,Q=(0,r.useCallback)(async e=>{let t,r;let i=V.current;if(!R||!i||S.current||k().isPaused())return!1;let o=!0,a=e||{},l=!y[R]||!a.dedupe,c=()=>u.w6?!S.current&&R===O.current&&b.current:R===O.current,f={isValidating:!1,isLoading:!1},d=()=>{D(f)},g=()=>{let e=y[R];e&&e[1]===r&&delete y[R]},E={isValidating:!0};(0,u.o8)(N().data)&&(E.isLoading=!0);try{if(l&&(D(E),n.loadingTimeout&&(0,u.o8)(N().data)&&setTimeout(()=>{o&&c()&&k().onLoadingSlow(R,n)},n.loadingTimeout),y[R]=[i(T),(0,u.u3)()]),[t,r]=y[R],t=await t,l&&setTimeout(g,n.dedupingInterval),!y[R]||y[R][1]!==r)return l&&c()&&k().onDiscarded(R),!1;f.error=u.i_;let e=p[R];if(!(0,u.o8)(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return d(),l&&c()&&k().onDiscarded(R),!1;let a=N().data;f.data=s(a,t)?a:t,l&&c()&&k().onSuccess(t,R,n)}catch(n){g();let e=k(),{shouldRetryOnError:t}=e;!e.isPaused()&&(f.error=n,l&&c()&&(e.onError(n,R,e),(!0===t||(0,u.mf)(t)&&t(n))&&(!k().revalidateOnFocus||!k().revalidateOnReconnect||C())&&e.onErrorRetry(n,R,e,e=>{let t=h[R];t&&t[0]&&t[0](u.sj.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return o=!1,d(),!0},[R,o]),X=(0,r.useCallback)((...e)=>(0,u.BN)(o,O.current,...e),[]);if((0,u.LI)(()=>{V.current=t,L.current=n,(0,u.o8)($)||(Y.current=$)}),(0,u.LI)(()=>{if(!R)return;let e=Q.bind(u.i_,l),t=0,n=(0,u.ko)(R,h,(n,r={})=>{if(n==u.sj.FOCUS_EVENT){let n=Date.now();k().revalidateOnFocus&&n>t&&C()&&(t=n+k().focusThrottleInterval,e())}else if(n==u.sj.RECONNECT_EVENT)k().revalidateOnReconnect&&C()&&e();else if(n==u.sj.MUTATE_EVENT)return Q();else if(n==u.sj.ERROR_REVALIDATE_EVENT)return Q(r)});return S.current=!1,O.current=R,b.current=!0,D({_k:T}),B&&((0,u.o8)(U)||u.W6?e():(0,u.kw)(e)),()=>{S.current=!0,n()}},[R]),(0,u.LI)(()=>{let e;function t(){let t=(0,u.mf)(E)?E(N().data):E;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!N().error&&(w||k().isVisible())&&(v||k().isOnline())?Q(l).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[E,w,v,R]),(0,r.useDebugValue)(G),c&&(0,u.o8)(U)&&R){if(!u.w6&&u.W6)throw Error("Fallback data is required when using suspense in SSR.");V.current=t,L.current=n,S.current=!1;let e=m[R];if((0,u.o8)(e)||a(X(e)),(0,u.o8)(q)){let e=Q(l);(0,u.o8)(G)||(e.status="fulfilled",e.value=!0),a(e)}else throw q}return{mutate:X,get data(){return M.data=!0,G},get error(){return M.error=!0,q},get isValidating(){return M.isValidating=!0,H},get isLoading(){return M.isLoading=!0,K}}})},78892:function(e,t,n){/**
 * @license React
 * use-sync-external-store-shim.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 r=n(7328),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},u=r.useState,o=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=u({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return a(function(){i.value=n,i.getSnapshot=t,s(i)&&c({inst:i})},[e,n,t]),o(function(){return s(i)&&c({inst:i}),e(function(){s(i)&&c({inst:i})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},58652:function(e,t,n){e.exports=n(78892)}}]);