@deslop/auth 0.1.1235 → 0.1.1238

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-rs7KiAU0.js","assets/rolldown-runtime-WkwZ5CU-.js","assets/react-BUjtWCUj.js","assets/client-sCUiygGT.js","assets/effect-BhsQyU3F.js","assets/components-DfiHr7mH.js","assets/badge-BZyO-IMU.js","assets/(home)-DPkBdCAR.js","assets/people-DUtEEkN5.js"])))=>i.map(i=>d[i]);
2
- import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{o as t,r as n,s as r}from"./react-BUjtWCUj.js";import{$ as i,Z as a,_t as o,at as s,ct as c,dt as l,et as u,ft as d,gt as f,ht as p,it as m,lt as h,mt as g,n as ee,nt as _,ot as v,pt as te,rt as y,st as b,tt as x,ut as S}from"./client-sCUiygGT.js";var C=e(r(),1),w=C.use,T=C.useLayoutEffect,E=C.createContext(null);function D(e){return C.useContext(E)}function O(e){let t=D();return C.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function k(e){let t=D(),n=O(),r=C.useRef(null);return T(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var A=`Error preloading route! ☝️`;function j(e,t){if(e)return typeof e==`string`?e:e[t]}function M(e){return e?.scriptFormat??`module`}function N(e,t,n){let r=P(t),i=j(n,`script`)??r.crossOrigin;return{...M(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,fetchPriority:`low`,...i?{crossOrigin:i}:{}}}function P(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function F(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function ne(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function I(e,t,n,r){let a=i(e),o=[],s=[];for(let e of a)for(let t of Array.isArray(e.scripts)?e.scripts:[]){if(!t)continue;let{children:e,...i}=t;o.push({tag:`script`,attrs:{...i,...r,nonce:n},children:e})}if(t)for(let e of a)for(let r of t.routes[e.routeId]?.scripts??[])s.push({tag:`script`,attrs:{...r.attrs,nonce:n},children:r.children});return[o,s]}function L([e,t],n){return n?[...n.before,...e,...t,n.boundary]:[...e,...t]}var re=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=y:this.parentRoute||h();let r=n?y:t?.path;r&&r!==`/`&&(r=b(r));let i=t?.id||r,a=n?y:s((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:s(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=c(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>_({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},ie=class extends re{constructor(e){super(e)}};function ae(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{u(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var R=C.createContext(void 0),oe=C.createContext(void 0),z=t();function se(...e){let t=C.useRef(e),n=t.current;return e.forEach((e,t)=>{S(n[t],e,!1,!0)||(n[t]=e)}),t.current}function B(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(A)})}function ce(e,t){let n=typeof e==`string`&&te(e);if(n)return t.has(n)?e:null}function le(e,t,n,r){let i=v(e.pathname,r),a=v(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!S(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function ue(e,t,n){let r=D(),i=C.useRef(null),a=C.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,disabled:u,target:d,onClick:f,onBlur:p,onFocus:m,onMouseEnter:h,onMouseLeave:g,onTouchStart:ee}=e,[_,v,y]=se(e.search,e.params,o),b=C.useContext(R),x=(r.stores._linkScopes??={})[b]??=ae(r,b),[S,w,T]=C.useMemo(()=>{let t=ce(s,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,o,c=()=>{let e=x[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),o=ge(t,r,u),s=u||o&&!te(o)?le(e,t,y,r.basepath):void 0;a&&a[0]===o&&a[1]===s||(a=[o,s]),i=e}return a};return[n,c,y?.includeHash&&(()=>{let e=c();return e[1]?o??=[e[0],!1]:e})]},[r,x,e.from,e.hash,e.href,s,_,v,e.state,e.mask,e.unsafeRelative,y,u]),[E,O]=C.useSyncExternalStore(x[1],w,T||w),k=O===void 0&&E,A=u||E===void 0,j=C.useRef(!1),M=e.reloadDocument||k||A?!1:c??r.options.defaultPreload,N=l??r.options.defaultPreloadDelay??0,P=C.useCallback(e=>{let t=e?.isIntersecting;t??M===`intent`?N?i.t??=setTimeout(()=>{i.t=void 0,B(r,S)},N):B(r,S):t===!1&&V(i)},[r,S,i,M,N]);C.useEffect(()=>{if(!M)return;M===`render`&&!j.current&&(j.current=!0,B(r,S));let e=!0,t;return M===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&P(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),V(i)}},[r,S,M,P,i]);let F=me(e,n);if(F.ref=t?a:i,k)return F.href=k,F;let ne=t=>{let n=d??t.currentTarget.getAttribute(`target`);A||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||n&&n!==`_self`||t.button!==0||(t.preventDefault(),V(i),r.navigate({...e,_fromLocation:S._fromLocation}))},I=()=>{M===`intent`&&B(r,S)},L=()=>{M===`intent`&&V(i)};return F.onClick=H(f,ne),F.onBlur=H(p,L),F.onFocus=H(m,P),F.onMouseEnter=H(h,P),F.onMouseLeave=H(g,L),F.onTouchStart=H(ee,I),he(F,e,O,E,A,n)}var de={},fe={className:`active`},pe=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function me(e,t){let n={};for(let r in e)pe.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function he(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,f=d(n?o:s,{})??(n?fe:de);Object.assign(e,f),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let p=f.style;(l||p)&&(e.style=l&&p?{...l,...p}:l||p);let m=f.className;return(c||m)&&(e.className=c?m?`${c} ${m}`:c:m),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var V=e=>{clearTimeout(e.t),e.t=void 0},H=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function ge(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!p(i,t.protocolAllowlist))return i}var U=C.memo(C.forwardRef((e,t)=>{let n=e._asChild||`a`,r=ue(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return C.createElement(n,r,i)}),_e);function _e(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!pe.has(r)||!S(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var ve=a();function ye(e,t){return e===t}function W(e,t=e=>e,n){let r=n?.compare??ye,i=(0,C.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,C.useCallback)(()=>e.get(),[e]);return(0,ve.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var be={};function xe(e,t){let n=C.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=o(n.current,i):i}}function G(e){let t=D(),n=C.useContext(e.from?oe:R),r=e.from??n,i=t.stores.getMatchStore(r),a=xe(e,t),o=W(i,e=>e?a(e):be);if(o!==be)return o;(e.shouldThrow??!0)&&h()}function K(e){return G({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Se(e){let{select:t,...n}=e;return G({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Ce(e){return G({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function we(e){return G({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Te(e){return G({...e,select:t=>e.select?e.select(t.context):t.context})}var Ee=class extends re{constructor(e){super(e),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>Te({...e,from:this.id}),this.useSearch=e=>we({...e,from:this.id}),this.useParams=e=>Ce({...e,from:this.id}),this.useLoaderDeps=e=>Se({...e,from:this.id}),this.useLoaderData=e=>K({...e,from:this.id}),this.useNavigate=()=>O({from:this.fullPath}),this.Link=C.forwardRef((e,t)=>(0,z.jsx)(U,{ref:t,from:this.fullPath,...e}))}};function De(e){return new Ee(e)}var Oe=class extends ie{constructor(e){super(e),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>Te({...e,from:this.id}),this.useSearch=e=>we({...e,from:this.id}),this.useParams=e=>Ce({...e,from:this.id}),this.useLoaderDeps=e=>Se({...e,from:this.id}),this.useLoaderData=e=>K({...e,from:this.id}),this.useNavigate=()=>O({from:this.fullPath}),this.Link=C.forwardRef((e,t)=>(0,z.jsx)(U,{ref:t,from:this.fullPath,...e}))}};function ke(e){return new Oe(e)}function q(e){return e=>{let t=De(e);return t.isRoot=!1,t}}function J(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(f(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r){if(w)w(a());else throw a()}return C.createElement(r,e)};return o.preload=a,o}var Y=class extends C.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?C.createElement(this.props.errorComponent??Ae,{error:e[0],reset:this.reset}):this.props.children}};function Ae({error:e}){let[t,n]=C.useState(!1);return(0,z.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,z.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,z.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,z.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,z.jsx)(`div`,{children:(0,z.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,z.jsx)(`code`,{children:e.message}):null})}):null]})}var je=()=>!0,Me=()=>!1;function Ne({children:e,fallback:t=null}){return(0,z.jsx)(C.Fragment,{children:Pe()?e:t})}function Pe(e=!0){return C.useSyncExternalStore(Fe,je,e?Me:je)}function Fe(){return()=>{}}function Ie(e){let t=D(),n=`not-found-${W(t.stores.location,e=>e.pathname)}-${W(t.stores.status)}`;return(0,z.jsx)(Y,{getResetKey:()=>n,onCatch:(t,n)=>{if(m(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(m(t))return e.fallback?.(t);throw t},children:e.children})}function Le(){return(0,z.jsx)(`p`,{children:`Not Found`})}function Re(e,t,n){return t.options.notFoundComponent?(0,z.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,z.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,z.jsx)(Le,{})}function X(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,z.jsx)(n,{}):null}var ze=(e,t)=>e[0]===t[0]&&e[1]===t[1],Be=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Ve=C.memo(function({routeId:e}){let t=D();return He(t,W(t.stores.getMatchStore(e)))});function He(e,t){let n=e.routesById[t.routeId],r=X(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=Be(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,z.jsx)(Ue,{match:t});s&&(l=(0,z.jsx)(Ne,{fallback:r,children:l})),o&&(l=(0,z.jsx)(Ie,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return C.createElement(o,e)},children:l})),i&&(l=(0,z.jsx)(Y,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(m(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,z.jsx)(C.Suspense,{fallback:r,children:l}));let u=n.isRoot&&n.options.shellComponent;return u?(0,z.jsx)(R.Provider,{value:t.routeId,children:(0,z.jsxs)(u,{children:[l,null]})}):(0,z.jsxs)(R.Provider,{value:t.routeId,children:[l,null]})}var Ue=C.memo(function({match:e}){let t=D(),n=e.routeId,r=t.routesById[n],i=C.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=C.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,z.jsx)(e,{},i):(0,z.jsx)(We,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Be(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return X(t,r)}if(e.status===`notFound`)return Re(t,r,e.error);if(e.status===`error`)throw e.error;return a}),We=C.memo(function(){let e=D(),t=C.useContext(R),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=W(a,e=>[!!e._notFound,e.error],{compare:ze}),i=W(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Re(e,e.routesById[t],r);if(!i)return null;let a=(0,z.jsx)(Ve,{routeId:i});return t===`__root__`?(0,z.jsx)(C.Suspense,{fallback:X(e),children:a}):a});function Ge(e,t){let n=e[1];e.length=0,n?.(t)}function Ke({t:e}){let t=D(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Ge(n,!1),n.push(i,a),e(t),C.startTransition(r)}),T(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(c(r.publicHref)!==c(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...x(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function qe(){let e=D(),t=e.routesById[y],n=X(e,t),r=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ke,{t:C.useState()[1]}),e.ssr?(0,z.jsx)(Je,{}):(0,z.jsx)(C.Suspense,{fallback:n,children:(0,z.jsx)(Je,{})})]});return e.options.InnerWrap?(0,z.jsx)(e.options.InnerWrap,{children:r}):r}function Je(){let e=D(),t=e._rendered,n=W(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;T(()=>{t[0]===n&&Ge(t,!0)},[t,n]);let a=i?(0,z.jsx)(Ve,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,z.jsx)(Y,{getResetKey:()=>r,onCatch:void 0,children:a})}function Ye(){let e=D();return C.useCallback(t=>{let{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a,...o}=t;return e.matchRoute(o,{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a})},[e,W(e.stores.location,e=>e.href),W(e.stores.resolvedLocation,e=>e?.href),W(e.stores.status)])}function Xe({router:e,children:t,...n}){g(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,z.jsx)(E.Provider,{value:e,children:t});return e.options.Wrap?(0,z.jsx)(e.options.Wrap,{children:r}):r}function Ze({router:e,...t}){return(0,z.jsx)(Xe,{router:e,...t,children:(0,z.jsx)(qe,{})})}function Z(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function Qe(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=C.useMemo(()=>n===void 0?void 0:{__html:n},[n]);switch(e.tag){case`title`:return(0,z.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,z.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,z.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,z.jsx)(`style`,{...t,dangerouslySetInnerHTML:a,nonce:r});case`script`:return(0,z.jsx)($e,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function $e({attrs:e,children:t,preventScriptHoist:n}){D();let r=Pe(),i=C.useMemo(()=>t===void 0?void 0:{__html:t},[t]),a=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(C.useEffect(()=>{if(!a){if(e?.src){let t=document.createElement(`a`);t.href=e.src;let n=t.href;for(let e of document.scripts)if(e.src===n)return;let r=document.createElement(`script`);return Z(r,e),document.head.appendChild(r),()=>r.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.scripts){if(e.hasAttribute(`src`))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,Z(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,a]),a&&typeof t==`string`)return(0,z.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:i});if(!r){if(e?.src)return(0,z.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,z.jsx)(`script`,{...e,dangerouslySetInnerHTML:i,suppressHydrationWarning:!0})}return null}function et(e,t,n,r){n=i(n);let a=n.map(e=>e.meta).filter(e=>e!==void 0),o=[],s={},c;for(let e=a.length-1;e>=0;e--){let n=a[e];for(let e=n.length-1;e>=0;e--){let r=n[e];if(r){if(r.title)c||={tag:`title`,children:r.title};else if(`script:ld+json`in r)try{let e=JSON.stringify(r[`script:ld+json`]);o.push({tag:`script`,attrs:{type:`application/ld+json`},children:l(e)})}catch{}else{let e=r.name??r.property;if(e){if(s[e])continue;s[e]=!0}o.push({tag:`meta`,attrs:{...r,nonce:t}})}}}}c&&o.push(c),t&&o.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),o.reverse();let u=n.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:t}})),d=e.ssr?.manifest,f=[];d&&(n.forEach(e=>{(d.routes[e.routeId]?.css)?.forEach(e=>{let n=ne(e);f.push({tag:`link`,attrs:{rel:`stylesheet`,...n,crossOrigin:j(r,`stylesheet`)??n.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),d.inlineStyle&&f.push({tag:`style`,attrs:{...d.inlineStyle.attrs,nonce:t},children:d.inlineStyle.children,inlineCss:!0}));let p=[];d&&n.forEach(e=>{d.routes[e.routeId]?.preloads?.forEach(e=>{p.push({tag:`link`,attrs:{...N(d,e,r),nonce:t}})})});let m=n.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`style`,attrs:{...n,nonce:t},children:e})),h=n.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`script`,attrs:{...n,nonce:t},children:e})),g=[];return F(g,o),g.push(...p),F(g,u),g.push(...f),F(g,m),F(g,h),g}var tt=e=>{let t=D(),n=t.options.ssr?.nonce,r=C.useCallback(r=>et(t,n,r,e),[e,n,t]);return W(t.stores.matches,r,{compare:S})};function nt(e){let t=tt(e.assetCrossOrigin),n=D().options.ssr?.nonce;return(0,z.jsx)(z.Fragment,{children:t.map(e=>(0,C.createElement)(Qe,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var rt={suppressHydrationWarning:!0},it=()=>{let e=D(),t=e.options.ssr?.nonce,n=n=>{let r=I(n,e.ssr?.manifest,t,rt);for(let e of r[1])if(typeof e.attrs?.src==`string`){let t=e;t.preventScriptHoist=!0}return r};return at(W(e.stores.matches,e=>L(n(e)),{compare:S}))};function at(e){return(0,z.jsx)(z.Fragment,{children:e.map((e,t)=>(0,C.createElement)(Qe,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var ot=n(),st=ke({shellComponent:e=>(0,z.jsxs)(`div`,{className:`bg-background text-foreground safe-area flex h-dvh w-dvw flex-col`,children:[(0,z.jsx)(nt,{}),(0,z.jsx)(it,{}),e.children]})}),ct=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),lt=function(e){return`/`+e},ut={},dt=function(e){return e.pathname.endsWith(`.css`)},ft=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Q=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=lt(t,n);let r=s(t),i=dt(r);return ft(ut,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:ct,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},pt=q(`/(home)`)({component:J(()=>Q(()=>import(`./route-rs7KiAU0.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`)}),mt=q(`/(home)/`)({component:J(()=>Q(()=>import(`./(home)-DPkBdCAR.js`),__vite__mapDeps([7,1,2,3,4,5])),`component`)}),ht=q(`/(home)/people`)({component:J(()=>Q(()=>import(`./people-DUtEEkN5.js`),__vite__mapDeps([8,1,2,3,4,5,6])),`component`)}),$=pt.update({id:`/(home)`,getParentRoute:()=>st}),gt=mt.update({id:`/`,path:`/`,getParentRoute:()=>$}),_t={homePeopleRoute:ht.update({id:`/people`,path:`/people`,getParentRoute:()=>$}),homeIndexRoute:gt},vt={homeRouteRoute:$._addFileChildren(_t)},yt=st._addFileChildren(vt)._addFileTypes(),bt=ee(yt);(0,ot.createRoot)(bt.root).render((0,z.jsx)(C.StrictMode,{children:(0,z.jsx)(Ze,{router:bt.router})}));export{k as i,We as n,U as r,Ye as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{n as t,o as n,s as r}from"./react-BUjtWCUj.js";import{J as i,c as a,d as o,m as s,s as c,u as l}from"./client-sCUiygGT.js";import{Ca as u,Ea as d,F as f,H as p,Hi as m,Ji as h,Oa as g,Yr as _,aa as v,ba as y,ia as b,ja as x,la as S,ma as C,zr as w}from"./effect-BhsQyU3F.js";import{$ as T,B as E,E as D,F as O,G as k,H as ee,I as A,J as j,K as te,L as ne,P as M,Q as N,R as P,U as re,V as ie,X as ae,Y as oe,Z as F,a as I,et as se,f as ce,ft as L,i as R,p as z,q as B,rt as V,st as H,t as U,tt as W,u as G,ut as K,z as le}from"./components-DfiHr7mH.js";import{i as ue}from"./index-D-TNR7SG.js";import{t as de}from"./badge-BZyO-IMU.js";var q=e(r(),1),J=n();function fe(e){let[t,n]=q.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=q.useRef(null),i=q.useRef(null),a=q.useRef(null),o=q.useRef(null),s=q.useRef(!0),c=q.useRef(null),l=k(),u=q.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,J.jsx)(ee.Provider,{value:u,children:(0,J.jsx)(E.Provider,{value:void 0,children:(0,J.jsx)(O,{...e})})})}var Y=500,pe=q.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{setAnchor:o,actionsRef:c,internalBackdropRef:l,backdropRef:u,positionerRef:d,allowMouseUpTriggerRef:f,initialCursorPointRef:p,rootId:m}=re(!1),{store:h}=ie(!1),g=h.useState(`open`),_=h.useState(`disabled`),v=q.useRef(null),y=q.useRef(null),b=T(),x=T(),S=q.useRef(!1),C=q.useRef(null);function w(e,t,n){let r=n.type.startsWith(`touch`);p.current={x:e,y:t},o({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:e,y:t})}}),S.current=!1,c.current?.setOpen(!0,j(B,n)),x.start(Y,()=>{S.current=!0})}function E(e){if(_)return;f.current=!0,oe(e),w(e.clientX,e.clientY,e.nativeEvent);let t=L(v.current);C.current?.abort();let n=new AbortController;C.current=n,t.addEventListener(`mouseup`,e=>{if(f.current=!1,!S.current)return;x.clear(),S.current=!1;let t=N(e);F(d.current,t)||m&&t&&M(t)===m||c.current?.setOpen(!1,j(te,e))},{once:!0,signal:n.signal})}function D(){b.clear(),y.current=null}function O(e){if(_||(f.current=!1,e.touches.length!==1)){D();return}e.stopPropagation();let t=e.touches[0],n={x:t.clientX,y:t.clientY};y.current=n,b.start(Y,()=>{w(n.x,n.y,e.nativeEvent)})}function k(e){if(e.touches.length!==1)D();else if(b.isStarted()&&y.current){let t=e.touches[0],n=Math.abs(t.clientX-y.current.x),r=Math.abs(t.clientY-y.current.y);(n>10||r>10)&&D()}}return q.useEffect(()=>()=>{C.current?.abort()},[]),q.useEffect(()=>{function e(e){if(_)return;let t=N(e);(F(v.current,t)||F(l.current,t)||F(u.current,t))&&e.preventDefault()}let t=L(v.current);return se(t,`contextmenu`,e)},[u,_,l]),s(`div`,e,{state:{open:g},ref:[v,t],props:[{onContextMenu:E,onTouchStart:O,onTouchMove:k,onTouchEnd:D,onTouchCancel:D,style:{WebkitTouchCallout:`none`}},a],stateAttributesMapping:ae})}),me=A,X=t();function he(e){let t=(0,X.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,J.jsx)(fe,{"data-slot":`context-menu`,...n}),t[2]=n,t[3]=r),r}function ge(e){let t=(0,X.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`select-none`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,J.jsx)(pe,{"data-slot":`context-menu-trigger`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function _e(e){let t=(0,X.c)(18),n,r,a,o,s,c;t[0]===e?(n=t[1],r=t[2],a=t[3],o=t[4],s=t[5],c=t[6]):({className:n,align:a,alignOffset:o,side:s,sideOffset:c,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=s,t[6]=c);let l=a===void 0?`start`:a,u=o===void 0?4:o,d=s===void 0?`right`:s,f=c===void 0?0:c,p;t[7]===n?p=t[8]:(p=i(`z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,n),t[7]=n,t[8]=p);let m;t[9]!==r||t[10]!==p?(m=(0,J.jsx)(P,{"data-slot":`context-menu-content`,className:p,...r}),t[9]=r,t[10]=p,t[11]=m):m=t[11];let h;return t[12]!==l||t[13]!==u||t[14]!==d||t[15]!==f||t[16]!==m?(h=(0,J.jsx)(ne,{children:(0,J.jsx)(me,{className:`isolate z-50 outline-none`,align:l,alignOffset:u,side:d,sideOffset:f,children:m})}),t[12]=l,t[13]=u,t[14]=d,t[15]=f,t[16]=m,t[17]=h):h=t[17],h}function ve(e){let t=(0,X.c)(12),n,r,a,o;t[0]===e?(n=t[1],r=t[2],a=t[3],o=t[4]):({className:n,inset:r,variant:o,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o);let s=o===void 0?`default`:o,c;t[5]===n?c=t[6]:(c=i(`group/context-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=c);let l;return t[7]!==r||t[8]!==a||t[9]!==c||t[10]!==s?(l=(0,J.jsx)(le,{"data-slot":`context-menu-item`,"data-inset":r,"data-variant":s,className:c,...a}),t[7]=r,t[8]=a,t[9]=c,t[10]=s,t[11]=l):l=t[11],l}function Z(e){let t=(0,X.c)(11),n;t[0]!==e.person.id||t[1]!==e.person.name?(n=(0,J.jsx)(U,{id:e.person.id,name:e.person.name}),t[0]=e.person.id,t[1]=e.person.name,t[2]=n):n=t[2];let r=e.person.fullName??e.person.name,i;t[3]===r?i=t[4]:(i=(0,J.jsx)(`span`,{className:`min-w-0 truncate font-medium`,children:r}),t[3]=r,t[4]=i);let a=e.person.fullName!==void 0&&`@${e.person.name}`,o;t[5]===a?o=t[6]:(o=(0,J.jsx)(`span`,{className:`text-muted-foreground min-w-0 flex-1 truncate font-mono text-xs`,children:a}),t[5]=a,t[6]=o);let s;return t[7]!==n||t[8]!==i||t[9]!==o?(s=(0,J.jsxs)(J.Fragment,{children:[n,i,o]}),t[7]=n,t[8]=i,t[9]=o,t[10]=s):s=t[10],s}function Q(e){let t=(0,X.c)(5),n;t[0]===e.person?n=t[1]:(n=(0,J.jsx)(Z,{person:e.person}),t[0]=e.person,t[1]=n);let r;return t[2]!==e.children||t[3]!==n?(r=(0,J.jsxs)(`div`,{role:`listitem`,className:`flex h-10 min-w-0 items-center gap-3 border-b px-1 text-sm`,children:[n,e.children]}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4],r}function ye(e){let t=(0,X.c)(25),[n,r]=H(I),i=e.person,a;t[0]===e.person.since?a=t[1]:(a=G(e.person.since),t[0]=e.person.since,t[1]=a);let s;t[2]===a?s=t[3]:(s=(0,J.jsx)(`span`,{className:`text-muted-foreground shrink-0 font-mono text-xs max-sm:hidden`,children:a}),t[2]=a,t[3]=s);let c;t[4]===n?c=t[5]:(c=p(n),t[4]=n,t[5]=c);let l;t[6]!==r||t[7]!==e.person.id?(l=()=>r({allow:!0,id:e.person.id}),t[6]=r,t[7]=e.person.id,t[8]=l):l=t[8];let u;t[9]!==c||t[10]!==l?(u=(0,J.jsx)(o,{size:`sm`,className:`shrink-0`,disabled:c,onClick:l,children:`Allow`}),t[9]=c,t[10]=l,t[11]=u):u=t[11];let d;t[12]===n?d=t[13]:(d=p(n),t[12]=n,t[13]=d);let f;t[14]!==r||t[15]!==e.person.id?(f=()=>r({allow:!1,id:e.person.id}),t[14]=r,t[15]=e.person.id,t[16]=f):f=t[16];let m;t[17]!==d||t[18]!==f?(m=(0,J.jsx)(o,{size:`sm`,variant:`outline`,className:`shrink-0`,disabled:d,onClick:f,children:`Decline`}),t[17]=d,t[18]=f,t[19]=m):m=t[19];let h;return t[20]!==e.person||t[21]!==s||t[22]!==u||t[23]!==m?(h=(0,J.jsxs)(Q,{person:i,children:[s,u,m]}),t[20]=e.person,t[21]=s,t[22]=u,t[23]=m,t[24]=h):h=t[24],h}function be(e){let t=(0,X.c)(28),[n,r]=H(z);if(e.person.role===`Admin`){let n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsx)(de,{variant:`outline`,className:`shrink-0`,children:`admin`}),t[0]=n):n=t[0];let r;return t[1]===e.person?r=t[2]:(r=(0,J.jsx)(Q,{person:e.person,children:n}),t[1]=e.person,t[2]=r),r}let i;t[3]===e.person.since?i=t[4]:(i=G(e.person.since),t[3]=e.person.since,t[4]=i);let a=`${e.person.fullName??e.person.name}, member since ${i}`,o;t[5]===a?o=t[6]:(o=(0,J.jsx)(`div`,{role:`button`,tabIndex:0,"aria-haspopup":`menu`,"aria-label":a,className:`hover:bg-muted/50 flex h-10 min-w-0 items-center gap-3 border-b px-1 text-sm`}),t[5]=a,t[6]=o);let s;t[7]===e.person?s=t[8]:(s=(0,J.jsx)(Z,{person:e.person}),t[7]=e.person,t[8]=s);let c;t[9]===e.person.since?c=t[10]:(c=G(e.person.since),t[9]=e.person.since,t[10]=c);let l;t[11]===c?l=t[12]:(l=(0,J.jsx)(`span`,{className:`text-muted-foreground shrink-0 font-mono text-xs`,children:c}),t[11]=c,t[12]=l);let u;t[13]!==o||t[14]!==s||t[15]!==l?(u=(0,J.jsx)(`div`,{role:`listitem`,children:(0,J.jsxs)(ge,{render:o,children:[s,l]})}),t[13]=o,t[14]=s,t[15]=l,t[16]=u):u=t[16];let d;t[17]===n?d=t[18]:(d=p(n),t[17]=n,t[18]=d);let f;t[19]!==e.person.id||t[20]!==r?(f=()=>r(e.person.id),t[19]=e.person.id,t[20]=r,t[21]=f):f=t[21];let m;t[22]!==d||t[23]!==f?(m=(0,J.jsx)(_e,{className:`w-auto min-w-36`,children:(0,J.jsx)(ve,{variant:`destructive`,disabled:d,onClick:f,children:`Remove`})}),t[22]=d,t[23]=f,t[24]=m):m=t[24];let h;return t[25]!==u||t[26]!==m?(h=(0,J.jsxs)(he,{children:[u,m]}),t[25]=u,t[26]=m,t[27]=h):h=t[27],h}function xe(){let e=(0,X.c)(12),t=D(),n;e[0]===t?n=e[1]:(n=e=>w(t)(_(`${e.fullName??``} ${e.name}`)),e[0]=t,e[1]=n);let r=h(S(K(ce).value,x(g,Te)),n),[i]=H(I),[a]=H(z),o=v(r,{onEmpty:we,onNonEmpty:Ce}),s;if(e[2]!==i||e[3]!==a){let t;e[5]===a?t=e[6]:(t=()=>f(a),e[5]=a,e[6]=t),s=y(u(d(f(i),t),Se)),e[2]=i,e[3]=a,e[4]=s}else s=e[4];let c;e[7]===s?c=e[8]:(c=(0,J.jsx)(W,{children:s}),e[7]=s,e[8]=c);let l;return e[9]!==o||e[10]!==c?(l=(0,J.jsxs)(J.Fragment,{children:[o,c]}),e[9]=o,e[10]=c,e[11]=l):l=e[11],l}function Se(e){return e.message}function Ce(e){return(0,J.jsx)(`div`,{role:`list`,"aria-label":`People`,children:b(e,$)})}function $(e){return m(e.role===`Waiting`,{onFalse:()=>(0,J.jsx)(be,{person:e},e.id),onTrue:()=>(0,J.jsx)(ye,{person:e},e.id)})}function we(){return(0,J.jsx)(c,{children:(0,J.jsx)(a,{children:(0,J.jsx)(l,{children:`No one matches`})})})}function Te(e){return e.role!==`Waiting`}function Ee(){let e=(0,X.c)(2);if(!C(K(R).value,De)){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(ue,{to:`/`}),e[0]=t):t=e[0],t}let t;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(V,{label:`People`,media:!0,rows:3}),children:(0,J.jsx)(xe,{})}),e[1]=t):t=e[1],t}function De(e){return e.role===`Admin`}export{Ee as component};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{n as t,o as n,s as r}from"./react-BUjtWCUj.js";import{J as i,X as a,c as o,d as s,l as c,s as l,u}from"./client-sCUiygGT.js";import{$ as d,Da as f,Ea as p,F as m,H as h,Hi as g,Sa as _,Va as v,Wi as y,Yr as b,ha as x,ia as ee,it as te,ma as S,rt as C,tt as ne,wa as w,xa as re,z as T}from"./effect-BhsQyU3F.js";import{A as E,C as D,D as O,M as k,N as ie,O as ae,T as oe,_ as A,b as j,c as M,f as se,g as N,h as ce,i as le,j as ue,k as P,m as F,n as I,o as L,r as R,rt as z,st as B,t as V,tt as H,ut as U,v as de,w as W,x as fe,y as G}from"./components-DfiHr7mH.js";import{n as pe,r as me,t as he}from"./index-D-TNR7SG.js";import{t as ge}from"./badge-BZyO-IMU.js";var K={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};K.node;var _e=a(K),q=e(r()),J=t(),Y=n();function X(e){let t=(0,J.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Y.jsx)(`path`,{d:`M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z`}),t[0]=n):n=t[0];let r;return t[1]===e.className?r=t[2]:(r=(0,Y.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`currentColor`,className:e.className,"aria-hidden":`true`,children:n}),t[1]=e.className,t[2]=r),r}function Z(e){let t=(0,J.c)(5),n;t[0]===e.className?n=t[1]:(n=i(`flex w-full max-w-3xl flex-col gap-4 self-start`,e.className),t[0]=e.className,t[1]=n);let r;return t[2]!==e.children||t[3]!==n?(r=(0,Y.jsx)(`main`,{className:`pb-safe flex min-h-0 flex-1 justify-center overflow-y-auto px-4 pt-3`,children:(0,Y.jsx)(`div`,{className:n,children:e.children})}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4],r}function ve(e){let t=(0,J.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`size-4 animate-spin`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,Y.jsx)(_e,{"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}var Q=`/assets/icon-3Ql0zGr9.svg`;function ye(e){let t=(0,J.c)(40),[n,r]=B(A),i;if(t[0]!==e.request.clientName||t[1]!==e.request.device||t[2]!==e.request.kind){let n;t[4]!==e.request.clientName||t[5]!==e.request.device?(n=()=>de(e.request.clientName,e.request.device),t[4]=e.request.clientName,t[5]=e.request.device,t[6]=n):n=t[6],i=g(e.request.kind===`Browser`,{onFalse:n,onTrue:be}),t[0]=e.request.clientName,t[1]=e.request.device,t[2]=e.request.kind,t[3]=i}else i=t[3];let a;t[7]===i?a=t[8]:(a=(0,Y.jsx)(`h2`,{className:`text-xl font-semibold wrap-anywhere`,children:i}),t[7]=i,t[8]=a);let o;t[9]===e.request.id?o=t[10]:(o=L(e.request.id),t[9]=e.request.id,t[10]=o);let c;t[11]===e.request.id?c=t[12]:(c=L(e.request.id),t[11]=e.request.id,t[12]=c);let l;t[13]===c?l=t[14]:(l=(0,Y.jsx)(R,{text:c,className:`text-background size-44`}),t[13]=c,t[14]=l);let u;t[15]!==o||t[16]!==l?(u=(0,Y.jsx)(`a`,{href:o,"aria-label":`Approve this sign-in`,className:`bg-foreground rounded-lg p-3`,children:l}),t[15]=o,t[16]=l,t[17]=u):u=t[17];let d;t[18]===e.request.id?d=t[19]:(d=ce(e.request.id),t[18]=e.request.id,t[19]=d);let f;t[20]===d?f=t[21]:(f=(0,Y.jsx)(`p`,{className:`font-mono text-3xl font-semibold tracking-widest`,children:d}),t[20]=d,t[21]=f);let p;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Y.jsx)(`p`,{className:`text-muted-foreground font-mono text-xs`,children:location.host}),t[22]=p):p=t[22];let m;t[23]===f?m=t[24]:(m=(0,Y.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[f,p]}),t[23]=f,t[24]=m);let _;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Y.jsx)(D,{waiting:!0}),t[25]=_):_=t[25];let v;t[26]===e.request.expiresAt?v=t[27]:(v=fe(e.request.expiresAt),t[26]=e.request.expiresAt,t[27]=v);let y;t[28]===v?y=t[29]:(y=(0,Y.jsxs)(`p`,{className:`text-muted-foreground mt-auto flex items-center gap-2 font-mono text-xs`,role:`status`,children:[_,`Waiting · until `,v]}),t[28]=v,t[29]=y);let b;t[30]!==e.request.kind||t[31]!==n||t[32]!==r?(b=e.request.kind===`App`&&(0,Y.jsxs)(s,{variant:`ghost`,size:`sm`,disabled:h(n),onClick:()=>r(),children:[(0,Y.jsx)(X,{}),`Approve here with GitHub`]}),t[30]=e.request.kind,t[31]=n,t[32]=r,t[33]=b):b=t[33];let x;return t[34]!==a||t[35]!==y||t[36]!==b||t[37]!==u||t[38]!==m?(x=(0,Y.jsxs)(`section`,{className:`flex flex-1 flex-col items-center gap-6 pt-6 text-center`,"aria-label":`Waiting sign-in`,children:[a,u,m,y,b]}),t[34]=a,t[35]=y,t[36]=b,t[37]=u,t[38]=m,t[39]=x):x=t[39],x}function be(){return`Sign in this browser`}function xe(e){let t=(0,J.c)(7),n;t[0]===e.id?n=t[1]:(n=F(e.id),t[0]=e.id,t[1]=n);let r=U(n),i;if(t[2]!==e.account||t[3]!==r.value){let n;t[5]===e.account?n=t[6]:(n=t=>w(x(e.account,Se),{onNone:()=>(0,Y.jsx)(ye,{request:t.request}),onSome:()=>(0,Y.jsx)(q.Suspense,{fallback:(0,Y.jsx)(z,{label:`Apps`,media:!0,rows:9}),children:(0,Y.jsx)(I,{pending:f(t.request)})})}),t[5]=e.account,t[6]=n),i=v(r.value,C,ne({Decided:we,Expired:Ce,Waiting:n})),t[2]=e.account,t[3]=r.value,t[4]=i}else i=t[4];return i}function Se(e){return e.role!==`Waiting`}function Ce(){return(0,Y.jsx)(H,{children:`This request expired. Start sign-in again in the app.`})}function we(){return(0,Y.jsx)(`p`,{className:`text-muted-foreground text-sm`,role:`status`,children:`Continuing…`})}function Te(){let e=(0,J.c)(2),t=he(),n;return e[0]===t?n=e[1]:(n=e=>(0,Y.jsxs)(oe,{active:t({to:e.to})!==!1,render:(0,Y.jsx)(me,{to:e.to}),children:[e.label,e.count>0&&(0,Y.jsx)(ge,{children:e.count})]},e.to),e[0]=t,e[1]=n),ee([{count:0,label:`Sign-ins`,to:`/`},{count:y(U(se).value,Ee),label:`People`,to:`/people`}],n)}function Ee(e){return e.role===`Waiting`}function De(e){return v(C(e.account.role),te(`Waiting`,()=>(0,Y.jsx)(l,{role:`status`,children:(0,Y.jsxs)(o,{children:[(0,Y.jsx)(c,{children:(0,Y.jsx)(D,{waiting:!0})}),(0,Y.jsx)(u,{children:`Waiting for an admin`})]})})),d(()=>(0,Y.jsx)(pe,{})))}function Oe(e){let t=(0,J.c)(24),[n,r]=B(G),i;t[0]!==e.account.id||t[1]!==e.account.name?(i=(0,Y.jsx)(ie,{"aria-label":`Account`,className:`focus-visible:ring-ring rounded-full outline-none focus-visible:ring-2`,children:(0,Y.jsx)(V,{id:e.account.id,name:e.account.name})}),t[0]=e.account.id,t[1]=e.account.name,t[2]=i):i=t[2];let a=e.account.fullName??e.account.name,o;t[3]===a?o=t[4]:(o=(0,Y.jsx)(`span`,{className:`text-foreground block text-sm`,children:a}),t[3]=a,t[4]=o);let s=e.account.name,c;t[5]===e.account.role?c=t[6]:(c=b(e.account.role),t[5]=e.account.role,t[6]=c);let l=`@${s} · ${c}`,u;t[7]!==o||t[8]!==l?(u=(0,Y.jsx)(P,{children:(0,Y.jsxs)(ue,{children:[o,l]})}),t[7]=o,t[8]=l,t[9]=u):u=t[9];let d;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Y.jsx)(k,{}),t[10]=d):d=t[10];let f;t[11]===n?f=t[12]:(f=h(n),t[11]=n,t[12]=f);let p;t[13]===r?p=t[14]:(p=()=>r(),t[13]=r,t[14]=p);let m;t[15]!==f||t[16]!==p?(m=(0,Y.jsx)(E,{variant:`destructive`,disabled:f,onClick:p,children:`Sign out`}),t[15]=f,t[16]=p,t[17]=m):m=t[17];let g;t[18]!==m||t[19]!==u?(g=(0,Y.jsxs)(ae,{align:`end`,className:`w-auto min-w-48`,children:[u,d,m]}),t[18]=m,t[19]=u,t[20]=g):g=t[20];let _;return t[21]!==i||t[22]!==g?(_=(0,Y.jsxs)(O,{children:[i,g]}),t[21]=i,t[22]=g,t[23]=_):_=t[23],_}function ke(){let e=(0,J.c)(20),[t,n]=B(A),[r,i]=B(M),a;e[0]===t?a=e[1]:(a=h(t),e[0]=t,e[1]=a);let o;e[2]===n?o=e[3]:(o=()=>n(),e[2]=n,e[3]=o);let c;e[4]===t?c=e[5]:(c=g(h(t),{onFalse:je,onTrue:Ae}),e[4]=t,e[5]=c);let l;e[6]!==a||e[7]!==o||e[8]!==c?(l=(0,Y.jsxs)(s,{size:`lg`,disabled:a,onClick:o,children:[c,`Sign in with GitHub`]}),e[6]=a,e[7]=o,e[8]=c,e[9]=l):l=e[9];let u;e[10]===r?u=e[11]:(u=h(r),e[10]=r,e[11]=u);let d;e[12]===i?d=e[13]:(d=()=>i(),e[12]=i,e[13]=d);let f;e[14]!==u||e[15]!==d?(f=(0,Y.jsx)(s,{size:`lg`,variant:`outline`,disabled:u,onClick:d,children:`Sign in with a code`}),e[14]=u,e[15]=d,e[16]=f):f=e[16];let p;return e[17]!==l||e[18]!==f?(p=(0,Y.jsxs)(`section`,{className:`flex flex-col gap-2`,"aria-label":`Sign in`,children:[l,f]}),e[17]=l,e[18]=f,e[19]=p):p=e[19],p}function Ae(){return(0,Y.jsx)(ve,{})}function je(){return(0,Y.jsx)(X,{})}function Me(){let e=(0,J.c)(11),[t]=B(A),[n]=B(M),[r]=B(G),i;if(e[0]!==n||e[1]!==t||e[2]!==r){let a;e[4]===n?a=e[5]:(a=()=>m(n),e[4]=n,e[5]=a);let o;e[6]===r?o=e[7]:(o=()=>m(r),e[6]=r,e[7]=o),i=w(v(m(t),p(a),p(o)),{onNone:Pe,onSome:Ne}),e[0]=n,e[1]=t,e[2]=r,e[3]=i}else i=e[3];let a;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(a=new URLSearchParams(location.search).has(`error`)&&(0,Y.jsx)(H,{children:`GitHub sign-in failed. Try again.`}),e[8]=a):a=e[8];let o;return e[9]===i?o=e[10]:(o=(0,Y.jsxs)(Y.Fragment,{children:[i,a]}),e[9]=i,e[10]=o),o}function Ne(e){return(0,Y.jsx)(H,{children:e.message})}function Pe(){return null}function $(){let e=(0,J.c)(7),[t,n]=B(G),r,i;e[0]===n?(r=e[1],i=e[2]):(r=()=>n(),i=[n],e[0]=n,e[1]=r,e[2]=i),(0,q.useEffect)(r,i);let a;e[3]===t?a=e[4]:(a=g(T(t),{onFalse:Ie,onTrue:Fe}),e[3]=t,e[4]=a);let o;return e[5]===a?o=e[6]:(o=(0,Y.jsx)(`p`,{className:`text-muted-foreground text-sm`,role:`status`,children:a}),e[5]=a,e[6]=o),o}function Fe(){return`Sign-out failed.`}function Ie(){return`Signing out…`}function Le(){let e=(0,J.c)(22),t=U(le).value,n;e[0]===t?n=e[1]:(n=w(t,{onNone:qe,onSome:Ke}),e[0]=t,e[1]=n);let r;e[2]===t?r=e[3]:(r=S(t,Ge)&&(0,Y.jsx)(q.Suspense,{fallback:null,children:(0,Y.jsx)(Te,{})}),e[2]=t,e[3]=r);let i;e[4]===t?i=e[5]:(i=w(x(t,We),{onNone:Ue,onSome:He}),e[4]=t,e[5]=i);let a;e[6]!==n||e[7]!==r||e[8]!==i?(a=(0,Y.jsx)(W,{icon:Q,name:`auth`,account:n,tabs:r,commands:i}),e[6]=n,e[7]=r,e[8]=i,e[9]=a):a=e[9];let o;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(o=j&&(0,Y.jsx)($,{}),e[10]=o):o=e[10];let s;e[11]===t?s=e[12]:(s=w(N,{onNone:Ve,onSome:e=>(0,Y.jsx)(xe,{account:t,id:e})}),e[11]=t,e[12]=s);let c;e[13]===t?c=e[14]:(c=w(t,{onNone:Be,onSome:Re}),e[13]=t,e[14]=c);let l;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Y.jsx)(Me,{}),e[15]=l):l=e[15];let u;e[16]!==s||e[17]!==c?(u=(0,Y.jsxs)(Z,{className:`max-w-xl`,children:[o,s,c,l]}),e[16]=s,e[17]=c,e[18]=u):u=e[18];let d;return e[19]!==a||e[20]!==u?(d=(0,Y.jsxs)(Y.Fragment,{children:[a,u]}),e[19]=a,e[20]=u,e[21]=d):d=e[21],d}function Re(e){return g(_(N)&&e.role!==`Waiting`,{onFalse:()=>(0,Y.jsx)(De,{account:e}),onTrue:ze})}function ze(){return null}function Be(){return re(N)&&!j&&(0,Y.jsx)(ke,{})}function Ve(){return null}function He(){return[]}function Ue(){}function We(e){return e.role!==`Waiting`}function Ge(e){return e.role===`Admin`}function Ke(e){return(0,Y.jsx)(Oe,{account:e})}function qe(){return!1}function Je(){let e=(0,J.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(W,{icon:Q,name:`auth`,account:!1}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Y.jsx)(q.Suspense,{fallback:(0,Y.jsxs)(Y.Fragment,{children:[t,(0,Y.jsx)(Z,{className:`max-w-xl`,children:(0,Y.jsx)(z,{label:`Apps`,media:!0,rows:9})})]}),children:(0,Y.jsx)(Le,{})}),e[1]=n):n=e[1],n}export{Je as component};