PageSourceSearch

https://loadmuscle.com/_next/static/chunks/3073-7d357c607c7c112b.js

js loadmuscle.com collected 2026-10-01 12:37:33 UTC 72,878 bytes, 9 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="29a0e58e-a99b-4aa2-aca0-f13f91728170",e._sentryDebugIdIdentifier="sentry-dbid-29a0e58e-a99b-4aa2-aca0-f13f91728170")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3073],{46246:function(e,t,n){/**
2 * @license React
3 * use-sync-external-store-shim.production.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var r=n(2265),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return a(function(){i.value=n,i.getSnapshot=t,u(i)&&c({inst:i})},[e,n,t]),s(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},10554:function(e,t,n){e.exports=n(46246)},26430:function(e,t,n){n.d(t,{Vo:function(){return P},vn:function(){return el},a7:function(){return et},qI:function(){return en},iz:function(){return E},gM:function(){return ea},yB:function(){return es},N1:function(){return er},C2:function(){return ei},sO:function(){return eo},Gl:function(){return A},tL:function(){return W},oG:function(){return T},E7:function(){return R},RM:function(){return w},RE:function(){return N},tF:function(){return _},KQ:function(){return U},Gv:function(){return x},Rl:function(){return I},ej:function(){return L},JM:function(){return S},qq:function(){return j},aC:function(){return Q},cL:function(){return b.cL},E2:function(){return H},o8:function(){return b.o8},eW:function(){return b.eW},kP:function(){return b.kP},xo:function(){return b.xo},zq:function(){return X},QS:function(){return Z},aF:function(){return b.aF},Kr:function(){return V},B$:function(){return F},HZ:function(){return $},Lu:function(){return J},X:function(){return D},qH:function(){return B},Mp:function(){return z},ge:function(){return M},r0:function(){return ee}});var r,i,o,s,a=n(68351),l=(n(37837),{veryStrict:{afterMinutes:10,level:"multiFactor"},strict:{afterMinutes:10,level:"secondFactor"},moderate:{afterMinutes:60,level:"secondFactor"},lax:{afterMinutes:1440,level:"secondFactor"}}),u=new Set(["firstFactor","secondFactor","multiFactor"]),c=new Set(["veryStrict","strict","moderate","lax"]),d=e=>"number"==typeof e&&e>0,h=e=>u.has(e),p=e=>c.has(e),f=(e,t)=>{let{orgId:n,orgRole:r,orgPermissions:i}=t;return(e.role||e.permission)&&n&&r&&i?e.permission?i.includes(e.permission):e.role?r===e.role:null:null},g=e=>!!("string"==typeof e&&p(e)||"object"==typeof e&&h(e.level)&&d(e.afterMinutes))&&(e=>"string"==typeof e?l[e]:e).bind(null,e),m=(e,{__experimental_factorVerificationAge:t})=>{if(!e.__experimental_reverification||!t)return null;let n=g(e.__experimental_reverification);if(!n)return null;let{level:r,afterMinutes:i}=n(),[o,s]=t,a=-1!==o?i>o:null,l=-1!==s?i>s:null;switch(r){case"firstFactor":return a;case"secondFactor":return -1!==s?l:a;case"multiFactor":return -1===s?a:a&&l}},v=e=>t=>{if(!e.userId)return!1;let n=f(t,e),r=m(t,e);return[n,r].some(e=>null===e)?[n,r].some(e=>!0===e):[n,r].every(e=>!0===e)},k=n(2265),b=n(60026),y=n(46179);n(90093),n(20357),new WeakMap,new WeakMap,new WeakSet,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakMap,new WeakSet;var w=(0,a.t5)({packageName:"@clerk/clerk-react"});function S(e){w.setMessages(e).setPackageName(e)}var[P,C]=(0,b.uH)("AuthContext"),E=b.b5,O=b.rI,U="You've added multiple <ClerkProvider> components in your React component tree. Wrap your components in a single <ClerkProvider>.",_=e=>`You've passed multiple children components to <${e}/>. You can only pass a single child component or text.`,j="Unsupported usage of isSatellite, domain or proxyUrl. The usage of isSatellite, domain or proxyUrl as function is not supported in non-browser environments.",M="<UserProfile.Page /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",z="<UserProfile.Link /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",L="<OrganizationProfile.Page /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",I="<OrganizationProfile.Link /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",R=e=>`<${e} /> can only accept <${e}.Page /> and <${e}.Link /> as its children. Any other provided component will be ignored.`,T=e=>`Missing props. <${e}.Page /> component requires the following props: url, label, labelIcon, alongside with children to be rendered inside the page.`,A=e=>`Missing props. <${e}.Link /> component requires the following props: url, label and labelIcon.`,x=e=>`The <${e}/> component uses path-based routing by default unless a different routing strategy is provided using the \`routing\` prop. When path-based routing is used, you need to provide the path where the component is mounted on by using the \`path\` prop. Example: <${e} path={'/my-path'} />`,N=e=>`The \`path\` prop will only be respected when the Clerk component uses path-based routing. To resolve this error, pass \`routing='path'\` to the <${e}/> component, or drop the \`path\` prop to switch to hash-based routing. For more details please refer to our docs: https://clerk.c
9om/docs`,V="<UserButton /> can only accept <UserButton.UserProfilePage />, <UserButton.UserProfileLink /> and <UserButton.MenuItems /> as its children. Any other provided component will be ignored.",W="<UserButton.MenuItems /> component can only accept <UserButton.Action /> and <UserButton.Link /> as its children. Any other provided component will be ignored.",D="<UserButton.MenuItems /> component needs to be a direct child of `<UserButton />`.",F="<UserButton.Action /> component needs to be a direct child of `<UserButton.MenuItems />`.",B="<UserButton.Link /> component needs to be a direct child of `<UserButton.MenuItems />`.",$="Missing props. <UserButton.Link /> component requires the following props: href, label and labelIcon.",J="Missing props. <UserButton.Action /> component requires the following props: label.",q=e=>{(0,b.Rm)(()=>{w.throwMissingClerkProviderError({source:e})})},G=e=>new Promise(t=>{e.loaded&&t(),e.addOnLoaded(t)}),K=e=>async t=>(await G(e),e.session)?e.session.getToken(t):null,Y=e=>async(...t)=>(await G(e),e.signOut(...t)),Q=()=>{q("useAuth");let{sessionId:e,userId:t,actor:n,orgId:r,orgRole:i,orgSlug:o,orgPermissions:s,__experimental_factorVerificationAge:a}=C(),l=O(),u=(0,k.useCallback)(K(l),[l]),c=(0,k.useCallback)(Y(l),[l]),d=(0,k.useCallback)(e=>v({userId:t,orgId:r,orgRole:i,orgPermissions:s,__experimental_factorVerificationAge:a})(e),[t,a,r,i,s]);return void 0===e&&void 0===t?{isLoaded:!1,isSignedIn:void 0,sessionId:e,userId:t,actor:void 0,orgId:void 0,orgRole:void 0,orgSlug:void 0,has:void 0,signOut:c,getToken:u}:null===e&&null===t?{isLoaded:!0,isSignedIn:!1,sessionId:e,userId:t,actor:null,orgId:null,orgRole:null,orgSlug:null,has:()=>!1,signOut:c,getToken:u}:e&&t&&r&&i?{isLoaded:!0,isSignedIn:!0,sessionId:e,userId:t,actor:n||null,orgId:r,orgRole:i,orgSlug:o||null,has:d,signOut:c,getToken:u}:e&&t&&!r?{isLoaded:!0,isSignedIn:!0,sessionId:e,userId:t,actor:n||null,orgId:null,orgRole:null,orgSlug:null,has:d,signOut:c,getToken:u}:w.throw("Invalid state. Feel free to submit a bug or reach out to support here: https://clerk.com/support")};function H(e){let{startEmailLinkFlow:t,cancelEmailLinkFlow:n}=k.useMemo(()=>e.createEmailLinkFlow(),[e]);return k.useEffect(()=>n,[]),{startEmailLinkFlow:t,cancelEmailLinkFlow:n}}var X=()=>{var e;q("useSignIn");let t=O(),n=(0,b.sX)();return(null==(e=t.telemetry)||e.record((0,y.J)("useSignIn")),n)?{isLoaded:!0,signIn:n.signIn,setActive:t.setActive}:{isLoaded:!1,signIn:void 0,setActive:void 0}},Z=()=>{var e;q("useSignUp");let t=O(),n=(0,b.sX)();return(null==(e=t.telemetry)||e.record((0,y.J)("useSignUp")),n)?{isLoaded:!0,signUp:n.signUp,setActive:t.setActive}:{isLoaded:!1,signUp:void 0,setActive:void 0}},ee=(e,t)=>{t=t||e.displayName||e.name||"Component",e.displayName=t;let n=n=>{q(t||"withClerk");let r=O();return r.loaded?k.createElement(e,{...n,clerk:r}):null};return n.displayName=`withClerk(${t})`,n},et=({children:e})=>(q("ClerkLoaded"),O().loaded)?k.createElement(k.Fragment,null,e):null,en=({children:e})=>(q("ClerkLoading"),O().loaded)?null:k.createElement(k.Fragment,null,e),er=ee(({clerk:e,...t})=>{let{client:n,session:r}=e,i=n.activeSessions&&n.activeSessions.length>0;return k.useEffect(()=>{null===r&&i?e.redirectToAfterSignOut():e.redirectToSignIn(t)},[]),null},"RedirectToSignIn"),ei=ee(({clerk:e,...t})=>(k.useEffect(()=>{e.redirectToSignUp(t)},[]),null),"RedirectToSignUp"),eo=ee(({clerk:e})=>(k.useEffect(()=>{e.redirectToUserProfile()},[]),null),"RedirectToUserProfile"),es=ee(({clerk:e})=>(k.useEffect(()=>{e.redirectToOrganizationProfile()},[]),null),"RedirectToOrganizationProfile"),ea=ee(({clerk:e})=>(k.useEffect(()=>{e.redirectToCreateOrganization()},[]),null),"RedirectToCreateOrganization"),el=ee(({clerk:e,...t})=>(k.useEffect(()=>{e.handleRedirectCallback(t)},[]),null),"AuthenticateWithRedirectCallback")},93073:function(e,t,n){n.d(t,{vn:function(){return c.vn},a7:function(){return c.a7},qI:function(){return c.qI},El:function(){return ek},Gp:function(){return er},Kb:function(){return es},Bg:function(){return eo},A:function(){return en},Li:function(){return ei},gM:function(){return c.gM},yB:function(){return c.yB},N1:function(){return c.N1},C2:function(){return c.C2},sO:function(){return c.sO},cL:function(){return J},$d:function(){return ea},qu:function(){return ec},AM:function(){return eu},Mo:function(){return q},gX:function(){return el},l8:function(){return Z},Iw:function(){return Y},aC:function(){return c.aC},ll:function(){return c.cL},E2:function(){return c.E2},o8:function(){return c.o8},eW:function(){return c.eW},kP:function(){return c.kP},xo:function(){return c.xo},zq:function(){return c.zq},QS:function(){return c.QS},aF:function(){return c.aF}});var r,i,o,s,a,l,u,c=n(26430),d=e=>{throw TypeError(e)},h=(e,t,n)=>t.has(e)||d("Cannot "+n),p=(e,t,n)=>(h(e,t,"read from private field"),n?n.call(e):t.get(e)),f=(e,t,n)=>t.has(e)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),g=(e,t,n,r)=>(h(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),m=(e,t,n
9)=>(h(e,t,"access private method"),n),v=n(57723),k=n(69569),b=n(60026),y=n(2265),w=n(54887),S=n(68069);n(37837);var P=n(290);function C(e,t,n){return"function"==typeof e?e(t):void 0!==e?e:void 0!==n?n:void 0}"undefined"==typeof window||window.global||(window.global="undefined"==typeof global?window:global);var E=e=>t=>{try{return y.Children.only(e)}catch(e){return c.RM.throw((0,c.tF)(t))}},O=(e,t)=>(e||(e=t),"string"==typeof e&&(e=y.createElement("button",null,e)),e),U=e=>(...t)=>{if(e&&"function"==typeof e)return e(...t)},_=new Map,j=e=>{let t=Array(e.length).fill(null),[n,r]=(0,y.useState)(t);return e.map((e,t)=>({id:e.id,mount:e=>r(n=>n.map((n,r)=>r===t?e:n)),unmount:()=>r(e=>e.map((e,n)=>n===t?null:e)),portal:()=>y.createElement(y.Fragment,null,n[t]?(0,w.createPortal)(e.component,n[t]):null)}))},M=(e,t)=>!!e&&y.isValidElement(e)&&(null==e?void 0:e.type)===t,z=e=>I({children:e,reorderItemsLabels:["account","security"],LinkComponent:K,PageComponent:G,MenuItemsComponent:Q,componentName:"UserProfile"}),L=e=>I({children:e,reorderItemsLabels:["general","members"],LinkComponent:et,PageComponent:ee,componentName:"OrganizationProfile"}),I=({children:e,LinkComponent:t,PageComponent:n,MenuItemsComponent:r,reorderItemsLabels:i,componentName:o})=>{let s=[];y.Children.forEach(e,e=>{if(!M(e,n)&&!M(e,t)&&!M(e,r)){e&&(0,k.yJ)((0,c.E7)(o));return}let{props:a}=e,{children:l,label:u,url:d,labelIcon:h}=a;if(M(e,n)){if(R(a,i))s.push({label:u});else if(T(a))s.push({label:u,labelIcon:h,children:l,url:d});else{(0,k.yJ)((0,c.oG)(o));return}}if(M(e,t)){if(A(a))s.push({label:u,labelIcon:h,url:d});else{(0,k.yJ)((0,c.Gl)(o));return}}});let a=[],l=[],u=[];s.forEach((e,t)=>{if(T(e)){a.push({component:e.children,id:t}),l.push({component:e.labelIcon,id:t});return}A(e)&&u.push({component:e.labelIcon,id:t})});let d=j(a),h=j(l),p=j(u),f=[],g=[];return s.forEach((e,t)=>{if(R(e,i)){f.push({label:e.label});return}if(T(e)){let{portal:n,mount:r,unmount:i}=d.find(e=>e.id===t),{portal:o,mount:s,unmount:a}=h.find(e=>e.id===t);f.push({label:e.label,url:e.url,mount:r,unmount:i,mountIcon:s,unmountIcon:a}),g.push(n),g.push(o);return}if(A(e)){let{portal:n,mount:r,unmount:i}=p.find(e=>e.id===t);f.push({label:e.label,url:e.url,mountIcon:r,unmountIcon:i}),g.push(n);return}}),{customPages:f,customPagesPortals:g}},R=(e,t)=>{let{children:n,label:r,url:i,labelIcon:o}=e;return!n&&!i&&!o&&t.some(e=>e===r)},T=e=>{let{children:t,label:n,url:r,labelIcon:i}=e;return!!t&&!!r&&!!i&&!!n},A=e=>{let{children:t,label:n,url:r,labelIcon:i}=e;return!t&&!!r&&!!i&&!!n},x=e=>N({children:e,reorderItemsLabels:["manageAccount","signOut"],MenuItemsComponent:Q,MenuActionComponent:H,MenuLinkComponent:X,UserProfileLinkComponent:K,UserProfilePageComponent:G}),N=({children:e,MenuItemsComponent:t,MenuActionComponent:n,MenuLinkComponent:r,UserProfileLinkComponent:i,UserProfilePageComponent:o,reorderItemsLabels:s})=>{let a=[],l=[],u=[];y.Children.forEach(e,e=>{if(!M(e,t)&&!M(e,i)&&!M(e,o)){e&&(0,k.yJ)(c.Kr);return}if(M(e,i)||M(e,o))return;let{props:l}=e;y.Children.forEach(l.children,e=>{if(!M(e,n)&&!M(e,r)){e&&(0,k.yJ)(c.tL);return}let{props:t}=e,{label:i,labelIcon:o,href:l,onClick:u,open:d}=t;if(M(e,n)){if(V(t,s))a.push({label:i});else if(W(t)){let e={label:i,labelIcon:o};if(void 0!==u)a.push({...e,onClick:u});else if(void 0!==d)a.push({...e,open:d.startsWith("/")?d:`/${d}`});else{(0,k.yJ)("Custom menu item must have either onClick or open property");return}}else{(0,k.yJ)(c.Lu);return}}if(M(e,r)){if(D(t))a.push({label:i,labelIcon:o,href:l});else{(0,k.yJ)(c.HZ);return}}})});let d=[],h=[];a.forEach((e,t)=>{W(e)&&d.push({component:e.labelIcon,id:t}),D(e)&&h.push({component:e.labelIcon,id:t})});let p=j(d),f=j(h);return a.forEach((e,t)=>{if(V(e,s)&&l.push({label:e.label}),W(e)){let{portal:n,mount:r,unmount:i}=p.find(e=>e.id===t),o={label:e.label,mountIcon:r,unmountIcon:i};"onClick"in e?o.onClick=e.onClick:"open"in e&&(o.open=e.open),l.push(o),u.push(n)}if(D(e)){let{portal:n,mount:r,unmount:i}=f.find(e=>e.id===t);l.push({label:e.label,href:e.href,mountIcon:r,unmountIcon:i}),u.push(n)}}),{customMenuItems:l,customMenuItemsPortals:u}},V=(e,t)=>{let{children:n,label:r,onClick:i,labelIcon:o}=e;return!n&&!i&&!o&&t.some(e=>e===r)},W=e=>{let{label:t,labelIcon:n,onClick:r,open:i}=e;return!!n&&!!t&&("function"==typeof r||"string"==typeof i)},D=e=>{let{label:t,href:n,labelIcon:r}=e;return!!n&&!!r&&!!t}
9,F=e=>"mount"in e,B=e=>"open"in e,$=class extends y.PureComponent{constructor(){super(...arguments),this.portalRef=y.createRef()}componentDidUpdate(e){var t,n,r,i;if(!F(e)||!F(this.props))return;let o=(0,k.zu)(e.props,"customPages","customMenuItems","children"),s=(0,k.zu)(this.props.props,"customPages","customMenuItems","children"),a=(null==(t=o.customPages)?void 0:t.length)!==(null==(n=s.customPages)?void 0:n.length),l=(null==(r=o.customMenuItems)?void 0:r.length)!==(null==(i=s.customMenuItems)?void 0:i.length);(!(0,b.c1)(o,s)||a||l)&&this.props.updateProps({node:this.portalRef.current,props:this.props.props})}componentDidMount(){this.portalRef.current&&(F(this.props)&&this.props.mount(this.portalRef.current,this.props.props),B(this.props)&&this.props.open(this.props.props))}componentWillUnmount(){this.portalRef.current&&(F(this.props)&&this.props.unmount(this.portalRef.current),B(this.props)&&this.props.close())}render(){var e,t,n,r;return y.createElement(y.Fragment,null,y.createElement("div",{ref:this.portalRef}),F(this.props)&&(null==(t=null==(e=this.props)?void 0:e.customPagesPortals)?void 0:t.map((e,t)=>(0,y.createElement)(e,{key:t}
9))),F(this.props)&&(null==(r=null==(n=this.props)?void 0:n.customMenuItemsPortals)?void 0:r.map((e,t)=>(0,y.createElement)(e,{key:t}))))}},J=(0,c.r0)(({clerk:e,...t})=>y.createElement($,{mount:e.mountSignIn,unmount:e.unmountSignIn,updateProps:e.__unstable__updateProps,props:t}),"SignIn"),q=(0,c.r0)(({clerk:e,...t})=>y.createElement($,{mount:e.mountSignUp,unmount:e.unmountSignUp,updateProps:e.__unstable__updateProps,props:t}),"SignUp");function G({children:e}){return(0,k.yJ)(c.ge),y.createElement(y.Fragment,null,e)}function K({children:e}){return(0,k.yJ)(c.Mp),y.createElement(y.Fragment,null,e)}var Y=Object.assign((0,c.r0)(({clerk:e,...t})=>{let{customPages:n,customPagesPortals:r}=z(t.children);return y.createElement($,{mount:e.mountUserProfile,unmount:e.unmountUserProfile,updateProps:e.__unstable__updateProps,props:{...t,customPages:n},customPagesPortals:r})},"UserProfile"),{Page:G,Link:K});function Q({children:e}){return(0,k.yJ)(c.X),y.createElement(y.Fragment,null,e)}function H({children:e}){return(0,k.yJ)(c.B$),y.createElement(y.Fragment,null,e)}function X({children:e}){return(0,k.yJ)(c.qH),y.createElement(y.Fragment,null,e)}var Z=Object.assign((0,c.r0)(({clerk:e,...t})=>{let{customPages:n,customPagesPortals:r}=z(t.children),i=Object.assign(t.userProfileProps||{},{customPages:n}),{customMenuItems:o,customMenuItemsPortals:s}=x(t.children);return y.createElement($,{mount:e.mountUserButton,unmount:e.unmountUserButton,updateProps:e.__unstable__updateProps,props:{...t,userProfileProps:i,customMenuItems:o},customPagesPortals:r,customMenuItemsPortals:s})},"UserButton"),{UserProfilePage:G,UserProfileLink:K,MenuItems:Q,Action:H,Link:X});function ee({children:e}){return(0,k.yJ)(c.ej),y.createElement(y.Fragment,null,e)}function et({children:e}){return(0,k.yJ)(c.Rl),y.createElement(y.Fragment,null,e)}var en=Object.assign((0,c.r0)(({clerk:e,...t})=>{let{customPages:n,customPagesPortals:r}=L(t.children);return y.createElement($,{mount:e.mountOrganizationProfile,unmount:e.unmountOrganizationProfile,updateProps:e.__unstable__updateProps,props:{...t,customPages:n},customPagesPortals:r})},"OrganizationProfile"),{Page:ee,Link:et}),er=(0,c.r0)(({clerk:e,...t})=>y.createElement($,{mount:e.mountCreateOrganization,unmount:e.unmountCreateOrganization,updateProps:e.__unstable__updateProps,props:t}),"CreateOrganization"),ei=Object.assign((0,c.r0)(({clerk:e,...t})=>{let{customPages:n,customPagesPortals:r}=L(t.children),i=Object.assign(t.organizationProfileProps||{},{customPages:n});return y.createElement($,{mount:e.mountOrganizationSwitcher,unmount:e.unmountOrganizationSwitcher,updateProps:e.__unstable__updateProps,props:{...t,organizationProfileProps:i},customPagesPortals:r})},"OrganizationSwitcher"),{OrganizationProfilePage:ee,OrganizationProfileLink:et}),eo=(0,c.r0)(({clerk:e,...t})=>y.createElement($,{mount:e.mountOrganizationList,unmount:e.unmountOrganizationList,updateProps:e.__unstable__updateProps,props:t}),"OrganizationList"),es=(0,c.r0)(({clerk:e,...t})=>y.createElement($,{open:e.openGoogleOneTap,close:e.closeGoogleOneTap,props:t}),"GoogleOneTap"),ea=(0,c.r0)(({clerk:e,children:t,...n})=>{let{signUpFallbackRedirectUrl:r,forceRedirectUrl:i,fallbackRedirectUrl:o,signUpForceRedirectUrl:s,mode:a,...l}=n,u=E(t=O(t,"Sign in"))("SignInButton"),c=()=>{let t={forceRedirectUrl:i,fallbackRedirectUrl:o,signUpFallbackRedirectUrl:r,signUpForceRedirectUrl:s};return"modal"===a?e.openSignIn(t):e.redirectToSignIn({...t,signInFallbackRedirectUrl:o,signInForceRedirectUrl:i})},d=async e=>(u&&"object"==typeof u&&"props"in u&&await U(u.props.onClick)(e),c()),h={...l,onClick:d};return y.cloneElement(u,h)},"SignInButton"),el=(0,c.r0)(({clerk:e,children:t,...n})=>{let{fallbackRedirectUrl:r,forceRedirectUrl:i,signInFallbackRedirectUrl:o,signInForceRedirectUrl:s,mode:a,unsafeMetadata:l,...u}=n,c=E(t=O(t,"Sign up"))("SignUpButton"),d=()=>{let t={fallbackRedirectUrl:r,forceRedirectUrl:i,signInFallbackRedirectUrl:o,signInForceRedirectUrl:s,unsafeMetadata:l};return"modal"===a?e.openSignUp(t):e.redirectToSignUp({...t,signUpFallbackRedirectUrl:r,signUpForceRedirectUrl:i})},h=async e=>(c&&"object"==typeof c&&"props"in c&&await U(c.props.onClick)(e),d()),p={...u,onClick:h};return y.cloneElement(c,p)},"SignUpButton"),eu=(0,c.r0)(({clerk:e,children:t,...n})=>{let{redirectUrl:r="/",signOutOptions:i,...o}=n,s=E(t=O(t,"Sign out"))("SignOutButton"),a=()=>e.signOut({redirectUrl:r}),l=async e=>(await U(s.props.onClick)(e),a()),u={...o,onClick:l};return y.cloneElement(s,u)},"SignOutButton"),ec=(0,c.r0)(({clerk:e,children:t,...n})=>{let{redirectUrl:r,...i}=n,o=E(t=O(t,"Sign in with Metamask"))("SignInWithMetamaskButton"),s=async()=>{!async function(){await e.authenticateWithMetamask({redirectUrl:r||void 0})}()},a=async e=>(await U(o.props.onClick)(e),s()),l={...i,onClick:a};return y.cloneElement(o,l)},"SignInWithMetamask"),ed={name:"@clerk/clerk-react",version:"5.11.1",environment:"production"},eh=class e{constructor(e){f(this,l),this.clerkjs=null,this.preopenOneTap=null,this.preopenUserVerification=null,this.preopenSignIn=null,this.preopenSignUp=null,this.preopenUserProfile=null,this.preopenOrganizationProfile=null,this.preopenCreateOrganization=null,this.premountSign
9InNodes=new Map,this.premountSignUpNodes=new Map,this.premountUserProfileNodes=new Map,this.premountUserButtonNodes=new Map,this.premountOrganizationProfileNodes=new Map,this.premountCreateOrganizationNodes=new Map,this.premountOrganizationSwitcherNodes=new Map,this.premountOrganizationListNodes=new Map,this.premountMethodCalls=new Map,this.premountAddListenerCalls=new Map,this.loadedListeners=[],f(this,r,!1),f(this,i),f(this,o),f(this,s),this.buildSignInUrl=e=>{let t=()=>{var t;return(null==(t=this.clerkjs)?void 0:t.buildSignInUrl(e))||""};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("buildSignInUrl",t)},this.buildSignUpUrl=e=>{let t=()=>{var t;return(null==(t=this.clerkjs)?void 0:t.buildSignUpUrl(e))||""};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("buildSignUpUrl",t)},this.buildAfterSignInUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildAfterSignInUrl())||""};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("buildAfterSignInUrl",e)},this.buildAfterSignUpUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildAfterSignUpUrl())||""};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("buildAfterSignUpUrl",e)},this.buildAfterSignOutUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildAfterSignOutUrl())||""};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("buildAfterSignOutUrl",e)},this.buildAfterMultiSessionSingleSignOutUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildAfterMultiSessionSingleSignOutUrl())||""};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("buildAfterMultiSessionSingleSignOutUrl",e)},this.buildUserProfileUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildUserProfileUrl())||""};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("buildUserProfileUrl",e)},this.buildCreateOrganizationUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildCreateOrganizationUrl())||""};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("buildCreateOrganizationUrl",e)},this.buildOrganizationProfileUrl=()=>{let e=()=>{var e;return(null==(e=this.clerkjs)?void 0:e.buildOrganizationProfileUrl())||""};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("buildOrganizationProfileUrl",e)},this.buildUrlWithAuth=e=>{let t=()=>{var t;return(null==(t=this.clerkjs)?void 0:t.buildUrlWithAuth(e))||""};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("buildUrlWithAuth",t)},this.handleUnauthenticated=()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.handleUnauthenticated()};this.clerkjs&&p(this,r)?e():this.premountMethodCalls.set("handleUnauthenticated",e)},this.addOnLoaded=e=>{this.loadedListeners.push(e),this.loaded&&this.emitLoaded()},this.emitLoaded=()=>{this.loadedListeners.forEach(e=>e()),this.loadedListeners=[]},this.hydrateClerkJS=e=>{if(!e)throw Error("Failed to hydrate latest Clerk JS");return this.clerkjs=e,this.premountMethodCalls.forEach(e=>e()),this.premountAddListenerCalls.forEach((t,n)=>{t.nativeUnsubscribe=e.addListener(n)}),null!==this.preopenSignIn&&e.openSignIn(this.preopenSignIn),null!==this.preopenSignUp&&e.openSignUp(this.preopenSignUp),null!==this.preopenUserProfile&&e.openUserProfile(this.preopenUserProfile),null!==this.preopenUserVerification&&e.__experimental_openUserVerification(this.preopenUserVerification),null!==this.preopenOneTap&&e.openGoogleOneTap(this.preopenOneTap),null!==this.preopenOrganizationProfile&&e.openOrganizationProfile(this.preopenOrganizationProfile),null!==this.preopenCreateOrganization&&e.openCreateOrganization(this.preopenCreateOrganization),this.premountSignInNodes.forEach((t,n)=>{e.mountSignIn(n,t)}),this.premountSignUpNodes.forEach((t,n)=>{e.mountSignUp(n,t)}),this.premountUserProfileNodes.forEach((t,n)=>{e.mountUserProfile(n,t)}),this.premountUserButtonNodes.forEach((t,n)=>{e.mountUserButton(n,t)}),this.premountOrganizationListNodes.forEach((t,n)=>{e.mountOrganizationList(n,t)}),g(this,r,!0),this.emitLoaded(),this.clerkjs},this.__unstable__updateProps=async e=>{let t=await m(this,l,u).call(this);if(t&&"__unstable__updateProps"in t)return t.__unstable__updateProps(e)},this.setActive=({session:e,organization:t,beforeEmit:n})=>this.clerkjs?this.clerkjs.setActive({session:e,organization:t,beforeEmit:n}):Promise.reject(),this.openSignIn=e=>{this.clerkjs&&p(this,r)?this.clerkjs.openSignIn(e):this.preopenSignIn=e},this.closeSignIn=()=>{this.clerkjs&&p(this,r)?this.clerkjs.closeSignIn():this.preopenSignIn=null},this.__experimental_openUserVerification=e=>{this.clerkjs&&p(this,r)?this.clerkjs.__experimental_openUserVerification(e):this.preopenUserVerification=e},this.__experimental_closeUserVerification=()=>{this.clerkjs&&p(this,r)?this.clerkjs.__experimental_closeUserVerification():this.preopenUserVerification=null},this.openGoogleOneTap=e=>{this.clerkjs&&p(this,r)?this.clerkjs.openGoogleOneTap(e):this.preopenOneTap=e},this.closeGoogleOneTap=()=>{this.clerkjs&&p(this,r)?this.clerkjs.closeGoogleOneTap():this.preopenOneTap=null},this.openUserProfile=e=>{this.clerkjs&&p(this,r)?this.clerkjs.openUserProfile(e):this.preopenUserProfile=e},this.closeUserProfile=()=>{this.clerkjs&&p(this,r)?this.clerkjs.closeUserProfile():this.preopenUserProfile=null},this.openOrganizationProfile=e=>{this.clerkjs&&p(this,r)?this.clerkjs.openOrganizationProfile(e):this.preopenOrganizationProfile=e},this.closeOrganizationProfile=()=>{this.clerkjs&&p(this,r)?this.clerkjs.closeOrganizationProfile():this.preopenOrganizationProfile=null},this.openCreateOrganization=e=>{this.clerkjs&&p(this,r)?this.clerkjs.openCreateOrganization(e):this.preopenCreateOrganization=e},this.closeCreateOrganization=()=>{this.clerkjs&&p(this,r)?this.clerkjs.closeCreateOrganization():this.preopenCreateOrganization=null},this.openSignUp=e=>{this.clerkjs&&p(this,r)?this.clerkjs.openSignUp(e):this.preopenSignUp=e},this.closeSignUp=()=>{this.clerkjs&&p(this,r)?this.clerkjs.closeSignUp():this.preopenSignUp=null}
9,this.mountSignIn=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountSignIn(e,t):this.premountSignInNodes.set(e,t)},this.unmountSignIn=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountSignIn(e):this.premountSignInNodes.delete(e)},this.mountSignUp=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountSignUp(e,t):this.premountSignUpNodes.set(e,t)},this.unmountSignUp=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountSignUp(e):this.premountSignUpNodes.delete(e)},this.mountUserProfile=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountUserProfile(e,t):this.premountUserProfileNodes.set(e,t)},this.unmountUserProfile=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountUserProfile(e):this.premountUserProfileNodes.delete(e)},this.mountOrganizationProfile=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountOrganizationProfile(e,t):this.premountOrganizationProfileNodes.set(e,t)},this.unmountOrganizationProfile=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountOrganizationProfile(e):this.premountOrganizationProfileNodes.delete(e)},this.mountCreateOrganization=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountCreateOrganization(e,t):this.premountCreateOrganizationNodes.set(e,t)},this.unmountCreateOrganization=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountCreateOrganization(e):this.premountCreateOrganizationNodes.delete(e)},this.mountOrganizationSwitcher=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountOrganizationSwitcher(e,t):this.premountOrganizationSwitcherNodes.set(e,t)},this.unmountOrganizationSwitcher=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountOrganizationSwitcher(e):this.premountOrganizationSwitcherNodes.delete(e)},this.mountOrganizationList=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountOrganizationList(e,t):this.premountOrganizationListNodes.set(e,t)},this.unmountOrganizationList=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountOrganizationList(e):this.premountOrganizationListNodes.delete(e)},this.mountUserButton=(e,t)=>{this.clerkjs&&p(this,r)?this.clerkjs.mountUserButton(e,t):this.premountUserButtonNodes.set(e,t)},this.unmountUserButton=e=>{this.clerkjs&&p(this,r)?this.clerkjs.unmountUserButton(e):this.premountUserButtonNodes.delete(e)},this.addListener=e=>{if(this.clerkjs)return this.clerkjs.addListener(e);{let t=()=>{var t;let n=this.premountAddListenerCalls.get(e);n&&(null==(t=n.nativeUnsubscribe)||t.call(n),this.premountAddListenerCalls.delete(e))};return this.premountAddListenerCalls.set(e,{unsubscribe:t,nativeUnsubscribe:void 0}),t}},this.navigate=e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.navigate(e)};this.clerkjs&&p(this,r)?t():this.premountMethodCalls.set("navigate",t)},this.redirectWithAuth=async(...e)=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.redirectWithAuth(...e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("redirectWithAuth",t)},this.redirectToSignIn=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.redirectToSignIn(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("redirectToSignIn",t)},this.redirectToSignUp=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.redirectToSignUp(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("redirectToSignUp",t)},this.redirectToUserProfile=async()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToUserProfile()};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("redirectToUserProfile",e)},this.redirectToAfterSignUp=()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToAfterSignUp()};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("redirectToAfterSignUp",e)},this.redirectToAfterSignIn=()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToAfterSignIn()};this.clerkjs&&p(this,r)?e():this.premountMethodCalls.set("redirectToAfterSignIn",e)},this.redirectToAfterSignOut=()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToAfterSignOut()};this.clerkjs&&p(this,r)?e():this.premountMethodCalls.set("redirectToAfterSignOut",e)},this.redirectToOrganizationProfile=async()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToOrganizationProfile()};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("redirectToOrganizationProfile",e)},this.redirectToCreateOrganization=async()=>{let e=()=>{var e;return null==(e=this.clerkjs)?void 0:e.redirectToCreateOrganization()};if(this.clerkjs&&p(this,r))return e();this.premountMethodCalls.set("redirectToCreateOrganization",e)},this.handleRedirectCallback=e=>{var t;let n=()=>{var t;return null==(t=this.clerkjs)?void 0:t.handleRedirectCallback(e)};this.clerkjs&&p(this,r)?null==(t=n())||t.catch(()=>{}):this.premountMethodCalls.set("handleRedirectCallback",n)},this.handleGoogleOneTapCallback=(e,t)=>{var n;let i=()=>{var n;return null==(n=this.clerkjs)?void 0:n.handleGoogleOneTapCallback(e,t)};this.clerkjs&&p(this,r)?null==(n=i())||n.catch(()=>{}):this.premountMethodCalls.set("handleGoogleOneTapCallback",i)},this.handleEmailLinkVerification=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.handleEmailLinkVerification(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("handleEmailLinkVerification",t)},this.authenticateWithMetamask=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.authenticateWithMetamask(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("authenticateWithMetamask",t)},this.authenticateWithCoinbaseWallet=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.authenticateWithCoinbaseWallet(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("authenticateWithCoinbaseWallet",t)},this.authenticateWithWeb3=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.authenticateWithWeb3(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("authenticateWithWeb3",t)},this.authenticateWithGoogleOneTap=async e=>(await m(this,l,u).call(this)).authenticateWithGoogleOneTap(e),this.createOrganization=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.createOrganization(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("createOrganization",t)},this.getOrganization=async e=>{let t=()=>{var t;return null==(t=this.clerkjs)?void 0:t.getOrganization(e)};if(this.clerkjs&&p(this,r))return t();this.premountMethodCalls.set("getOrganization",t)},this.signOut=async(e,t)=>{let n=()=>{var n;return null==(n=this.clerkjs)?void 0:n.signOut(e,t)};if(this.clerkjs&&p(this,r))return n();this.premountMethodCalls.set("signOut",n)};let{Clerk:t=null,publishableKey:n}=e||{};g(this,s,n),g(this,o,null==e?void 0:e.proxyUrl),g(this,i,null==e?void 0:e.domain),this.options=e,this.Clerk=t,this.mode=(0,P._f)()?"browser":"server",this.options.sdkMetadata||(this.options.sdkMetadata=ed),this.loadClerkJS()}get publishableKey(){return p(this,s)}get loaded(){return p(this,r)}static getOrCreateInstance(t){return(0,P._f)()&&p(this,a)&&(!t.Clerk||p(this,a).Clerk===t.Clerk)||g(this,a,new e(t)),p(this,a)}static clearInstance(){g(this,a,null)}get domain(){return"undefined"!=typeof window&&window.location?C(p(this,i),new URL(window.location.href),""):"function"==typeof p(this,i)?c.RM.throw(c.qq):p(this,i)||""}get proxyUrl(){return"undefined"!=typeof window&&window.location?C(p(this,o),new URL(window.location.href),""):"function"==typeof p(this,o)?c.RM.throw(c.qq):p(this,o)||""}get sdkMetadata(){var e;return(null==(e=this.clerkjs)?void 0:e.sdkMetadata)||this.options.sdkMetadata||void 0}get instanceType(){var e;return null==(e=this.clerkjs)?void 0:e.instanceType}get frontendApi(){var e;return(null==(e=this.clerkjs)?void 0:e.frontendApi)||""}get isStandardBrowser(){var e;return(null==(e=this.clerkjs)?void 0:e.isStandardBrowser)||this.options.standardBrowser||!1}get isSatellite(){return"undefined"!=typeof window&&window.location?C(this.options.isSatellite,new URL(window.location.href),!1):"function"==typeof this.options.isSatellite&&c.RM.throw(c.qq)}async loadClerkJS(){var e,t;if(!("browser"!==this.mode||p(this,r))){"undefined"!=typeof window&&(window.__clerk_publishable_key=p(this,s),window.__clerk_proxy_url=this.proxyUrl,window.__clerk_domain=this.domain);try{if(this.Clerk){let e;(t=this.Clerk,"function"==typeof t)?(e=new this.Clerk(p(this,s),{proxyUrl:this.proxyUrl,domain:this.domain}),await e.load(this.options)):(e=this.Clerk).loaded||await e.load(this.options),global.Clerk=e}else{if(global.Clerk||await (0,v.YJ)({...this.options,publishableKey:p(this,s),proxyUrl:this.proxyUrl,domain:this.domain,nonce:this.options.nonce}),!global.Clerk)throw Error("Failed to download latest ClerkJS. Contact [email protected].");await global.Clerk.load(this.options)}if(null==(e=global.Clerk)?void 0:e.loaded)return this.hydrateClerkJS(global.Clerk);return}catch(e){console.error(e.stack||e.message||e);return}}}get version(){var e;return null==(e=this.clerkjs)?void 0:e.version}get client(){return this.clerkjs?this.clerkjs.client:void 0}get session(){return this.clerkjs?this.clerkjs.session:void 0}get user(){return this.clerkjs?this.clerkjs.user:void 0}get organization(){return this.clerkjs?this.clerkjs.organization:void 0}get telemetry(){return this.clerkjs?this.clerkjs.telemetry:void 0}get __unstable__environment(){return this.clerkjs?this.clerkjs.__unstable__environment:void 0}__unstable__setEnvironment(...e){this.clerkjs&&"__unstable__setEnvironment"in this.clerkjs&&this.clerkjs.__unstable__setEnvironment(e)}};r=new WeakMap,i=new WeakMap,o=new WeakMap,s=new WeakMap,a=new WeakMap,l=new WeakSet,u=function(){return new Promise(e=>{this.addOnLoaded(()=>e(this.clerkjs))})},f(eh,a);var ep=(e,t,n)=>!e&&n?ef(n):eg(t),ef=e=>{let t=e.userId,n=e.user,r=e.sessionId,i=e.session,o=e.organization,s=e.orgId,a=e.orgRole,l=e.orgPermissions;return{userId:t,user:n,sessionId:r,session:i,organization:o,orgId:s,orgRole:a,orgPermissions:l,orgSlug:e.orgSlug,actor:e.actor,__experimental_factorVerificationAge:e.__experimental_factorVerificationAge}},eg=e=>{var t;let n=e.user?e.user.id:e.user,r=e.user,i=e.session?e.session.id:e.session,o=e.session,s=e.session?e.session.__experimental_factorVerificationAge:null,a=null==o?void 0:o.actor,l=e.organization,u=e.organization?e.organization.id:e.organization,c=null==l?void 0:l.slug,d=l?null==(t=null==r?void 0:r.organizationMemberships)?void 0:t.find(e=>e.organization.id===u):l,h=d?d.permissions:d;return{userId:n,user:r,sessionId:i,session:o,organization:l,orgId:u,orgRole:d?d.role:d,orgSlug:c,orgPermissions:h,actor:a,__experimental_factorVerificationAge:s}};function em(e){let{isomorphicClerkOptions:t,initialState:n,children:r}=e,{isomorphicClerk:i,loaded:o}=ev(t),[s,a]=y.useState({client:i.client,session:i.session,user:i.user,organization:i.organization});y.useEffect(()=>i.addListener(e=>a({...e})),[]);let l=ep(o,s,n),u=y.useMemo(()=>({value:i}),[o]),d=y.useMemo(()=>({value:s.client}),[s.client]),{sessionId:h,session:p,userId:f,user:g,orgId:m,actor:v,organization:k,orgRole:w,orgSlug:S,orgPermissions:P,__experimental_factorVerificationAge:C}=l,E=y.useMemo(()=>({value:{sessionId:h,userId:f,actor:v,orgId:m,orgRole:w,orgSlug:S,orgPermissions:P,__experimental_factorVerificationAge:C}}),[h,f,v,m,w,S,C]),O=y.useMemo(()=>({value:p}),[h,p]),U=y.useMemo(()=>({value:g}),[f,g]),_=y.useMemo(()=>({value:{organization:k}}),[m,k]);return y.createElement(c.iz.Provider,{value:u},y.createElement(b.RY.Provider,{value:d},y.createElement(b.B3.Provider,{value:O},y.createElement(b.f0,{..._.value},y.createElement(c.Vo.Provider,{value:E},y.createElement(b.St.Provider,{value:U},r))))))}var ev=e=>{let[t,n]=y.useState(!1),r=y.useMemo(()=>eh.getOrCreateInstance(e),[]);return y.useEffect(()=>{r.__unstable__updateProps({appearance:e.appearance})},[e.appearance]),y.useEffect(()=>{r.__unstable__updateProps({options:e})},[e.localization]),y.useEffect(()=>{r.addOnLoaded(()=>n(!0))},[]),y.useEffect(()=>()=>{eh.clearInstance()},[]),{isomorphicClerk:r,loaded:t}},ek=function(e,t,n){let r=e.displayName||e.name||t||"Component",i=r=>(!function(e,t,n=1){y.useEffect(()=>{let r=_.get(e)||0;return r==n?c.RM.throw(t):(_.set(e,r+1),()=>{_.set(e,(_.get(e)||1)-1)})},[])}(t,n),y.createElement(e,{...r}));return i.displayName=`withMaxAllowedInstancesGuard(${r})`,i}(function(e){let{initialState:t,children:n,...r}=e,{publishableKey:i="",Clerk:o}=r;return o||(i?i&&!(0,S.x9)(i)&&c.RM.throwInvalidPublishableKeyError({key:i}):c.RM.throwMissingPublishableKeyError()),y.createElement(em,{initialState:t,isomorphicClerkOptions:r},n)},"ClerkProvider",c.KQ);ek.displayName="ClerkProvider",(0,c.JM)({packageName:"@clerk/clerk-react"}),(0,v.Aw)("@clerk/clerk-react")},63754:function(e,t,n){n.d(t,{iv:function(){return m},wE:function(){return g},YJ:function(){return f},Aw:function(){return p}});var r=(e,t="5.26.5")=>{if(e)return e;let n=i(t);return n?"snapshot"===n?"5.26.5":n:o(t)},i=e=>{var t;return null==(t=e.trim().replace(/^v/,"").match(/-(.+?)(\.|$)/))?void 0:t[1]},o=e=>e.trim().replace(/^v/,"").split(".")[0];function s(e){return e.startsWith("/")}async function a(e="",t){let{async:n,defer:r,beforeLoad:i,crossOrigin:o,nonce:s}=t||{};return new Promise((t,a)=>{e||a("loadScript cannot be called without a src"),document&&document.body||a("loadScript cannot be called when document does not exist");
9let l=document.createElement("script");o&&l.setAttribute("crossorigin",o),l.async=n||!1,l.defer=r||!1,l.addEventListener("load",()=>{l.remove(),t(l)}),l.addEventListener("error",()=>{l.remove(),a()}),l.src=e,l.nonce=s,null==i||i(l),document.body.appendChild(l)})}var l=n(54296),u=n(68069),c="Clerk: Failed to load Clerk",{isDevOrStagingUrl:d}=(0,u.MY)(),h=(0,l.t5)({packageName:"@clerk/shared"});function p(e){h.setPackageName({packageName:e})}var f=async e=>{let t=document.querySelector("script[data-clerk-js-script]");if(t)return new Promise((e,n)=>{t.addEventListener("load",()=>{e(t)}),t.addEventListener("error",()=>{n(c)})});if(!(null==e?void 0:e.publishableKey)){h.throwMissingPublishableKeyError();return}return a(g(e),{async:!0,crossOrigin:"anonymous",nonce:e.nonce,beforeLoad:v(e)}).catch(()=>{throw Error(c)})},g=e=>{var t,n;let{clerkJSUrl:i,clerkJSVariant:o,clerkJSVersion:a,proxyUrl:l,domain:c,publishableKey:h}=e;if(i)return i;let p="";p=l&&(!l||/^http(s)?:\/\//.test(l||"")||s(l))?(l?s(l)?new URL(l,window.location.origin).toString():l:"").replace(/http(s)?:\/\//,""):c&&!d((null==(t=(0,u.nQ)(h))?void 0:t.frontendApi)||"")?function(e){let t;if(!e)return"";if(e.match(/^(clerk\.)+\w*$/))t=/(clerk\.)*(?=clerk\.)/;else{if(e.match(/\.clerk.accounts/))return e;t=/^(clerk\.)*/gi}let n=e.replace(t,"");return`clerk.${n}`}(c):(null==(n=(0,u.nQ)(h))?void 0:n.frontendApi)||"";let f=o?`${o.replace(/\.+$/,"")}.`:"",g=r(a);return`https://${p}/npm/@clerk/clerk-js@${g}/dist/clerk.${f}browser.js`},m=e=>{let t={};return e.publishableKey&&(t["data-clerk-publishable-key"]=e.publishableKey),e.proxyUrl&&(t["data-clerk-proxy-url"]=e.proxyUrl),e.domain&&(t["data-clerk-domain"]=e.domain),e.nonce&&(t.nonce=e.nonce),t},v=e=>t=>{let n=m(e);for(let e in n)t.setAttribute(e,n[e])}},37837:function(e,t,n){n.d(t,{U9:function(){return f},ac:function(){return h},qx:function(){return p},r2:function(){return l},yA:function(){return c}});var r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,a=e=>{throw TypeError(e)},l=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},u=(e,t,n,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))s.call(e,l)||l===n||r(e,l,{get:()=>t[l],enumerable:!(a=i(t,l))||a.enumerable});return e},c=(e,t,n)=>(u(e,t,"default"),n&&u(n,t,"default")),d=(e,t,n)=>t.has(e)||a("Cannot "+n),h=(e,t,n)=>(d(e,t,"read from private field"),n?n.call(e):t.get(e)),p=(e,t,n,r)=>(d(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),f=(e,t,n)=>(d(e,t,"access private method"),n)},46470:function(e,t,n){n.d(t,{Fo:function(){return a},Iq:function(){return l},Xv:function(){return u},cM:function(){return s},iF:function(){return o},mv:function(){return r},vO:function(){return i}});var r=[".lcl.dev",".lclstage.dev",".lclclerk.com"],i=[".lcl.dev",".stg.dev",".lclstage.dev",".stgstage.dev",".dev.lclclerk.com",".stg.lclclerk.com",".accounts.lclclerk.com","accountsstage.dev","accounts.dev"],o=[".lcl.dev","lclstage.dev",".lclclerk.com",".accounts.lclclerk.com"],s=[".accountsstage.dev"],a="https://api.lclclerk.com",l="https://api.clerkstage.dev",u="https://api.clerk.com"},68069:function(e,t,n){n.d(t,{MY:function(){return l},x9:function(){return a},nQ:function(){return s}});var r=e=>"undefined"!=typeof atob&&"function"==typeof atob?atob(e):"undefined"!=typeof global&&global.Buffer?new global.Buffer(e,"base64").toString():e,i=n(46470),o="pk_live_";function s(e,t={}){if(!(e=e||"")||!a(e)){if(t.fatal)throw Error("Publishable key not valid.");return null}let n=e.startsWith(o)?"production":"development",i=r(e.split("_")[2]);return i=i.slice(0,-1),t.proxyUrl?i=t.proxyUrl:"development"!==n&&t.domain&&(i=`clerk.${t.domain}`),{instanceType:n,frontendApi:i}}function a(e){let t=(e=e||"").startsWith(o)||e.startsWith("pk_test_"),n=r(e.split("_")[2]||"").endsWith("$");return t&&n}function l(){let e=new Map;return{isDevOrStagingUrl:t=>{if(!t)return!1;let n="string"==typeof t?t:t.hostname,r=e.get(n);return void 0===r&&(r=i.vO.some(e=>n.endsWith(e)),e.set(n,r)),r}}}},290:function(e,t,n){function r(){return"undefined"!=typeof window}n.d(t,{_f:function(){return r}}),RegExp("bot|spider|crawl|APIs-Google|AdsBot|Googlebot|mediapartners|Google Favicon|FeedFetcher|Google-Read-Aloud|DuplexWeb-Google|googleweblight|bing|yandex|baidu|duckduck|yahoo|ecosia|ia_archiver|facebook|instagram|pinterest|reddit|slack|twitter|whatsapp|youtube|semrush","i")},90093:function(e,t,n){n.d(t,{fQ:function(){return i}});var r=e=>{let t=n=>{if(!n)return n;if(Array.isArray(n))return n.map(e=>"object"==typeof e||Array.isArray(e)?t(e):e);let r={...n};for(let n of Object.keys(r)){let i=e(n.toString());i!==n&&(r[i]=r[n],delete r[n]),"object"==typeof r[i]&&(r[i]=t(r[i]))}return r};return t};function i(e){if("boolean"==typeof e)return e;if(null==e)return!1;if("string"==typeof e){if("true"===e.toLowerCase())return!0;
9if("false"===e.toLowerCase())return!1}let t=parseInt(e,10);return!isNaN(t)&&t>0}r(function(e){return e?e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`):""}),r(function(e){return e?e.replace(/([-_][a-z])/g,e=>e.toUpperCase().replace(/-|_/,"")):""})},54296:function(e,t,n){n.d(t,{t5:function(){return i}});var r=Object.freeze({InvalidProxyUrlErrorMessage:"The proxyUrl passed to Clerk is invalid. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})",InvalidPublishableKeyErrorMessage:"The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})",MissingPublishableKeyErrorMessage:"Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.",MissingSecretKeyErrorMessage:"Missing secretKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.",MissingClerkProvider:"{{source}} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider"});function i({packageName:e,customMessages:t}){let n=e,i={...r,...t};function o(e,t){if(!t)return`${n}: ${e}`;let r=e;for(let n of e.matchAll(/{{([a-zA-Z0-9-_]+)}}/g)){let e=(t[n[1]]||"").toString();r=r.replace(`{{${n[1]}}}`,e)}return`${n}: ${r}`}return{setPackageName({packageName:e}){return"string"==typeof e&&(n=e),this},setMessages({customMessages:e}){return Object.assign(i,e||{}),this},throwInvalidPublishableKeyError(e){throw Error(o(i.InvalidPublishableKeyErrorMessage,e))},throwInvalidProxyUrl(e){throw Error(o(i.InvalidProxyUrlErrorMessage,e))},throwMissingPublishableKeyError(){throw Error(o(i.MissingPublishableKeyErrorMessage))},throwMissingSecretKeyError(){throw Error(o(i.MissingSecretKeyErrorMessage))},throwMissingClerkProviderError(e){throw Error(o(i.MissingClerkProvider,e))},throw(e){throw Error(o(e))}}}},46179:function(e,t,n){n.d(t,{J:function(){return r}});function r(e,t){return{event:"METHOD_CALLED",payload:{method:e,...t}}}},68351:function(e,t,n){n.d(t,{t5:function(){return r.t5}});var r=n(54296);n(37837)},69569:function(e,t,n){n.d(t,{rx:function(){return o},yJ:function(){return s},zu:function(){return r}});var r=(e,...t)=>{let n={...e};for(let e of t)delete n[e];return n};n(90093),n(63754);var i=()=>!1,o=()=>{try{return!0}catch(e){}return!1};n(54296),Object.freeze({"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/x-icon":"ico","image/vnd.microsoft.icon":"ico"}),n(290),n(37837);var s=e=>{i()&&console.error(`Clerk: ${e}`)}},57723:function(e,t,n){n.d(t,{Aw:function(){return r.Aw},YJ:function(){return r.YJ},iv:function(){return r.iv},wE:function(){return r.wE}});var r=n(63754);n(54296),n(37837)},60026:function(e,t,n){let r;n.d(t,{b5:function(){return eb},RY:function(){return eP},f0:function(){return ej},B3:function(){return eE},St:function(){return ew},uH:function(){return ev},c1:function(){return eq},Rm:function(){return eM},cL:function(){return eF},rI:function(){return ey},sX:function(){return eC},o8:function(){return eA},eW:function(){return eN},kP:function(){return eV},xo:function(){return eW},aF:function(){return eD}});var i={};n.r(i),n.d(i,{SWRConfig:function(){return el},default:function(){return eu},mutate:function(){return J},preload:function(){return et},unstable_serialize:function(){return eo},useSWRConfig:function(){return ee}});var o=n(46179),s=n(37837),a=n(2265),l=n(10554);let u=()=>{},c=u(),d=Object,h=e=>e===c,p=e=>"function"==typeof e,f=(e,t)=>({...e,...t}),g=e=>p(e.then),m=new WeakMap,v=0,k=e=>{let t,n;let r=typeof e,i=e&&e.constructor,o=i==Date;if(d(e)!==e||o||i==RegExp)t=o?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=m.get(e))return t;if(t=++v+"~",m.set(e,t),i==Array){for(n=0,t="@";n<e.length;n++)t+=k(e[n])+",";m.set(e,t)}if(i==d){t="#";let r=d.keys(e).sort();for(;!h(n=r.pop());
9)h(e[n])||(t+=n+":"+k(e[n])+",");m.set(e,t)}}return t},b=new WeakMap,y={},w={},S="undefined",P=typeof window!=S,C=typeof document!=S,E=()=>P&&typeof window.requestAnimationFrame!=S,O=(e,t)=>{let n=b.get(e);return[()=>!h(t)&&e.get(t)||y,r=>{if(!h(t)){let i=e.get(t);t in w||(w[t]=i),n[5](t,f(i,r),i||y)}},n[6],()=>!h(t)&&t in w?w[t]:!h(t)&&e.get(t)||y]},U=!0,[_,j]=P&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[u,u],M={initFocus:e=>(C&&document.addEventListener("visibilitychange",e),_("focus",e),()=>{C&&document.removeEventListener("visibilitychange",e),j("focus",e)}),initReconnect:e=>{let t=()=>{U=!0,e()},n=()=>{U=!1};return _("online",t),_("offline",n),()=>{j("online",t),j("offline",n)}}},z=!a.useId,L=!P||"Deno"in window,I=e=>E()?window.requestAnimationFrame(e):setTimeout(e,1),R=L?a.useEffect:a.useLayoutEffect,T="undefined"!=typeof navigator&&navigator.connection,A=!L&&T&&(["slow-2g","2g"].includes(T.effectiveType)||T.saveData),x=e=>{if(p(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?k(e):"",t]},N=0,V=()=>++N;var W={ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function D(...e){let[t,n,r,i]=e,o=f({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),s=o.populateCache,a=o.rollbackOnError,l=o.optimisticData,u=e=>"function"==typeof a?a(e):!1!==a,d=o.throwOnError;if(p(n)){let e=[];for(let r of t.keys())!/^\$(inf|sub)\$/.test(r)&&n(t.get(r)._k)&&e.push(r);return Promise.all(e.map(m))}return m(n);async function m(n){let i;let[a]=x(n);if(!a)return;let[f,m]=O(t,a),[v,k,y,w]=b.get(t),S=()=>{let e=v[a];return(p(o.revalidate)?o.revalidate(f().data,n):!1!==o.revalidate)&&(delete y[a],delete w[a],e&&e[0])?e[0](2).then(()=>f().data):f().data};if(e.length<3)return S();let P=r,C=V();k[a]=[C,0];let E=!h(l),U=f(),_=U.data,j=U._c,M=h(j)?_:j;if(E&&m({data:l=p(l)?l(M,_):l,_c:M}),p(P))try{P=P(M)}catch(e){i=e}if(P&&g(P)){if(P=await P.catch(e=>{i=e}),C!==k[a][0]){if(i)throw i;return P}i&&E&&u(i)&&(s=!0,m({data:M,_c:c}))}if(s&&!i&&(p(s)?m({data:s(P,M),error:c,_c:c}):m({data:P,error:c,_c:c})),k[a][1]=V(),Promise.resolve(S()).then(()=>{m({_c:c})}),i){if(d)throw i;return}return P}}let F=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},B=(e,t)=>{if(!b.has(e)){let n=f(M,t),r={},i=D.bind(c,e),o=u,s={},a=(e,t)=>{let n=s[e]||[];return s[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,r)=>{e.set(t,n);let i=s[t];if(i)for(let e of i)e(n,r)},d=()=>{if(!b.has(e)&&(b.set(e,[r,{},{},{},i,l,a]),!L)){let t=n.initFocus(setTimeout.bind(c,F.bind(c,r,0))),i=n.initReconnect(setTimeout.bind(c,F.bind(c,r,1)));o=()=>{t&&t(),i&&i(),b.delete(e)}}};return d(),[e,i,d,o]}return[e,b.get(e)[4]]},[$,J]=B(new Map),q=f({onLoadingSlow:u,onSuccess:u,onError:u,onErrorRetry:(e,t,n,r,i)=>{let o=n.errorRetryCount,s=i.retryCount,a=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;(h(o)||!(s>o))&&setTimeout(r,a,i)},onDiscarded:u,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:A?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:A?5e3:3e3,compare:(e,t)=>k(e)==k(t),isPaused:()=>!1,cache:$,mutate:J,fallback:{}},{isOnline:()=>U,isVisible:()=>{let e=C&&document.visibilityState;return h(e)||"hidden"!==e}}),G=(e,t)=>{let n=f(e,t);if(t){let{use:r,fallback:i}=e,{use:o,fallback:s}=t;r&&o&&(n.use=r.concat(o)),i&&s&&(n.fallback=f(i,s))}return n},K=(0,a.createContext)({}),Y=e=>{let{value:t}=e,n=(0,a.useContext)(K),r=p(t),i=(0,a.useMemo)(()=>r?t(n):t,[r,n,t]),o=(0,a.useMemo)(()=>r?i:G(n,i),[r,n,i]),s=i&&i.provider,l=(0,a.useRef)(c);s&&!l.current&&(l.current=B(s(o.cache||$),i));let u=l.current;return u&&(o.cache=u[0],o.mutate=u[1]),R(()=>{if(u)return u[2]&&u[2](),u[3]},[]),(0,a.createElement)(K.Provider,f(e,{value:o}))},Q="$inf$",H=P&&window.__SWR_DEVTOOLS_USE__,X=H?window.__SWR_DEVTOOLS_USE__:[],Z=e=>p(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],ee=()=>f(q,(0,a.useContext)(K)),et=(e,t)=>{let[n,r]=x(e),[,,,i]=b.get($);if(i[n])return i[n];let o=t(r);return i[n]=o,o},en=X.concat(e=>(t,n,r)=>{let i=n&&((...e)=>{let[r]=x(t),[,,,i]=b.get($);if(r.startsWith(Q))return n(...e);let o=i[r];return h(o)?n(...e):(delete i[r],o)});return e(t,i,r)}),er=e=>function(...t){let n=ee(),[r,i,o]=Z(t),s=G(n,o),a=e,{use:l}=s,u=(l||[]).concat(en);for(let e=u.length;e--;)a=u[e](a);return a(r,i||s.fetcher||null,s)},ei=(e,t,n)=>{let r=t[e]||(t[e]=[]);return r.push(n),()=>{let e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}};H&&(window.__SWR_DEVTOOLS_REACT__=a);let eo=e=>x(e)[0],es=a.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),ea={dedupe:!0},el=d.defineProperty(Y,"defaultValue",{value:q}
9),eu=er((e,t,n)=>{let{cache:r,compare:i,suspense:o,fallbackData:s,revalidateOnMount:u,revalidateIfStale:d,refreshInterval:g,refreshWhenHidden:m,refreshWhenOffline:v,keepPreviousData:k}=n,[y,w,S,P]=b.get(r),[C,E]=x(e),U=(0,a.useRef)(!1),_=(0,a.useRef)(!1),j=(0,a.useRef)(C),M=(0,a.useRef)(t),T=(0,a.useRef)(n),A=()=>T.current,N=()=>A().isVisible()&&A().isOnline(),[F,B,$,J]=O(r,C),q=(0,a.useRef)({}).current,G=h(s)?n.fallback[C]:s,K=(e,t)=>{for(let n in q)if("data"===n){if(!i(e[n],t[n])&&(!h(e[n])||!i(er,t[n])))return!1}else if(t[n]!==e[n])return!1;return!0},Y=(0,a.useMemo)(()=>{let e=!!C&&!!t&&(h(u)?!A().isPaused()&&!o&&(!!h(d)||d):u),n=t=>{let n=f(t);return(delete n._k,e)?{isValidating:!0,isLoading:!0,...n}:n},r=F(),i=J(),s=n(r),a=r===i?s:n(i),l=s;return[()=>{let e=n(F());return K(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>a]},[r,C]),Q=(0,l.useSyncExternalStore)((0,a.useCallback)(e=>$(C,(t,n)=>{K(n,t)||e()}),[r,C]),Y[0],Y[1]),H=!U.current,X=y[C]&&y[C].length>0,Z=Q.data,ee=h(Z)?G:Z,et=Q.error,en=(0,a.useRef)(ee),er=k?h(Z)?en.current:Z:ee,eo=(!X||!!h(et))&&(H&&!h(u)?u:!A().isPaused()&&(o?!h(ee)&&d:h(ee)||d)),el=!!(C&&t&&H&&eo),eu=h(Q.isValidating)?el:Q.isValidating,ec=h(Q.isLoading)?el:Q.isLoading,ed=(0,a.useCallback)(async e=>{let t,r;let o=M.current;if(!C||!o||_.current||A().isPaused())return!1;let s=!0,a=e||{},l=!S[C]||!a.dedupe,u=()=>z?!_.current&&C===j.current&&U.current:C===j.current,d={isValidating:!1,isLoading:!1},f=()=>{B(d)},g=()=>{let e=S[C];e&&e[1]===r&&delete S[C]},m={isValidating:!0};h(F().data)&&(m.isLoading=!0);try{if(l&&(B(m),n.loadingTimeout&&h(F().data)&&setTimeout(()=>{s&&u()&&A().onLoadingSlow(C,n)},n.loadingTimeout),S[C]=[o(E),V()]),[t,r]=S[C],t=await t,l&&setTimeout(g,n.dedupingInterval),!S[C]||S[C][1]!==r)return l&&u()&&A().onDiscarded(C),!1;d.error=c;let e=w[C];if(!h(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return f(),l&&u()&&A().onDiscarded(C),!1;let a=F().data;d.data=i(a,t)?a:t,l&&u()&&A().onSuccess(t,C,n)}catch(n){g();let e=A(),{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=n,l&&u()&&(e.onError(n,C,e),(!0===t||p(t)&&t(n))&&(!A().revalidateOnFocus||!A().revalidateOnReconnect||N())&&e.onErrorRetry(n,C,e,e=>{let t=y[C];t&&t[0]&&t[0](W.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return s=!1,f(),!0},[C,r]),eh=(0,a.useCallback)((...e)=>D(r,j.current,...e),[]);if(R(()=>{M.current=t,T.current=n,h(Z)||(en.current=Z)}),R(()=>{if(!C)return;let e=ed.bind(c,ea),t=0,n=ei(C,y,(n,r={})=>{if(n==W.FOCUS_EVENT){let n=Date.now();A().revalidateOnFocus&&n>t&&N()&&(t=n+A().focusThrottleInterval,e())}else if(n==W.RECONNECT_EVENT)A().revalidateOnReconnect&&N()&&e();else if(n==W.MUTATE_EVENT)return ed();else if(n==W.ERROR_REVALIDATE_EVENT)return ed(r)});return _.current=!1,j.current=C,U.current=!0,B({_k:E}),eo&&(h(ee)||L?e():I(e)),()=>{_.current=!0,n()}},[C]),R(()=>{let e;function t(){let t=p(g)?g(F().data):g;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!F().error&&(m||A().isVisible())&&(v||A().isOnline())?ed(ea).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,m,v,C]),(0,a.useDebugValue)(er),o&&h(ee)&&C){if(!z&&L)throw Error("Fallback data is required when using suspense in SSR.");M.current=t,T.current=n,_.current=!1;let e=P[C];if(h(e)||es(eh(e)),h(et)){let e=ed(ea);h(er)||(e.status="fulfilled",e.value=!0),es(e)}else throw et}return{mutate:eh,get data(){return q.data=!0,er},get error(){return q.error=!0,et},get isValidating(){return q.isValidating=!0,eu},get isLoading(){return q.isLoading=!0,ec}}}),ec=a.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),ed={dedupe:!0};d.defineProperty(Y,"defaultValue",{value:q});let eh=er((e,t,n)=>{let{cache:r,compare:i,suspense:o,fallbackData:s,revalidateOnMount:u,revalidateIfStale:d,refreshInterval:g,refreshWhenHidden:m,refreshWhenOffline:v,keepPreviousData:k}=n,[y,w,S,P]=b.get(r),[C,E]=x(e),U=(0,a.useRef)(!1),_=(0,a.useRef)(!1),j=(0,a.useRef)(C),M=(0,a.useRef)(t),T=(0,a.useRef)(n),A=()=>T.current,N=()=>A().isVisible()&&A().isOnline(),[F,B,$,J]=O(r,C),q=(0,a.useRef)({}).current,G=h(s)?n.fallback[C]:s,K=(e,t)=>
9{for(let n in q)if("data"===n){if(!i(e[n],t[n])&&(!h(e[n])||!i(er,t[n])))return!1}else if(t[n]!==e[n])return!1;return!0},Y=(0,a.useMemo)(()=>{let e=!!C&&!!t&&(h(u)?!A().isPaused()&&!o&&(!!h(d)||d):u),n=t=>{let n=f(t);return(delete n._k,e)?{isValidating:!0,isLoading:!0,...n}:n},r=F(),i=J(),s=n(r),a=r===i?s:n(i),l=s;return[()=>{let e=n(F());return K(e,l)?(l.data=e.data,l.isLoading=e.isLoading,l.isValidating=e.isValidating,l.error=e.error,l):(l=e,e)},()=>a]},[r,C]),Q=(0,l.useSyncExternalStore)((0,a.useCallback)(e=>$(C,(t,n)=>{K(n,t)||e()}),[r,C]),Y[0],Y[1]),H=!U.current,X=y[C]&&y[C].length>0,Z=Q.data,ee=h(Z)?G:Z,et=Q.error,en=(0,a.useRef)(ee),er=k?h(Z)?en.current:Z:ee,eo=(!X||!!h(et))&&(H&&!h(u)?u:!A().isPaused()&&(o?!h(ee)&&d:h(ee)||d)),es=!!(C&&t&&H&&eo),ea=h(Q.isValidating)?es:Q.isValidating,el=h(Q.isLoading)?es:Q.isLoading,eu=(0,a.useCallback)(async e=>{let t,r;let o=M.current;if(!C||!o||_.current||A().isPaused())return!1;let s=!0,a=e||{},l=!S[C]||!a.dedupe,u=()=>z?!_.current&&C===j.current&&U.current:C===j.current,d={isValidating:!1,isLoading:!1},f=()=>{B(d)},g=()=>{let e=S[C];e&&e[1]===r&&delete S[C]},m={isValidating:!0};h(F().data)&&(m.isLoading=!0);try{if(l&&(B(m),n.loadingTimeout&&h(F().data)&&setTimeout(()=>{s&&u()&&A().onLoadingSlow(C,n)},n.loadingTimeout),S[C]=[o(E),V()]),[t,r]=S[C],t=await t,l&&setTimeout(g,n.dedupingInterval),!S[C]||S[C][1]!==r)return l&&u()&&A().onDiscarded(C),!1;d.error=c;let e=w[C];if(!h(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return f(),l&&u()&&A().onDiscarded(C),!1;let a=F().data;d.data=i(a,t)?a:t,l&&u()&&A().onSuccess(t,C,n)}catch(n){g();let e=A(),{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=n,l&&u()&&(e.onError(n,C,e),(!0===t||p(t)&&t(n))&&(!A().revalidateOnFocus||!A().revalidateOnReconnect||N())&&e.onErrorRetry(n,C,e,e=>{let t=y[C];t&&t[0]&&t[0](W.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return s=!1,f(),!0},[C,r]),eh=(0,a.useCallback)((...e)=>D(r,j.current,...e),[]);if(R(()=>{M.current=t,T.current=n,h(Z)||(en.current=Z)}),R(()=>{if(!C)return;let e=eu.bind(c,ed),t=0,n=ei(C,y,(n,r={})=>{if(n==W.FOCUS_EVENT){let n=Date.now();A().revalidateOnFocus&&n>t&&N()&&(t=n+A().focusThrottleInterval,e())}else if(n==W.RECONNECT_EVENT)A().revalidateOnReconnect&&N()&&e();else if(n==W.MUTATE_EVENT)return eu();else if(n==W.ERROR_REVALIDATE_EVENT)return eu(r)});return _.current=!1,j.current=C,U.current=!0,B({_k:E}),eo&&(h(ee)||L?e():I(e)),()=>{_.current=!0,n()}},[C]),R(()=>{let e;function t(){let t=p(g)?g(F().data):g;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!F().error&&(m||A().isVisible())&&(v||A().isOnline())?eu(ed).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,m,v,C]),(0,a.useDebugValue)(er),o&&h(ee)&&C){if(!z&&L)throw Error("Fallback data is required when using suspense in SSR.");M.current=t,T.current=n,_.current=!1;let e=P[C];if(h(e)||ec(eh(e)),h(et)){let e=eu(ed);h(er)||(e.status="fulfilled",e.value=!0),ec(e)}else throw et}return{mutate:eh,get data(){return q.data=!0,er},get error(){return q.error=!0,et},get isValidating(){return q.isValidating=!0,ea},get isLoading(){return q.isLoading=!0,el}}}),ep=e=>x(e?e(0,null):null)[0],ef=Promise.resolve(),eg=(r=e=>(t,n,r)=>{let i;let o=(0,a.useRef)(!1),{cache:s,initialSize:u=1,revalidateAll:d=!1,persistSize:f=!1,revalidateFirstPage:g=!0,revalidateOnMount:m=!1,parallel:v=!1}=r,[,,,k]=b.get($);try{(i=ep(t))&&(i=Q+i)}catch(e){}let[y,w,S]=O(s,i),P=(0,a.useCallback)(()=>h(y()._l)?u:y()._l,[s,i,u]);(0,l.useSyncExternalStore)((0,a.useCallback)(e=>i?S(i,()=>{e()}):()=>{},[s,i]),P,P);let C=(0,a.useCallback)(()=>{let e=y()._l;return h(e)?u:e},[i,u]),E=(0,a.useRef)(C());R(()=>{if(!o.current){o.current=!0;return}i&&w({_l:f?E.current:C()})},[i,s]);let U=m&&!o.current,_=e(i,async e=>{let i=y()._i,o=y()._r;w({_r:c});let a=[],l=C(),[u]=O(s,e),p=u().data,f=[],m=null;for(let e=0;e<l;++e){let[l,u]=x(t(e,v?null:m));if(!l)break;let[c,b]=O(s,l),y=c().data,w=d||i||h(y)||g&&!e&&!h(p)||U||p&&!h(p[e])&&!r.compare(p[e],y);if(n&&("function"==typeof o?o(y,u):w)){let t=async()=>{if(l in k){let e=k[l];delete k[l],y=await e}else y=await n(u);b({data:y,_k:u}),a[e]=y};
9v?f.push(t):await t()}else a[e]=y;v||(m=y)}return v&&await Promise.all(f.map(e=>e())),w({_i:c}),a},r),j=(0,a.useCallback)(function(e,t){let n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return i?(r&&(h(e)?w({_i:!0,_r:n.revalidate}):w({_i:!1,_r:n.revalidate})),arguments.length?_.mutate(e,{...n,revalidate:r}):_.mutate()):ef},[i,s]),M=(0,a.useCallback)(e=>{let n;if(!i)return ef;let[,r]=O(s,i);if(p(e)?n=e(C()):"number"==typeof e&&(n=e),"number"!=typeof n)return ef;r({_l:n}),E.current=n;let o=[],[a]=O(s,i),l=null;for(let e=0;e<n;++e){let[n]=x(t(e,l)),[r]=O(s,n),i=n?r().data:c;if(h(i))return j(a().data);o.push(i),l=i}return j(o)},[i,s,j,C]);return{size:C(),setSize:M,mutate:j,get data(){return _.data},get error(){return _.error},get isValidating(){return _.isValidating},get isLoading(){return _.isLoading}}},(...e)=>{let[t,n,i]=Z(e),o=(i.use||[]).concat(r);return eh(t,n,{...i,use:o})});function em(e,t){if(!e)throw"string"==typeof t?Error(t):Error(`${t.displayName} not found`)}var ev=(e,t)=>{let{assertCtxFn:n=em}=t||{},r=a.createContext(void 0);return r.displayName=e,[r,()=>{let t=a.useContext(r);return n(t,`${e} not found`),t.value},()=>{let e=a.useContext(r);return e?e.value:{}}]},ek={};(0,s.r2)(ek,{SWRConfig:()=>el,useSWR:()=>eu,useSWRInfinite:()=>eg}),(0,s.yA)(ek,i);var[eb,ey]=ev("ClerkInstanceContext"),[ew,eS]=ev("UserContext"),[eP,eC]=ev("ClientContext"),[eE,eO]=ev("SessionContext");a.createContext({});var[eU,e_]=ev("OrganizationContext"),ej=({children:e,organization:t,swrConfig:n})=>a.createElement(el,{value:n},a.createElement(eU.Provider,{value:{value:{organization:t}}},e));function eM(e){if(!a.useContext(eb)){if("function"==typeof e){e();return}throw Error(`${e} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider`)}}function ez(e,t){let n=new Set(Object.keys(t)),r={};for(let t of Object.keys(e))n.has(t)||(r[t]=e[t]);return r}var eL=(e,t)=>{var n,r,i;let o="boolean"==typeof e&&e,s=(0,a.useRef)(o?t.initialPage:null!=(n=null==e?void 0:e.initialPage)?n:t.initialPage),l=(0,a.useRef)(o?t.pageSize:null!=(r=null==e?void 0:e.pageSize)?r:t.pageSize),u={};for(let n of Object.keys(t))u[n]=o?t[n]:null!=(i=null==e?void 0:e[n])?i:t[n];return{...u,initialPage:s.current,pageSize:l.current}},eI={dedupingInterval:6e4,focusThrottleInterval:12e4},eR=(e,t,n,r)=>{var i,o,s,l,u,c,d;let[h,p]=(0,a.useState)(null!=(i=e.initialPage)?i:1),f=(0,a.useRef)(null!=(o=e.initialPage)?o:1),g=(0,a.useRef)(null!=(s=e.pageSize)?s:10),m=null==(l=n.enabled)||l,v=null!=(u=n.infinite)&&u,k=null!=(c=n.keepPreviousData)&&c,b={...r,...e,initialPage:h,pageSize:g.current},{data:y,isValidating:w,isLoading:S,error:P,mutate:C}=eu(!v&&t&&m?b:null,e=>{let n=ez(e,r);return null==t?void 0:t(n)},{keepPreviousData:k,...eI}),{data:E,isLoading:O,isValidating:U,error:_,size:j,setSize:M,mutate:z}=eg(t=>v&&m?{...e,...r,initialPage:f.current+t,pageSize:g.current}:null,e=>{let n=ez(e,r);return null==t?void 0:t(n)},eI),L=(0,a.useMemo)(()=>v?j:h,[v,j,h]),I=(0,a.useCallback)(e=>{if(v){M(e);return}return p(e)},[M]),R=(0,a.useMemo)(()=>{var e,t;return v?null!=(e=null==E?void 0:E.map(e=>null==e?void 0:e.data).flat())?e:[]:null!=(t=null==y?void 0:y.data)?t:[]},[v,y,E]),T=(0,a.useMemo)(()=>{var e,t;return v?(null==(e=null==E?void 0:E[(null==E?void 0:E.length)-1])?void 0:e.total_count)||0:null!=(t=null==y?void 0:y.total_count)?t:0},[v,y,E]),A=v?O:S,x=v?U:w,N=null!=(d=v?_:P)?d:null,V=(0,a.useCallback)(()=>{I(e=>Math.max(0,e+1))},[I]),W=(0,a.useCallback)(()=>{I(e=>Math.max(0,e-1))},[I]),D=(f.current-1)*g.current,F=Math.ceil((T-D)/g.current),B=T-D*g.current>L*g.current,$=(L-1)*g.current>D*g.current,J=v?e=>z(e,{revalidate:!1}):e=>C(e,{revalidate:!1});return{data:R,count:T,error:N,isLoading:A,isFetching:x,isError:!!N,page:L,pageCount:F,fetchPage:I,fetchNext:V,fetchPrevious:W,hasNextPage:B,hasPreviousPage:$,revalidate:v?()=>z():()=>C(),setData:J}},eT={data:void 0,count:void 0,error:void 0,isLoading:!1,isFetching:!1,isError:!1,page:void 0,pageCount:void 0,fetchPage:void 0,fetchNext:void 0,fetchPrevious:void 0,hasNextPage:!1,hasPreviousPage:!1,revalidate:void 0,setData:void 0},eA=e=>{var t,n,r;let{domains:i,membershipRequests:s,memberships:a,invitations:l}=e||{};eM("useOrganization");let{organization:u}=e_(),c=eO(),d=eL(i,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1,enrollmentMode:void 0}),h=eL(s,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),p=eL(a,{initialPage:1,pageSize:10,role:void 0,keepPreviousData:!1,infinite:!1}),f=eL(l,{initialPage:1,pageSize:10,status:["pending"],keepPreviousData:!1,infinite:!1}),g=ey();null==(t=g.telemetry)||t.record((0,o.J)("useOrganization"));let m=void 0===i?void 0:{initialPage:d.initialPage,pageSize:d.pageSize,enrollmentMode:d.enrollmentMode},v=void 0===s?void 0:{initialPage:h.initialPage,pageSize:h.pageSize,status:h.status},k=void 0===a?void 0:{initialPage:p.initialPage,pageSize:p.pageSize,role:p.role},b=void 0===l?void 0:{initialPage:f.initialPage,pageSize:f.pageSize,status:f.status},y=eR({...m},null==u?void 0:u.getDomains,{keepPreviousData:d.keepPreviousData,infinite:d.infinite,enabled:!!m},{type:"domains",organizationId:null==u?void 0:u.id}),w=eR({...v},null==u?void 0:u.getMembershipRequests,{keepPreviousData:h.keepPreviousData,infinite:h.infinite,enabled:!!v},{type:"membershipRequests",organizationId:null==u?void 0:u.id}),S=eR(k||{},null==u?void 0:u.getMemberships,{keepPreviousData:p.keepPreviousData,infinite:p.infinite,enabled:!!k},{type:"members",organizationId:null==u?void 0:u.id}),P=eR({...b},null==u?void 0:u.getInvitations,{keepPreviousData:f.keepPreviousData,infinite:f.infinite,enabled:!!b},{type:"invitations",organizationId:null==u?void 0:u.id});return void 0===u?{isLoaded:!1,organization:void 0,membership:void 0,domains:eT,membershipRequests:eT,memberships:eT,invitations:eT}:null===u?{isLoaded:!0,organization:null,membership:null,domains:null,membershipRequests:null,memberships:null,invitations:null}:!g.loaded&&u?{isLoaded:!0,organization:u,membership:void 0,domains:eT,membershipRequests:eT,memberships:eT,invitations:eT}:{isLoaded:g.loaded,organization:u,membership:(n=c.user.organizationMemberships,r=u.id,n.find(e=>e.organization.id===r)),domains:y,membershipRequests:w,memberships:S,invitations:P}},ex={data:void 0,count:void 0,error:void 0,isLoading:!1,isFetching:!1,isError:!1,page:void 0,pageCount:void 0,fetchPage:void 0,fetchNext:void 0,fetchPrevious:void 0,hasNextPage:!1,hasPreviousPage:!1,revalidate:void 0,setData:void 0},eN=e=>{var t;let{userMemberships:n,userInvitations:r,userSuggestions:i}=e||{};eM("useOrganizationList");let s=eL(n,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1}),a=eL(r,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),l=eL(i,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),u=ey(),c=eS();null==(t=u.telemetry)||t.record((0,o.J)("useOrganizationList"));let d=void 0===n?void 0:{initialPage:s.initialPage,pageSize:s.pageSize},h=void 0===r?void 0:{initialPage:a.initialPage,pageSize:a.pageSize,status:a.status},p=void 0===i?void 0:{initialPage:l.initialPage,pageSize:l.pageSize,status:l.status},f=!!(u.loaded&&c),g=eR(d||{},null==c?void 0:c.getOrganizationMemberships,{keepPreviousData:s.keepPreviousData,infinite:s.infinite,enabled:!!d},{type:"userMemberships",userId:null==c?void 0:c.id}),m=eR({...h},null==c?void 0:c.getOrganizationInvitations,{keepPreviousData:a.keepPreviousData,infinite:a.infinite,enabled:!!h},{type:"userInvitations",userId:null==c?void 0:c.id}),v=eR({...p},null==c?void 0:c.getOrganizationSuggestions,{keepPreviousData:l.keepPreviousData,infinite:l.infinite,enabled:!!p},{type:"userSuggestions",userId:null==c?void 0:c.id});return f?{isLoaded:f,setActive:u.setActive,createOrganization:u.createOrganization,userMemberships:g,userInvitations:m,userSuggestions:v}
9:{isLoaded:!1,createOrganization:void 0,setActive:void 0,userMemberships:ex,userInvitations:ex,userSuggestions:ex}};"undefined"!=typeof window?a.useLayoutEffect:a.useEffect;var eV=()=>{eM("useSession");let e=eO();return void 0===e?{isLoaded:!1,isSignedIn:void 0,session:void 0}:null===e?{isLoaded:!0,isSignedIn:!1,session:null}:{isLoaded:!0,isSignedIn:!0,session:e}},eW=()=>{eM("useSessionList");let e=ey(),t=eC();return t?{isLoaded:!0,sessions:t.sessions,setActive:e.setActive}:{isLoaded:!1,sessions:void 0,setActive:void 0}};function eD(){eM("useUser");let e=eS();return void 0===e?{isLoaded:!1,isSignedIn:void 0,user:void 0}:null===e?{isLoaded:!0,isSignedIn:!1,user:null}:{isLoaded:!0,isSignedIn:!0,user:e}}var eF=()=>(eM("useClerk"),ey()),eB=Object.prototype.hasOwnProperty;function e$(e,t,n){for(n of e.keys())if(eJ(n,t))return n}function eJ(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&eJ(e[r],t[r]););return -1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if((i=r)&&"object"==typeof i&&!(i=e$(t,i))||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if((i=r[0])&&"object"==typeof i&&!(i=e$(t,i))||!eJ(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return -1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return -1===r}if(!n||"object"==typeof e){for(n in r=0,e)if(eB.call(e,n)&&++r&&!eB.call(t,n)||!(n in t)||!eJ(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}var eq=eJ}}]);

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.