1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[863],{429:(e,t,a)=>{a.r(t),a.d(t,{AuthProvider:()=>f,useAuth:()=>p});var r=a(4568),s=a(7620),n=a(8221),o=a(699);let i="left-nav-open",l="right-chrome-open";function d(e,t){return{loadOpen(){if(!u())return!0;try{return"false"!==sessionStorage.getItem(e)}catch(e){return console.error(`Failed to load the ${t} state from sessionStorage:`,e),!0}},saveOpen(a){if(u())try{sessionStorage.setItem(e,a?"true":"false")}catch(e){console.error(`Failed to save the ${t} state to sessionStorage:`,e)}}}}d(i,"left navigation"),d(l,"right chrome");let c=["panel-widths",i,l,"right-panel-open","active-right-panel","seen-tips","tips-shown-this-session"];function u(){try{let e="__storage_test__";return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch{return!1}}let m=(0,s.createContext)(void 0),f=({children:e,getMe:t,signOutBackend:a,loginPath:i="/auth/signin",forceSignOutUrl:l})=>{let{session:d,status:f}=(0,o.useSupabaseSession)(),[p,h]=(0,s.useState)(null),[g,x]=(0,s.use
1State)(!0),b=(0,s.useRef)(void 0);(0,s.useEffect)(()=>{if("loading"===f)return;let e=d?.user?.email??null;e===b.current||(b.current=e,(async()=>{if(d?.user&&d.access_token){await new Promise(e=>setTimeout(e,50));try{let e=await t();e.user&&h(e.user)}catch(e){e?.message?.includes("authorization")||e?.message?.includes("unauthenticated")?console.debug("[AuthProvider] getMe failed (token not ready yet, will retry):",e?.message):console.error("[AuthProvider] getMe failed:",e?.message||e),h(null)}finally{x(!1)}}else h(null),x(!1)})())},[d,f,t]);let v=async()=>{x(!0);try{window.location.href=i}catch(e){throw console.error("Login failed",e),x(!1),e}},w=async()=>{x(!0);try{if(u())try{let e=[];for(let t=0;t<sessionStorage.length;t++){let a=sessionStorage.key(t);a&&!c.includes(a)&&e.push(a)}e.forEach(e=>sessionStorage.removeItem(e))}catch(e){console.error("Failed to clear tenant-scoped sessionStorage:",e)}if(a)try{await a()}catch{}try{await (0,n.getSupabaseBrowserClient)().auth.signOut()}catch{}window.location.href=l??"/"}catch(e){console.error("Logout failed",e),x(!1)}},y=d?.user?{name:d.user.user_metadata?.name??null,email:d.user.email??null}:null;return(0,r.jsx)(m.Provider,{value:{user:p,sessionUser:y,loading:g,login:v,logout:w},children:e})},p=()=>{let e=(0,s.useContext)(m);if(void 0===e)throw Error("useAuth must be used within an AuthProvider");return e}},619:(e,t,a)=>{a.r(t),a.d(t,{Tabs:()=>i,TabsContent:()=>c,TabsList:()=>l,TabsTrigger:()=>d});var r=a(4568),s=a(9680);a(7620);var n=a(6509),o=a(3464);function i(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.bL,{"data-slot":"tabs",...t}),o[2]=t,o[3]=a):a=o[3],a}function l(e){let t,a,i,l,d=(0,s.c)(8);return d[0]!==e?({className:t,...a}=e,d[0]=e,d[1]=t,d[2]=a):(t=d[1],a=d[2]),d[3]!==t?(i=(0,o.cn)("bg-muted text-muted-foreground inline-flex h-10 items-center justify-center rounded-lg p-1",t),d[3]=t,d[4]=i):i=d[4],d[5]!==a||d[6]!==i?(l=(0,r.jsx)(n.B8,{"data-slot":"tabs-list",className:i,...a}),d[5]=a,d[6]=i,d[7]=l):l=d[7],l}function d(e){let t,a,i,l,d=(0,s.c)(8);return d[0]!==e?({className:t,...a}=e,d[0]=e,d[1]=t,d[2]=a):(t=d[1],a=d[2]),d[3]!==t?(i=(0,o.cn)("data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",t),d[3]=t,d[4]=i):i=d[4],d[5]!==a||d[6]!==i?(l=(0,r.jsx)(n.l9,{"data-slot":"tabs-trigger",className:i,...a}),d[5]=a,d[6]=i,d[7]=l):l=d[7],l}function c(e){let t,a,i,l,d=(0,s.c)(8);return d[0]!==e?({className:t,...a}=e,d[0]=e,d[1]=t,d[2]=a):(t=d[1],a=d[2]),d[3]!==t?(i=(0,o.cn)("focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 outline-none",t),d[3]=t,d[4]=i):i=d[4],d[5]!==a||d[6]!==i?(l=(0,r.jsx)(n.UC,{"data-slot":"tabs-content",className:i,...a}),d[5]=a,d[6]=i,d[7]=l):l=d[7],l}},699:(e,t,a)=>{a.r(t),a.d(t,{SupabaseSessionProvider:()=>l,useSupabaseSession:()=>d});var r=a(4568),s=a(9680),n=a(7620),o=a(8221);let i=(0,n.createContext)(void 0);function l(e){let t,a,l,d,c=(0,s.c)(9),{children:u}=e,[m,f]=(0,n.useState)(null),[p,h]=(0,n.useState)(!1);c[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{let e=(0,o.getSupabaseBrowserClient)();e.auth.getSession().then(e=>{let{data:t}=e;f(t.session),h(!0)});let{data:t}=e.auth.onAuthStateChange((e,t)=>{f(t),h(!0)}),{subscription:a}=t;return()=>a.unsubscribe()},a=[],c[0]=t,c[1]=a):(t=c[0],a=c[1]),(0,n.useEffect)(t,a);let g=p?m?"authenticated":"unauthenticated":"loading",x=m?.user??null;return c[2]!==m||c[3]!==g||c[4]!==x?(l={session:m,user:x,status:g},c[2]=m,c[3]=g,c[4]=x,c[5]=l):l=c[5],c[6]!==u||c[7]!==l?(d=(0,r.jsx)(i.Provider,{value:l,children:u}),c[6]=u,c[7]=l,c[8]=d):d=c[8],d}function d(){let e=(0,n.useContext)(i);if(void 0===e)throw Error("useSupabaseSession must be used within a SupabaseSessionProvider");return e}},1392:(e,t,a)=>{a.r(t),a.d(t,{Sheet:()=>l,SheetClose:()=>c,SheetContent:()=>f,SheetDescription:()=>x,SheetFooter:()=>h,SheetHeader:()=>p,SheetTitle:()=>g,SheetTrigger:()=>d});var r=a(4568),s=a(9680);a(7620);var n=a(7207),o=a(5447),i=a(3464);function l(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.bL,{"data-slot":"sheet",...t}),o[2]=t,o[3]=a):a=o[3],a}function d(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.l9,{"data-slot":"sheet-trigger",...t}),o[2]=t,o[3]=a):a=o[3],a}function c(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.bm,{"data-slot":"sheet-close",...t}),o[2]=t,o[3]=a):a=o[3],a}function u(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.ZL,{"data-slot":"sheet-portal",...t}),o[2]=t,o[3]=a):a=o[3],a}function m(e){let t,a,o,l,d=(0,s.c)(8);return d[0]!==e?({className:t,...a}=e,d[0]=e,d[1]=t,d[2]=a):(t=d[1],a=d[2]),d[3]!==t?(o=(0,i.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-background/10 backdrop-blur-[2px] supports-[backdrop-filter]:bg-background/5",t),d[3]=t,d[4]=o):o=d[4],d[5]!==a||d[6]!==o?(l=(0,r.jsx)(n.hJ,{"data-slot":"sheet-overlay",className:o,...a}
1),d[5]=a,d[6]=o,d[7]=l):l=d[7],l}function f(e){let t,a,l,d,c,f,p,h,g=(0,s.c)(17);g[0]!==e?({className:a,children:t,side:d,...l}=e,g[0]=e,g[1]=t,g[2]=a,g[3]=l,g[4]=d):(t=g[1],a=g[2],l=g[3],d=g[4]);let x=void 0===d?"right":d;g[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,r.jsx)(m,{}),g[5]=c):c=g[5];let b="right"===x&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",v="left"===x&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",w="top"===x&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",y="bottom"===x&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";return g[6]!==a||g[7]!==b||g[8]!==v||g[9]!==w||g[10]!==y?(f=(0,i.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",b,v,w,y,a),g[6]=a,g[7]=b,g[8]=v,g[9]=w,g[10]=y,g[11]=f):f=g[11],g[12]===Symbol.for("react.memo_cache_sentinel")?(p=(0,r.jsxs)(n.bm,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,r.jsx)(o.A,{className:"size-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]}),g[12]=p):p=g[12],g[13]!==t||g[14]!==l||g[15]!==f?(h=(0,r.jsxs)(u,{children:[c,(0,r.jsxs)(n.UC,{"data-slot":"sheet-content",className:f,...l,children:[t,p]})]}),g[13]=t,g[14]=l,g[15]=f,g[16]=h):h=g[16],h}function p(e){let t,a,n,o,l=(0,s.c)(8);return l[0]!==e?({className:t,...a}=e,l[0]=e,l[1]=t,l[2]=a):(t=l[1],a=l[2]),l[3]!==t?(n=(0,i.cn)("flex flex-col gap-1.5 p-4",t),l[3]=t,l[4]=n):n=l[4],l[5]!==a||l[6]!==n?(o=(0,r.jsx)("div",{"data-slot":"sheet-header",className:n,...a}),l[5]=a,l[6]=n,l[7]=o):o=l[7],o}function h(e){let t,a,n,o,l=(0,s.c)(8);return l[0]!==e?({className:t,...a}=e,l[0]=e,l[1]=t,l[2]=a):(t=l[1],a=l[2]),l[3]!==t?(n=(0,i.cn)("mt-auto flex flex-col gap-2 p-4",t),l[3]=t,l[4]=n):n=l[4],l[5]!==a||l[6]!==n?(o=(0,r.jsx)("div",{"data-slot":"sheet-footer",className:n,...a}),l[5]=a,l[6]=n,l[7]=o):o=l[7],o}function g(e){let t,a,o,l,d=(0,s.c)(8);return d[0]!==e?({className:t,...a}=e,d[0]=e,d[1]=t,d[2]=a):(t=d[1],a=d[2]),d[3]!==t?(o=(0,i.cn)("text-foreground font-semibold",t),d[3]=t,d[4]=o):o=d[4],d[5]!==a||d[6]!==o?(l=(0,r.jsx)(n.hE,{"data-slot":"sheet-title",className:o,...a}),d[5]=a,d[6]=o,d[7]=l):l=d[7],l}function x(e){let t,a,o,l,d=(0,s.c)(8);return d[0]!==e?({className:t,...a}=e,d[0]=e,d[1]=t,d[2]=a):(t=d[1],a=d[2]),d[3]!==t?(o=(0,i.cn)("text-muted-foreground text-sm",t),d[3]=t,d[4]=o):o=d[4],d[5]!==a||d[6]!==o?(l=(0,r.jsx)(n.VY,{"data-slot":"sheet-description",className:o,...a}),d[5]=a,d[6]=o,d[7]=l):l=d[7],l}},1930:(e,t,a)=>{a.r(t),a.d(t,{Popover:()=>o,PopoverContent:()=>l,PopoverTrigger:()=>i});var r=a(4568),s=a(7620),n=a(1737);let o=n.bL,i=n.l9,l=s.forwardRef(({className:e,align:t="center",sideOffset:a=4,...s},o)=>(0,r.jsx)(n.ZL,{children:(0,r.jsx)(n.UC,{ref:o,align:t,sideOffset:a,className:e,...s})}));l.displayName=n.UC.displayName},2095:(e,t,a)=>{a.r(t),a.d(t,{Alert:()=>l,AlertDescription:()=>c,AlertTitle:()=>d});var r=a(4568),s=a(7620),n=a(507),o=a(3464);let i=(0,n.F)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",warning:"border-yellow-500/50 text-yellow-800 dark:border-yellow-500 dark:text-yellow-200 [&>svg]:text-yellow-600 dark:[&>svg]:text-yellow-400"}},defaultVariants:{variant:"default"}}),l=s.forwardRef(({className:e,variant:t,...a},s)=>(0,r.jsx)("div",{ref:s,role:"alert",className:(0,o.cn)(i({variant:t}),e),...a}));l.displayName="Alert";let d=s.forwardRef(({className:e,...t},a)=>(0,r.jsx)("h5",{ref:a,className:(0,o.cn)("mb-1 font-medium leading-none tracking-tight",e),...t}));d.displayName="AlertTitle";let c=s.forwardRef(({className:e,...t},a)=>(0,r.jsx)("div",{ref:a,className:(0,o.cn)("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription"},2103:(e,t,a)=>{a.d(t,{dy:()=>r}),a(7620);function r(e){var t,a;if(!e.defaultPrevented&&"Enter"===(t=e).key&&(t.metaKey||t.ctrlKey)&&!t.altKey&&!t.shiftKey){let t;(t=(a=e.currentTarget).querySelector("[data-primary-action]")??(()=>{let e=a.querySelectorAll('[data-slot="dialog-footer"], [data-slot="alert-dialog-footer"]'),t=e[e.length-1];if(!t)return null;let r=t.querySelectorAll("button");return r[r.length-1]??null})())&&!t.disabled&&"true"!==t.getAttribute("aria-disabled")&&(t.click(),1)&&e.preventDefault()}}},2273:(e,t,a)=>{a.r(t),a.d(t,{DIALOG_SIZE_CLASS:()=>m,Dialog:()=>f,DialogClose:()=>g,DialogContent:()=>b,DialogDescription:()=>C,DialogFooter:()=>N,DialogHeader:()=>j,DialogOverlay:()=>x,DialogPortal:()=>h,DialogTitle:()=>S,DialogTrigger:()=>p});var r=a(4568),s=a(9680),n=a(7620),o=a(7207),i=a(5447);let l={normal:40,elevated:60},d=(0,n.createContext)(void 0);var c=a(2103),u=a(3464);
1let m={small:"sm:max-w-md sm:h-auto sm:min-h-[336px]",medium:"sm:max-w-2xl sm:h-[504px] sm:max-h-[85vh] flex flex-col overflow-hidden",large:"sm:max-w-5xl sm:h-[768px] sm:max-h-[85vh] flex flex-col overflow-hidden"};function f(e){let t,a,n=(0,s.c)(4);return n[0]!==e?({...t}=e,n[0]=e,n[1]=t):t=n[1],n[2]!==t?(a=(0,r.jsx)(o.bL,{"data-slot":"dialog",...t}),n[2]=t,n[3]=a):a=n[3],a}function p(e){let t,a,n=(0,s.c)(4);return n[0]!==e?({...t}=e,n[0]=e,n[1]=t):t=n[1],n[2]!==t?(a=(0,r.jsx)(o.l9,{"data-slot":"dialog-trigger",...t}),n[2]=t,n[3]=a):a=n[3],a}function h(e){let t,a,n=(0,s.c)(4);return n[0]!==e?({...t}=e,n[0]=e,n[1]=t):t=n[1],n[2]!==t?(a=(0,r.jsx)(o.ZL,{"data-slot":"dialog-portal",...t}),n[2]=t,n[3]=a):a=n[3],a}function g(e){let t,a,n=(0,s.c)(4);return n[0]!==e?({...t}=e,n[0]=e,n[1]=t):t=n[1],n[2]!==t?(a=(0,r.jsx)(o.bm,{"data-slot":"dialog-close",...t}),n[2]=t,n[3]=a):a=n[3],a}function x(e){let t,a,n,i,l=(0,s.c)(8);return l[0]!==e?({className:t,...a}=e,l[0]=e,l[1]=t,l[2]=a):(t=l[1],a=l[2]),l[3]!==t?(n=(0,u.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-background/10 backdrop-blur-[2px] supports-[backdrop-filter]:bg-background/5",t),l[3]=t,l[4]=n):n=l[4],l[5]!==a||l[6]!==n?(i=(0,r.jsx)(o.hJ,{"data-slot":"dialog-overlay",className:n,...a}),l[5]=a,l[6]=n,l[7]=i):i=l[7],i}function b(e){let t,a,n,o,i,l,d,c,u=(0,s.c)(15);u[0]!==e?({className:a,children:t,showCloseButton:i,size:o,dismissOnOutsideClick:l,...n}=e,u[0]=e,u[1]=t,u[2]=a,u[3]=n,u[4]=o,u[5]=i,u[6]=l):(t=u[1],a=u[2],n=u[3],o=u[4],i=u[5],l=u[6]);let m=void 0===i||i,f=void 0!==l&&l;return u[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,r.jsx)(x,{}),u[7]=d):d=u[7],u[8]!==t||u[9]!==a||u[10]!==f||u[11]!==n||u[12]!==m||u[13]!==o?(c=(0,r.jsxs)(h,{"data-slot":"dialog-portal",children:[d,(0,r.jsx)(v,{className:a,showCloseButton:m,size:o,dismissOnOutsideClick:f,...n,children:t})]}),u[8]=t,u[9]=a,u[10]=f,u[11]=n,u[12]=m,u[13]=o,u[14]=c):c=u[14],c}function v(e){let t,a,f,p,h,g,x,b,v,j,N,S,C=(0,s.c)(26);C[0]!==e?({className:a,children:t,showCloseButton:g,onKeyDown:f,size:h,dismissOnOutsideClick:x,...p}=e,C[0]=e,C[1]=t,C[2]=a,C[3]=f,C[4]=p,C[5]=h,C[6]=g,C[7]=x):(t=C[1],a=C[2],f=C[3],p=C[4],h=C[5],g=C[6],x=C[7]);let k=void 0===g||g,_=void 0!==x&&x,z=n.useId();C[8]===Symbol.for("react.memo_cache_sentinel")?(b={band:"elevated",focusOnOpen:!0},C[8]=b):b=C[8];let{isFocused:P,focusProps:A}=function(e,{open:t=!0,band:a="normal",focusOnOpen:r=!1}={}){let s=(0,n.useContext)(d);(0,n.useEffect)(()=>{if(s&&t)return s.register(e,r),()=>s.unregister(e)},[e,t,r]);let o=s?.focus,i=(0,n.useMemo)(()=>({onPointerDownCapture:()=>o?.(e)}),[o,e]),c=(0,n.useCallback)(()=>o?.(e),[o,e]);if(!s)return{zIndex:l[a],isFocused:!0,focusProps:i,focusSelf:c};let u=s.stack.indexOf(e),m=-1===u?0:Math.min(u,9);return{zIndex:l[a]+m,isFocused:s.focusedId===e,focusProps:i,focusSelf:c}}(`dialog:${z}`,b),D=_?void 0:y,I=_?void 0:w;C[9]!==f?(v=e=>{f?.(e),(0,c.dy)(e)},C[9]=f,C[10]=v):v=C[10];let F=P&&"ring-2 ring-primary/40",T=h&&m[h];return C[11]!==a||C[12]!==F||C[13]!==T?(j=(0,u.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[200] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",F,T,a),C[11]=a,C[12]=F,C[13]=T,C[14]=j):j=C[14],C[15]!==k?(N=k&&(0,r.jsxs)(o.bm,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,r.jsx)(i.A,{}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]}),C[15]=k,C[16]=N):N=C[16],C[17]!==t||C[18]!==A||C[19]!==p||C[20]!==N||C[21]!==D||C[22]!==I||C[23]!==v||C[24]!==j?(S=(0,r.jsxs)(o.UC,{"data-slot":"dialog-content",onPointerDownOutside:D,onInteractOutside:I,onKeyDown:v,...A,className:j,...p,children:[t,N]}
1),C[17]=t,C[18]=A,C[19]=p,C[20]=N,C[21]=D,C[22]=I,C[23]=v,C[24]=j,C[25]=S):S=C[25],S}function w(e){return e.preventDefault()}function y(e){return e.preventDefault()}function j(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,u.cn)("flex flex-col gap-2 text-center sm:text-left",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("div",{"data-slot":"dialog-header",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function N(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,u.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("div",{"data-slot":"dialog-footer",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function S(e){let t,a,n,i,l=(0,s.c)(8);return l[0]!==e?({className:t,...a}=e,l[0]=e,l[1]=t,l[2]=a):(t=l[1],a=l[2]),l[3]!==t?(n=(0,u.cn)("text-lg leading-none font-semibold",t),l[3]=t,l[4]=n):n=l[4],l[5]!==a||l[6]!==n?(i=(0,r.jsx)(o.hE,{"data-slot":"dialog-title",className:n,...a}),l[5]=a,l[6]=n,l[7]=i):i=l[7],i}function C(e){let t,a,n,i,l=(0,s.c)(8);return l[0]!==e?({className:t,...a}=e,l[0]=e,l[1]=t,l[2]=a):(t=l[1],a=l[2]),l[3]!==t?(n=(0,u.cn)("text-muted-foreground text-sm",t),l[3]=t,l[4]=n):n=l[4],l[5]!==a||l[6]!==n?(i=(0,r.jsx)(o.VY,{"data-slot":"dialog-description",className:n,...a}),l[5]=a,l[6]=n,l[7]=i):i=l[7],i}},2477:(e,t,a)=>{a.r(t),a.d(t,{ThemeProvider:()=>o});var r=a(4568),s=a(9680);a(7620);var n=a(4321);function o(e){let t,a,o,i=(0,s.c)(6);return i[0]!==e?({children:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t||i[4]!==a?(o=(0,r.jsx)(n.N,{...a,children:t}),i[3]=t,i[4]=a,i[5]=o):o=i[5],o}},2675:(e,t,a)=>{a.r(t),a.d(t,{AuthTokenProvider:()=>h,createAuthInterceptor:()=>f,createAuthTransport:()=>p,getAccessToken:()=>c,setAccessToken:()=>d,setRefreshAccessToken:()=>m});var r=a(4568),s=a(9680),n=a(1293),o=a(7620),i=a(8221);let l=null;function d(e){l=e}function c(){return l}let u=null;function m(e){u=e}let f=()=>e=>async t=>{let a=l;if(a&&u){let e=function(e){try{let t=e.split(".");if(3!==t.length)return;let a=JSON.parse(atob(t[1]));return"number"==typeof a.exp?a.exp:void 0}catch{return}}(a),t=Math.floor(Date.now()/1e3);if(void 0!==e&&e<=t){let e=await u();e&&(a=e)}}a&&t.header.set("Authorization",`Bearer ${a}`);try{return await e(t)}catch(r){if((r?.code===16||r?.code==="unauthenticated"||r?.rawMessage?.includes("ERR-AUTH-"))&&u&&!t.header.get("X-Retried-After-Refresh")){let r=await u();if(r&&r!==a)return t.header.set("Authorization",`Bearer ${r}`),t.header.set("X-Retried-After-Refresh","1"),await e(t)}throw r}},p=()=>(0,n.w)({baseUrl:"https://api.spectackl.ai",interceptors:[f()]});function h(e){let t,a,n,d=(0,s.c)(5),{children:c,forceSignOutUrl:m}=e,[f,p]=(0,o.useState)(!1);return(d[0]!==m?(t=()=>{let e=(0,i.getSupabaseBrowserClient)();u=async()=>{let{data:t,error:a}=await e.auth.refreshSession();return a||!t.session?(l=null,null):(l=t.session.access_token,t.session.access_token)},e.auth.getSession().then(e=>{let{data:t}=e;l=t.session?.access_token??null,p(!0)});let{data:t}=e.auth.onAuthStateChange((e,t)=>{l=t?.access_token??null,p(!0),"SIGNED_OUT"===e&&m&&(window.location.href=m)}),{subscription:a}=t;return()=>{a.unsubscribe(),u=null}},a=[m],d[0]=m,d[1]=t,d[2]=a):(t=d[1],a=d[2]),(0,o.useEffect)(t,a),f)?(d[3]!==c?(n=(0,r.jsx)(r.Fragment,{children:c}),d[3]=c,d[4]=n):n=d[4],n):null}},2890:(e,t,a)=>{a.d(t,{E:()=>o});var r=a(4568),s=a(9680),n=a(3464);function o(e){let t,a,o,i,l=(0,s.c)(8);return l[0]!==e?({className:t,...a}=e,l[0]=e,l[1]=t,l[2]=a):(t=l[1],a=l[2]),l[3]!==t?(o=(0,n.cn)("bg-accent animate-pulse rounded-md",t),l[3]=t,l[4]=o):o=l[4],l[5]!==a||l[6]!==o?(i=(0,r.jsx)("div",{"data-slot":"skeleton",className:o,...a}),l[5]=a,l[6]=o,l[7]=i):i=l[7],i}},3325:(e,t,a)=>{a.d(t,{p:()=>o});var r=a(4568),s=a(9680);a(7620);var n=a(3464);function o(e){let t,a,o,i,l,d=(0,s.c)(10);return d[0]!==e?({className:t,type:o,...a}=e,d[0]=e,d[1]=t,d[2]=a,d[3]=o):(t=d[1],a=d[2],o=d[3]),d[4]!==t?(i=(0,n.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),d[4]=t,d[5]=i):i=d[5],d[6]!==a||d[7]!==i||d[8]!==o?(l=(0,r.jsx)("input",{type:o,"data-slot":"input",className:i,...a}),d[6]=a,d[7]=i,d[8]=o,d[9]=l):l=d[9],l}},3332:(e,t,a)=>{a.r(t),a.d(t,{DropdownMenu:()=>c,DropdownMenuCheckboxItem:()=>g,DropdownMenuContent:()=>f,DropdownMenuGroup:()=>p,DropdownMenuItem:()=>h,DropdownMenuLabel:()=>v,DropdownMenuPortal:()=>u,DropdownMenuRadioGroup:()=>x,DropdownMenuRadioItem:()=>b,DropdownMenuSeparator:()=>w,DropdownMenuShortcut:()=>y,DropdownMenuSub:()=>j,DropdownMenuSubContent:()=>S,DropdownMenuSubTrigger:()=>N,DropdownMenuTrigger:()=>m});var r=a(4568),s=a(9680);a(7620);var n=a(8559),o=a(9851),i=a(1205),l=a(1215),d=a(3464);function c(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.bL,{"data-slot":"dropdown-menu",...t}),o[2]=t,o[3]=a):a=o[3],a}function u(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.ZL,{"data-slot":"dropdown-menu-portal",...t}),o[2]=t,o[3]=a):a=o[3],a}function m(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.l9,{"data-slot":"dropdown-menu-trigger",...t}),o[2]=t,o[3]=a):a=o[3],a}function f(e){let t,a,o,i,l,c=(0,s.c)(10);c[0]!==e?({className:t,sideOffset:o,...a}=e,c[0]=e,c[1]=t,c[2]=a,c[3]=o):(t=c[1],a=c[2],o=c[3]);let u=void 0===o?4:o;return c[4]!==t?(i=(0,d.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[300] max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),c[4]=t,c[5]=i):i=c[5],c[6]!==a||c[7]!==u||c[8]!==i?(l=(0,r.jsx)(n.ZL,{children:(0,r.jsx)(n.UC,{"data-slot":"dropdown-menu-content",sideOffset:u,className:i,...a})}),c[6]=a,c[7]=u,c[8]=i,c[9]=l):l=c[9],l}function p(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.YJ,{"data-slot":"dropdown-menu-group",...t}),o[2]=t,o[3]=a):a=o[3],a}function h(e){let t,a,o,i,l,c,u=(0,s.c)(12);u[0]!==e?({className:t,inset:a,variant:i,...o}=e,u[0]=e,u[1]=t,u[2]=a,u[3]=o,u[4]=i):(t=u[1],a=u[2],o=u[3],i=u[4]);let m=void 0===i?"default":i;return u[5]!==t?(l=(0,d.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),u[5]=t,u[6]=l):l=u[6],u[7]!==a||u[8]!==o||u[9]!==l||u[10]!==m?(c=(0,r.jsx)(n.q7,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":m,className:l,...o}),u[7]=a,u[8]=o,u[9]=l,u[10]=m,u[11]=c):c=u[11],c}function g(e){let t,a,i,l,c,u,m,f=(0,s.c)(13);return f[0]!==e?({className:i,children:a,checked:t,...l}=e,f[0]=e,f[1]=t,f[2]=a,f[3]=i,f[4]=l):(t=f[1],a=f[2],i=f[3],l=f[4]),f[5]!==i?(c=(0,d.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),f[5]=i,f[6]=c):c=f[6],f[7]===Symbol.for("react.memo_cache_sentinel")?(u=(0,r.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,r.jsx)(n.VF,{children:(0,r.jsx)(o.A,{className:"size-4"})})}),f[7]=u):u=f[7],f[8]!==t||f[9]!==a||f[10]!==l||f[11]!==c?(m=(0,r.jsxs)(n.H_,{"data-slot":"dropdown-menu-checkbox-item",className:c,checked:t,...l,children:[u,a]}),f[8]=t,f[9]=a,f[10]=l,f[11]=c,f[12]=m):m=f[12],m}function x(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.z6,{"data-slot":"dropdown-menu-radio-group",...t}),o[2]=t,o[3]=a):a=o[3],a}function b(e){let t,a,o,l,c,u,m=(0,s.c)(11);return m[0]!==e?({className:a,children:t,...o}=e,m[0]=e,m[1]=t,m[2]=a,m[3]=o):(t=m[1],a=m[2],o=m[3]),m[4]!==a?(l=(0,d.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),m[4]=a,m[5]=l):l=m[5],m[6]===Symbol.for("react.memo_cache_sentinel")?(c=(0,r.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,r.jsx)(n.VF,{children:(0,r.jsx)(i.A,{className:"size-2 fill-current"})})}),m[6]=c):c=m[6],m[7]!==t||m[8]!==o||m[9]!==l?(u=(0,r.jsxs)(n.hN,{"data-slot":"dropdown-menu-radio-item",className:l,...o,children:[c,t]}),m[7]=t,m[8]=o,m[9]=l,m[10]=u):u=m[10],u}function v(e){let t,a,o,i,l,c=(0,s.c)(10);return c[0]!==e?({className:t,inset:a,...o}=e,c[0]=e,c[1]=t,c[2]=a,c[3]=o):(t=c[1],a=c[2],o=c[3]),c[4]!==t?(i=(0,d.cn)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),c[4]=t,c[5]=i):i=c[5],c[6]!==a||c[7]!==o||c[8]!==i?(l=(0,r.jsx)(n.JU,{"data-slot":"dropdown-menu-label","data-inset":a,className:i,...o}),c[6]=a,c[7]=o,c[8]=i,c[9]=l):l=c[9],l}function w(e){let t,a,o,i,l=(0,s.c)(8);return l[0]!==e?({className:t,...a}=e,l[0]=e,l[1]=t,l[2]=a):(t=l[1],a=l[2]),l[3]!==t?(o=(0,d.cn)("bg-border -mx-1 my-1 h-px",t),l[3]=t,l[4]=o):o=l[4],l[5]!==a||l[6]!==o?(i=(0,r.jsx)(n.wv,{"data-slot":"dropdown-menu-separator",className:o,...a}
1),l[5]=a,l[6]=o,l[7]=i):i=l[7],i}function y(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,d.cn)("text-muted-foreground ml-auto text-xs tracking-widest",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("span",{"data-slot":"dropdown-menu-shortcut",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function j(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.Pb,{"data-slot":"dropdown-menu-sub",...t}),o[2]=t,o[3]=a):a=o[3],a}function N(e){let t,a,o,i,c,u,m,f=(0,s.c)(13);return f[0]!==e?({className:a,inset:o,children:t,...i}=e,f[0]=e,f[1]=t,f[2]=a,f[3]=o,f[4]=i):(t=f[1],a=f[2],o=f[3],i=f[4]),f[5]!==a?(c=(0,d.cn)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),f[5]=a,f[6]=c):c=f[6],f[7]===Symbol.for("react.memo_cache_sentinel")?(u=(0,r.jsx)(l.A,{className:"ml-auto size-4"}),f[7]=u):u=f[7],f[8]!==t||f[9]!==o||f[10]!==i||f[11]!==c?(m=(0,r.jsxs)(n.ZP,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:c,...i,children:[t,u]}),f[8]=t,f[9]=o,f[10]=i,f[11]=c,f[12]=m):m=f[12],m}function S(e){let t,a,o,i,l=(0,s.c)(8);return l[0]!==e?({className:t,...a}=e,l[0]=e,l[1]=t,l[2]=a):(t=l[1],a=l[2]),l[3]!==t?(o=(0,d.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[300] min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),l[3]=t,l[4]=o):o=l[4],l[5]!==a||l[6]!==o?(i=(0,r.jsx)(n.G5,{"data-slot":"dropdown-menu-sub-content",className:o,...a}),l[5]=a,l[6]=o,l[7]=i):i=l[7],i}},3448:(e,t,a)=>{a.r(t),a.d(t,{AlertDialog:()=>d,AlertDialogAction:()=>b,AlertDialogCancel:()=>v,AlertDialogContent:()=>f,AlertDialogDescription:()=>x,AlertDialogFooter:()=>h,AlertDialogHeader:()=>p,AlertDialogOverlay:()=>m,AlertDialogPortal:()=>u,AlertDialogTitle:()=>g,AlertDialogTrigger:()=>c});var r=a(4568),s=a(9680);a(7620);var n=a(8896),o=a(2103),i=a(3464),l=a(9195);function d(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.bL,{"data-slot":"alert-dialog",...t}),o[2]=t,o[3]=a):a=o[3],a}function c(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.l9,{"data-slot":"alert-dialog-trigger",...t}),o[2]=t,o[3]=a):a=o[3],a}function u(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.ZL,{"data-slot":"alert-dialog-portal",...t}),o[2]=t,o[3]=a):a=o[3],a}function m(e){let t,a,o,l,d=(0,s.c)(8);return d[0]!==e?({className:t,...a}=e,d[0]=e,d[1]=t,d[2]=a):(t=d[1],a=d[2]),d[3]!==t?(o=(0,i.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-background/10 backdrop-blur-[2px] supports-[backdrop-filter]:bg-background/5",t),d[3]=t,d[4]=o):o=d[4],d[5]!==a||d[6]!==o?(l=(0,r.jsx)(n.hJ,{"data-slot":"alert-dialog-overlay",className:o,...a}),d[5]=a,d[6]=o,d[7]=l):l=d[7],l}function f(e){let t,a,l,d,c,f,p,h=(0,s.c)(13);return h[0]!==e?({className:t,onKeyDown:a,...l}=e,h[0]=e,h[1]=t,h[2]=a,h[3]=l):(t=h[1],a=h[2],l=h[3]),h[4]===Symbol.for("react.memo_cache_sentinel")?(d=(0,r.jsx)(m,{}),h[4]=d):d=h[4],h[5]!==a?(c=e=>{a?.(e),(0,o.dy)(e)},h[5]=a,h[6]=c):c=h[6],h[7]!==t?(f=(0,i.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[200] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 roun
1ded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),h[7]=t,h[8]=f):f=h[8],h[9]!==l||h[10]!==c||h[11]!==f?(p=(0,r.jsxs)(u,{children:[d,(0,r.jsx)(n.UC,{"data-slot":"alert-dialog-content",onKeyDown:c,className:f,...l})]}),h[9]=l,h[10]=c,h[11]=f,h[12]=p):p=h[12],p}function p(e){let t,a,n,o,l=(0,s.c)(8);return l[0]!==e?({className:t,...a}=e,l[0]=e,l[1]=t,l[2]=a):(t=l[1],a=l[2]),l[3]!==t?(n=(0,i.cn)("flex flex-col gap-2 text-center sm:text-left",t),l[3]=t,l[4]=n):n=l[4],l[5]!==a||l[6]!==n?(o=(0,r.jsx)("div",{"data-slot":"alert-dialog-header",className:n,...a}),l[5]=a,l[6]=n,l[7]=o):o=l[7],o}function h(e){let t,a,n,o,l=(0,s.c)(8);return l[0]!==e?({className:t,...a}=e,l[0]=e,l[1]=t,l[2]=a):(t=l[1],a=l[2]),l[3]!==t?(n=(0,i.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),l[3]=t,l[4]=n):n=l[4],l[5]!==a||l[6]!==n?(o=(0,r.jsx)("div",{"data-slot":"alert-dialog-footer",className:n,...a}),l[5]=a,l[6]=n,l[7]=o):o=l[7],o}function g(e){let t,a,o,l,d=(0,s.c)(8);return d[0]!==e?({className:t,...a}=e,d[0]=e,d[1]=t,d[2]=a):(t=d[1],a=d[2]),d[3]!==t?(o=(0,i.cn)("text-lg font-semibold",t),d[3]=t,d[4]=o):o=d[4],d[5]!==a||d[6]!==o?(l=(0,r.jsx)(n.hE,{"data-slot":"alert-dialog-title",className:o,...a}),d[5]=a,d[6]=o,d[7]=l):l=d[7],l}function x(e){let t,a,o,l,d=(0,s.c)(8);return d[0]!==e?({className:t,...a}=e,d[0]=e,d[1]=t,d[2]=a):(t=d[1],a=d[2]),d[3]!==t?(o=(0,i.cn)("text-muted-foreground text-sm",t),d[3]=t,d[4]=o):o=d[4],d[5]!==a||d[6]!==o?(l=(0,r.jsx)(n.VY,{"data-slot":"alert-dialog-description",className:o,...a}),d[5]=a,d[6]=o,d[7]=l):l=d[7],l}function b(e){let t,a,o,d,c=(0,s.c)(8);return c[0]!==e?({className:t,...a}=e,c[0]=e,c[1]=t,c[2]=a):(t=c[1],a=c[2]),c[3]!==t?(o=(0,i.cn)((0,l.r)(),t),c[3]=t,c[4]=o):o=c[4],c[5]!==a||c[6]!==o?(d=(0,r.jsx)(n.rc,{className:o,...a}),c[5]=a,c[6]=o,c[7]=d):d=c[7],d}function v(e){let t,a,o,d,c=(0,s.c)(8);return c[0]!==e?({className:t,...a}=e,c[0]=e,c[1]=t,c[2]=a):(t=c[1],a=c[2]),c[3]!==t?(o=(0,i.cn)((0,l.r)({variant:"outline"}),t),c[3]=t,c[4]=o):o=c[4],c[5]!==a||c[6]!==o?(d=(0,r.jsx)(n.ZD,{className:o,...a}),c[5]=a,c[6]=o,c[7]=d):d=c[7],d}},3464:(e,t,a)=>{a.d(t,{cn:()=>n});var r=a(5135),s=a(2203);function n(...e){return(0,s.QP)((0,r.$)(e))}},3480:(e,t,a)=>{a.r(t),a.d(t,{Drawer:()=>c,DrawerBody:()=>g,DrawerContent:()=>u,DrawerDescription:()=>p,DrawerFooter:()=>h,DrawerHeader:()=>m,DrawerTitle:()=>f});var r=a(4568),s=a(9680),n=a(7620),o=a(5135),i=a(2203);function l(...e){return(0,i.QP)((0,o.$)(e))}let d=n.createContext(void 0);function c(e){let t,a,n,o=(0,s.c)(10),{open:i,onOpenChange:l,children:c}=e;return o[0]!==l||o[1]!==i?(t={open:i,onOpenChange:l},o[0]=l,o[1]=i,o[2]=t):t=o[2],o[3]!==c||o[4]!==l||o[5]!==i?(a=i&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"fixed inset-0 z-50 bg-background/10 backdrop-blur-[2px] supports-[backdrop-filter]:bg-background/5",onClick:()=>l(!1)}),(0,r.jsx)("div",{className:"fixed inset-y-0 right-0 z-50 w-full max-w-md border-l bg-background shadow-xl sm:max-w-lg",children:c})]}),o[3]=c,o[4]=l,o[5]=i,o[6]=a):a=o[6],o[7]!==t||o[8]!==a?(n=(0,r.jsx)(d.Provider,{value:t,children:a}),o[7]=t,o[8]=a,o[9]=n):n=o[9],n}function u(e){let t,a,n,o,i,d=(0,s.c)(10);return d[0]!==e?({children:t,className:a,...n}=e,d[0]=e,d[1]=t,d[2]=a,d[3]=n):(t=d[1],a=d[2],n=d[3]),d[4]!==a?(o=l("flex h-full flex-col",a),d[4]=a,d[5]=o):o=d[5],d[6]!==t||d[7]!==n||d[8]!==o?(i=(0,r.jsx)("div",{className:o,...n,children:t}),d[6]=t,d[7]=n,d[8]=o,d[9]=i):i=d[9],i}function m(e){let t,a,n,o,i,d=(0,s.c)(10);return d[0]!==e?({children:t,className:a,...n}=e,d[0]=e,d[1]=t,d[2]=a,d[3]=n):(t=d[1],a=d[2],n=d[3]),d[4]!==a?(o=l("flex-shrink-0",a),d[4]=a,d[5]=o):o=d[5],d[6]!==t||d[7]!==n||d[8]!==o?(i=(0,r.jsx)("div",{className:o,...n,children:t}),d[6]=t,d[7]=n,d[8]=o,d[9]=i):i=d[9],i}function f(e){let t,a,n,o,i,d=(0,s.c)(10);return d[0]!==e?({children:t,className:a,...n}=e,d[0]=e,d[1]=t,d[2]=a,d[3]=n):(t=d[1],a=d[2],n=d[3]),d[4]!==a?(o=l("text-lg font-semibold",a),d[4]=a,d[5]=o):o=d[5],d[6]!==t||d[7]!==n||d[8]!==o?(i=(0,r.jsx)("h2",{className:o,...n,children:t}),d[6]=t,d[7]=n,d[8]=o,d[9]=i):i=d[9],i}function p(e){let t,a,n,o,i,d=(0,s.c)(10);return d[0]!==e?({children:t,className:a,...n}=e,d[0]=e,d[1]=t,d[2]=a,d[3]=n):(t=d[1],a=d[2],n=d[3]),d[4]!==a?(o=l("text-sm text-muted-foreground",a),d[4]=a,d[5]=o):o=d[5],d[6]!==t||d[7]!==n||d[8]!==o?(i=(0,r.jsx)("p",{className:o,...n,children:t}),d[6]=t,d[7]=n,d[8]=o,d[9]=i):i=d[9],i}function h(e){let t,a,n,o,i,d=(0,s.c)(10);return d[0]!==e?({children:t,className:a,...n}=e,d[0]=e,d[1]=t,d[2]=a,d[3]=n):(t=d[1],a=d[2],n=d[3]),d[4]!==a?(o=l("flex-shrink-0 border-t p-4",a),d[4]=a,d[5]=o):o=d[5],d[6]!==t||d[7]!==n||d[8]!==o?(i=(0,r.jsx)("div",{className:o,...n,children:t}),d[6]=t,d[7]=n,d[8]=o,d[9]=i):i=d[9],i}function g(e){let t,a,n,o,i,d=(0,s.c)(10);return d[0]!==e?({children:t,className:a,...n}=e,d[0]=e,d[1]=t,d[2]=a,d[3]=n):(t=d[1],a=d[2],n=d[3]),d[4]!==a?(o=l("flex-1 overflow-y-auto p-4",a),d[4]=a,d[5]=o):o=d[5],d[6]!==t||d[7]!==n||d[8]!==o?(i=(0,r.jsx)("div",{className:o,...n,children:t}),d[6]=t,d[7]=n,d[8]=o,d[9]=i):i=d[9],i}},4290:(e,t,a)=>{a.r(t),a.d(t,{Modal:()=>i});var r=a(4568),s=a(9680),n=a(7620),o=a(5447);function i(e){let t,a,i,l,d,c,u,m,f,p,h=(0,s.c)(21),{isOpen:g,onClose:x,title:b,children:v}=e;return(h[0]!==x?(t=()=>{let e=e=>{"Escape"===e.key&&x()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},a=[x],h[0]=x,h[1]=t,h[2]=a):(t=h[1],a=h[2]),(0,n.useEffect)(t,a),g)?(h[3]!==x?(i=(0,r.jsx)("div",{className:"absolute inset-0 bg-gray-950/80 backdrop-blur-sm animate-in fade-in duration-300",onClick:x}),h[3]=x,h[4]=i):i=h[4],h[5]!==b?(l=(0,r.jsx)("h2",{className:"text-xl font-bold text-white",children:b}),h[5]=b,h[6]=l):l=h[6],h[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,r.jsx)(o.A,{className:"w-5 h-5"}),h[7]=d):d=h[7],h[8]!==x?(c=(0,r.jsx)("button",{onClick:x,className:"p-1 rounded-lg text-gray-400 hover:text-white hover:bg-gray-800 transition-all",children:d}),h[8]=x,h[9]=c):c=h[9],h[10]!==l||h[11]!==c?(u=(0,r.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-800",children:[l,c]}),h[10]=l,h[11]=c,h[12]=u):u=h[12],h[13]!==v?(m=(0,r.jsx)("div",{className:"p-6",children:v}),h[13]=v,h[14]=m):m=h[14],h[15]!==u||h[16]!==m?(f=(0,r.jsxs)("div",{className:"relative bg-gray-900 border border-gray-800 w-full max-w-md rounded-2xl shadow-2xl animate-in zoom-in-95 fade-in duration-300 overflow-hidden",children:[u,m]}),h[15]=u,h[16]=m,h[17]=f):f=h[17],h[18]!==i||h[19]!==f?(p=(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[i,f]}),h[18]=i,h[19]=f,h[20]=p):p=h[20],p):null}},4550:(e,t,a)=>{a.d(t,{a:()=>s});var r=a(7620);function s(){let[e,t]=r.useState(void 0);return r.useEffect(()=>{let e=window.matchMedia("(max-width: 767px)"),a=()=>{t(window.innerWidth<768)};return e.addEventListener("change",a),t(window.innerWidth<768),()=>e.removeEventListener("change",a)},[]),!!e}},6072:(e,t,a)=>{a.r(t),a.d(t,{Separator:()=>i});var r=a(4568),s=a(9680);a(7620);
1var n=a(3567),o=a(3464);function i(e){let t,a,i,l,d,c,u=(0,s.c)(12);u[0]!==e?({className:t,orientation:i,decorative:l,...a}=e,u[0]=e,u[1]=t,u[2]=a,u[3]=i,u[4]=l):(t=u[1],a=u[2],i=u[3],l=u[4]);let m=void 0===i?"horizontal":i,f=void 0===l||l;return u[5]!==t?(d=(0,o.cn)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),u[5]=t,u[6]=d):d=u[6],u[7]!==f||u[8]!==m||u[9]!==a||u[10]!==d?(c=(0,r.jsx)(n.b,{"data-slot":"separator",decorative:f,orientation:m,className:d,...a}),u[7]=f,u[8]=m,u[9]=a,u[10]=d,u[11]=c):c=u[11],c}},6137:(e,t,a)=>{a.r(t),a.d(t,{Collapsible:()=>s,CollapsibleContent:()=>o,CollapsibleTrigger:()=>n}),a(7620);var r=a(6457);let s=r.bL,n=r.R6,o=r.Ke},6625:(e,t,a)=>{a.r(t),a.d(t,{GoogleSignInButton:()=>d});var r=a(4568),s=a(9680),n=a(7620),o=a(9195),i=a(8221);function l(e){let t,a,n,o,i,l=(0,s.c)(6),{className:d}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,r.jsx)("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.76h3.56c2.08-1.92 3.28-4.74 3.28-8.09Z"}),a=(0,r.jsx)("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.56-2.76c-.98.66-2.24 1.06-3.72 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23Z"}),n=(0,r.jsx)("path",{fill:"#FBBC05",d:"M5.84 14.1a6.6 6.6 0 0 1 0-4.2V7.06H2.18a11 11 0 0 0 0 9.88l3.66-2.84Z"}),o=(0,r.jsx)("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1A11 11 0 0 0 2.18 7.06l3.66 2.84C6.71 7.31 9.14 5.38 12 5.38Z"}),l[0]=t,l[1]=a,l[2]=n,l[3]=o):(t=l[0],a=l[1],n=l[2],o=l[3]),l[4]!==d?(i=(0,r.jsxs)("svg",{className:d,viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:[t,a,n,o]}),l[4]=d,l[5]=i):i=l[5],i}function d(e){let t,a,d,c=(0,s.c)(8),{label:u,redirectTo:m,className:f,disabled:p}=e,h=void 0===u?"Continue with Google":u,[g,x]=(0,n.useState)(!1);c[0]!==m?(t=async()=>{x(!0);let{error:e}=await (0,i.signInWithGoogle)(m);e&&x(!1)},c[0]=m,c[1]=t):t=c[1];let b=t,v=p||g;return c[2]===Symbol.for("react.memo_cache_sentinel")?(a=(0,r.jsx)(l,{className:"mr-2"}),c[2]=a):a=c[2],c[3]!==f||c[4]!==b||c[5]!==h||c[6]!==v?(d=(0,r.jsxs)(o.$,{type:"button",variant:"outline",className:f,onClick:b,disabled:v,children:[a,h]}),c[3]=f,c[4]=b,c[5]=h,c[6]=v,c[7]=d):d=c[7],d}},6660:(e,t,a)=>{a.r(t),a.d(t,{Tooltip:()=>l,TooltipContent:()=>c,TooltipProvider:()=>i,TooltipTrigger:()=>d});var r=a(4568),s=a(9680);a(7620);var n=a(5337),o=a(3464);function i(e){let t,a,o,i=(0,s.c)(6);i[0]!==e?({delayDuration:a,...t}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]);let l=void 0===a?0:a;return i[3]!==l||i[4]!==t?(o=(0,r.jsx)(n.Kq,{"data-slot":"tooltip-provider",delayDuration:l,...t}),i[3]=l,i[4]=t,i[5]=o):o=i[5],o}function l(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(i,{children:(0,r.jsx)(n.bL,{"data-slot":"tooltip",...t})}),o[2]=t,o[3]=a):a=o[3],a}function d(e){let t,a,o=(0,s.c)(4);return o[0]!==e?({...t}=e,o[0]=e,o[1]=t):t=o[1],o[2]!==t?(a=(0,r.jsx)(n.l9,{"data-slot":"tooltip-trigger",...t}),o[2]=t,o[3]=a):a=o[3],a}function c(e){let t,a,i,l,d,c,u,m=(0,s.c)(13);m[0]!==e?({className:a,sideOffset:l,children:t,...i}=e,m[0]=e,m[1]=t,m[2]=a,m[3]=i,m[4]=l):(t=m[1],a=m[2],i=m[3],l=m[4]);let f=void 0===l?0:l;return m[5]!==a?(d=(0,o.cn)("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[300] w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",a),m[5]=a,m[6]=d):d=m[6],m[7]===Symbol.for("react.memo_cache_sentinel")?(c=(0,r.jsx)(n.i3,{className:"bg-foreground fill-foreground z-[300] size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),m[7]=c):c=m[7],m[8]!==t||m[9]!==i||m[10]!==f||m[11]!==d?(u=(0,r.jsx)(n.ZL,{children:(0,r.jsxs)(n.UC,{"data-slot":"tooltip-content",sideOffset:f,className:d,...i,children:[t,c]})}),m[8]=t,m[9]=i,m[10]=f,m[11]=d,m[12]=u):u=m[12],u}},7574:(e,t,a)=>{a.r(t),a.d(t,{Command:()=>d,CommandEmpty:()=>m,CommandGroup:()=>f,CommandInput:()=>c,CommandItem:()=>p,CommandList:()=>u,CommandShortcut:()=>h});var r=a(4568),s=a(9680),n=a(7620),o=a(2519),i=a(6381),l=a(3464);let d=n.forwardRef((e,t)=>
1{let a,n,i,d,c=(0,s.c)(9);return c[0]!==e?({className:a,...n}=e,c[0]=e,c[1]=a,c[2]=n):(a=c[1],n=c[2]),c[3]!==a?(i=(0,l.cn)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",a),c[3]=a,c[4]=i):i=c[4],c[5]!==n||c[6]!==t||c[7]!==i?(d=(0,r.jsx)(o.uB,{ref:t,className:i,...n}),c[5]=n,c[6]=t,c[7]=i,c[8]=d):d=c[8],d});d.displayName=o.uB.displayName;let c=n.forwardRef((e,t)=>{let a,n,d,c,u,m=(0,s.c)(10);return m[0]!==e?({className:a,...n}=e,m[0]=e,m[1]=a,m[2]=n):(a=m[1],n=m[2]),m[3]===Symbol.for("react.memo_cache_sentinel")?(d=(0,r.jsx)(i.A,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),m[3]=d):d=m[3],m[4]!==a?(c=(0,l.cn)("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),m[4]=a,m[5]=c):c=m[5],m[6]!==n||m[7]!==t||m[8]!==c?(u=(0,r.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[d,(0,r.jsx)(o.uB.Input,{ref:t,className:c,...n})]}),m[6]=n,m[7]=t,m[8]=c,m[9]=u):u=m[9],u});c.displayName=o.uB.Input.displayName;let u=n.forwardRef((e,t)=>{let a,n,i,d,c=(0,s.c)(9);return c[0]!==e?({className:a,...n}=e,c[0]=e,c[1]=a,c[2]=n):(a=c[1],n=c[2]),c[3]!==a?(i=(0,l.cn)("max-h-[300px] overflow-y-auto overflow-x-hidden",a),c[3]=a,c[4]=i):i=c[4],c[5]!==n||c[6]!==t||c[7]!==i?(d=(0,r.jsx)(o.uB.List,{ref:t,className:i,...n}),c[5]=n,c[6]=t,c[7]=i,c[8]=d):d=c[8],d});u.displayName=o.uB.List.displayName;let m=n.forwardRef((e,t)=>{let a,n=(0,s.c)(3);return n[0]!==e||n[1]!==t?(a=(0,r.jsx)(o.uB.Empty,{ref:t,className:"py-6 text-center text-sm",...e}),n[0]=e,n[1]=t,n[2]=a):a=n[2],a});m.displayName=o.uB.Empty.displayName;let f=n.forwardRef((e,t)=>{let a,n,i,d,c=(0,s.c)(9);return c[0]!==e?({className:a,...n}=e,c[0]=e,c[1]=a,c[2]=n):(a=c[1],n=c[2]),c[3]!==a?(i=(0,l.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",a),c[3]=a,c[4]=i):i=c[4],c[5]!==n||c[6]!==t||c[7]!==i?(d=(0,r.jsx)(o.uB.Group,{ref:t,className:i,...n}),c[5]=n,c[6]=t,c[7]=i,c[8]=d):d=c[8],d});f.displayName=o.uB.Group.displayName;let p=n.forwardRef((e,t)=>{let a,n,i,d,c=(0,s.c)(9);return c[0]!==e?({className:a,...n}=e,c[0]=e,c[1]=a,c[2]=n):(a=c[1],n=c[2]),c[3]!==a?(i=(0,l.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),c[3]=a,c[4]=i):i=c[4],c[5]!==n||c[6]!==t||c[7]!==i?(d=(0,r.jsx)(o.uB.Item,{ref:t,className:i,...n}),c[5]=n,c[6]=t,c[7]=i,c[8]=d):d=c[8],d});p.displayName=o.uB.Item.displayName;let h=e=>{let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,l.cn)("ml-auto text-xs tracking-widest text-muted-foreground",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("span",{className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o};h.displayName="CommandShortcut"},7922:(e,t,a)=>{a.r(t),a.d(t,{ScrollArea:()=>i,ScrollBar:()=>l});var r=a(4568),s=a(7620),n=a(8420),o=a(3464);let i=s.forwardRef(({className:e,children:t,...a},s)=>(0,r.jsxs)(n.bL,{ref:s,className:(0,o.cn)("relative overflow-hidden",e),...a,children:[(0,r.jsx)(n.LM,{className:"h-full w-full rounded-[inherit]",children:t}),(0,r.jsx)(l,{}),(0,r.jsx)(n.OK,{})]}));i.displayName=n.bL.displayName;let l=s.forwardRef(({className:e,orientation:t="vertical",...a},s)=>(0,r.jsx)(n.VM,{ref:s,orientation:t,className:(0,o.cn)("flex touch-none select-none transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,r.jsx)(n.lr,{className:"relative flex-1 rounded-full bg-border"})}));l.displayName=n.VM.displayName},8221:(e,t,a)=>{let r;a.r(t),a.d(t,{getSupabaseBrowserClient:()=>n,signInWithGoogle:()=>o});var s=a(5691);function n(){if(!r){let{url:e,anonKey:t}=function(){throw Error("Missing Supabase env: set NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY")}(),a;r=(0,s.k)(e,t,{...a?{cookieOptions:{domain:a}}:{}}
1)}return r}async function o(e){let t=e??`${window.location.origin}/auth/callback`;return n().auth.signInWithOAuth({provider:"google",options:{redirectTo:t}})}},9177:(e,t,a)=>{a.r(t),a.d(t,{MfaChallengeForm:()=>N,MfaEnrollForm:()=>j,TotpCodeInput:()=>v,downloadRecoveryCodes:()=>y,formatTotpCode:()=>x,isMfaChallengePending:()=>p,totpDigits:()=>b,unenrollFactor:()=>h,useMfaState:()=>c});var r=a(4568),s=a(9680),n=a(7620),o=a(9195),i=a(3325),l=a(9771),d=a(8221);function c(){let e,t,a,r,o,i=(0,s.c)(7);i[0]===Symbol.for("react.memo_cache_sentinel")?(e={status:"loading"},i[0]=e):e=i[0];let[l,c]=(0,n.useState)(e),[p,h]=(0,n.useState)(0);return i[1]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{let e=!1;return(0,d.getSupabaseBrowserClient)().auth.mfa.listFactors().then(t=>{let{data:a,error:r}=t;if(e)return;if(r)return void c({status:"error",message:r.message});let s=(a?.all??[]).filter(f).map(m);c(s.length?{status:"enrolled",factors:s}:{status:"not-enrolled"})}),()=>{e=!0}},i[1]=t):t=i[1],i[2]!==p?(a=[p],i[2]=p,i[3]=a):a=i[3],(0,n.useEffect)(t,a),i[4]===Symbol.for("react.memo_cache_sentinel")?(r=()=>h(u),i[4]=r):r=i[4],i[5]!==l?(o={state:l,refresh:r},i[5]=l,i[6]=o):o=i[6],o}function u(e){return e+1}function m(e){return{id:e.id,friendlyName:e.friendly_name??void 0}}function f(e){return"totp"===e.factor_type&&"verified"===e.status}async function p(){let{data:e,error:t}=await (0,d.getSupabaseBrowserClient)().auth.mfa.getAuthenticatorAssuranceLevel();return!t&&!!e&&"aal2"===e.nextLevel&&"aal2"!==e.currentLevel}async function h(e){let{error:t}=await (0,d.getSupabaseBrowserClient)().auth.mfa.unenroll({factorId:e});return t?t.message:null}let g=/^\d{6}$/;function x(e){return e.length>3?`${e.slice(0,3)} ${e.slice(3)}`:e}let b=e=>e.replace(/\D/g,"").slice(0,6);function v(e){let t,a,n,o=(0,s.c)(11),{id:l,value:d,onChange:c,disabled:u,autoFocus:m}=e;o[0]!==c||o[1]!==d?(t=e=>{let t=e.currentTarget,a=t.value,r=t.selectionStart??a.length,s=b(a),n=b(a.slice(0,r)).length;s===d&&a.length<x(d).length&&n>0&&(s=s.slice(0,n-1)+s.slice(n),n-=1),c(s);let o=n<=3?n:n+1;queueMicrotask(()=>{t.isConnected&&t.setSelectionRange(o,o)})},o[0]=c,o[1]=d,o[2]=t):t=o[2];let f=t;return o[3]!==d?(a=x(d),o[3]=d,o[4]=a):a=o[4],o[5]!==m||o[6]!==u||o[7]!==f||o[8]!==l||o[9]!==a?(n=(0,r.jsx)(i.p,{id:l,inputMode:"numeric",autoComplete:"one-time-code",placeholder:"000 000",maxLength:7,autoFocus:m,required:!0,value:a,onChange:f,disabled:u}),o[5]=m,o[6]=u,o[7]=f,o[8]=l,o[9]=a,o[10]=n):n=o[10],n}let w=e=>e.toUpperCase().replace(/[^A-Z0-9]/g,"");function y(e,t){let a=["Spectackl two-factor recovery codes",t?`Account: ${t}`:null,"","Each code works once. Using one turns two-factor authentication OFF and","lets you sign in with your password alone, so you can set it up again.","Keep this file somewhere only you can reach.","",...e.map(e=>` ${e}`),""].filter(e=>null!==e).join("\n"),r=URL.createObjectURL(new Blob([a],{type:"text/plain"})),s=document.createElement("a");s.href=r,s.download="spectackl-recovery-codes.txt",s.click(),URL.revokeObjectURL(r)}function j({labels:e={},accountEmail:t=null,generateRecoveryCodes:a,onEnrolled:s,onCancel:c,className:u}){let[m,f]=(0,n.useState)("scan"),[p,h]=(0,n.useState)(null),[x,b]=(0,n.useState)(null),[N,S]=(0,n.useState)(null),[C,k]=(0,n.useState)(""),[_,z]=(0,n.useState)([]),[P,A]=(0,n.useState)(""),[D,I]=(0,n.useState)(null),[F,T]=(0,n.use
1State)(!1),[E,L]=(0,n.useState)(!0),R=(0,n.useRef)(!1),B={intro:"Scan this with your authenticator app, then enter the 6-digit code it shows.",scan:"Scan the QR code",manualEntry:"Or enter this key manually",code:"6-digit code",submit:"Turn on two-factor",submitting:"Verifyingâ¦",cancel:"Cancel",invalidCode:"That code is not valid. Check your authenticator and try again.",lockoutWarning:"Keep your recovery codes safe. Without them and without your authenticator app, only an administrator can restore access.",codesTitle:"Save your recovery codes",codesIntro:"Each code can be used once to get back in if you lose your authenticator app. They are shown only now.",download:"Download codes",continue:"Continue",confirmTitle:"Confirm you saved them",confirmIntro:"Enter one of the recovery codes to finish turning on two-factor authentication.",recoveryCode:"Recovery code",notInList:"That code is not in your list",codesFailed:"Recovery codes could not be generated",...e};(0,n.useEffect)(()=>{if(R.current)return;R.current=!0;let e=(0,d.getSupabaseBrowserClient)();(async()=>{let{data:t}=await e.auth.mfa.listFactors();for(let a of t?.all??[])"unverified"===a.status&&await e.auth.mfa.unenroll({factorId:a.id});let{data:a,error:r}=await e.auth.mfa.enroll({factorType:"totp",friendlyName:"Authenticator"});(L(!1),r||!a)?I(r?.message??"Could not start enrolment"):(S(a.id),h(a.totp.qr_code),b(a.totp.secret))})()},[]);let M=async()=>{N&&"scan"===m&&await (0,d.getSupabaseBrowserClient)().auth.mfa.unenroll({factorId:N}),c?.()},O=async e=>{if(e.preventDefault(),I(null),!N)return;if(!g.test(C))return void I(B.invalidCode);T(!0);let t=(0,d.getSupabaseBrowserClient)(),{data:r,error:s}=await t.auth.mfa.challenge({factorId:N});if(s||!r){T(!1),I(s?.message??B.invalidCode);return}let{error:n}=await t.auth.mfa.verify({factorId:N,challengeId:r.id,code:C});if(n){T(!1),k(""),I(B.invalidCode);return}try{let e=await a();z(e),f("codes")}catch{I(B.codesFailed)}finally{T(!1)}};return E?(0,r.jsx)("p",{className:u??"text-sm text-muted-foreground",children:B.submitting}):"codes"===m?(0,r.jsxs)("div",{className:u??"space-y-4",children:[(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)("h3",{className:"text-sm font-medium",children:B.codesTitle}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:B.codesIntro})]}),(0,r.jsx)("ul",{className:"grid grid-cols-2 gap-2 rounded-md border bg-muted/40 p-3",children:_.map(e=>(0,r.jsx)("li",{className:"font-mono text-sm tracking-wide",children:e},e))}),(0,r.jsx)("p",{className:"rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-xs text-foreground",children:B.lockoutWarning}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(o.$,{type:"button",variant:"outline",onClick:()=>y(_,t),children:B.download}),(0,r.jsx)(o.$,{type:"button",onClick:()=>f("confirm"),children:B.continue})]})]}):"confirm"===m?(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault(),I(null);let t=w(P);_.some(e=>w(e)===t)?s?.():I(B.notInList)},className:u??"space-y-4",children:[(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)("h3",{className:"text-sm font-medium",children:B.confirmTitle}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:B.confirmIntro})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.J,{htmlFor:"mfa-recovery-confirm",children:B.recoveryCode}),(0,r.jsx)(i.p,{id:"mfa-recovery-confirm",autoComplete:"off",autoFocus:!0,required:!0,value:P,onChange:e=>A(e.target.value)})]}),D&&(0,r.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:D}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(o.$,{type:"button",variant:"outline",onClick:()=>f("codes"),children:B.cancel}),(0,r.jsx)(o.$,{type:"submit",disabled:!P.trim(),children:B.submit})]})]}):(0,r.jsxs)("form",{onSubmit:O,className:u??"space-y-4",children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:B.intro}),p&&(0,r.jsx)("div",{className:"flex justify-center rounded-md border bg-white p-4",children:(0,r.jsx)("img",{src:p,alt:B.scan,className:"h-44 w-44"})}),x&&(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:B.manualEntry}),(0,r.jsx)("code",{className:"block break-all rounded bg-muted px-2 py-1 font-mono text-xs",children:x})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.J,{htmlFor:"mfa-enroll-code",children:B.code}),(0,r.jsx)(v,{id:"mfa-enroll-code",value:C,onChange:k,disabled:F})]}),D&&(0,r.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:D}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[c&&(0,r.jsx)(o.$,{type:"button",variant:"outline",onClick:M,disabled:F,children:B.cancel}),(0,r.jsx)(o.$,{type:"submit",disabled:F||6!==C.length,children:F?B.submitting:B.continue})]})]})}function N({labels:e={},redeemRecoveryCode:t,onVerified:a,onRecovered:s,onCancel:u,className:m}
1){let[f,p]=(0,n.useState)(""),[h,x]=(0,n.useState)(!1),[b,w]=(0,n.useState)(""),[y,j]=(0,n.useState)(null),[S,C]=(0,n.useState)(!1),{state:k}=c(),_={intro:"Enter the 6-digit code from your authenticator app.",code:"6-digit code",submit:"Verify",submitting:"Verifyingâ¦",cancel:"Sign out",invalidCode:"That code is not valid. Check your authenticator and try again.",noFactor:"No authenticator is registered for this account.",useRecovery:"Use a recovery code",recoveryIntro:"Enter one of your recovery codes. This turns two-factor authentication OFF and signs you in with your password; you can set it up again afterwards.",recoveryCode:"Recovery code",recoveryInvalid:"That recovery code is not valid or has already been used.",backToCode:"Back to authenticator code",...e},z=async e=>{if(e.preventDefault(),j(null),t&&b.trim()){C(!0);try{await t(b.trim()),s?.()}catch{w(""),j(_.recoveryInvalid)}finally{C(!1)}}},P=async e=>{if(e.preventDefault(),j(null),"enrolled"!==k.status||!k.factors.length)return void j(_.noFactor);if(!g.test(f))return void j(_.invalidCode);C(!0);let t=(0,d.getSupabaseBrowserClient)(),r=k.factors[0].id,{data:s,error:n}=await t.auth.mfa.challenge({factorId:r});if(n||!s){C(!1),j(n?.message??_.invalidCode);return}let{error:o}=await t.auth.mfa.verify({factorId:r,challengeId:s.id,code:f});if(C(!1),o){p(""),j(_.invalidCode);return}a?.()};return h?(0,r.jsxs)("form",{onSubmit:z,className:m??"space-y-4 text-left",children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:_.recoveryIntro}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.J,{htmlFor:"mfa-recovery",children:_.recoveryCode}),(0,r.jsx)(i.p,{id:"mfa-recovery",autoComplete:"off",autoFocus:!0,required:!0,value:b,onChange:e=>w(e.target.value),disabled:S})]}),y&&(0,r.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:y}),(0,r.jsx)(o.$,{type:"submit",size:"lg",className:"w-full",disabled:S||!b.trim(),children:S?_.submitting:_.submit}),(0,r.jsx)("button",{type:"button",onClick:()=>{x(!1),j(null)},className:"block w-full text-sm text-muted-foreground hover:text-foreground",children:_.backToCode})]}):(0,r.jsxs)("form",{onSubmit:P,className:m??"space-y-4 text-left",children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:_.intro}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.J,{htmlFor:"mfa-challenge-code",children:_.code}),(0,r.jsx)(v,{id:"mfa-challenge-code",value:f,onChange:p,disabled:S,autoFocus:!0})]}),y&&(0,r.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:y}),(0,r.jsx)(o.$,{type:"submit",size:"lg",className:"w-full",disabled:S||6!==f.length,children:S?_.submitting:_.submit}),t&&(0,r.jsx)("button",{type:"button",onClick:()=>{x(!0),j(null)},className:"block w-full text-sm text-muted-foreground hover:text-foreground",children:_.useRecovery}),u&&(0,r.jsx)("button",{type:"button",onClick:u,className:"block w-full text-sm text-muted-foreground hover:text-foreground",children:_.cancel})]})}},9195:(e,t,a)=>{a.d(t,{$:()=>d,r:()=>l});var r=a(4568),s=a(9680);a(7620);var n=a(1541),o=a(507),i=a(3464);let l=(0,o.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function d(e){let t,a,o,d,c,u,m,f=(0,s.c)(16);f[0]!==e?({className:t,variant:o,size:d,asChild:c,...a}=e,f[0]=e,f[1]=t,f[2]=a,f[3]=o,f[4]=d,f[5]=c):(t=f[1],a=f[2],o=f[3],d=f[4],c=f[5]);let p=void 0===o?"default":o,h=void 0===d?"default":d,g=void 0!==c&&c?n.DX:"button";return f[6]!==t||f[7]!==h||f[8]!==p?(u=(0,i.cn)(l({variant:p,size:h,className:t})),f[6]=t,f[7]=h,f[8]=p,f[9]=u):u=f[9],f[10]!==g||f[11]!==a||f[12]!==h||f[13]!==u||f[14]!==p?(m=(0,r.jsx)(g,{"data-slot":"button","data-variant":p,"data-size":h,className:u,...a}),f[10]=g,f[11]=a,f[12]=h,f[13]=u,f[14]=p,f[15]=m):m=f[15],m}},9473:(e,t,a)=>{a.r(t),a.d(t,{Sidebar:()=>j,SidebarContent:()=>A,SidebarFooter:()=>z,SidebarGroup:()=>D,SidebarGroupAction:()=>F,SidebarGroupContent:()=>T,SidebarGroupLabel:()=>I,SidebarHeader:()=>
1_,SidebarInput:()=>k,SidebarInset:()=>C,SidebarMenu:()=>E,SidebarMenuAction:()=>M,SidebarMenuBadge:()=>O,SidebarMenuButton:()=>B,SidebarMenuItem:()=>L,SidebarMenuSkeleton:()=>U,SidebarMenuSub:()=>$,SidebarMenuSubButton:()=>J,SidebarMenuSubItem:()=>q,SidebarProvider:()=>v,SidebarRail:()=>S,SidebarSeparator:()=>P,SidebarTrigger:()=>N,useSidebar:()=>b});var r=a(4568),s=a(9680),n=a(7620),o=a(1541),i=a(507),l=a(9601),d=a(4550),c=a(3464),u=a(9195),m=a(3325),f=a(6072),p=a(1392),h=a(2890),g=a(6660);let x=n.createContext(null);function b(){let e=n.useContext(x);if(!e)throw Error("useSidebar must be used within a SidebarProvider.");return e}function v(e){let t,a,o,i,l,u,m,f,p,h,b,v,j,N,S,C,k=(0,s.c)(36);k[0]!==e?({defaultOpen:m,open:o,onOpenChange:l,className:a,style:u,children:t,...i}=e,k[0]=e,k[1]=t,k[2]=a,k[3]=o,k[4]=i,k[5]=l,k[6]=u,k[7]=m):(t=k[1],a=k[2],o=k[3],i=k[4],l=k[5],u=k[6],m=k[7]);let _=void 0===m||m,z=(0,d.a)(),[P,A]=n.useState(!1),[D,I]=n.useState(_),F=o??D;k[8]!==F||k[9]!==l?(f=e=>{let t="function"==typeof e?e(F):e;l?l(t):I(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},k[8]=F,k[9]=l,k[10]=f):f=k[10];let T=f;k[11]!==z||k[12]!==T?(p=()=>z?A(y):T(w),k[11]=z,k[12]=T,k[13]=p):p=k[13];let E=p;k[14]!==E?(h=()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),E())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},b=[E],k[14]=E,k[15]=h,k[16]=b):(h=k[15],b=k[16]),n.useEffect(h,b);let L=F?"expanded":"collapsed";k[17]!==z||k[18]!==F||k[19]!==P||k[20]!==T||k[21]!==L||k[22]!==E?(v={state:L,open:F,setOpen:T,isMobile:z,openMobile:P,setOpenMobile:A,toggleSidebar:E},k[17]=z,k[18]=F,k[19]=P,k[20]=T,k[21]=L,k[22]=E,k[23]=v):v=k[23];let R=v;k[24]!==u?(j={"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...u},k[24]=u,k[25]=j):j=k[25];let B=j;return k[26]!==a?(N=(0,c.cn)("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",a),k[26]=a,k[27]=N):N=k[27],k[28]!==t||k[29]!==i||k[30]!==B||k[31]!==N?(S=(0,r.jsx)(g.TooltipProvider,{delayDuration:0,children:(0,r.jsx)("div",{"data-slot":"sidebar-wrapper",style:B,className:N,...i,children:t})}),k[28]=t,k[29]=i,k[30]=B,k[31]=N,k[32]=S):S=k[32],k[33]!==R||k[34]!==S?(C=(0,r.jsx)(x.Provider,{value:R,children:S}),k[33]=R,k[34]=S,k[35]=C):C=k[35],C}function w(e){return!e}function y(e){return!e}function j(e){let t,a,n,o,i,l,d,u,m,f,h,g,x=(0,s.c)(46);x[0]!==e?({side:o,variant:i,collapsible:l,className:a,children:t,...n}=e,x[0]=e,x[1]=t,x[2]=a,x[3]=n,x[4]=o,x[5]=i,x[6]=l):(t=x[1],a=x[2],n=x[3],o=x[4],i=x[5],l=x[6]);let v=void 0===o?"left":o,w=void 0===i?"sidebar":i,y=void 0===l?"offcanvas":l,{isMobile:j,state:N,openMobile:S,setOpenMobile:C}=b();if("none"===y){let e,s;return x[7]!==a?(e=(0,c.cn)("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),x[7]=a,x[8]=e):e=x[8],x[9]!==t||x[10]!==n||x[11]!==e?(s=(0,r.jsx)("div",{"data-slot":"sidebar",className:e,...n,children:t}),x[9]=t,x[10]=n,x[11]=e,x[12]=s):s=x[12],s}if(j){let e,a,s,o,i;return x[13]===Symbol.for("react.memo_cache_sentinel")?(e={"--sidebar-width":"18rem"},x[13]=e):e=x[13],x[14]===Symbol.for("react.memo_cache_sentinel")?(a=(0,r.jsxs)(p.SheetHeader,{className:"sr-only",children:[(0,r.jsx)(p.SheetTitle,{children:"Sidebar"}),(0,r.jsx)(p.SheetDescription,{children:"Displays the mobile sidebar."})]}),x[14]=a):a=x[14],x[15]!==t?(s=(0,r.jsx)("div",{className:"flex h-full w-full flex-col",children:t}),x[15]=t,x[16]=s):s=x[16],x[17]!==v||x[18]!==s?(o=(0,r.jsxs)(p.SheetContent,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:e,side:v,children:[a,s]}),x[17]=v,x[18]=s,x[19]=o):o=x[19],x[20]!==S||x[21]!==n||x[22]!==C||x[23]!==o?(i=(0,r.jsx)(p.Sheet,{open:S,onOpenChange:C,...n,children:o}),x[20]=S,x[21]=n,x[22]=C,x[23]=o,x[24]=i):i=x[24],i}let k="collapsed"===N?y:"",_="floating"===w||"inset"===w?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";x[25]!==_?(d=(0,c.cn)("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",_),x[25]=_,x[26]=d):d=x[26],x[27]!==d?(u=(0,r.jsx)("div",{"data-slot":"sidebar-gap",className:d}),x[27]=d,x[28]=u):u=x[28];let z="left"===v?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",P="floating"===w||"inset"===w?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l";return x[29]!==a||x[30]!==z||x[31]!==P?(m=(0,c.cn)("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",z,P,a),x[29]=a,x[30]=z,x[31]=P,x[32]=m):m=x[32],x[33]!==t?(f=(0,r.jsx)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:t}),x[33]=t,x[34]=f):f=x[34],x[35]!==n||x[36]!==m||x[37]!==f?(h=(0,r.jsx)("div",{"data-slot":"sidebar-container",className:m,...n,children:f}),x[35]=n,x[36]=m,x[37]=f,x[38]=h):h=x[38],x[39]!==v||x[40]!==N||x[41]!==
1h||x[42]!==k||x[43]!==u||x[44]!==w?(g=(0,r.jsxs)("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":N,"data-collapsible":k,"data-variant":w,"data-side":v,"data-slot":"sidebar",children:[u,h]}),x[39]=v,x[40]=N,x[41]=h,x[42]=k,x[43]=u,x[44]=w,x[45]=g):g=x[45],g}function N(e){let t,a,n,o,i,d,m,f,p=(0,s.c)(15);p[0]!==e?({className:t,onClick:a,...n}=e,p[0]=e,p[1]=t,p[2]=a,p[3]=n):(t=p[1],a=p[2],n=p[3]);let{toggleSidebar:h}=b();return p[4]!==t?(o=(0,c.cn)("size-7",t),p[4]=t,p[5]=o):o=p[5],p[6]!==a||p[7]!==h?(i=e=>{a?.(e),h()},p[6]=a,p[7]=h,p[8]=i):i=p[8],p[9]===Symbol.for("react.memo_cache_sentinel")?(d=(0,r.jsx)(l.A,{}),m=(0,r.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"}),p[9]=d,p[10]=m):(d=p[9],m=p[10]),p[11]!==n||p[12]!==o||p[13]!==i?(f=(0,r.jsxs)(u.$,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:o,onClick:i,...n,children:[d,m]}),p[11]=n,p[12]=o,p[13]=i,p[14]=f):f=p[14],f}function S(e){let t,a,n,o,i=(0,s.c)(9);i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]);let{toggleSidebar:l}=b();return i[3]!==t?(n=(0,c.cn)("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n||i[7]!==l?(o=(0,r.jsx)("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:l,title:"Toggle Sidebar",className:n,...a}),i[5]=a,i[6]=n,i[7]=l,i[8]=o):o=i[8],o}function C(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,c.cn)("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("main",{"data-slot":"sidebar-inset",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function k(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,c.cn)("bg-background h-8 w-full shadow-none",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)(m.p,{"data-slot":"sidebar-input","data-sidebar":"input",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function _(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,c.cn)("flex flex-col gap-2 p-2",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function z(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,c.cn)("flex flex-col gap-2 p-2",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function P(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,c.cn)("bg-sidebar-border mx-2 w-auto",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)(f.Separator,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function A(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,c.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function D(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,c.cn)("relative flex w-full min-w-0 flex-col p-2",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function I(e){let t,a,n,i,l,d=(0,s.c)(10);d[0]!==e?({className:t,asChild:n,...a}=e,d[0]=e,d[1]=t,d[2]=a,d[3]=n):(t=d[1],a=d[2],n=d[3]);let u=void 0!==n&&n?o.DX:"div";
1return d[4]!==t?(i=(0,c.cn)("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),d[4]=t,d[5]=i):i=d[5],d[6]!==u||d[7]!==a||d[8]!==i?(l=(0,r.jsx)(u,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:i,...a}),d[6]=u,d[7]=a,d[8]=i,d[9]=l):l=d[9],l}function F(e){let t,a,n,i,l,d=(0,s.c)(10);d[0]!==e?({className:t,asChild:n,...a}=e,d[0]=e,d[1]=t,d[2]=a,d[3]=n):(t=d[1],a=d[2],n=d[3]);let u=void 0!==n&&n?o.DX:"button";return d[4]!==t?(i=(0,c.cn)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",t),d[4]=t,d[5]=i):i=d[5],d[6]!==u||d[7]!==a||d[8]!==i?(l=(0,r.jsx)(u,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:i,...a}),d[6]=u,d[7]=a,d[8]=i,d[9]=l):l=d[9],l}function T(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,c.cn)("w-full text-sm",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function E(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,c.cn)("flex w-full min-w-0 flex-col gap-1",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function L(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,c.cn)("group/menu-item relative",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}let R=(0,i.F)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function B(e){let t,a,n,i,l,d,u,m,f,p,h,x,v=(0,s.c)(28);v[0]!==e?({asChild:n,isActive:i,variant:l,size:d,tooltip:u,className:t,...a}=e,v[0]=e,v[1]=t,v[2]=a,v[3]=n,v[4]=i,v[5]=l,v[6]=d,v[7]=u):(t=v[1],a=v[2],n=v[3],i=v[4],l=v[5],d=v[6],u=v[7]);let w=void 0!==i&&i,y=void 0===l?"default":l,j=void 0===d?"default":d,N=void 0!==n&&n?o.DX:"button",{isMobile:S,state:C}=b();v[8]!==t||v[9]!==j||v[10]!==y?(m=(0,c.cn)(R({variant:y,size:j}),t),v[8]=t,v[9]=j,v[10]=y,v[11]=m):m=v[11],v[12]!==N||v[13]!==w||v[14]!==a||v[15]!==j||v[16]!==m?(f=(0,r.jsx)(N,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":j,"data-active":w,className:m,...a}),v[12]=N,v[13]=w,v[14]=a,v[15]=j,v[16]=m,v[17]=f):f=v[17];let k=f;if(!u)return k;if("string"==typeof u){let e;v[18]!==u?(e={children:u},v[18]=u,v[19]=e):e=v[19],u=e}v[20]!==k?(p=(0,r.jsx)(g.TooltipTrigger,{asChild:!0,children:k}),v[20]=k,v[21]=p):p=v[21];let _="collapsed"!==C||S;return v[22]!==_||v[23]!==u?(h=(0,r.jsx)(g.TooltipContent,{side:"right",align:"center",hidden:_,...u}
1),v[22]=_,v[23]=u,v[24]=h):h=v[24],v[25]!==p||v[26]!==h?(x=(0,r.jsxs)(g.Tooltip,{children:[p,h]}),v[25]=p,v[26]=h,v[27]=x):x=v[27],x}function M(e){let t,a,n,i,l,d,u=(0,s.c)(12);u[0]!==e?({className:t,asChild:n,showOnHover:i,...a}=e,u[0]=e,u[1]=t,u[2]=a,u[3]=n,u[4]=i):(t=u[1],a=u[2],n=u[3],i=u[4]);let m=void 0!==i&&i,f=void 0!==n&&n?o.DX:"button",p=m&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0";return u[5]!==t||u[6]!==p?(l=(0,c.cn)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",p,t),u[5]=t,u[6]=p,u[7]=l):l=u[7],u[8]!==f||u[9]!==a||u[10]!==l?(d=(0,r.jsx)(f,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:l,...a}),u[8]=f,u[9]=a,u[10]=l,u[11]=d):d=u[11],d}function O(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,c.cn)("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function U(e){let t,a,n,o,i,l,d,u,m=(0,s.c)(14);m[0]!==e?({className:t,showIcon:n,...a}=e,m[0]=e,m[1]=t,m[2]=a,m[3]=n):(t=m[1],a=m[2],n=m[3]);let f=void 0!==n&&n,p=`${Math.floor(40*Math.random())+50}%`;return m[4]!==t?(o=(0,c.cn)("flex h-8 items-center gap-2 rounded-md px-2",t),m[4]=t,m[5]=o):o=m[5],m[6]!==f?(i=f&&(0,r.jsx)(h.E,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),m[6]=f,m[7]=i):i=m[7],m[8]===Symbol.for("react.memo_cache_sentinel")?(l={"--skeleton-width":p},m[8]=l):l=m[8],m[9]===Symbol.for("react.memo_cache_sentinel")?(d=(0,r.jsx)(h.E,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:l}),m[9]=d):d=m[9],m[10]!==a||m[11]!==o||m[12]!==i?(u=(0,r.jsxs)("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:o,...a,children:[i,d]}),m[10]=a,m[11]=o,m[12]=i,m[13]=u):u=m[13],u}function $(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,c.cn)("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function q(e){let t,a,n,o,i=(0,s.c)(8);return i[0]!==e?({className:t,...a}=e,i[0]=e,i[1]=t,i[2]=a):(t=i[1],a=i[2]),i[3]!==t?(n=(0,c.cn)("group/menu-sub-item relative",t),i[3]=t,i[4]=n):n=i[4],i[5]!==a||i[6]!==n?(o=(0,r.jsx)("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:n,...a}),i[5]=a,i[6]=n,i[7]=o):o=i[7],o}function J(e){let t,a,n,i,l,d,u,m=(0,s.c)(16);m[0]!==e?({asChild:n,size:i,isActive:l,className:t,...a}=e,m[0]=e,m[1]=t,m[2]=a,m[3]=n,m[4]=i,m[5]=l):(t=m[1],a=m[2],n=m[3],i=m[4],l=m[5]);let f=void 0===i?"md":i,p=void 0!==l&&l,h=void 0!==n&&n?o.DX:"a",g="sm"===f&&"text-xs",x="md"===f&&"text-sm";return m[6]!==t||m[7]!==g||m[8]!==x?(d=(0,c.cn)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focu
1s-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",g,x,"group-data-[collapsible=icon]:hidden",t),m[6]=t,m[7]=g,m[8]=x,m[9]=d):d=m[9],m[10]!==h||m[11]!==p||m[12]!==a||m[13]!==f||m[14]!==d?(u=(0,r.jsx)(h,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":f,"data-active":p,className:d,...a}),m[10]=h,m[11]=p,m[12]=a,m[13]=f,m[14]=d,m[15]=u):u=m[15],u}},9491:(e,t,a)=>{a.r(t),a.d(t,{ChangePasswordForm:()=>w,ForgotPasswordForm:()=>h,MIN_PASSWORD_LENGTH:()=>u,ResetPasswordForm:()=>x,SignUpForm:()=>p,isPasswordAcceptable:()=>m});var r=a(4568),s=a(9680),n=a(7620),o=a(9195),i=a(3325),l=a(9771),d=a(8221),c=a(9177);let u=8;function m(e,t=u){return e.length>=t&&/[a-z]/.test(e)&&/[A-Z]/.test(e)&&/[0-9]/.test(e)}let f=e=>`Password must be at least ${e} characters and include a lower-case letter, an upper-case letter and a digit`;function p(e){let t,a,c,p,h,g,x,b,v,w,y,j,N,S,C,k,_,z,P,A,D=(0,s.c)(59),{labels:I,minPasswordLength:F,onSuccess:T,className:E}=e;D[0]!==I?(t=void 0===I?{}:I,D[0]=I,D[1]=t):t=D[1];let L=t,R=void 0===F?u:F,[B,M]=(0,n.useState)(""),[O,U]=(0,n.useState)(""),[$,q]=(0,n.use
1State)(""),[J,G]=(0,n.useState)(null),[V,Z]=(0,n.useState)(null),[H,K]=(0,n.useState)(!1);D[2]!==R?(a=f(R),D[2]=R,D[3]=a):a=D[3],D[4]!==L||D[5]!==a?(c={email:"Email",password:"Password",confirmPassword:"Confirm password",submit:"Create account",submitting:"Creating accountâ¦",mismatch:"Passwords do not match",weak:a,checkEmail:"Check your email to confirm your account.",...L},D[4]=L,D[5]=a,D[6]=c):c=D[6];let W=c;D[7]!==W.checkEmail||D[8]!==W.mismatch||D[9]!==W.weak||D[10]!==$||D[11]!==B||D[12]!==R||D[13]!==T||D[14]!==O?(p=async e=>{if(e.preventDefault(),G(null),Z(null),O!==$)return void G(W.mismatch);if(!m(O,R))return void G(W.weak);K(!0);let{data:t,error:a}=await (0,d.getSupabaseBrowserClient)().auth.signUp({email:B,password:O});(K(!1),a)?G(a.message):t.session?T?.():Z(W.checkEmail)},D[7]=W.checkEmail,D[8]=W.mismatch,D[9]=W.weak,D[10]=$,D[11]=B,D[12]=R,D[13]=T,D[14]=O,D[15]=p):p=D[15];let X=p,Y=E??"space-y-4 text-left";D[16]!==W.email?(h=(0,r.jsx)(l.J,{htmlFor:"signup-email",children:W.email}),D[16]=W.email,D[17]=h):h=D[17],D[18]===Symbol.for("react.memo_cache_sentinel")?(g=e=>M(e.target.value),D[18]=g):g=D[18],D[19]!==H||D[20]!==B?(x=(0,r.jsx)(i.p,{id:"signup-email",type:"email",autoComplete:"email",required:!0,value:B,onChange:g,disabled:H}),D[19]=H,D[20]=B,D[21]=x):x=D[21],D[22]!==x||D[23]!==h?(b=(0,r.jsxs)("div",{className:"space-y-2",children:[h,x]}),D[22]=x,D[23]=h,D[24]=b):b=D[24],D[25]!==W.password?(v=(0,r.jsx)(l.J,{htmlFor:"signup-password",children:W.password}),D[25]=W.password,D[26]=v):v=D[26],D[27]===Symbol.for("react.memo_cache_sentinel")?(w=e=>U(e.target.value),D[27]=w):w=D[27],D[28]!==H||D[29]!==O?(y=(0,r.jsx)(i.p,{id:"signup-password",type:"password",autoComplete:"new-password",required:!0,value:O,onChange:w,disabled:H}),D[28]=H,D[29]=O,D[30]=y):y=D[30],D[31]!==v||D[32]!==y?(j=(0,r.jsxs)("div",{className:"space-y-2",children:[v,y]}),D[31]=v,D[32]=y,D[33]=j):j=D[33],D[34]!==W.confirmPassword?(N=(0,r.jsx)(l.J,{htmlFor:"signup-confirm",children:W.confirmPassword}),D[34]=W.confirmPassword,D[35]=N):N=D[35],D[36]===Symbol.for("react.memo_cache_sentinel")?(S=e=>q(e.target.value),D[36]=S):S=D[36],D[37]!==H||D[38]!==$?(C=(0,r.jsx)(i.p,{id:"signup-confirm",type:"password",autoComplete:"new-password",required:!0,value:$,onChange:S,disabled:H}),D[37]=H,D[38]=$,D[39]=C):C=D[39],D[40]!==N||D[41]!==C?(k=(0,r.jsxs)("div",{className:"space-y-2",children:[N,C]}),D[40]=N,D[41]=C,D[42]=k):k=D[42],D[43]!==J?(_=J&&(0,r.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:J}),D[43]=J,D[44]=_):_=D[44],D[45]!==V?(z=V&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:V}),D[45]=V,D[46]=z):z=D[46];let Q=H?W.submitting:W.submit;return D[47]!==H||D[48]!==Q?(P=(0,r.jsx)(o.$,{type:"submit",size:"lg",className:"w-full",disabled:H,children:Q}),D[47]=H,D[48]=Q,D[49]=P):P=D[49],D[50]!==X||D[51]!==b||D[52]!==j||D[53]!==k||D[54]!==_||D[55]!==z||D[56]!==P||D[57]!==Y?(A=(0,r.jsxs)("form",{onSubmit:X,className:Y,children:[b,j,k,_,z,P]}),D[50]=X,D[51]=b,D[52]=j,D[53]=k,D[54]=_,D[55]=z,D[56]=P,D[57]=Y,D[58]=A):A=D[58],A}function h(e){let t,a,c,u,m,f,p,h,g,x,b=(0,s.c)(30),{labels:v,resetPath:w,className:y}=e;b[0]!==v?(t=void 0===v?{}:v,b[0]=v,b[1]=t):t=b[1];let j=t,N=void 0===w?"/reset-password":w,[S,C]=(0,n.useState)(""),[k,_]=(0,n.use
1State)(null),[z,P]=(0,n.useState)(!1),[A,D]=(0,n.useState)(!1);b[2]!==j?(a={email:"Email",submit:"Send reset link",submitting:"Sendingâ¦",sent:"If an account exists for that email, a password reset link has been sent.",...j},b[2]=j,b[3]=a):a=b[3];let I=a;b[4]!==S||b[5]!==N?(c=async e=>{e.preventDefault(),_(null),D(!0);let t=window.location.origin,a=`${t}/auth/callback?next=${encodeURIComponent(N)}`,{error:r}=await (0,d.getSupabaseBrowserClient)().auth.resetPasswordForEmail(S,{redirectTo:a});(D(!1),r)?_(r.message):P(!0)},b[4]=S,b[5]=N,b[6]=c):c=b[6];let F=c;if(z){let e,t=y??"text-sm text-muted-foreground text-center";return b[7]!==I.sent||b[8]!==t?(e=(0,r.jsx)("p",{className:t,children:I.sent}),b[7]=I.sent,b[8]=t,b[9]=e):e=b[9],e}let T=y??"space-y-4 text-left";b[10]!==I.email?(u=(0,r.jsx)(l.J,{htmlFor:"forgot-email",children:I.email}),b[10]=I.email,b[11]=u):u=b[11],b[12]===Symbol.for("react.memo_cache_sentinel")?(m=e=>C(e.target.value),b[12]=m):m=b[12],b[13]!==A||b[14]!==S?(f=(0,r.jsx)(i.p,{id:"forgot-email",type:"email",autoComplete:"email",required:!0,value:S,onChange:m,disabled:A}),b[13]=A,b[14]=S,b[15]=f):f=b[15],b[16]!==u||b[17]!==f?(p=(0,r.jsxs)("div",{className:"space-y-2",children:[u,f]}),b[16]=u,b[17]=f,b[18]=p):p=b[18],b[19]!==k?(h=k&&(0,r.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:k}),b[19]=k,b[20]=h):h=b[20];let E=A?I.submitting:I.submit;return b[21]!==A||b[22]!==E?(g=(0,r.jsx)(o.$,{type:"submit",size:"lg",className:"w-full",disabled:A,children:E}),b[21]=A,b[22]=E,b[23]=g):g=b[23],b[24]!==F||b[25]!==p||b[26]!==h||b[27]!==g||b[28]!==T?(x=(0,r.jsxs)("form",{onSubmit:F,className:T,children:[p,h,g]}),b[24]=F,b[25]=p,b[26]=h,b[27]=g,b[28]=T,b[29]=x):x=b[29],x}async function g(e,t){let a=(0,d.getSupabaseBrowserClient)(),r=t??null;if(!r){let{data:e,error:t}=await a.auth.mfa.listFactors();if(t)return t.message;r=(e?.all??[]).find(e=>"totp"===e.factor_type&&"verified"===e.status)?.id??null}if(!r)return"no verified factor";let{data:s,error:n}=await a.auth.mfa.challenge({factorId:r});if(n||!s)return n?.message??"challenge failed";let{error:o}=await a.auth.mfa.verify({factorId:r,challengeId:s.id,code:e});return o?o.message:null}function x(e){let t,a,p,h,x,v,w,y,j,N,S,C,k,_,z,P,A,D,I,F,T,E=(0,s.c)(84),{labels:L,minPasswordLength:R,redeemRecoveryCode:B,onRecovered:M,onSuccess:O,className:U}=e;E[0]!==L?(t=void 0===L?{}:L,E[0]=L,E[1]=t):t=E[1];let $=t,q=void 0===R?u:R,[J,G]=(0,n.useState)(""),[V,Z]=(0,n.useState)(""),[H,K]=(0,n.useState)(""),[W,X]=(0,n.useState)(null),[Y,Q]=(0,n.useState)(null),[ee,et]=(0,n.useState)(null),[ea,er]=(0,n.useState)(!1),[es,en]=(0,n.useState)(!1),[eo,ei]=(0,n.useState)(""),[el,ed]=(0,n.useState)(!1);E[2]!==q?(a=f(q),E[2]=q,E[3]=a):a=E[3],E[4]!==$||E[5]!==a?(p={password:"New password",confirmPassword:"Confirm new password",submit:"Update password",submitting:"Updatingâ¦",mismatch:"Passwords do not match",weak:a,noSession:"This reset link is invalid or has expired. Please request a new one.",success:"Your password has been updated.",twoFactorCode:"6-digit code",twoFactorIntro:"Enter the 6-digit code from your authenticator app.",invalidCode:"That code is not valid. Check your authenticator and try again.",useRecovery:"Use a recovery code",recoveryIntro:"Enter one of your recovery codes. This turns two-factor authentication OFF and lets you set your new password; you can set it up again afterwards.",recoveryCode:"Recovery code",recoveryInvalid:"That recovery code is not valid or has already been used.",backToCode:"Back to authenticator code",...$},E[4]=$,E[5]=a,E[6]=p):p=E[6];let ec=p;E[7]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{let e=(0,d.getSupabaseBrowserClient)(),t=async e=>{et(e),e&&er(await (0,c.isMfaChallengePending)())};e.auth.getSession().then(e=>{let{data:a}=e;t(!!a.session)});let{data:a}=e.auth.onAuthStateChange((e,a)=>{a&&t(!0)}),{subscription:r}=a;return()=>r.unsubscribe()},x=[],E[7]=h,E[8]=x):(h=E[7],x=E[8]),(0,n.useEffect)(h,x),E[9]!==ec.invalidCode||E[10]!==ec.mismatch||E[11]!==ec.recoveryInvalid||E[12]!==ec.success||E[13]!==ec.weak||E[14]!==H||E[15]!==V||E[16]!==q||E[17]!==ea||E[18]!==M||E[19]!==O||E[20]!==J||E[21]!==eo||E[22]!==es||E[23]!==B?(v=async e=>{if(e.preventDefault(),X(null),Q(null),J!==V)return void X(ec.mismatch);if(!m(J,q))return void X(ec.weak);if(ea&&es&&!eo.trim())return void X(ec.recoveryInvalid);if(ea&&!es&&!/^\d{6}$/.test(H))return void X(ec.invalidCode);ed(!0);let t=(0,d.getSupabaseBrowserClient)();if(ea&&es&&B){try{await B(eo.trim()),await t.auth.refreshSession()}catch{ed(!1),ei(""),X(ec.recoveryInvalid);return}er(!1),en(!1),ei(""),M?.()}else if(ea&&await g(H)){ed(!1),K(""),X(ec.invalidCode);return}let{error:a}=await t.auth.updateUser({password:J});if(a){ed(!1),X(a.message);return}await t.auth.signOut({scope:"others"}).catch(b),ed(!1),Q(ec.success),O?.()},E[9]=ec.invalidCode,E[10]=ec.mismatch,E[11]=ec.recoveryInvalid,E[12]=ec.success,E[13]=ec.weak,E[14]=H,E[15]=V,E[16]=q,E[
117]=ea,E[18]=M,E[19]=O,E[20]=J,E[21]=eo,E[22]=es,E[23]=B,E[24]=v):v=E[24];let eu=v;if(!1===ee){let e,t=U??"text-sm text-destructive text-center";return E[25]!==ec.noSession||E[26]!==t?(e=(0,r.jsx)("p",{className:t,role:"alert",children:ec.noSession}),E[25]=ec.noSession,E[26]=t,E[27]=e):e=E[27],e}let em=U??"space-y-4 text-left";E[28]!==ec.password?(w=(0,r.jsx)(l.J,{htmlFor:"reset-password",children:ec.password}),E[28]=ec.password,E[29]=w):w=E[29],E[30]===Symbol.for("react.memo_cache_sentinel")?(y=e=>G(e.target.value),E[30]=y):y=E[30],E[31]!==el||E[32]!==J?(j=(0,r.jsx)(i.p,{id:"reset-password",type:"password",autoComplete:"new-password",required:!0,value:J,onChange:y,disabled:el}),E[31]=el,E[32]=J,E[33]=j):j=E[33],E[34]!==w||E[35]!==j?(N=(0,r.jsxs)("div",{className:"space-y-2",children:[w,j]}),E[34]=w,E[35]=j,E[36]=N):N=E[36],E[37]!==ec.confirmPassword?(S=(0,r.jsx)(l.J,{htmlFor:"reset-confirm",children:ec.confirmPassword}),E[37]=ec.confirmPassword,E[38]=S):S=E[38],E[39]===Symbol.for("react.memo_cache_sentinel")?(C=e=>Z(e.target.value),E[39]=C):C=E[39],E[40]!==el||E[41]!==V?(k=(0,r.jsx)(i.p,{id:"reset-confirm",type:"password",autoComplete:"new-password",required:!0,value:V,onChange:C,disabled:el}),E[40]=el,E[41]=V,E[42]=k):k=E[42],E[43]!==S||E[44]!==k?(_=(0,r.jsxs)("div",{className:"space-y-2",children:[S,k]}),E[43]=S,E[44]=k,E[45]=_):_=E[45],E[46]!==ec.twoFactorCode||E[47]!==ec.twoFactorIntro||E[48]!==el||E[49]!==H||E[50]!==ea||E[51]!==es?(z=ea&&!es&&(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.J,{htmlFor:"reset-mfa-code",children:ec.twoFactorCode}),(0,r.jsx)(c.TotpCodeInput,{id:"reset-mfa-code",value:H,onChange:K,disabled:el}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:ec.twoFactorIntro})]}),E[46]=ec.twoFactorCode,E[47]=ec.twoFactorIntro,E[48]=el,E[49]=H,E[50]=ea,E[51]=es,E[52]=z):z=E[52],E[53]!==ec.recoveryCode||E[54]!==ec.recoveryIntro||E[55]!==el||E[56]!==ea||E[57]!==eo||E[58]!==es?(P=ea&&es&&(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.J,{htmlFor:"reset-recovery",children:ec.recoveryCode}),(0,r.jsx)(i.p,{id:"reset-recovery",autoComplete:"off",required:!0,value:eo,onChange:e=>ei(e.target.value),disabled:el}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:ec.recoveryIntro})]}),E[53]=ec.recoveryCode,E[54]=ec.recoveryIntro,E[55]=el,E[56]=ea,E[57]=eo,E[58]=es,E[59]=P):P=E[59],E[60]!==W?(A=W&&(0,r.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:W}),E[60]=W,E[61]=A):A=E[61],E[62]!==Y?(D=Y&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:Y}),E[62]=Y,E[63]=D):D=E[63];let ef=el?ec.submitting:ec.submit;return E[64]!==el||E[65]!==ef?(I=(0,r.jsx)(o.$,{type:"submit",size:"lg",className:"w-full",disabled:el,children:ef}),E[64]=el,E[65]=ef,E[66]=I):I=E[66],E[67]!==ec.backToCode||E[68]!==ec.useRecovery||E[69]!==ea||E[70]!==es||E[71]!==B?(F=ea&&B&&(0,r.jsx)("button",{type:"button",onClick:()=>{en(!es),X(null)},className:"block w-full text-sm text-muted-foreground hover:text-foreground",children:es?ec.backToCode:ec.useRecovery}),E[67]=ec.backToCode,E[68]=ec.useRecovery,E[69]=ea,E[70]=es,E[71]=B,E[72]=F):F=E[72],E[73]!==eu||E[74]!==N||E[75]!==_||E[76]!==z||E[77]!==P||E[78]!==A||E[79]!==D||E[80]!==I||E[81]!==F||E[82]!==em?(T=(0,r.jsxs)("form",{onSubmit:eu,className:em,children:[N,_,z,P,A,D,I,F]}),E[73]=eu,E[74]=N,E[75]=_,E[76]=z,E[77]=P,E[78]=A,E[79]=D,E[80]=I,E[81]=F,E[82]=em,E[83]=T):T=E[83],T}function b(){}async function v(e){e&&await (0,d.getSupabaseBrowserClient)().auth.setSession({access_token:e.access_token,refresh_token:e.refresh_token}).catch(()=>void 0)}function w(e){let t,a,p,h,x,b,w,N,S,C,k,_,z,P,A,D,I,F,T,E,L,R,B,M,O,U=(0,s.c)(96),{labels:$,minPasswordLength:q,onSuccess:J,className:G}=e;U[0]!==$?(t=void 0===$?{}:$,U[0]=$,U[1]=t):t=U[1];let V=t,Z=void 0===q?u:q,[H,K]=(0,n.useState)(""),[W,X]=(0,n.useState)(""),[Y,Q]=(0,n.useState)(""),[ee,et]=(0,n.useState)(""),[ea,er]=(0,n.useState)(null),[es,en]=(0,n.useState)(null),[eo,ei]=(0,n.useState)(!1),[el,ed]=(0,n.useState)(null),[ec,eu]=(0,n.use
1State)(null),[em,ef]=(0,n.useState)(!1),{state:ep}=(0,c.useMfaState)(),eh="enrolled"===ep.status?ep.factors[0]?.id??null:null;U[2]!==Z?(a=f(Z),U[2]=Z,U[3]=a):a=U[3],U[4]!==V||U[5]!==a?(p={currentPassword:"Current password",password:"New password",confirmPassword:"Confirm new password",submit:"Change password",submitting:"Changingâ¦",mismatch:"Passwords do not match",weak:a,wrongCurrent:"That is not your current password",sameAsCurrent:"The new password must be different from your current one",success:"Your password has been changed. We emailed you a confirmation and signed out your other devices.",noPasswordIdentity:"This account signs in with a social provider and has no password yet. We can email you a link to set one.",sendSetPasswordLink:"Email me a set-password link",setPasswordLinkSent:"Check your email for the link to set a password.",twoFactorCode:"6-digit code",twoFactorIntro:"Enter the 6-digit code from your authenticator app.",invalidCode:"That code is not valid. Check your authenticator and try again.",...V},U[4]=V,U[5]=a,U[6]=p):p=U[6];let eg=p;U[7]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{(0,d.getSupabaseBrowserClient)().auth.getUser().then(e=>{let{data:t}=e;ed(t.user?.email??null),eu((t.user?.identities??[]).some(j))}).catch(()=>eu(null))},x=[],U[7]=h,U[8]=x):(h=U[7],x=U[8]),(0,n.useEffect)(h,x),U[9]!==el?(b=async()=>{if(!el)return;er(null),ei(!0);let e=window.location.origin,{error:t}=await (0,d.getSupabaseBrowserClient)().auth.resetPasswordForEmail(el,{redirectTo:`${e}/auth/callback?next=${encodeURIComponent("/reset-password")}`});(ei(!1),t)?er(t.message):ef(!0)},U[9]=el,U[10]=b):b=U[10];let ex=b;U[11]!==eg.invalidCode||U[12]!==eg.mismatch||U[13]!==eg.sameAsCurrent||U[14]!==eg.success||U[15]!==eg.weak||U[16]!==eg.wrongCurrent||U[17]!==ee||U[18]!==Y||U[19]!==H||U[20]!==el||U[21]!==eh||U[22]!==Z||U[23]!==J||U[24]!==W?(w=async e=>{if(e.preventDefault(),er(null),en(null),W!==Y)return void er(eg.mismatch);if(!m(W,Z))return void er(eg.weak);if(W===H)return void er(eg.sameAsCurrent);if(!el)return void er(eg.wrongCurrent);if(eh&&!/^\d{6}$/.test(ee))return void er(eg.invalidCode);ei(!0);let t=(0,d.getSupabaseBrowserClient)(),{data:a}=await t.auth.getSession(),r=a.session,{error:s}=await t.auth.signInWithPassword({email:el,password:H});if(s){ei(!1),er("invalid_credentials"===s.code||400===s.status?eg.wrongCurrent:s.message);return}if(eh&&await g(ee,eh)){await v(r),ei(!1),et(""),er(eg.invalidCode);return}let{error:n}=await t.auth.updateUser({password:W});if(n){ei(!1),er(n.message);return}await t.auth.signOut({scope:"others"}).catch(y),ei(!1),K(""),X(""),Q(""),et(""),en(eg.success),J?.()},U[11]=eg.invalidCode,U[12]=eg.mismatch,U[13]=eg.sameAsCurrent,U[14]=eg.success,U[15]=eg.weak,U[16]=eg.wrongCurrent,U[17]=ee,U[18]=Y,U[19]=H,U[20]=el,U[21]=eh,U[22]=Z,U[23]=J,U[24]=W,U[25]=w):w=U[25];let eb=w;if(!1===ec){let e,t,a,s,n=G??"space-y-4 text-left";return U[26]!==eg.noPasswordIdentity?(e=(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:eg.noPasswordIdentity}),U[26]=eg.noPasswordIdentity,U[27]=e):e=U[27],U[28]!==ea?(t=ea&&(0,r.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:ea}),U[28]=ea,U[29]=t):t=U[29],U[30]!==eg.sendSetPasswordLink||U[31]!==eg.setPasswordLinkSent||U[32]!==eg.submitting||U[33]!==eo||U[34]!==el||U[35]!==ex||U[36]!==em?(a=em?(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:eg.setPasswordLinkSent}):(0,r.jsx)(o.$,{type:"button",onClick:ex,disabled:eo||!el,children:eo?eg.submitting:eg.sendSetPasswordLink}),U[30]=eg.sendSetPasswordLink,U[31]=eg.setPasswordLinkSent,U[32]=eg.submitting,U[33]=eo,U[34]=el,U[35]=ex,U[36]=em,U[37]=a):a=U[37],U[38]!==n||U[39]!==e||U[40]!==t||U[41]!==a?(s=(0,r.jsxs)("div",{className:n,children:[e,t,a]}),U[38]=n,U[39]=e,U[40]=t,U[41]=a,U[42]=s):s=U[42],s}let ev=G??"space-y-4 text-left",ew=el??"";U[43]!==ew?(N=(0,r.jsx)("input",{type:"hidden",autoComplete:"username",value:ew,readOnly:!0}),U[43]=ew,U[44]=N):N=U[44],U[45]!==eg.currentPassword?(S=(0,r.jsx)(l.J,{htmlFor:"change-current",children:eg.currentPassword}),U[45]=eg.currentPassword,U[46]=S):S=U[46],U[47]===Symbol.for("react.memo_cache_sentinel")?(C=e=>K(e.target.value),U[47]=C):C=U[47],U[48]!==eo||U[49]!==H?(k=(0,r.jsx)(i.p,{id:"change-current",type:"password",autoComplete:"current-password",required:!0,value:H,onChange:C,disabled:eo}),U[48]=eo,U[49]=H,U[50]=k):k=U[50],U[51]!==S||U[52]!==k?(_=(0,r.jsxs)("div",{className:"space-y-2",children:[S,k]}
1),U[51]=S,U[52]=k,U[53]=_):_=U[53],U[54]!==eg.password?(z=(0,r.jsx)(l.J,{htmlFor:"change-password",children:eg.password}),U[54]=eg.password,U[55]=z):z=U[55],U[56]===Symbol.for("react.memo_cache_sentinel")?(P=e=>X(e.target.value),U[56]=P):P=U[56],U[57]!==eo||U[58]!==W?(A=(0,r.jsx)(i.p,{id:"change-password",type:"password",autoComplete:"new-password",required:!0,value:W,onChange:P,disabled:eo}),U[57]=eo,U[58]=W,U[59]=A):A=U[59],U[60]!==z||U[61]!==A?(D=(0,r.jsxs)("div",{className:"space-y-2",children:[z,A]}),U[60]=z,U[61]=A,U[62]=D):D=U[62],U[63]!==eg.confirmPassword?(I=(0,r.jsx)(l.J,{htmlFor:"change-confirm",children:eg.confirmPassword}),U[63]=eg.confirmPassword,U[64]=I):I=U[64],U[65]===Symbol.for("react.memo_cache_sentinel")?(F=e=>Q(e.target.value),U[65]=F):F=U[65],U[66]!==eo||U[67]!==Y?(T=(0,r.jsx)(i.p,{id:"change-confirm",type:"password",autoComplete:"new-password",required:!0,value:Y,onChange:F,disabled:eo}),U[66]=eo,U[67]=Y,U[68]=T):T=U[68],U[69]!==I||U[70]!==T?(E=(0,r.jsxs)("div",{className:"space-y-2",children:[I,T]}),U[69]=I,U[70]=T,U[71]=E):E=U[71],U[72]!==eg.twoFactorCode||U[73]!==eg.twoFactorIntro||U[74]!==eo||U[75]!==ee||U[76]!==eh?(L=eh&&(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.J,{htmlFor:"change-mfa-code",children:eg.twoFactorCode}),(0,r.jsx)(c.TotpCodeInput,{id:"change-mfa-code",value:ee,onChange:et,disabled:eo}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:eg.twoFactorIntro})]}),U[72]=eg.twoFactorCode,U[73]=eg.twoFactorIntro,U[74]=eo,U[75]=ee,U[76]=eh,U[77]=L):L=U[77],U[78]!==ea?(R=ea&&(0,r.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:ea}),U[78]=ea,U[79]=R):R=U[79],U[80]!==es?(B=es&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground",role:"status",children:es}),U[80]=es,U[81]=B):B=U[81];let ey=eo?eg.submitting:eg.submit;return U[82]!==eo||U[83]!==ey?(M=(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)(o.$,{type:"submit",disabled:eo,children:ey})}),U[82]=eo,U[83]=ey,U[84]=M):M=U[84],U[85]!==eb||U[86]!==ev||U[87]!==N||U[88]!==_||U[89]!==D||U[90]!==E||U[91]!==L||U[92]!==R||U[93]!==B||U[94]!==M?(O=(0,r.jsxs)("form",{onSubmit:eb,className:ev,children:[N,_,D,E,L,R,B,M]}),U[85]=eb,U[86]=ev,U[87]=N,U[88]=_,U[89]=D,U[90]=E,U[91]=L,U[92]=R,U[93]=B,U[94]=M,U[95]=O):O=U[95],O}function y(){}function j(e){return"email"===e.provider}},9699:(e,t,a)=>{a.r(t),a.d(t,{Select:()=>c,SelectContent:()=>g,SelectGroup:()=>u,SelectItem:()=>b,SelectLabel:()=>x,SelectScrollDownButton:()=>h,SelectScrollUpButton:()=>p,SelectSeparator:()=>v,SelectTrigger:()=>f,SelectValue:()=>m});var r=a(4568),s=a(7620),n=a(4767),o=a(6351),i=a(4710),l=a(9851),d=a(3464);let c=n.bL,u=n.YJ,m=n.WT,f=s.forwardRef(({className:e,children:t,...a},s)=>(0,r.jsxs)(n.l9,{ref:s,className:(0,d.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
1ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[t,(0,r.jsx)(n.In,{asChild:!0,children:(0,r.jsx)(o.A,{className:"h-4 w-4 opacity-50"})})]}));f.displayName=n.l9.displayName;let p=s.forwardRef(({className:e,...t},a)=>(0,r.jsx)(n.PP,{ref:a,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,r.jsx)(i.A,{className:"h-4 w-4"})}));p.displayName=n.PP.displayName;let h=s.forwardRef(({className:e,...t},a)=>(0,r.jsx)(n.wn,{ref:a,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,r.jsx)(o.A,{className:"h-4 w-4"})}));h.displayName=n.wn.displayName;let g=s.forwardRef(({className:e,children:t,position:a="popper",...s},o)=>(0,r.jsx)(n.ZL,{children:(0,r.jsxs)(n.UC,{ref:o,className:(0,d.cn)("relative z-[300] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...s,children:[(0,r.jsx)(p,{}),(0,r.jsx)(n.LM,{className:(0,d.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,r.jsx)(h,{})]})}));g.displayName=n.UC.displayName;let x=s.forwardRef(({className:e,...t},a)=>(0,r.jsx)(n.JU,{ref:a,className:(0,d.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));x.displayName=n.JU.displayName;let b=s.forwardRef(({className:e,children:t,...a},s)=>(0,r.jsxs)(n.q7,{ref:s,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(n.VF,{children:(0,r.jsx)(l.A,{className:"h-4 w-4"})})}),(0,r.jsx)(n.p4,{children:t})]}));b.displayName=n.q7.displayName;let v=s.forwardRef(({className:e,...t},a)=>(0,r.jsx)(n.wv,{ref:a,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",e),...t}));v.displayName=n.wv.displayName},9724:(e,t,a)=>{a.r(t),a.d(t,{Avatar:()=>i,AvatarFallback:()=>d,AvatarImage:()=>l});var r=a(4568),s=a(9680);a(7620);var n=a(6742),o=a(3464);function i(e){let t,a,i,l,d=(0,s.c)(8);return d[0]!==e?({className:t,...a}=e,d[0]=e,d[1]=t,d[2]=a):(t=d[1],a=d[2]),d[3]!==t?(i=(0,o.cn)("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),d[3]=t,d[4]=i):i=d[4],d[5]!==a||d[6]!==i?(l=(0,r.jsx)(n.bL,{"data-slot":"avatar",className:i,...a}),d[5]=a,d[6]=i,d[7]=l):l=d[7],l}function l(e){let t,a,i,l,d=(0,s.c)(8);return d[0]!==e?({className:t,...a}=e,d[0]=e,d[1]=t,d[2]=a):(t=d[1],a=d[2]),d[3]!==t?(i=(0,o.cn)("aspect-square size-full",t),d[3]=t,d[4]=i):i=d[4],d[5]!==a||d[6]!==i?(l=(0,r.jsx)(n._V,{"data-slot":"avatar-image",className:i,...a}),d[5]=a,d[6]=i,d[7]=l):l=d[7],l}function d(e){let t,a,i,l,d=(0,s.c)(8);return d[0]!==e?({className:t,...a}=e,d[0]=e,d[1]=t,d[2]=a):(t=d[1],a=d[2]),d[3]!==t?(i=(0,o.cn)("bg-muted flex size-full items-center justify-center rounded-full",t),d[3]=t,d[4]=i):i=d[4],d[5]!==a||d[6]!==i?(l=(0,r.jsx)(n.H4,{"data-slot":"avatar-fallback",className:i,...a}),d[5]=a,d[6]=i,d[7]=l):l=d[7],l}},9771:(e,t,a)=>{a.d(t,{J:()=>d});var r=a(4568),s=a(7620),n=a(2692),o=a(507),i=a(3464);let l=(0,o.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=s.forwardRef(({className:e,...t},a)=>(0,r.jsx)(n.Root,{ref:a,className:(0,i.cn)(l(),e),...t}));d.displayName=n.Root.displayName}}]);
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.