PageSourceSearch

https://app.agora.finance/_next/static/chunks/27023-e3495d7875835f31.js

js agora.finance collected 2026-09-28 06:33:02 UTC 41,385 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[27023],{203:(e,t,n)=>{n.d(t,{E:()=>h});var r=n(41802),i=n(29091),o=n(63175),s=n(43206),a=n(23968),l=class extends a.Q{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new s.s({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=u(e);if("string"==typeof t){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){let t=u(e);if("string"==typeof t){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=u(e);if("string"!=typeof t)return!0;{let n=this.#t.get(t),r=n?.find(e=>"pending"===e.state.status);return!r||r===e}}runNext(e){let t=u(e);if("string"!=typeof t)return Promise.resolve();{let n=this.#t.get(t)?.find(t=>
1t!==e&&t.state.isPaused);return n?.continue()??Promise.resolve()}}clear(){o.jG.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r.nJ)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,r.nJ)(e,t))}notify(e){o.jG.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return o.jG.batch(()=>Promise.all(e.map(e=>e.continue().catch(r.lQ))))}};function u(e){return e.options.scope?.id}var c=n(8698),d=n(37385),h=class{#r;#i;#o;#s;#a;#l;#u;#c;constructor(e={}){this.#r=e.queryCache||new i.$,this.#i=e.mutationCache||new l,this.#o=e.defaultOptions||{},this.#s=new Map,this.#a=new Map,this.#l=0}mount(){this.#l++,1===this.#l&&(this.#u=c.m.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#r.onFocus())}),this.#c=d.t.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#r.onOnline())}))}unmount(){this.#l--,0===this.#l&&(this.#u?.(),this.#u=void 0,this.#c?.(),this.#c=void 0)}isFetching(e){return this.#r.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#i.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#r.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#r.build(this,t),i=n.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime((0,r.d2)(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#r.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let i=this.defaultQueryOptions({queryKey:e}),o=this.#r.get(i.queryHash),s=o?.state.data,a=(0,r.Zw)(t,s);if(void 0!==a)return this.#r.build(this,i).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return o.jG.batch(()=>this.#r.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#r.get(t.queryHash)?.state}removeQueries(e){let t=this.#r;o.jG.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#r;return o.jG.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t};return Promise.all(o.jG.batch(()=>this.#r.findAll(e).map(e=>e.cancel(n)))).then(r.lQ).catch(r.lQ)}invalidateQueries(e,t={}){return o.jG.batch(()=>(this.#r.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(o.jG.batch(()=>this.#r.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(r.lQ)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(r.lQ)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let n=this.#r.build(this,t);return n.isStaleByTime((0,r.d2)(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r.lQ).catch(r.lQ)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r.lQ).catch(r.lQ)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return d.t.isOnline()?this.#i.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#r}getMutationCache(){return this.#i}getDefaultOptions(){return this.#o}setDefaultOptions(e){this.#o=e}setQueryDefaults(e,t){this.#s.set((0,r.EN)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#s.values()],n={};return t.forEach(t=>{(0,r.Cp)(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set((0,r.EN)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#a.values()],n={};return t.forEach(t=>{(0,r.Cp)(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#o.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,r.F$)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===r.hT&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#o.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#r.clear(),this.#i.clear()}}},1968:(e,t,n)=>{let r,i;n.d(t,{g0:()=>z,ns:()=>eI,Ay:()=>eI,bv:()=>H,mj:()=>$});var o=n(63070),s=n(15593),a=n(47617);function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)"__proto__"!==r&&(e[r]=n[r])}return e}var u=function e(t,n){function r(e,r,i){if("u">typeof document){"number"==typeof(i=l({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decode
1URIComponent).replace(/[()]/g,escape);var o="";for(var s in i)i[s]&&(o+="; "+s,!0!==i[s]&&(o+="="+i[s].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}return Object.create({set:r,get:function(e){if("u">typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),s=o.slice(1).join("=");try{var a=decodeURIComponent(o[0]);if(a in r||(r[a]=t.read(s,a)),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",l({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,l({},this.attributes,t))},withConverter:function(t){return e(l({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),c={default:"endpoint"},d="Blocked by CSP",h="The endpoint parameter is not a valid URL",f="Failed to load the JS script of the agent",p="9319",g="https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js";function v(e){var t,n,r,i,o,s,a;return(t=function(){return new Promise(function(t,n){if(function(e){if(URL.prototype)try{return new URL(e,location.href),!1}catch(e){if(e instanceof Error&&"TypeError"===e.name)return!0;throw e}}(e))throw Error(h);var r=document.createElement("script"),i=function(){var e;return null==(e=r.parentNode)?void 0:e.removeChild(r)},o=document.head||document.getElementsByTagName("head")[0];r.onload=function(){i(),t()},r.onerror=function(){i(),n(Error(f))},r.async=!0,r.src=e,o.appendChild(r)})},n=function(){throw Error(d)},i=document,o="securitypolicyviolation",s=function(t){var n=new URL(e,location.href),i=t.blockedURI;i!==n.href&&i!==n.protocol.slice(0,-1)&&i!==n.origin||(r=t,a())},i.addEventListener(o,s),a=function(){return i.removeEventListener(o,s)},Promise.resolve().then(t).then(function(e){return a(),e},function(e){return new Promise(function(e){var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(null)}).then(function(){if(a(),r)return n(r);throw e})})).then(w)}function w(){var e,t,n=window,r="__fpjs_p_l_b",i=n[r];if((null==(t=null==(e=Object.getOwnPropertyDescriptor)?void 0:e.call(Object,n,r))?void 0:t.configurable)?delete n[r]:t&&!t.writable||(n[r]=void 0),"function"!=typeof(null==i?void 0:i.load))throw Error(p);return i}let y="3.2.0",m="u">typeof window,b=`https://descopecdn.com/npm/oidc-client-ts@${y}/dist/browser/oidc-client-ts.min.js`,k=`https://cdn.jsdelivr.net/npm/oidc-client-ts@${y}/dist/browser/oidc-client-ts.min.js`,S=["/v1/auth/refresh","/v1/auth/try-refresh","/v1/auth/me","/v1/auth/me/tenants","/v1/auth/me/history"],O=e=>{try{return(0,s.s)(e).exp}catch(e){return null}},_=e=>{let{access_token:t,id_token:n,refresh_token:r,refresh_expire_in:i}=e,s=(0,o.__rest)(e,["access_token","id_token","refresh_token","refresh_expire_in"]);return Object.assign({sessionJwt:e.sessionJwt||t,idToken:n,refreshJwt:e.refreshJwt||r,sessionExpiration:e.sessionExpiration||(e=>{let{expires_in:t,expires_at:n,access_token:r}=e;return n||(t?Math.floor(Date.now()/1e3)+t:r?O(r):void 0)})(e),cookieExpiration:e.cookieExpiration||(e=>{let{refresh_expire_in:t,refresh_token:n}=e;return t?Math.floor(Date.now()/1e3)+t:O(n)})(e)},s)},C=(e,t)=>{var n;return["beforeRequest","afterRequest"].reduce((n,r)=>{var i;return n[r]=[].concat((null==(i=e.hooks)?void 0:i[r])||[]).concat((null==t?void 0:t[r])||[]),n},null!=(n=e.hooks)?n:e.hooks={}),e},D=async e=>{if(!(null==e?void 0:e.ok))return{};let t=await (null==e?void 0:e.clone().json());return _((null==t?void 0:t.authInfo)||t||{})},A=(e,t)=>{if(!((null==t?void 0:t.status)>=400&&(null==t?void 0:t.status)<500))return!1;let n=(null==e?void 0:e.path)||"";return S.includes(n)},I=void 0!==r||m&&void 0!==window.localStorage,x=(e,t)=>{var n,i;return null==(i=null==(n=r||m&&window.localStorage)?void 0:n.setItem)?void 0:i.call(n,e,t)},E=e=>{var t,n;return null==(n=null==(t=r||m&&window.localStorage)?void 0:t.getItem)?void 0:n.call(t,e)},j=e=>{var t,n;return null==(n=null==(t=r||m&&window.localStorage)?void 0:t.removeItem)?void 0:n.call(t,e)},R=e=>{var t,n,i,o,s;return null!=(s=null!=(n=null==(t=null==r?void 0:r.key)?void 0:t.call(r,e))?n:m&&(null==(o=null==(i=window.localStorage)?void 0:i.key)?void 0:o.call(i,e)))?s:null},T=e=>{var t,n;return m&&(null==(n=null==(t=window.localStorage)?void 0:t.getItem)?void 0:n.call(t,e))||null},U=e=>{var t,n;try{m&&(null==(n=null==(t=window.localStorage)?void 0:t.removeItem)||n.call(t,e))}catch(e){}},q=(...e)=>{console.debug(...e)},P=(...e)=>{console.warn(...e)},N="DSRCN";function Q(e,t,n){if(t){let{cookieDomain:r,cookiePath:i,cookieSameSite:o,cookieExpiration:s,cookieSecure:a}=n,l=new Date(1e3*s),c=L(r);u.set(e,t,{path:i,domain:c?r:void 0,expires:l,sameSite:o,secure:a})}}function L(e){let t=window.location.hostname.split("."),n=null==e?void 0:e.split(".");return t.slice(-(null==n?void 0:n.length)).join(".")===e}let K=e=>(null==e?void 0:e.cookieName)||"DS",J=e=>(null==e?void 0:e.cookieName)||"DSR";function M(e="",t){return u.get(J(t))||E(`${e}DSR`)||""}function $(e="",t){return u.get(K(t))||E(`${e}DS`)||""}function F(e=""){return E(`${e}DSI`)||""}function V(e="",t,n,r){j(`${e}DSR`),j(`${e}DS`),j(`${e}DSI`),j(`${e}${N}`);let i=K(t);u.remove(i,null==r?void 0:r.session);let o=J(n);u.remove(o,null==r?void 0:r.refresh)}let G=m&&(null==localStorage?void 0:localStorage.getItem("fingerprint.endpoint.url"))||"https://api.descope.com",B=(e=!1)=>{let t=E("fp");if(!t)return null;let n=JSON.parse(t);return(new Date).getTime()>n.expiry&&!e?null:n.value},H=async(e,t=G)=>{try{var n,r,i,s,a,l,u,w,y,m,b,k,S,O,_,C;let D;if(B())return;let A=(Date.now().toString(36)+Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).substring(0,27),I=new URL(t);I.pathname="/fXj8gt3x8VulJBna/x96Emn69oZwcd7I6";let E=new URL(t);E.pathname="/fXj8gt3x8VulJBna/w78aRZnnDZ3Aqw0I";let j=E.toString()+"?apiKey=<apiKey>&version=<version>&loaderVersion=<loaderVersion>",R=((n={apiKey:e,endpoint:[I.toString(),c],scriptUrlPattern:[j,g]}).scriptUrlPattern,y=n.token,m=n.apiKey,b=void 0===m?y:m,k=(0,o.__rest)(n,["scriptUrlPattern","token","apiKey"]),S=null!==(r="scriptUrlPattern",w=Object.prototype.hasOwnProperty.call(n,r)?n[r]:void 0)&&void 0!==w?w:g,_=(a=[],l=function(){a.push({time:new Date,state:document.visibilityState})},i=document,s="visibilitychange",i.addEventListener(s,l,void 0),u=function(){return i.removeEventListener(s,l,void 0)},l(),O=[a,u])[0],C=O[1],Promise.resolve().then(function(){if(!b||"string"!=typeof b)throw Error("API key required");return function(e,t){var n,r,i,s,a,l,u=[],c=(n=(0,o.__spreadArray)([],e,!0),r={current:function(){return n[0]},postpone:function(){var e=n.shift();void 0!==e&&n.push(e)},exclude:function(){n.shift()}}
1,a=0,i=function(){return Math.random()*Math.min(3e3,100*Math.pow(2,a++))},s=new Set,[r.current(),function(e,t){var n,o=t instanceof Error?t.message:"";if(o===d||o===h)r.exclude(),n=0;else if(o===p)r.exclude();else if(o===f){var a=Date.now()-e.getTime()<50,l=r.current();l&&a&&!s.has(l)&&(s.add(l),n=0),r.postpone()}else r.postpone();var u=r.current();return void 0===u?void 0:[u,null!=n?n:e.getTime()+i()-Date.now()]}]),g=c[0],v=c[1];if(void 0===g)return Promise.reject(TypeError("The list of script URL patterns is empty"));var w=function(e){var n=new Date,r=function(t){return u.push({url:e,startedAt:n,finishedAt:new Date,error:t})},i=t(e);return i.then(function(){return r()},r),i.catch(function(e){if(null!=l||(l=e),u.length>=5)throw l;var t=v(n,e);if(!t)throw l;var r=t[0],i=t[1];return new Promise(function(e){return setTimeout(e,i)}).then(function(){return w(r)})})};return w(g).then(function(e){return[e,u]})}((Array.isArray(S)?S:[S]).map(function(e){var t,n;return t=String(e),n=encodeURIComponent,t.replace(/<[^<>]+>/g,function(e){return"<version>"===e?"3":"<apiKey>"===e?n(b):"<loaderVersion>"===e?n("3.11.6"):e})}),v)}).catch(function(e){throw C(),e instanceof Error&&e.message===p?Error(f):e}).then(function(e){var t=e[0],n=e[1];return C(),t.load((0,o.__assign)((0,o.__assign)({},k),{ldi:{attempts:n,visibilityStates:_}}))})),T=await R,{requestId:U}=await T.get({linkedId:A});D={value:{vsid:A,vrid:U},expiry:(new Date).getTime()+864e5},x("fp",JSON.stringify(D))}catch(e){console.warn("Could not load fingerprint",e)}},z=()=>{j("fp")},Z=e=>{let t=B(!0);return t&&e.body&&(e.body.fpData=t),e},W="descopeFlowNonce",X="X-Descope-Flow-Nonce",Y="/v1/flow/start",ee="/v1/flow/next",et=(e,t=W)=>`${t}${e}`,en=e=>{var t;return(null==(t=/.*\|#\|(.*)/.exec(e))?void 0:t[1])||null},er=e=>{var t;return e.path===ee&&(null==(t=e.body)?void 0:t.executionId)?en(e.body.executionId):null},ei="dls_last_user_login_id",eo="dls_last_user_display_name",es=()=>E(ei),ea=()=>E(eo),el=e=>async(...t)=>{t[1]=t[1]||{};let[,n={}]=t,r=es(),i=ea();return r&&(null!=n.lastAuth||(n.lastAuth={}),n.lastAuth.loginId=r,n.lastAuth.name=i),await e(...t)},eu="DSLI",ec=e=>async(...t)=>{let n=await e(...t);return U(eu),n};function ed(){let e=[];return{pub:t=>{e.forEach(e=>e(t))},sub:t=>{let n=e.push(t)-1;return()=>e.splice(n,1)}}}async function eh(e){var t;let n,r=((n=JSON.parse(e)).publicKey.challenge=em(n.publicKey.challenge),n.publicKey.user.id=em(n.publicKey.user.id),null==(t=n.publicKey.excludeCredentials)||t.forEach(e=>{e.id=em(e.id)}),n);try{let e=await navigator.credentials.create(r);return JSON.stringify({id:e.id,rawId:eb(e.rawId),type:e.type,response:{attestationObject:eb(e.response.attestationObject),clientDataJSON:eb(e.response.clientDataJSON)}})}catch(e){throw await eg(e,r,!0)}}async function ef(e){let t=ew(e);try{return ey(await navigator.credentials.get(t))}catch(e){throw await eg(e,t,!1)}}async function ep(e,t){let n=ew(e);n.signal=t.signal,n.mediation="conditional";try{return ey(await navigator.credentials.get(n))}catch(e){throw await eg(e,n,!1)}}async function eg(e,t,n){if(e&&"object"==typeof e)try{e.reason=await async function(e,t,n){var r,i;let o=null==e?void 0:e.name;if("AbortError"===o&&(null==t?void 0:t.signal)instanceof AbortSignal)return"aborted";if("InvalidStateError"===o&&n)return"authenticator_already_registered";if("NotSupportedError"===o)return"no_supported_algorithm";if("ConstraintError"===o)return"authenticator_constraints_unsupported";if("SecurityError"===o){let e=window.location.hostname;return"localhost"===e||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)?"invalid_rpid":"invalid_domain"}if(!await ev())return"webauthn_unsupported";let s="platform"===(null==(i=null==(r=null==t?void 0:t.publicKey)?void 0:r.authenticatorSelection)?void 0:i.authenticatorAttachment);return n&&s&&!await ev(!0)?"platform_authenticator_unsupported":"NotAllowedError"===o?"not_allowed":"unknown"}(e,t,n)}catch(e){}return e}async function ev(e=!1){var t,n;if(!m)return Promise.resolve(!1);if(m&&window.descopeBridge){let e=null==(n=null==(t=window.descopeBridge)?void 0:t.hostInfo)?void 0:n.webauthn;if("boolean"==typeof e)return e}let r=!!(window.PublicKeyCredential&&navigator.credentials&&navigator.credentials.create&&navigator.credentials.get);return r&&e&&PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable?PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable():r}function ew(e){var t;let n=JSON.parse(e);return n.publicKey.challenge=em(n.publicKey.challenge),null==(t=n.publicKey.allowCredentials)||t.forEach(e
1=>{e.id=em(e.id)}),n}function ey(e){return JSON.stringify({id:e.id,rawId:eb(e.rawId),type:e.type,response:{authenticatorData:eb(e.response.authenticatorData),clientDataJSON:eb(e.response.clientDataJSON),signature:eb(e.response.signature),userHandle:e.response.userHandle?eb(e.response.userHandle):void 0}})}function em(e){let t=e.replace(/_/g,"/").replace(/-/g,"+");return Uint8Array.from(atob(t),e=>e.charCodeAt(0)).buffer}function eb(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}var ek,eS=(ek=e=>({async signUp(t,n,r){let i=await e.webauthn.signUp.start(t,window.location.origin,n,r);if(!i.ok)return i;let o=await eh(i.data.options);return await e.webauthn.signUp.finish(i.data.transactionId,o)},async signIn(t,n){let r=await e.webauthn.signIn.start(t,window.location.origin,void 0,void 0,n);if(!r.ok)return r;let i=await ef(r.data.options);return await e.webauthn.signIn.finish(r.data.transactionId,i)},async signUpOrIn(t,n){var r;let i=await e.webauthn.signUpOrIn.start(t,window.location.origin,n);if(!i.ok)return i;if(null==(r=i.data)?void 0:r.create){let t=await eh(i.data.options);
1return await e.webauthn.signUp.finish(i.data.transactionId,t)}{let t=await ef(i.data.options);return await e.webauthn.signIn.finish(i.data.transactionId,t)}},async update(t,n,r){let i=await e.webauthn.update.start(t,window.location.origin,n,r);if(!i.ok)return i;let o=await eh(i.data.options);return await e.webauthn.update.finish(i.data.transactionId,o)},helpers:{create:eh,get:ef,isSupported:ev,conditional:ep}}),(...e)=>{let t=ek(...e);return Object.assign(t.signUp,e[0].webauthn.signUp),Object.assign(t.signIn,e[0].webauthn.signIn),Object.assign(t.signUpOrIn,e[0].webauthn.signUpOrIn),Object.assign(t.update,e[0].webauthn.update),t});let eO="/fedcm/config";async function e_(e,t){var n;try{await eC(e,t)}catch(e){null==(n=null==t?void 0:t.onFailed)||n.call(t,e)}}async function eC(e,t){var n,r;let i=await async function(e,t="google",n,r,i){let o=(()=>{if(window.crypto&&window.crypto.getRandomValues){let e=new Uint8Array(16);return window.crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}return Math.random().toString(36).substring(2)})(),s=await async function(){return new Promise((e,t)=>{if(window.google)return void e(window.google.accounts.id);let n=document.getElementById("google-gsi-client-script");n||(n=document.createElement("script"),document.head.appendChild(n),n.async=!0,n.defer=!0,n.id="google-gsi-client-script",n.src="https://accounts.google.com/gsi/client"),n.onload=function(){window.google?e(window.google.accounts.id):t("Failed to load Google GSI client script - not loaded properly")},n.onerror=function(){t("Failed to load Google GSI client script - failed to load")}})}(),a=await e.oauth.getOneTapClientId(t);if(!a.ok)throw Error("Failed to get OneTap client ID for provider "+t);let l=a.data.clientId;return new Promise(e=>{var a,u;let c=n=>{e({provider:t,nonce:o,credential:null==n?void 0:n.credential})};s.initialize(Object.assign(Object.assign({},n),{itp_support:null==(a=null==n?void 0:n.itp_support)||a,use_fedcm_for_prompt:null==(u=null==n?void 0:n.use_fedcm_for_prompt)||u,client_id:l,callback:c,nonce:o})),s.prompt(e=>{var t,n;if(i&&(null==e?void 0:e.isDismissedMoment())){let n=null==(t=e.getDismissedReason)?void 0:t.call(e);return null==i||i(n),void c()}if(r&&(null==e?void 0:e.isSkippedMoment())){let t=null==(n=e.getSkippedReason)?void 0:n.call(e);return null==r||r(t),void c()}})})}(e,t.provider,t.oneTapConfig,t.onSkipped,t.onDismissed);if(!i.credential)return null;if(null==t?void 0:t.onCodeReceived){let r=await e.oauth.verifyOneTapIDToken(i.provider,i.credential,i.nonce,null==t?void 0:t.loginOptions);if(!r.ok||!r.data)throw Error("Failed to verify OneTap client ID for provider "+i.provider);null==(n=null==t?void 0:t.onCodeReceived)||n.call(t,r.data.code)}else{let n=await e.oauth.exchangeOneTapIDToken(i.provider,i.credential,i.nonce,null==t?void 0:t.loginOptions);if(!n.ok||!n.data)throw Error("Failed to exchange OneTap client ID for provider "+i.provider);null==(r=null==t?void 0:t.onAuthenticated)||r.call(t,n.data)}}let eD=(e,t)=>new Promise((n,r)=>{if(!e.length)return r(Error("No URLs provided to loadScriptWithFallback"));let i=t();if(i)return n(i);let o=e.shift(),s=document.createElement("script");s.src=o,s.id=(e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return Math.abs(t).toString(16)})(o),s.onload=()=>{let e=t();if(e)return n(e);throw Error("Could not get entry after loading script from URL")},s.addEventListener("error",()=>{eD(e,t),s.setAttribute("data-error","true")}),document.body.appendChild(s)}),eA=async(e,t,n)=>{let r,o,s,a;i||(i=(async()=>{try{return require("oidc-client-ts")}catch(e){return eD([b,k],()=>window.oidc)}})());let{OidcClient:l,WebStorageStateStore:u}=await i;if(!l)throw Error("oidc-client-ts is not installed. Please install it by running `npm install oidc-client-ts`");let c=(null==n?void 0:n.redirectUri)||window.location.href;if(null==n?void 0:n.issuer){if(!n.clientId)throw Error("clientId is required when providing a custom issuer/authority");r=n.issuer,o=n.clientId,s=`${o}_user`,a="openid"}else(null==n?void 0:n.applicationId)?(r=e.httpClient.buildUrl(t),r=`${r}/${n.applicationId}`):r=e.httpClient.buildUrl(t),o=t,s=`${o}_user`,a="openid email roles descope.custom_claims offline_access";let d={authority:r,client_id:o,redirect_uri:c,response_type:"code",scope:(null==n?void 0:n.scope)||a,stateStore:new u({store:window.localStorage,prefix:o}),loadUserInfo:!0,fetchRequestCredentials:"same-origin"};return(null==n?void 0:n.redirectUri)&&(d.redirect_uri=n.redirectUri),{client:new l(d),stateUserKey:s}},eI=(function(...e){return t=>e.reduce((e,t)=>
1t(e),t)})(e=>t=>(r=t.customStorage,e(t)),e=>t=>{var{fpKey:n,fpLoad:r}=t,i=(0,o.__rest)(t,["fpKey","fpLoad"]);return m?(n&&r&&H(n).catch(()=>null),e(C(i,{beforeRequest:Z}))):e(i)},e=>t=>e(Object.assign(Object.assign({},t),{baseHeaders:Object.assign({"x-descope-sdk-name":"web-js","x-descope-sdk-version":"1.51.3"},t.baseHeaders)})),e=>t=>{let n=ed(),r=ed(),i=ed(),o=ed(),s=e(C(t,{afterRequest:async(e,t)=>{if(A(e,t))q("Session invalidated, notifying subscribers with empty values"),r.pub(null),i.pub(null),n.pub(null),o.pub(null);else{let e=await (async e=>{let t=await D(e);return(null==t?void 0:t.user)||((null==t?void 0:t.hasOwnProperty("userId"))?t:void 0)})(t);e&&i.pub(e);let{sessionJwt:s,sessionExpiration:a,claims:l}=await D(t);s&&r.pub(s),l&&o.pub(l),(a||s)&&n.pub(a||42)}}}));return Object.assign((0,a.de)(s,["logout","logoutAll","oidc.logout"],e=>async(...t)=>{let s=await e(...t);return r.pub(null),i.pub(null),n.pub(null),o.pub(null),s}),{onSessionTokenChange:r.sub,onUserChange:i.sub,onClaimsChange:o.sub,onIsAuthenticatedChange:e=>n.sub(t=>{e(!!t)})})},e=>t=>{var n;let{enableFlowNonce:i=!0,nonceStoragePrefix:s=W}=t,a=(0,o.__rest)(t,["enableFlowNonce","nonceStoragePrefix"]);if(!i)return e(a);((e=W)=>{var t,n,i;try{if(!I)return;for(let o=0;o<(t=void 0,n=void 0,i=void 0,null!=(i=null!=(t=null==r?void 0:r.length)?t:m&&(null==(n=window.localStorage)?void 0:n.length))?i:0);o++){let t=R(o);if(t&&t.startsWith(e)){let e=E(t);if(e)try{JSON.parse(e).expiry<Date.now()&&j(t)}catch(e){j(t)}}}}catch(e){console.error("Error cleaning up expired nonces:",e)}})(s);let l=e(C(a,{afterRequest:async(e,t)=>{if(e.path!==Y&&e.path!==ee)return;let{nonce:n,executionId:r}=await (async(e,t)=>{try{let n=t.headers.get(X),r=await t.clone().json().then(e=>(null==e?void 0:e.executionId)||null).catch(()=>null);return r||(r=er(e)),{nonce:n,executionId:en(r)}}catch(e){return{nonce:null,executionId:null}}})(e,t);n&&r&&((e,t,n,r=W)=>{try{let i=et(e,r),o={value:t,expiry:Date.now()+1e3*(n?172800:10800),isStart:n};x(i,JSON.stringify(o))}catch(e){console.error("Error setting flow nonce:",e)}})(r,n,e.path===Y,s)},beforeRequest:e=>{if(e.path===ee){let t=er(e);if(t){let n=((e,t=W)=>{try{let n=et(e,t),r=E(n);if(!r)return null;let i=JSON.parse(r);return i.expiry<Date.now()?(((e,t=W)=>{try{let n=et(e,t);j(n)}catch(e){console.error("Error removing flow nonce:",e)}})(e,t),null):i.value}catch(e){return console.error("Error getting flow nonce:",e),null}})(t,s);n&&(e.headers=e.headers||{},e.headers[X]=n)}}return e}}));if(null==(n=l.flow)?void 0:n.next){let e=Promise.resolve(),t=l.flow.next.bind(l.flow);l.flow.next=async(...n)=>{let r,i=e;e=new Promise(e=>{r=e}),await i;try{return await t(...n)}finally{r()}}}return l},e=>t=>{let n=e(C(t,{afterRequest:async(e,t)=>{if(A(e,t))return void U(eu);let n=await D(t);(null==n?void 0:n.sessionExpiration)&&((e,t)=>{var n,r;try{m&&(null==(r=null==(n=window.localStorage)?void 0:n.setItem)||r.call(n,e,t))}catch(e){}})(eu,String(n.sessionExpiration))}}));return(0,a.de)(n,["logout","logoutAll","oidc.logout"],ec)},e=>t=>{let n,r;var{autoRefresh:i}=t,l=(0,o.__rest)(t,["autoRefresh"]);let u=!!i,c="object"==typeof i&&(null==i?void 0:i.customActivityTracking);if(!u||m&&window.descopeBridge)return Object.assign(e(l),{markUserActive:()=>{P("markUserActive() called but has no effect")}});let{clearAllTimers:d,setTimer:h}=(n=[],{clearAllTimers:()=>{for(;n.length;)clearTimeout(n.pop())},setTimer:(e,t)=>{n.push(setTimeout(e,t))}}),f,p,g=null,v=!1,w=!1;c&&(q("Activity-based refresh enabled"),r=!0,g={hadActivity:()=>r,reset:()=>{r=!1},markActive:()=>{r=!0}}),m&&document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&f&&new Date>f&&(q("Expiration time passed, refreshing session"),y.refresh(M()||p))});let y=e(C(l,{afterRequest:async(e,t)=>{let{sessionJwt:n,refreshJwt:r,sessionExpiration:i,nextRefreshSeconds:o}=await D(t);if(A(e,t))q("Session invalidated, canceling all timers"),d();else if(n||i){var a,l;let e;if(!(f=((e,t)=>{if(t)return new Date(1e3*t);q("Could not extract expiration time from session token, trying to decode the token");try{let t=(0,s.s)(e);if(t.exp)return new Date(1e3*t.exp)}catch(e){return null}})(n,i)))return void q("Could not extract expiration time from session token");p=r,v=o>0;
1let t=(a=f,(l=o)>0?(e=1e3*l,q(`Using provided nextRefreshSeconds: ${l}s`)):e=(a?a.getTime()-(new Date).getTime():0)-2e4,e>0x7fffffff&&(q(`Timeout is too large (${e}ms), setting it to 2147483647ms`),e=0x7fffffff),e);if(d(),t<=2e4)return void q("Session is too close to expiration, not setting refresh timer");let u=new Date(Date.now()+t).toLocaleTimeString("en-US",{hour12:!1});q(`Setting refresh timer for ${u}. (${t}ms)`),g&&(g.reset(),w=!1),h(()=>{if(m&&"hidden"===document.visibilityState)q("Skipping refresh due to timer - document is hidden");else{if(g&&v&&!g.hadActivity())return q("Skipping refresh due to timer - user is idle"),void(w=!0);q("Refreshing session due to timer"),y.refresh(M()||r)}},t)}}}));return Object.assign((0,a.de)(y,["logout","logoutAll","oidc.logout"],e=>async(...t)=>{let n=await e(...t);return q("Clearing all timers"),d(),n}),{markUserActive:g?()=>{q("markUserActive() called"),v||q("markUserActive() called but server does not have inactivity timeout configured (no nextRefreshSeconds)"),g.markActive(),w&&(q("User became active after skipped refresh, triggering refresh"),w=!1,d(),y.refresh(M()||p))}:()=>{P("markUserActive() called but customActivityTracking is not enabled — this call has no effect")}})},e=>t=>{var{storeLastAuthenticatedUser:n=!0,keepLastAuthenticatedUserAfterLogout:r=!1}=t,i=(0,o.__rest)(t,["storeLastAuthenticatedUser","keepLastAuthenticatedUserAfterLogout"]);if(!n)return Object.assign(e(i),{getLastUserLoginId:es,getLastUserDisplayName:ea});let s=e(C(i,{afterRequest:async(e,t)=>{var n;let{userInfo:r,lastAuth:i}=await (async e=>{if(!(null==e?void 0:e.ok))return{userInfo:void 0,lastAuth:void 0};let t=await (null==e?void 0:e.clone().json()),n=_((null==t?void 0:t.authInfo)||t||{});return{userInfo:(null==n?void 0:n.user)||((null==n?void 0:n.hasOwnProperty("userId"))?n:void 0),lastAuth:t.lastAuth}})(t),o=null==(n=null==r?void 0:r.loginIds)?void 0:n[0],s=null==r?void 0:r.name;o?(x(ei,o),x(eo,s)):(null==i?void 0:i.loginId)&&x(ei,i.loginId)}})),l=(0,a.de)(s,["flow.start"],el);return Object.assign(l=(0,a.de)(l,["logout","logoutAll"],e=>async(...t)=>{let n=await e(...t);return r||(j(ei),j(eo)),n}),{getLastUserLoginId:es,getLastUserDisplayName:ea})},e=>t=>{let n,r;var{persistTokens:i,sessionTokenViaCookie:s,refreshTokenViaCookie:l,storagePrefix:c,refreshCookieName:d}=t,h=(0,o.__rest)(t,["persistTokens","sessionTokenViaCookie","refreshTokenViaCookie","storagePrefix","refreshCookieName"]);if(!i||!m)return e(Object.assign({refreshCookieName:d},h));let f=e(C(Object.assign({refreshCookieName:d},h),{beforeRequest:e=>{let t=Object.assign(e,{token:e.token||M(c,l)});if(!d){let e=function(e=""){return E(`${e}${N}`)}(c);e&&(t.headers=Object.assign(Object.assign({},t.headers||{}),{"x-descope-refresh-cookie-name":e}))}let n=function(e=""){return E(`${e}DTD`)||""}(c);return n&&(t.headers=Object.assign(Object.assign({},t.headers||{}),{"x-descope-trusted-device-token":n})),t},afterRequest:async(e,t)=>{if(A(e,t))q("Session invalidated, clearing persisted tokens"),V(c,s,l,n);else{let e=await D(t);e.cookieName?x(`${c||""}${N}`,e.cookieName):e.refreshJwt&&j(`${c||""}${N}`);let r=((e={},t=!1,n="",r=!1)=>{var i,o,s,a;let l,{sessionJwt:c,refreshJwt:d,trustedDeviceJwt:h}=e;if(d)if(r){j(`${n}DSR`);let t=r.sameSite||"Strict",s=null==(i=r.secure)||i,a=null!=(o=r.domain)?o:e.cookieDomain,u=J(r);s&&"https:"!==window.location.protocol&&P("Refresh token cookie is configured with secure=true but the page is not using HTTPS. The cookie will not be set. To fix this, pass refreshTokenViaCookie: { secure: process.env['NODE_ENV'] !== 'development' }");let c=Object.assign(Object.assign({},e),{cookieSameSite:t,cookieSecure:s,cookieDomain:a});Q(u,d,c);let h=L(a);l=Object.assign(Object.assign({},l),{refresh:{path:c.cookiePath,domain:h?a:void 0}})}else{let e=J(r);u.remove(e),x(`${n}DSR`,d)}if(c)if(t){let n=t.sameSite||"Strict",r=null==(s=t.secure)||s,i=null!=(a=t.domain)?a:e.cookieDomain,o=K(t);r&&"https:"!==window.location.protocol&&P("Session token cookie is configured with secure=true but the page is not using HTTPS. The cookie will not be set. To fix this, pass sessionTokenViaCookie: { secure: process.env['NODE_ENV'] !== 'development' }");let u=Object.assign(Object.assign({},e),{cookieSameSite:n,cookieSecure:r,cookieDomain:i});Q(o,c,u);let d=L(i);l=Object.assign(Object.assign({},l),{session:{path:u.cookiePath,domain:d?i:void 0}})}else x(`${n}DS`,c);return e.idToken&&x(`${n}DSI`,e.idToken),h&&x(`${n}DTD`,h),l})(e,s,c,l);r&&(n=r)}}}));return Object.assign((0,a.de)(f,["logout","logoutAll","oidc.logout"],(r=()=>n,e=>async(...t)=>{let n=await e(...t);return V(c,s,l,null==r?void 0:r()),n})),{getRefreshToken:()=>M(c,l),getSessionToken:()=>$(c,s),getIdToken:()=>F(c)})})(e=>{var t,n,r;let i,o,s=(0,a.Ay)(e),l=(n=e.projectId,r=e.oidcConfig,i=async()=>{let e,t;return e&&t||({client:e,stateUserKey:t}=await eA(s,n,r)),{client:e,stateUserKey:t}},{loginWithRedirect:async(e={},t=!1)=>{var n;let{client:r}=await i(),o=await r.createSigninRequest(e),{url:a}=o;return t||(await (null==(n=s.httpClient.hooks)?void 0:n.afterRequest
1({},new Response(JSON.stringify(o)))),window.location.href=a),{ok:!0,data:o}},finishLogin:o=async(e="")=>{var t;let n,{client:r,stateUserKey:o}=await i(),a=await r.processSigninResponse(e||window.location.href);return await (null==(t=s.httpClient.hooks)?void 0:t.afterRequest({},new Response(JSON.stringify(a)))),x(o,JSON.stringify({id_token:a.id_token,session_state:a.session_state,profile:a.profile})),(n=new URL(window.location.href)).searchParams.delete("code"),n.searchParams.delete("state"),window.history.replaceState({},document.title,n.toString()),a},finishLoginIfNeed:async(e="")=>{if(window.location.search.includes("code")&&window.location.search.includes("state"))return await o(e)},refreshToken:async e=>{var t;let n,{client:r,stateUserKey:o}=await i(),a=(n=E(o))?JSON.parse(n):null;if(!a)throw Error("User not found in storage to refresh token");let l=e;if(!l){let e={};s.httpClient.hooks.beforeRequest(e),l=e.token}let u=await r.useRefreshToken({state:{refresh_token:l,session_state:a.session_state,profile:a.profile}});return await (null==(t=s.httpClient.hooks)?void 0:t.afterRequest
1({},new Response(JSON.stringify(u)))),u},logout:async(e,t=!1)=>{let{client:n,stateUserKey:r}=await i();e||(e={}),e.id_token_hint=e.id_token_hint||F(),e.post_logout_redirect_uri=e.post_logout_redirect_uri||window.location.href;let o=await n.createSignoutRequest(e),{url:s}=o;return j(r),t||window.location.replace(s),o}});return Object.assign(Object.assign({},s),{refresh:async(t,n)=>{var r;if(m&&window.descopeBridge)return q(`Refresh called in native flow: ${Error().stack}`),Promise.resolve({ok:!1,error:{errorCode:"J171000",errorDescription:"Refresh is not supported in native flows via the web SDK"}});if(e.oidcConfig)try{return await l.refreshToken(t),Promise.resolve({ok:!0})}catch(e){return Promise.resolve({ok:!1,error:{errorCode:"J161001",errorDescription:e.toString()}})}if(n&&m&&void 0!==window.localStorage&&!T(eu)&&!E(ei)&&!T("DSLI_DISABLED"))return Promise.resolve({ok:!0});let i=$(),o=M(),a="";if(e.getExternalToken)try{a=await (null==(r=e.getExternalToken)?void 0:r.call(e))}catch(e){q("Error getting external token while refreshing",e)}return s.refresh(t,{dcs:i?"t":"f",dcr:o?"t":"f"},a,n)},logout:async t=>{if(e.oidcConfig)try{return await l.logout({id_token_hint:t}),Promise.resolve({ok:!0})}catch(e){return Promise.resolve({ok:!1,error:{errorCode:"J161000",errorDescription:e.toString()}})}return s.logout(t)},flow:Object.assign(Object.assign({},s.flow),{start:async(...e)=>{let t=await ev(),n=Object.assign(Object.assign({location:window.location.href},e[1]),{deviceInfo:{webAuthnSupport:t},startOptionsVersion:1});return e[1]=n,s.flow.start(...e)}}),webauthn:eS(s),fedcm:(t=e.projectId,{onetap:{requestExchangeCode(e){e_(s,e)},requestAuthentication(e){e_(s,e)}},async oneTap(e,t,n,r,i){await eC(s,{provider:e,oneTapConfig:t,loginOptions:n,onSkipped:r,onDismissed:i})},async launch(e){var n;let r={identity:{context:e||"signin",providers:[{configURL:s.httpClient.buildUrl(t+eO),clientId:t}]}},i=await (null==(n=navigator.credentials)?void 0:n.get(r));return s.refresh(i.token)},isSupported:()=>m&&"IdentityCredential"in window,async isLoggedIn(e){var n;let r=s.httpClient.buildUrl(t+eO);try{let i=await (null==(n=navigator.credentials)?void 0:n.get({identity:{context:e||"signin",providers:[{configURL:r,clientId:t}]}}));return!!i&&!!i.token}catch(e){return!1}}}),oidc:l})})},14433:(e,t,n)=>{n.d(t,{K:()=>i,u:()=>r});let r={"x-descope-sdk-name":"react","x-descope-sdk-version":"2.30.6"},i="u">typeof window},29091:(e,t,n)=>{n.d(t,{$:()=>a});var r=n(41802),i=n(31123),o=n(63175),s=n(23968),a=class extends s.Q{constructor(e={}){super(),this.config=e,this.#d=new Map}#d;build(e,t,n){let o=t.queryKey,s=t.queryHash??(0,r.F$)(o,t),a=this.get(s);return a||(a=new i.X({client:e,queryKey:o,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o)}),this.add(a)),a}add(e){this.#d.has(e.queryHash)||(this.#d.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#d.get(e.queryHash);t&&(e.destroy(),t===e&&this.#d.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){o.jG.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#d.get(e)}getAll(){return[...this.#d.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r.MK)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,r.MK)(e,t)):t}notify(e){o.jG.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){o.jG.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){o.jG.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}}},36596:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(37285),i=n(99715),o=n(71269);let s=()=>{let{session:e,claims:t,isSessionLoading:n,isOidcLoading:s,fetchSession:a,isSessionFetched:l,isAuthenticated:u}=(0,i.A)(),c=(0,r.useRef)(n||s);(0,r.useMemo)(()=>{c.current=n||s},[n,s]);let d=!u&&!n&&!(0,o.Tq)();return(0,r.useMemo)(()=>{d&&!l&&(c.current=!0)},[l]),(0,r.useEffect)(()=>{d&&a()},[a]),{isSessionLoading:c.current,sessionToken:e,claims:t,isAuthenticated:u}}},50456:(e,t,n)=>{function r(e){return JSON.stringify(e,(e,t)=>!function(e){if(!i(e))return!1;let t=e.constructor;if(void 0===t)return!0;let n=t.prototype;return!!i(n)&&!!n.hasOwnProperty("isPrototypeOf")}(t)?"bigint"==typeof t?t.toString():t:Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}))}function i(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(e){let{_defaulted:t,behavior:n,gcTime:r,initialData:i,initialDataUpdatedAt:o,maxPages:s,meta:a,networkMode:l,queryFn:u,queryHash:c,queryKey:d,queryKeyHashFn:h,retry:f,retryDelay:p,structuralSharing:g,getPreviousPageParam:v,getNextPageParam:w,initialPageParam:y,_optimisticResults:m,enabled:b,notifyOnChangeProps:k,placeholderData:S,refetchInterval:O,refetchIntervalInBackgroun
1d:_,refetchOnMount:C,refetchOnReconnect:D,refetchOnWindowFocus:A,retryOnMount:I,select:x,staleTime:E,suspense:j,throwOnError:R,config:T,connector:U,query:q,...P}=e;return P}n.d(t,{Zi:()=>r,xO:()=>o})},59453:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(37285),i=n(99715),o=n(89172);let s=e=>`You can only use this ${e} after sdk initialization. Make sure to supply 'projectId' to <AuthProvider /> component`,a={get(e,t){if("object"==typeof e[t]&&null!==e[t])return new Proxy(e[t],a);if("function"==typeof e[t])return()=>{throw Error(s("function"))};throw Error(s("attribute"))}},l=()=>{let{sdk:e}=(0,i.A)();return(0,r.useMemo)(()=>e||new Proxy((0,o.LD)(),a),[e])}},70408:(e,t,n)=>{n.d(t,{A:()=>r});let r=n(37285).createContext(void 0)},71269:(e,t,n)=>{n.d(t,{Kb:()=>r,Tq:()=>o,lV:()=>i});let r=e=>(...t)=>{if(!e)throw Error("You can only use this function after sdk initialization. Make sure to supply 'projectId' to <AuthProvider /> component");return e(...t)},i=e=>(...t)=>{let n;try{n=e(...t)}catch(e){console.error(e)}return n},o=()=>"u">typeof window&&!!window.descopeBridge},85483:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(37285),i=n(99715);let o=()=>{let{user:e,fetchUser:t,isUserLoading:n,isAuthenticated:o,isUserFetched:s}=(0,i.A)(),[a,l]=(0,r.useState)(!1),u=(0,r.useRef)(n),c=(0,r.useMemo)(()=>!e&&!n&&o&&!a,[t,o,a]);return(0,r.useMemo)(()=>{u.current=n},[n]),(0,r.useMemo)(()=>{c&&!s&&(u.current=!0)},[c,s]),(0,r.useEffect)(()=>{c&&(l(!0),t())},[c]),{isUserLoading:u.current,user:e}}},89172:(e,t,n)=>{let r;n.d(t,{Ay:()=>a,K6:()=>g,LD:()=>l,Ow:()=>v,Y9:()=>w,_r:()=>h,fp:()=>p,mj:()=>u,n3:()=>d,q:()=>f,ve:()=>c});var i=n(1968),o=n(14433),s=n(71269);let a=e=>{let t=(0,i.ns)(Object.assign({persistTokens:o.K,autoRefresh:o.K},e));return r=t,t},l=()=>a({projectId:"temp pid",persistTokens:!1,autoRefresh:!1,storeLastAuthenticatedUser:!1});r=l();let u=()=>o.K?null==r?void 0:r.getSessionToken():(console.warn("Get session token is not supported in SSR"),""),c=()=>o.K?null==r?void 0:r.getRefreshToken():(console.warn("Get refresh token is not supported in SSR"),""),d=(e=u())=>null==r?void 0:r.isJwtExpired(e),h=(e=c())=>null==r?void 0:r.isJwtExpired(e),f=(0,s.lV)((e=u(),t)=>null==r?void 0:r.getJwtPermissions(e,t)),p=(0,s.lV)((e=u(),t)=>null==r?void 0:r.getJwtRoles(e,t)),g=(0,s.lV)((e=u())=>null==r?void 0:r.getCurrentTenant(e)),v=(e=c())=>null==r?void 0:r.refresh(e),w=()=>r},99715:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(37285),i=n(70408),o=()=>{let e=(0,r.useContext)(i.A);if(!e)throw Error("You can only use this hook in the context of <AuthProvider />");return e}}}]);
2//# sourceMappingURL=27023-e3495d7875835f31.js.map

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.