import{aa as ne,r as l,j as t,aL as H,aC as _,aB as G,aA as z,aD as k,aE as Be,aF as K,c as S,aM as Ue,aN as We,aO as qe,aP as se,aQ as ae,aR as He,aS as Ke,aT as Qe,aU as Ye,R as b,aV as Xe,aW as Ze,V as Je,w as et,i as tt,O,P as F,U as M,B as W,af as ot,S as rt,o as nt,Q as st,aX as at}from"./index-Dbk1Plmn.js";import{P as it}from"./page_shell-C0CL85dt.js";import{R as ct}from"./recent_records_feed-DvmOpQOI.js";import{u as lt}from"./index-D3OXdV3z.js";import{C as dt}from"./check-C3ZzJelL.js";import{L as ut,D as pt,a as ft,b as ht,c as gt,e as ee,d as mt,f as vt}from"./dropdown-menu-Ckkd3YcG.js";import{L as xt}from"./label-BKULM0qV.js";import{P as Ct,a as bt,b as te,c as yt,d as jt}from"./pagination-BoJeck8D.js";import{h as Pt,R as Rt,u as kt,F as wt}from"./Combination-DUY7QPO8.js";import{I as _t,c as ie,R as Nt}from"./index-Bi9XbTox.js";import"./live_relative_time-DiP4_O2S.js";import"./agent_badge-BZd6ZAh5.js";import"./index-dCMWtMMp.js";import"./chevron-right-L2MnFoxW.js";/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Tt=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Et=ne("Ellipsis",Tt);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const St=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],It=ne("Filter",St);var B="Checkbox",[At]=K(B),[Ot,Q]=At(B);function Ft(e){const{__scopeCheckbox:n,checked:o,children:a,defaultChecked:r,disabled:s,form:c,name:i,onCheckedChange:d,required:p,value:h="on",internal_do_not_use_render:f}=e,[g,C]=G({prop:o,defaultProp:r??!1,onChange:d,caller:B}),[y,j]=l.useState(null),[P,m]=l.useState(null),u=l.useRef(!1),v=y?!!c||!!y.closest("form"):!0,R={checked:g,disabled:s,setChecked:C,control:y,setControl:j,name:i,form:c,value:h,hasConsumerStoppedPropagationRef:u,required:p,defaultChecked:w(r)?!1:r,isFormControl:v,bubbleInput:P,setBubbleInput:m};return t.jsx(Ot,{scope:n,...R,children:Mt(f)?f(R):a})}var ce="CheckboxTrigger",le=l.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:o,...a},r)=>{const{control:s,value:c,disabled:i,checked:d,required:p,setControl:h,setChecked:f,hasConsumerStoppedPropagationRef:g,isFormControl:C,bubbleInput:y}=Q(ce,e),j=z(r,h),P=l.useRef(d);return l.useEffect(()=>{const m=s==null?void 0:s.form;if(m){const u=()=>f(P.current);return m.addEventListener("reset",u),()=>m.removeEventListener("reset",u)}},[s,f]),t.jsx(_.button,{type:"button",role:"checkbox","aria-checked":w(d)?"mixed":d,"aria-required":p,"data-state":he(d),"data-disabled":i?"":void 0,disabled:i,value:c,...a,ref:j,onKeyDown:k(n,m=>{m.key==="Enter"&&m.preventDefault()}),onClick:k(o,m=>{f(u=>w(u)?!0:!u),y&&C&&(g.current=m.isPropagationStopped(),g.current||m.stopPropagation())})})});le.displayName=ce;var Y=l.forwardRef((e,n)=>{const{__scopeCheckbox:o,name:a,checked:r,defaultChecked:s,required:c,disabled:i,value:d,onCheckedChange:p,form:h,...f}=e;return t.jsx(Ft,{__scopeCheckbox:o,checked:r,defaultChecked:s,disabled:i,required:c,onCheckedChange:p,name:a,form:h,value:d,internal_do_not_use_render:({isFormControl:g})=>t.jsxs(t.Fragment,{children:[t.jsx(le,{...f,ref:n,__scopeCheckbox:o}),g&&t.jsx(fe,{__scopeCheckbox:o})]})})});Y.displayName=B;var de="CheckboxIndicator",ue=l.forwardRef((e,n)=>{const{__scopeCheckbox:o,forceMount:a,...r}=e,s=Q(de,o);return t.jsx(H,{present:a||w(s.checked)||s.checked===!0,children:t.jsx(_.span,{"data-state":he(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:n,style:{pointerEvents:"none",...e.style}})})});ue.displayName=de;var pe="CheckboxBubbleInput",fe=l.forwardRef(({__scopeCheckbox:e,...n},o)=>{const{control:a,hasConsumerStoppedPropagationRef:r,checked:s,defaultChecked:c,required:i,disabled:d,name:p,value:h,form:f,bubbleInput:g,setBubbleInput:C}=Q(pe,e),y=z(o,C),j=lt(s),P=Be(a);l.useEffect(()=>{const u=g;if(!u)return;const v=window.HTMLInputElement.prototype,A=Object.getOwnPropertyDescriptor(v,"checked").set,E=!r.current;if(j!==s&&A){const ze=new Event("click",{bubbles:E});u.indeterminate=w(s),A.call(u,w(s)?!1:s),u.dispatchEvent(ze)}},[g,j,s,r]);const m=l.useRef(w(s)?!1:s);return t.jsx(_.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??m.current,required:i,disabled:d,name:p,value:h,form:f,...n,tabIndex:-1,ref:y,style:{...n.style,...P,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});fe.displayName=pe;function Mt(e){return typeof e=="function"}function w(e){return e==="indeterminate"}function he(e){return w(e)?"indeterminate":e?"checked":"unchecked"}const ge=l.forwardRef(({className:e,...n},o)=>t.jsx(Y,{ref:o,className:S("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...n,children:t.jsx(ue,{className:S("flex items-center justify-center text-current"),children:t.jsx(dt,{className:"h-4 w-4"})})}));ge.displayName=Y.displayName;function Gt(e){const n=Dt(e),o=l.forwardRef((a,r)=>{const{children:s,...c}=a,i=l.Children.toArray(s),d=i.find(Vt);if(d){const p=d.props.children,h=i.map(f=>f===d?l.Children.count(p)>1?l.Children.only(null):l.isValidElement(p)?p.props.children:null:f);return t.jsx(n,{...c,ref:r,children:l.isValidElement(p)?l.cloneElement(p,void 0,h):null})}return t.jsx(n,{...c,ref:r,children:s})});return o.displayName=`${e}.Slot`,o}function Dt(e){const n=l.forwardRef((o,a)=>{const{children:r,...s}=o;if(l.isValidElement(r)){const c=zt(r),i=$t(s,r.props);return r.type!==l.Fragment&&(i.ref=a?Ue(a,c):c),l.cloneElement(r,i)}return l.Children.count(r)>1?l.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var Lt=Symbol("radix.slottable");function Vt(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Lt}function $t(e,n){const o={...n};for(const a in n){const r=e[a],s=n[a];/^on[A-Z]/.test(a)?r&&s?o[a]=(...i)=>{const d=s(...i);return r(...i),d}:r&&(o[a]=r):a==="style"?o[a]={...r,...s}:a==="className"&&(o[a]=[r,s].filter(Boolean).join(" "))}return{...e,...o}}function zt(e){var a,r;let n=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=n&&"isReactWarning"in n&&n.isReactWarning;return o?e.ref:(n=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,o=n&&"isReactWarning"in n&&n.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var U="Popover",[me]=K(U,[ae]),D=ae(),[Bt,N]=me(U),ve=e=>{const{__scopePopover:n,children:o,open:a,defaultOpen:r,onOpenChange:s,modal:c=!1}=e,i=D(n),d=l.useRef(null),[p,h]=l.useState(!1),[f,g]=G({prop:a,defaultProp:r??!1,onChange:s,caller:U});return t.jsx(We,{...i,children:t.jsx(Bt,{scope:n,contentId:qe(),triggerRef:d,open:f,onOpenChange:g,onOpenToggle:l.useCallback(()=>g(C=>!C),[g]),hasCustomAnchor:p,onCustomAnchorAdd:l.useCallback(()=>h(!0),[]),onCustomAnchorRemove:l.useCallback(()=>h(!1),[]),modal:c,children:o})})};ve.displayName=U;var xe="PopoverAnchor",Ut=l.forwardRef((e,n)=>{const{__scopePopover:o,...a}=e,r=N(xe,o),s=D(o),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=r;return l.useEffect(()=>(c(),()=>i()),[c,i]),t.jsx(se,{...s,...a,ref:n})});Ut.displayName=xe;var Ce="PopoverTrigger",be=l.forwardRef((e,n)=>{const{__scopePopover:o,...a}=e,r=N(Ce,o),s=D(o),c=z(n,r.triggerRef),i=t.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":ke(r.open),...a,ref:c,onClick:k(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?i:t.jsx(se,{asChild:!0,...s,children:i})});be.displayName=Ce;var X="PopoverPortal",[Wt,qt]=me(X,{forceMount:void 0}),ye=e=>{const{__scopePopover:n,forceMount:o,children:a,container:r}=e,s=N(X,n);return t.jsx(Wt,{scope:n,forceMount:o,children:t.jsx(H,{present:o||s.open,children:t.jsx(He,{asChild:!0,container:r,children:a})})})};ye.displayName=X;var I="PopoverContent",je=l.forwardRef((e,n)=>{const o=qt(I,e.__scopePopover),{forceMount:a=o.forceMount,...r}=e,s=N(I,e.__scopePopover);return t.jsx(H,{present:a||s.open,children:s.modal?t.jsx(Kt,{...r,ref:n}):t.jsx(Qt,{...r,ref:n})})});je.displayName=I;var Ht=Gt("PopoverContent.RemoveScroll"),Kt=l.forwardRef((e,n)=>{const o=N(I,e.__scopePopover),a=l.useRef(null),r=z(n,a),s=l.useRef(!1);return l.useEffect(()=>{const c=a.current;if(c)return Pt(c)},[]),t.jsx(Rt,{as:Ht,allowPinchZoom:!0,children:t.jsx(Pe,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:k(e.onCloseAutoFocus,c=>{var i;c.preventDefault(),s.current||(i=o.triggerRef.current)==null||i.focus()}),onPointerDownOutside:k(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,d=i.button===0&&i.ctrlKey===!0,p=i.button===2||d;s.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:k(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),Qt=l.forwardRef((e,n)=>{const o=N(I,e.__scopePopover),a=l.useRef(!1),r=l.useRef(!1);return t.jsx(Pe,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(a.current||(i=o.triggerRef.current)==null||i.focus(),s.preventDefault()),a.current=!1,r.current=!1},onInteractOutside:s=>{var d,p;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(a.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const c=s.target;((p=o.triggerRef.current)==null?void 0:p.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Pe=l.forwardRef((e,n)=>{const{__scopePopover:o,trapFocus:a,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:h,...f}=e,g=N(I,o),C=D(o);return kt(),t.jsx(wt,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:r,onUnmountAutoFocus:s,children:t.jsx(Ke,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:h,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:p,onDismiss:()=>g.onOpenChange(!1),children:t.jsx(Qe,{"data-state":ke(g.open),role:"dialog",id:g.contentId,...C,...f,ref:n,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Re="PopoverClose",Yt=l.forwardRef((e,n)=>{const{__scopePopover:o,...a}=e,r=N(Re,o);return t.jsx(_.button,{type:"button",...a,ref:n,onClick:k(e.onClick,()=>r.onOpenChange(!1))})});Yt.displayName=Re;var Xt="PopoverArrow",Zt=l.forwardRef((e,n)=>{const{__scopePopover:o,...a}=e,r=D(o);return t.jsx(Ye,{...r,...a,ref:n})});Zt.displayName=Xt;function ke(e){return e?"open":"closed"}var Jt=ve,eo=be,to=ye,we=je;const oo=Jt,ro=eo,_e=l.forwardRef(({className:e,align:n="center",sideOffset:o=4,...a},r)=>t.jsx(to,{children:t.jsx(we,{ref:r,align:n,sideOffset:o,className:S("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...a})}));_e.displayName=we.displayName;var Ne="Toggle",Z=l.forwardRef((e,n)=>{const{pressed:o,defaultPressed:a,onPressedChange:r,...s}=e,[c,i]=G({prop:o,onChange:r,defaultProp:a??!1,caller:Ne});return t.jsx(_.button,{type:"button","aria-pressed":c,"data-state":c?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:n,onClick:k(e.onClick,()=>{e.disabled||i(!c)})})});Z.displayName=Ne;var Te=Z,T="ToggleGroup",[Ee]=K(T,[ie]),Se=ie(),J=b.forwardRef((e,n)=>{const{type:o,...a}=e;if(o==="single"){const r=a;return t.jsx(no,{...r,ref:n})}if(o==="multiple"){const r=a;return t.jsx(so,{...r,ref:n})}throw new Error(`Missing prop \`type\` expected on \`${T}\``)});J.displayName=T;var[Ie,Ae]=Ee(T),no=b.forwardRef((e,n)=>{const{value:o,defaultValue:a,onValueChange:r=()=>{},...s}=e,[c,i]=G({prop:o,defaultProp:a??"",onChange:r,caller:T});return t.jsx(Ie,{scope:e.__scopeToggleGroup,type:"single",value:b.useMemo(()=>c?[c]:[],[c]),onItemActivate:i,onItemDeactivate:b.useCallback(()=>i(""),[i]),children:t.jsx(Oe,{...s,ref:n})})}),so=b.forwardRef((e,n)=>{const{value:o,defaultValue:a,onValueChange:r=()=>{},...s}=e,[c,i]=G({prop:o,defaultProp:a??[],onChange:r,caller:T}),d=b.useCallback(h=>i((f=[])=>[...f,h]),[i]),p=b.useCallback(h=>i((f=[])=>f.filter(g=>g!==h)),[i]);return t.jsx(Ie,{scope:e.__scopeToggleGroup,type:"multiple",value:c,onItemActivate:d,onItemDeactivate:p,children:t.jsx(Oe,{...s,ref:n})})});J.displayName=T;var[ao,io]=Ee(T),Oe=b.forwardRef((e,n)=>{const{__scopeToggleGroup:o,disabled:a=!1,rovingFocus:r=!0,orientation:s,dir:c,loop:i=!0,...d}=e,p=Se(o),h=Xe(c),f={role:"group",dir:h,...d};return t.jsx(ao,{scope:o,rovingFocus:r,disabled:a,children:r?t.jsx(Nt,{asChild:!0,...p,orientation:s,dir:h,loop:i,children:t.jsx(_.div,{...f,ref:n})}):t.jsx(_.div,{...f,ref:n})})}),$="ToggleGroupItem",Fe=b.forwardRef((e,n)=>{const o=Ae($,e.__scopeToggleGroup),a=io($,e.__scopeToggleGroup),r=Se(e.__scopeToggleGroup),s=o.value.includes(e.value),c=a.disabled||e.disabled,i={...e,pressed:s,disabled:c},d=b.useRef(null);return a.rovingFocus?t.jsx(_t,{asChild:!0,...r,focusable:!c,active:s,ref:d,children:t.jsx(oe,{...i,ref:n})}):t.jsx(oe,{...i,ref:n})});Fe.displayName=$;var oe=b.forwardRef((e,n)=>{const{__scopeToggleGroup:o,value:a,...r}=e,s=Ae($,o),c={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=s.type==="single"?c:void 0;return t.jsx(Z,{...i,...r,ref:n,onPressedChange:d=>{d?s.onItemActivate(a):s.onItemDeactivate(a)}})}),Me=J,Ge=Fe;const De=Ze("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 min-w-10 px-3",sm:"h-9 min-w-9 px-2.5",lg:"h-11 min-w-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),co=l.forwardRef(({className:e,variant:n,size:o,...a},r)=>t.jsx(Te,{ref:r,className:S(De({variant:n,size:o,className:e})),...a}));co.displayName=Te.displayName;const Le=l.createContext({size:"default",variant:"default"}),Ve=l.forwardRef(({className:e,variant:n,size:o,children:a,...r},s)=>t.jsx(Me,{ref:s,className:S("flex flex-wrap items-center justify-start gap-1",e),...r,children:t.jsx(Le.Provider,{value:{variant:n,size:o},children:a})}));Ve.displayName=Me.displayName;const $e=l.forwardRef(({className:e,children:n,variant:o,size:a,...r},s)=>{const c=l.useContext(Le);return t.jsx(Ge,{ref:s,className:S(De({variant:c.variant??o,size:c.size??a}),e),...r,children:n})});$e.displayName=Ge.displayName;function lo(e){return Je("/record_activity",e)}function uo(e,n){return et({queryKey:["record_activity",e],queryFn:()=>lo(e),enabled:tt()&&!0,placeholderData:o=>o})}const q=50,x=["entity","source","observation","interpretation","timeline_event","relationship"],L={entity:"Entity",source:"Source",observation:"Observation",interpretation:"Interpretation",timeline_event:"Timeline",relationship:"Relationship"},po={entity:"Canonical entities you own (created or updated recently).",source:"Uploaded or ingested files and blobs tied to your account.",observation:"Structured facts extracted or stored for an entity.",interpretation:"Interpretation jobs and outcomes over your sources.",timeline_event:"Timeline rows derived from sources you own.",relationship:"Relationship snapshots between entities."};function re(e){return e.length===x.length}function V(e){return[...e].sort((n,o)=>x.indexOf(n)-x.indexOf(o))}function _o(){var P,m;const[e,n]=l.useState(0),[o,a]=l.useState(()=>[...x]),[r,s]=l.useState(!1),c=l.useMemo(()=>{if(!(o.length===0||re(o)))return V(o).join(",")},[o]);l.useEffect(()=>{n(0)},[c]);const i=uo({limit:q,offset:e,record_types:c}),d=((P=i.data)==null?void 0:P.items)??[],p=((m=i.data)==null?void 0:m.has_more)??!1,h=i.isPending&&i.data===void 0;function f(u){const v=u;a(v.length===0?[...x]:V(v))}function g(u,v){a(R=>{if(v){const E=V([...R,u]);return E.length===0?[...x]:E}const A=R.filter(E=>E!==u);return A.length===0?[...x]:A})}function C(){a([...x])}function y(){a(u=>{const v=x.filter(R=>!u.includes(R));return v.length===0?[...x]:V(v)})}const j=re(o)?"All":`${o.length}/${x.length}`;return t.jsx(it,{title:"Activity",titleIcon:t.jsx(at,{className:"h-5 w-5",strokeWidth:1.75,"aria-hidden":!0}),children:t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[t.jsx("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx(xt,{className:"text-muted-foreground",children:"Types"}),t.jsx("div",{className:"hidden flex-wrap items-center gap-1 md:flex",children:t.jsx(Ve,{type:"multiple",variant:"outline",size:"sm",value:o,onValueChange:f,"aria-label":"Filter by record type",children:x.map(u=>t.jsxs(O,{children:[t.jsx(F,{asChild:!0,children:t.jsx($e,{value:u,"aria-label":L[u],children:L[u]})}),t.jsx(M,{side:"bottom",className:"max-w-xs",children:po[u]})]},u))})}),t.jsx("div",{className:"flex md:hidden",children:t.jsxs(oo,{open:r,onOpenChange:s,children:[t.jsxs(O,{children:[t.jsx(F,{asChild:!0,children:t.jsx(ro,{asChild:!0,children:t.jsxs(W,{type:"button",variant:"outline",size:"sm",className:"gap-2",children:[t.jsx(ut,{className:"h-4 w-4 shrink-0","aria-hidden":!0}),t.jsx("span",{children:"Types"}),t.jsx(ot,{variant:"secondary",className:"font-normal tabular-nums",children:j})]})})}),t.jsx(M,{side:"bottom",children:"Open type filter"})]}),t.jsx(_e,{className:"w-80",align:"start",children:t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[t.jsx(It,{className:"h-4 w-4 text-muted-foreground","aria-hidden":!0}),"Included record types"]}),t.jsx("div",{className:"space-y-2",children:x.map(u=>t.jsxs("label",{className:"flex cursor-pointer items-center gap-2 rounded-md py-1 text-sm leading-none hover:bg-muted/60",children:[t.jsx(ge,{checked:o.includes(u),onCheckedChange:v=>g(u,v===!0)}),t.jsx("span",{children:L[u]})]},u))}),t.jsx(W,{type:"button",variant:"secondary",size:"sm",className:"w-full",onClick:C,children:"Select all types"})]})})]})})]})}),t.jsx("div",{className:"flex shrink-0 items-center gap-1 self-start sm:self-center",children:t.jsxs(pt,{children:[t.jsxs(O,{children:[t.jsx(F,{asChild:!0,children:t.jsx(ft,{asChild:!0,children:t.jsx(W,{type:"button",variant:"outline",size:"icon","aria-label":"More type filter actions",children:t.jsx(Et,{className:"h-4 w-4"})})})}),t.jsx(M,{side:"bottom",children:"More actions and type checklist"})]}),t.jsxs(ht,{align:"end",className:"w-56",children:[t.jsx(gt,{children:"Type filters"}),t.jsx(ee,{onSelect:()=>C(),children:"Select all types"}),t.jsx(ee,{onSelect:()=>y(),children:"Invert selection"}),t.jsx(mt,{}),x.map(u=>t.jsx(vt,{checked:o.includes(u),onCheckedChange:v=>g(u,v===!0),children:L[u]},u))]})]})})]}),t.jsx(rt,{}),h?t.jsx(nt,{rows:8}):i.error?t.jsx(st,{title:"Could not load activity",children:i.error.message}):t.jsxs(t.Fragment,{children:[t.jsx(ct,{items:d,emptyMessage:"No records yet."}),(e>0||p)&&t.jsx(Ct,{className:"mx-0 w-full justify-between",children:t.jsxs(bt,{className:"flex w-full flex-wrap items-center justify-between gap-3",children:[t.jsx("p",{className:"text-sm text-muted-foreground",children:d.length===0?"No rows on this page.":`Showing ${e+1}–${e+d.length}`}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(te,{children:t.jsxs(O,{children:[t.jsx(F,{asChild:!0,children:t.jsx("span",{children:t.jsx(yt,{size:"icon",disabled:e===0,onClick:()=>n(Math.max(0,e-q))})})}),t.jsx(M,{children:"Newer activity"})]})}),t.jsx(te,{children:t.jsxs(O,{children:[t.jsx(F,{asChild:!0,children:t.jsx("span",{children:t.jsx(jt,{size:"icon",disabled:!p,onClick:()=>n(e+q)})})}),t.jsx(M,{children:"Older activity"})]})})]})]})})]})]})})}export{_o as default};
