1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7526],{40257:function(e,t,n){"use strict";var r,s;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(s=n.g.process)?void 0:s.env)?n.g.process:n(44227)},44227:function(e){!function(){var t={229:function(e){var t,n,r,s=e.exports={};function o(){throw Error("setTimeout has not been defined")}function i(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var c=[],l=!1,u=-1;function d(){l&&r&&(l=!1,r.length?c=r.concat(c):u=-1,c.length&&f())}function f(){if(!l){var e=a(d);l=!0;for(var t=c.length;t;){for(r=c,c=[];++u<t;)r&&r[u].run();u=-1,t=c.length}r=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}s.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||a(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=p,s.addListener=p,s.once=p,s.off=p,s.removeListener=p,s.removeAllListeners=p,s.emit=p,s.prependListener=p,s.prependOnceListener=p,s.listeners=function(e){return[]},s.binding=function(e){throw Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw Error("process.chdir is not supported")},s.umask=function(){return 0}}},n={};function r(e){var s=n[e];if(void 0!==s)return s.exports;var o=n[e]={exports:{}},i=!0;try{t[e](o,o.exports,r),i=!1}finally{i&&delete n[e]}return o.exports}r.ab="//";var s=r(229);e.exports=s}()},27526:function(e,t,n){"use strict";n.d(t,{eA:function(){return eu},J9:function(){return ea},zB:function(){return ec},w7:function(){return el},kP:function(){return es}});var r,s,o,i,a,c=n(57437),l=n(2265),u=n.t(l,2);class d extends Error{constructor(e,t){e instanceof Error?super(void 0,{cause:{err:e,...e.cause,...t}}):"string"==typeof e?(t instanceof Error&&(t={err:t,...t.cause}),super(e,t)):super(void 0,e),this.name=this.constructor.name,this.type=this.constructor.type??"AuthError",this.kind=this.constructor.kind??"error",Error.captureStackTrace?.(this,this.constructor);let n=`https://errors.authjs.dev#${this.type.toLowerCase()}`;this.message+=`${this.message?". ":""}Read more at ${n}`}}class f extends d{}f.kind="signIn";class h extends d{}h.type="AdapterError";class p extends d{}p.type="AccessDenied";class v extends d{}v.type="CallbackRouteError";class y extends d{}y.type="ErrorPageLoop";class w extends d{}w.type="EventError";class g extends d{}g.type="InvalidCallbackUrl";class m extends f{constructor(){super(...arguments),this.code="credentials"}}m.type="CredentialsSignin";class E extends d{}E.type="InvalidEndpoints";class x extends d{}x.type="InvalidCheck";class b extends d{}b.type="JWTSessionError";class S extends d{}S.type="MissingAdapter";class L extends d{}L.type="MissingAdapterMethods";class T extends d{}T.type="MissingAuthorize";class _ extends d{}_.type="MissingSecret";class U extends f{}U.type="OAuthAccountNotLinked";class k extends f{}k.type="OAuthCallbackError";class R extends d{}R.type="OAuthProfileParseError";class A extends d{}A.type="SessionTokenError";class C extends f{}C.type="OAuthSignInError";class P extends f{}P.type="EmailSignInError";class N extends d{}N.type="SignOutError";class I extends d{}I.type="UnknownAction";class M extends d{}M.type="UnsupportedStrategy";class O extends d{}O.type="InvalidProvider";class j extends d{}j.type="UntrustedHost";class X extends d{}X.type="Verification";class H extends f{}H.type="MissingCSRF";class W extends d{}W.type="DuplicateConditionalUI";class V extends d{}V.type="MissingWebAuthnAutocomplete";class $ extends d{}$.type="WebAuthnVerificationError";class B extends f{}B.type="AccountNotLinked";class D extends d{}D.type="ExperimentalFeatureNotEnabled";class F extends d{}class J extends d{}async function z(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s="".concat(q(t),"/").concat(e);try{var o;let e={headers:{"Content-Type":"application/json",...(null==r?void 0:null===(o=r.headers)||void 0===o?void 0:o.cookie)?{cookie:r.headers.cookie}:{}}};(null==r?void 0:r.body)&&(e.body=JSON.stringify(r.body),e.method="POST");let t=await fetch(s,e),n=await t.json();if(!t.ok)throw n;return n}catch(e){return n.error(new F(e.message,e)),null}}function q(e){return"undefined"==typeof window?"".concat(e.baseUrlServer).concat(e.basePathServer):e.basePath}function G(){return Math.floor(Date.now()/1e3)}function K(e){let t=new URL("http://localhost:3000/api/auth");e&&!e.startsWith("http")&&(e="https://".concat(e));let n=new URL(e||t),r=("/"===n.pathname?t.pathname:n.pathname).replace(/\/$/,""),s="".concat(n.origin).concat(r);return{origin:n.origin,host:n.host,path:r,base:s,toString:()=>s}}var Q=n(40257);let Y={baseUrl:K(null!==(s=Q.env.NEXTAUTH_URL)&&void 0!==s?s:Q.env.VERCEL_URL).origin,basePath:K(Q.env.NEXTAUTH_URL).path,baseUrlServer:K(null!==(i=null!==(o=Q.env.NEXTAUTH_URL_INTERNAL)&&void 0!==o?o:Q.env.NEXTAUTH_URL)&&void 0!==i?i:Q.env.VERCEL_URL).origin,basePathServer:K(null!==(a=Q.env.NEXTAUTH_URL_INTERNAL)&&void 0!==a?a:Q.env.NEXTAUTH_URL).path,_lastSync:0,_session:void 0,_getSession:()=>{}},Z=null;function ee(){return"undefined"==typeof BroadcastChannel?{postMessage:()=>{},addEventListener:()=>{},removeEventListener:()=>{},name:"next-auth",onmessage:null,onmessageerror:null,close:()=>{},dispatchEvent:()=>!1}:new BroadcastChannel("next-auth")}
1function et(){return null===Z&&(Z=ee()),Z}let en={debug:console.debug,error:console.error,warn:console.warn},er=null===(r=l.createContext)||void 0===r?void 0:r.call(u,void 0);function es(e){if(!er)throw Error("React Context is unavailable in Server Components");let t=l.useContext(er),{required:n,onUnauthenticated:r}=null!=e?e:{},s=n&&"unauthenticated"===t.status;return(l.useEffect(()=>{if(s){let e="".concat(Y.basePath,"/signin?").concat(new URLSearchParams({error:"SessionRequired",callbackUrl:window.location.href}));r?r():window.location.href=e}},[s,r]),s)?{data:t.data,update:t.update,status:"loading"}:t}async function eo(e){var t;let n=await z("session",Y,en,e);return(null===(t=null==e?void 0:e.broadcast)||void 0===t||t)&&ee().postMessage({event:"session",data:{trigger:"getSession"}}),n}async function ei(){var e;let t=await z("csrf",Y,en);return null!==(e=null==t?void 0:t.csrfToken)&&void 0!==e?e:""}async function ea(){return z("providers",Y,en)}async function ec(e,t,n){var r,s,o;let{callbackUrl:i,...a}=null!=t?t:{},{redirect:c=!0,redirectTo:l=null!=i?i:window.location.href,...u}=a,d=q(Y),f=await ea();if(!f){window.location.href="".concat(d,"/error");return}if(!e||!f[e]){let e="".concat(d,"/signin?").concat(new URLSearchParams({callbackUrl:l}));window.location.href=e;return}let h=f[e].type;if("webauthn"===h)throw TypeError(['Provider id "'.concat(e,'" refers to a WebAuthn provider.'),'Please use `import { signIn } from "next-auth/webauthn"` instead.'].join("\n"));let p="".concat(d,"/").concat("credentials"===h?"callback":"signin","/").concat(e),v=await ei(),y=await fetch("".concat(p,"?").concat(new URLSearchParams(n)),{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Auth-Return-Redirect":"1"},body:new URLSearchParams({...u,csrfToken:v,callbackUrl:l})}),w=await y.json();if(c){let e=null!==(r=w.url)&&void 0!==r?r:l;window.location.href=e,e.includes("#")&&window.location.reload();return}let g=null!==(s=new URL(w.url).searchParams.get("error"))&&void 0!==s?s:void 0,m=null!==(o=new URL(w.url).searchParams.get("code"))&&void 0!==o?o:void 0;return y.ok&&await Y._getSession({event:"storage"}),{error:g,code:m,status:y.status,ok:y.ok,url:g?null:w.url}}async function el(e){var t,n;let{redirect:r=!0,redirectTo:s=null!==(t=null==e?void 0:e.callbackUrl)&&void 0!==t?t:window.location.href}=null!=e?e:{},o=q(Y),i=await ei(),a=await fetch("".concat(o,"/signout"),{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Auth-Return-Redirect":"1"},body:new URLSearchParams({csrfToken:i,callbackUrl:s})}),c=await a.json();if(et().postMessage({event:"session",data:{trigger:"signout"}}),r){let e=null!==(n=c.url)&&void 0!==n?n:s;window.location.href=e,e.includes("#")&&window.location.reload();return}return await Y._getSession({event:"storage"}),c}function eu(e){if(!er)throw Error("React Context is unavailable in Server Components");let{children:t,basePath:n,refetchInterval:r,refetchWhenOffline:s}=e;n&&(Y.basePath=n);let o=void 0!==e.session;Y._lastSync=o?G():0;let[i,a]=l.useState(()=>(o&&(Y._session=e.session),e.session)),[u,d]=l.useState(!o);l.useEffect(()=>(Y._getSession=async function(){let{event:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t="storage"===e;if(t||void 0===Y._session){Y._lastSync=G(),Y._session=await eo({broadcast:!t}),a(Y._session);return}if(!e||null===Y._session||G()<Y._lastSync)return;Y._lastSync=G(),Y._session=await eo(),a(Y._session)}catch(e){en.error(new J(e.message,e))}finally{d(!1)}},Y._getSession(),()=>{Y._lastSync=0,Y._session=void 0,Y._getSession=()=>{}}),[]),l.useEffect(()=>{let e=()=>Y._getSession({event:"storage"});return et().addEventListener("message",e),()=>et().removeEventListener("message",e)},[]),l.useEffect(()=>{let{refetchOnWindowFocus:t=!0}=e,n=()=>{t&&"visible"===document.visibilityState&&Y._getSession({event:"visibilitychange"})};return document.addEventListener("visibilitychange",n,!1),()=>document.removeEventListener("visibilitychange",n,!1)},[e.refetchOnWindowFocus]);let f=function(){let[e,t]=l.useState("undefined"!=typeof navigator&&navigator.onLine),n=()=>t(!0),r=()=>t(!1);return l.useEffect(()=>(window.addEventListener("online",n),window.addEventListener("offline",r),
1()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}),[]),e}(),h=!1!==s||f;l.useEffect(()=>{if(r&&h){let e=setInterval(()=>{Y._session&&Y._getSession({event:"poll"})},1e3*r);return()=>clearInterval(e)}},[r,h]);let p=l.useMemo(()=>({data:i,status:u?"loading":i?"authenticated":"unauthenticated",async update(e){if(u)return;d(!0);let t=await z("session",Y,en,void 0===e?void 0:{body:{csrfToken:await ei(),data:e}});return d(!1),t&&(a(t),et().postMessage({event:"session",data:{trigger:"getSession"}})),t}}),[i,u]);return(0,c.jsx)(er.Provider,{value:p,children:t})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.