PageSourceSearch

https://www.genflowai.io/_next/static/chunks/73fcba331969b0f6.js?dpl=1790231232519

js genflowai.io collected 2026-09-24 14:03:20 UTC 40,336 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,578938,e=>{"use strict";let t,r,n,o="ba_param";var s,i,a,l=e.i(600141);let u=Object.create(null),c=e=>globalThis.process?.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?u:globalThis),d=new Proxy(u,{get:(e,t)=>c()[t]??u[t],has:(e,t)=>t in c()||t in u,set:(e,t,r)=>(c(!0)[t]=r,!0),deleteProperty(e,t){if(!t)return!1;let r=c(!0);return delete r[t],!0},ownKeys:()=>Object.keys(c(!0))});function f(e,t){return void 0!==l.default&&l.default.env?l.default.env[e]??t:"u">typeof Deno?Deno.env.get(e)??t:"u">typeof Bun?Bun.env[e]??t:t}d.NODE_ENV,Object.freeze({get BETTER_AUTH_SECRET(){return f("BETTER_AUTH_SECRET")},get AUTH_SECRET(){return f("AUTH_SECRET")},get BETTER_AUTH_TELEMETRY(){return f("BETTER_AUTH_TELEMETRY")},get BETTER_AUTH_TELEMETRY_ID(){return f("BETTER_AUTH_TELEMETRY_ID")},get NODE_ENV(){return f("NODE_ENV","development")},get PACKAGE_VERSION(){return f("PACKAGE_VERSION","0.0.0")},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return f("BETTER_AUTH_TELEMETRY_ENDPOINT","")}});let p={eterm:4,cons25:4,console:4,cygwin:4,dtterm:4,gnome:4,hurd:4,jfbterm:4,konsole:4,kterm:4,mlterm:4,mosh:24,putty:4,st:4,"rxvt-unicode-24bit":24,terminator:24,"xterm-kitty":24},E=new Map(Object.entries({APPVEYOR:8,BUILDKITE:8,CIRCLECI:24,DRONE:8,GITEA_ACTIONS:24,GITHUB_ACTIONS:24,GITLAB_CI:8,TRAVIS:8})),_=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/],h="\x1b[0m",O="\x1b[31m",R="\x1b[32m",T="\x1b[33m",A="\x1b[34m",S="\x1b[35m",g=["debug","info","success","warn","error"],y={info:A,success:R,warn:T,error:O,debug:S},v=(t=(void 0)??"warn",r=1!==function(){if(void 0!==f("FORCE_COLOR"))switch(f("FORCE_COLOR")){case"":case"1":case"true":return 4;case"2":return 8;case"3":return 24;default:return 1}if(void 0!==f("NODE_DISABLE_COLORS")&&""!==f("NODE_DISABLE_COLORS")||void 0!==f("NO_COLOR")&&""!==f("NO_COLOR")||"dumb"===f("TERM"))return 1;if(f("TMUX"))return 24;if("TF_BUILD"in d&&"AGENT_NAME"in d)return 4;if("CI"in d){for(let{0:e,1:t}of E)if(e in d)return t;return"codeship"===f("CI_NAME")?8:1}if("TEAMCITY_VERSION"in d)return null!==/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(f("TEAMCITY_VERSION"))?4:1;switch(f("TERM_PROGRAM")){case"iTerm.app":if(!f("TERM_PROGRAM_VERSION")||null!==/^[0-2]\./.exec(f("TERM_PROGRAM_VERSION")))return 8;return 24;case"HyperTerm":case"MacTerm":return 24;case"Apple_Terminal":return 8}if("truecolor"===f("COLORTERM")||"24bit"===f("COLORTERM"))return 24;if(f("TERM")){if(null!==/truecolor/.exec(f("TERM")))return 24;if(null!==/^xterm-256/.exec(f("TERM")))return 8;let e=f("TERM").toLowerCase();if(p[e])return p[e];if(_.some(t=>null!==t.exec(e)))return 4}return f("COLORTERM")?4:1}(),{...Object.fromEntries(g.map(e=>[e,(...[n,...o])=>((e,n,o=[])=>{let s;if(!(g.indexOf(e)>=g.indexOf(t)))return;let i=(s=new Date().toISOString(),r?`\x1b[2m${s}${h} ${y[e]}${e.toUpperCase()}${h} \x1b[1m[Better Auth]:${h} ${n}`:`${s} ${e.toUpperCase()} [Better Auth]: ${n}`);"error"===e?console.error(i,...o):"warn"===e?console.warn(i,...o):console.log(i,...o)})(e,n,o)])),get level(){return t}}),b=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;function m(e){if("string"==typeof e&&b.test(e)){let t=new Date(e);if(!isNaN(t.getTime()))return t}return e}let L="1.6.23";function w(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}w({USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",INVALID_USER:"Invalid user",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",TOKEN_EXPIRED:"Token expired",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists.",USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL:"User already exists. Use another email.",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CHANGE_EMAIL_DISABLED:"Change email is disabled",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account.",CROSS_SITE_
1NAVIGATION_LOGIN_BLOCKED:"Cross-site navigation login blocked. This request appears to be a CSRF attack.",VERIFICATION_EMAIL_NOT_ENABLED:"Verification email isn't enabled",EMAIL_ALREADY_VERIFIED:"Email is already verified",EMAIL_MISMATCH:"Email mismatch",SESSION_NOT_FRESH:"Session is not fresh",LINKED_ACCOUNT_ALREADY_EXISTS:"Linked account already exists",INVALID_ORIGIN:"Invalid origin",INVALID_CALLBACK_URL:"Invalid callbackURL",INVALID_REDIRECT_URL:"Invalid redirectURL",INVALID_ERROR_CALLBACK_URL:"Invalid errorCallbackURL",INVALID_NEW_USER_CALLBACK_URL:"Invalid newUserCallbackURL",MISSING_OR_NULL_ORIGIN:"Missing or null Origin",CALLBACK_URL_REQUIRED:"callbackURL is required",FAILED_TO_CREATE_VERIFICATION:"Unable to create verification",FIELD_NOT_ALLOWED:"Field not allowed to be set",ASYNC_VALIDATION_NOT_SUPPORTED:"Async validation is not supported",VALIDATION_ERROR:"Validation Error",MISSING_FIELD:"Field is required",METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED:"POST method requires deferSessionRefresh to be enabled in session config",BODY_MUST_BE_AN_OBJECT:"Body must be an object",PASSWORD_ALREADY_SET:"User already has a password set"});let I={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};var U=class extends Error{constructor(e="INTERNAL_SERVER_ERROR",t,r={},n="number"==typeof e?e:I[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}};Symbol.for("better-call:api-error-headers"),s=U,i=Error,Object.defineProperty((class e extends s{#e;constructor(...e){if(function(){let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return void 0===e?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,"writable")?e.writable:void 0!==e.set}()){const t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);const t=Error().stack;t&&(this.#e=function(e){let t=e.split("\n    at ");return t.length<=1?e:(t.splice(1,1),t.join("\n    at "))}(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}).prototype,"constructor",{get:()=>i,enumerable:!1,configurable:!0});var N=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}};function D(e){return"OR"===e?"OR":"AND"}function P(e){return Array.isArray(e)}function C(e,t){return"string"==typeof t&&e.includes(t)}function j(e){return{newRole:e=>{var t;return{authorize(e,r="AND"){let n=!1;for(let[o,s]of Object.entries(e)){let e=t[o];if(!e){if("AND"===r)return{success:!1,error:`You are not allowed to access resource: ${o}`};continue}let i=function(e,{actions:t,connector:r}){return 0!==t.length&&("OR"===r?t.some(t=>C(e,t)):t.every(t=>C(e,t)))}(e,function(e){if(P(e))return{actions:e,connector:"AND"};if(!e||"object"!=typeof e)throw new N("Invalid access control request");let{actions:t,connector:r}=e;return P(t)?{actions:t,connector:D(r)}:{actions:[],connector:D(r)}}(s));if(i&&(n=!0),i&&"OR"===r)return{success:!0};if(!i&&"AND"===r)return{success:!1,error:`unauthorized to access resource "${o}"`}}return n?{success:!0}:{success:!1,error:"Not authorized"}},statements:t=e}},statements:e}}let M={user:["create","list","set-role","ban","impersonate","impersonate-admins","delete","set-password","set-email","get","update"],session:["list","revoke","delete"]},F=j(M),x=F.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","set-email","get","update"],session:["list","revoke","delete"]}),Y=F.newRole({user:[],session:[]}),B={admin:x,user:Y},k=w({FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists.",USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL:"User already exists. Use another email.",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application",YOU_ARE_NOT_ALLOWED_TO_GET_USER:"You are not allowed to get user",NO_DATA_TO_UPDATE:"No data to update",YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS:"You are not allowed to update users",YOU_CANNOT_REMOVE_YOURSELF:"You cannot remove yourself",YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE:"You are not allowed to set a non-existent role value",YOU_CANNOT_IMPERSONATE_ADMINS:"You cannot impersonate admins",INVALID_ROLE_TYPE:"Invalid role type",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL:"You are not allowed to update users email",PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER:"Password cannot be updated through update-user. Use the set-user-password endpoint instead"});function V(e){let t=e.length;for(;t>0&&47===e.charCodeAt(t-1);)t--;return t===e.length?e:e.slice(0,t)}function $(e,t="/api/auth"){try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)throw new N(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){if(t instanceof N)throw t;throw new N(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}if(function(e){try{return"/"!==(V(new URL(e).pathname)||"/")}catch{throw new N(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}(e))return e;let r=V(e);return t&&"/"!==t?(t=t.startsWith("/")?t:`/${t}`,`${r}${t}`):r}let W={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},H=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,G={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},q=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/,K=["javascript:","data:","vbscript:"],X={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&function(e){let t;try{t=new URL(e)}catch{return!0}return!K.includes(t.protocol)}(e.data.url)&&"u">typeof window&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},J=(e,t,r,n)=>(e.events=e.events||{},e.events[r+10]||(e.events[r+10]=n(t=>{e.events[r].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[r]=e.events[r]||[],e.events[r].push(t),()=>{let n=e.events[r],o=n.indexOf(t);n.splice(o,1),n.length||(delete e.events[r],e.events[r+10](),delete e.events[r+10])});function z(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function Q(e,t){if(e===t)return!0;
1if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Q(e[r],t[r]))return!1;return!0}if(z(e)&&z(t)){let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(!(n in t)||!Q(e[n],t[n]))return!1;return!0}return!1}let Z=Symbol.for("better-auth:broadcast-channel");var ee=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("u">typeof window)try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:Math.floor(Date.now()/1e3)}))}catch{}}setup(){if("u"<typeof window||void 0===window.addEventListener)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??"{}");t?.event==="session"&&t?.data&&this.listeners.forEach(e=>e(t))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function et(e="better-auth.message"){return globalThis[Z]||(globalThis[Z]=new ee(e)),globalThis[Z]}let er=Symbol.for("better-auth:focus-manager");var en=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("u"<typeof window||"u"<typeof document||void 0===window.addEventListener)return()=>{};let e=()=>{"visible"===document.visibilityState&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function eo(){return globalThis[er]||(globalThis[er]=new en),globalThis[er]}let es=Symbol.for("better-auth:online-manager");var ei=class{listeners=new Set;isOnline="u"<typeof navigator||navigator.onLine;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if("u"<typeof window||void 0===window.addEventListener)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function ea(){return globalThis[es]||(globalThis[es]=new ei),globalThis[es]}let el=()=>Math.floor(Date.now()/1e3),eu=[],ec=0,ed=0,ef=e=>{let t=[],r={get:()=>(r.lc||r.listen(()=>{})(),r.value),init:e,lc:0,listen:e=>(r.lc=t.push(e),()=>{for(let t=ec+4;t<eu.length;)eu[t]===e?eu.splice(t,4):t+=4;let n=t.indexOf(e);~n&&(t.splice(n,1),--r.lc||r.off())}),notify(e,n){ed++;let o=!eu.length;for(let o of t)eu.push(o,r.value,e,n);if(o){for(ec=0;ec<eu.length;ec+=4)eu[ec](eu[ec+1],eu[ec+2],eu[ec+3]);eu.length=0}},off(){},set(e){let t=r.value;t!==e&&(r.value=e,r.notify(t))},subscribe(e){let t=r.listen(e);return e(r.value),t},value:e};return r};function ep(e){return"object"==typeof e&&null!==e&&"data"in e&&"error"in e?e:{data:e,error:null}}function eE(e,t){return Q(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function e_(e){if(null===e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.iterator in e)&&(!(Symbol.toStringTag in e)||"[object Module]"===Object.prototype.toString.call(e))}function eh(e){return(...t)=>t.reduce((t,r)=>(function e(t,r,n=".",o){if(!e_(r))return e(t,{},n,o);let s={...r};for(let r of Object.keys(t)){if("__proto__"===r||"constructor"===r)continue;let i=t[r];null!=i&&(o&&o(s,r,i,n)||(Array.isArray(i)&&Array.isArray(s[r])?s[r]=[...i,...s[r]]:e_(i)&&e_(s[r])?s[r]=e(i,s[r],(n?`${n}.`:"")+r.toString(),o):s[r]=i))}return s})(t,r,"",e),{})}let eO=eh();eh((e,t,r)=>{if(void 0!==e[t]&&"function"==typeof r)return e[t]=r(e[t]),!0}),eh((e,t,r)=>{if(Array.isArray(e[t])&&"function"==typeof r)return e[t]=r(e[t]),!0});var eR=Object.defineProperty,eT=Object.defineProperties,eA=Object.getOwnPropertyDescriptors,eS=Object.getOwnPropertySymbols,eg=Object.prototype.hasOwnProperty,ey=Object.prototype.propertyIsEnumerable,ev=(e,t,r)=>t in e?eR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eb=(e,t)=>{for(var r in t||(t={}))eg.call(t,r)&&ev(e,r,t[r]);if(eS)for(var r of eS(t))ey.call(t,r)&&ev(e,r,t[r]);return e},em=(e,t)=>
1eT(e,eA(t)),eL=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)}},ew=async(e,t)=>{var r,n,o,s,i,a;let l=t||{},u={onRequest:[null==t?void 0:t.onRequest],onResponse:[null==t?void 0:t.onResponse],onSuccess:[null==t?void 0:t.onSuccess],onError:[null==t?void 0:t.onError],onRetry:[null==t?void 0:t.onRetry]};if(!t||!(null==t?void 0:t.plugins))return{url:e,options:l,hooks:u};for(let c of(null==t?void 0:t.plugins)||[]){if(c.init){let n=await (null==(r=c.init)?void 0:r.call(c,e.toString(),t));l=n.options||l,e=n.url}u.onRequest.push(null==(n=c.hooks)?void 0:n.onRequest),u.onResponse.push(null==(o=c.hooks)?void 0:o.onResponse),u.onSuccess.push(null==(s=c.hooks)?void 0:s.onSuccess),u.onError.push(null==(i=c.hooks)?void 0:i.onError),u.onRetry.push(null==(a=c.hooks)?void 0:a.onRetry)}return{url:e,options:l,hooks:u}},eI=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}},eU=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)}},eN=async e=>{let t={},r=async e=>"function"==typeof e?await e():e;if(null==e?void 0:e.auth){if("Bearer"===e.auth.type){let n=await r(e.auth.token);if(!n)return t;t.authorization=`Bearer ${n}`}else if("Basic"===e.auth.type){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("Custom"===e.auth.type){let[n,o]=await Promise.all([r(e.auth.prefix),r(e.auth.value)]);if(!o)return t;t.authorization=`${null!=n?n:""} ${o}`}}return t},eD=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function eP(e){if(void 0===e)return!1;let t=typeof e;return"string"===t||"number"===t||"boolean"===t||null===t||"object"===t&&(!!Array.isArray(e)||!e.buffer&&(e.constructor&&"Object"===e.constructor.name||"function"==typeof e.toJSON))}function eC(e){try{return JSON.parse(e)}catch(t){return e}}function ej(e){return"function"==typeof e}function eM(...e){let t={};for(let r of e)if(r)if(r instanceof Headers)r.forEach((e,r)=>{t[r]=e});else for(let[e,n]of Array.isArray(r)?r:Object.entries(r))null!=n&&(t[e]=n);return t}async function eF(e){let t=new Headers(eM(null==e?void 0:e.headers,await eN(e)));if(!t.has("content-type")){let r=eP(null==e?void 0:e.body)?"application/json":null;r&&t.set("content-type",r)}return t}var ex=class e extends Error{constructor(t,r){super(r||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function eY(e,t){let r=await e["~standard"].validate(t);if(r.issues)throw new ex(r.issues);return r.value}var eB=["get","post","put","patch","delete"],ek=async(e,t)=>{var r,n,o,s,i,a,l,u;let c,{hooks:d,url:f,options:p}=await ew(e,t),E=function(e){if(null==e?void 0:e.customFetchImpl)return e.customFetchImpl;if("u">typeof globalThis&&ej(globalThis.fetch))return globalThis.fetch;if("u">typeof window&&ej(window.fetch))return window.fetch;throw Error("No fetch implementation found")}(p),_=new AbortController,h=null!=(r=p.signal)?r:_.signal,O=function(e,t){let{baseURL:r,params:n,query:o}=t||{query:{},params:{},baseURL:""},s=e.startsWith("http")?e.split("/").slice(0,3).join("/"):r||"";if(e.startsWith("@")){let t=e.toString().split("@")[1].split("/")[0];eB.includes(t)&&(e=e.replace(`@${t}/`,"/"))}s.endsWith("/")||(s+="/");let[i,a]=e.replace(s,"").split("?"),l=new URLSearchParams(a);for(let[e,t]of Object.entries(o||{})){let r;if(null!=t){if("string"==typeof t)r=t;else if(Array.isArray(t)){for(let r of t)l.append(e,r);continue}else r=JSON.stringify(t);l.set(e,r)}}let u=new Map;if(n)if(Array.isArray(n))for(let[e,t]of i.split("/").filter(e=>e.startsWith(":")).entries()){let r=n[e];u.set(t,String(r))}else for(let[e,t]of Object.entries(n))u.set(`:${e}`,String(t));i=(i=i.split("/").map(e=>(function(e,t){let r,n=e;for(let[e,r]of t)n=n.replace(e,r);if("."===(r=n)||".."===r)throw TypeError("Path parameters cannot be reserved path segments");return encodeURIComponent(n)})(e,u)).join("/")).replace(/^\/+/,"");let c=l.toString();return(c=c.length>0?`?${c}`.replace(/\+/g,"%20"):"",s.startsWith("http"))?new URL(`${i}${c}`,s):`${s}${i}${c}`}(f,p),R=await eF(p),T=function(e,t){let r,{body:n}=e;return n?eP(n)&&"string"!=typeof n?"application/x-www-form-urlencoded"===((r=t.get("content-type"))?r.split(";")[0].trim().toLowerCase():null)?new URLSearchParams(n).toString():JSON.stringify(n):n:null}(p,R),A=function(e,t){var r;if(null==t?void 0:t.method)return t.method.toUpperCase();if(e.startsWith("@")){let n=null==(r=e.split("@")[1])?void 0:r.split("/")[0];return eB.includes(n)?n.toUpperCase():(null==t?void 0:t.body)?"POST":"GET"}return(null==t?void 0:t.body)?"POST":"GET"}(f,p),S=em(eb({},p),{url:O,headers:R,body:T,method:A,signal:h});for(let e of d.onRequest)if(e){let t=await e(S);"object"==typeof t&&null!==t&&Object.assign(S,t)}("pipeTo"in S&&"function"==typeof S.pipeTo||"function"==typeof(null==(n=null==t?void 0:t.body)?void 0:n.pi
1pe))&&!("duplex"in S)&&(S.duplex="half");let{clearTimeout:g}=(!(null==p?void 0:p.signal)&&(null==p?void 0:p.timeout)&&(c=setTimeout(()=>null==_?void 0:_.abort(),null==p?void 0:p.timeout)),{abortTimeout:c,clearTimeout:()=>{c&&clearTimeout(c)}}),y=await E(S.url,S);g();let v={response:y,request:S};for(let e of d.onResponse)if(e){let r=await e(em(eb({},v),{response:(null==(o=null==t?void 0:t.hookOptions)?void 0:o.cloneResponse)?y.clone():y}));r instanceof Response?y=r:"object"==typeof r&&null!==r&&(y=r.response)}if(y.ok){if("HEAD"===S.method)return{data:"",error:null};let e=function(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 eD.test(n)?"json":r.has(n)||n.startsWith("text/")?"text":"blob"}(y),r={data:null,response:y,request:S};if("json"===e||"text"===e){let e=await y.text(),t=null!=(s=S.jsonParser)?s:eC;r.data=await t(e)}else r.data=await y[e]();for(let e of((null==S?void 0:S.output)&&S.output&&!S.disableValidation&&(r.data=await eY(S.output,r.data)),d.onSuccess))e&&await e(em(eb({},r),{response:(null==(i=null==t?void 0:t.hookOptions)?void 0:i.cloneResponse)?y.clone():y}));return(null==t?void 0:t.throw)?r.data:{data:r.data,error:null}}let b=null!=(a=null==t?void 0:t.jsonParser)?a:eC,m=await y.text(),L=function(e){try{return JSON.parse(e),!0}catch(e){return!1}}(m),w=L?await b(m):null,I={response:y,responseText:m,request:S,error:em(eb({},w),{status:y.status,statusText:y.statusText})};for(let e of d.onError)e&&await e(em(eb({},I),{response:(null==(l=null==t?void 0:t.hookOptions)?void 0:l.cloneResponse)?y.clone():y}));if(null==t?void 0:t.retry){let r=function(e){if("number"==typeof e)return new eI({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new eI(e);case"exponential":return new eU(e);default:throw Error("Invalid retry strategy")}}(t.retry),n=null!=(u=t.retryAttempt)?u:0;if(await r.shouldAttemptRetry(n,y)){for(let e of d.onRetry)e&&await e(v);let o=r.getDelay(n);return await new Promise(e=>setTimeout(e,o)),await ek(e,em(eb({},t),{retryAttempt:n+1}))}}if(null==t?void 0:t.throw)throw new eL(y.status,y.statusText,L?w:m);return{data:null,error:em(eb({},w),{status:y.status,statusText:y.statusText})}};let eV=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,e$=/['\u2019]/g;function eW(e){return(e.replace(e$,"").match(eV)??[]).map(e=>e.toLowerCase()).join("-")}var eH=e.i(141988),eG=e.i(32794);let eq=j(M),eK=eq.newRole({user:[],session:[]});async function eX(e){let{data:t,error:r}=await eJ.signIn.email(e);if(r){if("EMAIL_NOT_VERIFIED"===function(e){if("object"!=typeof e||null===e)return;if("string"==typeof e.code)return e.code;let t=e.error;if("object"==typeof t&&null!==t){let e=t.code;if("string"==typeof e)return e}}(r))throw new eG.ServiceError("USER_NOT_VERIFIED");throw r}return t}let eJ=function(e){var t;let{pluginPathMethods:r,pluginsActions:n,pluginsAtoms:o,$fetch:s,$store:i,atomListeners:a}=((e,t)=>{var r,n;let o,s,i,a,u,c,f,p="credentials"in Request.prototype,E=function(e,t,r,n,o){if(e)return $(e,t);if(!1!==n){let e=d.BETTER_AUTH_URL||d.NEXT_PUBLIC_BETTER_AUTH_URL||d.PUBLIC_BETTER_AUTH_URL||d.NUXT_PUBLIC_BETTER_AUTH_URL||d.NUXT_PUBLIC_AUTH_URL||("/"!==d.BASE_URL?d.BASE_URL:void 0);if(e)return $(e,t)}r?.headers.get("x-forwarded-host"),r?.headers.get("x-forwarded-proto");if(r){let e=function(e){try{let t=new URL(e);return"null"===t.origin?null:t.origin}catch{return null}}(r.url);if(!e)throw new N("Could not get origin from request. Please provide a valid base URL.");return $(e,t)}if("u">typeof window&&window.location)return $(window.location.origin,t)}(e?.baseURL,e?.basePath,void 0,void 0)??(e=>{if(void 0!==l.default){if(l.default.env.NEXT_PUBLIC_AUTH_URL)return l.default.env.NEXT_PUBLIC_AUTH_URL;if("u"<typeof window){if(l.default.env.NEXTAUTH_URL)try{return l.default.env.NEXTAUTH_URL}catch{}if(l.default.env.VERCEL_URL)try{let t=l.default.env.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${t}${l.default.env.VERCEL_URL}`).origin}${e??"/api/auth"}`}catch{}}}})(e?.basePath)??"/api/auth",_=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>void 0!==e)||[],h={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:O,onError:R,onRequest:T,onResponse:A,...S}=e?.fetchOptions||{},g=(r={baseURL:E,...p?{credentials:"include"}:{},method:"GET",jsonParser:e=>e?function(e,t={strict:!0}){return function(e,t={}){let{strict:r=!1,warnings:n=!1,reviver:o,parseDates:s=!0}=t;if("string"!=typeof e)return e;let i=e.trim(),a=i.toLowerCase();if(a.length<=9&&a in G)return G[a];
1if(!H.test(i)){if(r)throw SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(W).some(([e,t])=>{let r=t.test(i);return r&&n&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),r})&&r)throw Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(i,(e,t)=>{if("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t){n&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(s&&"string"==typeof t){let e=function(e){let t=q.exec(e);if(!t)return null;let[,r,n,o,s,i,a,l,u,c,d]=t,f=new Date(Date.UTC(parseInt(r,10),parseInt(n,10)-1,parseInt(o,10),parseInt(s,10),parseInt(i,10),parseInt(a,10),l?parseInt(l.padEnd(3,"0"),10):0));if(u){let e=(60*parseInt(c,10)+parseInt(d,10))*("+"===u?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return f instanceof Date&&!isNaN(f.getTime())?f:null}(t);if(e)return e}return o?o(e,t):t})}catch(t){if(r)throw t;return e}}(e,t)}(e,{strict:!1}):null,customFetchImpl:fetch,...S,plugins:[h,...S.plugins||[],...e?.disableDefaultFetchPlugins?[]:[X],..._]},async function(e,t){let n,o=em(eb(eb({},r),t),{headers:eM(null==r?void 0:r.headers,null==t?void 0:t.headers),plugins:[...(null==r?void 0:r.plugins)||[],(n=r||{},{id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(e,t){var r,o,s,i;let a=(null==(o=null==(r=n.plugins)?void 0:r.find(t=>{var r;return null!=(r=t.schema)&&!!r.config&&(e.startsWith(t.schema.config.baseURL||"")||e.startsWith(t.schema.config.prefix||""))}))?void 0:o.schema)||n.schema;if(a){let r=e;(null==(s=a.config)?void 0:s.prefix)&&r.startsWith(a.config.prefix)&&(r=r.replace(a.config.prefix,""),a.config.baseURL&&(e=e.replace(a.config.prefix,a.config.baseURL))),(null==(i=a.config)?void 0:i.baseURL)&&r.startsWith(a.config.baseURL)&&(r=r.replace(a.config.baseURL,"")),r.startsWith("/")&&"@"===r.charAt(1)&&(r=r.substring(1));let n=a.schema[r];if(n){let r=null==t?void 0:t.headers;if(n.headers&&!(null==t?void 0:t.disableValidation)){let e={};if(null==t?void 0:t.headers){if(t.headers instanceof Headers)t.headers.forEach((t,r)=>{e[r.toLowerCase()]=t});else if("object"==typeof t.headers)for(let[r,n]of Object.entries(t.headers))null!=n&&(e[r.toLowerCase()]=n)}let o=await eY(n.headers,e),s={};for(let[e,t]of Object.entries(o))s[e.toLowerCase()]=t;r=s}let o=em(eb({},t),{method:n.method,output:n.output,headers:r});return(null==t?void 0:t.disableValidation)||(o=em(eb({},o),{body:n.input?await eY(n.input,null==t?void 0:t.body):null==t?void 0:t.body,params:n.params?await eY(n.params,null==t?void 0:t.params):null==t?void 0:t.params,query:n.query?await eY(n.query,null==t?void 0:t.query):null==t?void 0:t.query})),{url:e,options:o}}}return{url:e,options:t}}}),...(null==t?void 0:t.plugins)||[]]});if(null==r?void 0:r.catchAllError)try{return await ek(e,o)}catch(e){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:e}}}return await ek(e,o)}),{$sessionSignal:y,session:v,broadcastSessionUpdate:b}=(s=ef(!1),a=ef({data:null,error:null,isPending:!0,isRefetching:!1,refetch:i=e=>c(e)}),J(a,({newValue:e,abort:t})=>{eE(a.value,e)&&t()},2,e=>{let t=a.set,r=a.setKey;return a.setKey&&(a.setKey=(t,n)=>{let o;if(e({abort:()=>{o=!0},changed:t,newValue:{...a.value,[t]:n}}),!o)return r(t,n)}),a.set=r=>{let n;if(e({abort:()=>{n=!0},newValue:r}),!n)return t(r)},()=>{a.set=t,a.setKey=r}}),u=e=>{if(o!==e)return;let t=a.get();o=void 0,(t.isPending||t.isRefetching)&&a.set({...t,isPending:!1,isRefetching:!1,refetch:i})},c=async e=>{o?.abort();let t=new AbortController;o=t;let r=a.get();a.set({...r,isPending:null===r.data,isRefetching:!0,error:null,refetch:i});try{var n;let r=await g("/get-session",{method:"GET",query:e?.query,signal:t.signal});if(t.signal.aborted)return void u(t);let{data:o,error:s}=ep(r);if(o?.needsRefresh)try{let e=await g("/get-session",{method:"POST",signal:t.signal});if(t.signal.aborted)return void u(t);({data:o,error:s}=ep(e))}catch{if(t.signal.aborted)return void u(t)}if(s){let e=a.get(),t=s?.status===401;a.set({data:t?null:e.data,error:s,isPending:!1,isRefetching:!1,refetch:i});return}let l=(n=o)&&(null!==n.session||null!==n.user)?n:null,c=a.get(),d=null!=c.data&&null!=l&&Q(c.data,l)?c.data:l;a.set({data:d,error:null,isPending:!1,isRefetching:!1,refetch:i})}catch(r){if(t.signal.aborted)return void u(t);let e=a.get();a.set({data:e.data,error:r,isPending:!1,isRefetching:!1,refetch:i})}},f=()=>{},n=()=>{let t;"u"<typeof window||(t=setTimeout(()=>{c()},0));let r=function(e){let{fetchSession:t,shouldPollSession:r=()=>!0,sessionSignal:n,options:o={}}=e,s=o.sessionOptions?.refetchInterval??0,i=o.sessionOptions?.refetchOnWindowFocus??!0,a=o.sessionOptions?.refetchWhenOffline??!1,l={isInitialized:!1,lastSessionRequest:0},u=e=>{if(a||ea().isOnline){if(e?.event==="storage")return void t();if(e?.event==="poll"){l.lastSessionRequest=el(),t();return}if(e?.event==="visibilitychange"){if(el()-l.lastSessionRequest<5)return;l.lastSessionRequest=el(),t();return}t()}};return{init:()=>{l.isInitialized||(l.isInitialized=!0,s&&s>0&&(l.pollInterval=setInterval(()=>{r()&&u({event:"poll"})},1e3*s)),l.unsubscribeBroadcast=et().subscribe(()=>{u({event:"storage"})}),i&&(l.unsubscribeFocus=eo().subscribe(()=>{u({event:"visibilitychange"})})),l.unsubscribeOnline=ea().subscribe(e=>{e&&u({event:"visibilitychange"})}),l.unsubscribeSignal=n.listen(()=>{t()}),l.cleanupBroadcastSetup=et().setup(),l.cleanupFocusSetup=eo().setup(),l.cleanupOnlineSetup=ea().setup())},cleanup:()=>{l.isInitialized&&(l.pollInterval&&(clearInterval(l.pollInterval),l.pollInterval=void 0),l.unsubscribeBroadcast&&(l.unsubscribeBroadcast(),l.unsubscribeBroadcast=void 0),l.unsubscribeFocus&&(l.unsubscribeFocus(),l.unsubscribeFocus=void 0),l.unsubscribeOnline&&(l.unsubscribeOnline(),l.unsubscribeOnline=void 0),l.unsubscribeSignal&&(l.unsubscribeSignal(),l.unsubscribeSignal=void 0),l.cleanupBroadcastSetup&&(l.cleanupBroadcastSetup(),l.cleanupBroadcastSetup=void 0),l.cleanupFocusSetup&&(l.cleanupFocusSetup(),l.cleanupFocusSetup=void 0),l.cleanupOnlineSetup&&(l.cleanupOnlineSetup(),l.cleanupOnlineSetup=void 0),l.isInitialized=!1,l.lastSessionRequest=0)},triggerRefetch:u,broadcastSessionUpdate:e=>{et().post({event:"session",data:{trigger:e},clientId:Math.random().toString(36).substring(7)})}}}({fetchSession:c,shouldPollSession:()=>null!=a.get().data,sessionSignal:s,options:e});return r.init(),f=r.broadcastSessionUpdate,()=>{t&&clearTimeout(t);let e=o;e?.abort(),e&&u(e),r.cleanup()}},J(a,e=>{let t=n(e);t&&a.events[6].push(t)},5,e=>{let t=a.listen;a.listen=(...r)=>(a.lc||a.active||(a.active=!0,e()),t(...r));let r=a.off;return a.events[6]=[],a.off=()=>{r(),setTimeout(()=>
1{if(a.active&&!a.lc){for(let e of(a.active=!1,a.events[6]))e();a.events[6]=[]}},1e3)},()=>{a.listen=t,a.off=r}}),{session:a,$sessionSignal:s,broadcastSessionUpdate:e=>f(e)}),m=e?.plugins||[],L={},w={$sessionSignal:y,session:v},I={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},U=[{signal:"$sessionSignal",matcher: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"===e,callback(e){"/sign-out"===e?b("signout"):("/update-user"===e||"/update-session"===e)&&b("updateUser")}}];for(let e of m)e.getAtoms&&Object.assign(w,e.getAtoms?.(g)),e.pathMethods&&Object.assign(I,e.pathMethods),e.atomListeners&&U.push(...e.atomListeners);let D={notify:e=>{w[e].set(!w[e].get())},listen:(e,t)=>{w[e].subscribe(t)},atoms:w};for(let t of m)t.getActions&&(L=eO(t.getActions?.(g,D,e)??{},L));return{get baseURL(){return E},pluginsActions:L,pluginsAtoms:w,pluginPathMethods:I,atomListeners:U,$fetch:g,$store:D}})(e),u={};for(let[e,t]of Object.entries(o))u[function(e){return`use${e.charAt(0).toUpperCase()+e.slice(1)}`}(e)]=()=>(function(e,t={}){let r=(0,eH.useRef)(e.get()),{keys:n,deps:o=[e,n]}=t,s=(0,eH.useCallback)(t=>{let o=e=>{r.current!==e&&(r.current=e,t())};if(o(e.value),n?.length){let t;return t=new Set(n).add(void 0),e.listen((e,r,n)=>{t.has(n)&&o(e,r,n)})}return e.listen(o)},o),i=()=>r.current;return(0,eH.useSyncExternalStore)(s,i,i)})(t);return t={...n,...u,$fetch:s,$store:i},function e(n=[]){return new Proxy(function(){},{get(r,o){var s;if("string"!=typeof o||"then"===o||"catch"===o||"finally"===o)return;let i=[...n,o],a=t;for(let e of i)if(a&&"object"==typeof a&&e in a)a=a[e];else{a=void 0;break}return"function"==typeof a?a:"object"==typeof(s=a)&&null!==s&&"get"in s&&"function"==typeof s.get&&"lc"in s&&"number"==typeof s.lc?a:e(i)},apply:async(e,t,i)=>{let l="/"+n.map(eW).join("/"),u=i[0]||{},c=i[1]||{},{query:d,fetchOptions:f,...p}=u,E={...c,...f},_=function(e,t,r){let n=t[e],{fetchOptions:o,query:s,...i}=r||{};return n||(o?.method?o.method:i&&Object.keys(i).length>0?"POST":"GET")}(l,r,u);return await s(l,{...E,body:"GET"===_?void 0:{...p,...E?.body||{}},query:d||E?.query,method:_,async onSuccess(e){if(await E?.onSuccess?.(e),!a||E.disableSignal)return;let t=a.filter(e=>e.matcher(l));if(!t.length)return;let r=new Set;for(let e of t){let t=o[e.signal];if(!t)return;if(r.has(e.signal))continue;r.add(e.signal);let n=t.get();setTimeout(()=>{t.set(!n)},10),e.callback?.(l)}}})}})}()}({plugins:[{id:"oauth-provider-client",version:"1.6.23",fetchPlugins:[{id:"oauth-provider-signin",name:"oauth-provider-signin",description:"Adds the current page query to oauth requests",hooks:{async onRequest(e){let t=e.headers,r="string"==typeof e.body?"application/x-www-form-urlencoded"===t.get("content-type")?Object.fromEntries(new URLSearchParams(e.body)):function(e){try{if("string"!=typeof e){if(null==e)return null;return function e(t){if(null==t)return t;if("string"==typeof t)return m(t);if(t instanceof Date)return t;if(Array.isArray(t))return t.map(e);if("object"==typeof t){let r={};for(let n of Object.keys(t))r[n]=e(t[n]);return r}return t}(e)}return JSON.parse(e,(e,t)=>m(t))}catch(e){return v.error("Error parsing JSON",{error:e}),null}}(e.body??"{}"):e.body;!r?.oauth_query&&"u">typeof window&&window?.location?.search&&"GET"!==e.method&&"DELETE"!==e.method&&(e.body=JSON.stringify({...r,oauth_query:function(e){let t=new URLSearchParams(e);if(!t.has("sig"))return;let r=function(e){let t=e.getAll(o);if(t.length)return new Set(t)}(t);if(!r)return;let n=new URLSearchParams;for(let[e,s]of t.entries())("sig"===e||e===o||r.has(e))&&n.append(e,s);return n.toString()}(window.location.search)}))}}}],$InferServerPlugin:{}},{id:"additional-fields-client",version:L,$InferServerPlugin:{}},(a={ac:eq,roles:{admin:x,user:Y,bp:eK}},n={admin:x,user:Y,...a?.roles},{id:"admin-client",version:L,$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:e=>(e=>
1{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions)return!1;let t=(e.role||e.options?.defaultRole||"user").split(","),r=e.options?.roles||B;for(let n of t)if(r[n]?.authorize(e.permissions)?.success)return!0;return!1})({role:e.role,options:{ac:a?.ac,roles:n},permissions:e.permissions})}}),pathMethods:{"/admin/list-users":"GET","/admin/impersonate-user":"POST","/admin/stop-impersonating":"POST"},atomListeners:[{matcher:e=>"/admin/impersonate-user"===e||"/admin/stop-impersonating"===e,signal:"$sessionSignal"}],$ERROR_CODES:k})]}),ez=async e=>{let{error:t}=await eJ.signOut(e);if(t)throw t},eQ=eJ.useSession,eZ=async e=>{let{data:t,error:r}=await eJ.changePassword(e);if(r)throw r;return t},e0=async e=>{let{data:t,error:r}=await eJ.requestPasswordReset(e);if(r)throw r;return t},e1=async e=>{let{data:t,error:r}=await eJ.resetPassword(e);if(r)throw r;return t},e4=async e=>{let{data:t,error:r}=await eJ.sendVerificationEmail(e);if(r)throw r;return t},e2=async e=>{let{callbackURL:t,referralCode:r}="string"==typeof e?{callbackURL:e,referralCode:void 0}:{callbackURL:e?.callbackURL??"/studio",referralCode:e?.referralCode},n=r??null;null==n&&(n=new URLSearchParams(window.location.search).get("ref"));let o=function(e){let t=e?.trim();if(!t)return null;let r=t.toUpperCase();return!/^[0-9A-F]+$/.test(r)||r.length>32?null:r}(n);o&&"u">typeof document&&(document.cookie=`referral_code=${encodeURIComponent(o)}; path=/; max-age=3600; SameSite=Lax`);let{data:s,error:i}=await eJ.signIn.social({provider:"google",callbackURL:t,...o?{additionalData:{referralCode:o}}:{}});if(i)throw i;return s};e.s(["authClient",0,eJ,"changePassword",0,eZ,"login",()=>eX,"requestPasswordReset",0,e0,"resetPassword",0,e1,"sendVerificationEmail",0,e4,"signInWithGoogle",0,e2,"signOut",0,ez,"signUp",0,{email:async e=>{let{data:t,error:r}=await eJ.signUp.email(e);if(r)throw r;return t}},"useSession",0,eQ],578938)}]);

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.