* `);returnc.length=0,n===!1?(Fe(u),s):u}}returns}functiontt(e,t){varn=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get:function(){returnthis.required=!0,this}},def:{value:function(s){returns!==void0||this.default?Qn(s)||Pn(this,s,!0)===!0?(this.default=Yn(s)?function(){return[].concat(s)}:Tn(s)?function(){returnObject.assign({},s)}:s,this):(Fe(this._vueTypes_name+' - invalid default value: "'+s+'"'),this):this}}}),r=n.validator;returnQn(r)&&(n.validator=ja(r,n)),n}functionOt(e,t){varn=tt(e,t);returnObject.defineProperty(n,"validate",{value:function(r){returnQn(this.validator)&&Fe(this._vueTypes_name+` - calling .validate() will overwrite the current custom validator function. Validator info:
`+JSON.stringify(this)),this.validator=ja(r,this),this}})}functionnc(e,t,n){varr,s,i=(r=t,s={},Object.getOwnPropertyNames(r).forEach(function(f){s[f]=Object.getOwnPropertyDescriptor(r,f)}),Object.defineProperties({},s));if(i._vueTypes_name=e,!Tn(n))returni;varo,a,l=n.validator,c=Wf(n,["validator"]);if(Qn(l)){varu=i.validator;u&&(u=(a=(o=u).__original)!==null&&a!==void0?a:o),i.validator=ja(u?function(f){returnu.call(this,f)&&l.call(this,f)}:l,i)}returnObject.assign(i,c)}functiongi(e){returne.replace(/^(?!\s*$)/gm," ")}varfv=function(){returnOt("any",{})},dv=function(){returnOt("function",{type:Function})},hv=function(){returnOt("boolean",{type:Boolean})},pv=function(){returnOt("string",{type:String})},gv=function(){returnOt("number",{type:Number})},mv=function(){returnOt("array",{type:Array})},vv=function(){returnOt("object",{type:Object})},yv=function(){returntt("integer",{type:Number,validator:function(e){returnuv(e)}})},bv=function(){returntt("symbol",{validator:function(e){returntypeofe=="symbol"}})};function_v(e,t){if(t===void0&&(t="custom validation failed"),typeofe!="function")thrownewTypeError("[VueTypes error]: You must provide a function as argument");returntt(e.name||"<<anonymous function>>",{validator:function(n){varr=e(n);returnr||Fe(this._vueTypes_name+" - "+t),r}})}functionwv(e){if(!Yn(e))thrownewTypeError("[VueTypes error]: You must provide an array as argument.");vart='oneOf - value should be one of "'+e.join('", "')+'".',n=e.reduce(function(r,s){if(s!=null){vari=s.constructor;r.indexOf(i)===-1&&r.push(i)}returnr},[]);returntt("oneOf",{type:n.length>0?n:void0,validator:function(r){vars=e.indexOf(r)!==-1;returns||Fe(t),s}})}functionEv(e){if(!Yn(e))thrownewTypeError("[VueTypes error]: You must provide an array as argument");for(vart=!1,n=[],r=0;r<e.length;r+=1){vars=e[r];if(Gf(s)){if(zs(s)&&s._vueTypes_name==="oneOf"){n=n.concat(s.type);continue}if(Qn(s.validator)&&(t=!0),s.type!==!0&&s.type){n=n.concat(s.type);continue}}n.push(s)}returnn=n.filter(function(i,o){returnn.indexOf(i)===o}),tt("oneOfType",t?{type:n,validator:function(i){varo=[],a=e.some(function(l){varc=Pn(zs(l)&&l._vueTypes_name==="oneOf"?l.type||null:l,i,!0);returntypeofc=="string"&&o.push(c),c===!0});returna||Fe("oneOfType - provided value does not match any of the "+o.length+` passed-in validators:
`))),a}}:{type:n})}functionSv(e){returntt("arrayOf",{type:Array,validator:function(t){varn,r=t.every(function(s){return(n=Pn(e,s,!0))===!0});returnr||Fe(`arrayOf - value validation error:
`+gi(n)),r}})}functionCv(e){returntt("instanceOf",{type:e})}functionOv(e){returntt("objectOf",{type:Object,validator:function(t){varn,r=Object.keys(t).every(function(s){return(n=Pn(e,t[s],!0))===!0});returnr||Fe(`objectOf - value validation error:
`+gi(n)),r}})}functionTv(e){vart=Object.keys(e),n=t.filter(function(s){vari;return!!(!((i=e[s])===null||i===void0)&&i.required)}),r=tt("shape",{type:Object,validator:function(s){vari=this;if(!Tn(s))return!1;varo=Object.keys(s);if(n.length>0&&n.some(function(l){returno.indexOf(l)===-1})){vara=n.filter(function(l){returno.indexOf(l)===-1});returnFe(a.length===1?'shape - required property "'+a[0]+'" is not defined.':'shape - required properties "'+a.join('", "')+'" are not defined.'),!1}returno.every(function(l){if(t.indexOf(l)===-1)returni._vueTypes_isLoose===!0||(Fe('shape - shape definition does not include a "'+l+'" property. Allowed keys: "'+t.join('", "')+'".'),!1);varc=Pn(e[l],s[l],!0);returntypeofc=="string"&&Fe('shape - "'+l+`" property validation error:
`),"".concat(Mb,"-dynamic-theme")):$b(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}varPd=Symbol("GlobalFormContextKey"),Nb=function(t){En(Pd,t)},DC=function(){returnNe(Pd,{validateMessages:ie(function(){})})},Db=function(){return{getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:{type:Object,default:void0},input:{type:Object},autoInsertSpaceInButton:{type:Boolean,default:void0},locale:{type:Object,default:void0},pageHeader:{type:Object},componentSize:{type:String},direction:{type:String},space:{type:Object},virtual:{type:Boolean,default:void0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:{type:Object,default:void0},notUpdateGlobalConfig:Boolean}},Fb="ant";functionVn(){returnZe.prefixCls||Fb}varRo=Ve({}),Ad=Ve({}),Ze=Ve({});ci(function(){On(Ze,Ro,Ad),Ze.prefixCls=Vn(),Ze.getPrefixCls=function(e,t){returnt||(e?"".concat(Ze.prefixCls,"-").concat(e):Ze.prefixCls)},Ze.getRootPrefixCls=function(e,t){returne||(Ze.prefixCls?Ze.prefixCls:t&&t.includes("-")?t.replace(/^(.*)-[^-]*$/,"$1"):Vn())}});varzi,Ub=function(t){zi&&zi(),zi=ci(function(){On(Ad,Ve(t)),On(Ze,Ve(t))}),t.theme&&Lb(Vn(),t.theme)},Bb=function(){return{getPrefixCls:function(n,r){returnr||(n?"".concat(Vn(),"-").concat(n):Vn())},getRootPrefixCls:function(n,r){returnn||(Ze.prefixCls?Ze.prefixCls:r&&r.includes("-")?r.replace(/^(.*)-[^-]*$/,"$1"):Vn())}}},jr=Ft({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:Db(),setup:function(t,n){varr=n.slots,s=function(f,d){varh=t.prefixCls,p=h===void0?"ant":h;returnd||(f?"".concat(p,"-").concat(f):p)},i=function(f){vard=t.renderEmpty||r.renderEmpty||Zf;returnd(f)},o=function(f,d){varh=t.prefixCls;if(d)returnd;varp=h||s("");returnf?"".concat(p,"-").concat(f):p},a=Ve(re(re({},t),{},{getPrefixCls:o,renderEmpty:i}));Object.keys(t).forEach(function(u){$t(function(){returnt[u]},function(){a[u]=t[u]})}),t.notUpdateGlobalConfig||(On(Ro,a),$t(a,function(){On(Ro,a)}));varl=ie(function(){varu={};if(t.locale){varf,d;u=((f=t.locale.Form)===null||f===void0?void0:f.defaultValidateMessages)||((d=Ws.Form)===null||d===void0?void0:d.defaultValidateMessages)||{}}returnt.form&&t.form.validateMessages&&(u=re(re({},u),t.form.validateMessages)),u});Nb({validateMessages:l}),En("configProvider",a);varc=function(f){vard;returnM(jv,{locale:t.locale||f,ANT_MARK__:wo},{default:function(){return[(d=r.default)===null||d===void0?void0:d.call(r)]}})};returnci(function(){t.direction&&(Rs.config({rtl:t.direction==="rtl"}),kb.config({rtl:t.direction==="rtl"}))}),function(){returnM(Ff,{children:function(f,d,h){returnc(h)}},null)}}}),Hb=Ve({getPrefixCls:function(t,n){returnn||(t?"ant-".concat(t):"ant")},renderEmpty:Zf,direction:"ltr"});jr.config=Ub;jr.install=function(e){e.component(jr.name,jr)};constkd=jr,mi=function(e,t){varn=Ne("configProvider",Hb),r=ie(function(){returnn.getPrefixCls(e,t.prefixCls)}),s=ie(function(){vary;return(y=t.direction)!==null&&y!==void0?y:n.direction}),i=ie(function(){returnn.getPrefixCls()}),o=ie(function(){returnn.autoInsertSpaceInButton}),a=ie(function(){returnn.renderEmpty}),l=ie(function(){returnn.space}),c=ie(function(){returnn.pageHeader}),u=ie(function(){returnn.form}),f=ie(function(){returnt.getTargetContainer||n.getTargetContainer}),d=ie(function(){returnt.getPopupContainer||n.getPopupContainer}),h=ie(function(){vary;return(y=t.dropdownMatchSelectWidth)!==null&&y!==void0?y:n.dropdownMatchSelectWidth}),p=ie(function(){return(t.virtual===void0?n.virtual!==!1:t.virtual!==!1)&&h.value!==!1}),v=ie(function(){returnt.size||n.componentSize}),b=ie(function(){vary;returnt.autocomplete||((y=n.input)===null||y===void0?void0:y.autocomplete)}),w=ie(function(){returnn.csp});return{configProvider:n,prefixCls:r,direction:s,size:v,getTargetContainer:f,getPopupContainer:d,space:l,pageHeader:c,form:u,autoInsertSpaceInButton:o,renderEmpty:a,virtual:p,dropdownMatchSelectWidth:h,rootPrefixC
new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"UnknownJavaScriptruntimewithoutWebSocketsupport.",workaround:"Ensureyou're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
});`;class aS{constructor(t,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Wo,this.transport=null,this.heartbeatIntervalMs=_s.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=eo,this.ref=0,this.reconnectTimer=null,this.logger=eo,this.conn=null,this.sendBuffer=[],this.serializer=new QE,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=s=>{let i;return s?i=s:typeof fetch>"u"?i=(...o)=>ee(()=>Promise.resolve().then(()=>fr),void 0).then(({default:a})=>a(...o)).catch(a=>{throw new Error(`Failed to load @supabase/node-fetch: ${a.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):i=fetch,(...o)=>i(...o)},!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${t}/${zo.websocket}`,this.httpEndpoint=Th(t),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=zE.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n}
`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'.Providedvalue:${e.statement}`)}const h=Lh(e.address),p=u?`${u}://${r}`:r,v=e.statement?`${e.statement}
Resources:`;for(const E of c){if(!E||typeof E!="string")throw new Error(`@supabase/auth-js:InvalidSIWEmessagefield"resources".Everyresourcemustbeavalidstring.Providedvalue:${E}`);y+=`
${w}`}T1();const j1={url:FS,storageKey:US,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:BS,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function Su(e,t,n){return await n()}const Nn={};class ts{constructor(t){var n,r;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=ts.nextInstanceID,ts.nextInstanceID+=1,this.instanceID>0&&rt()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const s=Object.assign(Object.assign({},j1),t);if(this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.persistSession=s.persistSession,this.storageKey=s.storageKey,this.autoRefreshToken=s.autoRefreshToken,this.admin=new O1({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=$h(s.fetch),this.lock=s.lock||Su,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,s.lock?this.lock=s.lock:rt()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=P1:this.lock=Su,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?(s.storage?this.storage=s.storage:Ih()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Eu(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=Eu(this.memoryStorage)),rt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),await this._notifyAllSubscribers(i.data.event,i.data.session,!1)})}this.initialize()}get jwks(){var t,n;return(n=(t=Nn[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Nn[this.storageKey]=Object.assign(Object.assign({},Nn[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Nn[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Nn[this.storageKey]=Object.assign(Object.assign({},Nn[this.storageKey]),{cachedAt:t})}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID}(${Ah})${newDate().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{const n=r1(window.location.href);let r="none";if(this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce"),rt()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),KS(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{e
`);constD=awaitC.signMessage(newTextEncoder().encode(p),"utf8");if(!D||!(DinstanceofUint8Array))thrownewError("@supabase/auth-js: Wallet signMessage() API returned an recognized value");v=D}}try{const{data:b,error:w}=awaitle(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:p,signature:e1(v)},!((d=t.options)===null||d===void0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void0?void0:h.captchaToken}}:null),xform:yt});if(w)throww;return!b||!b.session||!b.user?{data:{user:null,session:null},error:newEr}:(b.session&&(awaitthis._saveSession(b.session),awaitthis._notifyAllSubscribers("SIGNED_IN",b.session)),{data:Object.assign({},b),error:w})}catch(b){if(ne(b))return{data:{user:null,session:null},error:b};throwb}}async_exchangeCodeForSession(t){constn=awaitdn(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{const{data:i,error:o}=awaitle(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:yt});if(awaitzt(this.storage,`${this.storageKey}-code-verifier`),o)throwo;return!i||!i.session||!i.user?{data:{user:null,session:null,redirectType:null},error:newEr}:(i.session&&(awaitthis._saveSession(i.session),awaitthis._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(ne(i))return{data:{user:null,session:null,redirectType:null},error:i};throwi}}asyncsignInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=t,a=awaitle(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void0:n.captchaToken}},xform:yt}),{data:l,error:c}=a;returnc?{data:{user:null,session:null},error:c}:!l||!l.session||!l.user?{data:{user:null,session:null},error:newEr}:(l.session&&(awaitthis._saveSession(l.session),awaitthis._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:c})}catch(n){if(ne(n))return{data:{user:null,session:null},error:n};thrown}}asyncsignInWithOtp(t){varn,r,s,i,o;try{if("email"int){const{email:a,options:l}=t;letc=null,u=null;this.flowType==="pkce"&&([c,u]=await$n(this.storage,this.storageKey));const{error:f}=awaitle(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void0:l.data)!==null&&n!==void0?n:{},create_user:(r=l==null?void0:l.shouldCreateUser)!==null&&r!==void0?r:!0,gotrue_meta_security:{captcha_token:l==null?void0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void0:l.emailRedirectTo});return{data:{user:null,session:null},error:f}}if("phone"int){const{phone:a,options:l}=t,{data:c,error:u}=awaitle(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void0:l.data)!==null&&s!==void0?s:{},create_user:(i=l==null?void0:l.shouldCreateUser)!==null&&i!==void0?i:!0,gotrue_meta_security:{captcha_token:l==null?void0:l.captchaToken},channel:(o=l==null?void0:l.channel)!==null&&o!==void0?o:"sms"}});return{data:{user:null,session:null,messageId:c==null?void0:c.message_id},error:u}}thrownewws("You must provide either an email or phone number.")}catch(a){if(ne(a))return{data:{user:null,session:null},error:a};throwa}}asyncverifyOtp(t){varn,r;try{lets,i;"options"int&&(s=(n=t.options)===null||n===void0?void0:n.redirectTo,i=(r=t.options)===null||r===void0?void0:r.captchaToken);const{data:o,error:a}=awaitle(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:yt});if(a)throwa;if(!o)thrownewError("An error occurred on token verification.");constl=o.session,c=o.user;returnl!=null&&l.access_token&&(awaitthis._saveSession(l),awaitthis._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(s){if(ne(s