@deslop/auth 0.1.1238 → 0.1.1239
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.
- package/dist/client/assets/(home)-ChK4Bm3J.js +20 -0
- package/dist/client/assets/{badge-Orwp1LuN.js → badge-CXIN133Y.js} +1 -1
- package/dist/client/assets/{components-CY-PK17G.js → components-D9wzNB0x.js} +1 -1
- package/dist/client/assets/effect--GriK3-G.js +17 -0
- package/dist/client/assets/{index-DIpS8BKV.js → index-BAGe5tWl.js} +2 -2
- package/dist/client/assets/{people-BRGu8hJj.js → people-CV1YxTp1.js} +1 -1
- package/dist/client/assets/route-CMcpWnoA.js +1 -0
- package/dist/client/assets/toast-jmpTfttq.js +3 -0
- package/dist/client/index.html +3 -3
- package/dist/server.js +5 -4
- package/package.json +2 -2
- package/dist/client/assets/(home)-CXtD82GI.js +0 -20
- package/dist/client/assets/effect-DksNtAHN.js +0 -17
- package/dist/client/assets/route-nzdKd_UO.js +0 -1
- package/dist/client/assets/toast-D2hAfPD-.js +0 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-
|
|
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{Cr as i,Er as a,Sr as o,Tr as s,_r as c,br as l,cr as u,dr as d,fr as f,gr as p,hr as m,ln as h,lr as g,mr as _,or as ee,pr as v,t as te,ur as y,vr as b,wr as x,xr as S,yr as C}from"./toast-D2hAfPD-.js";var w=e(r(),1),T=w.use,E=w.useLayoutEffect,D=w.createContext(null);function O(e){return w.useContext(D)}function k(e){let t=O();return w.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function A(e){let t=O(),n=k(),r=w.useRef(null);return E(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var j=`Error preloading route! ☝️`;function M(e,t){if(e)return typeof e==`string`?e:e[t]}function N(e){return e?.scriptFormat??`module`}function P(e,t,n){let r=F(t),i=M(n,`script`)??r.crossOrigin;return{...N(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,fetchPriority:`low`,...i?{crossOrigin:i}:{}}}function F(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function I(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 L(e,t,n,r){let i=u(e),a=[],o=[];for(let e of i)for(let t of Array.isArray(e.scripts)?e.scripts:[]){if(!t)continue;let{children:e,...i}=t;a.push({tag:`script`,attrs:{...i,...r,nonce:n},children:e})}if(t)for(let e of i)for(let r of t.routes[e.routeId]?.scripts??[])o.push({tag:`script`,attrs:{...r.attrs,nonce:n},children:r.children});return[a,o]}function re([e,t],n){return n?[...n.before,...e,...t,n.boundary]:[...e,...t]}var ie=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=f:this.parentRoute||b();let r=n?f:t?.path;r&&r!==`/`&&(r=p(r));let i=t?.id||r,a=n?f:_((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:_(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=>d({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.`)}},ae=class extends ie{constructor(e){super(e)}};function oe(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{g(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=w.createContext(void 0),se=w.createContext(void 0),z=t();function ce(...e){let t=w.useRef(e),n=t.current;return e.forEach((e,t)=>{C(n[t],e,!1,!0)||(n[t]=e)}),t.current}function B(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(j)})}function le(e,t){let n=typeof e==`string`&&o(e);if(n)return t.has(n)?e:null}function ue(e,t,n,r){let i=m(e.pathname,r),a=m(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!C(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function de(e,t,n){let r=O(),i=w.useRef(null),a=w.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:s,to:c,preload:l,preloadDelay:u,disabled:d,target:f,onClick:p,onBlur:m,onFocus:h,onMouseEnter:g,onMouseLeave:_,onTouchStart:ee}=e,[v,te,y]=ce(e.search,e.params,s),b=w.useContext(R),x=(r.stores._linkScopes??={})[b]??=oe(r,b),[S,C,T]=w.useMemo(()=>{let t=le(c,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,s,l=()=>{let e=x[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),s=_e(t,r,d),c=d||s&&!o(s)?ue(e,t,y,r.basepath):void 0;a&&a[0]===s&&a[1]===c||(a=[s,c]),i=e}return a};return[n,l,y?.includeHash&&(()=>{let e=l();return e[1]?s??=[e[0],!1]:e})]},[r,x,e.from,e.hash,e.href,c,v,te,e.state,e.mask,e.unsafeRelative,y,d]),[E,D]=w.useSyncExternalStore(x[1],C,T||C),k=D===void 0&&E,A=d||E===void 0,j=w.useRef(!1),M=e.reloadDocument||k||A?!1:l??r.options.defaultPreload,N=u??r.options.defaultPreloadDelay??0,P=w.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]);w.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=he(e,n);if(F.ref=t?a:i,k)return F.href=k,F;let I=t=>{let n=f??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}))},ne=()=>{M===`intent`&&B(r,S)},L=()=>{M===`intent`&&V(i)};return F.onClick=H(p,I),F.onBlur=H(m,L),F.onFocus=H(h,P),F.onMouseEnter=H(g,P),F.onMouseLeave=H(_,L),F.onTouchStart=H(ee,ne),ge(F,e,D,E,A,n)}var fe={},pe={className:`active`},me=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 he(e,t){let n={};for(let r in e)me.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function ge(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=S(n?o:s,{})??(n?pe:fe);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),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 _e(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||!x(i,t.protocolAllowlist))return i}var U=w.memo(w.forwardRef((e,t)=>{let n=e._asChild||`a`,r=de(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return w.createElement(n,r,i)}),ve);function ve(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!me.has(r)||!C(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var ye=ee();function be(e,t){return e===t}function W(e,t=e=>e,n){let r=n?.compare??be,i=(0,w.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,w.useCallback)(()=>e.get(),[e]);return(0,ye.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var xe={};function Se(e,t){let n=w.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=a(n.current,i):i}}function G(e){let t=O(),n=w.useContext(e.from?se:R),r=e.from??n,i=t.stores.getMatchStore(r),a=Se(e,t),o=W(i,e=>e?a(e):xe);if(o!==xe)return o;(e.shouldThrow??!0)&&b()}function Ce(e){return G({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function we(e){let{select:t,...n}=e;return G({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Te(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 K(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 Ee(e){return G({...e,select:t=>e.select?e.select(t.context):t.context})}var De=class extends ie{constructor(e){super(e),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>Ee({...e,from:this.id}),this.useSearch=e=>K({...e,from:this.id}),this.useParams=e=>Te({...e,from:this.id}),this.useLoaderDeps=e=>we({...e,from:this.id}),this.useLoaderData=e=>Ce({...e,from:this.id}),this.useNavigate=()=>k({from:this.fullPath}),this.Link=w.forwardRef((e,t)=>(0,z.jsx)(U,{ref:t,from:this.fullPath,...e}))}};function Oe(e){return new De(e)}var ke=class extends ae{constructor(e){super(e),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>Ee({...e,from:this.id}),this.useSearch=e=>K({...e,from:this.id}),this.useParams=e=>Te({...e,from:this.id}),this.useLoaderDeps=e=>we({...e,from:this.id}),this.useLoaderData=e=>Ce({...e,from:this.id}),this.useNavigate=()=>k({from:this.fullPath}),this.Link=w.forwardRef((e,t)=>(0,z.jsx)(U,{ref:t,from:this.fullPath,...e}))}};function Ae(e){return new ke(e)}function q(e){return e=>{let t=Oe(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(s(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(T)T(a());else throw a()}return w.createElement(r,e)};return o.preload=a,o}var Y=class extends w.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?w.createElement(this.props.errorComponent??je,{error:e[0],reset:this.reset}):this.props.children}};function je({error:e}){let[t,n]=w.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 Me=()=>!0,Ne=()=>!1;function Pe({children:e,fallback:t=null}){return(0,z.jsx)(w.Fragment,{children:Fe()?e:t})}function Fe(e=!0){return w.useSyncExternalStore(Ie,Me,e?Ne:Me)}function Ie(){return()=>{}}function Le(e){let t=O(),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(v(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(v(t))return e.fallback?.(t);throw t},children:e.children})}function Re(){return(0,z.jsx)(`p`,{children:`Not Found`})}function ze(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)(Re,{})}function X(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,z.jsx)(n,{}):null}var Be=(e,t)=>e[0]===t[0]&&e[1]===t[1],Ve=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,He=w.memo(function({routeId:e}){let t=O();return Ue(t,W(t.stores.getMatchStore(e)))});function Ue(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=Ve(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,z.jsx)(We,{match:t});s&&(l=(0,z.jsx)(Pe,{fallback:r,children:l})),o&&(l=(0,z.jsx)(Le,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return w.createElement(o,e)},children:l})),i&&(l=(0,z.jsx)(Y,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(v(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,z.jsx)(w.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 We=w.memo(function({match:e}){let t=O(),n=e.routeId,r=t.routesById[n],i=w.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=w.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,z.jsx)(e,{},i):(0,z.jsx)(Ge,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Ve(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return X(t,r)}if(e.status===`notFound`)return ze(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Ge=w.memo(function(){let e=O(),t=w.useContext(R),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=W(a,e=>[!!e._notFound,e.error],{compare:Be}),i=W(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return ze(e,e.routesById[t],r);if(!i)return null;let a=(0,z.jsx)(He,{routeId:i});return t===`__root__`?(0,z.jsx)(w.Suspense,{fallback:X(e),children:a}):a});function Ke(e,t){let n=e[1];e.length=0,n?.(t)}function qe({t:e}){let t=O(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Ke(n,!1),n.push(i,a),e(t),w.startTransition(r)}),E(()=>{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`,...y(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Je(){let e=O(),t=e.routesById[f],n=X(e,t),r=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(qe,{t:w.useState()[1]}),e.ssr?(0,z.jsx)(Ye,{}):(0,z.jsx)(w.Suspense,{fallback:n,children:(0,z.jsx)(Ye,{})})]});return e.options.InnerWrap?(0,z.jsx)(e.options.InnerWrap,{children:r}):r}function Ye(){let e=O(),t=e._rendered,n=W(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;E(()=>{t[0]===n&&Ke(t,!0)},[t,n]);let a=i?(0,z.jsx)(He,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,z.jsx)(Y,{getResetKey:()=>r,onCatch:void 0,children:a})}function Xe(){let e=O();return w.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 Ze({router:e,children:t,...n}){i(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,z.jsx)(D.Provider,{value:e,children:t});return e.options.Wrap?(0,z.jsx)(e.options.Wrap,{children:r}):r}function Qe({router:e,...t}){return(0,z.jsx)(Ze,{router:e,...t,children:(0,z.jsx)(Je,{})})}function $e(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 et(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=w.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)(tt,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function tt({attrs:e,children:t,preventScriptHoist:n}){O();let r=Fe(),i=w.useMemo(()=>t===void 0?void 0:{__html:t},[t]),a=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(w.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 $e(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,$e(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 nt(e,t,n,r){n=u(n);let i=n.map(e=>e.meta).filter(e=>e!==void 0),a=[],o={},s;for(let e=i.length-1;e>=0;e--){let n=i[e];for(let e=n.length-1;e>=0;e--){let r=n[e];if(r){if(r.title)s||={tag:`title`,children:r.title};else if(`script:ld+json`in r)try{let e=JSON.stringify(r[`script:ld+json`]);a.push({tag:`script`,attrs:{type:`application/ld+json`},children:l(e)})}catch{}else{let e=r.name??r.property;if(e){if(o[e])continue;o[e]=!0}a.push({tag:`meta`,attrs:{...r,nonce:t}})}}}}s&&a.push(s),t&&a.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),a.reverse();let c=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:M(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:{...P(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 I(g,a),g.push(...p),I(g,c),g.push(...f),I(g,m),I(g,h),g}var rt=e=>{let t=O(),n=t.options.ssr?.nonce,r=w.useCallback(r=>nt(t,n,r,e),[e,n,t]);return W(t.stores.matches,r,{compare:C})};function it(e){let t=rt(e.assetCrossOrigin),n=O().options.ssr?.nonce;return(0,z.jsx)(z.Fragment,{children:t.map(e=>(0,w.createElement)(et,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var at={suppressHydrationWarning:!0},ot=()=>{let e=O(),t=e.options.ssr?.nonce,n=n=>{let r=L(n,e.ssr?.manifest,t,at);for(let e of r[1])if(typeof e.attrs?.src==`string`){let t=e;t.preventScriptHoist=!0}return r};return st(W(e.stores.matches,e=>re(n(e)),{compare:C}))};function st(e){return(0,z.jsx)(z.Fragment,{children:e.map((e,t)=>(0,w.createElement)(et,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var ct=n(),lt=Ae({shellComponent:e=>(0,z.jsxs)(`div`,{className:`bg-background text-foreground safe-area flex h-dvh w-dvw flex-col`,children:[(0,z.jsx)(it,{}),(0,z.jsx)(ot,{}),(0,z.jsx)(te,{children:e.children})]})}),ut=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),dt=function(e){return`/`+e},ft={},pt=function(e){return e.pathname.endsWith(`.css`)},mt=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},Z=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=dt(t,n);let r=s(t),i=pt(r);return mt(ft,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`:ut,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)})},ht=q(`/(home)`)({component:J(()=>Z(()=>import(`./route-nzdKd_UO.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`)}),gt=q(`/(home)/`)({component:J(()=>Z(()=>import(`./(home)-CXtD82GI.js`),__vite__mapDeps([7,1,2,3,4,5])),`component`)}),_t=q(`/(home)/people`)({component:J(()=>Z(()=>import(`./people-BRGu8hJj.js`),__vite__mapDeps([8,1,2,3,4,5,6])),`component`)}),Q=ht.update({id:`/(home)`,getParentRoute:()=>lt}),vt=gt.update({id:`/`,path:`/`,getParentRoute:()=>Q}),yt={homePeopleRoute:_t.update({id:`/people`,path:`/people`,getParentRoute:()=>Q}),homeIndexRoute:vt},bt={homeRouteRoute:Q._addFileChildren(yt)},xt=lt._addFileChildren(bt)._addFileTypes(),$=h(xt);(0,ct.createRoot)($.root).render((0,z.jsx)(w.StrictMode,{children:(0,z.jsx)(Qe,{router:$.router})}));export{A as i,Ge as n,U as r,Xe as t};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-CMcpWnoA.js","assets/rolldown-runtime-WkwZ5CU-.js","assets/react-BUjtWCUj.js","assets/toast-jmpTfttq.js","assets/effect--GriK3-G.js","assets/components-D9wzNB0x.js","assets/badge-CXIN133Y.js","assets/(home)-ChK4Bm3J.js","assets/people-CV1YxTp1.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{Cr as i,Er as a,Sr as o,Tr as s,_r as c,br as l,cr as u,dr as d,fr as f,gr as p,hr as m,ln as h,lr as g,mr as _,or as ee,pr as v,t as te,ur as y,vr as b,wr as x,xr as S,yr as C}from"./toast-jmpTfttq.js";var w=e(r(),1),T=w.use,E=w.useLayoutEffect,D=w.createContext(null);function O(e){return w.useContext(D)}function k(e){let t=O();return w.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function A(e){let t=O(),n=k(),r=w.useRef(null);return E(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var j=`Error preloading route! ☝️`;function M(e,t){if(e)return typeof e==`string`?e:e[t]}function N(e){return e?.scriptFormat??`module`}function P(e,t,n){let r=F(t),i=M(n,`script`)??r.crossOrigin;return{...N(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,fetchPriority:`low`,...i?{crossOrigin:i}:{}}}function F(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function I(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 L(e,t,n,r){let i=u(e),a=[],o=[];for(let e of i)for(let t of Array.isArray(e.scripts)?e.scripts:[]){if(!t)continue;let{children:e,...i}=t;a.push({tag:`script`,attrs:{...i,...r,nonce:n},children:e})}if(t)for(let e of i)for(let r of t.routes[e.routeId]?.scripts??[])o.push({tag:`script`,attrs:{...r.attrs,nonce:n},children:r.children});return[a,o]}function re([e,t],n){return n?[...n.before,...e,...t,n.boundary]:[...e,...t]}var ie=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=f:this.parentRoute||b();let r=n?f:t?.path;r&&r!==`/`&&(r=p(r));let i=t?.id||r,a=n?f:_((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:_(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=>d({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.`)}},ae=class extends ie{constructor(e){super(e)}};function oe(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{g(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=w.createContext(void 0),se=w.createContext(void 0),z=t();function ce(...e){let t=w.useRef(e),n=t.current;return e.forEach((e,t)=>{C(n[t],e,!1,!0)||(n[t]=e)}),t.current}function B(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(j)})}function le(e,t){let n=typeof e==`string`&&o(e);if(n)return t.has(n)?e:null}function ue(e,t,n,r){let i=m(e.pathname,r),a=m(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!C(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function de(e,t,n){let r=O(),i=w.useRef(null),a=w.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:s,to:c,preload:l,preloadDelay:u,disabled:d,target:f,onClick:p,onBlur:m,onFocus:h,onMouseEnter:g,onMouseLeave:_,onTouchStart:ee}=e,[v,te,y]=ce(e.search,e.params,s),b=w.useContext(R),x=(r.stores._linkScopes??={})[b]??=oe(r,b),[S,C,T]=w.useMemo(()=>{let t=le(c,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,s,l=()=>{let e=x[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),s=_e(t,r,d),c=d||s&&!o(s)?ue(e,t,y,r.basepath):void 0;a&&a[0]===s&&a[1]===c||(a=[s,c]),i=e}return a};return[n,l,y?.includeHash&&(()=>{let e=l();return e[1]?s??=[e[0],!1]:e})]},[r,x,e.from,e.hash,e.href,c,v,te,e.state,e.mask,e.unsafeRelative,y,d]),[E,D]=w.useSyncExternalStore(x[1],C,T||C),k=D===void 0&&E,A=d||E===void 0,j=w.useRef(!1),M=e.reloadDocument||k||A?!1:l??r.options.defaultPreload,N=u??r.options.defaultPreloadDelay??0,P=w.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]);w.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=he(e,n);if(F.ref=t?a:i,k)return F.href=k,F;let I=t=>{let n=f??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}))},ne=()=>{M===`intent`&&B(r,S)},L=()=>{M===`intent`&&V(i)};return F.onClick=H(p,I),F.onBlur=H(m,L),F.onFocus=H(h,P),F.onMouseEnter=H(g,P),F.onMouseLeave=H(_,L),F.onTouchStart=H(ee,ne),ge(F,e,D,E,A,n)}var fe={},pe={className:`active`},me=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 he(e,t){let n={};for(let r in e)me.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function ge(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=S(n?o:s,{})??(n?pe:fe);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),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 _e(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||!x(i,t.protocolAllowlist))return i}var U=w.memo(w.forwardRef((e,t)=>{let n=e._asChild||`a`,r=de(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return w.createElement(n,r,i)}),ve);function ve(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!me.has(r)||!C(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var ye=ee();function be(e,t){return e===t}function W(e,t=e=>e,n){let r=n?.compare??be,i=(0,w.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,w.useCallback)(()=>e.get(),[e]);return(0,ye.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var xe={};function Se(e,t){let n=w.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=a(n.current,i):i}}function G(e){let t=O(),n=w.useContext(e.from?se:R),r=e.from??n,i=t.stores.getMatchStore(r),a=Se(e,t),o=W(i,e=>e?a(e):xe);if(o!==xe)return o;(e.shouldThrow??!0)&&b()}function Ce(e){return G({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function we(e){let{select:t,...n}=e;return G({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Te(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 K(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 Ee(e){return G({...e,select:t=>e.select?e.select(t.context):t.context})}var De=class extends ie{constructor(e){super(e),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>Ee({...e,from:this.id}),this.useSearch=e=>K({...e,from:this.id}),this.useParams=e=>Te({...e,from:this.id}),this.useLoaderDeps=e=>we({...e,from:this.id}),this.useLoaderData=e=>Ce({...e,from:this.id}),this.useNavigate=()=>k({from:this.fullPath}),this.Link=w.forwardRef((e,t)=>(0,z.jsx)(U,{ref:t,from:this.fullPath,...e}))}};function Oe(e){return new De(e)}var ke=class extends ae{constructor(e){super(e),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>Ee({...e,from:this.id}),this.useSearch=e=>K({...e,from:this.id}),this.useParams=e=>Te({...e,from:this.id}),this.useLoaderDeps=e=>we({...e,from:this.id}),this.useLoaderData=e=>Ce({...e,from:this.id}),this.useNavigate=()=>k({from:this.fullPath}),this.Link=w.forwardRef((e,t)=>(0,z.jsx)(U,{ref:t,from:this.fullPath,...e}))}};function Ae(e){return new ke(e)}function q(e){return e=>{let t=Oe(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(s(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(T)T(a());else throw a()}return w.createElement(r,e)};return o.preload=a,o}var Y=class extends w.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?w.createElement(this.props.errorComponent??je,{error:e[0],reset:this.reset}):this.props.children}};function je({error:e}){let[t,n]=w.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 Me=()=>!0,Ne=()=>!1;function Pe({children:e,fallback:t=null}){return(0,z.jsx)(w.Fragment,{children:Fe()?e:t})}function Fe(e=!0){return w.useSyncExternalStore(Ie,Me,e?Ne:Me)}function Ie(){return()=>{}}function Le(e){let t=O(),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(v(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(v(t))return e.fallback?.(t);throw t},children:e.children})}function Re(){return(0,z.jsx)(`p`,{children:`Not Found`})}function ze(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)(Re,{})}function X(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,z.jsx)(n,{}):null}var Be=(e,t)=>e[0]===t[0]&&e[1]===t[1],Ve=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,He=w.memo(function({routeId:e}){let t=O();return Ue(t,W(t.stores.getMatchStore(e)))});function Ue(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=Ve(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,z.jsx)(We,{match:t});s&&(l=(0,z.jsx)(Pe,{fallback:r,children:l})),o&&(l=(0,z.jsx)(Le,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return w.createElement(o,e)},children:l})),i&&(l=(0,z.jsx)(Y,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(v(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,z.jsx)(w.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 We=w.memo(function({match:e}){let t=O(),n=e.routeId,r=t.routesById[n],i=w.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=w.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,z.jsx)(e,{},i):(0,z.jsx)(Ge,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Ve(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return X(t,r)}if(e.status===`notFound`)return ze(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Ge=w.memo(function(){let e=O(),t=w.useContext(R),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=W(a,e=>[!!e._notFound,e.error],{compare:Be}),i=W(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return ze(e,e.routesById[t],r);if(!i)return null;let a=(0,z.jsx)(He,{routeId:i});return t===`__root__`?(0,z.jsx)(w.Suspense,{fallback:X(e),children:a}):a});function Ke(e,t){let n=e[1];e.length=0,n?.(t)}function qe({t:e}){let t=O(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Ke(n,!1),n.push(i,a),e(t),w.startTransition(r)}),E(()=>{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`,...y(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Je(){let e=O(),t=e.routesById[f],n=X(e,t),r=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(qe,{t:w.useState()[1]}),e.ssr?(0,z.jsx)(Ye,{}):(0,z.jsx)(w.Suspense,{fallback:n,children:(0,z.jsx)(Ye,{})})]});return e.options.InnerWrap?(0,z.jsx)(e.options.InnerWrap,{children:r}):r}function Ye(){let e=O(),t=e._rendered,n=W(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;E(()=>{t[0]===n&&Ke(t,!0)},[t,n]);let a=i?(0,z.jsx)(He,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,z.jsx)(Y,{getResetKey:()=>r,onCatch:void 0,children:a})}function Xe(){let e=O();return w.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 Ze({router:e,children:t,...n}){i(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,z.jsx)(D.Provider,{value:e,children:t});return e.options.Wrap?(0,z.jsx)(e.options.Wrap,{children:r}):r}function Qe({router:e,...t}){return(0,z.jsx)(Ze,{router:e,...t,children:(0,z.jsx)(Je,{})})}function $e(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 et(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=w.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)(tt,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function tt({attrs:e,children:t,preventScriptHoist:n}){O();let r=Fe(),i=w.useMemo(()=>t===void 0?void 0:{__html:t},[t]),a=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(w.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 $e(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,$e(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 nt(e,t,n,r){n=u(n);let i=n.map(e=>e.meta).filter(e=>e!==void 0),a=[],o={},s;for(let e=i.length-1;e>=0;e--){let n=i[e];for(let e=n.length-1;e>=0;e--){let r=n[e];if(r){if(r.title)s||={tag:`title`,children:r.title};else if(`script:ld+json`in r)try{let e=JSON.stringify(r[`script:ld+json`]);a.push({tag:`script`,attrs:{type:`application/ld+json`},children:l(e)})}catch{}else{let e=r.name??r.property;if(e){if(o[e])continue;o[e]=!0}a.push({tag:`meta`,attrs:{...r,nonce:t}})}}}}s&&a.push(s),t&&a.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),a.reverse();let c=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:M(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:{...P(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 I(g,a),g.push(...p),I(g,c),g.push(...f),I(g,m),I(g,h),g}var rt=e=>{let t=O(),n=t.options.ssr?.nonce,r=w.useCallback(r=>nt(t,n,r,e),[e,n,t]);return W(t.stores.matches,r,{compare:C})};function it(e){let t=rt(e.assetCrossOrigin),n=O().options.ssr?.nonce;return(0,z.jsx)(z.Fragment,{children:t.map(e=>(0,w.createElement)(et,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var at={suppressHydrationWarning:!0},ot=()=>{let e=O(),t=e.options.ssr?.nonce,n=n=>{let r=L(n,e.ssr?.manifest,t,at);for(let e of r[1])if(typeof e.attrs?.src==`string`){let t=e;t.preventScriptHoist=!0}return r};return st(W(e.stores.matches,e=>re(n(e)),{compare:C}))};function st(e){return(0,z.jsx)(z.Fragment,{children:e.map((e,t)=>(0,w.createElement)(et,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var ct=n(),lt=Ae({shellComponent:e=>(0,z.jsxs)(`div`,{className:`bg-background text-foreground safe-area flex h-dvh w-dvw flex-col`,children:[(0,z.jsx)(it,{}),(0,z.jsx)(ot,{}),(0,z.jsx)(te,{children:e.children})]})}),ut=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),dt=function(e){return`/`+e},ft={},pt=function(e){return e.pathname.endsWith(`.css`)},mt=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},Z=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=dt(t,n);let r=s(t),i=pt(r);return mt(ft,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`:ut,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)})},ht=q(`/(home)`)({component:J(()=>Z(()=>import(`./route-CMcpWnoA.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`)}),gt=q(`/(home)/`)({component:J(()=>Z(()=>import(`./(home)-ChK4Bm3J.js`),__vite__mapDeps([7,1,2,3,4,5])),`component`)}),_t=q(`/(home)/people`)({component:J(()=>Z(()=>import(`./people-CV1YxTp1.js`),__vite__mapDeps([8,1,2,3,4,5,6])),`component`)}),Q=ht.update({id:`/(home)`,getParentRoute:()=>lt}),vt=gt.update({id:`/`,path:`/`,getParentRoute:()=>Q}),yt={homePeopleRoute:_t.update({id:`/people`,path:`/people`,getParentRoute:()=>Q}),homeIndexRoute:vt},bt={homeRouteRoute:Q._addFileChildren(yt)},xt=lt._addFileChildren(bt)._addFileTypes(),$=h(xt);(0,ct.createRoot)($.root).render((0,z.jsx)(w.StrictMode,{children:(0,z.jsx)(Qe,{router:$.router})}));export{A as i,Ge as n,U as r,Xe as t};
|
|
@@ -1 +1 @@
|
|
|
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{An as i,Cn as a,D as o,Jt as s,Ot as c,T as l,U as u,_n as d,bn as f,mn as p,o as m,qt as h,rn as g,tr as _,w as ee,yn as v}from"./toast-D2hAfPD-.js";import{Ca as y,Ra as b,U as x,Va as S,Zi as C,ii as w,ma as T,pa as E,qr as D,ra as O,va as k}from"./effect-DksNtAHN.js";import{$ as A,I as j,J as M,N,Q as P,X as F,Y as I,Z as te,a as L,at as ne,b as re,et as ie,ft as R,ht as ae,lt as z,m as B,nt as oe,q as V,s as H,t as U,tt as W,x as G}from"./components-CY-PK17G.js";import{i as K}from"./index-DIpS8BKV.js";import{t as q}from"./badge-Orwp1LuN.js";var J=e(r(),1),Y=n();function se(e){let[t,n]=J.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=J.useRef(null),i=J.useRef(null),a=J.useRef(null),s=J.useRef(null),c=J.useRef(!0),l=J.useRef(null),u=o(),d=J.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:s,allowMouseUpTriggerRef:c,initialCursorPointRef:l,rootId:u}),[t,u]);return(0,Y.jsx)(W.Provider,{value:d,children:(0,Y.jsx)(A.Provider,{value:void 0,children:(0,Y.jsx)(M,{...e})})})}var X=500,ce=J.forwardRef(function(e,t){let{render:n,className:r,style:o,...d}=e,{setAnchor:f,actionsRef:p,internalBackdropRef:_,backdropRef:v,positionerRef:y,allowMouseUpTriggerRef:b,initialCursorPointRef:x,rootId:S}=oe(!1),{store:C}=ie(!1),w=C.useState(`open`),T=C.useState(`disabled`),E=J.useRef(null),D=J.useRef(null),O=g(),k=g(),A=J.useRef(!1),j=J.useRef(null);function M(e,t,n){let r=n.type.startsWith(`touch`);x.current={x:e,y:t},f({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:e,y:t})}}),A.current=!1,p.current?.setOpen(!0,l(ee,n)),k.start(X,()=>{A.current=!0})}function N(e){if(T)return;b.current=!0,c(e),M(e.clientX,e.clientY,e.nativeEvent);let t=i(E.current);j.current?.abort();let n=new AbortController;j.current=n,t.addEventListener(`mouseup`,e=>{if(b.current=!1,!A.current)return;k.clear(),A.current=!1;let t=s(e);h(y.current,t)||S&&t&&V(t)===S||p.current?.setOpen(!1,l(m,e))},{once:!0,signal:n.signal})}function P(){O.clear(),D.current=null}function F(e){if(T||(b.current=!1,e.touches.length!==1)){P();return}e.stopPropagation();let t=e.touches[0],n={x:t.clientX,y:t.clientY};D.current=n,O.start(X,()=>{M(n.x,n.y,e.nativeEvent)})}function I(e){if(e.touches.length!==1)P();else if(O.isStarted()&&D.current){let t=e.touches[0],n=Math.abs(t.clientX-D.current.x),r=Math.abs(t.clientY-D.current.y);(n>10||r>10)&&P()}}return J.useEffect(()=>()=>{j.current?.abort()},[]),J.useEffect(()=>{function e(e){if(T)return;let t=s(e);(h(E.current,t)||h(_.current,t)||h(v.current,t))&&e.preventDefault()}let t=i(E.current);return u(t,`contextmenu`,e)},[v,T,_]),a(`div`,e,{state:{open:w},ref:[E,t],props:[{onContextMenu:N,onTouchStart:F,onTouchMove:I,onTouchEnd:P,onTouchCancel:P,style:{WebkitTouchCallout:`none`}},d],stateAttributesMapping:ae})}),le=I,Z=t();function ue(e){let t=(0,Z.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,Y.jsx)(se,{"data-slot":`context-menu`,...n}),t[2]=n,t[3]=r),r}function de(e){let t=(0,Z.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 i;t[3]===n?i=t[4]:(i=_(`select-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Y.jsx)(ce,{"data-slot":`context-menu-trigger`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fe(e){let t=(0,Z.c)(18),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({className:n,align:i,alignOffset:a,side:o,sideOffset:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?4:a,u=o===void 0?`right`:o,d=s===void 0?0:s,f;t[7]===n?f=t[8]:(f=_(`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]=f);let p;t[9]!==r||t[10]!==f?(p=(0,Y.jsx)(te,{"data-slot":`context-menu-content`,className:f,...r}),t[9]=r,t[10]=f,t[11]=p):p=t[11];let m;return t[12]!==c||t[13]!==l||t[14]!==u||t[15]!==d||t[16]!==p?(m=(0,Y.jsx)(F,{children:(0,Y.jsx)(le,{className:`isolate z-50 outline-none`,align:c,alignOffset:l,side:u,sideOffset:d,children:p})}),t[12]=c,t[13]=l,t[14]=u,t[15]=d,t[16]=p,t[17]=m):m=t[17],m}function pe(e){let t=(0,Z.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=_(`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]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,Y.jsx)(P,{"data-slot":`context-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function Q(e){let t=(0,Z.c)(11),n;t[0]!==e.person.id||t[1]!==e.person.name?(n=(0,Y.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,Y.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,Y.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,Y.jsxs)(Y.Fragment,{children:[n,i,o]}),t[7]=n,t[8]=i,t[9]=o,t[10]=s):s=t[10],s}function $(e){let t=(0,Z.c)(8),n;t[0]===e.person?n=t[1]:(n=(0,Y.jsx)(Q,{person:e.person}),t[0]=e.person,t[1]=n);let r;t[2]!==e.children||t[3]!==n?(r=(0,Y.jsxs)(`div`,{className:`flex h-10 min-w-0 items-center gap-3 px-1 text-sm`,children:[n,e.children]}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==e.failure||t[6]!==r?(i=(0,Y.jsxs)(`div`,{role:`listitem`,className:`border-b`,children:[r,e.failure]}),t[5]=e.failure,t[6]=r,t[7]=i):i=t[7],i}function me(e){let t=(0,Z.c)(28),n;t[0]===e.person.id?n=t[1]:(n=H(e.person.id),t[0]=e.person.id,t[1]=n);let[r,i]=z(n),a=e.person,o;t[2]===r?o=t[3]:(o=(0,Y.jsx)(N,{result:r,className:`mr-1 mb-2 ml-10 wrap-anywhere`}),t[2]=r,t[3]=o);let s;t[4]===e.person.since?s=t[5]:(s=B(e.person.since),t[4]=e.person.since,t[5]=s);let c;t[6]===s?c=t[7]:(c=(0,Y.jsx)(`span`,{className:`text-muted-foreground shrink-0 font-mono text-xs max-sm:hidden`,children:s}),t[6]=s,t[7]=c);let l;t[8]===r?l=t[9]:(l=x(r),t[8]=r,t[9]=l);let u;t[10]===i?u=t[11]:(u=()=>i(!0),t[10]=i,t[11]=u);let d;t[12]!==l||t[13]!==u?(d=(0,Y.jsx)(f,{size:`sm`,className:`shrink-0`,disabled:l,onClick:u,children:`Allow`}),t[12]=l,t[13]=u,t[14]=d):d=t[14];let p;t[15]===r?p=t[16]:(p=x(r),t[15]=r,t[16]=p);let m;t[17]===i?m=t[18]:(m=()=>i(!1),t[17]=i,t[18]=m);let h;t[19]!==p||t[20]!==m?(h=(0,Y.jsx)(f,{size:`sm`,variant:`outline`,className:`shrink-0`,disabled:p,onClick:m,children:`Decline`}),t[19]=p,t[20]=m,t[21]=h):h=t[21];let g;return t[22]!==e.person||t[23]!==h||t[24]!==o||t[25]!==c||t[26]!==d?(g=(0,Y.jsxs)($,{person:a,failure:o,children:[c,d,h]}),t[22]=e.person,t[23]=h,t[24]=o,t[25]=c,t[26]=d,t[27]=g):g=t[27],g}function he(e){let t=(0,Z.c)(34),n;t[0]===e.person.id?n=t[1]:(n=G(e.person.id),t[0]=e.person.id,t[1]=n);let[r,i]=z(n);if(e.person.role===`Admin`){let n;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Y.jsx)(q,{variant:`outline`,className:`shrink-0`,children:`admin`}),t[2]=n):n=t[2];let r;return t[3]===e.person?r=t[4]:(r=(0,Y.jsx)($,{person:e.person,children:n}),t[3]=e.person,t[4]=r),r}let a;t[5]===e.person.since?a=t[6]:(a=B(e.person.since),t[5]=e.person.since,t[6]=a);let o=`${e.person.fullName??e.person.name}, member since ${a}`,s;t[7]===o?s=t[8]:(s=(0,Y.jsx)(`div`,{role:`button`,tabIndex:0,"aria-haspopup":`menu`,"aria-label":o,className:`hover:bg-muted/50 flex h-10 min-w-0 items-center gap-3 px-1 text-sm`}),t[7]=o,t[8]=s);let c;t[9]===e.person?c=t[10]:(c=(0,Y.jsx)(Q,{person:e.person}),t[9]=e.person,t[10]=c);let l;t[11]===e.person.since?l=t[12]:(l=B(e.person.since),t[11]=e.person.since,t[12]=l);let u;t[13]===l?u=t[14]:(u=(0,Y.jsx)(`span`,{className:`text-muted-foreground shrink-0 font-mono text-xs`,children:l}),t[13]=l,t[14]=u);let d;t[15]!==s||t[16]!==c||t[17]!==u?(d=(0,Y.jsxs)(de,{render:s,children:[c,u]}),t[15]=s,t[16]=c,t[17]=u,t[18]=d):d=t[18];let f;t[19]===r?f=t[20]:(f=(0,Y.jsx)(N,{result:r,className:`mr-1 mb-2 ml-10 wrap-anywhere`}),t[19]=r,t[20]=f);let p;t[21]!==d||t[22]!==f?(p=(0,Y.jsxs)(`div`,{role:`listitem`,className:`border-b`,children:[d,f]}),t[21]=d,t[22]=f,t[23]=p):p=t[23];let m;t[24]===r?m=t[25]:(m=x(r),t[24]=r,t[25]=m);let h;t[26]===i?h=t[27]:(h=()=>i(),t[26]=i,t[27]=h);let g;t[28]!==m||t[29]!==h?(g=(0,Y.jsx)(fe,{className:`w-auto min-w-36`,children:(0,Y.jsx)(pe,{variant:`destructive`,disabled:m,onClick:h,children:`Remove`})}),t[28]=m,t[29]=h,t[30]=g):g=t[30];let _;return t[31]!==g||t[32]!==p?(_=(0,Y.jsxs)(ue,{children:[p,g]}),t[31]=g,t[32]=p,t[33]=_):_=t[33],_}function ge(){let e=(0,Z.c)(2),t=j(),n;return e[0]===t?n=e[1]:(n=e=>D(t)(w(`${e.fullName??``} ${e.name}`)),e[0]=t,e[1]=n),T(O(k(R(re).value,S(b,be)),n),{onEmpty:ye,onNonEmpty:_e})}function _e(e){return(0,Y.jsx)(`div`,{role:`list`,"aria-label":`People`,children:E(e,ve)})}function ve(e){return C(e.role===`Waiting`,{onFalse:()=>(0,Y.jsx)(he,{person:e},e.id),onTrue:()=>(0,Y.jsx)(me,{person:e},e.id)})}function ye(){return(0,Y.jsx)(p,{children:(0,Y.jsx)(d,{children:(0,Y.jsx)(v,{children:`No one matches`})})})}function be(e){return e.role!==`Waiting`}function xe(){let e=(0,Z.c)(2);if(!y(R(L).value,Se)){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(K,{to:`/`}),e[0]=t):t=e[0],t}let t;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(J.Suspense,{fallback:(0,Y.jsx)(ne,{label:`People`,media:!0,rows:3}),children:(0,Y.jsx)(ge,{})}),e[1]=t):t=e[1],t}function Se(e){return e.role===`Admin`}export{xe as component};
|
|
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{An as i,Cn as a,D as o,Jt as s,Ot as c,T as l,U as u,_n as d,bn as f,mn as p,o as m,qt as h,rn as g,tr as _,w as ee,yn as v}from"./toast-jmpTfttq.js";import{Ca as y,Ha as b,U as x,Zi as S,ii as C,ma as w,pa as T,qr as E,ra as D,va as O,za as k}from"./effect--GriK3-G.js";import{$ as A,I as j,J as M,N,Q as P,X as F,Y as I,Z as te,a as L,at as ne,b as re,et as ie,ft as R,ht as ae,lt as z,m as B,nt as oe,q as V,s as H,t as U,tt as W,x as G}from"./components-D9wzNB0x.js";import{i as K}from"./index-BAGe5tWl.js";import{t as q}from"./badge-CXIN133Y.js";var J=e(r(),1),Y=n();function se(e){let[t,n]=J.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=J.useRef(null),i=J.useRef(null),a=J.useRef(null),s=J.useRef(null),c=J.useRef(!0),l=J.useRef(null),u=o(),d=J.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:s,allowMouseUpTriggerRef:c,initialCursorPointRef:l,rootId:u}),[t,u]);return(0,Y.jsx)(W.Provider,{value:d,children:(0,Y.jsx)(A.Provider,{value:void 0,children:(0,Y.jsx)(M,{...e})})})}var X=500,ce=J.forwardRef(function(e,t){let{render:n,className:r,style:o,...d}=e,{setAnchor:f,actionsRef:p,internalBackdropRef:_,backdropRef:v,positionerRef:y,allowMouseUpTriggerRef:b,initialCursorPointRef:x,rootId:S}=oe(!1),{store:C}=ie(!1),w=C.useState(`open`),T=C.useState(`disabled`),E=J.useRef(null),D=J.useRef(null),O=g(),k=g(),A=J.useRef(!1),j=J.useRef(null);function M(e,t,n){let r=n.type.startsWith(`touch`);x.current={x:e,y:t},f({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:e,y:t})}}),A.current=!1,p.current?.setOpen(!0,l(ee,n)),k.start(X,()=>{A.current=!0})}function N(e){if(T)return;b.current=!0,c(e),M(e.clientX,e.clientY,e.nativeEvent);let t=i(E.current);j.current?.abort();let n=new AbortController;j.current=n,t.addEventListener(`mouseup`,e=>{if(b.current=!1,!A.current)return;k.clear(),A.current=!1;let t=s(e);h(y.current,t)||S&&t&&V(t)===S||p.current?.setOpen(!1,l(m,e))},{once:!0,signal:n.signal})}function P(){O.clear(),D.current=null}function F(e){if(T||(b.current=!1,e.touches.length!==1)){P();return}e.stopPropagation();let t=e.touches[0],n={x:t.clientX,y:t.clientY};D.current=n,O.start(X,()=>{M(n.x,n.y,e.nativeEvent)})}function I(e){if(e.touches.length!==1)P();else if(O.isStarted()&&D.current){let t=e.touches[0],n=Math.abs(t.clientX-D.current.x),r=Math.abs(t.clientY-D.current.y);(n>10||r>10)&&P()}}return J.useEffect(()=>()=>{j.current?.abort()},[]),J.useEffect(()=>{function e(e){if(T)return;let t=s(e);(h(E.current,t)||h(_.current,t)||h(v.current,t))&&e.preventDefault()}let t=i(E.current);return u(t,`contextmenu`,e)},[v,T,_]),a(`div`,e,{state:{open:w},ref:[E,t],props:[{onContextMenu:N,onTouchStart:F,onTouchMove:I,onTouchEnd:P,onTouchCancel:P,style:{WebkitTouchCallout:`none`}},d],stateAttributesMapping:ae})}),le=I,Z=t();function ue(e){let t=(0,Z.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,Y.jsx)(se,{"data-slot":`context-menu`,...n}),t[2]=n,t[3]=r),r}function de(e){let t=(0,Z.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 i;t[3]===n?i=t[4]:(i=_(`select-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Y.jsx)(ce,{"data-slot":`context-menu-trigger`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fe(e){let t=(0,Z.c)(18),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({className:n,align:i,alignOffset:a,side:o,sideOffset:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?4:a,u=o===void 0?`right`:o,d=s===void 0?0:s,f;t[7]===n?f=t[8]:(f=_(`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]=f);let p;t[9]!==r||t[10]!==f?(p=(0,Y.jsx)(te,{"data-slot":`context-menu-content`,className:f,...r}),t[9]=r,t[10]=f,t[11]=p):p=t[11];let m;return t[12]!==c||t[13]!==l||t[14]!==u||t[15]!==d||t[16]!==p?(m=(0,Y.jsx)(F,{children:(0,Y.jsx)(le,{className:`isolate z-50 outline-none`,align:c,alignOffset:l,side:u,sideOffset:d,children:p})}),t[12]=c,t[13]=l,t[14]=u,t[15]=d,t[16]=p,t[17]=m):m=t[17],m}function pe(e){let t=(0,Z.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=_(`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]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,Y.jsx)(P,{"data-slot":`context-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function Q(e){let t=(0,Z.c)(11),n;t[0]!==e.person.id||t[1]!==e.person.name?(n=(0,Y.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,Y.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,Y.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,Y.jsxs)(Y.Fragment,{children:[n,i,o]}),t[7]=n,t[8]=i,t[9]=o,t[10]=s):s=t[10],s}function $(e){let t=(0,Z.c)(8),n;t[0]===e.person?n=t[1]:(n=(0,Y.jsx)(Q,{person:e.person}),t[0]=e.person,t[1]=n);let r;t[2]!==e.children||t[3]!==n?(r=(0,Y.jsxs)(`div`,{className:`flex h-10 min-w-0 items-center gap-3 px-1 text-sm`,children:[n,e.children]}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==e.failure||t[6]!==r?(i=(0,Y.jsxs)(`div`,{role:`listitem`,className:`border-b`,children:[r,e.failure]}),t[5]=e.failure,t[6]=r,t[7]=i):i=t[7],i}function me(e){let t=(0,Z.c)(28),n;t[0]===e.person.id?n=t[1]:(n=H(e.person.id),t[0]=e.person.id,t[1]=n);let[r,i]=z(n),a=e.person,o;t[2]===r?o=t[3]:(o=(0,Y.jsx)(N,{result:r,className:`mr-1 mb-2 ml-10 wrap-anywhere`}),t[2]=r,t[3]=o);let s;t[4]===e.person.since?s=t[5]:(s=B(e.person.since),t[4]=e.person.since,t[5]=s);let c;t[6]===s?c=t[7]:(c=(0,Y.jsx)(`span`,{className:`text-muted-foreground shrink-0 font-mono text-xs max-sm:hidden`,children:s}),t[6]=s,t[7]=c);let l;t[8]===r?l=t[9]:(l=x(r),t[8]=r,t[9]=l);let u;t[10]===i?u=t[11]:(u=()=>i(!0),t[10]=i,t[11]=u);let d;t[12]!==l||t[13]!==u?(d=(0,Y.jsx)(f,{size:`sm`,className:`shrink-0`,disabled:l,onClick:u,children:`Allow`}),t[12]=l,t[13]=u,t[14]=d):d=t[14];let p;t[15]===r?p=t[16]:(p=x(r),t[15]=r,t[16]=p);let m;t[17]===i?m=t[18]:(m=()=>i(!1),t[17]=i,t[18]=m);let h;t[19]!==p||t[20]!==m?(h=(0,Y.jsx)(f,{size:`sm`,variant:`outline`,className:`shrink-0`,disabled:p,onClick:m,children:`Decline`}),t[19]=p,t[20]=m,t[21]=h):h=t[21];let g;return t[22]!==e.person||t[23]!==h||t[24]!==o||t[25]!==c||t[26]!==d?(g=(0,Y.jsxs)($,{person:a,failure:o,children:[c,d,h]}),t[22]=e.person,t[23]=h,t[24]=o,t[25]=c,t[26]=d,t[27]=g):g=t[27],g}function he(e){let t=(0,Z.c)(34),n;t[0]===e.person.id?n=t[1]:(n=G(e.person.id),t[0]=e.person.id,t[1]=n);let[r,i]=z(n);if(e.person.role===`Admin`){let n;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Y.jsx)(q,{variant:`outline`,className:`shrink-0`,children:`admin`}),t[2]=n):n=t[2];let r;return t[3]===e.person?r=t[4]:(r=(0,Y.jsx)($,{person:e.person,children:n}),t[3]=e.person,t[4]=r),r}let a;t[5]===e.person.since?a=t[6]:(a=B(e.person.since),t[5]=e.person.since,t[6]=a);let o=`${e.person.fullName??e.person.name}, member since ${a}`,s;t[7]===o?s=t[8]:(s=(0,Y.jsx)(`div`,{role:`button`,tabIndex:0,"aria-haspopup":`menu`,"aria-label":o,className:`hover:bg-muted/50 flex h-10 min-w-0 items-center gap-3 px-1 text-sm`}),t[7]=o,t[8]=s);let c;t[9]===e.person?c=t[10]:(c=(0,Y.jsx)(Q,{person:e.person}),t[9]=e.person,t[10]=c);let l;t[11]===e.person.since?l=t[12]:(l=B(e.person.since),t[11]=e.person.since,t[12]=l);let u;t[13]===l?u=t[14]:(u=(0,Y.jsx)(`span`,{className:`text-muted-foreground shrink-0 font-mono text-xs`,children:l}),t[13]=l,t[14]=u);let d;t[15]!==s||t[16]!==c||t[17]!==u?(d=(0,Y.jsxs)(de,{render:s,children:[c,u]}),t[15]=s,t[16]=c,t[17]=u,t[18]=d):d=t[18];let f;t[19]===r?f=t[20]:(f=(0,Y.jsx)(N,{result:r,className:`mr-1 mb-2 ml-10 wrap-anywhere`}),t[19]=r,t[20]=f);let p;t[21]!==d||t[22]!==f?(p=(0,Y.jsxs)(`div`,{role:`listitem`,className:`border-b`,children:[d,f]}),t[21]=d,t[22]=f,t[23]=p):p=t[23];let m;t[24]===r?m=t[25]:(m=x(r),t[24]=r,t[25]=m);let h;t[26]===i?h=t[27]:(h=()=>i(),t[26]=i,t[27]=h);let g;t[28]!==m||t[29]!==h?(g=(0,Y.jsx)(fe,{className:`w-auto min-w-36`,children:(0,Y.jsx)(pe,{variant:`destructive`,disabled:m,onClick:h,children:`Remove`})}),t[28]=m,t[29]=h,t[30]=g):g=t[30];let _;return t[31]!==g||t[32]!==p?(_=(0,Y.jsxs)(ue,{children:[p,g]}),t[31]=g,t[32]=p,t[33]=_):_=t[33],_}function ge(){let e=(0,Z.c)(2),t=j(),n;return e[0]===t?n=e[1]:(n=e=>E(t)(C(`${e.fullName??``} ${e.name}`)),e[0]=t,e[1]=n),w(D(O(R(re).value,b(k,be)),n),{onEmpty:ye,onNonEmpty:_e})}function _e(e){return(0,Y.jsx)(`div`,{role:`list`,"aria-label":`People`,children:T(e,ve)})}function ve(e){return S(e.role===`Waiting`,{onFalse:()=>(0,Y.jsx)(he,{person:e},e.id),onTrue:()=>(0,Y.jsx)(me,{person:e},e.id)})}function ye(){return(0,Y.jsx)(p,{children:(0,Y.jsx)(d,{children:(0,Y.jsx)(v,{children:`No one matches`})})})}function be(e){return e.role!==`Waiting`}function xe(){let e=(0,Z.c)(2);if(!y(R(L).value,Se)){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(K,{to:`/`}),e[0]=t):t=e[0],t}let t;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(J.Suspense,{fallback:(0,Y.jsx)(ne,{label:`People`,media:!0,rows:3}),children:(0,Y.jsx)(ge,{})}),e[1]=t):t=e[1],t}function Se(e){return e.role===`Admin`}export{xe as component};
|
|
@@ -0,0 +1 @@
|
|
|
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{_n as i,ar as a,bn as o,gn as s,hn as c,ir as l,mn as u,tr as d,vn as f,yn as p}from"./toast-jmpTfttq.js";import{$a as m,$i as h,Aa as g,Ca as _,F as v,Ia as y,La as b,Pa as x,R as ee,U as S,Zi as C,ii as te,it as ne,ja as re,nt as ie,ot as w,pa as T,st as ae,wa as E}from"./effect--GriK3-G.js";import{A as D,B as O,C as oe,D as k,E as se,F as ce,G as le,H as A,K as ue,L as de,M as j,N as fe,P as M,R as pe,S as me,T as N,U as he,V as P,W as ge,_ as _e,a as ve,at as F,b as ye,c as be,d as xe,dt as Se,ft as I,gt as Ce,h as we,i as Te,it as L,k as Ee,lt as R,n as De,o as z,p as Oe,pt as ke,r as Ae,t as je,u as B,v as V,w as H,y as Me,z as U}from"./components-D9wzNB0x.js";import{n as Ne,r as Pe,t as Fe}from"./index-BAGe5tWl.js";import{t as Ie}from"./badge-CXIN133Y.js";var W={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};W.node;var Le=a(W),G={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};G.node;var K=a(G),q={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};q.node;var Re=a(q),J=e(r()),Y=t(),X=n();function Z(e){let t=(0,Y.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.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,X.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 Q(e){let t=(0,Y.c)(5),n;t[0]===e.className?n=t[1]:(n=d(`flex min-h-full 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,X.jsx)(`main`,{className:`pb-safe relative flex min-h-0 flex-1 justify-center overflow-y-auto px-4 pt-3`,children:(0,X.jsx)(`div`,{className:n,children:e.children})}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4],r}function $(e){let t=(0,Y.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 i;t[3]===n?i=t[4]:(i=d(`size-4 animate-spin`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(l,{"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var ze=`/assets/icon-3Ql0zGr9.svg`;function Be(){let e=(0,Y.c)(11),[t]=R(k),[n]=R(B),[r]=R(V),i;if(e[0]!==n||e[1]!==r||e[2]!==t){let a;e[4]===n?a=e[5]:(a=()=>v(n),e[4]=n,e[5]=a);let o;e[6]===r?o=e[7]:(o=()=>v(r),e[6]=r,e[7]=o),i=x(m(v(t),y(a),y(o)),{onNone:He,onSome:Ve}),e[0]=n,e[1]=r,e[2]=t,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,X.jsx)(L,{children:`GitHub sign-in failed. Try again.`}),e[8]=a):a=e[8];let o;return e[9]===i?o=e[10]:(o=(0,X.jsxs)(X.Fragment,{children:[i,a]}),e[9]=i,e[10]=o),o}function Ve(e){return(0,X.jsx)(L,{children:e.message})}function He(){return null}function Ue(e){let t=(0,Y.c)(34),[n,r]=R(Oe),i,a,s,c,l,u,d,f;if(t[0]!==n||t[1]!==r||t[2]!==e.id){a=S(n),i=o,s=`ghost`;let p;t[11]===e.id?p=t[12]:(p=H(e.id),t[11]=e.id,t[12]=p),c=`Copy the code ${p}`,l=`font-mono text-base font-semibold`,t[13]!==r||t[14]!==e.id?(u=()=>r(H(e.id)),t[13]=r,t[14]=e.id,t[15]=u):u=t[15],t[16]===e.id?d=t[17]:(d=H(e.id),t[16]=e.id,t[17]=d),f=C(a,{onFalse:Ge,onTrue:We}),t[0]=n,t[1]=r,t[2]=e.id,t[3]=i,t[4]=a,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f}else i=t[3],a=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10];let p=a&&`Copied`,m;t[18]===p?m=t[19]:(m=(0,X.jsx)(`span`,{role:`status`,className:`sr-only`,children:p}),t[18]=p,t[19]=m);let h;t[20]!==i||t[21]!==s||t[22]!==c||t[23]!==l||t[24]!==u||t[25]!==d||t[26]!==f||t[27]!==m?(h=(0,X.jsxs)(i,{variant:s,"aria-label":c,className:l,onClick:u,children:[d,f,m]}),t[20]=i,t[21]=s,t[22]=c,t[23]=l,t[24]=u,t[25]=d,t[26]=f,t[27]=m,t[28]=h):h=t[28];let g;t[29]===n?g=t[30]:(g=(0,X.jsx)(fe,{result:n}),t[29]=n,t[30]=g);let _;return t[31]!==h||t[32]!==g?(_=(0,X.jsxs)(X.Fragment,{children:[h,g]}),t[31]=h,t[32]=g,t[33]=_):_=t[33],_}function We(){return(0,X.jsx)(Ce,{className:`text-primary`})}function Ge(){return(0,X.jsx)(Le,{className:`text-muted-foreground`})}function Ke(e){let t=(0,Y.c)(13),n=I(se).value,r;t[0]!==n||t[1]!==e.expiresAt?(r=C(e.expiresAt-n<6e4,{onFalse:Je,onTrue:qe}),t[0]=n,t[1]=e.expiresAt,t[2]=r):r=t[2];let i;t[3]===r?i=t[4]:(i=(0,X.jsx)(j,{waiting:!0,status:r}),t[3]=r,t[4]=i);let a;t[5]!==n||t[6]!==e.expiresAt?(a=we(e.expiresAt,n),t[5]=n,t[6]=e.expiresAt,t[7]=a):a=t[7];let o;t[8]===a?o=t[9]:(o=(0,X.jsxs)(`span`,{children:[(0,X.jsx)(`span`,{className:`font-mono tabular-nums`,children:a}),` left`]}),t[8]=a,t[9]=o);let s;return t[10]!==i||t[11]!==o?(s=(0,X.jsxs)(`span`,{role:`timer`,className:`text-muted-foreground flex items-center gap-1.5 text-xs`,children:[i,o]}),t[10]=i,t[11]=o,t[12]=s):s=t[12],s}function qe(){return`warning`}function Je(){return`live`}function Ye(e){let t=(0,Y.c)(23),[n,r]=R(k),[i,a]=R(V),s=`Sign in ${e.request.clientName} on ${e.request.device}`,c;t[0]===s?c=t[1]:(c=(0,X.jsx)(`p`,{id:`waiting-title`,title:s,className:`max-w-full truncate text-base font-semibold`,children:s}),t[0]=s,t[1]=c);let l;t[2]===e.request.id?l=t[3]:(l=be(e.request.id),t[2]=e.request.id,t[3]=l);let u;t[4]===l?u=t[5]:(u=(0,X.jsx)(`span`,{className:`bg-card text-foreground rounded-md border p-1.5`,children:(0,X.jsx)(Ae,{text:l,className:`size-40`})}),t[4]=l,t[5]=u);let d;t[6]===e.request.id?d=t[7]:(d=(0,X.jsx)(Ue,{id:e.request.id}),t[6]=e.request.id,t[7]=d);let f;t[8]===e.request.expiresAt?f=t[9]:(f=(0,X.jsx)(Ke,{expiresAt:e.request.expiresAt}),t[8]=e.request.expiresAt,t[9]=f);let p;t[10]!==i||t[11]!==e.request.kind||t[12]!==n||t[13]!==a||t[14]!==r?(p=e.request.kind===`App`&&(0,X.jsxs)(`span`,{className:`flex flex-wrap justify-center gap-1`,children:[(0,X.jsxs)(o,{variant:`ghost`,size:`sm`,disabled:S(i),onClick:()=>a(),children:[(0,X.jsx)(K,{}),`Approve here with a passkey`]}),(0,X.jsxs)(o,{variant:`ghost`,size:`sm`,disabled:S(n),onClick:()=>r(),children:[(0,X.jsx)(Z,{}),`Approve here with GitHub`]})]}),t[10]=i,t[11]=e.request.kind,t[12]=n,t[13]=a,t[14]=r,t[15]=p):p=t[15];let m;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(Be,{}),t[16]=m):m=t[16];let h;return t[17]!==c||t[18]!==u||t[19]!==d||t[20]!==f||t[21]!==p?(h=(0,X.jsxs)(`section`,{className:`flex flex-1 flex-col items-center justify-center gap-3 pb-12 text-center`,"aria-labelledby":`waiting-title`,children:[c,u,d,f,p,m]}),t[17]=c,t[18]=u,t[19]=d,t[20]=f,t[21]=p,t[22]=h):h=t[22],h}function Xe(e){let t=(0,Y.c)(7),n;t[0]===e.id?n=t[1]:(n=oe(e.id),t[0]=e.id,t[1]=n);let r=I(n),i;if(t[2]!==e.account||t[3]!==r.value){let n;t[5]===e.account?n=t[6]:(n=t=>x(E(e.account,Ze),{onNone:()=>(0,X.jsx)(Ye,{request:t.request}),onSome:()=>(0,X.jsx)(J.Suspense,{fallback:(0,X.jsx)(F,{label:`Apps`,media:!0,rows:9}),children:(0,X.jsx)(De,{pending:b(t.request)})})}),t[5]=e.account,t[6]=n),i=m(r.value,w,ne({Decided:et,Expired:Qe,Waiting:n})),t[2]=e.account,t[3]=r.value,t[4]=i}else i=t[4];return i}function Ze(e){return e.role!==`Waiting`}function Qe(){return(0,X.jsxs)(u,{role:`status`,children:[(0,X.jsxs)(i,{children:[(0,X.jsx)(p,{children:`This sign-in expired`}),(0,X.jsx)(s,{children:`Start it again in the app or agent that asked.`})]}),(0,X.jsx)(c,{children:(0,X.jsx)(o,{variant:`outline`,onClick:$e,children:`Back to Auth`})})]})}function $e(){return location.assign(`/`)}function et(){return(0,X.jsx)(u,{role:`status`,children:(0,X.jsx)(i,{children:(0,X.jsx)(p,{children:`Continuing…`})})})}function tt(){let e=(0,Y.c)(2),t=Fe(),n;return e[0]===t?n=e[1]:(n=e=>(0,X.jsxs)(ce,{active:t({to:e.to})!==!1,render:(0,X.jsx)(Pe,{to:e.to}),children:[e.label,e.count>0&&(0,X.jsx)(Ie,{children:e.count})]},e.to),e[0]=t,e[1]=n),T([{count:0,label:`Sign-ins`,to:`/`},{count:h(I(ye).value,nt),label:`People`,to:`/people`}],n)}function nt(e){return e.role===`Waiting`}function rt(e){return m(w(e.account.role),ae(`Waiting`,()=>(0,X.jsx)(u,{role:`status`,children:(0,X.jsxs)(i,{children:[(0,X.jsx)(f,{children:(0,X.jsx)(j,{waiting:!0})}),(0,X.jsx)(p,{children:`Waiting for an admin`})]})})),ie(()=>(0,X.jsx)(Ne,{})))}function it(e){let t=(0,Y.c)(23),n=ke(Me),r=ee(n,lt),[i,a]=R(z),[o,s]=R(me),[c,l]=R(xe),u=U,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,X.jsx)(P,{children:`Passkeys`}),t[0]=d):d=t[0];let f;t[1]===n?f=t[2]:(f=x(v(n),{onNone:ct,onSome:st}),t[1]=n,t[2]=f);let p;t[3]!==s||t[4]!==o?(p=e=>(0,X.jsxs)(he,{children:[(0,X.jsxs)(le,{children:[(0,X.jsx)(K,{}),(0,X.jsx)(`span`,{className:`truncate`,children:e.addedFrom}),(0,X.jsx)(`span`,{className:`text-muted-foreground ml-auto pl-3 text-xs`,children:C(e.synced,{onFalse:ot,onTrue:at})})]}),(0,X.jsx)(ge,{children:(0,X.jsx)(O,{variant:`destructive`,disabled:S(o),onClick:()=>s(e.id),children:`Remove`})})]},e.id),t[3]=s,t[4]=o,t[5]=p):p=t[5];let m=T(r,p),h;t[6]!==i||t[7]!==c?(h=S(i)||S(c),t[6]=i,t[7]=c,t[8]=h):h=t[8];let g;t[9]!==a||t[10]!==l||t[11]!==e.via?(g=()=>C(e.via===`Code`,{onFalse:()=>a(),onTrue:()=>l()}),t[9]=a,t[10]=l,t[11]=e.via,t[12]=g):g=t[12];let _;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,X.jsx)(Re,{}),t[13]=_):_=t[13];let y;t[14]!==h||t[15]!==g?(y=(0,X.jsxs)(O,{disabled:h,onClick:g,children:[_,`Add a passkey`]}),t[14]=h,t[15]=g,t[16]=y):y=t[16];let b;return t[17]!==u||t[18]!==d||t[19]!==f||t[20]!==m||t[21]!==y?(b=(0,X.jsxs)(u,{children:[d,f,m,y]}),t[17]=u,t[18]=d,t[19]=f,t[20]=m,t[21]=y,t[22]=b):b=t[22],b}function at(){return`Synced`}function ot(){return`One device`}function st(e){return(0,X.jsx)(O,{disabled:!0,children:(0,X.jsxs)(`span`,{className:`text-destructive text-xs`,children:[`Passkeys unavailable · `,e.message]})})}function ct(){return null}function lt(){return[]}function ut(e){let t=(0,Y.c)(32),[n,r]=R(_e),i=Se(z),a,o;t[0]!==i||t[1]!==e.account.via?(a=()=>{sessionStorage.getItem(`adding-passkey`)!==null&&(sessionStorage.removeItem(Te),e.account.via!==`Code`&&i())},o=[i,e.account.via],t[0]=i,t[1]=e.account.via,t[2]=a,t[3]=o):(a=t[2],o=t[3]),(0,J.useEffect)(a,o);let s;t[4]!==e.account.id||t[5]!==e.account.name?(s=(0,X.jsx)(ue,{"aria-label":`Account`,className:`focus-visible:ring-ring rounded-full outline-none focus-visible:ring-2`,children:(0,X.jsx)(je,{id:e.account.id,name:e.account.name})}),t[4]=e.account.id,t[5]=e.account.name,t[6]=s):s=t[6];let c=e.account.fullName??e.account.name,l;t[7]===c?l=t[8]:(l=(0,X.jsx)(`span`,{className:`text-foreground block text-sm`,children:c}),t[7]=c,t[8]=l);let u=e.account.name,d;t[9]===e.account.role?d=t[10]:(d=te(e.account.role),t[9]=e.account.role,t[10]=d);let f=`@${u} · ${d}`,p;t[11]!==l||t[12]!==f?(p=(0,X.jsx)(U,{children:(0,X.jsxs)(P,{children:[l,f]})}),t[11]=l,t[12]=f,t[13]=p):p=t[13];let m;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(A,{}),t[14]=m):m=t[14];let h;t[15]!==e.account.role||t[16]!==e.account.via?(h=e.account.role!==`Waiting`&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(it,{via:e.account.via}),(0,X.jsx)(A,{})]}),t[15]=e.account.role,t[16]=e.account.via,t[17]=h):h=t[17];let g;t[18]===n?g=t[19]:(g=S(n),t[18]=n,t[19]=g);let _;t[20]===r?_=t[21]:(_=()=>r(),t[20]=r,t[21]=_);let v;t[22]!==g||t[23]!==_?(v=(0,X.jsx)(O,{variant:`destructive`,disabled:g,onClick:_,children:`Sign out`}),t[22]=g,t[23]=_,t[24]=v):v=t[24];let y;t[25]!==h||t[26]!==v||t[27]!==p?(y=(0,X.jsxs)(pe,{align:`end`,className:`w-auto min-w-48`,children:[p,m,h,v]}),t[25]=h,t[26]=v,t[27]=p,t[28]=y):y=t[28];let b;return t[29]!==y||t[30]!==s?(b=(0,X.jsxs)(de,{children:[s,y]}),t[29]=y,t[30]=s,t[31]=b):b=t[31],b}function dt(){let e=(0,Y.c)(32),[t,n]=R(k),[r,i]=R(B),[a,s]=R(V),c;e[0]===t?c=e[1]:(c=S(t),e[0]=t,e[1]=c);let l;e[2]===n?l=e[3]:(l=()=>n(),e[2]=n,e[3]=l);let u;e[4]===t?u=e[5]:(u=C(S(t),{onFalse:ht,onTrue:mt}),e[4]=t,e[5]=u);let d;e[6]!==c||e[7]!==l||e[8]!==u?(d=(0,X.jsxs)(o,{size:`lg`,disabled:c,onClick:l,children:[u,`Sign in with GitHub`]}),e[6]=c,e[7]=l,e[8]=u,e[9]=d):d=e[9];let f;e[10]===a?f=e[11]:(f=S(a),e[10]=a,e[11]=f);let p;e[12]===s?p=e[13]:(p=()=>s(),e[12]=s,e[13]=p);let m;e[14]===a?m=e[15]:(m=C(S(a),{onFalse:pt,onTrue:ft}),e[14]=a,e[15]=m);let h;e[16]!==f||e[17]!==p||e[18]!==m?(h=(0,X.jsxs)(o,{size:`lg`,variant:`outline`,disabled:f,onClick:p,children:[m,`Sign in with a passkey`]}),e[16]=f,e[17]=p,e[18]=m,e[19]=h):h=e[19];let g;e[20]===r?g=e[21]:(g=S(r),e[20]=r,e[21]=g);let _;e[22]===i?_=e[23]:(_=()=>i(),e[22]=i,e[23]=_);let v;e[24]!==g||e[25]!==_?(v=(0,X.jsx)(o,{size:`lg`,variant:`outline`,disabled:g,onClick:_,children:`Sign in with a code`}),e[24]=g,e[25]=_,e[26]=v):v=e[26];let y;e[27]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,X.jsx)(Be,{}),e[27]=y):y=e[27];let b;return e[28]!==v||e[29]!==d||e[30]!==h?(b=(0,X.jsxs)(`section`,{className:`flex flex-1 flex-col justify-center gap-2 pb-12`,"aria-label":`Sign in`,children:[d,h,v,y]}),e[28]=v,e[29]=d,e[30]=h,e[31]=b):b=e[31],b}function ft(){return(0,X.jsx)($,{})}function pt(){return(0,X.jsx)(K,{})}function mt(){return(0,X.jsx)($,{})}function ht(){return(0,X.jsx)(Z,{})}function gt(){let e=(0,Y.c)(8),[t,n]=R(Ee),r,a;e[0]===n?(r=e[1],a=e[2]):(r=()=>n(),a=[n],e[0]=n,e[1]=r,e[2]=a),(0,J.useEffect)(r,a);let l;if(e[3]!==n||e[4]!==t){let r;e[6]===n?r=e[7]:(r=e=>(0,X.jsxs)(u,{role:`alert`,children:[(0,X.jsxs)(i,{children:[(0,X.jsx)(p,{children:`Sign-out failed`}),(0,X.jsx)(s,{children:e.message})]}),(0,X.jsx)(c,{children:(0,X.jsx)(o,{variant:`outline`,onClick:()=>n(),children:`Try again`})})]}),e[6]=n,e[7]=r),l=x(v(t),{onNone:_t,onSome:r}),e[3]=n,e[4]=t,e[5]=l}else l=e[5];return l}function _t(){return(0,X.jsx)(u,{role:`status`,children:(0,X.jsx)(i,{children:(0,X.jsx)(p,{children:`Signing out…`})})})}function vt(){let e=(0,Y.c)(21),t=I(ve).value,n;e[0]===t?n=e[1]:(n=x(t,{onNone:Ot,onSome:Dt}),e[0]=t,e[1]=n);let r;e[2]===t?r=e[3]:(r=_(t,Et)&&(0,X.jsx)(J.Suspense,{fallback:null,children:(0,X.jsx)(tt,{})}),e[2]=t,e[3]=r);let i;e[4]===t?i=e[5]:(i=x(E(t,Tt),{onNone:wt,onSome:Ct}),e[4]=t,e[5]=i);let a;e[6]!==n||e[7]!==r||e[8]!==i?(a=(0,X.jsx)(M,{icon:ze,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=D&&(0,X.jsx)(gt,{}),e[10]=o):o=e[10];let s;e[11]===t?s=e[12]:(s=x(N,{onNone:St,onSome:e=>(0,X.jsx)(Xe,{account:t,id:e})}),e[11]=t,e[12]=s);let c;e[13]===t?c=e[14]:(c=x(t,{onNone:xt,onSome:yt}),e[13]=t,e[14]=c);let l;e[15]!==s||e[16]!==c?(l=(0,X.jsxs)(Q,{className:`max-w-xl`,children:[o,s,c]}),e[15]=s,e[16]=c,e[17]=l):l=e[17];let u;return e[18]!==a||e[19]!==l?(u=(0,X.jsxs)(X.Fragment,{children:[a,l]}),e[18]=a,e[19]=l,e[20]=u):u=e[20],u}function yt(e){return C(re(N)&&e.role!==`Waiting`,{onFalse:()=>(0,X.jsx)(rt,{account:e}),onTrue:bt})}function bt(){return null}function xt(){return g(N)&&!D&&(0,X.jsx)(dt,{})}function St(){return null}function Ct(){return[]}function wt(){}function Tt(e){return e.role!==`Waiting`}function Et(e){return e.role===`Admin`}function Dt(e){return(0,X.jsx)(ut,{account:e})}function Ot(){return!1}function kt(){let e=(0,Y.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsx)(M,{icon:ze,name:`auth`,account:!1}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(J.Suspense,{fallback:(0,X.jsxs)(X.Fragment,{children:[t,(0,X.jsx)(Q,{className:`max-w-xl`,children:(0,X.jsx)(F,{label:`Apps`,media:!0,rows:9})})]}),children:(0,X.jsx)(vt,{})}),e[1]=n):n=e[1],n}export{kt as component};
|