PageSourceSearch

https://vizops360.ai/assets/index-CRqjFEID.js

js vizops360.ai collected 2026-10-05 13:52:25 UTC 29,083 bytes, 1 lines download raw bytes

1import{ax as de,cr as oe,r as n,j as e,ap as i,K as H,gj as B,af as A,Y as ce,U as xe,an as me,gk as he,b9 as J,as as b,gl as O,bU as ue,gm as be,bV as pe,bW as ge,bX as fe,z as je,ar as $,X as Ne,bi as K,bj as Y,ad as ve,bk as Z,bl as R,c4 as we,bH as ke,ao as ye,cI as P,f7 as L,ae as Q,C as Ce,P as ee,b6 as Re,c1 as Se,bQ as Te,gn as De,go as Me,gp as Le,bv as Ae,bw as Fe,bx as Ue,by as ze,bz as Pe,cS as Ee,cT as Ie,cU as _,cV as q,gq as W,am as Be,gr as Oe,J as Ve,aI as w}from"./index-CpeGhXo5.js";import{C as se,a as $e}from"./card-C6w-LIWC.js";import{P as X}from"./progress-DpA3J1Hp.js";import{u as Qe,f as te,R as Ge,g as He,a as _e}from"./recordings.utils-CFsjIOi1.js";import{E as qe}from"./ellipsis-vertical-1Hems0g8.js";const z=[{name:"All Recordings",icon:A,id:"all"},{name:"Recent",icon:ce,id:"recent"},{name:"Shared with me",icon:xe,id:"shared"},{name:"Favorites",icon:me,id:"favorites"},{name:"Archived",icon:he,id:"archived"},{name:"Trash",icon:J,id:"trash"}],V=[{name:"Sales",count:12},{name:"Support",count:45},{name:"HR",count:8},{name:"Engineering",count:124}];function ss(){const t=de(),{withTenantPrefix:x}=oe(),[a,g]=n.useState("all"),[p,k]=n.useState(""),[S,T]=n.useState(""),[y,f]=n.useState("grid"),[F,h]=n.useState(!1),[D,j]=n.useState(!1),[m,N]=n.useState("all"),u=()=>{t(x("/chat"))};n.useEffect(()=>{const s=setTimeout(()=>{T(p)},300);return()=>clearTimeout(s)},[p]);const{data:C,isLoading:U}=Qe({search:S}),r=(Array.isArray(C)?C:C?.data||[]).filter(s=>{if(a!=="all"&&!["recent","shared","favorites","archived","trash"].includes(a)){const o=s.folder?.name?.toLowerCase();if(o&&o!==a.toLowerCase())return!1}if(m!=="all"&&(m==="audio"&&s.type!=="voice_call"&&!s.mimeType?.includes("audio")||m==="video"&&s.type==="voice_call"))return!1;if(S.trim()){const o=S.toLowerCase(),E=s.title?.toLowerCase().includes(o),I=(s.owner?.firstName+" "+s.owner?.lastName).toLowerCase().includes(o);if(!E&&!I)return!1}return!0});return e.jsxs("div",{className:"flex h-full w-full overflow-hidden bg-background",children:[e.jsxs("aside",{className:"hidden md:flex w-64 border-r border-slate-200 dark:border-slate-800 bg-slate-50/60 dark:bg-slate-900/40 flex-col shrink-0",children:[e.jsxs("div",{className:"p-3.5 border-b border-slate-200/80 dark:border-slate-800 flex items-center gap-2",children:[e.jsxs(i,{variant:"ghost",size:"sm",onClick:u,className:"h-8 px-2.5 rounded-lg text-slate-600 dark:text-slate-300 hover:text-slate-900 dark:hover:text-white hover:bg-slate-200/70 dark:hover:bg-slate-800 gap-1.5 transition-colors cursor-pointer",title:"Return to Chat",children:[e.jsx(H,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs font-semibold",children:"Messages"})]}),e.jsx("div",{className:"w-px h-4 bg-slate-200 dark:bg-slate-700 mx-0.5"}),e.jsx("h2",{className:"text-sm font-bold tracking-tight text-slate-900 dark:text-slate-100",children:"Recordings"})]}),e.jsx(B,{className:"flex-1",children:e.jsxs("div",{className:"p-3 space-y-5",children:[e.jsx("div",{className:"space-y-0.5",children:z.map(s=>e.jsxs("button",{onClick:()=>g(s.id),className:b("w-full flex items-center gap-2.5 px-3 py-2 rounded-lg text-xs font-semibold transition-colors cursor-pointer text-left",a===s.id?"bg-blue-50 dark:bg-blue-950/50 text-blue-600 dark:text-blue-400 font-bold":"text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800/60"),children:[e.jsx(s.icon,{className:b("h-4 w-4 shrink-0",a===s.id?"text-blue-600 dark:text-blue-400":"text-slate-400")}),e.jsx("span",{children:s.name})]},s.id))}),e.jsxs("div",{children:[e.jsx("div",{className:"px-3 mb-2 flex items-center justify-between",children:e.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-slate-400 dark:text-slate-500",children:"Team Folders"})}),e.jsx("div",{className:"space-y-0.5",children:V.map(s=>e.jsxs("button",{onClick:()=>g(s.name),className:b("w-full flex items-center justify-between px-3 py-2 rounded-lg text-xs transition-colors cursor-pointer text-left",a===s.name?"bg-blue-50 dark:bg-blue-950/50 text-blue-600 dark:text-blue-400 font-bold":"text-slate-600 dar
1k:text-slate-400 hover:text-slate-900 dark:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800/60"),children:[e.jsxs("div",{className:"flex items-center gap-2.5 truncate",children:[e.jsx(O,{className:b("h-4 w-4 shrink-0",a===s.name?"text-blue-500":"text-slate-400")}),e.jsx("span",{className:"truncate",children:s.name})]}),e.jsx("span",{className:"text-[11px] text-slate-400 dark:text-slate-500 font-mono px-1.5 py-0.5 rounded bg-slate-100 dark:bg-slate-800",children:s.count})]},s.name))})]})]})}),e.jsxs("div",{className:"p-3.5 border-t border-slate-200/80 dark:border-slate-800 bg-white dark:bg-slate-900",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs mb-1.5",children:[e.jsx("span",{className:"font-semibold text-slate-700 dark:text-slate-300",children:"Cloud Storage"}),e.jsx("span",{className:"text-slate-500 dark:text-slate-400 text-[11px] font-mono",children:"4.2 TB / 5 TB"})]}),e.jsx(X,{value:84,className:"h-1.5 bg-slate-100 dark:bg-slate-800"}),e.jsxs("div",{className:"flex items-center justify-between mt-2 text-[11px] text-slate-500",children:[e.jsx("span",{children:"84% utilized"}),e.jsx("button",{className:"text-blue-600 dark:text-blue-400 hover:underline font-medium cursor-pointer",children:"Manage Quota"})]})]})]}),e.jsxs("main",{className:"flex-1 flex flex-col min-w-0 h-full overflow-hidden bg-white dark:bg-slate-950",children:[e.jsxs("header",{className:"h-14 border-b border-slate-200/80 dark:border-slate-800 px-3 sm:px-6 bg-white/95 dark:bg-slate-900/95 backdrop-blur-xs flex items-center justify-between gap-2.5 shrink-0 z-10",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsxs(i,{variant:"ghost",size:"sm",onClick:u,className:"md:hidden h-8 px-2 rounded-lg text-slate-700 dark:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800 gap-1 shrink-0 cursor-pointer",title:"Return to Chat",children:[e.jsx(H,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs font-semibold",children:"Messages"})]}),e.jsxs(ue,{open:D,onOpenChange:j,children:[e.jsx(be,{asChild:!0,children:e.jsxs(i,{variant:"outline",size:"sm",className:"md:hidden h-8 px-2.5 rounded-lg text-xs gap-1.5 font-medium shrink-0 border-slate-200 dark:border-slate-700",children:[e.jsx(O,{className:"h-3.5 w-3.5 text-blue-500"}),e.jsx("span",{children:"Folders"})]})}),e.jsxs(pe,{side:"left",className:"w-72 p-0 flex flex-col bg-white dark:bg-slate-900",children:[e.jsx(ge,{className:"p-4 border-b border-slate-100 dark:border-slate-800",children:e.jsxs(fe,{className:"text-sm font-bold flex items-center gap-2",children:[e.jsx(A,{className:"h-4 w-4 text-blue-600"}),e.jsx("span",{children:"Recordings & Folders"})]})}),e.jsx(B,{className:"flex-1 p-3",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"space-y-0.5",children:z.map(s=>e.jsxs("button",{onClick:()=>{g(s.id),j(!1)},className:b("w-full flex items-center gap-2.5 px-3 py-2 rounded-lg text-xs font-semibold text-left",a===s.id?"bg-blue-50 dark:bg-blue-950/50 text-blue-600 dark:text-blue-400":"text-slate-600 dark:text-slate-400 hover:bg-slate-100"),children:[e.jsx(s.icon,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{children:s.name})]},s.id))}),e.jsxs("div",{children:[e.jsx("div",{className:"px-3 mb-1.5 text-[11px] font-bold uppercase tracking-wider text-slate-400",children:"Team Folders"}),e.jsx("div",{className:"space-y-0.5",children:V.map(s=>e.jsxs("button",{onClick:()=>{g(s.name),j(!1)},className:b("w-full flex items-center justify-between px-3 py-2 rounded-lg text-xs text-left",a===s.name?"bg-blue-50 dark:bg-blue-950/50 text-blue-600 font-bold":"text-slate-600 hover:bg-slate-100"),children:[e.jsx("span",{className:"truncate",children:s.name}),e.jsx("span",{className:"text-[11px] text-slate-400 font-mono",children:s.count})]},s.name))})]})]})}),e.jsxs("div",{className:"p-4 border-t border-slate-100 dark:border-slate-800 bg-slate-50 dark:bg-slate-900/50",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[e.jsx("span",{className:"font-semibold text-slate-700",children:"Storage"}),e.jsx("span",{className:"text-slate-500 font-mono text-[11px]",children:"4.2 TB / 5 TB"})]}),e.jsx(X,{value:84,className:"h-1.5"})]})]})]}),e.jsxs("div",{className:"relative flex-1 max-w-md",children:[e.jsx(je,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-400"}),e.jsx($,{value:p,onChange:s=>k(s.target.value),placeholder:"Search recordings, keywords...",className:"w-full h-8.5 pl-8.5 text-xs bg-slate-100/70 dark:bg-slate-800/60 border-transparent focus-visible:border-blue-500 focus-visible:bg-white rounded-lg"}),p&&e.jsx("button",{onClick:()=>k(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600",children:e.jsx(Ne,{className:"h-3 w-3"})})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 shrink-0",children:[e.jsxs(K,{children:[e.jsx(Y,{asChild:!0,children:e.jsxs(i,{variant:"outline",size:"sm",className:"h-8.5 px-2.5 text-xs gap-1.5 rounded-lg border-slate-200 dark:border-slate-700",children:[e.jsx(ve,{className:"h-3.5 w-3.5 text-slate-500"}),e.jsx("span",{className:"hidden sm:inline capitalize",children:m==="all"?"All Types":m})]})}),e.jsxs(Z,{align:"end",className:"w-36 text-xs",children:[e.jsx(R,{onClick:()=>N("all"),className:m==="all"?"font-bold text-blue-600":"",children:"All Types"}),e.jsx(R,{onClick:()=>N("video"),className:m==="video"?"font-bold text-blue-600":"",children:"Video Calls"}),e.jsx(R,{onClick:()=>N("audio"),className:m==="audio"?"font-bold text-blue-600":"",children:"Audio Recordings"})]})]}),e.jsxs("div",{className:"hidden lg:flex items-center rounded-lg border border-slate-200 dark:border-slate-800 p-0.5 bg-slate-50 dark:bg-slate-900",children:[e.jsx("button",{onClick:()=>f("grid"),className:b("p-1 rounded-md transition-colors",y==="grid"?"bg-white dark:bg-slate-800 shadow-2xs text-blue-600":"text-slate-400 hover:text-slate-600"),title:"Grid View",children:e.jsx(we,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:()=>f("list"),className:b("p-1 rounded-md transition-colors",y==="list"?"bg-white dark:bg-slate-800 shadow-2xs text-blue-600":"text-slate-400 hover:text-slate-600"),title:"List View",children:e.jsx(ke,{className:"h-3.5 w-3.5"})})]}),e.jsxs(i,{size:"sm",onClick:()=>h(!0),className:"h-8.5 px-3 rounded-lg bg-blue-600 hover:bg-blue-700 text-white font-semibold text-xs gap-1.5 shadow-xs cursor-pointer",children:[e.jsx(ye,{className:"h-3.5 w-3.5 stroke-[2.5]"}),e.jsx("span",{className:"hidden sm:inline",children:"New Recording"}),e.jsx("span",{className:"sm:hidden",children:"Record"})]})]})]}),e.jsxs("div",{className:"md:hidden border-b border-slate-100 dar
1k:border-slate-800 bg-slate-50/50 dark:bg-slate-900/30 px-3 py-2 overflow-x-auto flex items-center gap-1.5 no-scrollbar shrink-0",children:[z.slice(0,4).map(s=>e.jsxs("button",{onClick:()=>g(s.id),className:b("h-7 px-3 rounded-full text-xs font-semibold whitespace-nowrap transition-colors flex items-center gap-1.5 shrink-0 cursor-pointer",a===s.id?"bg-blue-600 text-white shadow-xs":"bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 text-slate-600 dark:text-slate-300"),children:[e.jsx(s.icon,{className:"h-3 w-3"}),e.jsx("span",{children:s.name})]},s.id)),V.map(s=>e.jsxs("button",{onClick:()=>g(s.name),className:b("h-7 px-3 rounded-full text-xs font-medium whitespace-nowrap transition-colors flex items-center gap-1.5 shrink-0 cursor-pointer",a===s.name?"bg-blue-600 text-white shadow-xs font-semibold":"bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 text-slate-600 dark:text-slate-300"),children:[e.jsx(O,{className:"h-3 w-3 text-slate-400"}),e.jsxs("span",{children:[s.name," (",s.count,")"]})]},s.name))]}),e.jsxs(B,{className:"flex-1 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4 sm:mb-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl sm:text-2xl font-bold tracking-tight text-slate-900 dark:text-slate-100 capitalize",children:z.find(s=>s.id===a)?.name||a}),e.jsxs("p",{className:"text-xs text-slate-500 mt-0.5",children:[r.length," ",r.length===1?"recording":"recordings"," found"]})]}),r.length>0&&e.jsxs(i,{variant:"outline",size:"sm",onClick:()=>h(!0),className:"hidden sm:flex text-xs h-8 gap-1.5 rounded-lg border-slate-200",children:[e.jsx(P,{className:"w-3.5 h-3.5 text-slate-500"}),e.jsx("span",{children:"Upload File"})]})]}),U?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 sm:gap-6",children:[1,2,3,4,5,6].map(s=>e.jsxs(se,{className:"overflow-hidden border border-slate-200/80 rounded-xl shadow-xs",children:[e.jsx(L,{className:"aspect-video w-full rounded-none"}),e.jsxs("div",{className:"p-3.5 space-y-2.5",children:[e.jsx(L,{className:"h-4 w-3/4"}),e.jsx(L,{className:"h-3 w-1/2"}),e.jsxs("div",{className:"flex justify-between pt-3",children:[e.jsx(L,{className:"h-6 w-20 rounded-full"}),e.jsx(L,{className:"h-5 w-12"})]})]})]},s))}):r.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[50vh] text-center p-6 border-2 border-dashed border-slate-200 dark:border-slate-800 rounded-2xl bg-slate-50/40 dark:bg-slate-900/20",children:[e.jsx("div",{className:"w-16 h-16 rounded-2xl bg-blue-50 dark:bg-blue-950/50 border border-blue-200/50 dark:border-blue-900/50 flex items-center justify-center mb-4 text-blue-600 dark:text-blue-400",children:e.jsx(A,{className:"h-8 w-8"})}),e.jsx("h3",{className:"text-base sm:text-lg font-bold text-slate-900 dark:text-slate-100 mb-1",children:"No recordings found"}),e.jsx("p",{className:"text-xs sm:text-sm text-slate-500 max-w-sm mb-6 leading-relaxed",children:"There are no audio or video recordings matching your current filter in this category."}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsxs(i,{onClick:()=>h(!0),className:"h-9 px-4 rounded-lg bg-blue-600 hover:bg-blue-700 text-white font-semibold text-xs sm:text-sm gap-1.5 shadow-xs cursor-pointer",children:[e.jsx(Q,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Start Live Recording"})]}),e.jsxs(i,{variant:"outline",onClick:()=>h(!0),className:"h-9 px-4 rounded-lg border-slate-200 dark:border-slate-700 text-xs sm:text-sm font-medium hover:bg-slate-50 dark:hover:bg-slate-800 cursor-pointer",children:[e.jsx(P,{className:"w-3.5 h-3.5 mr-1.5 text-slate-500"}),e.jsx("span",{children:"Upload File"})]})]})]}):y==="grid"?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 sm:gap-5",children:r.map(s=>e.jsx(We,{recording:s,onClick:()=>t(x(`/chat/recordings/${s.id}`))},s.id))}):e.jsx("div",{className:"divide-y divide-slate-100 dark:divide-slate-800 rounded-xl border border-slate-200/80 dark:border-slate-800 overflow-hidden bg-white dark:bg-slate-900",children:r.map(s=>e.jsxs("div",{onClick:()=>t(x(`/chat/recordings/${s.id}`)),className:"p-3.5 sm:px-4 flex items-center justify-between gap-3 hover:bg-slate-50 dark:hover:bg-slate-800/50 transition-colors cursor-pointer",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-slate-100 dar
1k:bg-slate-800 flex items-center justify-center shrink-0 text-blue-600",children:e.jsx(A,{className:"w-5 h-5"})}),e.jsxs("div",{className:"min-w-0 truncate",children:[e.jsx("h4",{className:"text-sm font-semibold text-slate-900 dark:text-slate-100 truncate",children:s.title}),e.jsxs("p",{className:"text-xs text-slate-500 mt-0.5 flex items-center gap-2",children:[e.jsx("span",{children:new Date(s.createdAt).toLocaleDateString()}),e.jsx("span",{children:"•"}),e.jsx("span",{children:te(s.duration||0)}),e.jsx("span",{children:"•"}),e.jsx("span",{className:"truncate",children:s.folder?.name||"General"})]})]})]}),e.jsx(Ce,{className:"w-4 h-4 text-slate-400 shrink-0"})]},s.id))})]})]}),e.jsx(Xe,{isOpen:F,onClose:()=>h(!1)})]})}function We({recording:t,onClick:x}){return e.jsxs(se,{onClick:x,className:"overflow-hidden border border-slate-200/80 dark:border-slate-800 bg-white dark:bg-slate-900 shadow-2xs hover:shadow-md hover:border-slate-300 dark:hover:border-slate-700 transition-all cursor-pointer group flex flex-col rounded-xl",children:[e.jsxs("div",{className:"aspect-video bg-slate-900 relative overflow-hidden flex-shrink-0",children:[t.thumbnailUrl?e.jsx("img",{src:t.thumbnailUrl,alt:t.title,className:"w-full h-full object-cover opacity-85 group-hover:opacity-100 transition-opacity"}):e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center bg-gradient-to-br from-slate-900 to-slate-800 text-slate-500",children:[e.jsx(A,{className:"w-10 h-10 mb-1 opacity-60"}),e.jsx("span",{className:"text-[10px] uppercase font-mono tracking-wider",children:"Recording Preview"})]}),e.jsx("div",{className:"absolute inset-0 bg-black/35 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:e.jsx("div",{className:"bg-white/90 backdrop-blur-xs rounded-full p-2.5 transform scale-90 group-hover:scale-100 transition-transform shadow-lg text-slate-900",children:e.jsx(ee,{className:"w-5 h-5 fill-slate-900 ml-0.5"})})}),e.jsx("div",{className:"absolute bottom-2 right-2 bg-black/75 backdrop-blur-xs text-white text-[11px] px-2 py-0.5 rounded font-mono font-medium",children:te(t.duration||0)}),t.status!==Ge.COMPLETED&&e.jsx("div",{className:"absolute top-2 left-2",children:e.jsx(Re,{variant:"secondary",className:"bg-amber-500/90 text-white border-none text-[10px] px-2 py-0.5 font-medium shadow-xs",children:He(t.status)})})]}),e.jsxs($e,{className:"p-3.5 flex-1 flex flex-col justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-start gap-2 mb-1",children:[e.jsx("h3",{className:"font-semibold text-sm leading-snug line-clamp-1 group-hover:text-blue-600 transition-colors text-slate-900 dark:text-slate-100",title:t.title,children:t.title}),e.jsxs(K,{children:[e.jsx(Y,{asChild:!0,children:e.jsx("button",{className:"h-6 w-6 rounded-md -mr-1 -mt-0.5 flex items-center justify-center text-slate-400 hover:text-slate-700 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors opacity-0 group-hover:opacity-100 cursor-pointer",onClick:a=>a.stopPropagation(),children:e.jsx(qe,{className:"h-3.5 w-3.5"})})}),e.jsxs(Z,{align:"end",className:"text-xs",children:[e.jsxs(R,{onClick:a=>a.stopPropagation(),children:[e.jsx(Se,{className:"mr-2 h-3.5 w-3.5"})," Share"]}),e.jsxs(R,{onClick:a=>a.stopPropagation(),children:[e.jsx(Te,{className:"mr-2 h-3.5 w-3.5"})," Download"]}),e.jsxs(R,{onClick:a=>a.stopPropagation(),className:"text-rose-600",children:[e.jsx(J,{className:"mr-2 h-3.5 w-3.5"})," Delete"]})]})]})]}),e.jsxs("p",{className:"text-xs text-slate-500 dark:text-slate-400 flex items-center gap-1.5 mb-3",children:[e.jsx("span",{children:new Date(t.createdAt).toLocaleDateString()}),e.jsx("span",{children:"•"}),e.jsx("span",{className:"truncate",children:t.folder?.name||"General"})]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2.5 border-t border-slate-100 dark:border-slate-800",children:[e.jsxs("div",{className:"flex items-center gap-1.5 truncate",children:[e.jsxs(De,{className:"h-5 w-5 border border-slate-200",children:[e.jsx(Me,{src:t.owner?.avatarUrl}),e.jsx(Le,{className:"text-[9px] bg-blue-50 text-blue-700",children:t.owner?.firstName?.[0]||"U"})]}),e.jsx("span",{className:"text-[11px] font-medium text-slate-600 dar
1k:text-slate-300 truncate",children:t.owner?.firstName?`${t.owner.firstName} ${t.owner?.lastName||""}`:"Team Member"})]}),e.jsxs("div",{className:"flex gap-1 shrink-0",children:[t.hasTranscript&&e.jsx("span",{className:"text-[9px] font-bold px-1.5 py-0.5 rounded bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-400 border border-slate-200 dark:border-slate-700",children:"CC"}),t.hasSummary&&e.jsx("span",{className:"text-[9px] font-bold px-1.5 py-0.5 rounded bg-purple-50 text-purple-700 dark:bg-purple-950 dark:text-purple-300 border border-purple-200 dark:border-purple-800",children:"AI"})]})]})]})]})}function Xe({isOpen:t,onClose:x}){const[a,g]=n.useState("record"),[p,k]=n.useState(""),[S,T]=n.useState(!1),[y,f]=n.useState(!1),[F,h]=n.useState(0),[D,j]=n.useState(null),[m,N]=n.useState(null),[u,C]=n.useState(null),[U,{isLoading:M}]=_e(),r=n.useRef(null),s=n.useRef([]),o=n.useRef(null);n.useEffect(()=>{t||(E(),k(""),C(null),j(null),N(null))},[t]);const E=()=>{if(o.current&&clearInterval(o.current),r.current&&r.current.state!=="inactive")try{r.current.stop()}catch{}T(!1),f(!1),h(0)},I=async()=>{try{const l=await navigator.mediaDevices.getUserMedia({audio:!0}),c=new MediaRecorder(l);r.current=c,s.current=[],c.ondataavailable=d=>{d.data&&d.data.size>0&&s.current.push(d.data)},c.onstop=()=>{const d=new Blob(s.current,{type:"audio/webm"});j(d),N(URL.createObjectURL(d)),l.getTracks().forEach(v=>v.stop())},c.start(500),T(!0),f(!1),h(0),o.current=setInterval(()=>{h(d=>d+1)},1e3),w.info("Audio recording started")}catch(l){w.error("Microphone access denied or unavailable: "+(l.message||"Error"))}},ae=()=>{r.current&&r.current.state==="recording"&&(r.current.pause(),f(!0),o.current&&clearInterval(o.current))},le=()=>{r.current&&r.current.state==="paused"&&(r.current.resume(),f(!1),o.current=setInterval(()=>{h(l=>l+1)},1e3))},re=()=>{r.current&&r.current.state!=="inactive"&&(r.current.stop(),T(!1),f(!1),o.current&&clearInterval(o.current))},ne=async()=>{if(!D)return;const l=p.trim()||`Audio Recording ${new Date().toLocaleTimeString()}`,c=new FormData,d=new File([D],`${l}.webm`,{type:"audio/webm"});c.append("file",d),c.append("title",l);try{await U(c).unwrap(),w.success("Recording saved successfully!"),x()}catch(v){w.error("Failed to save recording: "+(v.data?.message||v.message||"Error"))}},ie=async l=>{if(l.preventDefault(),!u){w.error("Please select an audio or video file");return}const c=p.trim()||u.name.replace(/\.[^/.]+$/,""),d=new FormData;d.append("file",u),d.append("title",c);try{await U(d).unwrap(),w.success("Recording uploaded successfully!"),x()}catch(v){w.error("Upload failed: "+(v.data?.message||v.message||"Error"))}},G=l=>{const c=Math.floor(l/60),d=l%60;return`${c.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}`};return e.jsx(Ae,{open:t,onOpenChange:x,children:e.jsxs(Fe,{className:"sm:max-w-md p-0 overflow-hidden bg-white dark:bg-slate-900 rounded-xl border border-slate-200 dark:border-slate-800",children:[e.jsxs(Ue,{className:"p-4 sm:p-5 border-b border-slate-100 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-900/50",children:[e.jsx(ze,{className:"text-base font-bold text-slate-900 dark:text-slate-100",children:"Create or Upload Recording"}),e.jsx(Pe,{className:"text-xs text-slate-500",children:"Capture live audio meeting notes or upload an existing recording file."})]}),e.jsxs(Ee,{value:a,onValueChange:l=>g(l),className:"w-full",children:[e.jsx("div",{className:"px-5 pt-3",children:e.jsxs(Ie,{className:"grid w-full grid-cols-2 h-9 p-1 bg-slate-100 dark:bg-slate-800 rounded-lg",children:[e.jsxs(_,{value:"record",className:"text-xs font-semibold rounded-md",children:[e.jsx(Q,{className:"w-3.5 h-3.5 mr-1.5"})," Live Recorder"]}),e.jsxs(_,{value:"upload",className:"text-xs font-semibold rounded-md",children:[e.jsx(P,{className:"w-3.5 h-3.5 mr-1.5"})," Upload File"]})]})}),e.jsxs(q,{value:"record",className:"p-5 space-y-4 m-0 focus:outline-none",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300",children:"Recording Title (Optional)"}),e.jsx($,{placeholder:"e.g. Client Feedback Session",value:p,onChange:l=>k(l.target.value),className:"h-9 text-xs rounded-lg border-slate-200 dark:border-slate-700"})]}),e.jsx("div",{className:"p-5 rounded-xl bg-slate-50 dark:bg-slate-800/50 border border-slate-200/80 dark:border-slate-700/60 flex flex-col items-center justify-center text-center",children:S?e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx(W,{className:"w-4 h-4 text-rose-600 animate-pulse"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-rose-600",children:y?"Paused":"Recording Live"})]}),e.jsx("div",{className:"text-3xl font-mono font-bold tracking-tight text-slate-900 dark:text-slate-100",children:G(F)}),e.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[y?e.jsxs(i,{type:"button",size:"sm",variant:"outline",onClick:le,className:"h-8 px-3 rounded-lg text-xs gap-1 cursor-pointer",children:[e.jsx(ee,{className:"w-3.5 h-3.5 text-blue-600"}),e.jsx("span",{children:"Resume"})]}):e.jsxs(i,{type:"button",size:"sm",variant:"outline",onClick:ae,className:"h-8 px-3 rounded-lg text-xs gap-1 cursor-pointer",children:[e.jsx(Be,{className:"w-3.5 h-3.5 text-amber-600"}),e.jsx("span",{children:"Pause"})]}),e.jsxs(i,{type:"button",size:"sm",onClick:re,className:"h-8 px-3 rounded-lg bg-rose-600 hover:bg-rose-700 text-white text-xs gap-1 cursor-pointer",children:[e.jsx(Oe,{className:"w-3.5 h-3.5 fill-current"}),e.jsx("span",{children:"Stop & Review"})]})]})]}):m?e.jsxs("div",{className:"space-y-3 w-full",children:[e.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-emerald-600 text-xs font-semibold",children:[e.jsx(Ve,{className:"w-4 h-4"}),e.jsxs("span",{children:["Recording Completed (",G(F),")"]})]}),e.jsx("audio",{controls:!0,src:m,className:"w-full h-8 mt-2"}),e.jsx("div",{className:"flex items-center justify-center gap-2 pt-1",children:e.jsx(i,{type:"button",variant:"ghost",size:"sm",onClick:()=>{j(null),N(null)},className:"text-xs text-slate-500 hover:text-slate-700",children:"Record Again"})})]}):e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"w-12 h-12 rounded-full bg-blue-100 dar
1k:bg-blue-950 flex items-center justify-center mx-auto text-blue-600",children:e.jsx(Q,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold text-slate-800 dark:text-slate-200",children:"Record Microphone"}),e.jsx("p",{className:"text-[11px] text-slate-400 mt-0.5",children:"Click below to capture instant voice notes or meeting debriefs."})]}),e.jsxs(i,{type:"button",onClick:I,className:"h-8.5 px-4 rounded-lg bg-blue-600 hover:bg-blue-700 text-white text-xs font-semibold gap-1.5 cursor-pointer shadow-xs",children:[e.jsx(W,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Start Recording"})]})]})}),D&&e.jsxs("div",{className:"flex justify-end gap-2 pt-2 border-t border-slate-100 dark:border-slate-800",children:[e.jsx(i,{variant:"outline",size:"sm",onClick:x,className:"text-xs",children:"Discard"}),e.jsx(i,{size:"sm",onClick:ne,disabled:M,className:"bg-blue-600 hover:bg-blue-700 text-white text-xs font-semibold cursor-pointer",children:M?"Uploading...":"Save to Library"})]})]}),e.jsx(q,{value:"upload",className:"p-5 space-y-4 m-0 focus:outline-none",children:e.jsxs("form",{onSubmit:ie,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300",children:"Recording Title"}),e.jsx($,{placeholder:"e.g. Q3 Sales Review Meeting",value:p,onChange:l=>k(l.target.value),className:"h-9 text-xs rounded-lg border-slate-200 dark:border-slate-700"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-xs font-semibold text-slate-700 dark:text-slate-300",children:"Select File (MP4, WebM, MP3, WAV)"}),e.jsxs("div",{className:"relative border-2 border-dashed border-slate-200 dark:border-slate-700 rounded-xl p-6 text-center hover:border-blue-500/50 transition-colors bg-slate-50/50 dark:bg-slate-800/30",children:[e.jsx("input",{type:"file",accept:"audio/*,video/*,.mp4,.webm,.mp3,.wav,.ogg",onChange:l=>{l.target.files?.[0]&&C(l.target.files[0])},className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx(P,{className:"w-8 h-8 text-slate-400 mb-2"}),u?e.jsxs("div",{className:"text-xs font-semibold text-blue-600 truncate max-w-[280px]",children:[u.name," (",(u.size/(1024*1024)).toFixed(1)," MB)"]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs font-semibold text-slate-700 dark:text-slate-200",children:"Click to browse or drag file here"}),e.jsx("span",{className:"text-[11px] text-slate-400 mt-1",children:"Audio & video formats up to 500 MB"})]})]})]})]}),e.jsxs("div",{className:"flex justify-end gap-2.5 pt-3 border-t border-slate-100 dark:border-slate-800",children:[e.jsx(i,{type:"button",variant:"outline",size:"sm",onClick:x,className:"text-xs",children:"Discard"}),e.jsx(i,{type:"submit",size:"sm",disabled:!u||M,className:"bg-blue-600 hover:bg-blue-700 text-white text-xs font-semibold cursor-pointer",children:M?"Uploading...":"Upload & Process"})]})]})})]})]})})}export{ss as default};

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.