@sentry/junior-dashboard 0.279.0 → 0.281.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +105 -43
- package/dist/client-manifest.json +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +105 -43
- package/dist/public/chunks/AdminPage-M5RBVZFN.js +1 -0
- package/dist/public/chunks/AutomationPage-WALCREDT.js +3 -0
- package/dist/public/chunks/AutomationRunsPage-CV47E4UX.js +1 -0
- package/dist/public/chunks/AutomationsPage-57L3AQVJ.js +1 -0
- package/dist/public/chunks/CodePage-XJUYMFJH.js +1 -0
- package/dist/public/chunks/ConnectionsPage-3QQAGYWF.js +1 -0
- package/dist/public/chunks/DrawerContent-RYYS57ZH.js +1 -0
- package/dist/public/chunks/LocationDetailPage-4IL5HQML.js +1 -0
- package/dist/public/chunks/LocationsPage-D2DUQAHJ.js +1 -0
- package/dist/public/chunks/McpSettingsPage-3RT7JPEK.js +1 -0
- package/dist/public/chunks/PeoplePage-6F5GPQ7C.js +1 -0
- package/dist/public/chunks/PersonProfilePage-SPAYQPTD.js +1 -0
- package/dist/public/chunks/PersonalTokensPage-SHAUJ74M.js +1 -0
- package/dist/public/chunks/PluginUserPage-64FIWD7M.js +1 -0
- package/dist/public/chunks/RepositoryPage-L7IHOXSN.js +1 -0
- package/dist/public/chunks/SettingsPage-U7WG4FHE.js +1 -0
- package/dist/public/chunks/SystemPage-ZBC43OJH.js +1 -0
- package/dist/public/chunks/WorkspaceFormPage-3NVIIZ4P.js +2 -0
- package/dist/public/chunks/WorkspacesPage-G73HPBDD.js +1 -0
- package/dist/public/chunks/chunk-2BCS5AQL.js +1 -0
- package/dist/public/chunks/chunk-2J3LGF5Q.js +1 -0
- package/dist/public/chunks/chunk-2NNKHSZE.js +1 -0
- package/dist/public/chunks/chunk-3Y3ICT6K.js +1 -0
- package/dist/public/chunks/chunk-4AKUZW6R.js +1 -0
- package/dist/public/chunks/chunk-4TQSTCIN.js +13 -0
- package/dist/public/chunks/chunk-4UGZNVJM.js +1 -0
- package/dist/public/chunks/chunk-564V7YHG.js +1 -0
- package/dist/public/chunks/chunk-5ISD3QSC.js +1 -0
- package/dist/public/chunks/chunk-5LNGNJ3P.js +1 -0
- package/dist/public/chunks/chunk-5ZA674OU.js +1 -0
- package/dist/public/chunks/chunk-64GPEGGE.js +1 -0
- package/dist/public/chunks/chunk-6FHY65EQ.js +1 -0
- package/dist/public/chunks/chunk-6FSJ3W2W.js +1 -0
- package/dist/public/chunks/chunk-6PHJZPWD.js +19 -0
- package/dist/public/chunks/chunk-B5ZN3SWQ.js +14 -0
- package/dist/public/chunks/chunk-BKOACADP.js +1 -0
- package/dist/public/chunks/chunk-CQY6BYUB.js +1 -0
- package/dist/public/chunks/chunk-CR2ICLSH.js +1 -0
- package/dist/public/chunks/chunk-DEEO4D4N.js +1 -0
- package/dist/public/chunks/chunk-DZB4LPI6.js +1 -0
- package/dist/public/chunks/chunk-FE522UEA.js +1 -0
- package/dist/public/chunks/chunk-FSGVY7HB.js +1 -0
- package/dist/public/chunks/chunk-FVX42XAD.js +1 -0
- package/dist/public/chunks/chunk-G5NWYJTV.js +1 -0
- package/dist/public/chunks/chunk-GMZIELFU.js +1 -0
- package/dist/public/chunks/chunk-GOTQ4D6W.js +1 -0
- package/dist/public/chunks/chunk-GYRM5ZIV.js +1 -0
- package/dist/public/chunks/chunk-GZBMHYYU.js +1 -0
- package/dist/public/chunks/chunk-H2ZU34CP.js +1 -0
- package/dist/public/chunks/chunk-H76B43OQ.js +1 -0
- package/dist/public/chunks/chunk-HCLRG2EC.js +1 -0
- package/dist/public/chunks/chunk-II4NXLSQ.js +2 -0
- package/dist/public/chunks/chunk-ILH47V7O.js +1 -0
- package/dist/public/chunks/chunk-IZWTFLCC.js +1 -0
- package/dist/public/chunks/chunk-J37MXUED.js +1 -0
- package/dist/public/chunks/chunk-JAZABOBA.js +0 -0
- package/dist/public/chunks/chunk-JPL2NRWK.js +1 -0
- package/dist/public/chunks/chunk-JVJ5UWIK.js +1 -0
- package/dist/public/chunks/chunk-K4TYMAA3.js +63 -0
- package/dist/public/chunks/chunk-KDUTK357.js +1 -0
- package/dist/public/chunks/chunk-L2H3ZWZN.js +1 -0
- package/dist/public/chunks/chunk-LBELRO5P.js +1 -0
- package/dist/public/chunks/chunk-LKW7MULF.js +1 -0
- package/dist/public/chunks/chunk-LZYAHJVQ.js +1 -0
- package/dist/public/chunks/chunk-MEHLQZDG.js +3 -0
- package/dist/public/chunks/chunk-MKKFXRYO.js +1 -0
- package/dist/public/chunks/chunk-MTBUV2GJ.js +1 -0
- package/dist/public/chunks/chunk-NGQRNS3C.js +1 -0
- package/dist/public/chunks/chunk-ONDKE72P.js +1 -0
- package/dist/public/chunks/chunk-PG7M7L24.js +1 -0
- package/dist/public/chunks/chunk-PQPAPPEI.js +1 -0
- package/dist/public/chunks/chunk-PXHLJIOT.js +1 -0
- package/dist/public/chunks/chunk-QOX5RMLM.js +1 -0
- package/dist/public/chunks/chunk-QPBLZSNX.js +1 -0
- package/dist/public/chunks/chunk-QQUFROWT.js +1 -0
- package/dist/public/chunks/chunk-RB5FBDEY.js +1 -0
- package/dist/public/chunks/chunk-RGXXD4DM.js +41 -0
- package/dist/public/chunks/chunk-RHMZNAJX.js +1 -0
- package/dist/public/chunks/chunk-SIOW7OOW.js +1 -0
- package/dist/public/chunks/chunk-SUX4QBVF.js +1 -0
- package/dist/public/chunks/chunk-T4M53QQT.js +1 -0
- package/dist/public/chunks/chunk-TC7TU4GK.js +1 -0
- package/dist/public/chunks/chunk-TFJOEF3Q.js +1 -0
- package/dist/public/chunks/chunk-UJD3MBMB.js +1 -0
- package/dist/public/chunks/chunk-UK2V4UBT.js +1 -0
- package/dist/public/chunks/chunk-UT6HZPGL.js +1 -0
- package/dist/public/chunks/chunk-UZ44J2LH.js +1 -0
- package/dist/public/chunks/chunk-VC6IS564.js +1 -0
- package/dist/public/chunks/chunk-WLIOZO3W.js +1 -0
- package/dist/public/chunks/chunk-WRXMQB7X.js +25 -0
- package/dist/public/chunks/chunk-XDUSY26N.js +55 -0
- package/dist/public/chunks/chunk-XNR4RZEC.js +1 -0
- package/dist/public/chunks/chunk-YPMUHXYT.js +147 -0
- package/dist/public/chunks/chunk-ZIJ6SJDN.js +1 -0
- package/dist/public/chunks/code-highlighter-Q7WC7AEF.js +12 -0
- package/dist/public/client-4OAAOHF4.js +68 -0
- package/dist/tailwind.css +1 -1
- package/package.json +5 -4
- package/src/api/schema.ts +1 -1
- package/src/assets.ts +4 -1
- package/src/client/App.tsx +100 -23
- package/src/client/TracedRoutes.tsx +8 -4
- package/src/client/code-highlighter.ts +26 -0
- package/src/client/code.tsx +2 -22
- package/src/client/components/BottomSheet.tsx +1 -1
- package/src/client/components/DetailsPanel.tsx +2 -1
- package/src/client/components/Drawer.tsx +12 -71
- package/src/client/components/DrawerContent.tsx +76 -0
- package/src/client/components/ProfileMenu.tsx +12 -3
- package/src/client/components/UserInputForm.tsx +28 -5
- package/src/client/conversations/ConversationBrief.tsx +129 -65
- package/src/client/conversations/ConversationCatchUp.tsx +107 -0
- package/src/client/conversations/ConversationContextTags.tsx +110 -0
- package/src/client/conversations/ConversationDetails.tsx +13 -14
- package/src/client/conversations/ConversationEventLog.tsx +135 -70
- package/src/client/conversations/ConversationHeader.tsx +74 -65
- package/src/client/conversations/ConversationHeaderActions.tsx +36 -38
- package/src/client/conversations/ConversationHomeList.tsx +41 -3
- package/src/client/conversations/ConversationLinkedWork.tsx +30 -10
- package/src/client/conversations/ConversationMeta.tsx +21 -27
- package/src/client/conversations/ConversationOverflowMenu.tsx +15 -4
- package/src/client/conversations/ConversationPage.tsx +219 -157
- package/src/client/conversations/ConversationTranscript.tsx +234 -186
- package/src/client/conversations/ConversationUsageBreakdown.tsx +142 -64
- package/src/client/conversations/DetailsList.tsx +7 -1
- package/src/client/conversations/PendingMailboxStack.tsx +88 -44
- package/src/client/conversations/ShareConversationButton.tsx +5 -50
- package/src/client/conversations/SlackMark.tsx +16 -4
- package/src/client/conversations/TranscriptActivityGroup.tsx +7 -14
- package/src/client/conversations/TranscriptEventView.tsx +7 -3
- package/src/client/conversations/TranscriptReasoningView.tsx +4 -2
- package/src/client/conversations/TranscriptRows.tsx +61 -16
- package/src/client/conversations/TranscriptView.tsx +25 -13
- package/src/client/conversations/conversationArchive.ts +22 -0
- package/src/client/conversations/conversationCatchUpState.ts +96 -0
- package/src/client/conversations/conversationMemory.ts +8 -1
- package/src/client/conversations/queries.ts +85 -46
- package/src/client/conversations/{transcriptUnreadHistory.ts → transcriptAroundHistory.ts} +48 -42
- package/src/client/conversations/transcriptBottomPinning.ts +40 -8
- package/src/client/conversations/transcriptListRows.ts +215 -0
- package/src/client/conversations/transcriptReadPosition.ts +24 -2
- package/src/client/conversations/turnContext.ts +1 -1
- package/src/client/conversations/virtualRows.ts +168 -0
- package/src/client/http.ts +6 -5
- package/src/client/pages/admin/AdminPage.tsx +1 -1
- package/src/client/pages/admin/ServiceAccountsSection.tsx +1 -1
- package/src/client/pages/memory/memoryDashboard.ts +1 -1
- package/src/client/pages/memory/memoryRecord.ts +1 -1
- package/src/client/pages/settings/ConnectionsPage.tsx +1 -1
- package/src/client/pages/user/PluginUserPage.tsx +0 -6
- package/src/client/pages/user/pluginUserPageRoutes.ts +5 -0
- package/src/client/primaryNav.ts +1 -1
- package/src/client/review-desk/reviewItemFormat.ts +1 -1
- package/src/client/sentry.ts +53 -3
- package/src/conversation-cache.ts +8 -10
- package/src/mock-reporting/fixtures.ts +43 -8
- package/src/mock-reporting/routes.ts +40 -3
- package/src/public-assets.ts +28 -20
- package/src/shell.ts +12 -2
- package/dist/public/client-ZCZXZBTL.js +0 -460
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as Pt}from"./chunk-FE522UEA.js";import{a as we,b as Pe,d as Ee}from"./chunk-GMZIELFU.js";import{a as ve}from"./chunk-IZWTFLCC.js";import{X as ye,e as ne,f as ce,g as st,j as me,k as pe,o as Te,p as xe,q as ge}from"./chunk-WRXMQB7X.js";import{a as fe}from"./chunk-CQY6BYUB.js";import{a as Vo,b as se,e as Xt,f as ue,i as he}from"./chunk-B5ZN3SWQ.js";import{b as jt}from"./chunk-CR2ICLSH.js";import{D as X,G as U,H as z,I as de,Ia as D,J as Y,Ja as Re,Jc as Oe,M as zt,N as le,Na as Et,Ob as Ce,Oc as Ne,Qa as q,Vb as De,_ as ft,a as C,b as ot,c as ee,e as oe,f as re,g as B,gc as Se,h as lt,j as Bt,l as ie,nb as be,o as ae}from"./chunk-YPMUHXYT.js";import{b as Ao,c as v}from"./chunk-7SZRL6FY.js";var M={};Ao(M,{Action:()=>so,Arrow:()=>fo,Close:()=>eo,Content:()=>Ke,Description:()=>Qe,Portal:()=>io,Positioner:()=>uo,Provider:()=>_e,Root:()=>Ge,Title:()=>to,Viewport:()=>Fe,createToastManager:()=>ho,useToastManager:()=>po});var Me=v(C(),1);var bt=v(C(),1),$t=bt.createContext(void 0);function k(){let e=bt.useContext($t);if(!e)throw new Error(lt(73));return e}var Ie=0;function Ct(e){return Ie+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Ie}`}function Dt(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){let s=e(t);return typeof s=="string"?{description:s}:s}return e}function Wt(e){let t=new Map,s=0,o=0;return e.forEach((i,c)=>{let n=i.transitionStatus==="ending";t.set(i.id,{value:i,domIndex:c,visibleIndex:n?-1:s,offsetY:o}),o+=i.height||0,n||(s+=1)}),t}function Gt(e,t){let s=0;return e.map(o=>{if(o.transitionStatus==="ending")return o;let i=s>=t;return s+=1,o.limited===i?o:{...o,limited:i}})}var L={toasts:e=>e.toasts,isEmpty:e=>e.toasts.length===0,toast:(e,t)=>e.toastMetadata.get(t)?.value,toastIndex:(e,t)=>e.toastMetadata.get(t)?.domIndex??-1,toastOffsetY:(e,t)=>e.toastMetadata.get(t)?.offsetY??0,toastVisibleIndex:(e,t)=>e.toastMetadata.get(t)?.visibleIndex??-1,focused:e=>e.focused,expanded:e=>e.hovering||e.focused,expandedOrOutOfFocus:e=>e.hovering||e.focused||!e.isWindowFocused,prevFocusElement:e=>e.prevFocusElement},St=class extends ne{timers=new Map;areTimersPaused=!1;constructor(t){super({...t,toastMetadata:Wt(t.toasts)},{},L)}setViewport=t=>{this.set("viewport",t)};syncProviderProps(t,s){let o=this.state.limit!==s;if(this.state.timeout===t&&!o)return;let i={timeout:t,limit:s};if(o){let c=Gt(this.state.toasts,s);i.toasts=c,i.toastMetadata=Wt(c)}this.update(i)}disposeEffect=()=>()=>{this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear()};removeToast(t,s=!1){let o=L.toastIndex(this.state,t);if(o===-1)return;let i=this.state.toasts[o];s||i?.onRemove?.();let c=[...this.state.toasts];c.splice(o,1),this.setToasts(c)}addToast=t=>{let{timeout:s,limit:o}=this.state,i=t.id||Ct("toast");if(t.id){let r=L.toast(this.state,t.id);if(r)if(r.transitionStatus==="ending")this.removeToast(t.id,!0);else{let{id:u,transitionStatus:a,...f}=t;return this.updateToastInternal(t.id,f,!0,!0),t.id}}let c={...t,id:i,updateKey:0,transitionStatus:"starting"},n=[c,...this.state.toasts];this.setToasts(Gt(n,o));let d=c.timeout??s;return c.type!=="loading"&&d>0&&this.scheduleTimer(i,d,()=>this.closeToast(i)),L.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),i};updateToast=(t,s)=>{let o=L.toast(this.state,t);!o||o.transitionStatus==="ending"||this.updateToastInternal(t,typeof s=="function"?s(o):s,!1,!0)};updateToastInternal=(t,s,o=!1,i=!1)=>{let{timeout:c,toasts:n}=this.state,d=L.toast(this.state,t);if(!d||d.transitionStatus==="ending")return;let r={...d,...s,...i&&{updateKey:d.updateKey+1}};this.setToasts(n.map(V=>V.id===t?r:V));let u=r.timeout??c,a=d.timeout??c,f=Object.hasOwn(s,"timeout"),h=r.transitionStatus!=="ending"&&r.type!=="loading"&&u>0,R=this.timers.has(t),g=a!==u,E=d.type==="loading";if(!h&&R){this.clearTimer(t);return}h&&(!R||g||f||E||o)&&(this.clearTimer(t),this.scheduleTimer(t,u,()=>this.closeToast(t)),L.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=t=>{let s=t===void 0,{limit:o,toasts:i}=this.state,c;if(s)c=i,this.clearTimers();else{let r=L.toast(this.state,t);if(!r)return;c=[r],this.clearTimer(t)}let n=i.map(r=>s||r.id===t?{...r,transitionStatus:"ending",height:0}:r),d=Gt(n,o);this.setToasts(d,!d.some(r=>r.transitionStatus!=="ending")),c.forEach(r=>{r.transitionStatus!=="ending"&&r.onClose?.()}),this.handleFocusManagement(t)};promiseToast=(t,s)=>{let o=Dt(s.loading),i=this.addToast({...o,type:"loading"}),c=t.then(n=>{let d=Dt(s.success,n);return this.updateToast(i,{...d,type:"success",timeout:d.timeout}),n}).catch(n=>{let d=Dt(s.error,n);return this.updateToast(i,{...d,type:"error",timeout:d.timeout}),Promise.reject(n)});return{}.hasOwnProperty.call(s,"setPromise")&&s.setPromise(c),c};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(t=>{t.timeout&&(t.timeout.clear(),t.remaining=Math.max(t.remaining-(Date.now()-t.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((t,s)=>{t.remaining=t.remaining>0?t.remaining:t.delay,t.timeout??=Xt.create(),t.timeout.start(t.remaining,()=>{this.handleTimerFired(s),t.callback()}),t.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=t=>{if(t.pointerType!=="touch")return;let s=Y(t);z(this.state.viewport,s)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(t,s,o){let i=Date.now(),n=!L.expandedOrOutOfFocus(this.state)?Xt.create():void 0;n?.start(s,()=>{this.handleTimerFired(t),o()}),this.timers.set(t,{timeout:n,start:i,delay:s,remaining:s,callback:o})}clearTimers(){this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(t){this.timers.get(t)?.timeout?.clear(),this.timers.delete(t),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(t){this.timers.delete(t),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(t,s=t.length===0){let o={toasts:t,toastMetadata:Wt(t)};s&&(o.hovering=!1,o.focused=!1),this.update(o)}handleFocusManagement(t){let s=U(X(this.state.viewport));if(!this.state.viewport||!z(this.state.viewport,s)||!ft(s))return;if(t===void 0){this.restoreFocusToPrevElement();return}let o=L.toasts(this.state),i=L.toastIndex(this.state,t),c=(d,r)=>{for(let u=d;u>=0&&u<o.length;u+=r)if(o[u].transitionStatus!=="ending")return o[u];return null},n=c(i+1,1)??c(i-1,-1);n?n.ref?.current?.focus():this.restoreFocusToPrevElement()}};var Ot=v(ot(),1),_e=function(t){let{children:s,timeout:o=5e3,limit:i=3,toastManager:c}=t,n=re(()=>new St({timeout:o,limit:i,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return se(n.disposeEffect),Me.useEffect(function(){return c?c[" subscribe"](({action:u,options:a})=>{let f=a.id;u==="promise"&&a.promise?n.promiseToast(a.promise,a):u==="update"&&f?n.updateToast(f,a.updates):u==="close"?n.closeToast(f):n.addToast(a)}):void 0},[n,c]),(0,Ot.jsxs)($t.Provider,{value:n,children:[(0,Ot.jsx)(Fo,{store:n,timeout:o,limit:i}),s]})};function Fo(e){let{store:t,timeout:s,limit:o}=e;return B(()=>{t.syncProviderProps(s,o)},[t,s,o]),null}var A=v(C(),1);var Ae="--toast-frontmost-height";var j=v(ot(),1),Fe=A.forwardRef(function(t,s){let{render:o,className:i,style:c,children:n,...d}=t,r=k(),u=ue(),a=A.useRef(!1),f=A.useRef(!1),h=A.useRef(!1),R=r.useState("isEmpty"),g=r.useState("toasts"),E=r.useState("focused"),V=r.useState("expanded"),mt=r.useState("prevFocusElement"),$=g[0]?.height,W=g.some(m=>m.transitionStatus==="ending"),rt=g.filter(m=>m.priority==="high");A.useEffect(()=>{let m=r.state.viewport;if(!m||R)return;let S=ie(m),y=X(m);function ht(N){N.key==="F6"&&Y(N)!==m&&(N.preventDefault(),r.set("prevFocusElement",U(y)),m?.focus({preventScroll:!0}),r.pauseTimers(),r.set("focused",!0))}function gt(N){Y(N)===S&&(r.set("isWindowFocused",!1),r.pauseTimers())}function et(N){if(N.relatedTarget)return;let vt=Y(N),Tt=U(X(m));(vt===S||!z(m,vt)||!ft(Tt))&&r.resumeTimers(),u.start(0,()=>r.set("isWindowFocused",!0))}return ce(st(S,"keydown",ht),st(S,"blur",gt,!0),st(S,"focus",et,!0),st(y,"pointerdown",r.handleDocumentPointerDown,!0))},[r,u,R]);function nt(m){a.current=!0;let S=m.relatedTarget===r.state.viewport?g.find(y=>y.transitionStatus!=="ending"&&!y.limited):void 0;S?S.ref?.current?.focus():r.restoreFocusToPrevElement()}function it(m){m.key==="Tab"&&m.shiftKey&&Y(m.nativeEvent)===r.state.viewport&&(m.preventDefault(),r.restoreFocusToPrevElement())}function Q(){r.state.toasts.some(S=>S.transitionStatus==="ending")||h.current||!f.current||(r.set("hovering",!1),r.select("expandedOrOutOfFocus")||r.resumeTimers(),f.current=!1)}A.useEffect(Q,[W,r]);function Z(){r.pauseTimers(),r.set("hovering",!0),f.current=!1}function pt(){f.current=!0,Q()}function at(m){m.pointerType==="touch"&&(h.current=!0)}function tt(m){m.pointerType==="touch"&&(h.current=!1,Q())}function G(){if(a.current){a.current=!1;return}E||ft(U(X(r.state.viewport)))&&(r.set("focused",!0),r.pauseTimers())}function b(m){!E||z(r.state.viewport,m.relatedTarget)||(r.set("focused",!1),r.select("expandedOrOutOfFocus")||r.resumeTimers())}let ct={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:Z,onMouseMove:Z,onMouseLeave:pt,onFocus:G,onBlur:b,onKeyDown:it,onClick:G,onPointerDown:at,onPointerUp:tt,onPointerCancel:tt,style:{[Ae]:$?`${$}px`:void 0}},H={expanded:V},K=!R&&mt&&(0,j.jsx)(me,{onFocus:nt}),ut=D("div",t,{ref:[s,r.setViewport],state:H,props:[ct,d,{children:(0,j.jsxs)(A.Fragment,{children:[K,n,K]})}]});return(0,j.jsxs)(A.Fragment,{children:[K,ut,!E&&rt.length>0&&(0,j.jsx)("div",{style:fe,children:rt.map(m=>(0,j.jsxs)("div",{role:"alert","aria-atomic":!0,children:[(0,j.jsx)("div",{children:m.title}),(0,j.jsx)("div",{children:m.description})]},m.id))})]})});var x=v(C(),1),$e=v(Vo(),1);var Nt=v(C(),1),Kt=Nt.createContext(void 0);function J(){let e=Nt.useContext(Kt);if(!e)throw new Error(lt(66));return e}var It="--toast-index",Le="--toast-offset-y",Ye="--toast-height",ke="--toast-swipe-movement-x",He="--toast-swipe-movement-y";var Be="data-swipe-direction",Ms=zt.startingStyle,_s=zt.endingStyle;var We=v(ot(),1),Lo={...le,swipeDirection(e){return e?{[Be]:e}:null}},ze=40,Yo=10,je=.5,ko=1,Ho=`${Te},${xe}`,Ge=x.forwardRef(function(t,s){let{toast:o,render:i,className:c,swipeDirection:n=["down","right"],style:d,...r}=t,u=o.positionerProps?.anchor!==void 0,a=[];u||(a=Array.isArray(n)?n:[n]);let f=a.length>0,h=k(),[R,g]=x.useState(void 0),[E,V]=x.useState(!1),[mt,$]=x.useState(!1),[W,rt]=x.useState({x:0,y:0}),[nt,it]=x.useState({x:0,y:0,scale:1}),[Q,Z]=x.useState(),[pt,at]=x.useState(),[tt,G]=x.useState(null),b=x.useRef(null),ct=x.useRef(void 0),H=x.useRef({x:0,y:0}),K=x.useRef({x:0,y:0,scale:1}),ut=x.useRef(void 0),m=x.useRef(0),S=x.useRef(!1),y=x.useRef({x:0,y:0}),ht=x.useRef(!1),gt=x.useRef({x:0,y:0}),et=x.useRef(null),N=x.useRef(null),vt=h.useState("toastIndex",o.id),Tt=h.useState("toastVisibleIndex",o.id),To=h.useState("toastOffsetY",o.id),xo=h.useState("focused"),kt=h.useState("expanded");he({open:o.transitionStatus!=="ending",ref:b,onComplete(){o.transitionStatus==="ending"&&h.removeToast(o.id)}});let Rt=Bt((l=!1)=>{let T=b.current;if(!T)return;let P=T.style.height;T.style.height="auto";let _=T.offsetHeight;T.style.height=P;function I(){h.updateToastInternal(o.id,{ref:b,height:_,transitionStatus:void 0})}l?$e.flushSync(I):I()});B(()=>{let l=ct.current;o.transitionStatus!=="starting"&&l===o.id||(l!==void 0&&(g(void 0),it({x:0,y:0,scale:1}),xt({x:0,y:0})),ct.current=o.id,Rt())},[Rt,o.id,o.transitionStatus]);function xt(l){gt.current=l,rt(l)}B(()=>()=>{N.current?.abort()},[]);function go(l,T){let P=w=>w>0?w**je:-(Math.abs(w)**je),_=l>0&&!a.includes("right")||l<0&&!a.includes("left"),I=T>0&&!a.includes("down")||T<0&&!a.includes("up");return{x:_?P(l):l,y:I?P(T):T}}let wt=Bt(l=>{if(l.pointerId!==et.current)return;et.current=null,N.current?.abort(),N.current=null,V(!1),$(!1),G(null);let T=K.current;if(l.type==="pointercancel"||S.current){xt({x:T.x,y:T.y}),g(void 0);return}let P=gt.current,_=P.x-T.x,I=P.y-T.y,w;for(let O of a)if(Pt(O,_,I)>ze){w=O;break}w?(g(w),h.closeToast(o.id)):(xt({x:T.x,y:T.y}),g(void 0))});function vo(l){if(l.button!==0)return;l.pointerType==="touch"&&h.pauseTimers();let T=Y(l.nativeEvent);if(de(T,`button,a,input,textarea,[role="button"],${Ho}`))return;S.current=!1,ut.current=void 0,m.current=0,et.current=l.pointerId,H.current={x:l.clientX,y:l.clientY},y.current=H.current;let _=l.currentTarget,I=ve(_);K.current=I,it(I),xt({x:I.x,y:I.y}),h.set("hovering",!0),V(!0),$(!1),G(null),ht.current=!0,N.current?.abort();let w=new AbortController;N.current=w;let O=X(_);O.addEventListener("pointerup",wt,{signal:w.signal}),O.addEventListener("pointercancel",wt,{signal:w.signal}),_.setPointerCapture?.(l.pointerId)}function Ro(l){if(l.pointerId!==et.current)return;l.preventDefault(),ht.current&&(H.current={x:l.clientX,y:l.clientY},ht.current=!1);let{clientY:T,clientX:P,movementX:_,movementY:I}=l;(I<0&&T>y.current.y||I>0&&T<y.current.y)&&(y.current={x:y.current.x,y:T}),(_<0&&P>y.current.x||_>0&&P<y.current.x)&&(y.current={x:P,y:y.current.y});let w=P-H.current.x,O=T-H.current.y,Do=T-y.current.y,So=P-y.current.x,dt=tt;if(!mt&&Math.sqrt(w*w+O*O)>=ko){$(!0);let yt=a.includes("left")||a.includes("right"),Io=a.includes("up")||a.includes("down");if(yt&&Io){let Mo=Math.abs(w),_o=Math.abs(O);dt=Mo>_o?"horizontal":"vertical",G(dt)}}let F;if(!ut.current)dt==="vertical"?O>0?F="down":O<0&&(F="up"):dt==="horizontal"?w>0?F="right":w<0&&(F="left"):Math.abs(w)>=Math.abs(O)?F=w>0?"right":"left":F=O>0?"down":"up",F&&a.includes(F)&&(ut.current=F,m.current=Pt(F,w,O),g(F));else{let Ht=ut.current,yt=Pt(Ht,So,Do);yt>ze?(S.current=!1,g(Ht)):!(a.includes("left")&&a.includes("right"))&&!(a.includes("up")&&a.includes("down"))&&m.current-yt>=Yo&&(S.current=!0)}let Qt=go(w,O),Zt=K.current.x,te=K.current.y,Oo=a.includes("left")||a.includes("right"),No=a.includes("up")||a.includes("down");dt!=="vertical"&&Oo&&(Zt+=Qt.x),dt!=="horizontal"&&No&&(te+=Qt.y),xt({x:Zt,y:te})}function wo(l){if(l.key==="Escape"){if(!b.current||!z(b.current,U(X(b.current))))return;h.closeToast(o.id)}}x.useEffect(()=>{let l=b.current;if(!f||!l)return;function T(P){et.current===null||!z(l,Y(P))||P.preventDefault()}return st(l,"touchmove",T,{passive:!1})},[f]);function yo(){let l=W.x-nt.x,T=W.y-nt.y;return{transition:E?"none":void 0,transform:E?`translateX(${W.x}px) translateY(${W.y}px) scale(${nt.scale})`:void 0,[ke]:`${l}px`,[He]:`${T}px`}}let Jt=o.priority==="high",Po={role:Jt?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":Q,"aria-describedby":pt,"aria-hidden":Jt&&!xo?!0:void 0,onPointerDown:f?vo:void 0,onPointerMove:f?Ro:void 0,onPointerUp:f?wt:void 0,onPointerCancel:f?wt:void 0,onKeyDown:wo,inert:pe(o.limited),style:{...yo(),[It]:o.transitionStatus==="ending"?vt:Tt,[Le]:`${To}px`,[Ye]:o.height?`${o.height}px`:void 0}},Eo=x.useMemo(()=>({toast:o,setTitleId:Z,setDescriptionId:at,recalculateHeight:Rt,visibleIndex:Tt,expanded:kt}),[o,Z,at,Rt,Tt,kt]),bo={transitionStatus:o.transitionStatus,expanded:kt,limited:o.limited||!1,type:o.type,swiping:E,swipeDirection:R},Co=D("div",t,{ref:[s,b],state:bo,stateAttributesMapping:Lo,props:[Po,r]});return(0,We.jsx)(Kt.Provider,{value:Eo,children:Co})});var Mt=v(C(),1);var Ke=Mt.forwardRef(function(t,s){let{render:o,className:i,style:c,...n}=t,{visibleIndex:d,expanded:r,recalculateHeight:u}=J(),a=Mt.useRef(null);B(()=>{u();let R=a.current;if(!R||typeof ResizeObserver!="function"||typeof MutationObserver!="function")return;let g=new ResizeObserver(()=>u(!0)),E=new MutationObserver(()=>u(!0));return g.observe(R),E.observe(R,{childList:!0,subtree:!0,characterData:!0}),()=>{g.disconnect(),E.disconnect()}},[u]);let f=d>0;return D("div",t,{ref:[s,a],state:{expanded:r,behind:f},props:n})});var Je=v(C(),1);var Ue=v(C(),1);function qe(e){return e==null||typeof e=="boolean"||e===""?!1:Array.isArray(e)?e.some(qe):!0}function _t(e){return Ue.isValidElement(e)&&qe(e.props.children)}function At(e,t,s){let{toast:o,setTitleId:i,setDescriptionId:c}=J(),n=s==="title"?i:c,d=t??(s==="title"?o.title:o.description);return{id:Re(e),children:d,type:o.type,setId:n}}function Vt(e,t,s){let o=_t(e);return B(()=>{if(o)return s(t),()=>{s(i=>i===t?void 0:i)}},[o,t,s]),o?e:null}var Qe=Je.forwardRef(function(t,s){let{render:o,className:i,style:c,id:n,children:d,...r}=t,{id:u,children:a,type:f,setId:h}=At(n,d,"description"),g=D("p",t,{ref:s,state:{type:f},props:{...r,id:u,children:a}});return Vt(g,u,h)});var Ze=v(C(),1);var to=Ze.forwardRef(function(t,s){let{render:o,className:i,style:c,id:n,children:d,...r}=t,{id:u,children:a,type:f,setId:h}=At(n,d,"title"),g=D("h2",t,{ref:s,state:{type:f},props:{...r,id:u,children:a}});return Vt(g,u,h)});var Ft=v(C(),1);var eo=Ft.forwardRef(function(t,s){let{render:o,className:i,style:c,disabled:n,nativeButton:d=!0,...r}=t,u=k(),{toast:a,expanded:f}=J(),[h,R]=Ft.useState(!1),{getButtonProps:g,buttonRef:E}=Et({disabled:n,native:d}),V={type:a.type};return D("button",t,{ref:[s,E],state:V,props:[{"aria-hidden":!f&&!h,onClick(){u.closeToast(a.id)},onFocus(){R(!0)},onBlur(){R(!1)}},r,g]})});var oo=v(C(),1);var so=oo.forwardRef(function(t,s){let{render:o,className:i,style:c,disabled:n,nativeButton:d=!0,...r}=t,{toast:u}=J(),a=u.actionProps?.children??r.children,{getButtonProps:f,buttonRef:h}=Et({disabled:n,native:d}),R={type:u.type},g=D("button",t,{ref:[s,h],state:R,props:[r,u.actionProps,f,{children:a}]});return _t(g)?g:null});var ro=v(C(),1);var no=v(ot(),1),io=ro.forwardRef(function(t,s){return(0,no.jsx)(we,{ref:s,...t})});var Yt=v(C(),1);var Lt=v(C(),1),qt=Lt.createContext(void 0);function ao(){let e=Lt.useContext(qt);if(e===void 0)throw new Error(lt(84));return e}var co=v(ot(),1),uo=Yt.forwardRef(function(t,s){let{toast:o,...i}=t,c=k(),n=o.positionerProps??oe,{render:d,className:r,anchor:u=n.anchor,positionMethod:a=n.positionMethod??"absolute",side:f=n.side??"top",align:h=n.align??"center",sideOffset:R=n.sideOffset??0,alignOffset:g=n.alignOffset??0,collisionBoundary:E=n.collisionBoundary??"clipping-ancestors",collisionPadding:V=n.collisionPadding??5,arrowPadding:mt=n.arrowPadding??5,sticky:$=n.sticky??!1,disableAnchorTracking:W=n.disableAnchorTracking??!1,collisionAvoidance:rt=n.collisionAvoidance??ge,style:nt,...it}=i,[Q,Z]=Yt.useState(null),pt=c.useState("toastIndex",o.id),at=c.useState("toastVisibleIndex",o.id),tt=ae(u)?u:null,G=ye({open:!0,onOpenChange:ee,elements:{floating:Q,reference:tt}}),b=Pe({anchor:tt,positionMethod:a,floatingRootContext:G,mounted:!0,side:f,sideOffset:R,align:h,alignOffset:g,collisionBoundary:E,collisionPadding:V,sticky:$,arrowPadding:mt,disableAnchorTracking:W,keepMounted:!0,collisionAvoidance:rt}),ct={side:b.side,align:b.align,anchorHidden:b.anchorHidden},H=Ee(t,ct,{styles:{...b.positionerStyles,[It]:o.transitionStatus==="ending"?pt:at},transitionStatus:o.transitionStatus,props:it,refs:[s,Z]});return(0,co.jsx)(qt.Provider,{value:b,children:H})});var lo=v(C(),1);var fo=lo.forwardRef(function(t,s){let{className:o,render:i,style:c,...n}=t,{arrowRef:d,side:r,align:u,arrowUncentered:a,arrowStyles:f}=ao();return D("div",t,{state:{side:r,align:u,uncentered:a},ref:[s,d],props:[{style:f,"aria-hidden":!0},n]})});var mo=v(C(),1);function po(){let e=k(),t=e.useState("toasts");return mo.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function ho(){let e=new Set;function t(s){e.forEach(o=>o(s))}return{" subscribe":function(o){return e.add(o),()=>{e.delete(o)}},add(s){let o=s.id||Ct("toast"),i={...s,id:o,transitionStatus:"starting"};return t({action:"add",options:i}),o},close(s){t({action:"close",options:{id:s}})},update(s,o){t({action:"update",options:{id:s,updates:o}})},promise(s,o){let i=s;return t({action:"promise",options:{...o,promise:s,setPromise(c){i=c}}}),i}}}var p=v(ot(),1);function Bo({...e}){return(0,p.jsx)(M.Provider,{...e})}function Xo({...e}){return(0,p.jsx)(M.Portal,{"data-slot":"toast-portal",...e})}function zo({className:e,...t}){return(0,p.jsx)(M.Viewport,{"data-slot":"toast-viewport",className:q("pointer-events-none fixed inset-x-4 bottom-[max(5.25rem,env(safe-area-inset-bottom))] z-[60] mx-auto w-auto max-w-sm outline-none sm:right-4 sm:left-auto sm:mx-0 sm:w-full",e),...t})}function jo({className:e,...t}){return(0,p.jsx)(M.Root,{"data-slot":"toast",className:q("group/toast pointer-events-auto absolute right-0 bottom-0 z-[calc(1000-var(--toast-index))] w-full origin-bottom rounded-lg border border-dashboard-border-emphasis bg-dashboard-surface-raised text-dashboard-text shadow-lg will-change-transform outline-none select-none focus-visible:outline-2 focus-visible:outline-dashboard-focus","[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]","h-(--height) [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_180ms_ease-out,opacity_180ms,height_180ms] motion-reduce:transition-none","after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']","data-expanded:h-(--toast-height) data-expanded:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]","data-limited:opacity-0 data-starting-style:[transform:translateY(150%)]","[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]","data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]","data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]","data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]","data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]","data-expanded:data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]","data-expanded:data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]","data-expanded:data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]","data-expanded:data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]",e),...t})}function $o({className:e,...t}){return(0,p.jsx)(M.Content,{"data-slot":"toast-content",className:q("flex h-full items-center gap-3 overflow-hidden p-4 transition-opacity duration-180 motion-reduce:transition-none ease-[cubic-bezier(0.22,1,0.36,1)] data-behind:opacity-0 data-expanded:opacity-100",e),...t})}function Wo({className:e,...t}){return(0,p.jsx)(M.Title,{"data-slot":"toast-title",className:q("break-words text-sm font-medium",e),...t})}function Go({className:e,...t}){return(0,p.jsx)(M.Description,{"data-slot":"toast-description",className:q("break-words text-sm text-dashboard-text-muted",e),...t})}function Ko({className:e,render:t=(0,p.jsx)(jt,{}),...s}){return(0,p.jsx)(M.Action,{"data-slot":"toast-action",render:t,className:q("shrink-0",e),...s})}function Uo({className:e,children:t,render:s=(0,p.jsx)(jt,{size:"icon"}),...o}){return(0,p.jsx)(M.Close,{"data-slot":"toast-close","aria-label":"Close toast",render:s,className:q("relative shrink-0 text-dashboard-text-muted after:absolute after:-inset-2 after:content-[''] hover:text-dashboard-text",e),...o,children:t??(0,p.jsx)(Ne,{"aria-hidden":"true"})})}function qo({type:e}){let t=null;return e==="success"&&(t=(0,p.jsx)(be,{"aria-hidden":"true"})),e==="info"&&(t=(0,p.jsx)(Ce,{"aria-hidden":"true"})),e==="warning"&&(t=(0,p.jsx)(Oe,{"aria-hidden":"true"})),e==="error"&&(t=(0,p.jsx)(Se,{className:"text-rose-300","aria-hidden":"true"})),e==="loading"&&(t=(0,p.jsx)(De,{className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"})),t?(0,p.jsx)("span",{"data-slot":"toast-icon",className:"shrink-0 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",children:t}):null}function Jo(){let{toasts:e}=M.useToastManager();return e.map(t=>(0,p.jsx)(jo,{toast:t,children:(0,p.jsxs)($o,{children:[(0,p.jsx)(qo,{type:t.type}),(0,p.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,p.jsx)(Wo,{}),(0,p.jsx)(Go,{})]}),t.actionProps?(0,p.jsx)(Ko,{...t.actionProps}):null,(0,p.jsx)(Uo,{})]})},t.id))}function Tn({children:e,...t}){return(0,p.jsxs)(Bo,{limit:3,timeout:4e3,...t,children:[e,(0,p.jsx)(Xo,{children:(0,p.jsx)(zo,{children:(0,p.jsx)(Jo,{})})})]})}var xn=M.useToastManager;export{Tn as a,xn as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as At,l as E,m as Ct,n as Nt,o as wt,w as St}from"./chunk-2NNKHSZE.js";import{a as pe}from"./chunk-5ZA674OU.js";import{a as yt,c as xt,d as kt}from"./chunk-FVX42XAD.js";import{l as se}from"./chunk-RGXXD4DM.js";import{a as M}from"./chunk-KDUTK357.js";import{a as ie,b as re,c as Rt}from"./chunk-LKW7MULF.js";import{e as Tt}from"./chunk-564V7YHG.js";import{B as ge,D as bt,F as q,G as ht,H as oe,I as gt,O as pt,f as z,g as ae,k as dt,r as _,t as V,u as ut,v as mt,x as G,y as ft,z as vt}from"./chunk-II4NXLSQ.js";import{i as R,j as I,l as D,m as tt}from"./chunk-GMZIELFU.js";import{a as st,b as lt,c as ct}from"./chunk-MTBUV2GJ.js";import{d as X,g as Pe,h as ve,i as ze,q as it,v as rt}from"./chunk-4TQSTCIN.js";import{ga as at,j as te,k as nt,ma as ot}from"./chunk-XDUSY26N.js";import{d as _e,f as Ee,o as W}from"./chunk-6PHJZPWD.js";import{b as je}from"./chunk-CR2ICLSH.js";import{Db as We,Fb as Ve,Fc as Xe,Gc as Je,Ib as Ge,Jb as ee,Jc as Ze,Kb as qe,Lc as et,Qa as Oe,Rc as u,Tc as he,Ua as J,Va as $e,Vb as He,Wb as F,Wc as ne,a as k,b as f,bb as Be,hc as Ye,kb as B,mb as Fe,ob as Ke,qb as Z,rc as be,tb as Qe}from"./chunk-YPMUHXYT.js";import{c}from"./chunk-7SZRL6FY.js";var An={key:"pinned",label:"Pinned",order:-2},Tn={key:"attention",label:"Needs attention",order:-1};function Dt(e,t){let n=Ut(t.nowMs,t.timeZone),a=new Map,o=[...e].sort((i,r)=>ye(r)-ye(i));for(let i of o){let r=i.pinnedAt?An:t.attentionIds?.has(i.id)?Tn:kn(ye(i),n,t.nowMs,t.timeZone),d=a.get(r.key);d?d.conversations.push(i):a.set(r.key,{...r,conversations:[i]})}return[...a.values()].sort((i,r)=>i.order-r.order).map(({order:i,...r})=>r)}function Mt(e,t){return new Set([...e,...t])}function ya(e,t){let n=a=>a.pinnedAt?0:t.has(a.id)?1:2;return[...e].sort((a,o)=>n(a)-n(o))}function ye(e){let t=Date.parse(e.lastSeenAt);return Number.isFinite(t)?t:Number.NEGATIVE_INFINITY}function kn(e,t,n,a){if(!Number.isFinite(e))return{key:"older",label:"Older",order:Number.POSITIVE_INFINITY};let o=Math.max(0,Math.round((t-Ut(e,a))/864e5));if(o===0)return{key:"today",label:"Today",order:0};if(o===1)return{key:"yesterday",label:"Yesterday",order:1};if(o<=7)return{key:"previous-7-days",label:"Previous 7 days",order:2};if(o<=30)return{key:"previous-30-days",label:"Previous 30 days",order:3};let i=It(e,a),r=It(n,a);return{key:`month-${i.year}-${i.month}`,label:new Intl.DateTimeFormat("en-US",{month:"long",timeZone:a,...i.year===r.year?void 0:{year:"numeric"}}).format(e),order:4+(r.year-i.year)*12+(r.month-i.month)}}function It(e,t){let n=new Intl.DateTimeFormat("en-US",{month:"numeric",timeZone:t,year:"numeric"}).formatToParts(e),a=new Map(n.map(o=>[o.type,Number(o.value)]));return{month:a.get("month")??1,year:a.get("year")??0}}function Ut(e,t){let n=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"numeric",timeZone:t,year:"numeric"}).formatToParts(e),a=new Map(n.map(o=>[o.type,Number(o.value)]));return Date.UTC(a.get("year")??0,(a.get("month")??1)-1,a.get("day")??1)}var xe=c(f(),1),Rn={neutral:"text-dashboard-text-muted",success:"text-emerald-500",danger:"text-rose-500",warning:"text-amber-500",info:"text-cyan-500",accent:"text-violet-400"};function O(e){let t=te(e),n=[t.label,e.status].filter(Boolean).join(": ");return(0,xe.jsx)("svg",{"aria-hidden":e.decorative?!0:void 0,"aria-label":e.decorative?void 0:n,role:e.decorative?void 0:"img",className:u("inline-block shrink-0 align-middle",Rn[t.tone],e.className),width:e.size??16,height:e.size??16,viewBox:"0 0 16 16",fill:"currentColor",children:nt[t.icon].map(a=>(0,xe.jsx)("path",{d:a},a))})}var Zt=c(k(),1);var Ce=c(f(),1);function j(e){if(!e.active&&!e.className&&!e["aria-label"])return e.children;let t=u(e.active&&"shimmer",e.className);return e.as==="strong"?(0,Ce.jsx)("strong",{"aria-label":e["aria-label"],className:t,children:e.children}):(0,Ce.jsx)("span",{"aria-label":e["aria-label"],className:t,children:e.children})}var h=c(f(),1);function In(e){return(0,h.jsx)("span",{className:"grid min-w-0 self-start grid-cols-[minmax(0,1fr)_auto] content-start gap-x-3 gap-y-1.5",children:e.lines.map((t,n)=>(0,h.jsxs)("span",{className:t.label?"contents":u("col-span-2 block min-w-0 break-words text-dashboard-text",t.valueStyle==="heading"&&"font-sans tabular-nums font-semibold text-dashboard-text",t.valueStyle==="heading"&&n>0&&"mt-1 border-t border-dashboard-border-strong pt-2"),children:[t.label?(0,h.jsx)("span",{className:u("min-w-0 break-words font-medium text-dashboard-text-muted",t.labelStyle==="code"&&"break-all font-mono text-xs text-dashboard-text"),children:t.label}):null,t.label?(0,h.jsx)("span",{className:"whitespace-nowrap text-right text-dashboard-text",children:t.value}):(0,h.jsxs)(h.Fragment,{children:[t.value,t.live?(0,h.jsxs)("span",{className:"ml-2 inline-flex items-center gap-1.5 font-sans text-xs font-normal tracking-wide text-dashboard-text-muted",children:[(0,h.jsx)("span",{"aria-hidden":"true",children:"\xB7"}),(0,h.jsx)(j,{active:!0,children:"in progress"})]}):null]})]},`${n}-${t.label??""}-${t.value}-${t.live?"live":""}`))})}function H(e){let t=e.tooltip?.filter(n=>n.value.trim());return!e.tooltipCard&&!t?.length?(0,h.jsx)("span",{className:e.className,children:e.children}):(0,h.jsxs)(R,{children:[(0,h.jsx)(I,{render:(0,h.jsx)("span",{className:u("inline-flex border-b border-dotted border-dashboard-border-interactive outline-none transition-colors hover:border-dashboard-border-heavy focus-visible:border-dashboard-border-heavy",e.className),tabIndex:0,children:e.children})}),(0,h.jsx)(D,{align:e.align==="left"?"start":e.align==="right"?"end":"center",className:u("w-[calc(100vw-2rem)] max-w-80 rounded-lg bg-dashboard-bg text-left font-normal shadow-xl shadow-black/35",e.tooltipCard?"p-3 leading-snug":"px-3 py-2 leading-relaxed"),side:e.tooltipPlacement==="above"?"top":"bottom",children:e.tooltipCard?(0,h.jsx)("span",{className:"block max-h-[min(30rem,var(--available-height,30rem))] overflow-y-auto",children:e.tooltipCard}):t?(0,h.jsx)("span",{className:"block max-h-72 overflow-y-auto",children:(0,h.jsx)(In,{lines:t})}):null})]})}var m=c(f(),1),Lt="bg-dashboard-focus/80",Pt="bg-dashboard-focus/30";function zt(e){return(0,m.jsx)("span",{"aria-hidden":"true",className:u("size-2 shrink-0 rounded-xs",e.className)})}function Ne(e){let t=Math.min(100,Math.max(0,(e.split?.selfShare??1)*100));return(0,m.jsxs)("span",{className:"grid gap-3",children:[(0,m.jsxs)("span",{className:u("grid gap-2.5",e.sections.length>0&&"border-b border-dashboard-border pb-3"),children:[(0,m.jsxs)("span",{className:"flex items-baseline justify-between gap-3",children:[(0,m.jsxs)("span",{className:"min-w-0 truncate font-medium text-dashboard-text",children:[e.title,e.note?(0,m.jsxs)("span",{className:"text-dashboard-text-faint",children:[" \xB7 ",e.note]}):null]}),(0,m.jsx)("span",{className:"whitespace-nowrap text-base font-semibold tabular-nums text-dashboard-text",children:e.total})]}),e.split?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("span",{"aria-hidden":"true",className:"flex h-1.5 overflow-hidden rounded-full bg-dashboard-fill-hover",children:[(0,m.jsx)("span",{className:Lt,style:{width:`${t}%`}}),(0,m.jsx)("span",{className:Pt,style:{width:`${100-t}%`}})]}),(0,m.jsxs)("span",{className:"flex flex-wrap justify-between gap-x-3 gap-y-1 tabular-nums",children:[(0,m.jsxs)("span",{className:"inline-flex items-center gap-1.5 whitespace-nowrap",children:[(0,m.jsx)(zt,{className:Lt}),"this agent",(0,m.jsx)("span",{className:"font-medium text-dashboard-text",children:e.split.self})]}),(0,m.jsxs)("span",{className:"inline-flex items-center gap-1.5 whitespace-nowrap",children:[(0,m.jsx)(zt,{className:Pt}),e.split.count," subagent",e.split.count===1?"":"s",(0,m.jsx)("span",{className:"font-medium text-dashboard-text",children:e.split.subagents})]})]})]}):null]}),e.sections.map(n=>(0,m.jsxs)("span",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-x-3 gap-y-2",children:[(0,m.jsxs)("span",{className:"col-span-2 font-sans font-medium text-dashboard-text-faint",children:[n.title,n.total?` \xB7 ${n.total}`:null]}),n.rows.map(a=>(0,m.jsxs)("span",{className:"contents",children:[(0,m.jsxs)("span",{className:u("flex min-w-0 items-baseline gap-2",a.code&&"font-mono"),children:[(0,m.jsx)("span",{className:"min-w-0 truncate",title:a.label,children:a.label}),a.live?(0,m.jsx)("span",{className:"shrink-0 font-sans text-2xs text-dashboard-text-muted",children:(0,m.jsx)(j,{active:!0,children:"in progress"})}):null]}),(0,m.jsx)("span",{className:"whitespace-nowrap text-right tabular-nums text-dashboard-text",children:a.value})]},a.label)),n.more?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("span",{className:"text-dashboard-text-faint",children:[n.more.count," more"]}),(0,m.jsx)("span",{className:"whitespace-nowrap text-right tabular-nums",children:n.more.value})]}):null]},n.title))]})}var U=c(f(),1);function Ae(e,t){return`${_(t)} ${e}${t===1?"":"s"}`}function Dn(e){return!!e}function Mn(e){return[["input",e.inputTokens],["output",e.outputTokens],["cached",e.cachedInputTokens],["cache write",e.cacheCreationTokens],["reasoning",e.reasoningTokens]].flatMap(([t,n])=>n?[{label:t,value:_(n)}]:[])}function Et(e){return{cost:(G(e?.cumulativeUsage)?.total??0)+(e?.auxiliaryCostUsd??0),tokens:V(e?.cumulativeUsage)?.totalTokens??0}}function Ot(e,t){return Math.min(Math.max(0,e),Math.max(0,t))}function Un(e,t,n,a){if(!e)return[];let o=Ot(n,t);return[{value:"By agent",valueStyle:"heading"},{label:"this agent",value:a(t-o)},{label:Ae("subagent",e.count),value:a(o)}]}function we(e){return e.split("/").at(-1)??e}function Ln(e,t){return{live:e===t,value:we(e),valueStyle:"heading"}}var jt=4,Pn=3;function Se(e,t,n){if(e.length<=t+1)return{rows:e};let a=e.slice(t);return{more:{count:a.length,value:n(a.reduce((o,i)=>o+i.amount,0))},rows:e.slice(0,t)}}function $t(e,t,n,a,o){let i=(e??[]).flatMap(r=>{let d=n(r.usage);return d?[{amount:a(d),modelId:r.modelId}]:[]}).sort((r,d)=>d.amount-r.amount).map(r=>({amount:r.amount,code:!0,label:we(r.modelId),live:r.modelId===t,value:o(r.amount)}));return t&&!i.some(r=>r.live)&&i.unshift({amount:0,code:!0,label:we(t),live:!0,value:"\u2026"}),i}function Bt(e,t,n,a){if(!e)return;let o=Ot(n,t);return{count:e.count,self:a(t-o),selfShare:t>0?(t-o)/t:1,subagents:a(o)}}function _t(e){return new Intl.NumberFormat("en-US",{currency:"USD",maximumFractionDigits:e,minimumFractionDigits:e,style:"currency"})}function zn(e){let t=e>=10?2:e>=1?3:4,n=_t(t),a=_t(4);return o=>o>0&&o<.5*10**-t?a.format(o):n.format(o)}function _n(e,t,n,a,o){let i=$t(t,a,V,r=>r.totalTokens,_);return{note:n?Ae("compaction",n):void 0,sections:i.length?[{title:"By model",...Se(i,jt,_)}]:[{rows:Mn(e),title:"By type"}].filter(r=>r.rows.length),split:Bt(o,e.totalTokens,Et(o).tokens,_),title:"Tokens",total:_(e.totalTokens)}}function En(e,t){return[["input",e.input],["output",e.output],["cache read",e.cacheRead],["cache write",e.cacheWrite]].flatMap(([n,a])=>a===void 0?[]:[{label:n,value:t(a)}])}function On(e,t,n,a,o){let i=ge(e,n);if(!i)return;let r=zn(i.total),d=$t(t,a,G,p=>p.total,r),x=[...n?.operations??[]].sort((p,N)=>N.costUsd-p.costUsd).map(p=>({amount:p.costUsd,label:jn(p),value:r(p.costUsd)})),C=[];if(d.length)C.push({title:"By model",...Se(d,jt,r)});else if(e){let p=En(e,r);p.length&&C.push({rows:p,title:"By type"})}return n&&x.length&&C.push({title:"Auxiliary",total:r(n.costUsd),...Se(x,Pn,r)}),{sections:C,split:Bt(o,i.total,Et(o).cost,r),title:"Estimated cost",total:r(i.total)}}function jn(e){let t={"junior/guardian_action_reviewed":"Guardian","junior/passive_reply_routed":"Passive reply routing","junior/turn_routed":"Thinking routing","memory/memories_captured":"Memory extraction","memory/memories_recalled":"Memory recall","memory/task_model_called":"Memory extraction","memory/user_prompt_model_called":"Memory recall"},n=`${e.namespace}/${e.name}`;return t[n]??`${e.namespace} \xB7 ${e.name.replaceAll("_"," ")}`}function Ft(e){let t=ft(e.modelUsage)??e.summary,n=ge(t,e.auxiliaryCosts);if(!n&&!e.live)return null;let a=!!e.live,o=n?`${vt(n)}${a?"+":""}`:"$\u2026",i=On(t,e.modelUsage,e.auxiliaryCosts,e.liveModelId,e.childAgentTotals);return(0,U.jsx)(H,{align:e.align,tooltipPlacement:e.tooltipPlacement??"above",tooltip:!i&&e.liveModelId?[Ln(e.liveModelId,e.liveModelId)]:void 0,tooltipCard:i?(0,U.jsx)(Ne,{...i}):void 0,children:(0,U.jsx)(j,{active:a,children:o})})}function Kt(e){return e.summary?(0,U.jsx)(H,{align:e.align,tooltipCard:(0,U.jsx)(Ne,{..._n(e.summary,e.modelUsage,e.compactionCount,e.liveModelId,e.childAgentTotals)}),children:(0,U.jsx)(j,{active:e.live,children:mt(e.summary)})}):null}function Qt(e){if(!e.label||e.label==="none")return null;let n=[e.startedAt?{label:"started",value:z(e.startedAt)}:void 0,e.endedAt?{label:"ended",value:z(e.endedAt)}:void 0,...Un(e.childAgentTotals,e.durationMs??0,e.childAgentTotals?.cumulativeDurationMs??0,a=>dt(a)||"0s")].filter(Dn);return(0,U.jsx)(H,{align:e.align,tooltip:n,children:e.label})}function Wt(e){if(!e.childAgentTotals)return null;let t=Ae("subagent",e.childAgentTotals.count);return(0,U.jsx)(H,{tooltip:[{value:`Tokens, cost, and runtime include ${t} at any depth.`}],children:t})}function $n(e){let t=new Map,n=[];for(let a of e){let o=t.get(a.label);if(!o){t.set(a.label,[a]),n.push(a.label);continue}o.push(a)}return n.map(a=>({label:a,annotations:t.get(a)??[]}))}function Vt(e){let t=$n(e);return{groups:t,labeledGroups:t.slice(0,2),overflowGroupCount:Math.max(0,t.length-2)}}var qt=c(k(),1);var b=c(f(),1);function Fa(e){return(0,b.jsxs)("section",{"aria-label":e.label,className:u("grid min-w-0 gap-2.5 border-dashboard-border-subtle",e.flat?"border-t px-1 py-2.5":"rounded-lg border bg-dashboard-surface-panel p-3"),children:[e.title?(0,b.jsxs)("h3",{className:"m-0 flex min-w-0 items-center gap-1.5 break-words font-sans text-xs font-medium text-dashboard-text-muted",children:[e.title,e.count?(0,b.jsx)("span",{className:"tabular-nums text-dashboard-text-faint",children:e.count.toLocaleString("en-US")}):null]}):null,(0,b.jsx)("div",{className:"min-w-0 break-words font-sans text-xs leading-relaxed text-dashboard-text-muted",children:e.children})]})}var Gt=3;function le(e){let[t,n]=(0,qt.useState)(!1),a=e.items.length-Gt,o=t||a<=0?e.items:e.items.slice(0,Gt);return(0,b.jsxs)("ul",{className:"-mx-1.5 -mb-1.5 -mt-1 grid list-none gap-0.5 p-0",children:[o.map(i=>(0,b.jsx)("li",{children:e.renderItem(i)},e.itemKey(i))),a>0?(0,b.jsx)("li",{children:(0,b.jsxs)("button",{"aria-expanded":t,className:"group flex min-h-8 w-full items-center gap-2.5 rounded-md px-1.5 py-1.5 text-left text-xs font-medium leading-4 text-dashboard-text-muted transition-colors hover:bg-dashboard-surface-hover hover:text-dashboard-text focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-dashboard-focus",onClick:()=>n(i=>!i),type:"button",children:[(0,b.jsx)("span",{className:"grid size-5 shrink-0 place-items-center",children:(0,b.jsx)(B,{"aria-hidden":"true",className:ne})}),t?"Show fewer":`Show ${a} more`]})}):null]})}function Y(e){let t=e.href!==void 0||e.disclosure===!0,n=u("grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-x-2.5 gap-y-1 rounded-md px-1.5 py-1.5 text-left text-inherit no-underline",t&&"group transition-colors hover:bg-dashboard-surface-hover focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-dashboard-focus"),a=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"grid size-5 shrink-0 place-items-center text-dashboard-text-muted",children:e.icon}),(0,b.jsx)("span",{className:"min-w-0 truncate text-sm font-medium leading-5 text-dashboard-text",children:e.title}),(0,b.jsx)("span",{className:"shrink-0 text-xs leading-5 tabular-nums text-dashboard-text-muted",children:e.meta}),e.children]});return e.href?(0,b.jsx)("a",{className:n,href:e.href,rel:"noreferrer",target:"_blank",title:e.tooltip,children:a}):e.disclosure?(0,b.jsx)(re,{className:n,title:e.tooltip,children:a}):(0,b.jsx)("div",{className:n,title:e.tooltip,children:a})}function Ht(e){return(0,b.jsx)("div",{className:u("col-start-2 col-end-4 min-w-0 text-xs leading-4 text-dashboard-text-muted",e.className),children:e.children})}var v=c(f(),1);function eo(e){return Pe({queryFn:({signal:t})=>rt(ot,`/api/conversations/${encodeURIComponent(e)}/watches`,t),queryKey:Ct(e,"watches"),retry:!1})}function to(e){return(0,v.jsx)(le,{itemKey:t=>t.id,items:e.watches,renderItem:t=>(0,v.jsx)(Fn,{watch:t})})}var Bn={channel:qe,deployment:be,deployment_source:be,issue:Z,pull_request:ee,release_source:Xe,repository:Ve,team:et,timer:Je,workspace_snapshot:Ye};function Fn(e){let{watch:t}=e,n=t.redacted?F:Bn[t.resourceType]??We,a=`${t.namespace} ${t.resourceType.replaceAll("_"," ")}`,o=(0,v.jsx)(n,{"aria-hidden":"true",className:"size-3.5"}),i=t.label??`Private ${a}`;return(0,v.jsxs)(ie,{className:"min-w-0",children:[t.url?(0,v.jsx)(Te,{label:i,children:(0,v.jsx)(Y,{href:t.url,icon:o,title:i})}):(0,v.jsx)(Y,{disclosure:!0,icon:o,meta:(0,v.jsx)(Xt,{}),title:i}),(0,v.jsx)(ke,{watches:[t]})]})}function Te(e){return(0,v.jsxs)("div",{className:"flex min-w-0 items-start gap-0.5",children:[(0,v.jsx)("div",{className:"min-w-0 flex-1",children:e.children}),(0,v.jsx)(re,{"aria-label":`Details for ${e.label}`,className:"group grid size-8 shrink-0 place-items-center rounded-md text-dashboard-text-muted transition-colors hover:bg-dashboard-surface-hover hover:text-dashboard-text focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-dashboard-focus",children:(0,v.jsx)(Xt,{})})]})}function Xt(){return(0,v.jsx)("span",{className:"grid size-5 place-items-center",children:(0,v.jsx)(B,{"aria-hidden":"true",className:ne})})}function ke(e){return(0,v.jsx)(Rt,{className:"grid min-w-0 gap-3 pb-2 pl-9 pr-1.5 pt-0.5 text-xs leading-4 text-dashboard-text-muted",children:e.watches.map(t=>(0,v.jsx)(Kn,{watch:t},t.id))})}function Kn(e){let{watch:t}=e,n=t.firesAt?[]:t.events,a=Object.entries(t.match??{});return(0,v.jsxs)("div",{className:"grid min-w-0 gap-1.5",children:[t.intent?(0,v.jsx)("p",{className:"m-0 break-words",children:(0,v.jsx)(se,{inline:!0,text:t.intent})}):null,t.firesAt?(0,v.jsxs)("p",{className:"m-0",children:["Fires"," ",(0,v.jsx)("time",{dateTime:t.firesAt,children:z(t.firesAt,{dateStyle:"medium",timeStyle:"short"})})]}):null,n.length>0||a.length>0?(0,v.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[n.map(o=>(0,v.jsx)(Yt,{children:Qn(o,t.resourceType)},o)),a.map(([o,i])=>(0,v.jsxs)(Yt,{filter:!0,children:[o.replaceAll("_"," "),": ",[i].flat().join(", ")]},`match:${o}`))]}):null,t.childAgent?(0,v.jsxs)("p",{className:"m-0 flex min-w-0 items-center gap-1",children:[(0,v.jsx)(Be,{"aria-hidden":"true",className:"size-3 shrink-0"}),(0,v.jsxs)("span",{className:"truncate",children:["via ",t.childAgent.name??"subagent"]})]}):null]})}function Yt(e){return(0,v.jsx)("span",{className:e.filter?"min-w-0 truncate rounded-md border border-dashed border-dashboard-border px-1.5 py-px text-xs leading-4 text-dashboard-text-muted":"min-w-0 truncate rounded-md bg-dashboard-fill-soft px-1.5 py-px text-xs leading-4 text-dashboard-text-subtle",children:e.children})}function Qn(e,t){let n=e.split(".");return(n[0]===t&&n.length>1?n.slice(1):n).join(" ").replaceAll("_"," ")}var y=c(f(),1),Wn={closed:"Closed",draft:"Draft",merged:"Merged",open:"Open",warning:"Needs attention"};function Re(e){return e?Wn[e]??e.charAt(0).toUpperCase()+e.slice(1):""}function lo(e){return(e?.annotations??[]).flatMap(t=>{if(!t.url)return[];let n=t.objectType??e?.sidebarAnnotations?.find(o=>o.key===t.key)?.objectType??"item",a=t.kind==="object"&&t.title!==t.label?t.title:t.description;return[{...a?{description:a}:void 0,...t.kind==="object"&&t.facts?{facts:t.facts}:void 0,key:`${t.plugin}:${t.key}`,label:t.label,objectType:n,plugin:t.plugin,...t.status?{status:t.status}:void 0,url:t.url}]})}function co(e){return(0,y.jsx)(le,{itemKey:t=>t.key,items:e.links,renderItem:t=>{let n=(0,y.jsx)(Gn,{link:t}),a=e.watchesByUrl.get(t.url);return a?(0,y.jsxs)(ie,{className:"min-w-0",children:[(0,y.jsx)(Te,{label:t.label,children:n}),(0,y.jsx)(ke,{watches:a})]}):e.watchesByUrl.size>0?(0,y.jsx)(Vn,{children:n}):n}})}function Vn(e){return(0,y.jsxs)("div",{className:"flex min-w-0 items-start gap-0.5",children:[(0,y.jsx)("div",{className:"min-w-0 flex-1",children:e.children}),(0,y.jsx)("span",{"aria-hidden":"true",className:"size-8 shrink-0"})]})}function Gn(e){let{link:t}=e,n=Re(t.status),a=(0,y.jsx)(O,{decorative:!0,facts:t.facts,objectType:t.objectType,size:14,status:t.status});return(0,y.jsx)(Y,{href:t.url,icon:n?(0,y.jsxs)(R,{children:[(0,y.jsx)(I,{render:(0,y.jsx)("span",{"aria-label":n,className:"inline-flex",role:"img",children:a})}),(0,y.jsx)(D,{size:"compact",children:n})]}):a,title:t.label,tooltip:[t.label,t.plugin,n,t.description].filter(Boolean).join(" \xB7 "),children:t.description?(0,y.jsx)(Ht,{className:"line-clamp-2 break-words",children:t.description}):null})}var l=c(f(),1),on=c(k(),1),Jt="(max-width: 767px)";function No(e){return(0,l.jsxs)("div",{className:"mb-2 rounded-lg border border-dashboard-accent/20 bg-dashboard-accent/[0.07] px-3 py-2.5 font-sans text-sm text-dashboard-text",children:[(0,l.jsx)("a",{className:"font-medium text-dashboard-accent-text underline decoration-dashboard-accent/40 underline-offset-2 hover:text-dashboard-accent-text",href:e.authorization.authorizationUrl,rel:"noreferrer",target:"_blank",children:e.authorization.label}),(0,l.jsx)("p",{className:"mb-0 mt-1 text-xs text-dashboard-text-muted",children:e.authorization.completionText})]})}function wo(e){if(e.visibility!=="private")return null;let t="Private conversation. Only members of this conversation can see this transcript.";return(0,l.jsxs)("span",{className:"inline-flex items-center text-dashboard-text-muted",role:"note",title:t,children:[(0,l.jsx)(F,{"aria-hidden":"true",className:"size-3.5 shrink-0"}),(0,l.jsx)("span",{className:"sr-only",children:t})]})}function en(e){let t=e.annotations,n=Xn();if(!t?.length)return null;let a=t.map(d=>Jn(d)),o=Vt(t),i=n&&o.groups.length>1,r=i?o.groups.flatMap(d=>d.annotations):[];return(0,l.jsxs)(R,{children:[(0,l.jsx)(I,{render:(0,l.jsx)("span",{"aria-label":`Linked work, newest first: ${a.join(", ")}`,className:"inline-flex min-w-0 max-w-full items-center",children:i?(0,l.jsx)(qn,{annotations:r,cutoutColor:"var(--color-dashboard-surface-panel)"}):(0,l.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-1",children:[o.labeledGroups.map(d=>(0,l.jsx)(Hn,{group:d},d.label)),o.overflowGroupCount>0?(0,l.jsxs)("span",{className:"inline-flex h-5 min-w-7 shrink-0 items-center justify-center rounded-full border border-dashboard-border-strong bg-dashboard-control px-1.5 font-sans text-2xs tabular-nums leading-none text-dashboard-text-muted",children:["+",o.overflowGroupCount]}):null]})})}),(0,l.jsxs)(D,{align:"start",children:[(0,l.jsx)(tt,{children:"Linked work"}),(0,l.jsx)("ul",{className:"m-0 list-none space-y-1 p-0",children:t.map((d,x)=>(0,l.jsxs)("li",{className:"flex min-w-0 items-center gap-1.5",children:[d.objectType?(0,l.jsx)(O,{...d,objectType:d.objectType,size:14}):d.icon?(0,l.jsx)(Ie,{icon:d.icon}):null,(0,l.jsx)("span",{className:"min-w-0 truncate",children:a[x]})]},`${d.key}:${x}`))})]})]})}function qn(e){return(0,l.jsx)("span",{className:u("relative isolate inline-flex h-[18px] items-center pr-0.5",e.className),children:e.annotations.map((t,n)=>(0,l.jsx)(Yn,{annotation:t,cutoutColor:e.cutoutColor,stacked:n>0,zIndex:n+1},t.key))})}function Hn(e){return(0,l.jsxs)("span",{className:"inline-flex h-5 min-w-0 max-w-60 shrink-0 items-center gap-1 truncate rounded-full border border-dashboard-border-strong bg-dashboard-control px-1.5 font-sans text-2xs leading-none text-dashboard-text-muted",children:[e.group.annotations.map(t=>t.objectType?(0,on.createElement)(O,{...t,objectType:t.objectType,key:t.key,decorative:!0,size:14}):t.icon?(0,l.jsx)(Ie,{decorative:!0,icon:t.icon,size:11},t.key):null),(0,l.jsx)("span",{className:"min-w-0 truncate whitespace-nowrap",children:e.group.label})]})}function Yn(e){let t=e.annotation.icon?tn[e.annotation.icon]:void 0;return(0,l.jsx)("span",{"aria-hidden":"true",className:u("relative box-border inline-flex size-[18px] shrink-0 items-center justify-center rounded-full border border-dashboard-border-strong bg-dashboard-control",e.stacked&&"-ml-1"),style:{boxShadow:`0 0 0 2px ${e.cutoutColor}`,zIndex:e.zIndex},title:t?.label,children:e.annotation.objectType?(0,l.jsx)(O,{...e.annotation,objectType:e.annotation.objectType,decorative:!0,size:12}):e.annotation.icon?(0,l.jsx)(Ie,{decorative:!0,icon:e.annotation.icon,size:11}):(0,l.jsx)("span",{className:"font-sans text-2xs font-semibold leading-none text-dashboard-text-muted",children:e.annotation.label.slice(0,1)})})}function Xn(){return(0,Zt.useSyncExternalStore)(e=>{if(typeof window>"u")return()=>{};let t=window.matchMedia(Jt);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},()=>typeof window<"u"&&window.matchMedia(Jt).matches,()=>!1)}function Jn(e){let t=e.objectType?[te({objectType:e.objectType}).label,e.status].filter(Boolean).join(": "):"",n=e.key.includes("/")||e.key.includes("#")?e.key:e.label;return[t,n].filter(Boolean).join(" \xB7 ")}var tn={"circle-dot":{className:"text-[#3fb950] light:text-[#1a7f37]",Icon:Z,label:"Open"},"circle-dashed":{className:"text-[#8c959f] light:text-[#59636e]",Icon:Ke,label:"Draft"},"circle-x":{className:"text-[#f85149] light:text-[#cf222e]",Icon:Qe,label:"Closed"},"git-merge":{className:"text-[#a371f7] light:text-[#8250df]",Icon:Ge,label:"Merged"},"git-pull-request":{className:"text-[#3fb950] light:text-[#1a7f37]",Icon:ee,label:"Open pull request"},"triangle-alert":{className:"text-[#d29922] light:text-[#9a6700]",Icon:Ze,label:"Needs attention"}};function Ie(e){let t=tn[e.icon],n=e.size??11;return(0,l.jsxs)("span",{"aria-hidden":e.decorative?!0:void 0,className:u("inline-flex shrink-0 items-center justify-center leading-none",t.className),style:{width:n,height:n},title:e.decorative?void 0:t.label,children:[(0,l.jsx)(t.Icon,{"aria-hidden":"true",className:"block",size:n,strokeWidth:2.25}),e.decorative?null:(0,l.jsx)("span",{className:"sr-only",children:t.label})]})}function So(e){return(0,l.jsx)("div",{className:"flex gap-x-4 gap-y-2 overflow-x-auto",children:e.links.map(t=>(0,l.jsxs)("a",{className:"inline-flex min-w-0 max-w-full shrink-0 items-center gap-2 rounded-md px-1 py-0.5 font-sans text-xs leading-snug text-dashboard-text no-underline transition-colors hover:text-dashboard-accent-text focus-visible:outline focus-visible:outline-2 focus-visible:outline-dashboard-focus",href:t.url,rel:"noreferrer",target:"_blank",title:[t.label,t.plugin,Re(t.status),t.description].filter(Boolean).join(" \xB7 "),children:[(0,l.jsx)(O,{facts:t.facts,objectType:t.objectType,size:16,status:t.status}),(0,l.jsx)("span",{className:"min-w-0 break-words",children:t.label})]},t.key))})}function Zn(e){return e.locationUrl?(0,l.jsx)("a",{className:he,href:e.locationUrl,rel:"noreferrer",target:"_blank",children:e.label}):e.label}function ea(e){let t=e.sourceTask.id?.trim(),n=e.sourceTask.title?.trim(),a=n?`Automation: ${n}`:"Automation";return t?(0,l.jsx)(W,{className:he,to:pt(t),children:a}):(0,l.jsx)("span",{children:a})}function nn(e){if(!e)return;let t=new Set,n;for(let a of e.events){let o=a.data;if(o.type==="turn_lifecycle"){o.state==="started"?t.add(o.turnId):t.delete(o.turnId),t.size===0&&(n=void 0);continue}t.size>0&&a.model&&(n=a.model.modelId)}return t.size>0?n:void 0}function Ao(e){return an(e).length>0}function To(e){let t=an(e);return t.length===0?null:(0,l.jsx)("dl",{className:"m-0 grid min-w-0 gap-2 text-xs leading-snug",children:t.map(n=>(0,l.jsxs)("div",{className:u("flex min-w-0 items-baseline justify-between gap-4",n.mobileOnly&&"md:hidden"),children:[(0,l.jsx)("dt",{className:"shrink-0 text-dashboard-text-muted",children:n.label}),(0,l.jsx)("dd",{className:"m-0 min-w-0 break-words text-right tabular-nums text-dashboard-text",children:n.content})]},n.key))})}function ta(e,t){if(!e)return null;let n=oe(e,{includeId:!1});return n?(0,l.jsx)(Zn,{label:n,locationUrl:t?.locationUrl??e.locationUrl}):null}function na(e,t,n){if(!e)return null;let a=G(t?.cumulativeUsage??e.cumulativeUsage),o=t?.auxiliaryCosts??e.auxiliaryCosts,i=(t?.status??e.status)==="active";return!a&&!o&&!i?null:(0,l.jsx)(Ft,{auxiliaryCosts:o,childAgentTotals:t?.childAgentTotals??e.childAgentTotals,live:i,liveModelId:nn(t),modelUsage:t?.modelUsage,summary:a,tooltipPlacement:n})}function an(e){if(!e.conversation)return[];let t=e.detail?.previousCursor?void 0:e.detail,n=e.detail?.cumulativeUsage??e.conversation.cumulativeUsage,a=ut(e.detail?.modelUsage)??V(n),o=bt(e.conversation),i=(e.detail?.status??e.conversation.status)==="active",r=nn(e.detail),d=e.detail?.sourceTask,x=e.detail?.childAgentTotals??e.conversation.childAgentTotals,C=e.conversation.lastSeenAt,p=ta(e.conversation,e.detail),N=e.showUsageBreakdown?null:na(e.conversation,e.detail);return[p?{content:p,key:"location",label:"Location",mobileOnly:!0}:void 0,d?{content:(0,l.jsx)(ea,{sourceTask:d}),key:"source-task",label:"Source"}:void 0,C?{content:(0,l.jsx)("time",{dateTime:C,title:z(C,{dateStyle:"medium",timeStyle:"short"}),children:ae(C)}),key:"last-activity",label:"Last activity"}:void 0,o!=="none"?{content:(0,l.jsx)(Qt,{childAgentTotals:x,durationMs:e.conversation.cumulativeDurationMs,endedAt:e.conversation.lastSeenAt,label:o,startedAt:e.conversation.startedAt}),key:"duration",label:"Runtime"}:void 0,a&&!e.showUsageBreakdown?{content:(0,l.jsx)(Kt,{childAgentTotals:x,compactionCount:t?t.events.filter(S=>S.data.type==="compaction").length:void 0,live:i,liveModelId:r,modelUsage:e.detail?.modelUsage,summary:a}),key:"tokens",label:"Tokens"}:void 0,N?{content:N,key:"cost",label:"Cost"}:void 0,x?{content:(0,l.jsx)(Wt,{childAgentTotals:x}),key:"subagents",label:"Subagents"}:void 0].filter(S=>S!==void 0)}var sn=c(f(),1);function rn({className:e,...t}){return(0,sn.jsx)(He,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:Oe("size-4 animate-spin motion-reduce:animate-none",e),...t})}var $=c(f(),1);function ln(e){return e.waitingOnViewer?(0,$.jsx)("span",{"aria-label":"Waiting on you",className:"size-2 shrink-0 rounded-full bg-violet-300 shadow-[0_0_6px_rgba(196,181,253,0.7)]",role:"img"}):e.status==="active"?(0,$.jsx)(rn,{"aria-label":"Running",className:"size-3 text-emerald-300"}):e.finishedSinceSeen?(0,$.jsx)("span",{"aria-label":"Finished since last viewed",className:"size-1.5 shrink-0 rounded-full bg-orange-300",role:"img"}):e.isPrivate?(0,$.jsx)(F,{"aria-label":"Private conversation",className:u("size-3 shrink-0",e.status==="failed"&&"text-rose-300",e.status==="idle"&&"text-dashboard-text-muted")}):e.status==="failed"?(0,$.jsx)("span",{"aria-label":"Failed",className:"size-1.5 shrink-0 rounded-full bg-rose-300",role:"img"}):(0,$.jsx)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-dashboard-text-faint"})}var L=c(k(),1);var g=c(f(),1),cn=3;function De(e){return e.fullName?.trim()||e.slackUserName?.trim()||e.email?.trim()||e.slackUserId?.trim()||"Unknown actor"}function ce(e){let t=De(e),n=e.email?.trim();return n&&n!==t?`${t}, ${n}`:t}function dn(e,t){return e.email?.trim().toLowerCase()||e.slackUserId?.trim()||e.slackUserName?.trim()||`${ht(e)??"actor"}:${t}`}function aa(e){let t=De(e.participant),n=e.participant.email?.trim();return(0,g.jsxs)("span",{className:"grid gap-0.5 font-sans",children:[(0,g.jsx)("span",{className:"font-semibold text-dashboard-text",children:t}),n&&n!==t?(0,g.jsx)("span",{className:"font-sans text-dashboard-text-muted",children:n}):null]})}function oa(e){let t=ce(e.participant);return(0,g.jsxs)(R,{children:[(0,g.jsx)(I,{render:(0,g.jsx)("span",{"aria-label":t,role:"img",className:"relative -ml-1 inline-flex rounded-full first:ml-0 pointer-events-none focus-visible:z-10 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-dashboard-focus [@media(hover:hover)_and_(pointer:fine)]:pointer-events-auto",onKeyDown:n=>n.stopPropagation(),tabIndex:0,children:(0,g.jsx)(kt,{imageUrl:e.participant.avatarUrl,name:De(e.participant),size:e.size})})}),(0,g.jsx)(D,{children:(0,g.jsx)(aa,{participant:e.participant})})]})}function un(e){return e?.participants?.length?e.participants:e?.actorIdentity?[e.actorIdentity]:[]}function mn(e){if(e.participants.length===0)return null;let t=e.participants.slice(0,cn),n=e.participants.slice(cn),a=e.participants.map(ce).join("; ");return(0,g.jsxs)("span",{"aria-label":`Conversation participants: ${a}`,className:"inline-flex items-center",role:"group",children:[t.map((o,i)=>(0,g.jsx)(oa,{participant:o,size:e.size},dn(o,i))),n.length>0?(0,g.jsxs)(R,{children:[(0,g.jsx)(I,{render:(0,g.jsx)(yt,{"aria-label":`${n.length} more participants: ${n.map(ce).join("; ")}`,className:"-ml-1 pointer-events-none bg-dashboard-surface-active shadow-none focus-visible:z-10 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-dashboard-focus [@media(hover:hover)_and_(pointer:fine)]:pointer-events-auto",onKeyDown:o=>o.stopPropagation(),size:e.size==="list"?"sm":"default",tabIndex:0,children:(0,g.jsxs)(xt,{className:"tabular-nums tracking-normal text-dashboard-text-muted",children:["+",n.length]})})}),(0,g.jsx)(D,{children:(0,g.jsx)("span",{className:"grid gap-1 font-sans",children:n.map((o,i)=>(0,g.jsx)("span",{children:ce(o)},dn(o,i)))})})]}):null]})}var bn=c(k(),1);var A=c(f(),1);function Me({action:e,children:t,detail:n,icon:a,title:o,tone:i="default"}){let r=i==="error";return(0,A.jsxs)(st,{className:"block gap-0 overflow-hidden rounded-xl p-0 shadow-[0_16px_40px_rgba(0,0,0,0.5)]",role:r?"alert":"status",variant:r?"destructive":"default",children:[(0,A.jsxs)("div",{className:"flex min-w-0 items-center gap-3 px-3 py-3",children:[a?(0,A.jsx)("div",{className:u("grid size-8 shrink-0 place-items-center rounded-lg",r?"bg-rose-300/15 text-rose-100":"bg-dashboard-accent/10 text-dashboard-accent-text/80"),children:(0,A.jsx)(a,{"aria-hidden":"true",size:16})}):null,(0,A.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,A.jsxs)(lt,{className:"font-display text-sm leading-snug",children:[o,n?" ":null]}),n?(0,A.jsx)(ct,{className:u("mt-0.5 truncate font-sans text-xs",r&&"text-rose-100/70"),children:n}):null]}),e]}),t]})}function Ue({className:e,tone:t="default",...n}){return(0,A.jsx)(je,{...n,className:u("h-auto shrink-0 rounded-lg border-0 px-3 py-1.5 text-xs leading-normal",t==="error"?"bg-rose-200/15 text-rose-50 hover:bg-rose-200/25 hover:text-rose-50 focus-visible:outline-rose-300/55 data-disabled:hover:bg-rose-200/15 data-disabled:hover:text-rose-50":"bg-dashboard-accent/10 text-dashboard-accent-text hover:bg-dashboard-accent/20 hover:text-dashboard-accent-text data-disabled:hover:bg-dashboard-accent/10 data-disabled:hover:text-dashboard-accent-text",e)})}function fn(e){return["dashboard","archived-conversation",e]}function ia(e){let t=e[e.length-1];return t==="active"||t==="archived"?t:void 0}var Le=["dashboard","archive-conversation"];function qo(){return ve({filters:{mutationKey:Le,status:"pending"},select:e=>{let t=e.state.variables,n=e.state.context,a=e.options.mutationKey?.[2];return{archived:t.archived,conversation:n?.archivedSnapshot?.conversation,conversationId:typeof a=="string"?a:""}}})}function vn(e){let t=ve({filters:{exact:!0,mutationKey:[...Le,e]},select:n=>n.state.status});return e?t.at(-1):void 0}function de(e,t){let n=X();return ze({mutationKey:[...Le,e],mutationFn:a=>it(at,`/api/conversations/${encodeURIComponent(e)}/archive`,a),onMutate:async a=>{let o={queryKey:["dashboard","conversations"]},i=E(e),r=fn(e);await Promise.all([n.cancelQueries(o),n.cancelQueries({queryKey:i})]);let d=n.getQueriesData(o),x=n.getQueryData(i),C=n.getQueryData(r),p=a.archived?new Date().toISOString():null,N=a.archived?{archivedAt:p,pinnedAt:null}:{archivedAt:p},w=ra(d,e)??C;return d.forEach(([S,Q])=>{if(!Q)return;let Cn=Q.conversations.some(P=>P.conversationId===e),Nn=ia(S),wn=!a.archived&&!Cn&&!!w&&Nn!=="archived"?[...Q.conversations,{...w.conversation,archivedAt:null,pinnedAt:null}].sort((P,Sn)=>Sn.lastSeenAt.localeCompare(P.lastSeenAt)):Q.conversations.map(P=>P.conversationId===e?{...P,...N}:P);n.setQueryData(S,{...Q,conversations:wn})}),n.setQueryData(i,S=>S&&{...S,...N,detailEtag:void 0}),w&&n.setQueryData(r,w),{archivedQueryKey:r,archivedSnapshot:w,detailQueryKey:i,previousArchivedSnapshot:C,previousDetail:x,previousFeeds:d}},onError:(a,o,i)=>{i?.previousFeeds.forEach(([r,d])=>{n.setQueryData(r,d)}),i&&(n.setQueryData(i.detailQueryKey,i.previousDetail),i.previousArchivedSnapshot?n.setQueryData(i.archivedQueryKey,i.previousArchivedSnapshot):n.removeQueries({exact:!0,queryKey:i.archivedQueryKey})),t?.onError?.()},onSuccess:(a,o)=>{n.setQueryData(E(e),i=>i&&{...i,archivedAt:a.archivedAt,detailEtag:void 0}),o.archived||n.removeQueries({exact:!0,queryKey:fn(e)}),t?.onSuccess?.(a.archivedAt)},onSettled:async()=>{await Promise.all([n.invalidateQueries({queryKey:["dashboard","conversations"]}),n.invalidateQueries({queryKey:["dashboard","locations"]}),n.invalidateQueries({queryKey:["dashboard","people"]}),n.invalidateQueries({exact:!0,queryKey:E(e)})])}})}function ra(e,t){let n,a=[];for(let[o,i]of e){let r=i?.conversations.find(d=>d.conversationId===t);r&&(n??=r,a.push(JSON.stringify(o)))}return n?{conversation:n,feedQueryHashes:a}:void 0}var T=c(f(),1);function hn(e){return!e.archivedConversation&&!e.archiveError?null:(0,T.jsxs)("div",{className:u("grid gap-2",e.className),children:[e.archiveError?(0,T.jsx)(sa,{conversation:e.archiveError.conversation,onDismiss:e.onDismissError,wasArchiving:e.archiveError.wasArchiving}):null,e.archivedConversation?(0,T.jsx)(la,{conversation:e.archivedConversation,onRestored:e.onRestored},e.archivedConversation.id):null]})}function sa(e){let t=q(e.conversation);return(0,T.jsx)(Me,{action:(0,T.jsx)(Ue,{onClick:e.onDismiss,title:"Dismiss",tone:"error",children:"Dismiss"}),detail:t,icon:Fe,title:e.wasArchiving?"Could not archive":"Could not restore",tone:"error"})}function la(e){let t=de(e.conversation.id,{onSuccess:a=>{a||e.onRestored()}}),n=q(e.conversation);return(0,bn.useEffect)(()=>{if(t.isPending||t.error)return;let a=window.setTimeout(e.onRestored,6e3);return()=>window.clearTimeout(a)},[e.conversation.id,e.onRestored,t.error,t.isPending]),(0,T.jsx)(Me,{action:(0,T.jsx)(Ue,{"aria-label":`Undo archive for ${n}`,disabled:t.isPending,onClick:()=>t.mutate({archived:!1,lastSeenAt:e.conversation.lastSeenAt}),title:`Undo archive for ${n}`,children:t.isPending?"Restoring\u2026":"Undo"}),detail:n,icon:J,title:"Conversation archived",children:t.error?(0,T.jsx)("div",{className:"border-t border-rose-300/25 bg-rose-400/[0.12] px-3 py-2 font-sans text-xs text-rose-50/85",role:"alert",children:"Could not restore the conversation."}):null})}var K=c(f(),1);function gn(e){return(0,K.jsx)("h3",{className:u("m-0 font-sans text-xs font-medium text-dashboard-text-muted",e.className),id:e.id,children:(0,K.jsxs)("button",{"aria-expanded":!e.collapsed,className:"flex cursor-pointer items-center gap-1 rounded-sm border-0 bg-transparent p-0 font-[inherit] text-inherit transition-colors hover:text-dashboard-text focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-dashboard-focus",onClick:e.onToggle,type:"button",children:[(0,K.jsx)(B,{"aria-hidden":"true",className:u("size-3 shrink-0 transition-transform motion-reduce:transition-none",!e.collapsed&&"rotate-90")}),e.label,e.collapsed?(0,K.jsx)("span",{className:"tabular-nums text-dashboard-text-faint",children:e.count}):null]})})}var ue=c(k(),1);var ca=150;function da(e,t){e.getQueryCache().find({exact:!0,queryKey:E(t)})?.getObserversCount()||e.prefetchQuery({...wt(t),queryFn:async({signal:a})=>{let o=await St(t,a,void 0,{mailbox:!0,unreadPage:At()==="unread"});return Nt(e,t,e.getQueryData(E(t)),o),{...o,prefetchedAtMs:Date.now()}}})}function pn(e){let t=X(),n=(0,ue.useRef)(void 0);(0,ue.useEffect)(()=>()=>clearTimeout(n.current),[]);let a=()=>{clearTimeout(n.current),n.current=setTimeout(()=>da(t,e),ca)},o=()=>clearTimeout(n.current);return{onBlur:o,onFocus:a,onPointerEnter:i=>{i.pointerType!=="touch"&&a()},onPointerLeave:o}}var me=c(k(),1),yn="junior:conversation-collapsed-sections";function xn(){let[e,t]=(0,me.useState)(ua),n=(0,me.useCallback)(a=>{t(o=>{let i=new Set(o);return i.delete(a)||i.add(a),ma(i),i})},[]);return{collapsedKeys:e,toggle:n}}function ua(){if(typeof window>"u")return new Set;try{let e=JSON.parse(window.localStorage.getItem(yn)??"[]");return Array.isArray(e)?new Set(e.filter(t=>typeof t=="string")):new Set}catch{return new Set}}function ma(e){if(!(typeof window>"u"))try{window.localStorage.setItem(yn,JSON.stringify([...e]))}catch{}}var s=c(f(),1);function ki(e){let{collapsedKeys:t,toggle:n}=xn(),[a,o]=(0,L.useState)(),[i,r]=(0,L.useState)(),d=(0,L.useCallback)((N,w)=>{r({conversation:N,wasArchiving:w})},[]),x=(0,L.useCallback)(N=>{r(w=>w?.conversation.id===N.id?void 0:w),o(N)},[]);fa(x,d);let C=(0,s.jsx)(hn,{archivedConversation:a,archiveError:i,className:"fixed bottom-[max(0.75rem,env(safe-area-inset-bottom))] left-3 right-3 z-30 sm:left-auto sm:w-96",onDismissError:()=>r(void 0),onRestored:()=>o(void 0)});if(e.loading&&e.conversations.length===0)return(0,s.jsx)(va,{label:"Loading conversations"});if(e.conversations.length===0)return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"rounded-lg border border-dashboard-border-subtle bg-dashboard-fill-faint p-4",children:(0,s.jsx)(Tt,{children:e.emptyLabel??"No conversations match this view."})}),C]});let p=Dt(e.conversations,{attentionIds:Mt(e.waitingConversationIds,e.finishedConversationIds),nowMs:Date.now(),timeZone:e.timeZone});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{"aria-label":"Your conversations",className:"grid gap-5",role:"list",children:p.map(N=>(0,s.jsx)(ha,{collapsed:t.has(N.key),finishedConversationIds:e.finishedConversationIds,onArchiveError:d,onArchived:x,onToggle:()=>n(N.key),waitingConversationIds:e.waitingConversationIds,section:N},N.key))}),C]})}function fa(e,t){let n=_e(),a=Ee(),o=n.state?.archivedConversation,i=vn(o?.id);(0,L.useEffect)(()=>{!o||i!=="success"&&i!=="error"||(i==="success"?e(o):t(o,!0),a({hash:n.hash,search:n.search},{replace:!0,state:null}))},[o,n.hash,n.search,a,t,e,i])}function va(e){return(0,s.jsxs)("div",{"aria-busy":e.label?"true":void 0,"aria-live":e.label?"polite":void 0,className:"grid gap-5",role:e.label?"status":void 0,children:[e.label?(0,s.jsx)("span",{className:"sr-only",children:e.label}):null,[3,2].map((t,n)=>(0,s.jsxs)("div",{children:[(0,s.jsx)(M,{className:u("mb-2 ml-1 h-3",n===0?"w-16":"w-12")}),(0,s.jsx)("div",{className:"grid gap-2",children:Array.from({length:t},(a,o)=>(0,s.jsx)(ba,{index:o+n*3},o))})]},t))]})}function ba(e){return(0,s.jsxs)("div",{className:"grid min-w-0 gap-2 rounded-lg border border-dashboard-border-subtle bg-dashboard-fill-faint px-4 py-4 md:px-5",children:[(0,s.jsxs)("div",{className:"grid min-w-0 grid-cols-[minmax(0,1fr)_max-content] items-start gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2.5",children:[(0,s.jsx)(M,{className:"mt-1.5 size-3 shrink-0 rounded-full"}),(0,s.jsx)(M,{className:u("h-4",e.index%2===0?"w-56 max-w-4/5":"w-44 max-w-3/5")})]}),(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)(M,{className:"h-3 w-16 opacity-70"}),(0,s.jsx)(M,{className:"size-4"})]})]}),(0,s.jsxs)("div",{className:"grid gap-1.5",children:[(0,s.jsx)(M,{className:"h-3 w-full max-w-3xl opacity-70"}),e.index%2===0?(0,s.jsx)(M,{className:"h-3 w-2/3 max-w-xl opacity-70"}):null]}),(0,s.jsx)(M,{className:"h-3 w-64 max-w-4/5 opacity-70"})]})}function ha(e){return(0,s.jsxs)("section",{"aria-labelledby":`conversation-section-${e.section.key}`,children:[(0,s.jsx)(gn,{className:u("px-1",!e.collapsed&&"mb-2"),collapsed:e.collapsed,count:e.section.conversations.length,id:`conversation-section-${e.section.key}`,label:e.section.label,onToggle:e.onToggle}),e.collapsed?null:(0,s.jsx)("div",{className:"grid gap-2",children:e.section.conversations.map(t=>(0,s.jsx)(ga,{conversation:t,finishedSinceSeen:e.finishedConversationIds.has(t.id),onArchiveError:e.onArchiveError,onArchived:e.onArchived,waitingOnViewer:e.waitingConversationIds.has(t.id)},t.id))})]})}function ga(e){let t=e.conversation,n=de(t.id,{onError:()=>e.onArchiveError(t,n.variables?.archived??!0),onSuccess:C=>{C&&e.onArchived(t)}}),a=gt(t),o=q(t),i=oe(t,{includeId:!1}),r=un(t),d=t.visibility==="private",x=pn(t.id);return(0,s.jsxs)("article",{...x,className:"group relative grid min-w-0 gap-2 rounded-lg border border-dashboard-border-subtle bg-dashboard-fill-faint px-4 py-4 transition-colors hover:border-dashboard-border hover:bg-dashboard-fill-soft md:px-5",role:"listitem",children:[(0,s.jsx)(W,{"aria-label":`Open ${o}`,className:"absolute inset-0 z-0 rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-dashboard-focus",to:pe(t.id)}),(0,s.jsxs)("div",{className:"relative z-[1] grid min-w-0 grid-cols-[minmax(0,1fr)_max-content] items-start gap-3 pointer-events-none",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2.5",children:[(0,s.jsx)("span",{className:"mt-1.5 grid size-3 shrink-0 place-items-center",children:(0,s.jsx)(ln,{finishedSinceSeen:e.finishedSinceSeen,isPrivate:d,status:a,waitingOnViewer:e.waitingOnViewer})}),(0,s.jsx)("h4",{className:"m-0 truncate font-display text-base font-medium leading-snug text-dashboard-text",children:o})]}),(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)(W,{className:"pointer-events-auto whitespace-nowrap font-sans text-xs tabular-nums text-dashboard-text-muted hover:text-dashboard-text focus:outline-none focus:ring-2 focus:ring-dashboard-focus",to:pe(t.id),children:ae(t.lastSeenAt)}),(0,s.jsx)("button",{"aria-label":`${t.archivedAt?"Restore":"Archive"} ${o}`,className:"pointer-events-auto relative shrink-0 cursor-pointer border-0 bg-transparent p-0 text-dashboard-text-muted transition before:absolute before:-inset-2 hover:text-dashboard-text focus:outline-none focus:ring-2 focus:ring-dashboard-focus focus:ring-offset-2 focus:ring-offset-dashboard-canvas disabled:cursor-not-allowed disabled:opacity-50",disabled:n.isPending,onClick:()=>n.mutate({archived:!t.archivedAt,lastSeenAt:t.lastSeenAt}),type:"button",children:t.archivedAt?(0,s.jsx)(J,{"aria-hidden":"true",size:15}):(0,s.jsx)($e,{"aria-hidden":"true",size:15})})]})]}),t.activityPreview?(0,s.jsx)("p",{className:"relative z-[1] m-0 line-clamp-2 font-sans text-sm leading-relaxed text-dashboard-text-subtle pointer-events-none",children:(0,s.jsx)(se,{inline:!0,mentions:t.activityPreview.mentions,text:t.activityPreview.text})}):(0,s.jsx)("p",{className:"relative z-[1] m-0 font-sans text-sm leading-relaxed text-dashboard-text-muted pointer-events-none",children:a==="active"?"Working\u2026":"No recent message"}),(0,s.jsxs)("div",{className:"relative z-[1] flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1 font-sans text-xs text-dashboard-text-muted pointer-events-none",children:[i?(0,s.jsx)("span",{className:"truncate",children:i}):null,i&&r.length>0?(0,s.jsx)("span",{"aria-hidden":"true",children:"\xB7"}):null,r.length>0?(0,s.jsx)(mn,{participants:r,size:"list"}):null,(0,s.jsx)(en,{annotations:t.sidebarAnnotations})]})]})}var fe=c(k(),1);function Ii(e,t=250){let[n,a]=(0,fe.useState)(e);return(0,fe.useEffect)(()=>{let o=window.setTimeout(()=>a(e),t);return()=>window.clearTimeout(o)},[t,e]),n}export{qo as a,de as b,Me as c,Ue as d,Dt as e,Mt as f,ya as g,gn as h,pn as i,xn as j,rn as k,De as l,oa as m,un as n,mn as o,O as p,j as q,Et as r,Ot as s,we as t,zn as u,jn as v,Fa as w,le as x,Y as y,eo as z,to as A,lo as B,co as C,No as D,wo as E,en as F,So as G,nn as H,Ao as I,To as J,na as K,ln as L,ki as M,va as N,Ii as O};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Rc as s,b as d}from"./chunk-YPMUHXYT.js";import{c as a}from"./chunk-7SZRL6FY.js";var t=a(d(),1),i="m-0 font-sans text-sm font-medium text-dashboard-text",l="mt-1 mb-0 font-sans text-xs leading-relaxed text-dashboard-text-muted";function n(e){let o=e.totalLabel??"period total";return(0,t.jsxs)("div",{className:s("flex flex-wrap items-start justify-between gap-3 border-b border-dashboard-border-subtle px-4 py-4 sm:px-5",e.className),children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h3",{className:i,children:e.title}),e.description?(0,t.jsx)("p",{className:l,children:e.description}):null]}),e.total!==void 0?(0,t.jsxs)("div",{className:"shrink-0 text-right",children:[(0,t.jsx)("div",{className:i,children:e.total}),(0,t.jsx)("div",{className:l,children:o})]}):e.trailing?(0,t.jsx)("div",{className:"font-sans text-xs text-dashboard-text-muted",children:e.trailing}):null]})}export{n as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as g}from"./chunk-MEHLQZDG.js";import{b as d}from"./chunk-CR2ICLSH.js";import{Oc as f,Qa as o,Rc as p,Sa as c,b as u,tc as m}from"./chunk-YPMUHXYT.js";import{c as i}from"./chunk-7SZRL6FY.js";var a=i(u(),1);function h({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"input-group",role:"group",className:o("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-dashboard-border bg-dashboard-overlay-soft transition-colors outline-none hover:border-dashboard-border-emphasis has-[[data-slot=input-group-control]:focus-visible]:border-dashboard-focus has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot=input-group-control]:focus-visible]:ring-dashboard-focus/25",t),...e})}var v=c("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-dashboard-text-muted select-none",{variants:{align:{"inline-start":"order-first pl-2.5","inline-end":"order-last pr-1.5"}},defaultVariants:{align:"inline-start"}});function s({className:t,align:e="inline-start",...r}){return(0,a.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":e,className:o(v({align:e}),t),onClick:l=>{l.target.closest("button")||l.currentTarget.parentElement?.querySelector("input")?.focus()},...r})}function b({className:t,type:e="button",...r}){return(0,a.jsx)(d,{type:e,size:"icon",className:o("size-6",t),...r})}function I({className:t,...e}){return(0,a.jsx)(g,{"data-slot":"input-group-control",className:o("h-full min-w-0 flex-1 rounded-none border-0 bg-transparent px-2 focus:ring-0",t),...e})}var n=i(u(),1);function k(t){let e=y[t.size??"compact"];return(0,n.jsxs)(h,{className:p(e.group,t.className),children:[(0,n.jsx)(I,{"aria-label":t.label,className:p("[&::-webkit-search-cancel-button]:appearance-none",e.input),onChange:r=>t.onChange(r.currentTarget.value),placeholder:t.placeholder,ref:t.inputRef,type:"search",value:t.value}),(0,n.jsx)(s,{className:e.icon,children:(0,n.jsx)(m,{"aria-hidden":"true",size:e.iconSize,strokeWidth:2.5})}),(0,n.jsx)(s,{align:"inline-end",className:e.clear,children:(0,n.jsx)(b,{"aria-label":"Clear search",className:t.value?void 0:"invisible",onClick:r=>{t.onChange(""),r.currentTarget.closest("[data-slot=input-group]")?.querySelector("input")?.focus()},children:(0,n.jsx)(f,{"aria-hidden":"true",size:14,strokeWidth:2.5})})})]})}var y={compact:{clear:"pr-1.25",group:"h-9",icon:"pl-2.25",iconSize:13,input:"pr-1 pl-2.5"},default:{clear:"pr-1.75",group:"h-10",icon:"pl-2.75",iconSize:14,input:"pr-1 pl-2.75"}};export{k as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as le,b as fe,c as Mt,d as Je,e as pe,f as Ye,g as Bt,h as Xe,i as $e,j as Qe}from"./chunk-MEHLQZDG.js";import{w as Nt,y as Vt,z as At}from"./chunk-6PHJZPWD.js";import{a as Le,b as Te}from"./chunk-CQY6BYUB.js";import{a as ze}from"./chunk-VC6IS564.js";import{i as _e,j as je}from"./chunk-B5ZN3SWQ.js";import{Fa as ue,H as It,Ha as Pt,Ia as $,Ma as we,N as Ge,Na as qe,Oa as He,Pa as Ue,Qa as We,Qc as Q,Xc as Ke,a as G,b as ie,c as Oe,dd as Dt,e as ve,g as L,h as Se,hb as Et,j as ye,l as yt}from"./chunk-YPMUHXYT.js";import{b as vt,c as b}from"./chunk-7SZRL6FY.js";var Pe={};vt(Pe,{Indicator:()=>qt,Root:()=>wt});var V=b(G(),1);function Ft(e){if(!e)return null;for(let o of e.elements){let d=o.tagName;if(d==="BUTTON"||d==="INPUT"){let x=o;if(x.type==="submit")return x}}return null}var Ot="data-checked",St="data-unchecked";function Ze(e){return{checked(o){return e.indeterminate?{}:o?{[Ot]:""}:{[St]:""}},...le}}var Lt=b(G(),1);function et(e,o,d,x=!0,y,T){let[h,k]=Lt.useState(),R=Q(y?`${y}-label`:void 0),s=!!T?.trim(),C=e??(s?void 0:o)??h;return L(()=>{let v=e||o||s||!x?void 0:to(d.current,R);h!==v&&k(v)}),C}function to(e,o){let d=oo(e);if(d)return!d.id&&o&&(d.id=o),d.id||void 0}function oo(e){if(!e)return;let o=e.parentElement;if(o&&o.tagName==="LABEL")return o;let d=e.id;if(d){let y=e.nextElementSibling;if(y&&y.htmlFor===d)return y}let x=e.labels;return x&&x[0]}var tt=b(G(),1),ro=tt.createContext(void 0);function Tt(){return tt.useContext(ro)}var ot=b(G(),1),mt=ot.createContext(void 0);function _t(){let e=ot.useContext(mt);if(e===void 0)throw new Error(Se(14));return e}var Ie=b(ie(),1),no="data-parent",wt=V.forwardRef(function(o,d){let{checked:x,className:y,defaultChecked:T=!1,"aria-labelledby":h,disabled:k=!1,form:R,id:s,indeterminate:I=!1,inputRef:C,name:v,onCheckedChange:M,parent:c=!1,readOnly:g=!1,render:U,required:B=!1,uncheckedValue:j,value:W,nativeButton:K=!1,style:Ve,...z}=o,{clearErrors:P}=Je(),{disabled:me,name:be,setDirty:J,setFilled:ae,setTouched:se,state:Z,validationMode:Re,validityData:F,validation:ee}=fe(),xe=Xe(),{labelId:n,registerControlId:O,getDescriptionProps:_}=pe(),i=Tt(),f=i?.allValues===void 0?void 0:i.parent,E=f!==void 0,m=me||xe.disabled||i?.disabled||k,u=be??v,a=W??u,S=Q(),de=i?.registerControlId!==O,D=Ye({id:s||void 0,enabled:de}),te=K?D:S,Y={};E&&(c?Y=f.getParentProps():a!==void 0&&(Y=f.getChildProps(a)));let{checked:ce=x,indeterminate:he=I,onCheckedChange:Ce,...ge}=Y,t=i?.value,p=V.useRef(null),Ae=$e(m,p),{getButtonProps:Me,buttonRef:Be}=qe({disabled:m,native:K}),X=i?.validation??ee,[N,l]=Ke({controlled:a!==void 0&&t!==void 0&&!c?t.includes(a):ce,default:T,name:"Checkbox",state:"checked"}),w=E?!!ce:N,ke=E&&he||I;Qe(p,S,N,void 0,!i&&!m,v);let ct=f?.registerChildId,oe=V.useRef(null),Ct=X.registerInput,gt=i?a:void 0,Xt=V.useCallback(r=>Ct(r,{controlRef:p,value:gt}),[Ct,gt]),$t=ue(C,oe,c?void 0:Xt),Qt=et(h,n,oe,!K,D,z["aria-label"]);L(()=>{oe.current&&(oe.current.indeterminate=ke),i||ae(N)},[N,ke,i,ae]),ze(N,()=>{i||(P(u),J(N!==F.initialValue),X.change(N))});let Zt=Pt({checked:N,disabled:m,form:R,name:c?void 0:u,id:K?void 0:D,required:B,ref:$t,style:u?Te:Le,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(r){if(r.nativeEvent.defaultPrevented)return;if(g){r.preventDefault();return}let q=r.currentTarget.checked,re=He(Ue.none,r.nativeEvent);if(M?.(q,re),!re.isCanceled&&(Ce?.(q,re),!re.isCanceled&&(l(q),a!==void 0&&i!==void 0&&!c&&!E))){let ne=q?[...i.value,a]:i.value.filter(Fe=>Fe!==a);i.setValue(ne,re)}},onClick(r){r.stopPropagation()},onFocus(){p.current?.focus()}},W!==void 0?{value:(i?N&&W:W)||""}:ve,_,r=>X.getValidationProps(m,r));V.useEffect(()=>{if(!f||a===void 0)return;let r=f.disabledStatesRef.current;return r.set(a,m),()=>{r.delete(a)}},[f,m,a]);let ut=V.useMemo(()=>({...Z,checked:w,disabled:m,readOnly:g,required:B,indeterminate:ke}),[Z,w,m,g,B,ke]),eo=Ze(ut),kt=$("span",o,{state:ut,ref:[Be,p,d],props:[{id:te,role:"checkbox","aria-checked":ke?"mixed":w,"aria-readonly":g||void 0,"aria-required":B||void 0,"aria-labelledby":Qt,[no]:c?"":void 0,onFocus(){Ae(!0)},onBlur(){let r=oe.current;r&&(se(!0),Ae(!1),Re==="onBlur"&&X.commit(i?t:r.checked))},onKeyDown(r){if(r.key!=="Enter"||(r.preventBaseUIHandler(),r.defaultPrevented))return;let q=oe.current?.form??null,re=r.currentTarget,ne=r.nativeEvent,Fe=r.preventDefault,ft=ne.preventDefault,pt=!1;r.preventDefault=()=>{pt=!0,Fe.call(r)},ne.preventDefault=()=>{pt=!0,ft.call(ne)},ft.call(ne),yt(re).queueMicrotask(()=>{r.preventDefault=Fe,ne.preventDefault=ft,pt||Ft(q)?.click()})},onClick(r){if(g||m)return;r.preventDefault();let q=oe.current;q&&we(q,r)}},z,ge,Me,_,r=>X.getValidationProps(m,r)],stateAttributesMapping:eo}),lt=kt.props.id;return L(()=>{if(!(!ct||c||a===void 0||lt===void 0))return ct(a,lt)},[ct,c,a,lt]),(0,Ie.jsxs)(mt.Provider,{value:ut,children:[kt,!N&&!i&&u&&!c&&j!==void 0&&(0,Ie.jsx)("input",{type:"hidden",form:R,name:u,value:j,disabled:m}),(0,Ie.jsx)("input",{...Zt,suppressHydrationWarning:!0})]})});var rt=b(G(),1);var qt=rt.forwardRef(function(o,d){let{render:x,className:y,style:T,keepMounted:h=!1,...k}=o,R=_t(),s=R.checked||R.indeterminate,{mounted:I,transitionStatus:C,setMounted:v}=je(s),M=rt.useRef(null),c={...R,transitionStatus:C};_e({batch:!0,enabled:!s,open:s,ref:M,onComplete(){s||v(!1)}});let U={...Ze(R),...Ge},B=h||I,j=$("span",o,{ref:[d,M],state:c,stateAttributesMapping:U,props:k});return B?j:null});var nt=b(ie(),1);function rr({className:e,...o}){return(0,nt.jsx)(Pe.Root,{"data-slot":"checkbox",className:We("grid size-4 shrink-0 cursor-pointer place-items-center rounded-sm border border-dashboard-border-interactive bg-dashboard-control text-dashboard-text-inverse transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-dashboard-focus data-checked:border-dashboard-focus data-checked:bg-dashboard-focus data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...o,children:(0,nt.jsx)(Pe.Indicator,{"data-slot":"checkbox-indicator",children:(0,nt.jsx)(Et,{"aria-hidden":"true",size:12,strokeWidth:3})})})}var De={};vt(De,{Indicator:()=>Yt,Root:()=>Jt});var H=b(G(),1);var Ht="data-checked",Ut="data-unchecked";var Ee={checked(e){return e?{[Ht]:""}:{[Ut]:""}},...Ge,...le};var it=b(G(),1),bt=it.createContext(void 0);function Wt(){return it.useContext(bt)}function Kt(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}var at=b(G(),1),Rt=at.createContext(void 0);function zt(){let e=at.useContext(Rt);if(e===void 0)throw new Error(Se(52));return e}var Ne=b(ie(),1),Jt=H.forwardRef(function(o,d){let{render:x,className:y,disabled:T=!1,readOnly:h=!1,required:k=!1,"aria-labelledby":R,value:s,inputRef:I,nativeButton:C=!1,id:v,style:M,...c}=o,g=Wt(),{disabled:U,readOnly:B,required:j,form:W,checkedValue:K,touched:Ve=!1,validation:z,name:P,setCheckedValue:me=Oe,setTouched:be=Oe,registerInputRef:J=Oe}=g??{},{setTouched:ae,setFilled:se,state:Z,disabled:Re}=fe(),F=Xe(),{labelId:ee,getDescriptionProps:xe}=pe(),n=Re||F.disabled||U||T,O=B||h,_=j||k,i=W,f=g?K===s:s==="",E=H.useRef(null),m=$e(n,E),u=H.useRef(null),a=z?.registerInput,S=H.useCallback(l=>a?.(l,{controlRef:E,value:void 0}),[a]),de=ue(I,u,J,S);L(()=>{u.current?.checked&&se(!0)},[se]),L(()=>{if(u.current){if(n&&f){J(null);return}J(u.current)}},[f,n,J]);let D=Q(),te=Ye({id:v}),Y=C?void 0:te,ce=et(R,ee,u,!C,Y,c["aria-label"]),he={role:"radio","aria-checked":f,"aria-labelledby":ce,[Vt]:f?"":void 0,id:C?te:D,onKeyDown(l){l.key==="Enter"&&l.preventDefault()},onClick(l){if(l.defaultPrevented||n||O)return;l.preventDefault();let w=u.current;w&&we(w,l)},onFocus(l){m(!0),!(l.defaultPrevented||n||O||!Ve)&&(u.current?.click(),be(!1))},onBlur(){g||m(!1)}},{getButtonProps:Ce,buttonRef:ge}=qe({disabled:n,native:C,composite:!1}),t={type:"radio",ref:de,form:i,id:Y,name:P,tabIndex:-1,style:P?Te:Le,"aria-hidden":!0,...s!==void 0?{value:Kt(s)}:ve,disabled:n,checked:f,required:_,readOnly:O,onChange(l){if(l.nativeEvent.defaultPrevented||n||O||s===void 0)return;let w=He(Ue.none,l.nativeEvent);me(s,w),!w.isCanceled&&ae(!0)},onClick(l){l.stopPropagation()},onFocus(){E.current?.focus()}},p=H.useMemo(()=>({...Z,required:_,disabled:n,readOnly:O,checked:f}),[Z,n,O,f,_]),Ae=p,Me=g!==void 0,Be=[d,E,ge],X=[he,c,Ce,xe,z?l=>z.getValidationProps(n,l):ve],N=$("span",o,{enabled:!Me,state:p,ref:Be,props:X,stateAttributesMapping:Ee});return(0,Ne.jsxs)(Rt.Provider,{value:Ae,children:[Me?(0,Ne.jsx)(Nt,{tag:"span",render:x,className:y,style:M,state:p,refs:Be,props:X,stateAttributesMapping:Ee}):N,(0,Ne.jsx)("input",{...t,suppressHydrationWarning:!0})]})});var st=b(G(),1);var Yt=st.forwardRef(function(o,d){let{render:x,className:y,style:T,keepMounted:h=!1,...k}=o,R=zt(),s=R.checked,{mounted:I,transitionStatus:C,setMounted:v}=je(s),M={...R,transitionStatus:C},c=st.useRef(null),g=h||I,U=$("span",o,{ref:[d,c],state:M,props:k,stateAttributesMapping:Ee});return _e({batch:!0,enabled:!s,open:s,ref:c,onComplete(){s||v(!1)}}),g?U:null});var A=b(G(),1);var xt=b(ie(),1),io=[Dt],ht=A.forwardRef(function(o,d){let{render:x,className:y,disabled:T,readOnly:h,required:k,onValueChange:R,value:s,defaultValue:I,form:C,name:v,inputRef:M,id:c,style:g,...U}=o,{setTouched:B,setFocused:j,validationMode:W,name:K,disabled:Ve,state:z,validation:P,setDirty:me,setFilled:be,validityData:J}=fe(),{labelId:ae}=pe(),{clearErrors:se,elementRef:Z}=Je(),Re=Mt(!0),F=Ve||T,ee=K??v,xe=Q(c),[n,O]=Ke({controlled:s,default:I,name:"RadioGroup",state:"value"}),[_,i]=A.useState(!1),f=ye((t,p)=>{R?.(t,p),!p.isCanceled&&O(t)}),E=P.getInputControl,m=A.useMemo(()=>({get current(){return E()}}),[E]),u=A.useRef(null),a=A.useRef(null),S=ue(u,M),de=A.useRef(S),D=ye(t=>{u.current===t&&de.current===S||(de.current=S,S?.(t))});L(()=>{D(u.current)},[S,D]);let te=ye(t=>{if(t){if(!t.disabled){a.current||(a.current=t);let p=u.current;(t.checked||p==null||p.disabled)&&D(t)}return()=>{a.current===t&&(a.current=null),u.current===t&&D(null)}}}),Y=ye(()=>{let t=Z.current;if(!t)return n??null;for(let p of P.registeredInputs.keys())if(p.checked&&Bt(p,t))return n??null;return null});Qe(m,xe,n??null,Y,!F,v),ze(n,()=>{se(ee),me(n!==J.initialValue),be(n!=null),P.change(n);let t=a.current;n==null&&t&&!t.disabled&&D(t)});let ce=ae??Re?.legendId,he={...z,disabled:F??!1,required:k??!1,readOnly:h??!1},Ce=A.useMemo(()=>({checkedValue:n,disabled:F,form:C,validation:P,name:ee,readOnly:h,registerInputRef:te,required:k,setCheckedValue:f,setTouched:i,touched:_}),[n,F,C,P,ee,h,te,k,f,i,_]),ge={id:c,role:"radiogroup","aria-required":k||void 0,"aria-disabled":F||void 0,"aria-readonly":h||void 0,"aria-labelledby":ce,onBlur(t){It(t.currentTarget,t.relatedTarget)||(i(!1),B(!0),j(!1),W==="onBlur"&&P.commit(n))},onKeyDownCapture(t){t.key.startsWith("Arrow")&&i(!0)}};return(0,xt.jsx)(bt.Provider,{value:Ce,children:(0,xt.jsx)(At,{render:x,className:y,style:g,state:he,props:[ge,U,t=>P.getValidationProps(F??!1,t)],refs:[d],stateAttributesMapping:le,enableHomeAndEndKeys:!1,modifierKeys:io})})});var dt=b(ie(),1);function xn(e){return(0,dt.jsx)(ht,{"data-slot":"radio-group",...e})}function hn({className:e,...o}){return(0,dt.jsx)(De.Root,{"data-slot":"radio-group-item",className:We("grid size-4 shrink-0 cursor-pointer place-items-center rounded-full border border-dashboard-border-interactive bg-dashboard-control transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-dashboard-focus data-checked:border-dashboard-focus data-checked:bg-dashboard-focus data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...o,children:(0,dt.jsx)(De.Indicator,{"data-slot":"radio-group-indicator",className:"size-1.5 rounded-full bg-dashboard-text-inverse"})})}export{rr as a,xn as b,hn as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{z as _}from"./chunk-XDUSY26N.js";import{s as D}from"./chunk-6PHJZPWD.js";import{b as N}from"./chunk-YPMUHXYT.js";import{c as U}from"./chunk-7SZRL6FY.js";var h=U(N(),1);function x(e){if(typeof e!="number"||!Number.isFinite(e))return"";let t=Math.max(0,Math.floor(e));if(t<1e3)return`${t}ms`;if(t<6e4){let o=t/1e3;return`${o.toFixed(o<10?1:0)}s`}let r=[],i=[["mo",2592e6],["d",864e5],["h",36e5],["m",6e4],["s",1e3]];for(let[o,u]of i){let m=Math.floor(t/u);if(m!==0){if(r.push(`${m}${o}`),r.length===2)break;t%=u}}return r.join(" ")}function de(e){return(0,h.jsx)(h.Fragment,{children:x(e.value)||e.fallback||null})}function y(e){return Date.parse(e.createdAt)}function l(e,t,r){return{parts:r,role:t,sourceSeq:e.seq,timestamp:y(e),...e.mentions?{mentions:e.mentions}:void 0}}function q(e){let t=new Set;for(let r of e){let i=r.data;i.type==="subagent"&&i.parentToolCallId&&t.add(i.parentToolCallId)}return t}function L(e){let t=new Set;for(let r of e)r.messageId&&t.add(r.messageId);return t}function z(e,t){return{delivery:e.delivery,messageId:e.messageId,parts:e.redacted?[{type:"text",redacted:!0}]:[{type:"text",text:e.text??""}],...e.attachments?{attachments:e.attachments}:void 0,...e.images?.length?{images:e.images}:void 0,pending:!0,role:"user",source:e.source,sourceSeq:Number.MAX_SAFE_INTEGER-1e6+t,timestamp:Date.parse(e.createdAt),...e.actorIdentity?{actorIdentity:e.actorIdentity}:void 0,...e.actorIdentityId?{actorIdentityId:e.actorIdentityId}:void 0,...e.mentions?{mentions:e.mentions}:void 0,...e.reviewItemChange?{reviewItemChanges:[e.reviewItemChange]}:void 0}}function W(e,t){if(!t?.length)return e;let r=j(e,t);return r.length===0?e:[...e,...r]}function j(e,t){if(!t?.length)return[];let r=L(e);return t.filter(i=>!r.has(i.messageId)).map((i,o)=>z(i,o))}function J(e,t){return H(e.events,e.annotations,t)}function H(e,t,r){let i=q(e),o=new Map,u=new Map,m=new Map,f=[],C=new Map,b=new Map,M,V=(a,n)=>{if(i.has(n.toolCallId))return;let s="output"in n?n.output:void 0,d=o.get(n.toolCallId);if(d){d.name=n.name,d.status=n.status,n.input!==void 0&&(d.input=n.input),s!==void 0&&(d.output=s),d.startedTimestamp===void 0&&n.startedAt&&(d.startedTimestamp=Date.parse(n.startedAt)),n.status!=="running"&&(d.resultTimestamp=y(a));return}let c={type:"tool_call",id:n.toolCallId,name:n.name,status:n.status,...n.input===void 0?void 0:{input:n.input},...s===void 0?void 0:{output:s},...n.status==="running"?void 0:{resultTimestamp:y(a)}},p={...l(a,"tool",[c]),sourceSeq:n.startedSeq??a.seq,timestamp:n.startedAt?Date.parse(n.startedAt):y(a)};o.set(n.toolCallId,c),u.set(n.toolCallId,p),f.push(p)};for(let a of e){let n=a.data;if(n.type==="message"){let s={...l(a,n.role,[n.redacted?{type:"text",redacted:!0}:{type:"text",text:n.text}]),messageId:n.messageId,...n.attachments?{attachments:n.attachments}:void 0,...n.cards?{cards:_(n.cards,t??[])}:void 0,...n.actorIdentity?{actorIdentity:n.actorIdentity}:void 0,...n.actorIdentityId?{actorIdentityId:n.actorIdentityId}:void 0,...n.agentInvocationId?{agentInvocationId:n.agentInvocationId}:void 0,...n.eventType?{eventType:n.eventType}:void 0,eventObjectType:n.eventObjectType,...n.trustedSummary?{trustedSummary:n.trustedSummary}:void 0,...n.events?{events:n.events}:void 0,...n.explicitMention!==void 0?{explicitMention:n.explicitMention}:void 0,...n.quiet?{quiet:n.quiet}:void 0,...n.reviewItemChanges?{reviewItemChanges:n.reviewItemChanges}:void 0,...n.source?{source:n.source}:void 0};f.push(s),C.set(s.messageId,s),s.role==="user"&&(M=s);continue}if(n.type==="message_handled"){let s=C.get(n.messageId);s?.role==="user"&&s.explicitMention===!1&&!s.eventType&&(s.context=!0);continue}if(n.type==="assistant_message"){if(n.parts.length===0)continue;f.push(l(a,"assistant",n.parts.map(s=>s.redacted?{type:"reasoning",redacted:!0}:{type:"reasoning",text:s.text})));continue}if(n.type==="turn_lifecycle"&&n.state==="started"){let s=n.inputMessageIds?.map(c=>C.get(c)).filter(c=>c!==void 0),d=s?.slice().reverse().find(c=>c.role==="user");d?b.set(n.turnId,d):M&&b.set(n.turnId,M);for(let c of s??[])c.role==="user"&&c.explicitMention===!1&&!c.eventType&&(c.context=!0);continue}if(n.type==="turn_context"){let s=b.get(n.turnId);s&&(s.contexts??=[],s.contexts.push({content:n.content,kind:n.kind,loadedAt:a.createdAt,pluginName:n.pluginName,turnId:n.turnId,version:n.version}));continue}if(n.type==="tool_calls"){for(let s of n.calls)V(a,s);if(n.assistant){let s=[];for(let d of n.assistant.parts){if(d.type==="reasoning"){s.push(d.redacted?{type:"reasoning",redacted:!0}:{type:"reasoning",text:d.text});continue}if(i.has(d.toolCallId))continue;let c=o.get(d.toolCallId);if(!c)continue;let p=u.get(d.toolCallId);if(p){p.sourceSeq!==a.seq&&(c.startedTimestamp=p.timestamp);let w=f.indexOf(p);w>=0&&f.splice(w,1),u.delete(d.toolCallId)}s.push(c)}s.length>0&&f.push(l(a,"assistant",s))}continue}if(n.type==="subagent"){let s=`${n.childConversationId}:${n.startedSeq}`,d=m.get(s),c=n.status==="running"?void 0:y(a);if(d){d.status=n.status,c===void 0?delete d.finishedTimestamp:d.finishedTimestamp=c;continue}let p={type:"subagent",id:s,childConversationId:n.childConversationId,subagentKind:n.subagentKind,status:n.status,...c===void 0?void 0:{finishedTimestamp:c},...n.agentName?{agentName:n.agentName}:void 0,...n.task?{task:n.task}:void 0,...n.title?{title:n.title}:void 0};m.set(s,p),f.push({...l(a,"tool",[p]),sourceSeq:n.startedSeq,timestamp:Date.parse(n.startedAt)});continue}if(n.type==="structured_event"){f.push(l(a,"system",[{type:"structured_event",...a.mentions?{mentions:a.mentions}:void 0,namespace:n.namespace,name:n.name,version:n.version,presentation:n.presentation,...n.turnId?{turnId:n.turnId}:void 0}]));continue}if(n.type==="attachments_delivered"){f.push(l(a,"system",[{type:"attachments_delivered",attachments:n.attachments}]));continue}if(n.type==="compaction"){f.push(l(a,"system",[{type:"context_event",...a.mentions?{mentions:a.mentions}:void 0,event:{type:n.type,createdAt:a.createdAt,...n.modelId?{modelId:n.modelId}:void 0,...n.summary?{summary:n.summary}:void 0,...n.details?{details:n.details}:void 0}}]));continue}if(n.type==="turn_lifecycle"&&n.state==="failed"){f.push({role:n.failureCode==="delivery_failed"?"system":"assistant",failureCode:n.failureCode,...n.failureReason?{failureReason:n.failureReason}:void 0,...n.eventId?{eventId:n.eventId}:void 0,...n.sentryEventUrl?{sentryEventUrl:n.sentryEventUrl}:void 0,parts:[],sourceSeq:a.seq,timestamp:y(a)});continue}}let O=f.filter(a=>a.role!=="user"||a.eventType!==void 0||a.explicitMention!==!1||a.context===!0).sort((a,n)=>a.sourceSeq-n.sourceSeq);return W(O,r)}function v(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return"UTC"}}function Z(e){return e.status==="active"}function B(e){return e.status==="failed"}function K(e){return e.status==="active"}function G(e){return e.status==="failed"}function I(e){if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?t:null}function ye(e,t){let r=I(e);return r==null?"none":new Date(r).toLocaleString(void 0,{...t,timeZone:v()})}function Te(e){let t=I(e);if(t==null)return"not updated yet";let r=Math.round((t-Date.now())/1e3),i=Math.abs(r),o=[["year",3600*24*365],["month",3600*24*30],["week",3600*24*7],["day",3600*24],["hour",3600],["minute",60]];for(let[u,m]of o)if(i>=m)return new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}).format(Math.round(r/m),u);return"just now"}function X(e){if(typeof e!="number"||!Number.isFinite(e))return"none";let t=Math.max(0,Math.floor(e));if(t<1e3)return`${t}ms`;let r=t/1e3;if(r<60)return`${r.toFixed(r<10?1:0)}s`;let i=Math.round(r),o=Math.floor(i/60),u=i%60;return`${o}m ${u}s`}function he(e){if(e===void 0)return;let t=typeof e=="string"?e:JSON.stringify(e);if(t===void 0)return;let r=new TextEncoder().encode(t).byteLength;return r<1e3?`${r}b`:`${Math.round(r/1e3)}kb`}function ve(e,t){if(!(typeof e!="number"||typeof t!="number"||t<e))return X(t-e)}function Y(e){if(typeof e!="number"||!Number.isFinite(e))return"";let t=Math.max(0,Math.floor(e));return t===0?"":x(t)}function Ie(e,t=!1){if(typeof e!="number"||!Number.isFinite(e))return"no timestamp";let r=new Date(e);return t?r.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"medium",timeZone:v()}):r.toLocaleTimeString(void 0,{timeZone:v()})}function Ce(e){if(typeof e!="number"||!Number.isFinite(e))return"no timestamp";let t=Math.round((e-Date.now())/1e3),r=Math.abs(t),i=[["year",3600*24*365],["month",3600*24*30],["week",3600*24*7],["day",3600*24],["hour",3600]],[o,u]=i.find(([,m])=>r>=m)??i.at(-1);return new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}).format(Math.round(t/u),o)}function be(e){let t=new Date(e),r={dateStyle:"medium",timeStyle:"long"};return{local:t.toLocaleString(void 0,{...r,timeZone:v()}),utc:t.toLocaleString(void 0,{...r,timeZone:"UTC"})}}function A(e){if(typeof e!="number"||!Number.isFinite(e))return"0";let t=Math.max(0,Math.floor(e));if(t<1e3)return String(t);let r=[["t",1e12],["b",1e9],["m",1e6],["k",1e3]],[i,o]=r.find(([,f])=>t>=f)??r[1],u=t/o;return`${u>=100||Number.isInteger(u)||u>=10?Math.round(u).toString():(Math.floor(u*10)/10).toFixed(1).replace(/\.0$/,"")}${i}`}function g(e){return typeof e=="number"&&Number.isFinite(e)?Math.max(0,Math.floor(e)):void 0}function Q(e){return[e.inputTokens,e.outputTokens,e.cachedInputTokens,e.cacheCreationTokens].reduce((t,r)=>{let i=g(r);return i===void 0?t:(t??0)+i},void 0)}function R(e){let t=e.toLowerCase();return t==="assistant"?"assistant":t==="user"?"user":t==="system"?"system":t.includes("tool")?"tool":"other"}function ee(e,t){if(R(t.role)!=="user"||t.agentInvocationId)return;let r=t.actorIdentityId?e.authors?.[t.actorIdentityId]:void 0;if(r)return r;if(S(t.actorIdentity))return t.actorIdentity;if(S(e.actorIdentity))return e.actorIdentity}function Me(e,t){let r=R(t.role);if(r==="assistant")return D();if(r==="user"){if(t.agentInvocationId)return"Agent invocation";let i=ee(e,t);return i?.fullName?.trim()||(S(i)??"User")}return r==="system"?"System":r==="tool"?"Tool":t.role||"Unknown"}function te(e){return A(e)}function xe(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?"0":e<10?(Math.round(e*10)/10).toFixed(1).replace(/\.0$/,""):te(e)}function P(e){if(!e)return;let t={totalTokens:0};t.reasoningTokens=g(e.reasoningTokens);let r=Q(e);if(r!==void 0)t.totalTokens=r,t.inputTokens=g(e.inputTokens),t.outputTokens=g(e.outputTokens),t.cachedInputTokens=g(e.cachedInputTokens),t.cacheCreationTokens=g(e.cacheCreationTokens);else{let i=g(e.totalTokens);i!==void 0&&(t.totalTokens=i,t.providerTotalTokens=i)}return t.totalTokens>0?t:void 0}function Se(e){if(!e?.length)return;let t={totalTokens:0};for(let r of e){let i=P(r.usage);if(i){t.totalTokens+=i.totalTokens;for(let o of["inputTokens","outputTokens","cachedInputTokens","cacheCreationTokens","reasoningTokens"]){let u=i[o];u!==void 0&&(t[o]=(t[o]??0)+u)}}}return t.totalTokens>0?t:void 0}function ne(e){return e?`${A(e.totalTokens)} tokens`:""}function ke(e){return ne(P(e))}function T(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:void 0}function k(e,t){return Math.round((e+t)*1e12)/1e12}function F(e){if(!e?.cost)return;let t={total:0},r=e.cost,i=T(r.total),o={input:T(r.input),output:T(r.output),cacheRead:T(r.cacheRead),cacheWrite:T(r.cacheWrite)},u=Object.values(o).reduce((m,f)=>m+(f??0),0);return t.total=k(t.total,i??u),t.input=o.input,t.output=o.output,t.cacheRead=o.cacheRead,t.cacheWrite=o.cacheWrite,i!==void 0||u>0?t:void 0}function we(e){let t;for(let r of e??[]){let i=F(r.usage);i&&(t=k(t??0,i.total))}return t===void 0?void 0:{total:t}}function re(e){if(!e)return"";let t=e.total>0&&e.total<.01?4:2;return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:t}).format(e.total)}function Ue(e){return e?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:4}).format(e.total):""}function ie(e,t){if(!(!e&&!t))return{...e,total:k(e?.total??0,t?.costUsd??0)}}function Ne(e,t){return re(ie(F(e),t))}function _e(e){return Y(e.cumulativeDurationMs)||"none"}function oe(e,t){return(I(t)??0)-(I(e)??0)}function De(e){return e?.agentTree?.at(-1)?.label??(e?.displayTitle?.trim()||void 0)}function Ae(e){return e?.displayTitle??"Conversation"}function S(e){let t=e?.email?.trim()||void 0,r=e?.fullName?.trim()||void 0,i=e?.slackUserName?.trim()||void 0;return t??r??i??e?.slackUserId}function Re(e,t={}){let r=e.channel;if(!r)return;let o=t.includeId??!0?` (${r})`:"";if(e.channelNameRedacted&&e.channelName)return`${e.channelName}${o}`;let u=e.channelName?.replace(/^#/,"");return r.startsWith("D")?`Direct Message${o}`:r.startsWith("C")?u?`#${u}${o}`:`Public Channel${o}`:r.startsWith("G")?u?.startsWith("mpdm-")?`Group DM${o}`:`Private Channel${o}`:u?`${u}${o}`:r}function se(e){return B(e)?"failed":Z(e)?"active":"idle"}function Pe(e){return K(e)?"active":G(e)?"failed":"idle"}function Fe(e){return e.eventHistory.status==="redacted"?"Transcript hidden because this conversation is not public.":e.eventHistory.status==="expired"?"Transcript expired for this conversation.":se(e)==="active"?"Transcript pending while this conversation is active.":"Transcript unavailable for this conversation."}function $e(e){return`/people/${encodeURIComponent(e)}`}function Ee(e){return`/memories/${encodeURIComponent(e)}`}function Ve(e){return`/system/locations/${encodeURIComponent(e)}`}function Oe(e){return`/system/workspaces/${encodeURIComponent(e)}`}function qe(e,t="overview"){let r=`/automations/${encodeURIComponent(e)}`;return t==="overview"?r:`${r}/${t}`}function $(e){let t=e.trim();if(t)try{return JSON.stringify(JSON.parse(t),null,2)}catch{return}}function E(e){let t=e.trim().split(/\r?\n/).filter(i=>i.trim().length>0);if(t.length<2)return;let r=[];for(let i of t){let o=$(i);if(!o)return;r.push(o)}return r.join(`
|
|
2
|
+
`)}function ae(e){return $(e)??E(e)}function Le(e){let t=e.trim();if(!t)return"markdown";try{return JSON.parse(t),"json"}catch{}return E(t)?"json":"markdown"}function ue(e){return e.map(t=>({activityPreview:t.activityPreview,annotations:t.annotations,sidebarAnnotations:t.sidebarAnnotations,archivedAt:t.archivedAt,pinnedAt:t.pinnedAt,auxiliaryCosts:t.auxiliaryCosts,channel:t.channel,channelName:t.channelName,channelNameRedacted:t.channelNameRedacted,childAgentTotals:t.childAgentTotals,cumulativeDurationMs:t.cumulativeDurationMs,cumulativeUsage:t.cumulativeUsage,displayTitle:t.displayTitle,id:t.conversationId,lastProgressAt:t.lastProgressAt,lastSeenAt:t.lastSeenAt,locationId:t.locationId,locationUrl:t.locationUrl,actorIdentity:t.actorIdentity,participants:t.participants,sentryTraceUrl:t.sentryTraceUrl,startedAt:t.startedAt,status:t.status,surface:t.surface,traceId:t.traceId,isPriority:t.isPriority,unfinishedWork:t.unfinishedWork,visibility:t.visibility})).sort((t,r)=>oe(t.lastSeenAt,r.lastSeenAt))}function ze(e){if(!e)return;let t=ue([e])[0];return t?{...t,displayTitle:e.displayTitle}:void 0}function We(e){return e==null||e===""?"":typeof e=="string"?ae(e)??e:JSON.stringify(e,null,2)??""}export{x as a,de as b,J as c,H as d,v as e,ye as f,Te as g,X as h,he as i,ve as j,Y as k,Ie as l,Ce as m,be as n,R as o,ee as p,Me as q,te as r,xe as s,P as t,Se as u,ne as v,ke as w,F as x,we as y,re as z,Ue as A,ie as B,Ne as C,_e as D,De as E,Ae as F,S as G,Re as H,Pe as I,Fe as J,$e as K,Ee as L,Ve as M,Oe as N,qe as O,ae as P,Le as Q,ue as R,ze as S,We as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,b as a,c as t,e}from"./chunk-XDUSY26N.js";var r=e({email:o().trim().email(),emailVerified:t().optional(),name:o().nullable().optional()}).strict(),p=e({user:r}).strict(),s=168,c=e({autoArchiveDefault:t().optional(),autoArchiveGraceHours:a().int().positive().optional(),user:r.extend({avatarUrl:o().optional(),isAdmin:t()}).strict()}).strict(),b=e({autoArchiveDefault:t().optional(),autoArchiveGraceHours:a().int().min(1).max(s).optional(),displayName:o().trim().min(1).max(80).optional()}).strict().refine(i=>Object.values(i).some(n=>n!==void 0),"Change at least one setting."),d=e({allowedDomainCount:a(),authRequired:t(),authPath:o(),basePath:o(),sentryConversationLinks:t(),version:o().min(1)}).strict(),m=e({config:d,me:c}).strict();export{s as a,c as b,d as c,m as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l}from"./chunk-YPMUHXYT.js";function f(o,i){let e=(i??l(o).getComputedStyle(o)).transform,r=0,n=0,a=1;if(e&&e!=="none"){let s=e.match(/matrix(?:3d)?\(([^)]+)\)/);if(s){let t=s[1].split(", ").map(parseFloat);t.length===6?(r=t[4],n=t[5],a=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(r=t[12],n=t[13],a=t[0])}}return{x:r,y:n,scale:a}}export{f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Rc as n,Sc as s,b as r}from"./chunk-YPMUHXYT.js";import{c as a}from"./chunk-7SZRL6FY.js";var o=a(r(),1);function d(){return(0,o.jsx)("div",{className:"relative grid size-10 shrink-0 select-none place-items-center overflow-visible",children:(0,o.jsx)("img",{alt:"",className:"relative -m-0.5 size-11 max-w-none object-contain opacity-90 drop-shadow-[0_0_7px_rgba(255,255,255,0.16)]",draggable:!1,src:"/_junior/dashboard/avatar.png"})})}var l=["relative","overflow-hidden","bg-white/15","before:absolute","before:inset-0","before:content-['']","before:bg-[linear-gradient(90deg,#ff4d6d,#ffb703,#56f39a,#4cc9f0,#9b5de5,#ff4d6d)]","before:bg-[length:200%_100%]","before:animate-[junior-rainbow-flow_1.2s_linear_infinite]","motion-reduce:before:animate-none"].join(" ");var e=a(r(),1);function g(i){return(0,e.jsx)("div",{className:n(s,"grid min-h-[calc(100dvh-5rem)] place-items-center px-4 py-8 md:px-8"),children:(0,e.jsxs)("section",{className:"grid w-full max-w-lg grid-cols-[auto_minmax(0,1fr)] items-center gap-3 rounded-lg border border-dashboard-border-emphasis bg-dashboard-surface-raised p-4",children:[(0,e.jsx)(d,{}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"font-bold",children:i.label}),(0,e.jsx)("div",{"aria-label":i.label,className:`${l} mt-3 h-1.5 w-full`,role:"progressbar"})]})]})})}export{d as a,g as b};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as u,y as p}from"./chunk-2NNKHSZE.js";import{d as n,i as r,q as s,r as c}from"./chunk-4TQSTCIN.js";import{ha as i,ia as a}from"./chunk-XDUSY26N.js";var m="junior:composer:autocorrect";function C(){return p(m,!1)}function S(e){let v=n();return r({mutationFn:o=>s(i,`/api/conversations/${encodeURIComponent(e)}/auto-archive`,{autoArchive:o}),onSuccess:o=>{v.setQueryData(u(e),t=>t&&{...t,autoArchive:o.autoArchive,detailEtag:void 0})}})}function d(){let e=n();return r({mutationFn:()=>c(a,"/api/conversations/archive-done",{}),onSuccess:async()=>{await e.invalidateQueries({queryKey:["dashboard","conversations"]})}})}export{C as a,S as b,d as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as h,e as V,f as H,g as z,h as _,i as U,j as K,k as L,l as W,m as X,n as Y,o as j,s as q}from"./chunk-G5NWYJTV.js";import{B as O,G as k,H as B,c as E}from"./chunk-WRXMQB7X.js";import{i as w}from"./chunk-B5ZN3SWQ.js";import{b as F}from"./chunk-CR2ICLSH.js";import{Ia as g,Oc as I,Qa as d,Rc as A,S as T,a as y,b as m,cd as M}from"./chunk-YPMUHXYT.js";import{b as Dt,c as r}from"./chunk-7SZRL6FY.js";var at=r(y(),1);var s={};Dt(s,{Backdrop:()=>J,Close:()=>V,Description:()=>H,Handle:()=>Y,Popup:()=>et,Portal:()=>U,Root:()=>ot,Title:()=>W,Trigger:()=>X,Viewport:()=>L,createHandle:()=>j});var G=r(y(),1);var J=G.forwardRef(function(a,p){let{render:S,className:c,style:x,forceRender:l=!1,...u}=a,i=h(),e=i.useState("open"),D=i.useState("nested"),b=i.useState("mounted"),f=i.useState("transitionStatus");return g("div",a,{state:{open:e,transitionStatus:f},ref:[i.context.backdropRef,p],stateAttributesMapping:T,props:[{role:"presentation",hidden:!b,style:{userSelect:"none",WebkitUserSelect:"none"}},u],enabled:l||!D})});var $=r(y(),1);var Q="--nested-dialogs";var tt=r(m(),1),et=$.forwardRef(function(a,p){let{render:S,className:c,style:x,finalFocus:l,initialFocus:u,...i}=a,e=h(),D=e.useState("descriptionElementId"),b=e.useState("disablePointerDismissal"),f=e.useState("floatingRootContext"),R=e.useState("popupProps"),lt=e.useState("modal"),C=e.useState("mounted"),dt=e.useState("nested"),v=e.useState("nestedOpenDialogCount"),P=e.useState("open"),pt=e.useState("openMethod"),mt=e.useState("titleElementId"),ct=e.useState("transitionStatus"),ut=e.useState("role"),ft=f.useState("floatingId");z(),w({open:P,ref:e.context.popupRef,onComplete(){P&&e.context.onOpenChangeComplete?.(!0)}});let gt=u===void 0?B(e.context.popupRef):u,ht=v>0,St=e.useStateSetter("popupElement"),xt=g("div",a,{state:{open:P,nested:dt,transitionStatus:ct,nestedDialogOpen:ht},props:[R,{id:ft,"aria-labelledby":mt,"aria-describedby":D,role:ut,...k,hidden:!C,onKeyDown(N){M.has(N.key)&&N.stopPropagation()},style:{[Q]:v}},i],ref:[p,e.context.popupRef,St],stateAttributesMapping:_});return(0,tt.jsx)(O,{context:f,openInteractionType:pt,disabled:!C,closeOnFocusOut:!b,initialFocus:gt,returnFocus:l,modal:lt!==!1,restoreFocus:"popup",children:xt})});var ot=E(function(a){return K("dialog",a)});var o=r(m(),1);function st({...t}){return(0,o.jsx)(s.Root,{"data-slot":"sheet",...t})}function re({...t}){return(0,o.jsx)(s.Close,{"data-slot":"sheet-close",...t})}function bt({...t}){return(0,o.jsx)(s.Portal,{"data-slot":"sheet-portal",...t})}function Pt({className:t,...a}){return(0,o.jsx)(s.Backdrop,{"data-slot":"sheet-overlay",className:d("fixed inset-0 z-50 bg-dashboard-overlay transition-opacity duration-180 motion-reduce:transition-none data-ending-style:opacity-0 data-starting-style:opacity-0",t),...a})}function rt({className:t,children:a,side:p="right",showCloseButton:S=!0,closeButtonProps:c,...x}){let l=at.useRef(null);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{ref:l,className:"contents"}),(0,o.jsxs)(bt,{container:l,children:[(0,o.jsx)(Pt,{}),(0,o.jsxs)(s.Popup,{"data-slot":"sheet-content","data-dashboard-modal":"","data-side":p,className:d("fixed z-50 flex flex-col gap-4 border-dashboard-border-strong bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition-[opacity,transform] duration-180 ease-[cubic-bezier(0.2,0.8,0.2,1)] motion-reduce:transition-none data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t),...x,children:[a,S&&(0,o.jsxs)(s.Close,{"data-slot":"sheet-close",render:(0,o.jsx)(F,{...c,className:d("absolute top-3 right-3",c?.className),size:"icon"}),children:[(0,o.jsx)(I,{"aria-hidden":"true",size:15,strokeWidth:2.25}),(0,o.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})]})}function it({className:t,...a}){return(0,o.jsx)("div",{"data-slot":"sheet-header",className:d("flex flex-col gap-1 p-4 pr-14",t),...a})}function nt({className:t,...a}){return(0,o.jsx)(s.Title,{"data-slot":"sheet-title",className:d("text-lg font-semibold text-foreground",t),...a})}var n=r(m(),1);function pe(t){let a=q(t.onClose);return(0,n.jsx)(st,{...a.rootProps,children:(0,n.jsxs)(rt,{...a.contentProps,"aria-label":t.label,side:"bottom",className:A("mx-auto w-full max-w-2xl gap-0 rounded-t-2xl outline-none",t.size==="content"?"max-h-[85dvh]":"max-h-full data-[side=bottom]:h-[85dvh]"),children:[(0,n.jsx)(it,{className:"border-b border-dashboard-border",children:(0,n.jsx)(nt,{className:"break-words",children:t.title??t.label})}),(0,n.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain [scrollbar-gutter:stable]",children:t.children})]})})}export{J as a,et as b,s as c,st as d,re as e,rt as f,pe as g};
|