PageSourceSearch

https://console.patricia.app/static/MeetingsView-CCX-92Cm.js

js patricia.app collected 2026-10-02 00:27:25 UTC 57,532 bytes, 1 lines download raw bytes

1import{_ as me}from"./ErrorState.vue_vue_type_script_setup_true_lang-Cto6i3JI.js";import{_ as Et}from"./PageHeader.vue_vue_type_script_setup_true_lang-BXAmnF4A.js";import{_ as Ze}from"./EmptyState.vue_vue_type_script_setup_true_lang-CoAE46C8.js";import{_ as L}from"./SelectMenu.vue_vue_type_script_setup_true_lang-CzgBDUOd.js";import{b as Ot,_ as jt,a as Vt,c as qe}from"./DropdownMenuItem.vue_vue_type_script_setup_true_lang-CBFQFO-u.js";import{ax as et,d as M,bO as It,a0 as Ie,g as $,u as e,w as o,a as n,n as R,a8 as Nt,f as l,t as _,e as k,h as S,c as P,H as U,I as z,a1 as Ne,i as u,o as d,_ as Lt,b as Rt,cG as ke,R as we,aJ as G,ab as O,av as Ut,m as Mt,r as I,O as Dt,aa as zt,aE as tt,al as ce,Y as at,D as nt,aG as Bt,y as Ge,c4 as Yt,aw as Ft,au as He,ad as Ae,ak as Se}from"./index-CYPoTM9a.js";import{C as Wt}from"./chevron-down-CgP1jFIe.js";import{_ as qt}from"./DropdownMenuLabel.vue_vue_type_script_setup_true_lang-SZWwSE0X.js";import{_ as Gt}from"./DropdownMenuSeparator.vue_vue_type_script_setup_true_lang-B5fHPem9.js";import{C as Le}from"./check-DHEdr5f7.js";import{a as Ht,f as Jt}from"./format-C0_KLEwl.js";import{M as Qt,h as Kt,a as Xt,p as Re,b as Zt,m as st,i as ea}from"./meetingPresentation-D8a2s04n.js";import{_ as ae}from"./index-CXw7HVSd.js";import{C as it}from"./chevron-right-6tw-X_1Q.js";import{_ as pe}from"./Card.vue_vue_type_script_setup_true_lang-hmT4GdX4.js";import{_ as ta}from"./SlackLogo.vue_vue_type_script_setup_true_lang-Ckzv5QJb.js";import{u as aa}from"./useAskPatriciaInChat-DSYi66Ft.js";import{_ as na}from"./SearchableSelect.vue_vue_type_script_setup_true_lang-BhIz8vIf.js";import{u as ot}from"./useChatPlatform-CqNwmDzl.js";import{_ as N}from"./SettingRow.vue_vue_type_script_setup_true_lang-Bz6Fnm8Z.js";import{_ as Je}from"./SettingsCard.vue_vue_type_script_setup_true_lang-D1d0yWe2.js";import{_ as Z}from"./AlertTitle.vue_vue_type_script_setup_true_lang-BLpST5cV.js";import{_ as ee,a as te}from"./index-DfhPWy9e.js";import{_ as ye}from"./Switch.vue_vue_type_script_setup_true_lang-DRubUfIm.js";import{_ as sa}from"./Textarea.vue_vue_type_script_setup_true_lang-BbrYRiXS.js";import{u as Ee}from"./useAsync-C0P1hH6J.js";import{u as ia}from"./useUrlTab-J9lYdEhS.js";import{U as Oe}from"./tabs-BIWFbfYB.js";import{_ as oa,a as je,b as Ve,c as la}from"./TabsContent.vue_vue_type_script_setup_true_lang-BA9kMiTG.js";import"./triangle-alert-BCNEFyJv.js";import"./useFocusGuards-DY3p7F8S.js";import"./useTypeahead-CbIZGmNm.js";import"./RovingFocusGroup-C7FBH68v.js";import"./Collection-mNWYi8LI.js";import"./chevrons-up-down-B8NBlJEI.js";import"./CardContent.vue_vue_type_script_setup_true_lang-Dkm9Qp4e.js";import"./useFormControl-BbPmVLA4.js";import"./VisuallyHiddenInput-DAh5Fwe3.js";import"./RovingFocusItem-CF14bHIH.js";const ra=et("calendar-x-2",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m17 22 5-5",key:"1k6ppv"}],["path",{d:"m17 17 5 5",key:"p7ous7"}]]);const be=et("mail-warning",[["path",{d:"M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5",key:"e61zoh"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"M20 14v4",key:"1hm744"}],["path",{d:"M20 22v.01",key:"12bgn6"}]]),da={class:"text-muted-foreground"},ua=["title"],ca={class:"min-w-0 flex-1"},ma=["title"],pa=["title"],ga={class:"shrink-0 text-xs tabular-nums text-muted-foreground"},Qe=M({inheritAttrs:!1,__name:"MeetingsPersonFilter",props:Ne({options:{},label:{},anyLabel:{default:"Anyone"},disabled:{type:Boolean,default:!1}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const w=t,g=It(),v=u(()=>Object.fromEntries(Object.entries(g).filter(([i])=>i!=="class"))),r=Ie(t,"modelValue"),x=u(()=>w.options.find(i=>i.value===r.value)),h=u(()=>r.value?x.value?.name??"Selected person":w.anyLabel);function b(i){const f=i.trim().split(/\s+/).filter(Boolean);return f.length===0?"?":f.slice(0,2).map(E=>[...E][0]?.toLocaleUpperCase()??"").join("")}function a(i){r.value=i}return(i,f)=>(d(),$(e(Ot),null,{default:o(()=>[n(e(jt),{"as-child":""},{default:o(()=>[n(e(R),Nt(v.value,{variant:"outline",size:"sm",class:"max-w-full gap-2 rounded-md",disabled:t.disabled||t.options.length===0}),{default:o(()=>[l("span",da,_(t.label)+" ·",1),l("span",{class:"min-w-0 truncate font-medium",title:h.value},_(h.value),9,ua),n(e(Wt),{class:"size-3.5 text-muted-foreground"})]),_:1},16,["disabled"])]),_:1}),n(e(Vt),{align:"start",class:"max-h-80 min-w-56 overflow-y-auto"},{default:o(()=>[n(e(qt),null,{default:o(()=>[k(_(t.label),1)]),_:1}),n(e(Gt)),n(e(qe),{class:"justify-between gap-3",onSelect:f[0]||(f[0]=E=>a(""))},{default:o(()=>[k(_(t.anyLabel)+" ",1),r.value?S("",!0):(d(),$(e(Le),{key:0,class:"size-4 shrink-0 text-primary"}))]),_:1}),(d(!0),P(U,null,z(t.options,E=>(d(),$(e(qe),{key:E.value,class:"gap-3",onSelect:B=>a(E.value)},{default:o(()=>[n(e(Lt),{class:"size-6 shrink-0"},{default:o(()=>[n(e(Rt),{class:"bg-accent text-[10px] font-semibold text-accent-foreground"},{default:o(()=>[k(_(b(E.name)),1)]),_:2},1024)]),_:2},1024),l("span",ca,[l("span",{class:"block truncate",title:E.name},_(E.name),9,ma),E.detail?(d(),P("span",{key:0,class:"block truncate text-xs text-muted-foreground",title:E.detail},_(E.detail),9,pa)):S("",!0)]),l("span",ga,_(E.meetingCount),1),E.value===r.value?(d(),$(e(Le),{key:0,class:"size-4 shrink-0 text-primary"})):S("",!0)]),_:2},1032,["onSelect"]))),128))]),_:1})]),_:1}))}}),va={class:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground","aria-hidden":"true"},fa={class:"min-w-0 flex-1"},ha=["title"],ya=["title"],lt=M({__name:"MeetingsRecordingRow",props:{item:{},context:{default:"overview"}},setup(t){const w=t,g=u(()=>Re(w.item.platform)),v=u(()=>w.item.title?.trim()||"Untitled meeting"),r=u(()=>G(Qt,w.item.status)??Kt(w.item.status)),x=u(()=>G(Xt,w.item.status)??"muted"),h=u(()=>{if(w.item.status==="failed")return"";const a=G(Zt,w.item.recap_state)??"";return a||""}),b=u(()=>[w.context==="recordings"?`${Ht(w.item.requested_at)} · ${g.value}
1`:`${g.value} · ${Jt(w.item.requested_at)}`,w.item.owner_name?.trim(),h.value].filter(Boolean).join(" · "));return(a,i)=>(d(),$(e(we),{to:{name:"meeting-recording",params:{id:t.item.id}},class:"flex min-h-16 w-full cursor-pointer items-center gap-3 border-b border-border px-3 py-3 text-left transition-colors duration-150 last:border-0 hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset","data-testid":"recording-row",role:"listitem"},{default:o(()=>[l("span",va,[n(e(ke),{class:"size-4"})]),l("span",fa,[l("span",{class:"block truncate text-sm font-medium text-foreground",title:v.value},_(v.value),9,ha),l("span",{class:"block truncate text-xs leading-5 text-muted-foreground",title:b.value},_(b.value),9,ya)]),n(e(ae),{variant:x.value,class:"gap-1.5 border-0","data-testid":"recording-status"},{default:o(()=>[i[0]||(i[0]=l("span",{class:"size-1.5 rounded-full bg-current opacity-70","aria-hidden":"true"},null,-1)),k(" "+_(r.value),1)]),_:1},8,["variant"]),n(e(it),{class:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"})]),_:1},8,["to"]))}}),ba={key:0,class:"space-y-3 p-5","aria-label":"Loading recordings"},wa={class:"flex-1 space-y-2"},ka={class:"flex flex-wrap items-center gap-2 border-b border-border p-4"},xa={class:"relative w-full sm:w-[232px]"},_a={key:0,class:"w-full text-right text-xs tabular-nums text-muted-foreground sm:ml-auto sm:w-auto","data-testid":"recordings-counter","aria-live":"polite"},$a={key:1,class:"space-y-3 p-5","aria-label":"Loading meetings","data-testid":"recordings-refreshing"},Pa={class:"flex-1 space-y-2"},Ta={key:2,class:"flex flex-col items-center gap-2 px-5 py-12 text-center","data-testid":"filtered-empty"},Ca={class:"text-pretty text-sm text-muted-foreground"},Aa={key:3,class:"space-y-5 p-3 sm:p-4","data-testid":"recordings-day-groups"},Sa={class:"flex items-center justify-between gap-3 rounded-lg bg-muted/60 px-3 py-1.5"},Ea={class:"font-mono text-[10px] font-medium tracking-wide text-muted-foreground","data-testid":"day-header"},Oa={class:"text-[11px] tabular-nums text-muted-foreground"},ja=["aria-label"],Va={key:4,class:"border-t border-border px-5 py-3 text-xs tabular-nums text-muted-foreground","data-testid":"recordings-footer"},Ia=M({__name:"MeetingsAllRecordingsTab",props:Ne({recordings:{},loading:{type:Boolean},error:{},chatPlatformName:{},setupComplete:{type:Boolean,default:!1},people:{default:null},stale:{type:Boolean,default:!1}},{owner:{default:""},ownerModifiers:{},participant:{default:""},participantModifiers:{}}),emits:Ne(["retry"],["update:owner","update:participant"]),setup(t,{emit:w}){const g=t,v=w,r=Ie(t,"owner"),x=Ie(t,"participant"),h=I(""),b=I("all"),a=I("all"),i=I("30"),f=u(()=>(g.people?.owners??[]).map(y=>({value:y.actor_id,name:y.name,detail:y.email,meetingCount:y.meeting_count}))),E=u(()=>(g.people?.participants??[]).map(y=>({value:y.name,name:y.name,meetingCount:y.meeting_count}))),B=u(()=>!!r.value||!!x.value),Y=[{value:"all",label:"All"},{value:"ready",label:"Notes ready"},{value:"processing",label:"Processing"},{value:"failed",label:"Failed"}],H=[{value:"7",label:"Last 7 days"},{value:"30",label:"Last 30 days"},{value:"90",label:"Last 90 days"},{value:"all",label:"All time"}],j=u(()=>g.recordings?.items??[]),D=u(()=>{const y=[...new Set(j.value.map(c=>Re(c.platform)))].sort((c,m)=>c.localeCompare(m));return[{value:"all",label:"All"},...y.map(c=>({value:c,label:c}))]});function ne(y){return y==="ingested"?"ready":y==="failed"?"failed":["requested","recording","done"].includes(y)?"processing":y}function Q(y){if(y==="all")return null;const c=Number(y),m=new Date;return m.setHours(0,0,0,0),m.setDate(m.getDate()-(c-1)),m.getTime()}const F=u(()=>{const y=h.value.trim().toLocaleLowerCase(),c=Q(i.value);return j.value.filter(m=>!y||(m.title??"").toLocaleLowerCase().includes(y)).filter(m=>b.value==="all"||Re(m.platform)===b.value).filter(m=>a.value==="all"||ne(m.status)===a.value).filter(m=>{if(c===null)return!0;const V=new Date(m.requested_at).getTime();return!Number.isNaN(V)&&V>=c}).sort((m,V)=>new Date(V.requested_at).getTime()-new Date(m.requested_at).getTime())});function T(y){const c=new Date(y.requested_at);if(Number.isNaN(c.getTime()))return{key:"unknown",label:"UNKNOWN DATE",timestamp:Number.NEGATIVE_INFINITY};const m=c.getFullYear(),V=c.getMonth(),le=c.getDate(),xe=c.toLocaleDateString("en-US",{weekday:"short"}).toLocaleUpperCase(),fe=c.toLocaleDateString("en-US",{month:"short"}).toLocaleUpperCase(),he=m===new Date().getFullYear()?"":` ${m}`;return{key:`${m}-${V+1}-${le}`,label:`${xe} ${fe} ${le}${he}`,timestamp:new Date(m,V,le).getTime()}}const C=u(()=>{const y=new Map;for(const c of F.value){const m=T(c),V=y.get(m.key);V?V.items.push(c):y.set(m.key,{...m,items:[c]})}return[...y.values()].sort((c,m)=>m.timestamp-c.timestamp)}),K=u(()=>st(g.setupComplete,g.chatPlatformName));function se(y,c){return`${y} ${y===1?c:`${c}s`}`}function ie(){h.value="",b.value="all",a.value="all",i.value="all",r.value="",x.value=""}const ge=u(()=>f.value.find(y=>y.value===r.value)?.name),oe=u(()=>h.value.trim()!==""||b.value!=="all"||a.value!=="all"),W=u(()=>{if(i.value==="all")return"";const y=H.find(c=>c.value===i.value)?.label;return y?` in the ${y.toLocaleLowerCase()}`:""}),ve=u(()=>{const y=ge.value,c=x.value;return oe.value?"No meetings match these filters.":!y&&!c?W.value?`No meetings${W.value}.`:"No meetings match these filters.":y&&c?`No meetings have both ${y} and ${c}${W.value}.`:y?`No meetings belong to ${y}${W.value}.`:`${c} is not in any meeting Patricia recorded${W.value}.`});return(y,c)=>(d(),$(e(pe),{class:"gap-0 overflow-hidden py-0 shadow-sm","data-testid":"all-recordings-card"},{default:o(()=>
1[t.loading&&!t.recordings?(d(),P("div",ba,[n(e(O),{class:"h-10 w-56 rounded-md"}),(d(),P(U,null,z(5,m=>l("div",{key:m,class:"flex min-h-16 items-center gap-3"},[n(e(O),{class:"size-8 shrink-0 rounded-lg"}),l("div",wa,[n(e(O),{class:"h-3.5 w-2/5"}),n(e(O),{class:"h-3 w-3/5"})]),n(e(O),{class:"h-6 w-20 rounded-full"})])),64))])):t.error&&!t.recordings?(d(),$(me,{key:1,error:t.error,onRetry:c[0]||(c[0]=m=>v("retry"))},null,8,["error"])):t.recordings&&!t.stale&&j.value.length===0&&!B.value?(d(),$(Ze,{key:2,icon:e(ke),"icon-class":"bg-muted text-muted-foreground ring-0",title:"No recordings yet",description:K.value},null,8,["icon","description"])):t.recordings?(d(),P(U,{key:3},[l("div",ka,[l("div",xa,[c[8]||(c[8]=l("label",{for:"meetings-search",class:"sr-only"},"Search meetings",-1)),n(e(Ut),{class:"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),n(e(Mt),{id:"meetings-search",modelValue:h.value,"onUpdate:modelValue":c[1]||(c[1]=m=>h.value=m),type:"search",placeholder:"Search meetings",class:"rounded-md border-transparent bg-muted pl-9 shadow-none","data-testid":"meetings-search"},null,8,["modelValue"])]),n(Qe,{modelValue:r.value,"onUpdate:modelValue":c[2]||(c[2]=m=>r.value=m),options:f.value,label:"Owner","any-label":"Anyone","data-testid":"owner-filter"},null,8,["modelValue","options"]),n(Qe,{modelValue:x.value,"onUpdate:modelValue":c[3]||(c[3]=m=>x.value=m),options:E.value,label:"Participant","any-label":"Anyone","data-testid":"participant-filter"},null,8,["modelValue","options"]),n(L,{modelValue:b.value,"onUpdate:modelValue":c[4]||(c[4]=m=>b.value=m),options:D.value,label:"Platform","label-separator":"·","data-testid":"platform-filter"},null,8,["modelValue","options"]),n(L,{modelValue:a.value,"onUpdate:modelValue":c[5]||(c[5]=m=>a.value=m),options:Y,label:"Status","label-separator":"·","data-testid":"status-filter"},null,8,["modelValue"]),n(L,{modelValue:i.value,"onUpdate:modelValue":c[6]||(c[6]=m=>i.value=m),options:H,label:"Date","label-separator":"·","data-testid":"date-filter"},null,8,["modelValue"]),t.stale?S("",!0):(d(),P("p",_a," Showing "+_(F.value.length)+" of "+_(j.value.length),1))]),t.stale&&t.error?(d(),$(me,{key:0,error:t.error,onRetry:c[7]||(c[7]=m=>v("retry"))},null,8,["error"])):t.stale?(d(),P("div",$a,[(d(),P(U,null,z(3,m=>l("div",{key:m,class:"flex min-h-16 items-center gap-3"},[n(e(O),{class:"size-8 shrink-0 rounded-lg"}),l("div",Pa,[n(e(O),{class:"h-3.5 w-2/5"}),n(e(O),{class:"h-3 w-3/5"})]),n(e(O),{class:"h-6 w-20 rounded-full"})])),64))])):F.value.length===0?(d(),P("div",Ta,[l("p",Ca,_(ve.value),1),n(e(R),{variant:"ghost",size:"sm",onClick:ie},{default:o(()=>[...c[9]||(c[9]=[k("Clear filters",-1)])]),_:1})])):(d(),P("div",Aa,[(d(!0),P(U,null,z(C.value,m=>(d(),P("section",{key:m.key},[l("div",Sa,[l("h2",Ea,_(m.label),1),l("p",Oa,_(se(m.items.length,"meeting")),1)]),l("div",{role:"list","aria-label":m.label},[(d(!0),P(U,null,z(m.items,V=>(d(),$(lt,{key:V.id,item:V,context:"recordings"},null,8,["item"]))),128))],8,ja)]))),128))])),t.stale?S("",!0):(d(),P("p",Va,_(j.value.length===50?"Showing the latest 50 recordings":`Showing ${se(j.value.length,"recording")}`),1))],64)):S("",!0)]),_:1}))}}),Na={class:"flex items-center gap-2"},La={class:"text-pretty text-[13px] leading-5 text-accent-foreground"},Ke=M({__name:"MeetingsAskInChatCard",setup(t){const{platformName:w,canOpenChat:g,opening:v,openChat:r}=aa();return(x,h)=>(d(),$(e(pe),{class:"gap-4 border-0 bg-accent p-5 shadow-none","data-testid":"meetings-ask-slack-card"},{default:o(()=>[l("div",Na,[n(e(Dt),{class:"size-6 rounded-full"}),h[0]||(h[0]=l("h2",{class:"text-balance font-display text-[15px] font-semibold tracking-tight text-accent-foreground"}," Need her in a meeting now? ",-1))]),l("p",La," Ask Patricia in "+_(e(w))+" with the meeting link. ",1),h[1]||(h[1]=l("div",{class:"rounded-lg bg-card px-3 py-2.5 font-mono text-[11px] leading-5 text-foreground"},[l("p",null,"Patricia, record this meeting"),l("p",null,"meet.google.com/oak-tree-q3")],-1)),h[2]||(h[2]=l("p",{class:"text-pretty text-[11px] leading-4 text-accent-foreground"}," Joining asks for a quick approval in the chat first. Recording is consent-sensitive, so make sure everyone is okay with it. ",-1)),e(g)?(d(),$(e(R),{key:0,class:"w-full",disabled:e(v),onClick:e(r)},{default:o(()=>[e(v)?(d(),$(e(zt),{key:0,class:"size-4 animate-spin","aria-hidden":"true"})):(d(),$(ta,{key:1,class:"size-4","aria-hidden":"true"})),k(" "+_(e(v)?`Opening ${e(w)}`:`Ask in ${e(w)}`),1)]),_:1},8,["disabled","onClick"])):S("",!0),h[3]||(h[3]=l("p",{class:"text-center text-[11px] leading-4 text-accent-foreground"}," She confirms in the thread and posts the recap there. ",-1))]),_:1}))}}),Ra={class:"space-y-4 p-5"},Ua={class:"flex flex-wrap items-start justify-between gap-3"},Ma={class:"font-mono text-[11px] font-medium tabular-nums text-muted-foreground","data-testid":"setup-progress-label"},Da=["aria-valuemax","aria-valuenow"],za={class:"border-t border-border px-5"},Ba=["data-testid"],Ya={class:"sr-only"},Fa={class:"min-w-0 flex-1"},Wa={class:"text-pretty text-[13px] leading-5 text-muted-foreground"},qa={key:2,class:"max-w-28 text-right text-xs leading-4 text-muted-foreground"},Ga=M({__name:"MeetingsSetupChecklist",props:{settings:{},saving:{type:Boolean}},emits:["enableTeam","enablePersonal"],setup(t,{emit:w}){const g=t,v=w,r=u(()=>[{key:"recording",title:"Recording on for the workspace",description:"Patricia lives where your team already works.",done:g.settings.recording_enabled,action:null,actionLabel:null,hint:"Turned on by your workspace admin"}
1,{key:"team-autojoin",title:"Workspace allows auto-join",description:g.settings.team.autojoin_enabled?"On by default. Switch it off any time to stop auto-join for everyone.":"An admin turned this off, so Patricia joins nobody's meetings here. Turn it back on to allow auto-join.",done:g.settings.team.autojoin_enabled,action:g.settings.can_edit_team?"team":null,actionLabel:"Turn on auto-join for the workspace",hint:g.settings.can_edit_team?null:"Ask a workspace admin"},{key:"personal-autojoin",title:"Auto-join for your meetings",description:g.settings.personal.autojoin_enabled?"On by default, and only ever your own calendar. Turn it off any time.":"You turned this off. Turn it back on to let Patricia join meetings on your own calendar.",done:g.settings.personal.autojoin_enabled,action:g.settings.can_edit_personal?"personal":null,actionLabel:"Turn on auto-join for you",hint:g.settings.can_edit_personal?null:"Ask a workspace admin"},{key:"calendar",title:"Connect your calendar",description:"The last step: Patricia reads your Google Calendar or Outlook calendar to find your meetings.",done:g.settings.calendar.personal_connected,action:"calendar",actionLabel:"Connect your calendar",hint:null}]),x=u(()=>r.value.filter(a=>a.done).length),h=u(()=>x.value===r.value.length);function b(a){a==="team"&&v("enableTeam"),a==="personal"&&v("enablePersonal")}return(a,i)=>h.value?S("",!0):(d(),$(e(pe),{key:0,class:"gap-0 overflow-hidden py-0 shadow-sm","data-testid":"meetings-setup-checklist"},{default:o(()=>[l("div",Ra,[l("div",Ua,[i[0]||(i[0]=l("div",{class:"space-y-1"},[l("h2",{class:"text-balance text-base font-semibold text-foreground"}," Get Patricia up to speed "),l("p",{class:"text-pretty text-[13px] text-muted-foreground"}," A few steps to get Patricia running in your meetings ")],-1)),l("p",Ma,_(x.value)+" / "+_(r.value.length)+" done ",1)]),l("div",{class:"h-2 overflow-hidden rounded-full bg-muted",role:"progressbar","aria-label":"Meeting setup progress","aria-valuemin":"0","aria-valuemax":r.value.length,"aria-valuenow":x.value},[l("div",{class:"h-full rounded-full bg-primary",style:tt({width:`${x.value/r.value.length*100}%`}),"data-testid":"setup-progress-fill"},null,4)],8,Da)]),l("ul",za,[(d(!0),P(U,null,z(r.value,f=>(d(),P("li",{key:f.key,class:"flex min-h-16 items-center gap-3 border-b border-border py-3 last:border-0","data-testid":`setup-step-${f.key}`},[l("span",Ya,_(f.done?"Completed":"Pending"),1),l("span",{class:ce(["grid size-[22px] shrink-0 place-items-center rounded-full",f.done?"bg-success-soft text-success":"border-2 border-border text-muted-foreground"]),"aria-hidden":"true"},[f.done?(d(),$(e(Le),{key:0,class:"size-3.5","stroke-width":"2.5"})):S("",!0)],2),l("div",Fa,[l("p",{class:ce(["text-sm font-medium",f.done?"text-muted-foreground":"text-foreground"])},_(f.title),3),l("p",Wa,_(f.description),1)]),!f.done&&f.action&&f.action!=="calendar"?(d(),$(e(R),{key:0,variant:"brand",size:"sm",disabled:t.saving,"aria-label":f.actionLabel??void 0,"data-testid":`setup-action-${f.action}`,onClick:E=>b(f.action)},{default:o(()=>[...i[1]||(i[1]=[k(" Turn on ",-1)])]),_:1},8,["disabled","aria-label","data-testid","onClick"])):!f.done&&f.action==="calendar"?(d(),$(e(R),{key:1,"as-child":"",variant:"brand",size:"sm"},{default:o(()=>[n(e(we),{to:"/integrations","aria-label":f.actionLabel??void 0,"data-testid":"setup-action-calendar"},{default:o(()=>[...i[2]||(i[2]=[k(" Connect ",-1)])]),_:1},8,["aria-label"])]),_:2},1024)):!f.done&&f.hint?(d(),P("p",qa,_(f.hint),1)):S("",!0)],8,Ba))),128))])]),_:1}))}}),Ha={class:"space-y-6","data-testid":"meetings-overview-tab"},Ja={class:"flex flex-wrap items-start justify-between gap-3 border-b border-border px-5 py-4"},Qa={class:"space-y-1"},Ka={class:"text-pretty text-xs text-muted-foreground"},Xa={key:0,class:"px-3","aria-label":"Loading recent recordings"},Za={class:"flex-1 space-y-2"},en={key:3,class:"px-2",role:"list","aria-label":"Recent recordings","data-testid":"recent-recordings-list"},tn=M({__name:"MeetingsOverviewTab",props:{settings:{},recordings:{},loading:{type:Boolean},error:{},chatPlatformName:{},saving:{type:Boolean}},emits:["enableTeam","enablePersonal","retry","viewAll"],setup(t,{emit:w}){const g=t,v=w,r=u(()=>g.recordings?.items??[]),x=u(()=>r.value.slice(0,6)),h=u(()=>ea(g.settings)),b=u(()=>st(h.value,g.chatPlatformName));return(a,i)=>(d(),P("div",Ha,[n(Ga,{settings:t.settings,saving:t.saving,onEnableTeam:i[0]||(i[0]=f=>v("enableTeam")),onEnablePersonal:i[1]||(i[1]=f=>v("enablePersonal"))},null,8,["settings","saving"]),n(e(pe),{class:"gap-0 overflow-hidden py-0 shadow-sm"},{default:o(()=>[l("div",Ja,[l("div",Qa,[i[4]||(i[4]=l("h2",{class:"text-balance font-display text-base font-semibold tracking-tight text-foreground"}," Recent recordings ",-1)),l("p",Ka,_(r.value.length?"Newest first · recaps and transcripts open on click":"Recordings appear here once Patricia joins a meeting"),1)]),r.value.length?(d(),$(e(R),{key:0,variant:"ghost",size:"sm",class:"rounded-lg px-2 text-[13px]","data-testid":"view-all-recordings",onClick:i[2]||(i[2]=f=>v("viewAll"))},{default:o(()=>[i[5]||(i[5]=k(" View all ",-1)),n(e(it),{class:"size-3.5"})]),_:1}
1)):S("",!0)]),t.loading&&!t.recordings?(d(),P("div",Xa,[(d(),P(U,null,z(3,f=>l("div",{key:f,class:"flex min-h-16 items-center gap-3 py-3"},[n(e(O),{class:"size-8 shrink-0 rounded-lg"}),l("div",Za,[n(e(O),{class:"h-3.5 w-2/5"}),n(e(O),{class:"h-3 w-3/5"})]),n(e(O),{class:"h-6 w-20 rounded-full"})])),64))])):t.error&&!t.recordings?(d(),$(me,{key:1,error:t.error,onRetry:i[3]||(i[3]=f=>v("retry"))},null,8,["error"])):t.recordings&&r.value.length===0?(d(),$(Ze,{key:2,icon:e(ke),"icon-class":"bg-muted text-muted-foreground ring-0",title:"No recordings yet",description:b.value},null,8,["icon","description"])):t.recordings?(d(),P("div",en,[(d(!0),P(U,null,z(x.value,f=>(d(),$(lt,{key:f.id,item:f,context:"overview"},null,8,["item"]))),128))])):S("",!0)]),_:1})]))}}),an=M({__name:"RecapChannelPicker",props:{modelValue:{},platform:{},placeholder:{},disabled:{type:Boolean}},emits:["channelPicked"],setup(t,{emit:w}){const g=t,v=w,r=at(),x=I([]),h=I(!0),{platformToConnect:b,loadPlatform:a}=ot();nt(async()=>{const[T]=await Promise.allSettled([r.get("/meetings/recap-channel-options"),a()]);x.value=T.status==="fulfilled"?T.value:[],h.value=!1});const i=u(()=>x.value.some(T=>T.platform==="slack")),f=u(()=>x.value.some(T=>T.platform==="teams")),E=u(()=>i.value&&f.value),B=u(()=>i.value||g.platform==="slack"||!f.value&&b.value==="slack");function Y(T,C){return JSON.stringify([T,C])}function H(T){const C=[];return E.value&&C.push(T.platform==="teams"?"Microsoft Teams":"Slack"),T.platform==="slack"&&!T.is_member&&C.push("Patricia isn't in here yet"),C.length?C.join(" · "):void 0}const j=u(()=>g.platform==="slack"||g.platform==="teams"?g.platform:"slack"),D=u(()=>g.modelValue?Y(j.value,g.modelValue):""),ne=u(()=>{const T=x.value.map(C=>({value:Y(C.platform,C.id),label:C.platform==="slack"?`# ${C.name}`:C.name,hint:H(C)}));if(D.value&&!T.some(C=>C.value===D.value)){const C=j.value;T.unshift({value:D.value,label:C==="slack"?`# ${g.modelValue}`:"Saved Microsoft Teams channel",hint:E.value?C==="slack"?"Slack":"Microsoft Teams":void 0})}return T}),Q=u(()=>b.value==="microsoft_teams"&&x.value.length===0?"Add Patricia to the channel where you want meeting recaps.":"No channels found. Type a channel to use it.");function F(T){const C=x.value.find(K=>Y(K.platform,K.id)===T);if(C){v("channelPicked",{id:C.id,platform:C.platform});return}if(g.modelValue&&T===D.value){v("channelPicked",{id:g.modelValue,platform:j.value});return}B.value&&T&&v("channelPicked",{id:T,platform:"slack"})}return(T,C)=>(d(),$(na,{"model-value":D.value,options:ne.value,placeholder:h.value?"Loading channels…":t.placeholder??"Pick a channel","search-placeholder":"Search channels…","empty-text":Q.value,disabled:t.disabled||h.value,"allow-custom":B.value,"custom-prefix":"#","onUpdate:modelValue":F},null,8,["model-value","options","placeholder","empty-text","disabled","allow-custom"]))}}),nn={class:"space-y-6","data-testid":"meetings-settings-tab"},sn={key:0,class:"border-b border-border py-4","data-testid":"recap-channel-row"},on={key:0,class:"pt-2 text-sm text-warning"},ln={class:"flex max-w-sm flex-wrap items-center justify-end gap-2"},rn=["title"],dn={key:1,id:"recap-instructions-editor",class:"space-y-2 border-b border-border py-4","data-testid":"instructions-editor"},un={class:"flex justify-end gap-2"},cn={class:"pb-2 text-sm text-muted-foreground",role:"status","data-testid":"recording-access-state"},mn={class:"flex gap-2 pt-2"},pn={class:"pt-3 text-sm text-muted-foreground","data-testid":"redacted-topics-pointer"},gn=M({__name:"MeetingsSettingsTab",props:{settings:{},saving:{type:Boolean},autojoinScopeOptions:{},personalAutojoinScopeOptions:{},recapEmailOptions:{},personalRecapEmailOptions:{},prepEmailOptions:{},personalPrepEmailOptions:{},destinationValue:{},pendingChannelChoice:{type:Boolean},recordingVisibilityOptions:{},recordingAccessSentence:{},recapEmailClampedToOwner:{type:Boolean},clampUndoOpen:{type:Boolean},instructionsValue:{},instructionsDirty:{type:Boolean},editingInstructions:{type:Boolean}},emits:["savePersonalAutojoin","savePersonalAutojoinScope","savePersonalRecapAudience","savePersonalPrepAudience","patchTeam","destinationChange","channelPicked","update:instructionsValue","update:editingInstructions","saveInstructions","cancelInstructions","undoClamp","dismissClampUndo"],setup(t,{emit:w}){const g=t,v=w,r=u({get:()=>g.instructionsValue,set:b=>v("update:instructionsValue",b)}),x=[{value:"thread",label:"Reply in the thread that asked"},{value:"channel",label:"Post to a channel"},{value:"dm",label:"Send a direct message to the person whose meeting it was"}];function h(b,a,i){v("patchTeam",b,a,i)}return(b,a)=>(d(),P("div",nn,[t.settings.recording_enabled?S("",!0):(d(),$(e(te),{key:0,variant:"warning","data-testid":"recording-off-banner"},{default:o(()=>[n(e(ke),{class:"size-4"}),n(e(Z),null,{default:o(()=>[...a[19]||(a[19]=[k("Meeting recording is off for this workspace",-1)])]),_:1}),n(e(ee),null,{default:o(()=>[...a[20]||(a[20]=[k(" Patricia cannot join or record meetings right now. Your preferences are saved and take effect as soon as recording is available again. ",-1)])]),_:1})]),_:1})),n(Je,{overline:"You",title:"Your preferences",description:"What Patricia does for meetings on your calendar. Everything here is yours to change."},{default:o(()=>[t.settings.calendar.personal_connected?S("",!0):(d(),$(e(te),{key:0,variant:"warning",class:"mb-2","data-testid":"calendar-warning"},{default:o(()=>[n(e(ra),{class:"size-4"}),n(e(Z),null,{default:o(()=>[...a[21]||(a[21]=[k("Connect your calendar first",-1)])]),_:1}),n(e(ee),null,{default:o(()=>[a[23]||(a[23]=k(" Auto-join reads your own Google Calendar or Outlook calendar to find your meetings, so it will not work until you connect yours. ",-1)),n(e(we),{to:"/integrations",class:"font-medium underline underline-offset-2"},{default:o(()=>[...a[22]||(a[22]=[k(" Connect your calendar ",-1)])]),_:1})]),_:1})]),_:1})),n(N,{title:"Auto-join my meetings",description:t.settings.can_edit_personal?"Only meetings on your own calendar. Turn this off any time.":"Your role is view-only, so recording preferences are locked.","stack-on-mobile":""},{leading:o(()=>[n(e(Bt),{class:"size-4"})]),default:o(()=>[n(e(ye),{"model-value":t.settings.personal.autojoin_enabled,variant:"brand",disabled:t.saving||!t.settings.can_edit_personal,"aria-label":"Auto-join my meetings","data-testid":"personal-autojoin","onUpdate:modelValue":a[0]||(a[0]=i=>v("savePersonalAutojoin",i))},null,8,["model-value","disabled"])]),_:1},8,["description"]),n(N,{title:"Which meetings qualify",description:t.settings.can_edit_personal?"Choose which meetings on your calendar Patricia can join.":"Your role is view-only, so personal meeting preferences are locked.","stack-on-mobile":""},{default:o(()=>[n(L,{"model-value":t.settings.personal.autojoin_scope??"",options:t.personalAutojoinScopeOptions,disabled:t.saving||!t.settings.can_edit_personal,align:"end","data-testid":"personal-autojoin-scope","onUpdate:modelValue":a[1]||(a[1]=i=>v("savePersonalAutojoinScope",i))}
1,null,8,["model-value","options","disabled"])]),_:1},8,["description"]),n(N,{title:"Recap email goes to",description:t.settings.can_edit_personal?"Who receives the recap for your own meetings. Every recap email says Patricia wrote it, and anyone outside this workspace can unsubscribe from it.":"Your role is view-only, so personal meeting preferences are locked.","stack-on-mobile":""},{default:o(()=>[n(L,{"model-value":t.settings.personal.recap_email_audience??"",options:t.personalRecapEmailOptions,disabled:t.saving||!t.settings.can_edit_personal,align:"end","aria-label":"Recap email goes to, for my meetings","data-testid":"personal-recap-email-audience","onUpdate:modelValue":a[2]||(a[2]=i=>v("savePersonalRecapAudience",i))},null,8,["model-value","options","disabled"])]),_:1},8,["description"]),t.settings.effective.recap_email_excludes_externals?(d(),$(e(te),{key:1,variant:"warning",role:"status",class:"mt-2","data-testid":"personal-clamp-warning"},{default:o(()=>[n(e(be),{class:"size-4"}),n(e(Z),null,{default:o(()=>[...a[24]||(a[24]=[k("Your recap emails stay inside this workspace",-1)])]),_:1}),n(e(ee),null,{default:o(()=>[...a[25]||(a[25]=[k(" Your recap emails ask for people outside this workspace, but who can open recordings is set so that Patricia never emails them. Those people receive nothing, and nothing tells them a recap exists. Pick a narrower audience above if that matches what you want. Only an admin can change who can open recordings. ",-1)])]),_:1})]),_:1})):S("",!0),n(N,{title:"Prep email goes to",description:t.settings.can_edit_personal?"Choose who should receive prep for your meetings.":"Your role is view-only, so personal meeting preferences are locked.","stack-on-mobile":""},{"title-after":o(()=>[n(e(ae),{variant:"muted",class:"px-2 py-0 text-[10px]"},{default:o(()=>[...a[26]||(a[26]=[k("Coming soon",-1)])]),_:1})]),default:o(()=>[n(L,{"model-value":t.settings.personal.prep_email_audience??"",options:t.personalPrepEmailOptions,disabled:t.saving||!t.settings.can_edit_personal,align:"end","data-testid":"personal-prep-email-audience","onUpdate:modelValue":a[3]||(a[3]=i=>v("savePersonalPrepAudience",i))},null,8,["model-value","options","disabled"])]),_:1},8,["description"]),a[27]||(a[27]=l("p",{class:"pt-3 text-xs text-muted-foreground","data-testid":"personal-email-intent-note"}," Recap emails are sent now. Your prep choice is saved for when prep emails go live. ",-1))]),_:1}),n(Je,{overline:"Workspace",title:"Workspace policy",description:"Defaults and rules for everyone in this workspace. Teammates can override the personal ones above."},{"overline-after":o(()=>[n(e(ae),{variant:"muted",class:"px-2 py-0 text-[10px] normal-case"},{default:o(()=>[...a[28]||(a[28]=[k("Admins only",-1)])]),_:1})]),default:o(()=>[a[45]||(a[45]=l("p",{class:"pt-3 font-mono text-[11px] font-medium tracking-wide text-muted-foreground"}," AUTO-JOIN ",-1)),n(N,{title:"Allow auto-join in this workspace",description:t.settings.can_edit_team?"On by default for everyone who connects their own calendar. Each person can turn it off for themselves.":"Only a workspace admin can change this.","stack-on-mobile":""},{default:o(()=>[n(e(ye),{"model-value":t.settings.team.autojoin_enabled,variant:"brand",disabled:t.saving||!t.settings.can_edit_team,"aria-label":"Allow auto-join in this workspace","data-testid":"team-autojoin","onUpdate:modelValue":a[4]||(a[4]=i=>h({autojoin_enabled:i},i?"Auto-join is available for the workspace.":"Auto-join is off for the workspace."))},null,8,["model-value","disabled"])]),_:1},8,["description"]),n(N,{title:"Default: which meetings qualify",description:t.settings.can_edit_team?"This applies when a teammate follows the workspace default.":"Only a workspace admin can change this default.","stack-on-mobile":""},{default:o(()=>[n(L,{"model-value":t.settings.team.autojoin_scope,options:t.autojoinScopeOptions,disabled:t.saving||!t.settings.can_edit_team,align:"end","data-testid":"team-autojoin-scope","onUpdate:modelValue":a[5]||(a[5]=i=>h({autojoin_scope:i},"Workspace auto-join scope saved."))}
1,null,8,["model-value","options","disabled"])]),_:1},8,["description"]),a[46]||(a[46]=l("p",{class:"pt-5 font-mono text-[11px] font-medium tracking-wide text-muted-foreground"}," RECAPS ",-1)),n(N,{title:"Post a recap after each meeting",description:t.settings.can_edit_team?"Off keeps notes searchable in chat without a post.":"Only a workspace admin can change this.","stack-on-mobile":""},{default:o(()=>[n(e(ye),{"model-value":t.settings.team.recap_enabled,variant:"brand",disabled:t.saving||!t.settings.can_edit_team,"aria-label":"Post a recap after each meeting","data-testid":"recap-enabled","onUpdate:modelValue":a[6]||(a[6]=i=>h({recap_enabled:i},i?"Recaps are on.":"Recaps are off."))},null,8,["model-value","disabled"])]),_:1},8,["description"]),n(N,{title:"Where recaps go",description:"Thread-requested meetings always reply in their thread.","stack-on-mobile":""},{default:o(()=>[n(L,{"model-value":t.destinationValue,options:x,disabled:t.saving||!t.settings.can_edit_team,align:"end","data-testid":"recap-destination","onUpdate:modelValue":a[7]||(a[7]=i=>v("destinationChange",i))},null,8,["model-value","disabled"])]),_:1}),t.destinationValue==="channel"?(d(),P("div",sn,[a[29]||(a[29]=l("p",{class:"pb-2 text-sm font-medium text-foreground"},"Recap channel",-1)),n(an,{"model-value":t.settings.team.recap_channel_id??"",platform:t.settings.team.recap_channel_platform,disabled:t.saving||!t.settings.can_edit_team,placeholder:"Pick a channel for recaps",onChannelPicked:a[8]||(a[8]=i=>v("channelPicked",i))},null,8,["model-value","platform","disabled"]),t.pendingChannelChoice&&!t.settings.team.recap_channel_id?(d(),P("p",on," Pick a channel to finish this change. ")):S("",!0)])):S("",!0),n(N,{title:"Recap instructions",description:"Tell Patricia how to write recaps, in your own words.","stack-on-mobile":""},{default:o(()=>[l("div",ln,[l("span",{class:"max-w-full truncate rounded-lg bg-muted px-2.5 py-1.5 font-mono text-xs text-muted-foreground",title:t.instructionsValue||"No instructions yet"},_(t.instructionsValue?`“${t.instructionsValue}”`:"No instructions yet"),9,rn),n(e(R),{variant:"outline",size:"sm",disabled:t.saving||!t.settings.can_edit_team,"aria-expanded":t.editingInstructions,"aria-controls":"recap-instructions-editor","data-testid":"edit-instructions",onClick:a[9]||(a[9]=i=>v("update:editingInstructions",!t.editingInstructions))},{default:o(()=>[k(_(t.editingInstructions?"Close":"Edit"),1)]),_:1},8,["disabled","aria-expanded"])])]),_:1}),t.editingInstructions?(d(),P("div",dn,[n(e(sa),{modelValue:r.value,"onUpdate:modelValue":a[10]||(a[10]=i=>r.value=i),disabled:t.saving||!t.settings.can_edit_team,rows:"3",maxlength:"2000",placeholder:"Anything Patricia should always do before sharing a recap…","data-testid":"recap-instructions"},null,8,["modelValue","disabled"]),l("div",un,[n(e(R),{variant:"outline",size:"sm",disabled:t.saving,"data-testid":"cancel-instructions",onClick:a[11]||(a[11]=i=>v("cancelInstructions"))},{default:o(()=>[...a[30]||(a[30]=[k(" Cancel ",-1)])]),_:1},8,["disabled"]),n(e(R),{size:"sm",disabled:!t.instructionsDirty||t.saving||!t.settings.can_edit_team,"data-testid":"save-instructions",onClick:a[12]||(a[12]=i=>v("saveInstructions"))},{default:o(()=>[...a[31]||(a[31]=[k(" Save instructions ",-1)])]),_:1},8,["disabled"])])])):S("",!0),a[47]||(a[47]=l("p",{class:"pt-5 font-mono text-[11px] font-medium tracking-wide text-muted-foreground"}," MEETING ACCESS AND RECAP EMAILS ",-1)),n(N,{title:"Who can open recordings",description:t.settings.can_edit_team?"Covers the recording, its recap and its transcript, and whose chat questions can surface the meeting.":"Only a workspace admin can change this policy.","stack-on-mobile":""},{default:o(()=>[n(L,{"model-value":t.settings.team.recording_visibility,options:t.recordingVisibilityOptions,disabled:t.saving||!t.settings.can_edit_team,align:"end","aria-label":"Who can open recordings","data-testid":"recording-visibility","onUpdate:modelValue":a[13]||(a[13]=i=>h({recording_visibility:i},"Saved. Who can open recordings has changed.",{recording_visibility:t.settings.team.recording_visibility}))}
1,null,8,["model-value","options","disabled"])]),_:1},8,["description"]),l("p",cn,_(t.recordingAccessSentence),1),n(N,{title:"Then, who gets the recap by email",description:t.settings.can_edit_team?"The workspace default. It applies to every teammate who has not chosen their own.":"Only a workspace admin can change this default.","stack-on-mobile":""},{default:o(()=>[n(L,{"model-value":t.settings.team.recap_email_audience,options:t.recapEmailOptions,disabled:t.saving||!t.settings.can_edit_team,align:"end","aria-label":"Then, who gets the recap by email","data-testid":"team-recap-email-audience","onUpdate:modelValue":a[14]||(a[14]=i=>h({recap_email_audience:i},"Workspace recap email audience saved.",{recap_email_audience:t.settings.team.recap_email_audience}))},null,8,["model-value","options","disabled"])]),_:1},8,["description"]),t.recapEmailClampedToOwner?(d(),$(e(te),{key:2,variant:"warning",role:"status",class:"mb-2","data-testid":"team-owner-clamp-warning"},{default:o(()=>[n(e(be),{class:"size-4"}),n(e(Z),null,{default:o(()=>[...a[32]||(a[32]=[k("Only the meeting owner is getting the recap by email",-1)])]),_:1}),n(e(ee),null,{default:o(()=>[...a[33]||(a[33]=[k(" This default asks for more people than that, but who can open recordings is set so that only the person whose meeting it was may see a recording. Teammates and anyone outside this workspace receive nothing, and nothing tells them a recap exists. ",-1)])]),_:1})]),_:1})):t.settings.team.recap_email_excludes_externals?(d(),$(e(te),{key:3,variant:"warning",role:"status",class:"mb-2","data-testid":"team-clamp-warning"},{default:o(()=>[n(e(be),{class:"size-4"}),n(e(Z),null,{default:o(()=>[...a[34]||(a[34]=[k("People outside this workspace are not getting the recap",-1)])]),_:1}),n(e(ee),null,{default:o(()=>[...a[35]||(a[35]=[k(" This default includes people from outside this workspace, but who can open recordings is set so that Patricia never emails them. They receive nothing, and nothing tells them a recap exists. Keep it this way if that is the privacy you want, or pick an email audience that matches it. ",-1)])]),_:1})]),_:1})):S("",!0),t.clampUndoOpen?(d(),$(e(te),{key:4,variant:"warning",role:"status",class:"mb-2","data-testid":"clamp-undo"},{default:o(()=>[n(e(be),{class:"size-4"}),n(e(Z),null,{default:o(()=>[...a[36]||(a[36]=[k("That change stopped recap emails leaving this workspace",-1)])]),_:1}),n(e(ee),null,{default:o(()=>[a[39]||(a[39]=l("p",null," People on the invite from outside this workspace will no longer receive the recap, and they will not be told it stopped. ",-1)),l("div",mn,[n(e(R),{size:"sm",disabled:t.saving,"data-testid":"clamp-undo-revert",onClick:a[15]||(a[15]=i=>v("undoClamp"))},{default:o(()=>[...a[37]||(a[37]=[k(" Restore the previous setting ",-1)])]),_:1},8,["disabled"]),n(e(R),{variant:"outline",size:"sm",disabled:t.saving,"data-testid":"clamp-undo-keep",onClick:a[16]||(a[16]=i=>v("dismissClampUndo"))},{default:o(()=>[...a[38]||(a[38]=[k(" Keep the change ",-1)])]),_:1},8,["disabled"])])]),_:1})]),_:1})):S("",!0),n(N,{title:"Prep email goes to",description:t.settings.can_edit_team?"This applies when a teammate follows the workspace default.":"Only a workspace admin can change this default.","stack-on-mobile":""},{"title-after":o(()=>[n(e(ae),{variant:"muted",class:"px-2 py-0 text-[10px]"},{default:o(()=>[...a[40]||(a[40]=[k("Coming soon",-1)])]),_:1})]),default:o(()=>[n(L,{"model-value":t.settings.team.prep_email_audience,options:t.prepEmailOptions,disabled:t.saving||!t.settings.can_edit_team,align:"end","data-testid":"team-prep-email-audience","onUpdate:modelValue":a[17]||(a[17]=i=>h({prep_email_audience:i},"Workspace prep email audience saved."))},null,8,["model-value","options","disabled"])]),_:1},8,["description"]),a[48]||(a[48]=l("p",{class:"pt-5 font-mono text-[11px] font-medium tracking-wide text-muted-foreground"}," PRIVACY ",-1)),n(N,{title:"Public meeting links",description:t.settings.can_edit_team?"Save whether public access should be allowed when meeting links are available.":"Only a workspace admin can change this policy.","stack-on-mobile":""},{"title-after":o(()=>[n(e(ae),{variant:"muted",class:"px-2 py-0 text-[10px]"},{default:o(()=>[...a[41]||(a[41]=[k("Coming soon",-1)])]),_:1})]),default:o(()=>[n(e(ye),{"model-value":t.settings.team.public_access_enabled,variant:"brand",disabled:t.saving||!t.settings.can_edit_team,"aria-label":"Public meeting links","data-testid":"public-access","onUpdate:modelValue":a[18]||(a[18]=i=>h({public_access_enabled:i},"Public access preference saved."))},null,8,["model-value","disabled"])]),_:1},8,["description"]),a[49]||(a[49]=l("p",{class:"pt-3 text-sm text-muted-foreground","data-testid":"public-access-intent-note"}," Public links are not available yet. This choice is saved, but it does not create a link today. ",-1)),l("p",pn,[a[43]||(a[43]=k(" Topics you never want in a recap or transcript are set in ",-1)),n(e(we),{to:"/settings/data#redacted-topics",class:"font-medium underline underline-offset-2"},{default:o(()=>[...a[42]||(a[42]=[k(" Data and privacy ",-1)])]),_:1}),a[44]||(a[44]=k(". ",-1))])]),_:1})]))}}),vn={class:"space-y-5"},fn={class:"flex items-center justify-between gap-3 text-[13px]"},hn={class:"text-muted-foreground"},yn={class:"font-medium tabular-nums text-foreground"},bn=["aria-label","aria-valuemax","aria-valuenow"],wn={class:"text-pretty text-xs leading-5 text-muted-foreground"},Xe=M({__name:"MeetingsUsageCard",props:{usage:{}},setup(t){const w=t,g=u(()=>w.usage?[{label:"Recording slots",value:w.usage.slots_in_use,maximum:w.usage.max_concurrent},{label:"Notetaker minutes",value:w.usage.monthly_minutes_used,maximum:w.usage.monthly_minutes_budget}]:[]),v=u(()=>w.usage?.slots_in_use===0&&w.usage.monthly_minutes_used===0);function r(x,h){if(h<=0)return"0%";const b=Math.min(100,Math.max(0,x/h*100));return`${Math.round(b*10)/10}%`}return(x,h)=>t.usage?(d(),$(e(pe),{key:0,class:"gap-5 p-5 shadow-sm","data-testid":"meetings-usage-card"},{default:o(()=>[h[0]||(h[0]=l("h2",{class:"text-balance font-display text-base font-semibold tracking-tight text-foreground"}," This month ",-1)),l("div",vn,[(d(!0),P(U,null,z(g.value,b=>(d(),P("div",{key:b.label,class:"space-y-2"},[l("div",fn,[l("span",hn,_(b.label),1),l("span",yn,_(b.value)+" of "+_(b.maximum),1)]),l("div",{class:"h-2 overflow-hidden rounded-full bg-muted",role:"progressbar","aria-label":b.label,"aria-valuemin":0,"aria-valuemax":b.maximum,"aria-valuenow":Math.min(b.value,b.maximum)},[l("div",{class:"h-full rounded-full bg-primary",style:tt({width:r(b.value,b.maximum)}),"data-testid":"usage-meter-fill"},null,4)],8,bn)]))),128))]),l("p",wn,_(v.value?"Nothing recorded yet this month.":"Slots free up as soon as a meeting ends."),1)]),_:1})):S("",!0)}}),kn={class:"mx-auto max-w-6xl space-y-6"},xn={class:"grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(18rem,22rem)]"},_n={class:"min-w-0"},$n={key:0,class:"space-y-4"},Pn={class:"space-y-6","aria-label":"Meeting help and usage"},Tn={class:"grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(18rem,22rem)]"},Cn={class:"min-w-0"},An={key:0,class:"space-y-4"},Sn={class:"space-y-6","aria-label":"Meeting help and usage"},vs=M({__name:"MeetingsView",setup(t,{expose:w}){const g=at(),v=ia(["overview","recordings","settings"],"overview","tab"),{data:r,error:x,loading:h,run:b}=Ee(s=>
1g.get("/meetings/settings",{signal:s})),a=I(""),i=I(""),f=u(()=>{const s=new URLSearchParams({limit:"50"});return a.value&&s.set("owner_actor_id",a.value),i.value&&s.set("participant",i.value),s.toString()}),E=He(null),{data:B,error:Y,loading:H,run:j}=Ee(async s=>{const p=f.value,A=await g.get(`/meetings/recordings?${p}`,{signal:s});return s.aborted||(E.value=p),A}),D=u(()=>E.value!==f.value),{data:ne,run:Q}=Ee(s=>g.get("/meetings/recordings/people",{signal:s}));Ge(f,()=>{j()});const F=He(null);Ge(B,s=>{s&&!a.value&&!i.value&&(F.value=s)});const T=I(null),{name:C,loadPlatform:K}=ot();nt(()=>{K(),b(),j(),Q(),g.get("/meetings/usage").then(s=>{T.value=s}).catch(()=>{T.value=null})});const se=u(()=>r.value?[r.value.recording_enabled,r.value.team.autojoin_enabled,r.value.personal.autojoin_enabled,r.value.calendar.personal_connected].filter(Boolean).length:0),ie=u(()=>se.value===4),ge=u(()=>4-se.value),oe=[{value:"any_meeting_link",label:"Every calendar event with a meeting link"},{value:"i_host",label:"Only meetings I organize"},{value:"internal",label:"Internal meetings, with people from my company"},{value:"external",label:"External meetings, with someone outside my company"},{value:"workspace_teammates",label:"Meetings with my Patricia workspace teammates"}],W=[{value:"all_participants",label:"Everyone in the meeting"},{value:"only_me",label:"The meeting owner only"},{value:"do_not_send",label:"Do not send prep emails"}],ve=[{value:"all_participants",label:"Everyone in the meeting"},{value:"only_me",label:"Only me"},{value:"do_not_send",label:"Do not send prep emails"}],y=u(()=>(r.value?.workspace_domains?.length??0)>0),c=u(()=>oe.filter(s=>y.value||!["internal","external"].includes(s.value))),m=u(()=>{const s=r.value?.workspace_domains??[];return s.length<=1?s[0]??"your company":s.length===2?`${s[0]} or ${s[1]}`:`${s.slice(0,-1).join(", ")}, or ${s.at(-1)}`}),V={everyone_on_invite:"Everyone on the invite",workspace_participants:"The meeting owner and invited teammates",only_me:"The meeting owner only",do_not_send:"Do not send recap emails"},le={everyone_on_invite:"Everyone on the invite",workspace_participants:"Me and invited teammates",only_me:"Only me",do_not_send:"Do not send recap emails"},xe={no_company_domain:"Patricia has not found a company email address in this workspace yet, so there is no company to match."};function fe(s){return(r.value?.recap_email_audience_choices??[]).map(p=>({value:p.value,label:s[p.value]??(s===V?`The meeting owner and invited people from ${m.value}`:`Me and invited people from ${m.value}`),selectable:p.selectable,hint:p.selectable?p.recap_email_excludes_externals?"People on the invite from outside this workspace will not receive it, because of who can open recordings.":void 0:G(xe,p.unavailable_reason??"")??"This choice is not available in this workspace."}))}const he=u(()=>fe(V)),rt=u(()=>fe(le)),Ue={participants_and_teammates:"This workspace, plus guests by email",teammates:"This workspace only",only_me:"Only the person whose meeting it was"},dt={teammates_and_link:"Anyone with the link (older setting)",participants:"Only people in the meeting (older setting)"},ut={teammates_and_link:"Shareable links are not built yet",participants:"Patricia cannot yet confirm who attended"};function Me(s){const p=s.workspace_can_open?"Everyone here can open the recording.":"Only the person whose meeting it was can open the recording.";return s.recap_email_clamped_to_owner?`${p} The recap email goes to that person alone, so teammates stop receiving it as well.`:s.recap_email_excludes_externals?`${p} Nobody outside this workspace receives the recap by email.`:s.recap_email_reaches_externals?`${p} People on the invite from outside this workspace cannot open it, but they do receive the recap by email.`:p}const ct=u(()=>(r.value?.recording_visibility_choices??[]).filter(s=>s.behaves_like===s.value||s.value===r.value?.team.recording_visibility).map(s=>{const p=(s.behaves_like===s.value?G(Ue,s.value):G(dt,s.value))??s.value;if(s.behaves_like===s.value)return{value:s.value,label:p,hint:Me(s)};const A=G(Ue,s.behaves_like)??s.behaves_like,ue=G(ut,s.value)??"This is an older setting";return{value:s.value,label:p,hint:`${ue}, so today this does exactly what "${A}" does. ${Me(s)}`}})),De=u(()=>r.value?.recording_visibility_choices?.find(s=>
1s.value===r.value?.team.recording_visibility)),mt=u(()=>De.value?.recap_email_clamped_to_owner??!1),pt=u(()=>{const s=De.value;return s?s.workspace_can_open?"Right now: everyone in this workspace can open these recordings, including meetings they were not in. This applies to recordings you already have, not only new ones.":"Right now: only the person whose meeting it was can open these recordings. This applies to recordings you already have, not only new ones.":""});function gt(s,p){return s.find(A=>A.value===p)?.label??"the workspace default"}function _e(s,p,A=s){return[{value:"",label:`Follow the workspace default (${gt(A,p)})`},...s]}const vt=u(()=>r.value?_e(c.value,r.value.team.autojoin_scope,oe):[]),ft=u(()=>r.value?_e(rt.value,r.value.team.recap_email_audience,he.value):[]),ht=u(()=>r.value?_e(ve,r.value.team.prep_email_audience,W):[]),q=I(!1),re=I(null);function yt(){re.value=null}async function bt(){const s=re.value;s&&await J(s.body,"Put back. Your previous setting is restored.")}async function J(s,p,A){const ue=r.value?.team.recap_email_excludes_externals??!1;q.value=!0;try{return r.value=await g.patch("/meetings/settings",s),r.value.team.recap_email_excludes_externals?!ue&&A&&(re.value={body:A}):re.value=null,Ae.success(p),!0}catch(At){return Se(At,{fallback:{title:"That change did not save",description:"Please try again."},overrides:{BAD_REQUEST:St=>({title:"That change did not save",description:St.message})}}),!1}finally{q.value=!1}}async function $e(s){q.value=!0;try{r.value=await g.put("/meetings/settings/personal",{autojoin_enabled:s}),Ae.success(s?"Auto-join is on for your meetings.":"Auto-join is off for your meetings.")}catch(p){Se(p,{fallback:{title:"That change did not save",description:"Please try again."},overrides:{BAD_REQUEST:A=>({title:"That change did not save",description:A.message})}})}finally{q.value=!1}}async function Pe(s,p){q.value=!0;try{r.value=await g.put("/meetings/settings/personal",s),Ae.success(p)}catch(A){Se(A,{fallback:{title:"That change did not save",description:"Please try again."},overrides:{BAD_REQUEST:ue=>({title:"That change did not save",description:ue.message})}})}finally{q.value=!1}}function ze(s){const p=oe.find(A=>A.value===s)?.value??null;return Pe({autojoin_scope:p},"Your auto-join scope is saved.")}function Be(s){const p=r.value?.recap_email_audience_choices?.find(A=>A.value===s)?.value??null;return Pe({recap_email_audience:p},"Your recap email choice is saved.")}function Ye(s){const p=ve.find(A=>A.value===s)?.value??null;return Pe({prep_email_audience:p},"Your prep email choice is saved.")}function wt(){J({autojoin_enabled:!0},"Auto-join is available for the workspace.")}const de=I(!1),kt=u(()=>de.value?"channel":r.value?.team.recap_destination??"thread");function xt(s){if(!(s!=="thread"&&s!=="channel"&&s!=="dm")){if(s==="channel"&&!r.value?.team.recap_channel_id){de.value=!0;return}de.value=!1,J({recap_destination:s},"Recap destination saved.")}}function _t(s){s.id&&J({recap_destination:"channel",recap_channel_id:s.id,recap_channel_platform:s.platform},"Channel saved. Recaps go there once auto-joined meetings arrive.").then(p=>{p&&(de.value=!1)})}const X=I(null),Te=u({get:()=>X.value??r.value?.team.recap_share_instructions??"",set:s=>{X.value=s}}),$t=u(()=>X.value!==null&&X.value.trim()!==(r.value?.team.recap_share_instructions??""));function Pt(s){Te.value=s}const Ce=I(!1);function Fe(s){Ce.value=s,s||(X.value=null)}function Tt(){Fe(!1)}async function We(){await J({recap_share_instructions:Te.value.trim()||null},"Recap instructions saved.")&&(X.value=null,Ce.value=!1)}function Ct(){v.value="recordings"}return w({tab:v,ownerFilter:a,participantFilter:i,loadSettings:b,loadHistory:j,loadFilterPeople:Q,patchTeam:J,savePersonalAutojoin:$e,savePersonalAutojoinScope:ze,savePersonalRecapAudience:Be,savePersonalPrepAudience:Ye,saveInstructions:We}),(s,p)=>(d(),P("div",kn,[n(Et,{overline:"Superskill · Meetings",title:"Meetings",description:"Patricia joins your meetings, takes notes, and shares the recap where your team works."},Yt({_:2},[e(r)?{name:"overline-after",fn:o(()=>[n(e(ae),{variant:ie.value?"success":"warning",class:"gap-1.5 border-0","data-testid":"meetings-setup-status"},{default:o(()=>[p[4]||(p[4]=l("span",{class:"size-1.5 rounded-full bg-current opacity-70","aria-hidden":"true"},null,-1)),k(" "+_(ie.value?"Auto-join active":`Setup · ${ge.value} ${ge.value===1?"step":"steps"} left`),1)]),_:1},8,["variant"])]),key:"0"}:void 0]),1024),n(e(la),{modelValue:e(v),"onUpdate:modelValue":p[3]||(p[3]=A=>Ft(v)?v.value=A:null),class:"gap-6"},{default:o(()=>[n(e(oa),{class:"h-auto w-full justify-start gap-1 overflow-x-auto rounded-none border-b bg-transparent p-0"},{default:o(()=>[n(e(je),{value:"overview",class:ce(e(Oe))},{default:o(()=>[...p[5]||(p[5]=[k(" Overview ",-1)])]),_:1},8,["class"]),n(e(je),{value:"recordings",class:ce(e(Oe))},{default:o(()=>[...p[6]||(p[6]=[k(" All recordings ",-1)])]),_:1},8,["class"]),n(e(je),{value:"settings",class:ce(e(Oe))},{default:o(()=>[...p[7]||(p[7]=[k(" Settings ",-1)])]),_:1},8,["class"])]),_:1}),n(e(Ve),{value:"overview"},{default:o(()=>[l("div",xn,[l("main",_n,[e(h)&&!e(r)?(d(),P("div",$n,[n(e(O),{class:"h-48 w-full rounded-lg"}),n(e(O),{class:"h-72 w-full rounded-lg"}
1)])):e(x)&&!e(r)?(d(),$(me,{key:1,error:e(x),onRetry:e(b)},null,8,["error","onRetry"])):e(r)?(d(),$(tn,{key:2,settings:e(r),recordings:F.value,loading:e(H),error:e(Y),saving:q.value,"chat-platform-name":e(C),onEnableTeam:wt,onEnablePersonal:p[0]||(p[0]=A=>$e(!0)),onRetry:e(j),onViewAll:Ct},null,8,["settings","recordings","loading","error","saving","chat-platform-name","onRetry"])):S("",!0)]),l("aside",Pn,[n(Xe,{usage:T.value},null,8,["usage"]),n(Ke)])])]),_:1}),n(e(Ve),{value:"recordings"},{default:o(()=>[n(Ia,{owner:a.value,"onUpdate:owner":p[1]||(p[1]=A=>a.value=A),participant:i.value,"onUpdate:participant":p[2]||(p[2]=A=>i.value=A),recordings:e(B),loading:e(H),error:e(Y),"chat-platform-name":e(C),"setup-complete":ie.value,people:e(ne),stale:D.value,onRetry:e(j)},null,8,["owner","participant","recordings","loading","error","chat-platform-name","setup-complete","people","stale","onRetry"])]),_:1}),n(e(Ve),{value:"settings"},{default:o(()=>[l("div",Tn,[l("main",Cn,[e(h)&&!e(r)?(d(),P("div",An,[n(e(O),{class:"h-80 w-full rounded-lg"}),n(e(O),{class:"h-[36rem] w-full rounded-lg"})])):e(x)&&!e(r)?(d(),$(me,{key:1,error:e(x),onRetry:e(b)},null,8,["error","onRetry"])):e(r)?(d(),$(gn,{key:2,settings:e(r),saving:q.value,"autojoin-scope-options":c.value,"personal-autojoin-scope-options":vt.value,"recap-email-options":he.value,"personal-recap-email-options":ft.value,"recording-visibility-options":ct.value,"recording-access-sentence":pt.value,"recap-email-clamped-to-owner":mt.value,"clamp-undo-open":re.value!==null,"prep-email-options":W,"personal-prep-email-options":ht.value,"destination-value":kt.value,"pending-channel-choice":de.value,"instructions-value":Te.value,"instructions-dirty":$t.value,"editing-instructions":Ce.value,onUndoClamp:bt,onDismissClampUndo:yt,onSavePersonalAutojoin:$e,onSavePersonalAutojoinScope:ze,onSavePersonalRecapAudience:Be,onSavePersonalPrepAudience:Ye,onPatchTeam:J,onDestinationChange:xt,onChannelPicked:_t,"onUpdate:instructionsValue":Pt,"onUpdate:editingInstructions":Fe,onSaveInstructions:We,onCancelInstructions:Tt},null,8,["settings","saving","autojoin-scope-options","personal-autojoin-scope-options","recap-email-options","personal-recap-email-options","recording-visibility-options","recording-access-sentence","recap-email-clamped-to-owner","clamp-undo-open","personal-prep-email-options","destination-value","pending-channel-choice","instructions-value","instructions-dirty","editing-instructions"])):S("",!0)]),l("aside",Sn,[n(Xe,{usage:T.value},null,8,["usage"]),n(Ke)])])]),_:1})]),_:1},8,["modelValue"])]))}});export{vs 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.