wiki-security-social 0.1.1-rc.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/auth-dialog.js +3 -3
- package/client/auth-dialog.js.map +4 -4
- package/client/security.js +3 -3
- package/client/security.js.map +4 -4
- package/cve-report/index.html +515 -0
- package/cve-report/report.json +250 -0
- package/meta-auth-dialog.json +1 -1
- package/meta-server.json +1 -1
- package/package.json +5 -5
- package/server/social.js +1 -1
package/client/auth-dialog.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* wiki-security-social - 0.1.1
|
|
2
|
-
(()=>{var X=Symbol.for("better-auth:broadcast-channel"),
|
|
1
|
+
/* wiki-security-social - 0.1.1 - Thu, 12 Nov 2026 12:02:27 GMT */
|
|
2
|
+
(()=>{var X=Symbol.for("better-auth:broadcast-channel"),Ye=()=>Math.floor(Date.now()/1e3),$e=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:Ye()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};let e=window,t=r=>{if(r.key!==this.name)return;let n=JSON.parse(r.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(o=>o(n))};return e.addEventListener("storage",t),()=>{e.removeEventListener("storage",t)}}};function H(e="better-auth.message"){return globalThis[X]||(globalThis[X]=new $e(e)),globalThis[X]}var O=[],D=0,_=null,Z=4,Je=globalThis.nanostoresGlobal||={epoch:0},Qe=()=>{let e,t;for(;D<O.length;){t=D,D+=Z;let r=_?.get(O[t]);if(r){if(!r.has(O[t+1]))continue;r.clear()}try{O[t](O[t+1].value,O[t+2],O[t+3])}catch(n){e=n}}if(O.length=D=0,e)throw e};var x=e=>{let t=[],r={eq:Object.is,get(){return r.lc||r.listen(()=>{})(),r.value},init:e,lc:0,listen(n){return r.lc=t.push(n),()=>{_?.get(n)?.delete(r);for(let s=D;s<O.length;)O[s]===n&&O[s+1]===r?O.splice(s,Z):s+=Z;let o=t.indexOf(n);~o&&(t.splice(o,1),--r.lc||r.off())}},notify(n,o){Je.epoch++;let s=!O.length&&!_;for(let a of t){if(_){let u=_.get(a);if(u||_.set(a,u=new Set),u.has(r))continue;u.add(r)}O.push(a,r,n,_?void 0:o)}s&&Qe()},off(){},set(n){let o=r.value;r.eq(o,n)||(r.value=n,r.notify(o))},subscribe(n){let o=r.listen(n);return n(r.value),o},value:e};return r};var Ke=2;var Xe=5,V=6,W=10,de=(e,t,r,n)=>(e.events=e.events||{},e.events[r+W]||(e.events[r+W]=n(o=>{e.events[r].reduceRight((s,a)=>(a(s),s),{shared:{},...o})})),e.events[r]=e.events[r]||[],e.events[r].push(t),()=>{let o=e.events[r],s=o.indexOf(t);~s&&(o.splice(s,1),o.length||(e.events[r+W](),delete e.events[r+W]))});var ee=(e,t)=>de(e,t,Ke,r=>{let n=e.set,o=e.setKey;return e.setKey&&(e.setKey=(s,a)=>{let u;if(r({abort:()=>{u=!0},changed:s,newValue:{...e.value,[s]:a}}),!u)return o(s,a)}),e.set=s=>{let a;if(r({abort:()=>{a=!0},newValue:s}),!a)return n(s)},()=>{e.set=n,e.setKey=o}});var G=1e3,te=(e,t)=>de(e,n=>{let o=t(n);o&&e.events[V].push(o)},Xe,n=>{let o=e.listen;e.listen=(...a)=>(!e.lc&&!e.active&&(e.active=!0,n()),o(...a));let s=e.off;return e.events[V]=[],e.off=()=>{s(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let a of e.events[V])a();e.events[V]=[]}},G)},()=>{e.listen=o,e.off=s}});function he(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function j(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!j(e[r],t[r]))return!1;return!0}if(he(e)&&he(t)){let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o of r)if(!(o in t)||!j(e[o],t[o]))return!1;return!0}return!1}function pe(e,t){return ee(e,({newValue:r,abort:n})=>{t(e.value,r)&&n()})}var re=Symbol.for("better-auth:focus-manager"),Ze=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};let e=document,t=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return e.addEventListener("visibilitychange",t,!1),()=>{e.removeEventListener("visibilitychange",t,!1)}}};function ne(){return globalThis[re]||(globalThis[re]=new Ze),globalThis[re]}var oe=Symbol.for("better-auth:online-manager"),et=class{listeners=new Set;isOnline=globalThis.navigator?.onLine??!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};let e=window,t=()=>this.setOnline(!0),r=()=>this.setOnline(!1);return e.addEventListener("online",t,!1),e.addEventListener("offline",r,!1),()=>{e.removeEventListener("online",t,!1),e.removeEventListener("offline",r,!1)}}};function z(){return globalThis[oe]||(globalThis[oe]=new et),globalThis[oe]}var tt=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,me={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},rt=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function nt(e){return e instanceof Date&&!isNaN(e.getTime())}function ot(e){let t=rt.exec(e);if(!t)return null;let[,r,n,o,s,a,u,i,c,l,v]=t,b=new Date(Date.UTC(parseInt(r,10),parseInt(n,10)-1,parseInt(o,10),parseInt(s,10),parseInt(a,10),parseInt(u,10),i?parseInt(i.padEnd(3,"0"),10):0));if(c){let p=(parseInt(l,10)*60+parseInt(v,10))*(c==="+"?-1:1);b.setUTCMinutes(b.getUTCMinutes()+p)}return nt(b)?b:null}function st(e,t={}){let{strict:r=!1,warnings:n=!1,reviver:o,parseDates:s=!0}=t;if(typeof e!="string")return e;let a=e.trim(),u=a.toLowerCase();if(u.length<=9&&u in me)return me[u];if(!tt.test(a)){if(r)throw new SyntaxError("[better-json] Invalid JSON");return e}try{return JSON.parse(a,(c,l)=>{if(c==="__proto__"||c==="constructor"&&l&&typeof l=="object"&&"prototype"in l){if(r)throw new Error("[better-json] Potential prototype pollution attempt detected");n&&console.warn(`[better-json] Dropping "${c}" key to prevent prototype pollution`);return}if(s&&typeof l=="string"){let v=ot(l);if(v)return v}return o?o(c,l):l})}catch(i){if(r)throw i;return e}}function ye(e,t={strict:!0}){return st(e,t)}var it=Symbol.for("better-auth:auth-query");function ve(e){let t=x(e);return Object.defineProperty(t,it,{value:!0}),t}var se=()=>Math.floor(Date.now()/1e3),at=5;function Ee(e){let{fetchSession:t,shouldPollSession:r=()=>!0,sessionSignal:n,options:o={}}=e,s=o.sessionOptions?.refetchInterval??0,a=o.sessionOptions?.refetchOnWindowFocus??!0,u=o.sessionOptions?.refetchWhenOffline??!1,i={isInitialized:!1,lastSessionRequest:0},c=()=>u||z().isOnline,l=m=>{if(c()){if(m?.event==="storage"){t();return}if(m?.event==="poll"){i.lastSessionRequest=se(),t();return}if(m?.event==="visibilitychange"){if(se()-i.lastSessionRequest<at)return;i.lastSessionRequest=se(),t();return}t()}},v=m=>{H().post({event:"session",data:{trigger:m},clientId:Math.random().toString(36).substring(7)})},b=()=>{s&&s>0&&(i.pollInterval=setInterval(()=>{r()&&l({event:"poll"})},s*1e3))},p=()=>{i.unsubscribeBroadcast=H().subscribe(()=>{l({event:"storage"})})},g=()=>{a&&(i.unsubscribeFocus=ne().subscribe(()=>{l({event:"visibilitychange"})}))},f=()=>{i.unsubscribeOnline=z().subscribe(m=>{m&&l({event:"visibilitychange"})})},E=()=>{i.unsubscribeSignal=n.listen(()=>{t()})};return{init:()=>{i.isInitialized||(i.isInitialized=!0,E(),!(typeof window>"u")&&(b(),p(),g(),f(),i.cleanupBroadcastSetup=H().setup(),i.cleanupFocusSetup=ne().setup(),i.cleanupOnlineSetup=z().setup()))},cleanup:()=>{i.isInitialized&&(i.pollInterval&&(clearInterval(i.pollInterval),i.pollInterval=void 0),i.unsubscribeBroadcast&&(i.unsubscribeBroadcast(),i.unsubscribeBroadcast=void 0),i.unsubscribeFocus&&(i.unsubscribeFocus(),i.unsubscribeFocus=void 0),i.unsubscribeOnline&&(i.unsubscribeOnline(),i.unsubscribeOnline=void 0),i.unsubscribeSignal&&(i.unsubscribeSignal(),i.unsubscribeSignal=void 0),i.cleanupBroadcastSetup&&(i.cleanupBroadcastSetup(),i.cleanupBroadcastSetup=void 0),i.cleanupFocusSetup&&(i.cleanupFocusSetup(),i.cleanupFocusSetup=void 0),i.cleanupOnlineSetup&&(i.cleanupOnlineSetup(),i.cleanupOnlineSetup=void 0),i.isInitialized=!1,i.lastSessionRequest=0)},triggerRefetch:l,broadcastSessionUpdate:v}}var ge=()=>"Deno"in globalThis,be=()=>"Bun"in globalThis;var Y=Object.create(null),M=e=>globalThis.process?.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Y:globalThis),U=new Proxy(Y,{get(e,t){return M()[t]??Y[t]},has(e,t){return t in M()||t in Y},set(e,t,r){let n=M(!0);return n[t]=r,!0},deleteProperty(e,t){if(!t)return!1;let r=M(!0);return delete r[t],!0},ownKeys(){let e=M(!0);return Object.keys(e)}});var lt=U.NODE_ENV??"";function P(e,t){return typeof process<"u"&&process.env?process.env[e]??t:ge()?Deno.env.get(e)??t:be()?Bun.env[e]??t:t}var ut=Object.freeze({get BETTER_AUTH_SECRET(){return P("BETTER_AUTH_SECRET")},get AUTH_SECRET(){return P("AUTH_SECRET")},get BETTER_AUTH_TELEMETRY(){return P("BETTER_AUTH_TELEMETRY")},get BETTER_AUTH_TELEMETRY_ID(){return P("BETTER_AUTH_TELEMETRY_ID")},get NODE_ENV(){return P("NODE_ENV","development")},get PACKAGE_VERSION(){return P("PACKAGE_VERSION","0.0.0")},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return P("BETTER_AUTH_TELEMETRY_ENDPOINT","")}});function ct(){let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,"writable")?e.writable:e.set!==void 0}function ft(e){let t=e.split(`
|
|
3
3
|
at `);return t.length<=1?e:(t.splice(1,1),t.join(`
|
|
4
|
-
at `))}function at(e,t){class r extends e{#e;constructor(...o){if(st()){let u=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...o),Error.stackTraceLimit=u}else super(...o);let s=new Error().stack;s&&(this.#e=it(s.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(r.prototype,"constructor",{get(){return t},enumerable:!1,configurable:!0}),r}var ut={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511},lt=class extends Error{status;body;headers;statusCode;constructor(e="INTERNAL_SERVER_ERROR",t=void 0,r={},n=typeof e=="number"?e:ut[e]){super(t?.message,t?.cause?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=r,this.statusCode=n,this.name="APIError",this.status=e,this.headers=r,this.statusCode=n,this.body=t}};var ct=at(lt,Error);var C=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}};var ft=47;function ge(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===ft;)t--;return t===e.length?e:e.slice(0,t)}function dt(e){try{return(ge(new URL(e).pathname)||"/")!=="/"}catch{throw new C(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function ht(e){try{let t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new C(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof C?t:new C(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function F(e,t="/api/auth"){if(ht(e),dt(e))return e;let r=ge(e);return!t||t==="/"?r:(t=t.startsWith("/")?t:`/${t}`,`${r}${t}`)}function ve(e,t){return!e||e.trim()===""?!1:t==="proto"?e==="http"||e==="https":t==="host"?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(r=>r.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function be(e,t,r,n,o){if(e)return F(e,t);if(n!==!1){let l=U.BETTER_AUTH_URL||U.NEXT_PUBLIC_BETTER_AUTH_URL||U.PUBLIC_BETTER_AUTH_URL||U.NUXT_PUBLIC_BETTER_AUTH_URL||U.NUXT_PUBLIC_AUTH_URL||(U.BASE_URL!=="/"?U.BASE_URL:void 0);if(l)return F(l,t)}let s=r?.headers.get("x-forwarded-host"),u=r?.headers.get("x-forwarded-proto");if(s&&u&&o&&ve(u,"proto")&&ve(s,"host"))try{return F(`${u}://${s}`,t)}catch{}if(r){let l=pt(r.url);if(!l)throw new C("Could not get origin from request. Please provide a valid base URL.");return F(l,t)}if(typeof window<"u"&&window.location)return F(window.location.origin,t)}function pt(e){try{let t=new URL(e);return t.origin==="null"?null:t.origin}catch{return null}}var mt=["javascript:","data:","vbscript:"];function Te(e){let t;try{t=new URL(e)}catch{return!0}return!mt.includes(t.protocol)}var Re={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&Te(e.data.url)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};var yt=()=>typeof window>"u",Et=G;function we(e,t){if(typeof window>"u")return;let r=e.get();r.data!==null||t===null||e.set({...r,data:t,error:null,isPending:!1})}function Se(e){return typeof e=="object"&&e!==null&&"data"in e&&"error"in e?e:{data:e,error:null}}function vt(e){return!e||e.session===null&&e.user===null?null:e}function gt(e,t){return j(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function Oe(e,t){let r=x(!1),n,o=0,s=0;r.listen(()=>{s++,o=0});let u=f=>i(f),l=ye({data:null,error:null,isPending:!0,isRefetching:!1,refetch:u});he(l,gt);let a=async(f,v)=>{let d=l.value;if(l.set({...d,isPending:d.data===null,isRefetching:!0,error:null,refetch:u}),f.aborted)return"aborted";try{let b=await e("/get-session",{method:"GET",query:v?.query,signal:f});if(f.aborted)return"aborted";let{data:h,error:R}=Se(b),y="fresh";if(h?.needsRefresh)try{let p=await e("/get-session",{method:"POST",signal:f});if(f.aborted)return"aborted";({data:h,error:R}=Se(p))}catch{if(f.aborted)return"aborted";y="stale"}if(R){let p=l.value,N=R?.status===401;return l.set({data:N?null:p.data,error:R,isPending:!1,isRefetching:!1,refetch:u}),"failed"}let A=vt(h),S=l.value,L=S.data!=null&&A!=null&&j(S.data,A)?S.data:A;return l.set({data:L,error:null,isPending:!1,isRefetching:!1,refetch:u}),y}catch(b){if(f.aborted)return"aborted";let h=l.value;return l.set({data:h.data,error:b,isPending:!1,isRefetching:!1,refetch:u}),"failed"}},c=()=>{let f=l.value.data?.session?.expiresAt,v=f instanceof Date?f.getTime():Number.POSITIVE_INFINITY;return Math.min(Date.now()+Et,v)},i=f=>{o=0,n?.cancel();let v=new AbortController,d={cancel:()=>v.abort(),promise:Promise.resolve().then(()=>v.signal.aborted?"aborted":a(v.signal,f)),revision:s};n=d;let b=h=>{n===d&&(n=void 0,h==="fresh"&&d.revision===s&&(o=c()))};return d.promise.then(b,()=>b("failed")),d.promise.then(()=>{})},m=()=>n?.revision===s?n.promise.then(()=>{}):Date.now()<o?Promise.resolve():i(),g=()=>{};return te(l,()=>{let f;yt()||(f=setTimeout(()=>{m()},0));let v=Ee({fetchSession:i,shouldPollSession:()=>l.value.data!=null,sessionSignal:r,options:t});return v.init(),g=v.broadcastSessionUpdate,()=>{f&&clearTimeout(f),v.cleanup()}}),{session:l,$sessionSignal:r,broadcastSessionUpdate:f=>g(f)}}function ie(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function ae(e,t,r=".",n){if(!ie(t))return ae(e,{},r,n);let o={...t};for(let s of Object.keys(e)){if(s==="__proto__"||s==="constructor")continue;let u=e[s];u!=null&&(n&&n(o,s,u,r)||(Array.isArray(u)&&Array.isArray(o[s])?o[s]=[...u,...o[s]]:ie(u)&&ie(o[s])?o[s]=ae(u,o[s],(r?`${r}.`:"")+s.toString(),n):o[s]=u))}return o}function ue(e){return(...t)=>t.reduce((r,n)=>ae(r,n,"",e),{})}var Ae=ue(),zr=ue((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),Yr=ue((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0});var bt=class extends Error{constructor(e,t,r){super(t||e.toString(),{cause:r}),this.status=e,this.statusText=t,this.error=r,Error.captureStackTrace(this,this.constructor)}},Tt=async(e,t)=>{let r=t||{},n={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:r,hooks:n};for(let i of t?.plugins||[]){var o,s,u,l,a;if(i.init){var c;let m=await((c=i.init)===null||c===void 0?void 0:c.call(i,e.toString(),r));r=m.options||r,e=m.url}n.onRequest.push((o=i.hooks)===null||o===void 0?void 0:o.onRequest),n.onResponse.push((s=i.hooks)===null||s===void 0?void 0:s.onResponse),n.onSuccess.push((u=i.hooks)===null||u===void 0?void 0:u.onSuccess),n.onError.push((l=i.hooks)===null||l===void 0?void 0:l.onError),n.onRetry.push((a=i.hooks)===null||a===void 0?void 0:a.onRetry)}return{url:e,options:r,hooks:n}},Le=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},Rt=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function St(e){if(typeof e=="number")return new Le({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new Le(e);case"exponential":return new Rt(e);default:throw new Error("Invalid retry strategy")}}var wt=["get","post","put","patch","delete"];function ce(e){if(!e.startsWith("@"))return{method:void 0,path:e};let t=e.indexOf("/"),r=e.slice(1,t===-1?void 0:t);return wt.includes(r)?{method:r,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}var Ot=e=>e==="."||e==="..",At=e=>e.split(":").map(t=>encodeURIComponent(t)).join(":");function Lt(e,t){let r=t.get(e);if(r===void 0)return At(e);if(Ot(r))throw new TypeError("Path parameters cannot be reserved path segments");return encodeURIComponent(r)}function Ut(e,t){let{baseURL:r,params:n,query:o}=t||{query:{},params:{},baseURL:""},s=e.startsWith("http")?e.split("/").slice(0,3).join("/"):r||"",{path:u}=ce(e);u!==e&&(e=`/${u}`),s.endsWith("/")||(s+="/");let[l,a]=e.replace(s,"").split("?"),c=new URLSearchParams(a);for(let[g,f]of Object.entries(o||{})){if(f==null)continue;let v;if(typeof f=="string")v=f;else if(Array.isArray(f)){for(let d of f)c.append(g,d);continue}else v=JSON.stringify(f);c.set(g,v)}let i=new Map;if(n)if(Array.isArray(n)){let g=l.split("/").filter(f=>f.startsWith(":"));for(let[f,v]of g.entries()){let d=n[f];i.set(v,String(d))}}else for(let[g,f]of Object.entries(n))i.set(`:${g}`,String(f));l=l.split("/").map(g=>Lt(g,i)).join("/"),l=l.replace(/^\/+/,"");let m=c.toString();return m=m.length>0?`?${m}`.replace(/\+/g,"%20"):"",s.startsWith("http")?new URL(`${l}${m}`,s):`${s}${l}${m}`}var _t=async e=>{let t={},r=async n=>typeof n=="function"?await n():n;if(e?.auth){if(e.auth.type==="Bearer"){let n=await r(e.auth.token);if(!n)return t;t.authorization=`Bearer ${n}`}else if(e.auth.type==="Basic"){let[n,o]=await Promise.all([r(e.auth.username),r(e.auth.password)]);if(!n||!o)return t;t.authorization=`Basic ${btoa(`${n}:${o}`)}`}else if(e.auth.type==="Custom"){let[n,o]=await Promise.all([r(e.auth.prefix),r(e.auth.value)]);if(!o)return t;t.authorization=`${n??""} ${o}`}}return t},Pt=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Nt(e){let t=e.headers.get("content-type"),r=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";let n=t.split(";").shift()||"";return Pt.test(n)?"json":r.has(n)||n.startsWith("text/")?"text":"blob"}function It(e){try{return JSON.parse(e),!0}catch{return!1}}function Ne(e){if(e===void 0)return!1;let t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function Ue(e){try{return JSON.parse(e)}catch{return e}}function _e(e){return typeof e=="function"}function Ct(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&_e(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&_e(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}function Ie(...e){let t={};for(let r of e)if(r)if(r instanceof Headers)r.forEach((n,o)=>{t[o]=n});else{let n=Array.isArray(r)?r:Object.entries(r);for(let[o,s]of n)s!=null&&(t[o]=s)}return t}async function Dt(e){let t=new Headers(Ie(e?.headers,await _t(e)));if(!t.has("content-type")){let r=xt(e?.body);r&&t.set("content-type",r)}return t}function xt(e){return Ne(e)?"application/json":null}function jt(e){let t=e.get("content-type");return t?t.split(";")[0].trim().toLowerCase():null}function Mt(e,t){let{body:r}=e;return r?!Ne(r)||typeof r=="string"?r:jt(t)==="application/x-www-form-urlencoded"?new URLSearchParams(r).toString():JSON.stringify(r):null}function Ft(e,t){if(t?.method)return t.method.toUpperCase();let{method:r}=ce(e);return r?r.toUpperCase():t?.body?"POST":"GET"}function qt(e,t){let r;return!e?.signal&&e?.timeout&&(r=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:r,clearTimeout:()=>{r&&clearTimeout(r)}}}var Bt=class Ce extends Error{constructor(t,r){super(r||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,Ce.prototype)}};async function q(e,t){let r=await e["~standard"].validate(t);if(r.issues)throw new Bt(r.issues);return r.value}function B(e){"@babel/helpers - typeof";return B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(e)}function kt(e,t){if(B(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(B(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ht(e){var t=kt(e,"string");return B(t)=="symbol"?t:t+""}function Vt(e,t,r){return(t=Ht(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function E(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pe(Object(r),!0).forEach(function(n){Vt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var le=async(e,t)=>{var r,n,o;let{hooks:s,url:u,options:l}=await Tt(e,t),a=Ct(l),c=new AbortController,i=(r=l.signal)!==null&&r!==void 0?r:c.signal,m=Ut(u,l),g=await Dt(l),f=Mt(l,g),v=Ft(u,l),d=E(E({},l),{},{url:m,headers:g,body:f,method:v,signal:i});for(let w of s.onRequest)if(w){let T=await w(d);typeof T=="object"&&T!==null&&Object.assign(d,T)}("pipeTo"in d&&typeof d.pipeTo=="function"||typeof(t==null||(n=t.body)===null||n===void 0?void 0:n.pipe)=="function")&&("duplex"in d||(d.duplex="half"));let{clearTimeout:b}=qt(l,c),h=await a(d.url,d);b();let R={response:h,request:d};for(let w of s.onResponse)if(w){var y;let T=await w(E(E({},R),{},{response:!(t==null||(y=t.hookOptions)===null||y===void 0)&&y.cloneResponse?h.clone():h}));T instanceof Response?h=T:typeof T=="object"&&T!==null&&(h=T.response)}if(h.ok){if(d.method==="HEAD")return{data:"",error:null};let w=Nt(h),T={data:null,response:h,request:d};if(w==="json"||w==="text"){var A;let I=await h.text();T.data=await((A=d.jsonParser)!==null&&A!==void 0?A:Ue)(I)}else T.data=await h[w]();d?.output&&d.output&&!d.disableValidation&&(T.data=await q(d.output,T.data));for(let I of s.onSuccess)if(I){var S;await I(E(E({},T),{},{response:!(t==null||(S=t.hookOptions)===null||S===void 0)&&S.cloneResponse?h.clone():h}))}return t?.throw?T.data:{data:T.data,error:null}}let L=(o=t?.jsonParser)!==null&&o!==void 0?o:Ue,p=await h.text(),N=It(p),$=N?await L(p):null,Be={response:h,responseText:p,request:d,error:E(E({},$),{},{status:h.status,statusText:h.statusText})};for(let w of s.onError)if(w){var Q;await w(E(E({},Be),{},{response:!(t==null||(Q=t.hookOptions)===null||Q===void 0)&&Q.cloneResponse?h.clone():h}))}if(t?.retry){var K;let w=St(t.retry),T=(K=t.retryAttempt)!==null&&K!==void 0?K:0;if(await w.shouldAttemptRetry(T,h)){for(let k of s.onRetry)k&&await k(R);let I=w.getDelay(T);return await new Promise(k=>setTimeout(k,I)),await le(e,E(E({},t),{},{retryAttempt:T+1}))}}if(t?.throw)throw new bt(h.status,h.statusText,N?$:p);return{data:null,error:E(E({},$),{},{status:h.status,statusText:h.statusText})}},Wt=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,r){var n;let o=E(E({},r),e.query!==void 0&&{query:E(E({},e.query),r?.query)}),s=((n=e.plugins)===null||n===void 0||(n=n.find(c=>{var i;return!((i=c.schema)===null||i===void 0)&&i.config?t.startsWith(c.schema.config.baseURL||"")||t.startsWith(c.schema.config.prefix||""):!1}))===null||n===void 0?void 0:n.schema)||e.schema;if(s){var u,l;let c=t;!((u=s.config)===null||u===void 0)&&u.prefix&&c.startsWith(s.config.prefix)&&(c=c.replace(s.config.prefix,""),s.config.baseURL&&(t=t.replace(s.config.prefix,s.config.baseURL))),!((l=s.config)===null||l===void 0)&&l.baseURL&&c.startsWith(s.config.baseURL)&&(c=c.replace(s.config.baseURL,"")),c.startsWith("/")&&c.charAt(1)==="@"&&(c=c.substring(1));let i=s.schema[c];if(i){var a;let{method:m,path:g}=ce(c);m&&(t=t.slice(0,t.length-c.length)+g);let f=r?.headers;if(i.headers&&!r?.disableValidation){let d={};if(r?.headers){if(r.headers instanceof Headers)r.headers.forEach((R,y)=>{d[y.toLowerCase()]=R});else if(typeof r.headers=="object")for(let[R,y]of Object.entries(r.headers))y!=null&&(d[R.toLowerCase()]=y)}let b=await q(i.headers,d),h={};for(let[R,y]of Object.entries(b))h[R.toLowerCase()]=y;f=h}let v=(a=i.method)!==null&&a!==void 0?a:m;if(o=E(E(E(E({},o),v!==void 0&&{method:v}),i.output!==void 0&&{output:i.output}),f!==void 0&&{headers:f}),!r?.disableValidation){if(i.query&&(o.query=await q(i.query,r?.query),o.query!==null&&typeof o.query=="object")){let d=E({},e.query);for(let b of Object.keys(d))r?.query&&Object.prototype.hasOwnProperty.call(r.query,b)&&(d[b]=r.query[b]);o.query=E(E({},d),o.query)}o=E(E({},o),{},{body:i.input?await q(i.input,r?.body):r?.body,params:i.params?await q(i.params,r?.params):r?.params})}return{url:t,options:o}}}return E({url:t},(r!==void 0||e.query!==void 0)&&{options:o})}}),De=e=>{async function t(r,n){let o=E(E(E({},e),n),{},{headers:Ie(e?.headers,n?.headers),plugins:[...e?.plugins||[],Wt(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await le(r,o)}catch(s){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:s}}}return await le(r,o)}return t};var Gt=e=>{if(typeof process>"u")return;let t=e??"/api/auth";if(process.env.NEXT_PUBLIC_AUTH_URL)return process.env.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(process.env.NEXTAUTH_URL)try{return process.env.NEXTAUTH_URL}catch{}if(process.env.VERCEL_URL)try{let r=process.env.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${r}${process.env.VERCEL_URL}`).origin}${t}`}catch{}}},zt=e=>e==="/sign-out"||e==="/update-user"||e==="/update-session"||e==="/sign-up/email"||e==="/sign-in/email"||e==="/delete-user"||e==="/verify-email"||e==="/revoke-sessions"||e==="/revoke-session"||e==="/revoke-other-sessions"||e==="/change-email"||e==="/change-password",xe=(e,t)=>{let r="credentials"in Request.prototype,n=be(e?.baseURL,e?.basePath,void 0,t)??Gt(e?.basePath)??"/api/auth",o=e?.plugins?.flatMap(p=>p.fetchPlugins).filter(p=>p!==void 0)||[],s={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:u,onError:l,onRequest:a,onResponse:c,...i}=e?.fetchOptions||{},m=De({baseURL:n,...r?{credentials:"include"}:{},method:"GET",jsonParser(p){return p?me(p,{strict:!1}):null},customFetchImpl:fetch,...i,plugins:[s,...i.plugins||[],...e?.disableDefaultFetchPlugins?[]:[Re],...o]}),{$sessionSignal:g,session:f,broadcastSessionUpdate:v}=Oe(m,e),d=!1,b=p=>{d||p===null||(d=!0,we(f,p))},h=e?.plugins||[],R={},y={$sessionSignal:g,session:f},A={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},S=[{signal:"$sessionSignal",matcher:zt,callback(p){p==="/sign-out"?v("signout"):(p==="/update-user"||p==="/update-session")&&v("updateUser")}}];for(let p of h)p.getAtoms&&Object.assign(y,p.getAtoms?.(m)),p.pathMethods&&Object.assign(A,p.pathMethods),p.atomListeners&&S.push(...p.atomListeners);let L={notify:p=>{y[p].set(!y[p].get())},listen:(p,N)=>{y[p].subscribe(N)},atoms:y};for(let p of h)p.getActions&&(R=Ae(p.getActions?.(m,L,e)??{},R));return{get baseURL(){return n},pluginsActions:R,pluginsAtoms:y,pluginPathMethods:A,atomListeners:S,hydrateSession:b,$sessionSignal:g,$fetch:m,$store:L}};function je(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function Me(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Yt=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,Jt=/['\u2019]/g;function $t(e){return e.replace(Jt,"").match(Yt)??[]}function Fe(e){return $t(e).map(t=>t.toLowerCase()).join("-")}function Qt(e,t,r){let n=t[e],{fetchOptions:o,query:s,...u}=r||{};return n||(o?.method?o.method:u&&Object.keys(u).length>0?"POST":"GET")}function qe(e,t,r,n,o){function s(u=[]){return new Proxy(function(){},{get(l,a){if(typeof a!="string"||a==="then"||a==="catch"||a==="finally")return;let c=[...u,a],i=e;for(let m of c)if(i&&typeof i=="object"&&m in i)i=i[m];else{i=void 0;break}return typeof i=="function"||je(i)?i:s(c)},apply:async(l,a,c)=>{let i="/"+u.map(Fe).join("/"),m=c[0]||{},g=c[1]||{},{query:f,fetchOptions:v,...d}=m,b={...g,...v},h=Qt(i,r,m);return await t(i,{...b,body:h==="GET"?void 0:{...d,...b?.body||{}},query:f||b?.query,method:h,async onSuccess(R){if(await b?.onSuccess?.(R),!o||b.disableSignal)return;let y=o.filter(S=>S.matcher(i));if(!y.length)return;let A=new Set;for(let S of y){let L=n[S.signal];if(!L)return;if(A.has(S.signal))continue;A.add(S.signal);let p=L.get();setTimeout(()=>{L.set(!p)},10),S.callback?.(i)}}})}})}return s()}function J(e){let{pluginPathMethods:t,pluginsActions:r,pluginsAtoms:n,hydrateSession:o,$fetch:s,atomListeners:u,$store:l}=xe(e),a={};for(let[c,i]of Object.entries(n))a[`use${Me(c)}`]=i;return qe({...r,...a,hydrateSession:o,$fetch:s,$store:l},s,t,n,u)}var Kt=async e=>{switch(e){case"oauth2":{let t=J({baseURL:window.location.origin,basePath:"/auth"}),{data:r,error:n}=await t.signIn.social({provider:e,callbackURL:"/auth/loginDone",errorCallbackURL:"/auth/loginDialog"});break}case"github":case"google":{let t=J({baseURL:window.location.origin+"/auth"}),{data:r,error:n}=await t.signIn.social({provider:e,callbackURL:"/auth/loginDone",errorCallbackURL:"/auth/loginDialog"});break}default:console.log(`Provider ${e} not recognised.`)}};window.signIn=Kt;})();
|
|
4
|
+
at `))}function dt(e,t){class r extends e{#e;constructor(...o){if(ct()){let a=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...o),Error.stackTraceLimit=a}else super(...o);let s=new Error().stack;s&&(this.#e=ft(s.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(r.prototype,"constructor",{get(){return t},enumerable:!1,configurable:!0}),r}var ht={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511},pt=class extends Error{status;body;headers;statusCode;constructor(e="INTERNAL_SERVER_ERROR",t=void 0,r={},n=typeof e=="number"?e:ht[e]){if(super(t?.message,t&&"cause"in t?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=r,this.statusCode=n,this.name="APIError",this.status=e,this.headers=r,this.statusCode=n,t&&"cause"in t){let{cause:o,...s}=t;this.body=Object.defineProperty(s,"cause",{value:o,writable:!0,configurable:!0});return}this.body=t}};var mt=dt(pt,Error);var C=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}};var yt=47;function Re(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===yt;)t--;return t===e.length?e:e.slice(0,t)}function vt(e){try{return(Re(new URL(e).pathname)||"/")!=="/"}catch{throw new C(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function Et(e){try{let t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new C(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof C?t:new C(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function B(e,t="/api/auth"){if(Et(e),vt(e))return e;let r=Re(e);return!t||t==="/"?r:(t=t.startsWith("/")?t:`/${t}`,`${r}${t}`)}function Te(e,t){return!e||e.trim()===""?!1:t==="proto"?e==="http"||e==="https":t==="host"?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(r=>r.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function Se(e,t,r,n,o){if(e)return B(e,t);if(n!==!1){let u=U.BETTER_AUTH_URL||U.NEXT_PUBLIC_BETTER_AUTH_URL||U.PUBLIC_BETTER_AUTH_URL||U.NUXT_PUBLIC_BETTER_AUTH_URL||U.NUXT_PUBLIC_AUTH_URL||(U.BASE_URL!=="/"?U.BASE_URL:void 0);if(u)return B(u,t)}let s=r?.headers.get("x-forwarded-host"),a=r?.headers.get("x-forwarded-proto");if(s&&a&&o&&Te(a,"proto")&&Te(s,"host"))try{return B(`${a}://${s}`,t)}catch{}if(r){let u=gt(r.url);if(!u)throw new C("Could not get origin from request. Please provide a valid base URL.");return B(u,t)}if(typeof window<"u"&&window.location)return B(window.location.origin,t)}function gt(e){try{let t=new URL(e);return t.origin==="null"?null:t.origin}catch{return null}}var bt=["javascript:","data:","vbscript:"];function we(e){let t;try{t=new URL(e)}catch{return!0}return!bt.includes(t.protocol)}var Oe={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&we(e.data.url)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};var Tt=()=>typeof window>"u",Rt=G;function Le(e,t){if(typeof window>"u")return;let r=e.get();r.data!==null||t===null||e.set({...r,data:t,error:null,isPending:!1})}function Ae(e){return typeof e=="object"&&e!==null&&"data"in e&&"error"in e?e:{data:e,error:null}}function St(e){return!e||e.session===null&&e.user===null?null:e}function wt(e,t){return j(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function Ue(e,t){let r=x(!1),n,o=0,s=0;r.listen(()=>{s++,o=0});let a=p=>l(p),u=ve({data:null,error:null,isPending:!0,isRefetching:!1,refetch:a});pe(u,wt);let i=async(p,g)=>{let f=u.value;if(u.set({...f,isPending:f.data===null,isRefetching:!0,error:null,refetch:a}),p.aborted)return"aborted";try{let E=await e("/get-session",{method:"GET",query:g?.query,signal:p});if(p.aborted)return"aborted";let{data:d,error:R}=Ae(E),m="fresh";if(d?.needsRefresh)try{let h=await e("/get-session",{method:"POST",body:{},signal:p});if(p.aborted)return"aborted";({data:d,error:R}=Ae(h))}catch{if(p.aborted)return"aborted";m="stale"}if(R){let h=u.value,N=R?.status===401;return u.set({data:N?null:h.data,error:R,isPending:!1,isRefetching:!1,refetch:a}),"failed"}let A=St(d),S=u.value,L=S.data!=null&&A!=null&&j(S.data,A)?S.data:A;return u.set({data:L,error:null,isPending:!1,isRefetching:!1,refetch:a}),m}catch(E){if(p.aborted)return"aborted";let d=u.value;return u.set({data:d.data,error:E,isPending:!1,isRefetching:!1,refetch:a}),"failed"}},c=()=>{let p=u.value.data?.session?.expiresAt,g=p instanceof Date?p.getTime():Number.POSITIVE_INFINITY;return Math.min(Date.now()+Rt,g)},l=p=>{o=0,n?.cancel();let g=new AbortController,f={cancel:()=>g.abort(),promise:Promise.resolve().then(()=>g.signal.aborted?"aborted":i(g.signal,p)),revision:s};n=f;let E=d=>{n===f&&(n=void 0,d==="fresh"&&f.revision===s&&(o=c()))};return f.promise.then(E,()=>E("failed")),f.promise.then(()=>{})},v=()=>n?.revision===s?n.promise.then(()=>{}):Date.now()<o?Promise.resolve():l(),b=()=>{};return te(u,()=>{let p;Tt()||(p=setTimeout(()=>{v()},0));let g=Ee({fetchSession:l,shouldPollSession:()=>u.value.data!=null,sessionSignal:r,options:t});return g.init(),b=g.broadcastSessionUpdate,()=>{p&&clearTimeout(p),g.cleanup()}}),{session:u,$sessionSignal:r,broadcastSessionUpdate:p=>b(p)}}function ie(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function ae(e,t,r=".",n){if(!ie(t))return ae(e,{},r,n);let o={...t};for(let s of Object.keys(e)){if(s==="__proto__"||s==="constructor")continue;let a=e[s];a!=null&&(n&&n(o,s,a,r)||(Array.isArray(a)&&Array.isArray(o[s])?o[s]=[...a,...o[s]]:ie(a)&&ie(o[s])?o[s]=ae(a,o[s],(r?`${r}.`:"")+s.toString(),n):o[s]=a))}return o}function le(e){return(...t)=>t.reduce((r,n)=>ae(r,n,"",e),{})}var Pe=le(),on=le((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),sn=le((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0});var Ot=class extends Error{constructor(e,t,r){super(t||e.toString(),{cause:r}),this.status=e,this.statusText=t,this.error=r,Error.captureStackTrace(this,this.constructor)}},At=async(e,t)=>{let r=t||{},n={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:r,hooks:n};for(let l of t?.plugins||[]){var o,s,a,u,i;if(l.init){var c;let v=await((c=l.init)===null||c===void 0?void 0:c.call(l,e.toString(),r));r=v.options||r,e=v.url}n.onRequest.push((o=l.hooks)===null||o===void 0?void 0:o.onRequest),n.onResponse.push((s=l.hooks)===null||s===void 0?void 0:s.onResponse),n.onSuccess.push((a=l.hooks)===null||a===void 0?void 0:a.onSuccess),n.onError.push((u=l.hooks)===null||u===void 0?void 0:u.onError),n.onRetry.push((i=l.hooks)===null||i===void 0?void 0:i.onRetry)}return{url:e,options:r,hooks:n}},_e=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},Lt=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function Ut(e){if(typeof e=="number")return new _e({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new _e(e);case"exponential":return new Lt(e);default:throw new Error("Invalid retry strategy")}}var Pt=["get","post","put","patch","delete"];function fe(e){if(!e.startsWith("@"))return{method:void 0,path:e};let t=e.indexOf("/"),r=e.slice(1,t===-1?void 0:t);return Pt.includes(r)?{method:r,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}var De=/^[a-z][a-z\d+.-]*:\/\/[^/?#]+/i,_t=/^\/+/;function xe(e){let t=e.length;for(;t>0&&e[t-1]==="/";)t--;return e.slice(0,t)}function ue(e,t){let r=e.indexOf(t);return r===-1?[e,void 0]:[e.slice(0,r),e.slice(r+1)]}var Nt=e=>e==="."||e==="..",It=e=>e.split(":").map(t=>encodeURIComponent(t)).join(":");function Ct(e,t){let r=t.get(e);if(r===void 0)return It(e);if(Nt(r))throw new TypeError("Path parameters cannot be reserved path segments");return encodeURIComponent(r)}function Dt(e,t){let r=new Map;if(t)if(Array.isArray(t)){let n=e.split("/").filter(o=>o.startsWith(":"));for(let[o,s]of n.entries()){let a=t[o];r.set(s,String(a))}}else for(let[n,o]of Object.entries(t))r.set(`:${n}`,String(o));return r}function xt(e,t){let r=Dt(e,t);return e.split("/").map(n=>Ct(n,r)).join("/")}function jt(e,t){let r=new URLSearchParams(e);for(let[o,s]of Object.entries(t||{})){if(s==null)continue;let a;if(typeof s=="string")a=s;else if(Array.isArray(s)){for(let u of s)r.append(o,u);continue}else a=JSON.stringify(s);r.set(o,a)}let n=r.toString();return n.length>0?`?${n}`.replace(/\+/g,"%20"):""}function Mt(e,t){if(!t)return e;let r=`${xe(t)}/`;return e.startsWith(r)?e.slice(r.length):e}function Bt(e,t,r,n){let[o]=ue(e,"#"),[s,a=""]=ue(o,"?"),u=t.replace(_t,""),i=jt(`${a}&${r??""}`,n),c=`${xe(s)}/${u}${i}`;return De.test(c)?new URL(c):c}function kt(e,t){var r,n;let{baseURL:o,params:s,query:a}=t||{query:{},params:{},baseURL:""},{path:u}=fe(e),i=u===e?e:`/${u}`,c=(r=i.match(De))===null||r===void 0?void 0:r[0],[l,v]=ue(c?i.slice(c.length):Mt(i,o),"?"),b=xt(l,s);return Bt((n=c??o)!==null&&n!==void 0?n:"",b,v,a)}var Ft=async e=>{let t={},r=async n=>typeof n=="function"?await n():n;if(e?.auth){if(e.auth.type==="Bearer"){let n=await r(e.auth.token);if(!n)return t;t.authorization=`Bearer ${n}`}else if(e.auth.type==="Basic"){let[n,o]=await Promise.all([r(e.auth.username),r(e.auth.password)]);if(!n||!o)return t;t.authorization=`Basic ${btoa(`${n}:${o}`)}`}else if(e.auth.type==="Custom"){let[n,o]=await Promise.all([r(e.auth.prefix),r(e.auth.value)]);if(!o)return t;t.authorization=`${n??""} ${o}`}}return t},qt=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Ht(e){let t=e.headers.get("content-type"),r=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";let n=t.split(";").shift()||"";return qt.test(n)?"json":r.has(n)||n.startsWith("text/")?"text":"blob"}function Vt(e){try{return JSON.parse(e),!0}catch{return!1}}function je(e){if(e===void 0)return!1;let t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function Ne(e){try{return JSON.parse(e)}catch{return e}}function Ie(e){return typeof e=="function"}function Wt(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&Ie(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&Ie(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}function Me(e){return e?["POST","PUT","PATCH","DELETE"].includes(e.toUpperCase()):!1}function Be(...e){let t={};for(let r of e)if(r)if(r instanceof Headers)r.forEach((n,o)=>{t[o]=n});else{let n=Array.isArray(r)?r:Object.entries(r);for(let[o,s]of n)s!=null&&(t[o]=s)}return t}async function Gt(e){let t=new Headers(Be(e?.headers,await Ft(e)));if(!t.has("content-type")){let r=zt(e?.body);r&&t.set("content-type",r)}return t}function zt(e){return je(e)?"application/json":null}function Yt(e){let t=e.get("content-type");return t?t.split(";")[0].trim().toLowerCase():null}function $t(e,t){let{body:r}=e;return r?!je(r)||typeof r=="string"?r:Yt(t)==="application/x-www-form-urlencoded"?new URLSearchParams(r).toString():JSON.stringify(r):null}function Jt(e,t){if(t?.method)return t.method.toUpperCase();let{method:r}=fe(e);return r?r.toUpperCase():t?.body?"POST":"GET"}function Qt(e,t){let r;return!e?.signal&&e?.timeout&&(r=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:r,clearTimeout:()=>{r&&clearTimeout(r)}}}var Kt=class ke extends Error{constructor(t,r){super(r||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,ke.prototype)}};async function k(e,t){let r=await e["~standard"].validate(t);if(r.issues)throw new Kt(r.issues);return r.value}function F(e){"@babel/helpers - typeof";return F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F(e)}function Xt(e,t){if(F(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(F(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zt(e){var t=Xt(e,"string");return F(t)=="symbol"?t:t+""}function er(e,t,r){return(t=Zt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ce(Object(r),!0).forEach(function(n){er(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ce(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ce=async(e,t)=>{var r,n,o;let{hooks:s,url:a,options:u}=await At(e,t),i=Wt(u),c=new AbortController,l=(r=u.signal)!==null&&r!==void 0?r:c.signal,v=kt(a,u),b=await Gt(u),p=$t(u,b),g=Jt(a,u),f=y(y({},u),{},{url:v,headers:b,body:p,method:g,signal:l});for(let w of s.onRequest)if(w){let T=await w(f);typeof T=="object"&&T!==null&&Object.assign(f,T)}("pipeTo"in f&&typeof f.pipeTo=="function"||typeof(t==null||(n=t.body)===null||n===void 0?void 0:n.pipe)=="function")&&("duplex"in f||(f.duplex="half"));let{clearTimeout:E}=Qt(u,c),d=await i(f.url,f);E();let R={response:d,request:f};for(let w of s.onResponse)if(w){var m;let T=await w(y(y({},R),{},{response:!(t==null||(m=t.hookOptions)===null||m===void 0)&&m.cloneResponse?d.clone():d}));T instanceof Response?d=T:typeof T=="object"&&T!==null&&(d=T.response)}if(d.ok){if(f.method==="HEAD")return{data:"",error:null};let w=Ht(d),T={data:null,response:d,request:f};if(w==="json"||w==="text"){var A;let I=await d.text();T.data=await((A=f.jsonParser)!==null&&A!==void 0?A:Ne)(I)}else T.data=await d[w]();f?.output&&f.output&&!f.disableValidation&&(T.data=await k(f.output,T.data));for(let I of s.onSuccess)if(I){var S;await I(y(y({},T),{},{response:!(t==null||(S=t.hookOptions)===null||S===void 0)&&S.cloneResponse?d.clone():d}))}return t?.throw?T.data:{data:T.data,error:null}}let L=(o=t?.jsonParser)!==null&&o!==void 0?o:Ne,h=await d.text(),N=Vt(h),J=N?await L(h):null,ze={response:d,responseText:h,request:f,error:y(y({},J),{},{status:d.status,statusText:d.statusText})};for(let w of s.onError)if(w){var Q;await w(y(y({},ze),{},{response:!(t==null||(Q=t.hookOptions)===null||Q===void 0)&&Q.cloneResponse?d.clone():d}))}if(t?.retry){var K;let w=Ut(t.retry),T=(K=t.retryAttempt)!==null&&K!==void 0?K:0;if(await w.shouldAttemptRetry(T,d)){for(let q of s.onRetry)q&&await q(R);let I=w.getDelay(T);return await new Promise(q=>setTimeout(q,I)),await ce(e,y(y({},t),{},{retryAttempt:T+1}))}}if(t?.throw)throw new Ot(d.status,d.statusText,N?J:h);return{data:null,error:y(y({},J),{},{status:d.status,statusText:d.statusText})}},tr=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,r){var n;let o=y(y({},r),e.query!==void 0&&{query:y(y({},e.query),r?.query)}),s=((n=e.plugins)===null||n===void 0||(n=n.find(c=>{var l;return!((l=c.schema)===null||l===void 0)&&l.config?t.startsWith(c.schema.config.baseURL||"")||t.startsWith(c.schema.config.prefix||""):!1}))===null||n===void 0?void 0:n.schema)||e.schema;if(s){var a,u;let c=t;!((a=s.config)===null||a===void 0)&&a.prefix&&c.startsWith(s.config.prefix)&&(c=c.replace(s.config.prefix,""),s.config.baseURL&&(t=t.replace(s.config.prefix,s.config.baseURL))),!((u=s.config)===null||u===void 0)&&u.baseURL&&c.startsWith(s.config.baseURL)&&(c=c.replace(s.config.baseURL,"")),c.startsWith("/")&&c.charAt(1)==="@"&&(c=c.substring(1));let l=s.schema[c];if(l){var i;let{method:v,path:b}=fe(c);v&&(t=t.slice(0,t.length-c.length)+b);let p=r?.headers;if(l.headers&&!r?.disableValidation){let f={};if(r?.headers){if(r.headers instanceof Headers)r.headers.forEach((R,m)=>{f[m.toLowerCase()]=R});else if(typeof r.headers=="object")for(let[R,m]of Object.entries(r.headers))m!=null&&(f[R.toLowerCase()]=m)}let E=await k(l.headers,f),d={};for(let[R,m]of Object.entries(E))d[R.toLowerCase()]=m;p=d}let g=(i=l.method)!==null&&i!==void 0?i:v;if(o=y(y(y(y({},o),g!==void 0&&{method:g}),l.output!==void 0&&{output:l.output}),p!==void 0&&{headers:p}),!r?.disableValidation){if(l.query&&(o.query=await k(l.query,r?.query),o.query!==null&&typeof o.query=="object")){let f=y({},e.query);for(let E of Object.keys(f))r?.query&&Object.prototype.hasOwnProperty.call(r.query,E)&&(f[E]=r.query[E]);o.query=y(y({},f),o.query)}o=y(y({},o),{},{body:l.input?await k(l.input,r?.body):r?.body,params:l.params?await k(l.params,r?.params):r?.params})}return{url:t,options:o}}}return y({url:t},(r!==void 0||e.query!==void 0)&&{options:o})}}),Fe=e=>{async function t(r,n){let o=y(y(y({},e),n),{},{headers:Be(e?.headers,n?.headers),plugins:[...e?.plugins||[],tr(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await ce(r,o)}catch(s){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:s}}}return await ce(r,o)}return t};var rr=e=>{if(typeof process>"u")return;let t=e??"/api/auth";if(process.env.NEXT_PUBLIC_AUTH_URL)return process.env.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(process.env.NEXTAUTH_URL)try{return process.env.NEXTAUTH_URL}catch{}if(process.env.VERCEL_URL)try{let r=process.env.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${r}${process.env.VERCEL_URL}`).origin}${t}`}catch{}}},nr=e=>e==="/sign-out"||e==="/update-user"||e==="/update-session"||e==="/sign-up/email"||e==="/sign-in/email"||e==="/delete-user"||e==="/verify-email"||e==="/revoke-sessions"||e==="/revoke-session"||e==="/revoke-other-sessions"||e==="/change-email"||e==="/change-password",qe=(e,t)=>{let r="credentials"in Request.prototype,n=Se(e?.baseURL,e?.basePath,void 0,t)??rr(e?.basePath)??"/api/auth",o=e?.plugins?.flatMap(h=>h.fetchPlugins).filter(h=>h!==void 0)||[],s={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:a,onError:u,onRequest:i,onResponse:c,...l}=e?.fetchOptions||{},v=Fe({baseURL:n,...r?{credentials:"include"}:{},method:"GET",jsonParser(h){return h?ye(h,{strict:!1}):null},customFetchImpl:fetch,...l,plugins:[s,...l.plugins||[],...e?.disableDefaultFetchPlugins?[]:[Oe],...o]}),{$sessionSignal:b,session:p,broadcastSessionUpdate:g}=Ue(v,e),f=!1,E=h=>{f||h===null||(f=!0,Le(p,h))},d=e?.plugins||[],R={},m={$sessionSignal:b,session:p},A={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},S=[{signal:"$sessionSignal",matcher:nr,callback(h){h==="/sign-out"?g("signout"):(h==="/update-user"||h==="/update-session")&&g("updateUser")}}];for(let h of d)h.getAtoms&&Object.assign(m,h.getAtoms?.(v)),h.pathMethods&&Object.assign(A,h.pathMethods),h.atomListeners&&S.push(...h.atomListeners);let L={notify:h=>{m[h].set(!m[h].get())},listen:(h,N)=>{m[h].subscribe(N)},atoms:m};for(let h of d)h.getActions&&(R=Pe(h.getActions?.(v,L,e)??{},R));return{get baseURL(){return n},pluginsActions:R,pluginsAtoms:m,pluginPathMethods:A,atomListeners:S,hydrateSession:E,$sessionSignal:b,$fetch:v,$store:L}};function He(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function Ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}var or=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,sr=/['\u2019]/g;function ir(e){return e.replace(sr,"").match(or)??[]}function We(e){return ir(e).map(t=>t.toLowerCase()).join("-")}function Ge(e,t,r,n,o){function s(a=[]){return new Proxy(function(){},{get(u,i){if(typeof i!="string"||i==="then"||i==="catch"||i==="finally")return;let c=[...a,i],l=e;for(let v of c)if(l&&typeof l=="object"&&v in l)l=l[v];else{l=void 0;break}return typeof l=="function"||He(l)?l:s(c)},apply:async(u,i,c)=>{let l="/"+a.map(We).join("/"),v=c[0]||{},b=c[1]||{},{query:p,fetchOptions:g,...f}=v,E={...b,...g},d=r[l]||E.method||(Object.keys(f).length>0?"POST":"GET");return await t(l,{...E,body:Me(d)?{...f,...E?.body||{}}:void 0,query:p||E?.query,method:d,async onSuccess(R){if(await E?.onSuccess?.(R),!o||E.disableSignal)return;let m=o.filter(S=>S.matcher(l));if(!m.length)return;let A=new Set;for(let S of m){let L=n[S.signal];if(!L)return;if(A.has(S.signal))continue;A.add(S.signal);let h=L.get();setTimeout(()=>{L.set(!h)},10),S.callback?.(l)}}})}})}return s()}function $(e){let{pluginPathMethods:t,pluginsActions:r,pluginsAtoms:n,hydrateSession:o,$fetch:s,atomListeners:a,$store:u}=qe(e),i={};for(let[l,v]of Object.entries(n))i[`use${Ve(l)}`]=v;let c={...r,...i,hydrateSession:o,$fetch:s,$store:u};return Ge(c,s,t,n,a)}var ar=async e=>{switch(e){case"oauth2":{let t=$({baseURL:window.location.origin,basePath:"/auth"}),{data:r,error:n}=await t.signIn.social({provider:e,callbackURL:"/auth/loginDone",errorCallbackURL:"/auth/loginDialog"});break}case"github":case"google":{let t=$({baseURL:window.location.origin+"/auth"}),{data:r,error:n}=await t.signIn.social({provider:e,callbackURL:"/auth/loginDone",errorCallbackURL:"/auth/loginDialog"});break}default:console.log(`Provider ${e} not recognised.`)}};window.signIn=ar;})();
|
|
5
5
|
//# sourceMappingURL=auth-dialog.js.map
|