1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`f071606d256de3b2e5001e8c91951dd823c43bd6`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`f6a3d921-6475-4263-a915-d9e6f07b6289`,e._sentryDebugIdIdentifier=`sentry-dbid-f6a3d921-6475-4263-a915-d9e6f07b6289`)}catch{}})();import{o as e}from"./5v_HMQ8i.js";import{Ru as t,zu as n}from"./BikK9A2q.js";import{F as r,L as i,Ln as a,P as o,Xt as s,Yn as c,Zi as l,hr as u,io as d,no as f,ro as p,to as m,z as h}from"./D_H8ZTso.js";import{t as g}from"./CPV9fQTj.js";import{A as _,D as v,F as y,I as b,L as x,N as S,O as C,P as w,a as T,b as E,f as D,i as O,j as k,t as A,u as j,x as M}from"./D6cG3fmh.js";import{At as N,Bt as P,Ct as ee,Dt as te,Et as ne,Ft as F,Lt as I,Mt as L,Ot as R,Pt as z,Rt as B,St as V,Tt as H,Wt as U,jt as re,kt as W,wt as G,zt as K}from"./CiM3Z2gx.js";import{t as ie}from"./BBLlzr2t.js";var q=t(),J=e(n(),1);function ae({"aria-label":e=`Context toolbar`,className:t,left:n,right:r,...i}){return(0,q.jsxs)(`div`,{...i,"aria-label":e,className:g(`flex h-full min-w-0 items-center gap-3 px-4 text-sm text-hvn-text-secondary`,t),"data-context-bar":``,role:`toolbar`,children:[n?(0,q.jsx)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 overflow-hidden`,"data-context-bar-left":``,children:n}):null,r?(0,q.jsx)(`div`,{className:`ml-auto flex shrink-0 items-center justify-end gap-2`,"data-context-bar-right":``,children:r}):null]})}function oe({className:e,...t}){return(0,q.jsx)(`span`,{...t,"aria-orientation":`vertical`,className:g(`h-5 w-px shrink-0 bg-hvn-border-subtle`,e),"data-context-bar-divider":``,role:`separator`})}function se({align:e=`end`,children:t,contentClassName:n,disabled:r=!1,label:i=`More context`,side:a=`bottom`,trigger:o,triggerClassName:s}){return(0,q.jsxs)(K,{children:[(0,q.jsx)(U,{asChild:!0,disabled:r,children:o??(0,q.jsx)(`button`,{"aria-label":i,className:g(`flex size-8 items-center justify-center rounded-lg text-hvn-text-secondary transition-colors hover:bg-hvn-bg-surface hover:text-hvn-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-hvn-action-primary disabled:pointer-events-none disabled:opacity-50`,s),type:`button`,children:(0,q.jsx)(l,{"aria-hidden":!0,className:`size-4`})})}),(0,q.jsx)(B,{children:(0,q.jsx)(z,{align:e,className:g(`z-50 min-w-48 overflow-hidden rounded-hvn-md border border-hvn-border-default bg-hvn-bg-elevated p-1 text-sm text-hvn-text-primary shadow-hvn-2 outline-none`,`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,n),collisionPadding:8,side:a,sideOffset:8,children:t})})]})}var Y=(0,J.forwardRef)(function({children:e,className:t,icon:n,...r},i){return(0,q.jsxs)(F,{ref:i,className:g(`flex w-full cursor-default select-none items-center gap-2 rounded-hvn-sm px-2 py-1.5 text-left text-xs outline-none transition-colors`,`data-[highlighted]:bg-hvn-surface-muted data-[highlighted]:text-hvn-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,t),...r,children:[n?(0,q.jsx)(`span`,{className:`flex size-4 shrink-0 items-center justify-center text-hvn-text-secondary`,children:n}):null,(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e})]})}),X=(0,J.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(I,{ref:n,className:g(`px-2 py-1.5 text-xs font-medium text-hvn-text-tertiary`,e),...t})}),ce=(0,J.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(P,{ref:n,className:g(`-mx-1 my-1 h-px bg-hvn-border-subtle`,e),...t})}),le=[`avatar1`,`avatar2`,`avatar3`,`avatar4`,`avatar5`,`avatar6`,`avatar7`,`avatar8`],Z={xxs:{root:`h-4 w-4`,status:`h-1.5 w-1.5`},xs:{root:`h-6 w-6`,status:`h-2 w-2`},sm:{root:`h-7 w-7`,status:`h-2.5 w-2.5`},md:{root:`h-8 w-8`,status:`h-3 w-3`},lg:{root:`h-10 w-10`,status:`h-3.5 w-3.5`},xl:{root:`h-12 w-12`,status:`h-4 w-4`}},Q={xxs:`-ml-1`,xs:`-ml-1.5`,sm:`-ml-2`,md:`-ml-2`,lg:`-ml-2.5`,xl
1:`-ml-3`},ue={xxs:`h-2.5 w-2.5`,xs:`h-3 w-3`,sm:`h-3.5 w-3.5`,md:`h-4 w-4`,lg:`h-4 w-4`,xl:`h-5 w-5`},$={xxs:`text-xs font-medium leading-none`,xs:`text-xs font-medium leading-none`,sm:`text-xs font-semibold leading-none`,md:`text-sm font-semibold leading-none`,lg:`text-base font-semibold leading-none`,xl:`text-lg font-semibold leading-none`},de={neutral:`bg-hvn-surface-secondary text-hvn-text-primary`,brand:`bg-hvn-action-primary text-hvn-action-primaryText`,avatar1:`bg-hvn-avatar-1 text-hvn-avatar-text`,avatar2:`bg-hvn-avatar-2 text-hvn-avatar-text`,avatar3:`bg-hvn-avatar-3 text-hvn-avatar-text`,avatar4:`bg-hvn-avatar-4 text-hvn-avatar-text`,avatar5:`bg-hvn-avatar-5 text-hvn-avatar-text`,avatar6:`bg-hvn-avatar-6 text-hvn-avatar-text`,avatar7:`bg-hvn-avatar-7 text-hvn-avatar-text`,avatar8:`bg-hvn-avatar-8 text-hvn-avatar-text`},fe={online:`bg-hvn-status-success`,busy:`bg-hvn-status-error`,away:`bg-hvn-status-warning`,offline:`bg-hvn-border-strong`},pe={xxs:`rounded-hvn-sm`,xs:`rounded-hvn-sm`,sm:`rounded-hvn-sm`,md:`rounded-hvn-md`,lg:`rounded-xl`,xl:`rounded-xl`},me={xxs:`hidden`,xs:`hidden`,sm:`hidden`,md:`size-3 text-[8px]`,lg:`size-3.5 text-[9px]`,xl:`size-4 text-[10px]`};function he({organization:e,size:t}){let n=e.name.trim();return(0,q.jsx)(_,{children:(0,q.jsxs)(v,{children:[(0,q.jsx)(k,{asChild:!0,children:(0,q.jsx)(`span`,{tabIndex:0,role:`img`,"aria-label":`Organization: ${n}`,className:g(`absolute -bottom-0.5 -right-0.5 z-10 rounded-hvn-sm bg-hvn-surface-primary ring-2 ring-hvn-surface-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-hvn-action-primary`,me[t]),children:(0,q.jsxs)(L,{className:`flex h-full w-full items-center justify-center overflow-hidden rounded-[inherit]`,"aria-hidden":`true`,children:[e.logoSrc?(0,q.jsx)(re,{src:e.logoSrc,alt:``,className:`h-full w-full object-contain`}):null,(0,q.jsx)(N,{className:`flex h-full w-full items-center justify-center bg-hvn-surface-secondary font-semibold uppercase leading-none text-hvn-text-secondary`,children:Array.from(n)[0]})]})})}),(0,q.jsx)(C,{children:n})]})})}var ge=(0,J.createContext)(null);function _e(e,t){return e||(t===`org`||t===`external`?`rounded`:`circle`)}function ve(e,t){return e===`circle`?`rounded-full`:pe[t]}function ye(e){return e!==`xxs`&&e!==`xs`}function be(e,t){let n=e.trim().split(/\s+/).filter(Boolean),r=n[0]?.[0]??``;return t===`xxs`||t===`xs`?r.toUpperCase():`${r}${n[1]?.[0]??``}`.toUpperCase()}function xe(e){let t=e?.trim().toLowerCase();if(!t)return le[0];let n=0;for(let e=0;e<t.length;e++)n=n*31+t.charCodeAt(e)>>>0;return le[n%le.length]}function Se(e,t){return e&&e!==`auto`?e:t?.trim()?xe(t):`neutral`}function Ce({size:e=`md`,shape:t,type:n=`user`,bordered:r=!0,status:i,organization:a,className:o,children:s,...c}){let l=!!a?.name.trim()&&[`md`,`lg`,`xl`].includes(e),u=ve(_e(t,n),e);return(0,q.jsx)(L,{className:g(`relative flex shrink-0 items-center justify-center overflow-hidden`,l&&`overflow-visible`,Z[e].root,u,r&&`ring-1 ring-hvn-border-subtle`,o),...c,children:(0,q.jsxs)(ge.Provider,{value:e,children:[l?(0,q.jsx)(`span`,{className:`flex h-full w-full items-center justify-center overflow-hidden rounded-[inherit]`,children:s}):s,l&&a?(0,q.jsx)(he,{organization:a,size:e}):i?(0,q.jsx)(Ee,{status:i,size:e}):null]})})}function we(e){return(0,q.jsx)(re,{className:`h-full w-full object-cover`,...e})}function Te({variant:e=`filled`,name:t,icon:n,tone:r,size:i,className:a,children:o,...s}){let c=(0,J.useContext)(ge),l=i??c??`md`,u=Se(r,t),d=t?.trim();return(0,q.jsxs)(N,{className:g(`flex h-full w-full items-center justify-center uppercase`,$[l],e===`outline`?`rounded-[inherit] bg-transparent text-hvn-text-muted ring-1 ring-inset ring-hvn-border-default`:de[u],a),...s,children:[n?(0,q.jsx)(n,{className:ue[l],"aria-hidden":!0}):null,!n&&d?be(d,l):null,!n&&!d?o:null]})}function Ee({status:e,size:t=`md`,className:n}){return ye(t)?(0,q.jsx)(`span`,{className:g(`absolute -bottom-0.5 -right-0.5 rounded-full ring-2 ring-hvn-surface-primary`,Z[t].status,fe[e],n),"aria-hidden":!0}):null}function De({children:e,max:t=4,size:n=`sm`,className:r}){let i=J.Children.toArray(e),a=i.slice(0,t),o=i.length-a.length,s=Q[n];return(0,q.jsxs)(`div`,{className:g(`flex items-center`,r),children:[a.map((e,t)=>{let r=(()=>
1{if(!(0,J.isValidElement)(e))return`rounded-full`;let t=e.props;return ve(_e(t.shape,t.type),t.size??n)})(),i=((0,J.isValidElement)(e)?e.key:null)??((0,J.isValidElement)(e)?e.props.id:null)??t;return(0,q.jsx)(`div`,{className:g(`ring-2 ring-hvn-surface-primary`,r,t===0?`ml-0`:s),children:e},i)}),o>0?(0,q.jsx)(`div`,{className:g(s,`rounded-full ring-2 ring-hvn-surface-primary`),children:(0,q.jsx)(Ce,{size:n,children:(0,q.jsxs)(Te,{size:n,tone:`neutral`,className:`text-xs`,children:[`+`,o]})})}):null]})}var Oe=(0,J.createContext)(null);function ke(){return(0,J.useContext)(Oe)}var Ae=(0,J.createContext)({compact:!1});function je({children:e,compact:t,onRequestPreview:n}){return(0,q.jsx)(Ae.Provider,{value:{compact:t,requestPreview:n},children:e})}function Me(){return(0,J.useContext)(Ae).compact}function Ne(){return(0,J.useContext)(Ae)}var Pe=`xs`;function Fe({avatar:e,companyLogo:t,icon:n,visual:r}){return r?(0,q.jsx)(`span`,{className:`flex h-6 w-6 shrink-0 translate-y-px items-center justify-center overflow-hidden text-hvn-text-secondary`,children:r}):t?t.render({avatarSize:Pe,className:`shrink-0`}):e?(0,q.jsxs)(Ce,{bordered:e.bordered,className:`shrink-0`,size:Pe,type:e.type,children:[e.src?(0,q.jsx)(we,{src:e.src,alt:e.alt??e.name}):null,(0,q.jsx)(Te,{name:e.name,tone:e.tone})]}):n?(0,q.jsx)(n,{"aria-hidden":!0,className:`h-6 w-6 shrink-0 translate-y-px text-hvn-text-secondary`}):null}function Ie({actions:e,avatar:t,className:n,companyLogo:r,description:i,icon:o,leadingAction:s,title:c,visual:l}){let u=ke(),d=Me(),f=!!u,p=u?.collapsed?`Expand sidebar`:`Collapse sidebar`,m=!!i,h=m?`items-start`:`items-center`,y=Fe({avatar:t,companyLogo:r,icon:o,visual:l});return(0,q.jsxs)(`header`,{className:g(`flex flex-col gap-3 border-b border-hvn-border-subtle bg-hvn-surface-primary px-3 py-3 sm:flex-row sm:items-start sm:justify-between md:px-4`,d&&`bg-hvn-bg-field`,n),children:[(0,q.jsx)(`div`,{className:`min-w-0 w-full flex-1`,children:(0,q.jsxs)(`div`,{className:g(`flex min-w-0 gap-2.5`,h),children:[s?(0,q.jsx)(`div`,{className:`shrink-0`,children:s}):null,f?(0,q.jsx)(_,{children:(0,q.jsxs)(v,{children:[(0,q.jsx)(k,{asChild:!0,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":p,onClick:u?.toggleCollapsed,className:g(`hidden h-8 w-8 shrink-0 items-center justify-center rounded-hvn-md`,`text-hvn-text-secondary transition-colors lg:inline-flex`,`hover:bg-hvn-surface-hover hover:text-hvn-text-primary`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-hvn-border-focus`),children:(0,q.jsx)(a,{"aria-hidden":`true`,className:`h-4 w-4`})})}),(0,q.jsx)(C,{side:`bottom`,children:p})]})}):null,(0,q.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,q.jsxs)(`div`,{className:g(`flex min-w-0 gap-2.5`,h),children:[y,(0,q.jsxs)(`div`,{className:g(`min-w-0 flex-1`,!m&&`flex min-h-6 items-center`),children:[(0,q.jsx)(`h1`,{className:`truncate text-base font-semibold leading-6 text-hvn-text-primary md:text-lg md:leading-7`,children:c}),i?(0,q.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-hvn-text-secondary`,children:i}):null]})]})})]})}),e?(0,q.jsx)(`div`,{className:`w-full sm:w-auto sm:shrink-0`,children:e}):null]})}function Le(e){let{children:t,className:n,href:r,label:i=`Back`}=e,a=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(f,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0}),(0,q.jsx)(`span`,{className:`min-w-0 truncate`,children:t??i})]}),o=g(M({variant:`ghost`,size:`sm`}),`gap-1 rounded-full pl-2 pr-3 text-hvn-text-secondary`,n);if(r){let{children:t,className:n,href:r,label:s,...c}=e;return(0,q.jsx)(ie,{href:r,"aria-label":i,className:o,...c,children:a})}let{children:s,className:c,href:l,label:u,type:d=`button`,...p}=e;return(0,q.jsx)(`button`,{type:d,"aria-label":i,className:o,...p,children:a})}var Re=`group relative flex items-center gap-2 rounded-lg px-2 py-1 text-xs text-muted-foreground transition hover:bg-muted/50 hover:text-foreground`,ze=(0,J.forwardRef)(function({icon:e,label:t,className:n,collapsed:r=!1,shortcutHint:i,asChild:a=!1,children:o,...s},c){let l=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`relative flex h-5 w-5 items-center justify-center rounded-md text-muted-foreground
1/80 [&>svg]:h-3.5 [&>svg]:w-3.5`,children:(0,q.jsx)(e,{})}),r?null:t]}),u=g(Re,r?`h-8 w-8 justify-center gap-0 px-0`:`w-full`,n),d=r?i?`${t} ${i}`:t:i,f=r?t:void 0,p=a&&(0,J.isValidElement)(o)?(0,J.cloneElement)(o,{className:g(u,o.props.className),...s,"aria-label":f??o.props[`aria-label`]},l):(0,q.jsx)(`button`,{ref:c,className:u,...s,"aria-label":f??s[`aria-label`],children:l});return d?(0,q.jsx)(_,{children:(0,q.jsxs)(v,{children:[(0,q.jsx)(k,{asChild:!0,children:p}),(0,q.jsx)(C,{side:r?`right`:`top`,align:`center`,sideOffset:8,children:d})]})}):p});ze.displayName=`SidebarFooterLink`;var Be={neutral:`bg-hvn-text-primary text-hvn-text-inverse`,info:`bg-hvn-status-infoSolid text-hvn-text-inverse`,success:`bg-hvn-status-successSolid text-hvn-text-inverse`,warning:`bg-hvn-status-warningSolid text-hvn-text-primary`,danger:`bg-hvn-status-errorSolid text-hvn-text-inverse`},Ve={xs:`h-4 text-[11px]`,sm:`h-5 text-xs`,md:`h-6 text-sm`},He={xs:{compact:`w-4 px-0`,overflow:`min-w-6 px-1`},sm:{compact:`w-5 px-0`,overflow:`min-w-7 px-1.5`},md:{compact:`w-6 px-0`,overflow:`min-w-8 px-2`}},Ue={none:``,trailing:`mr-1.5`};function We(e){return Number.isFinite(e)?Math.max(0,Math.trunc(e)):0}function Ge(e,t){let n=We(e);if(typeof t!=`number`||!Number.isFinite(t))return String(n);let r=We(t);return n>r?`${r}+`:String(n)}function Ke({count:e,max:t,size:n=`sm`,spacing:r=`none`,tone:i=`neutral`,className:a,...o}){let s=Ge(e,t),c=s.length<=2?He[n].compact:He[n].overflow;return(0,q.jsx)(`span`,{className:g(`inline-flex shrink-0 items-center justify-center rounded-full align-middle font-semibold leading-none tabular-nums`,Ve[n],c,Ue[r],Be[i],a),...o,children:(0,q.jsx)(`span`,{children:s})})}var qe={outlined:`border-hvn-border-default bg-hvn-bg-field`,subtle:`border-transparent bg-hvn-bg-surface`,plain:`border-transparent bg-transparent`},Je={danger:`bg-hvn-status-errorSolid`,info:`bg-hvn-status-infoSolid`,neutral:`bg-hvn-text-tertiary`,success:`bg-hvn-status-successSolid`,warning:`bg-hvn-status-warningSolid`},Ye={danger:`bg-hvn-status-errorBg text-hvn-status-error`,info:`bg-hvn-status-infoBg text-hvn-status-info`,neutral:`bg-hvn-bg-surface text-hvn-text-secondary`,success:`bg-hvn-status-successBg text-hvn-status-success`,warning:`bg-hvn-status-warningBg text-hvn-status-warning`};function Xe(e){return e!==void 0&&(e.type===`dot`||Number.isFinite(e.count)&&e.count>0)}function Ze({compact:e,indicator:t}){let n=t.tone??`neutral`;return t.type===`count`?(0,q.jsx)(`span`,{"aria-hidden":!0,className:g(`shrink-0`,e&&`absolute -right-1.5 -top-1 origin-center scale-75`),"data-sidebar-menu-item-indicator":`count`,children:(0,q.jsx)(`span`,{className:g(`inline-flex h-4 min-w-4 items-center justify-center rounded px-1 text-[10px] font-medium leading-none tabular-nums`,Ye[n]),children:Ge(t.count,t.max??99)})}):(0,q.jsx)(`span`,{"aria-hidden":!0,className:g(`size-2 shrink-0 rounded-full`,Je[n],e&&`absolute -right-0.5 -top-0.5 ring-2 ring-hvn-surface-elevated`),"data-sidebar-menu-item-indicator":`dot`})}function Qe({active:e=!1,ariaKeyShortcuts:t,className:n,disabled:r=!1,href:i,icon:a,iconAppearance:o=`plain`,iconClassName:s,indicator:c,label:l,leading:u,navigate:d,onSelect:f,renderLink:p,target:m,trailing:h,...y}){let b=Me(),[x,S]=(0,J.useState)(!1),w=Xe(c)?c:void 0,T=w&&typeof l==`string`?`${l}, ${w.label}`:void 0,E=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`span`,{"aria-hidden":!0,className:g(`relative flex size-7 shrink-0 items-center justify-center rounded-lg border text-hvn-text-secondary`,qe[o],e&&`text-hvn-text-primary`,!b&&o===`plain`&&`size-4 rounded-none border-0`,b&&`size-6 rounded-md border-transparent`,b&&e&&`bg-hvn-text-primary text-hvn-text-inverse`,s),children:[u??(a?(0,q.jsx)(a,{className:`size-4`}):null),b&&w?(0,q.jsx)(Ze,{compact:!0,indicator:w}):null]}),(0,q.jsxs)(`span`,{className:g(`min-w-0 flex-1 truncate`,b&&`sr-only`),children:[typeof l==`string`?(0,q.jsx)(D,{isLoading:x,children:l}):l,w?(0,q.jsxs)(`span`,{className:`sr-only`,children:[`, `,w.label]}):null]}),!b&&(w||h)?(0,q.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5`,children:[w?(0,q.jsx)(Ze,{compact:!1,indicator:w}):null,h]}):null]}),O=g(`group flex min-h-7 w-full items-center gap-2 rounded-lg px-2 text-left text-sm tracking-tight text-hvn-text-secondary transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-hvn-action-primary`,!r&&`hover:bg-hvn-bg-surface hover:text-hvn-text-primary`,e&&`bg-hvn-bg-surface font-medium text-hvn-text-primary`,r&&`cursor-not-allowed opacity-50`,b&&`min-h-7 justify-center gap-0 bg-transparent px-1 hover:bg-transparent`,n),A;if((0,J.useEffect)(()=>{S(!1)},[e,i]),i){let n={"aria-busy":x||void 0,"aria-current":e?`page`:void 0,"aria-disabled":r||void 0,"aria-keyshortcuts":t,"aria-label":T,children:E,className:O,href:i,onClick:t=>{if(r){t.preventDefault();return}let n=t.button===0&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&m!==`_blank`;!e&&n&&S(!0),f?.(),d&&n&&(t.preventDefault(),d(i))},rel:m===`_blank`?`noreferrer`:void 0,tabIndex:r?-1:void 0,target:m,...y};A=p?p(n):(0,q.jsx)(`a`,{...n})}else A=f?(0,q.jsx)(`button`,{"aria-current":e?`page`:void 0,"aria-keyshortcuts":t,"aria-label":T,className:O,disabled:r,onClick:f,type:`button`,...y,children:E}):(0,q.jsx)(`div`,{"aria-current":e?`page`:void 0,"aria-disabled":r||void 0,"aria-keyshortcuts":t,"aria-label":T,className:O,...y,children:E});
1return b?(0,q.jsx)(_,{speed:`quick`,children:(0,q.jsxs)(v,{children:[(0,q.jsx)(k,{asChild:!0,children:A}),(0,q.jsxs)(C,{side:`right`,children:[l,w?` · ${w.label}`:null]})]})}):A}function $e({children:e,className:t,defaultExpanded:n=!1,expanded:r,icon:i,label:a,onExpandedChange:o}){let s=Me(),c=(0,J.useId)(),[l,u]=(0,J.useState)(n),d=r??l;return s?(0,q.jsx)(`div`,{"aria-label":a,className:g(`space-y-0.5`,t),role:`group`,children:e}):(0,q.jsxs)(`div`,{className:g(`space-y-0.5`,t),children:[(0,q.jsxs)(`button`,{"aria-controls":c,"aria-expanded":d,className:`group flex min-h-7 w-full items-center gap-2 rounded-lg px-2 text-left text-sm tracking-tight text-hvn-text-secondary transition-colors hover:bg-hvn-bg-surface hover:text-hvn-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-hvn-action-primary`,onClick:()=>{let e=!d;r===void 0&&u(e),o?.(e)},type:`button`,children:[(0,q.jsxs)(`span`,{"aria-hidden":!0,className:`relative size-4 shrink-0`,"data-sidebar-menu-submenu-icon":``,children:[(0,q.jsx)(i,{className:`absolute inset-0 size-4 transition-opacity duration-150 group-hover:opacity-0 group-focus-visible:opacity-0 motion-reduce:transition-none`}),(0,q.jsx)(m,{className:g(`absolute inset-0 size-4 opacity-0 transition-[opacity,transform] duration-150 group-hover:opacity-100 group-focus-visible:opacity-100 motion-reduce:transition-none`,d&&`rotate-90`),"data-sidebar-menu-submenu-chevron":``})]}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,"data-sidebar-menu-submenu-label":``,children:a})]}),d?(0,q.jsx)(`div`,{"aria-label":a,className:`ml-3 space-y-0.5 border-l border-hvn-border-subtle pl-2`,id:c,role:`group`,children:e}):null]})}function et({ariaLabel:e,children:t,className:n,collapsedItemCount:r,collapseLabel:i=`Show less`,compactActive:a=!1,compactIcon:o,compactIndicator:s,compactLabel:c,compactOnSelect:l,defaultExpanded:u=!1,expandLabel:d=`See all`,expanded:f,onExpandedChange:m,title:h}){let{compact:_,requestPreview:v}=Ne(),y=(0,J.useId)(),[b,x]=(0,J.useState)(u),S=f??b,C=J.Children.toArray(t),w=r===void 0?void 0:Math.max(1,Math.trunc(r)),T=w!==void 0&&C.length>w,E=T&&!S?C.slice(0,w):C,D=()=>{let e=!S;f===void 0&&x(e),m?.(e)};if(_&&o){let t=c??(typeof h==`string`?h:e)??`Navigation section`;return(0,q.jsx)(`section`,{"aria-label":t,className:n,children:(0,q.jsx)(Qe,{active:a,icon:o,indicator:s,label:t,onSelect:l??v})})}return(0,q.jsxs)(`section`,{"aria-label":h?void 0:e,"aria-labelledby":h?`${y}-title`:void 0,className:n,children:[h?(0,q.jsx)(`h2`,{className:g(`truncate px-2 pb-1 text-[10px] font-semibold uppercase tracking-wider text-hvn-text-tertiary`,_&&`sr-only`),"data-hvn-sidebar-muted-text":``,id:`${y}-title`,children:h}):null,(0,q.jsx)(`div`,{className:`space-y-0.5`,id:`${y}-items`,children:E}),T&&!_?(0,q.jsxs)(`button`,{"aria-controls":`${y}-items`,"aria-expanded":S,className:`mt-1 flex min-h-7 w-full items-center gap-2 rounded-lg px-2 text-left text-2xs font-medium text-hvn-text-tertiary transition-colors hover:bg-hvn-bg-surface hover:text-hvn-text-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-hvn-action-primary`,"data-hvn-sidebar-muted-text":``,onClick:D,type:`button`,children:[(0,q.jsx)(p,{"aria-hidden":!0,className:g(`size-3.5 transition-transform duration-200 ease-out motion-reduce:transition-none`,S&&`rotate-180`)}),S?i:d]}):null]})}var tt=te,nt=W,rt=ne,it=`right`,at=`default`,ot=`hvn-sheet-animation-styles`,st=` 2@keyframes hvn-sheet-overlay-in { 3 from { opacity: 0; } 4 to { opacity: 1; } 5} 6 7@keyframes hvn-sheet-overlay-out { 8 from { opacity: 1; } 9 to { opacity: 0; } 10} 11 12@keyframes hvn-sheet-in-right { 13 from { transform: translate3d(100%, 0, 0); opacity: 0; } 14 to { transform: translate3d(0, 0, 0); opacity: 1; } 15} 16 17@keyframes hvn-sheet-out-right { 18 from { transform: translate3d(0, 0, 0); opacity: 1; } 19 to { transform: translate3d(100%, 0, 0); opacity: 0; } 20} 21 22@keyframes hvn-sheet-in-left { 23 from { transform: translate3d(-100%, 0, 0); opacity: 0; } 24 to { transform: translate3d(0, 0, 0); opacity: 1; } 25} 26 27@keyframes hvn-sheet-out-left { 28 from { transform: translate3d(0, 0, 0); opacity: 1; } 29 to { transform: translate3d(-100%, 0, 0); opacity: 0; } 30} 31 32@keyframes hvn-sheet-in-top { 33 from { transform: translate3d(0, -100%, 0); opacity: 0; } 34 to { transform: translate3d(0, 0, 0); opacity: 1; } 35} 36 37@keyframes hvn-sheet-out-top { 38 from { transform: translate3d(0, 0, 0); opacity: 1; } 39 to { transform: translate3d(0, -100%, 0); opacity: 0; } 40} 41 42@keyframes hvn-sheet-in-bottom { 43 from { transform: translate3d(0, 100%, 0); opacity: 0; } 44 to { transform: translate3d(0, 0, 0); opacity: 1; } 45} 46 47@keyframes hvn-sheet-out-bottom { 48 from { transform: translate3d(0, 0, 0); opacity: 1; } 49 to { transform: translate3d(0, 100%, 0); opacity: 0; } 50} 51 52.hvn-sheet-overlay[data-state="open"] { 53 animation: hvn-sheet-overlay-in 300ms cubic-bezier(0.16, 1, 0.3, 1) both; 54} 55 56.hvn-sheet-overlay[data-state="closed"] { 57 animation: hvn-sheet-overlay-out 200ms cubic-bezier(0.4, 0, 1, 1) both; 58} 59 60.hvn-sheet-content[data-state="open"] { 61 animation-duration: 300ms; 62 animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); 63 animation-fill-mode: both; 64} 65 66.hvn-sheet-content[data-state="closed"] { 67 animation-duration: 200ms; 68 animation-timing-function: cubic-bezier(0.4, 0, 1, 1); 69 animation-fill-mode: both; 70} 71 72.hvn-sheet-content[data-side="right"][data-state="open"] { animation-name: hvn-sheet-in-right; } 73.hvn-sheet-content[data-side="right"][data-state="closed"] { animation-name: hvn-sheet-out-right; } 74.hvn-sheet-content[data-side="left"][data-state="open"] { animation-name: hvn-sheet-in-left; } 75.hvn-sheet-content[data-side="left"][data-state="closed"] { animation-name: hvn-sheet-out-left; } 76.hvn-sheet-content[data-side="top"][data-state="open"] { animation-name: hvn-sheet-in-top; } 77.hvn-sheet-content[data-side="top"][data-state="closed"] { animation-name: hvn-sheet-out-top; } 78.hvn-sheet-content[data-side="bottom"][data-state="open"] { animation-name: hvn-sheet-in-bottom; } 79.hvn-sheet-content[data-side="bottom"][data-state="closed"] { animation-name: hvn-sheet-out-bottom; } 80 81@media (prefers-reduced-motion: reduce) { 82 .hvn-sheet-overlay[data-state], 83 .hvn-sheet-content[data-state] { 84 animation-duration: 1ms !important; 85 } 86} 87`,ct=g(`hvn-sheet-overlay fixed inset-0 z-50 outline-none`),lt={default:`bg-black/50`,blurred:`bg-black/50 backdrop-blur-sm`,invisible:`bg-transparent`,none:null};
87function ut(){if(typeof document>`u`||document.getElementById(ot))return;let e=document.createElement(`style`);e.id=ot,e.textContent=st,document.head.appendChild(e)}var dt=g(`hvn-sheet-content fixed z-50 flex max-h-[100dvh] flex-col overflow-hidden border border-hvn-border-default`,`bg-hvn-bg-elevated text-hvn-text-primary shadow-hvn-2 outline-none`),ft={top:`inset-x-0 top-0 w-full max-h-[85dvh] border-x-0 border-t-0`,right:`inset-y-0 right-0 h-full w-full max-w-[42rem] border-y-0 border-r-0`,bottom:`inset-x-0 bottom-0 w-full max-h-[85dvh] border-x-0 border-b-0`,left:`inset-y-0 left-0 h-full w-full max-w-[42rem] border-y-0 border-l-0`};function pt({className:e,...t},n){return(0,q.jsx)(H,{ref:n,className:g(ct,e),...t})}var mt=(0,J.forwardRef)(pt);mt.displayName=H.displayName;function ht({side:e=it,overlay:t=at,className:n,children:r,showCloseButton:i=!0,closeLabel:a=`Close`,...o},s){(0,J.useEffect)(()=>{ut()},[]);let c=lt[t];return(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(rt,{children:[c?(0,q.jsx)(V,{asChild:!0,children:(0,q.jsx)(mt,{className:c})}):null,(0,q.jsxs)(ee,{ref:s,"data-side":e,className:g(dt,ft[e],n),...o,children:[r,i?(0,q.jsx)(V,{asChild:!0,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":a,className:g(`absolute right-3 top-3 inline-flex h-8 w-8 items-center justify-center`,`rounded-hvn-sm border border-transparent text-hvn-text-secondary`,`transition-colors duration-hvn-fast ease-hvn-standard`,`hover:bg-hvn-surface-muted hover:text-hvn-text-primary`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-hvn-action-primary`),children:(0,q.jsx)(h,{className:`h-4 w-4`,"aria-hidden":`true`})})}):null]})]})})}var gt=(0,J.forwardRef)(ht);gt.displayName=ee.displayName;function _t({className:e,...t}){return(0,q.jsx)(`div`,{className:g(`flex flex-col gap-1 px-4 pt-4 pr-12`,e),...t})}function vt({className:e,children:t,overflowAction:n,primaryAction:r,secondaryActions:i,...a}){let o=(Array.isArray(i)?i:i?[i]:[]).slice(0,2),s=!!n,c=o.length>0||s,l=!!(r||c);return(0,q.jsxs)(`div`,{className:g(`mt-auto border-t border-hvn-border-subtle px-4 py-3`,`bg-hvn-surface-primary`,e),...a,children:[t?(0,q.jsx)(`div`,{className:`mb-2`,children:t}):null,l?(0,q.jsxs)(`div`,{className:`flex w-full shrink-0 items-center justify-end overflow-x-auto`,children:[c?(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o.map((e,t)=>(0,q.jsx)(`span`,{className:`inline-flex`,children:e},`secondary-${t}`)),s?(0,q.jsx)(`span`,{className:`inline-flex`,children:n}):null]}):null,r?(0,q.jsx)(`span`,{className:g(`inline-flex`,c?`ml-4`:void 0),children:r}):null]}):null]})}function yt({className:e,...t}){return(0,q.jsx)(`div`,{className:g(`min-h-0 flex-1 overflow-y-auto px-4 py-4`,e),...t})}var bt=(0,J.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(R,{ref:n,className:g(`text-base font-semibold text-hvn-text-primary md:text-lg`,e),...t})});bt.displayName=R.displayName;var xt=(0,J.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(G,{ref:n,className:g(`text-sm text-hvn-text-secondary`,e),...t})});xt.displayName=G.displayName;function St({collapsed:e,fallback:t}){return typeof e==`boolean`?e:t}function Ct(e){return!e}function wt({collapsed:e,defaultCollapsed:t=!1,onCollapsedChange:n}){let[r,i]=(0,J.useState)(t),a=St({collapsed:e,fallback:r}),o=(0,J.useCallback)(t=>{typeof e!=`boolean`&&i(t),n?.(t)},[e,n]);return{collapsed:a,setCollapsed:o,toggleCollapsed:(0,J.useCallback)(()=>{o(Ct(a))},[a,o])}}var Tt={key:`b`,mod:!0},Et=140,Dt=240,Ot=`(min-width: 1024px)`,kt=`(min-width: 1024px) and (max-width: 1279px)`;function At(e){return e instanceof HTMLElement?e.isContentEditable||e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.tagName===`SELECT`:!1}function jt({className:e,label:t,onClick:n,platform:r,tooltipSide:i}){let o=S({content:t,platform:r,shortcut:Tt,showShortcutHint:!0});return(0,q.jsx)(_,{speed:`quick`,children:(0,q.jsxs)(v,{children:[(0,q.jsx)(k,{asChild:!0,children:(0,q.jsx)(`button`,{"aria-keyshortcuts":x(Tt),"aria-label":t,className:g(`flex size-8 items-center justify-center rounded-lg text-[var(--color-sidebar-toggle-icon)] transition-colors hover:bg-hvn-bg-surface hover:text-[var(--color-sidebar-toggle-icon)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-hvn-action-primary`,e),"data-navigation-shell-toggle":``,onClick:n,type:`button`,children:(0,q.jsx)(a,{"aria-hidden":!0,
87className:`size-4`})})}),(0,q.jsx)(C,{side:i,children:o})]})})}function Mt({children:e,className:t,collapsed:n,collapsedSidebarWidth:r=`3rem`,collapseLabel:i=`Collapse sidebar`,contentClassName:a,contentTopBar:o,defaultCollapsed:s,defaultMobileOpen:c=!1,expandLabel:l=`Expand sidebar`,mobileMenuLabel:u=`Open navigation`,mobileOpen:d,onCollapsedChange:f,onMobileOpenChange:p,registerCollapseShortcut:m=!0,responsiveCollapse:h=!0,sidebar:_,sidebarClassName:v,sidebarHeader:x,sidebarLabel:S=`Primary navigation`,sidebarWidth:C=`17rem`}){let[w,T]=(0,J.useState)(`agnostic`),[E,D]=(0,J.useState)(!1),[O,k]=(0,J.useState)(c),A=(0,J.useRef)(null),j=(0,J.useRef)(null),{collapsed:M,setCollapsed:N,toggleCollapsed:P}=wt({collapsed:n,defaultCollapsed:s,onCollapsedChange:f}),ee=(0,J.useRef)(N),te=typeof C==`number`?`${C}px`:C,ne={"--navigation-shell-collapsed-width":typeof r==`number`?`${r}px`:r,"--navigation-shell-width":te},F=d??O,I=h&&n===void 0&&s===void 0,L=(0,J.useCallback)(e=>{d===void 0&&k(e),p?.(e)},[d,p]),R=(0,J.useCallback)(()=>{L(!1)},[L]),z=e=>typeof _==`function`?_({closeMobileSidebar:R,isMobile:e}):_,B=e=>typeof x==`function`?x({closeMobileSidebar:R,isMobile:e}):x,V=e=>typeof o==`function`?o({isMobile:e}):o,H=(0,J.useCallback)(()=>{A.current&&=(clearTimeout(A.current),null),j.current&&=(clearTimeout(j.current),null)},[]),U=(0,J.useCallback)(()=>{H(),M&&D(!0)},[H,M]),re=(0,J.useCallback)(()=>{H(),M&&(A.current=setTimeout(()=>{D(!0),A.current=null},Et))},[H,M]),W=(0,J.useCallback)(()=>{H(),M&&(j.current=setTimeout(()=>{D(!1),j.current=null},Dt))},[H,M]),G=(0,J.useCallback)(()=>{H(),D(!1),P()},[H,P]);(0,J.useEffect)(()=>{ee.current=N},[N]),(0,J.useEffect)(()=>{if(!I||typeof window.matchMedia!=`function`)return;let e=window.matchMedia(kt),t=()=>{ee.current(e.matches)};return t(),e.addEventListener(`change`,t),()=>{e.removeEventListener(`change`,t)}},[I]),(0,J.useEffect)(()=>{if(!F||typeof window.matchMedia!=`function`)return;let e=window.matchMedia(Ot),t=()=>{e.matches&&R()};return t(),e.addEventListener(`change`,t),()=>{e.removeEventListener(`change`,t)}},[R,F]),(0,J.useEffect)(()=>{T(y())},[]),(0,J.useEffect)(()=>()=>{H()},[H]),(0,J.useEffect)(()=>{M||(H(),D(!1))},[H,M]),(0,J.useEffect)(()=>{if(!E)return;let e=e=>{e.key===`Escape`&&(e.preventDefault(),H(),D(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[H,E]),(0,J.useEffect)(()=>{if(!m)return;let e=e=>{e.defaultPrevented||At(e.target)||!b(e,Tt)||typeof window.matchMedia==`function`&&!window.matchMedia(`(min-width: 1024px)`).matches||(e.preventDefault(),G())};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},[G,m]);let K=M&&E;return(0,q.jsxs)(`div`,{className:g(`group/navigation-shell h-screen min-h-0 w-full bg-hvn-surface-secondary p-0 lg:p-1`,t),"data-compact":M?`true`:`false`,"data-preview-open":K?`true`:`false`,"data-navigation-shell":``,style:ne,children:[(0,q.jsxs)(`div`,{className:g(`relative grid h-full min-h-0 w-full grid-cols-1 grid-rows-[minmax(0,1fr)] gap-0 overflow-hidden rounded-none bg-hvn-bg-field lg:rounded-2xl`,`transition-[grid-template-columns] duration-200 ease-out motion-reduce:transition-none lg:grid-rows-[minmax(0,1fr)]`,M?`lg:grid-cols-[minmax(0,1fr)]`:`lg:grid-cols-[var(--navigation-shell-width)_minmax(0,1fr)]`,`border-0 shadow-none lg:border lg:border-black/15 lg:shadow-2xl`),children:[(0,q.jsxs)(`aside`,{"aria-label":S,onBlurCapture:e=>{e.currentTarget.contains(e.relatedTarget)||W()},onFocusCapture:U,onMouseEnter:re,onMouseLeave:W,className:g(`hidden min-h-0 min-w-0 flex-col border-r bg-hvn-surface-elevated lg:flex`,M?g(`absolute left-0 top-0 h-12 w-[var(--navigation-shell-collapsed-width)] overflow-visible border-0 bg-transparent`,K&&`h-full w-[var(--navigation-shell-width)]`):`relative overflow-hidden border-hvn-bg-app`,K?`z-20`:`z-10`,v),"data-navigation-shell-sidebar":``,"data-hvn-sidebar-surface":``,children:[M?(0,q.jsx)(`div`,{className:`flex h-12 w-[var(--navigation-shell-collapsed-width)] shrink-0 items-center justify-center`,"data-navigation-shell-compact-launcher":``,children:(0,q.jsx)(jt,{label:l,onClick:G,platform:w,tooltipSide:`right`})}):null,(0,q.jsxs)(je,{compact:M&&!K,onRequestPreview:U,children:[!M&&x?(0,q.jsx)(`div`,{className:g(`shrink-0`,o?`shadow-none`:`border-b border-hvn-border-subtle`),"data-navigation-shell-sidebar-header":``,children:B(!1)}):null,(0,q.jsx)(`div`,{className:g(`min-h-0 flex-1`,K&&`absolute bottom-0 left-0 top-12 z-20 w-[var(--navigation-shell-width)] overflow-hidden border-r border-t border-hvn-border-default bg-hvn-surface-elevated shadow-hvn-2 animate-in fade-in-0 slide-in-from-left-1 duration-150 motion-reduce:animate-none`),"data-navigation-shell-floating-preview":K?``:void 0,"data-navigation-shell-navigation":``,children:K||!M?z(!1):null})]}),M?null:(0,q.jsx)(jt,{className:`absolute right-2 top-2 z-10`,label:i,onClick:G,platform:w,tooltipSide:`bottom`})]}),(0,q.jsxs)(`div`,{className:g(`relative z-0 flex min-h-0 min-w-0 flex-col overflow-hidden bg-hvn-surface-primary`,a),"data-navigation-shell-content":``,children:[o||M?(0,q.jsxs)(`div`,{className:g(`hidden h-12 shrink-0 items-center bg-hvn-surface-elevated lg:flex`,M&&`border-b border-hvn-border-subtle`,M&&`pl-[var(--navigation-shell-collapsed-width)]`),"data-navigation-shell-compact-header":M?``:void 0,"data-navigation-shell-content-top-bar":``,children:[M&&x?(0,q.jsx)(`div`,{className:g(`min-w-0 shrink-0 self-stretch`,o&&`w-[var(--navigation-shell-width)]`),"data-navigation-shell-compact-context":``,children:B(!1)}):null,M&&x&&o?(0,q.jsx)(oe,{"data-navigation-shell-context-divider":``}):null,o?(0,q.jsx)(`div`,{className:`h-full min-w-0 flex-1`,"data-navigation-shell-content-top-bar-content":``,children:V(!1)}):null]}):null,(0,q.jsxs)(`div`,{className:`flex h-12 shrink-0 items-center border-b border-hvn-border-subtle bg-hvn-surface-elevated lg:hidden`,"data-navigation-shell-mobile-header":``,children:[(0,q.jsx)(`div`,{className:`flex h-full w-fit shrink-0 items-center justify-center border-r border-hvn-border-subtle px-2`,children:(0,q.jsx)(jt,{label:u,onClick:()=>L(!0),platform:w,tooltipSide:`right`})}),(0,q.jsx)(`div`,{className:`min-w-0 flex-1 self-stretch`,children:B(!0)})]}),o?(0,q.jsx)(`div`,{className:`h-12 shrink-0 border-b border-hvn-border-subtle bg-hvn-surface-elevated lg:hidden`,"data-navigation-shell-mobile-context-bar":``,children:V(!0)}
87):null,(0,q.jsx)(je,{compact:M,children:(0,q.jsx)(`div`,{className:g(`min-h-0 flex-1 overflow-hidden`,M&&`bg-hvn-bg-field`),"data-navigation-shell-content-body":``,children:e})})]})]}),(0,q.jsx)(tt,{onOpenChange:L,open:F,children:(0,q.jsxs)(gt,{"aria-describedby":void 0,className:`w-[min(20rem,calc(100vw-1rem))] max-w-none p-0`,closeLabel:`Close navigation`,"data-hvn-sidebar-surface":``,side:`left`,children:[(0,q.jsx)(bt,{className:`sr-only`,children:S}),x?(0,q.jsx)(`div`,{className:`shrink-0 border-b border-hvn-border-subtle pr-10`,children:B(!0)}):null,(0,q.jsx)(je,{compact:!1,children:(0,q.jsx)(`div`,{className:`min-h-0 flex-1`,"data-navigation-shell-mobile-navigation":``,children:z(!0)})})]})})]})}function Nt({className:e,animate:t=!0,borderRadius:n,height:i,shape:a=`default`,style:s,variant:c=`default`,width:l,...u},d){let[f,p]=(0,J.useState)(!1);(0,J.useEffect)(()=>{p(!0)},[]);let m=o(),h=t&&c===`default`&&!(f&&m),_=t&&!h,v={...s,...n===void 0?{}:{borderRadius:n},...i===void 0?{}:{height:i},...l===void 0?{}:{width:l}};return(0,q.jsx)(`div`,{ref:d,"aria-hidden":`true`,className:g(`relative block shrink-0 overflow-hidden`,_&&`motion-safe:animate-pulse motion-reduce:animate-none`,a===`pill`&&`rounded-full`,a===`square`&&`rounded-hvn-sm`,a===`default`&&`rounded-hvn-md`,c===`default`&&`bg-hvn-surface-muted`,c===`surface`&&`bg-hvn-surface-secondary`,c===`subtle`&&`bg-hvn-border-subtle`,e),style:v,...u,children:h?(0,q.jsx)(r.span,{"aria-hidden":!0,className:g(`pointer-events-none absolute inset-0 -translate-x-full`,`bg-gradient-to-r from-transparent via-hvn-surface-primary/70 to-transparent`),animate:{x:[`0%`,`200%`]},transition:{duration:1.6,ease:`linear`,repeat:1/0}}):null})}var Pt=(0,J.forwardRef)(Nt);Pt.displayName=`Skeleton`;function Ft({src:e,companyName:t,alt:n=`${t||`Company`} logo`,size:r=`md`,className:i,imageClassName:a,isLoading:o=!1,showMonogram:s=!1,showMonogramOnEmpty:c=!1,fallbackTone:l=`auto`,bordered:u=!1,...d}){let[f,p]=(0,J.useState)(e?`idle`:`error`);(0,J.useEffect)(()=>{p(e?`idle`:`error`)},[e]);let m=s||(c||f===`error`)&&!!t,h=!!e&&!s&&f!==`error`,_=h&&f===`idle`&&!o;return o?(0,q.jsx)(Ce,{"aria-hidden":!0,bordered:u,className:i,size:r,type:`org`,children:(0,q.jsx)(Pt,{className:`h-full w-full rounded-[inherit]`})}):!h&&!m?(0,q.jsx)(Ce,{"aria-hidden":!0,bordered:u,className:g(`opacity-0`,i),size:r,type:`org`}):(0,q.jsxs)(Ce,{bordered:u,className:i,size:r,type:`org`,children:[_?(0,q.jsx)(Pt,{className:`absolute inset-0 z-10 h-full w-full rounded-[inherit]`}):null,h?(0,q.jsx)(we,{alt:n,className:g(`h-full w-full object-contain object-center transition-opacity`,_?`opacity-0`:`opacity-100`,a),onError:()=>p(`error`),onLoad:()=>p(`loaded`),src:e??void 0,...d}):null,m?(0,q.jsx)(Te,{name:t??void 0,tone:l}):null]})}function It({className:e,collapsedItemCount:t=3,navigate:n,onCompactSelect:r,organizations:i,renderLink:a,title:o=`Related entities`}){return i.length===0?null:(0,q.jsx)(et,{className:e,collapsedItemCount:t,compactIcon:c,compactOnSelect:r,expandLabel:`See all · ${i.length}`,title:o,children:i.map(e=>(0,q.jsx)(Qe,{href:e.href,label:e.name,navigate:n,renderLink:a,leading:e.logo?(0,q.jsx)(`span`,{className:`flex size-4 items-center justify-center overflow-hidden rounded-hvn-xs`,children:e.logo}):(0,q.jsx)(Ft,{bordered:!0,companyName:e.name,showMonogramOnEmpty:!0,size:`xxs`,src:e.logoUrl}),onSelect:e.onSelect,target:e.target},e.id))})}var Lt={key:`k`,mod:!0};function Rt({className:e,label:t=`Search`,onSelect:n,shortcut:r=Lt}){return(0,q.jsx)(Qe,{ariaKeyShortcuts:x(r),className:e,icon:s,label:t,onSelect:n,trailing:(0,q.jsxs)(`span`,{"aria-hidden":!0,className:`text-xs font-medium text-hvn-text-tertiary`,children:[(0,q.jsx)(`span`,{className:`hidden [html[data-platform=mac]_&]:inline`,children:w(r,`mac`).join(``)}),(0,q.jsx)(`span`,{className:`[html[data-platform=mac]_&]:hidden`,children:w(r,`non-mac`).join(``)})]})})}function zt({className:e,defaultOpen:t=!1,defaultQuery:n=``,emptyMessage:r=`No results found.`,filterItems:i=!0,inputLeading:a,inputRef:o,onInputKeyDown:c,onOpenChange:l,onQueryChange:u,open:f,placeholder:p=`Search customers, transactions, and more`,query:m,registerShortcut:h=!0,sections:_,shortcut:v=Lt,title:S=`Global search`}){let C=(0,J.useId)(),[E,D]=(0,J.useState)(t),[k,M]=(0,J.useState)(n),[N,P]=(0,J.useState)(),[ee,te]=(0,J.useState)(`agnostic`),ne=f??E,F=m??k,I=(0,J.useCallback)(e=>{f===void 0&&D(e),l?.(e)},[l,f]),L=(0,J.useCallback)(e=>{m===void 0&&M(e),u?.(e)},[u,m]),R=(0,J.useMemo)(()=>{let e=F.trim().toLowerCase();return!i||!e?_:_.map(t=>({...t,items:t.items.filter(t=>
87[t.label,t.description,...t.keywords??[]].filter(Boolean).some(t=>t?.toLowerCase().includes(e)))})).filter(e=>e.items.length>0)},[i,F,_]),z=(0,J.useMemo)(()=>R.flatMap(e=>e.items),[R]);(0,J.useEffect)(()=>{te(y())},[]),(0,J.useEffect)(()=>{ne&&(z.some(e=>e.id===N)||P(z[0]?.id))},[N,z,ne]),(0,J.useEffect)(()=>{if(!h)return;let e=e=>{e.defaultPrevented||!b(e,v)||(e.preventDefault(),I(!0))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h,I,v]);let B=e=>{I(e),e||L(n)},V=e=>{e.onSelect?.(),e.closeOnSelect!==!1&&B(!1)};return(0,q.jsx)(A,{onOpenChange:B,open:ne,children:(0,q.jsxs)(O,{"aria-keyshortcuts":x(v),className:g(`left-1/2 top-8 max-h-[calc(100vh-4rem)] max-w-2xl -translate-x-1/2 translate-y-0 overflow-hidden p-0 !rounded-2xl`,e),overlayClassName:`bg-black/30 backdrop-blur-none backdrop-brightness-25 backdrop-grayscale`,showCloseButton:!1,children:[(0,q.jsx)(j,{className:`sr-only`,children:S}),(0,q.jsx)(T,{className:`sr-only`,children:`Search across organizations, transactions, pages, and actions.`}),(0,q.jsx)(`div`,{className:`border-b border-hvn-border-subtle p-4 bg-hvn-bg-app`,children:(0,q.jsxs)(`div`,{className:`flex h-12 items-center gap-2 rounded-hvn-md border border-hvn-border-default bg-hvn-bg-field px-3 focus-within:ring-1 focus-within:ring-hvn-border-default`,children:[(0,q.jsx)(s,{"aria-hidden":!0,className:`size-4 shrink-0 text-hvn-text-secondary`}),a,(0,q.jsx)(`input`,{"aria-activedescendant":N?`${C}-${N}`:void 0,"aria-controls":C,"aria-expanded":`true`,"aria-label":S,autoFocus:!0,className:`min-w-0 flex-1 bg-transparent text-sm text-hvn-text-primary outline-none placeholder:text-hvn-text-tertiary`,onChange:e=>L(e.target.value),onKeyDown:e=>{let t=z.find(e=>e.id===N);if(c?.(e,t),e.defaultPrevented||z.length===0)return;let n=z.findIndex(e=>e.id===N);if((e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),P(z[(n+(e.key===`ArrowDown`?1:-1)+z.length)%z.length]?.id)),e.key===`Enter`){let t=z[n];if(t){if(e.preventDefault(),(e.metaKey||e.ctrlKey)&&t.href){window.open(t.href,`_blank`,`noopener,noreferrer`);return}V(t)}}},placeholder:p,ref:o,role:`combobox`,value:F}),(0,q.jsx)(`span`,{className:`flex items-center gap-1 text-hvn-text-tertiary`,children:w(v,ee).map(e=>(0,q.jsx)(`kbd`,{className:`inline-flex min-w-5 items-center justify-center rounded-hvn-sm border border-hvn-border-subtle bg-hvn-bg-surface px-1 py-0.5 text-[11px] font-medium leading-none`,children:e},e))})]})}),(0,q.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-3 hav-scrollbar`,id:C,role:`listbox`,children:[R.map(e=>(0,q.jsxs)(`section`,{"aria-labelledby":`${C}-${e.id}-label`,className:`mt-5 border-t border-hvn-border-subtle pt-4 first:mt-0 first:border-t-0 first:pt-0`,role:`group`,children:[(0,q.jsx)(`h2`,{className:`mb-2 px-2 text-[11px] font-semibold uppercase tracking-wide text-hvn-text-primary`,id:`${C}-${e.id}-label`,children:e.label}),(0,q.jsx)(`div`,{className:`space-y-0.5`,children:e.items.map(e=>{let t=e.icon,n=e.id===N,r=(0,q.jsxs)(q.Fragment,{children:[e.leading??(t?(0,q.jsx)(`span`,{className:`flex size-8 shrink-0 items-center justify-center rounded-hvn-sm border border-hvn-border-subtle bg-hvn-bg-field text-hvn-text-secondary`,children:(0,q.jsx)(t,{"aria-hidden":!0,className:`size-4`})}):null),(0,q.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.label}),e.current?(0,q.jsx)(`span`,{className:`rounded-full bg-hvn-bg-field px-2 py-0.5 text-[10px] font-medium text-hvn-text-secondary`,children:`Current`}):null]}),e.description?(0,q.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-hvn-text-tertiary`,children:e.description}):null]}),e.trailing?(0,q.jsx)(`span`,{className:`shrink-0 text-right text-xs text-hvn-text-secondary`,children:e.trailing}):e.current?(0,q.jsx)(d,{"aria-hidden":!0,className:`size-4 shrink-0`}):null]}),i=g(`flex min-h-10 w-full items-center gap-2.5 rounded-hvn-md px-2.5 py-1.5 text-left transition-colors`,n?`bg-hvn-bg-surface text-hvn-text-primary`:`text-hvn-text-secondary hover:bg-hvn-bg-surface hover:text-hvn-text-primary`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-hvn-action-primary`);
87return e.href?(0,q.jsx)(`a`,{"aria-selected":n,className:i,href:e.href,id:`${C}-${e.id}`,onClick:t=>{t.metaKey||t.ctrlKey||(t.preventDefault(),V(e))},onFocus:()=>P(e.id),onMouseMove:()=>P(e.id),role:`option`,children:r},e.id):(0,q.jsx)(`button`,{"aria-selected":n,className:i,id:`${C}-${e.id}`,onClick:()=>V(e),onFocus:()=>P(e.id),onMouseMove:()=>P(e.id),role:`option`,type:`button`,children:r},e.id)})})]},e.id)),z.length===0?(0,q.jsx)(`div`,{className:`px-3 py-12 text-center text-sm text-hvn-text-secondary`,children:r}):null]}),(0,q.jsxs)(`div`,{className:`flex items-center justify-between border-t border-hvn-border-subtle px-4 py-4 text-[11px] text-hvn-text-tertiary`,children:[(0,q.jsx)(`span`,{children:`Use â â to navigate · Enter to open`}),(0,q.jsx)(`span`,{children:`Esc to close`})]})]})})}function Bt({className:e,expanded:t,fallback:n,isLoading:r=!1,onSelect:i,organization:a}){let o=a??n,s=(0,q.jsxs)(q.Fragment,{children:[o.logo?(0,q.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-hvn-sm`,children:o.logo}):(0,q.jsx)(Ft,{bordered:!0,className:`shrink-0`,companyName:o.name,isLoading:r,showMonogramOnEmpty:!0,size:`xs`,src:o.logoUrl}),r?(0,q.jsx)(Pt,{className:`h-4 w-24`}):(0,q.jsx)(`span`,{className:`min-w-0 truncate text-sm font-semibold leading-4 tracking-tighter text-hvn-text-primary`,title:o.name,children:o.name}),(0,q.jsx)(p,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-hvn-text-secondary`})]}),c={"aria-label":`Current organization: ${o.name}`,className:g(`flex h-12 min-w-0 items-center gap-2 pl-3 pr-2`,i&&`w-full cursor-pointer text-left transition-colors hover:bg-hvn-bg-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-hvn-action-primary`,t&&`bg-hvn-bg-surface`,e),"data-fallback":a?void 0:`true`};return i?(0,q.jsx)(`button`,{...c,"aria-expanded":t,"aria-haspopup":`dialog`,onClick:i,type:`button`,children:s}):(0,q.jsx)(`div`,{...c,children:s})}function Vt(e){return e===`dark`?`dark`:``}function Ht(e){if(e!==`auto`)return e}var Ut={default:`bg-hvn-surface-primary`,soft:`bg-hvn-surface-muted`,inset:`bg-hvn-surface-secondary`},Wt={border:`border border-hvn-border-subtle`,shadow:`border border-hvn-border-subtle shadow-hvn-2`,none:``},Gt={none:`p-0`,sm:`p-3`,md:`p-4`,lg:`p-6`};function Kt({children:e,tone:t=`default`,elevation:n=`border`,radius:r=`2xl`,padding:i=`none`,theme:a=`auto`,className:o}){return(0,q.jsx)(`section`,{"data-theme":Ht(a),className:g(`flex min-w-0 flex-col overflow-hidden`,Vt(a),Ut[t],Wt[n],r===`lg`&&`rounded-hvn-lg`,r===`xl`&&`rounded-[1.25rem]`,r===`2xl`&&`rounded-[1.5rem]`,Gt[i],o),children:e})}function qt({children:e,theme:t=`auto`,className:n}){return(0,q.jsx)(`nav`,{"data-theme":Ht(t),className:g(`flex flex-col gap-1`,Vt(t),n),children:e})}function Jt({title:e,children:t,theme:n=`auto`,className:r}){return(0,q.jsxs)(`div`,{"data-theme":Ht(n),className:g(`pt-2`,Vt(n),r),children:[(0,q.jsx)(`p`,{className:`px-2.5 font-hvn-caption uppercase tracking-[0.16em] text-hvn-text-secondary`,children:e}),(0,q.jsx)(`div`,{className:`mt-1 flex flex-col gap-1`,children:t})]})}function Yt({title:e,icon:t,count:n,active:r=!1,disabled:i=!1,suffix:a,size:o=`sm`,onClick:s,theme:c=`auto`,className:l}){return(0,q.jsxs)(`button`,{type:`button`,onClick:i?void 0:s,"data-theme":Ht(c),className:g(`flex w-full items-center gap-2 rounded-hvn-md border transition-colors`,o===`xs`?`px-2.5 py-1.5 font-hvn-caption`:`px-2.5 py-2 font-hvn-body-sm`,r?`border-hvn-border-default bg-hvn-surface-primary shadow-hvn-1`:`border-transparent`,!r&&!i&&`hover:bg-hvn-surface-primary/80 hover:shadow-hvn-1`,i&&`cursor-not-allowed opacity-50`,Vt(c),l),"aria-current":r?`page`:void 0,children:[t?(0,q.jsx)(`span`,{className:g(`inline-flex h-5 w-5 items-center justify-center`,r?`text-hvn-text-primary`:`text-hvn-text-secondary`),children:t}):null,(0,q.jsx)(`span`,{className:`truncate text-left text-hvn-text-primary`,children:e}),typeof n==`number`?(0,q.jsx)(`span`,{className:`ml-auto font-hvn-data text-hvn-text-secondary`,children:n}):null,a?(0,q.jsx)(`span`,{className:`text-hvn-text-secondary`,children:a}):null]})}function Xt(e){if(!(typeof e!=`number`||!Number.isFinite(e)))return Math.max(0,e)}function Zt(e){return!Number.isFinite(e)||e<=0?`minmax(0, 0fr)`:`minmax(0, ${e}fr)`}function Qt({deltaPx:e,containerWidthPx:t}){return!Number.isFinite(e)||t<=0?0:e/t*100}var $t=8;function en(e){let t=e.filter(e=>e.isOpen!==!1);if(t.length===0)return;let n=t.find(e=>e.isMain);return n?n.id:t.reduce((e,t)=>
87{let n=e.lockedWidth??e.width;return(t.lockedWidth??t.width)>n?t:e},t[0]).id}function tn(e){return e.title??e.label??e.id}function nn(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function rn({maxVisible:e,openPanels:t,panelIds:n}){let r=new Set(t.map(e=>e.id)),i=n.filter((e,t)=>r.has(e)&&n.indexOf(e)===t),a=Math.max(0,e),o=a===0?[]:i.slice(-a),s=new Set(o);return t.filter(e=>s.has(e.id))}function an(e){let t=e.map(e=>({...e,lockedWidth:Xt(e.lockedWidth),width:Xt(e.width)??0})),n=t.filter(e=>e.lockedWidth===void 0),r=t.reduce((e,t)=>e+(t.lockedWidth??0),0),i=n.reduce((e,t)=>e+t.width,0);if(n.length>0&&r>=100){let e=r+i;if(e<=0){let e=100/Math.max(1,t.length);return t.map(()=>e)}return t.map(t=>(t.lockedWidth??t.width)/e*100)}let a=Math.max(0,100-r);return t.map(e=>e.lockedWidth===void 0?i<=0?a/Math.max(1,n.length):e.width/i*a:e.lockedWidth)}function on(e){return e.minWidthPx??320}function sn({panels:e,currentWidthsByPanelId:t,leftPanelIndex:n,deltaPx:r,containerWidthPx:i}){let a=e[n],o=e[n+1];if(!a||!o||i<=0)return t;let s=t[a.id],c=t[o.id];if(typeof s!=`number`||typeof c!=`number`)return t;let l=Qt({deltaPx:r,containerWidthPx:i}),u=on(a),d=on(o),f=Qt({deltaPx:u,containerWidthPx:i}),p=Qt({deltaPx:d,containerWidthPx:i}),m=s+c,h=Math.min(Math.max(s+l,f),m-p),g=m-h;return Math.abs(h-s)<.001&&Math.abs(g-c)<.001?t:{...t,[a.id]:h,[o.id]:g}}function cn({panels:e,maxVisible:t=3,visibilityStrategy:n=`fixed`,overflowBehavior:a=`slice`,animateOverflow:s=!0,visiblePanelIds:c,defaultVisiblePanelIds:l,onVisiblePanelIdsChange:d,focusedPanelId:f,defaultFocusedPanelId:p,onFocusedPanelIdChange:m,mobileBreakpointPx:h=768,allowResize:_=!1,resizeHandleLabel:v=`Resize surfaces`,showMobileMenuButton:y=!1,mobileMenuLabel:b=`Open menu`,mobileSurfacesLabel:x=`Surfaces`,onMobileMenuClick:S,className:C}){let w=(0,J.useRef)(null),T=(0,J.useRef)(null),D=(0,J.useRef)(null),O=(0,J.useRef)(0),k=(0,J.useRef)({}),A=(0,J.useRef)([]),[j,M]=(0,J.useState)(0),[N,P]=(0,J.useState)(!1),[ee,te]=(0,J.useState)(!1),[ne,F]=(0,J.useState)(()=>l),[I,L]=(0,J.useState)(()=>p),[R,z]=(0,J.useState)({}),[B,V]=(0,J.useState)(null),H=o(),U=(0,J.useMemo)(()=>e.filter(e=>e.isOpen!==!1),[e]),re=c!==void 0,W=f!==void 0,G=re?c:ne,K=j>0&&j<=h,ie=(0,J.useMemo)(()=>en(U),[U]),ae=W?f:I,oe=U.some(e=>e.id===ae)?ae:ie,se=G!==void 0,Y=se?rn({maxVisible:t,openPanels:U,panelIds:G??[]}):U,X=Y.find(e=>e.id===oe)??Y.find(e=>e.id===ie)??Y[0];(0,J.useEffect)(()=>{if(!K||!X?.id)return;let e=T.current;if(!e)return;let t=Array.from(e.querySelectorAll(`button[data-surface-panel-id]`)).find(e=>e.dataset.surfacePanelId===X.id);t&&t.scrollIntoView({behavior:H?`auto`:`smooth`,block:`nearest`,inline:`center`})},[K,X?.id,H]),(0,J.useEffect)(()=>{if(!K){P(!1),te(!1);return}let e=T.current;if(!e)return;let t=()=>{let t=e.scrollWidth-e.clientWidth,n=e.scrollLeft>1,r=t-e.scrollLeft>1;P(e=>e===n?e:n),te(e=>e===r?e:r)};t(),e.addEventListener(`scroll`,t,{passive:!0});let n;return typeof ResizeObserver<`u`&&(n=new ResizeObserver(()=>{t()}),n.observe(e)),()=>{e.removeEventListener(`scroll`,t),n?.disconnect()}},[K,Y.length]),(0,J.useEffect)(()=>{if(!W){if(U.length===0){L(void 0);return}I&&U.some(e=>e.id===I)||L(ie)}},[ie,W,U,I]);let ce=typeof S==`function`,le=(0,J.useMemo)(()=>{if(n!==`adaptive`||j<=0)return U.slice(Math.max(0,U.length-t));let e=[],r=0;for(let n=U.length-1;n>=0&&!(e.length>=t);--n){let t=U[n],i=t.minWidthPx??320,a=r+i+(e.length>0?$t:0);if(e.length===0||a<=j)e.unshift(t),r=a;else break}return e.length>0?e:U.slice(Math.max(0,U.length-1))},[j,t,U,n]),Z=(0,J.useMemo)(()=>se?rn({maxVisible:t,openPanels:U,panelIds:G??[]}):le,[le,se,t,U,G]),Q=(0,J.useMemo)(()=>Z.map(e=>e.id),[Z]);(0,J.useEffect)(()=>{re||!se||nn(G??[],Q)||F(Q)},[se,re,G,Q]),(0,J.useEffect)(()=>{d&&(nn(A.current,Q)||(A.current=Q,d(Q)))},[d,Q]);let ue=(0,J.useMemo)(()=>an(Z.map(e=>({...e,lockedWidth:e.lockedWidth??(e.initialWidthPx!==void 0&&j>0?e.initialWidthPx/j*100:void 0)}))),[Z,j]);(0,J.useEffect)(()=>{if(K||!_){z({}),V(null),D.current=null;return}z({}),V(null),D.current=null},[_,(0,J.useMemo)(()=>Z.map((e,t)=>`${e.id}:${e.width}:${e.lockedWidth??`auto`}:${e.minWidthPx??`default`}:${e.resizable??`default`}:${ue[t]??0}`).join(`|`),[ue,Z]),K]);let $=(0,J.useMemo)(()=>Z.map((e,t)=>{let n=ue[t]??0;return!_||K||e.lockedWidth!==void 0?n:R[e.id]??n}),[_,ue,K,R,Z]),de=(0,J.useMemo)(()=>j<=0&&Z.some(e=>e.initialWidthPx!==void 0&&e.lockedWidth===void 0)?Z.map(e=>e.initialWidthPx!==void 0&&e.lockedWidth===void 0?`${e.initialWidthPx}px`:e.lockedWidth===void 0?Zt(e.width):Zt(e.lockedWidth)):$.map(Zt),[$,j,Z]),fe=(0,J.useMemo)(()=>Z.flatMap((e,t)=>{let n=Z[t+1];return n&&_&&!K&&e.lockedWidth===void 0&&n.lockedWidth===void 0&&e.resizable!==!1&&n.resizable!==!1?[t]:[]}),[_,K,Z]),pe=(0,J.useMemo)(()=>{let e=0;if(j<=0)return $.map(t=>(e+=t,`${e}%`));let t=Math.max(0,$.length-1),n=Math.max(0,j-t*$t),r=$.reduce((e,t)=>
87e+t,0);return $.map((t,i)=>{let a=r>0?t/r*n:n/Math.max(1,$.length);return e+=a,`${e+(i+.5)*$t}px`})},[$,j]);(0,J.useLayoutEffect)(()=>{if(!w.current)return;let e=w.current,t=()=>{M(e.getBoundingClientRect().width)};if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(()=>{t()});return n.observe(e),()=>n.disconnect()},[]);let me=a===`shift`&&s&&!H&&Z.length>0;(0,J.useEffect)(()=>{if(B===null)return;let e=e=>{let t=D.current;t!==null&&z(sn({panels:Z,currentWidthsByPanelId:k.current,leftPanelIndex:t,deltaPx:e.clientX-O.current,containerWidthPx:j}))},t=()=>{D.current=null,V(null),document.body.style.userSelect=``,document.body.style.cursor=``},n=e=>{e.key===`Escape`&&t()};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),window.addEventListener(`keydown`,n),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t),window.removeEventListener(`keydown`,n),document.body.style.userSelect=``,document.body.style.cursor=``}},[B,j,Z]);let he=y||Y.length>1,ge=K?X?[X]:[]:Z,_e=[...ge,...e.filter(e=>e.keepMounted&&!ge.some(t=>t.id===e.id))];return(0,q.jsxs)(`div`,{ref:w,className:g(`relative min-h-0 gap-2`,K?`flex flex-1 flex-col`:`grid`,C,`group-data-[compact=true]/navigation-shell:gap-0`),style:K?void 0:{gridTemplateColumns:de.join(` `)},children:[K&&he?(0,q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 rounded-hvn-md p-1`,children:[y?(0,q.jsx)(E,{appearance:`outline`,iconLeft:u,iconLabel:b,intent:`tertiary`,onClick:S,disabled:!ce,size:`icon`,type:`button`}):null,(0,q.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,q.jsx)(`div`,{ref:T,role:`group`,"aria-label":x,className:`[-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:h-0 [&::-webkit-scrollbar]:w-0 flex min-w-0 flex-1 items-center gap-1 overflow-x-auto`,children:Y.map(e=>{let t=e.id===X?.id;return(0,q.jsx)(E,{appearance:t?`solid`:`outline`,shape:`pill`,className:`shrink-0 whitespace-nowrap`,"data-surface-panel-id":e.id,iconLabel:tn(e),intent:t?`secondary`:`tertiary`,onClick:()=>{W||L(e.id),m?.(e.id)},size:`sm`,type:`button`,children:tn(e)},e.id)})}),N?(0,q.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 left-0 z-10 w-8 bg-gradient-to-r from-hvn-surface-primary to-transparent`}):null,ee?(0,q.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 right-0 z-10 w-8 bg-gradient-to-l from-hvn-surface-primary to-transparent`}):null]})]}):null,!K&&me&&!e.some(e=>e.keepMounted)?(0,q.jsx)(i,{initial:!1,mode:`popLayout`,children:Z.map((e,t)=>(0,q.jsx)(r.div,{layout:!0,initial:{x:20,opacity:0},animate:{x:0,opacity:1},exit:{x:-20,opacity:0},transition:{duration:.2,ease:`easeOut`},className:g(`min-h-0 min-w-0`,t>0&&`group-data-[compact=true]/navigation-shell:border-l group-data-[compact=true]/navigation-shell:border-hvn-border-strong`),children:e.content},e.id))}):_e.map(e=>(0,q.jsx)(`div`,{hidden:!ge.some(t=>t.id===e.id),className:g(`min-h-0 min-w-0`,K&&`flex-1 overflow-y-auto hav-scrollbar`,!K&&Z.findIndex(t=>t.id===e.id)>0&&`group-data-[compact=true]/navigation-shell:border-l group-data-[compact=true]/navigation-shell:border-hvn-border-strong`),children:e.content},e.id)),!K&&fe.map(e=>{let t=Z[e],n=Z[e+1],r=pe[e]??0,i=B===e;return!t||!n?null:(0,q.jsx)(`button`,{type:`button`,"aria-label":`${v}: ${tn(t)} and ${tn(n)}`,className:`group absolute inset-y-0 z-20 w-4 -translate-x-1/2 cursor-col-resize bg-transparent focus-visible:outline-none`,style:{left:r},onMouseDown:t=>{O.current=t.clientX,k.current=Object.fromEntries(Z.map((e,t)=>[e.id,$[t]??0])),D.current=e,V(e),document.body.style.userSelect=`none`,document.body.style.cursor=`col-resize`},onKeyDown:t=>{let n=t.key===`ArrowLeft`?-16:t.key===`ArrowRight`?16:null;n!==null&&(t.preventDefault(),z(t=>sn({panels:Z,currentWidthsByPanelId:Object.fromEntries(Z.map((e,n)=>[e.id,t[e.id]??$[n]??0])),leftPanelIndex:e,deltaPx:n,containerWidthPx:j})))},children:(0,q.jsx)(`span`,{"aria-hidden":`true`,className:g(`absolute inset-y-0 left-1/2 w-0.5 -translate-x-1/2 rounded-full bg-transparent opacity-0 transition-[background-color,opacity] duration-100`,`group-hover:bg-hvn-action-primary group-hover:opacity-100 group-hover:shadow-[0_0_0_1px_theme(colors.hvn.action.primary)] group-focus-visible:bg-hvn-text-secondary group-focus-visible:opacity-100`,i?`bg-hvn-action-primary opacity-100 shadow-[0_0_0_1px_theme(colors.hvn.action.primary)]`:void 0)})},`${t.id}-${n.id}-resize-handle`)})]})}function ln({children:e,className:t,innerClassName:n,paddingClassName:r=`p-2`,theme:i=`auto`,globalNav:a,globalNavClassName:o,autoInsetGlobalNav:s=!0}){let c=(0,J.useRef)(null),[l,u]=(0,J.useState)(null);(0,J.useLayoutEffect)(()=>
87{if(!a||!s){u(null);return}let e=c.current;if(!e)return;let t=()=>{u(Math.ceil(e.getBoundingClientRect().width))};if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(()=>{t()});return n.observe(e),()=>n.disconnect()},[s,a]);let d=a&&s&&l!==null?`${l+12}px`:void 0;return(0,q.jsxs)(`div`,{"data-theme":Ht(i),className:g(`relative h-auto min-h-[560px] w-full overflow-visible bg-hvn-surface-muted lg:h-full lg:overflow-hidden`,Vt(i),t),children:[a?(0,q.jsx)(`div`,{className:g(`pointer-events-none absolute inset-y-2 left-2 z-20 flex`,o),children:(0,q.jsx)(`div`,{ref:c,className:`pointer-events-auto h-full`,children:a})}):null,(0,q.jsx)(`div`,{className:g(`h-full w-full box-border`,r,`group-data-[compact=true]/navigation-shell:p-0`,n),style:d?{paddingLeft:d}:void 0,children:e})]})}export{Me as A,et as C,Ie as D,ze as E,ae as F,se as I,Y as L,Ce as M,Te as N,Le as O,we as P,X as R,Qe as S,Ke as T,xt as _,Jt as a,bt as b,zt as c,Ft as d,Pt as f,gt as g,yt as h,Yt as i,De as j,je as k,Rt as l,tt as m,ln as n,Kt as o,Mt as p,qt as r,Bt as s,cn as t,It as u,vt as v,$e as w,nt as x,_t as y,ce as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.