@openchambery/web 1.19.17-beta.2 → 1.19.17-beta.3
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/assets/AgentAvatar-CUDJ3_nZ.js +1 -0
- package/dist/assets/AssistantView-CDXE0eTS.js +3 -0
- package/dist/assets/DiagramView-BrRV4o5T.js +1 -0
- package/dist/assets/FadeInOnReveal-BLSnyG2Z.js +1 -0
- package/dist/assets/Icon-C9ZHbwqp.js +1 -0
- package/dist/assets/MarkdownRenderer-CAdfUgV1.js +2 -0
- package/dist/assets/{MarkdownRendererImpl-BJd1Vjsc.js → MarkdownRendererImpl-D2dIlX0h.js} +2 -2
- package/dist/assets/MarkstreamRendererImpl-Drb2Tpv-.js +3 -0
- package/dist/assets/MobileDetailNavigation-BgCoDqtp.js +1 -0
- package/dist/assets/MobileShareBridge-ZlVURYWR.js +4 -0
- package/dist/assets/MobileSurface-DhLOTW0-.js +2 -0
- package/dist/assets/MultiRunWindow-BCvcwItK.js +1 -0
- package/dist/assets/OnboardingScreen-DSyZtiFS.js +1 -0
- package/dist/assets/OverlayScrollbar-C7fAOAKT.js +2 -0
- package/dist/assets/SettingsView-D57amZJb.js +25 -0
- package/dist/assets/SettingsWindow-B5DqLCkD.js +1 -0
- package/dist/assets/TerminalView-2_RFPaVs.js +8 -0
- package/dist/assets/{ToolOutputDialog-BQ_oXyS_.js → ToolOutputDialog-CQs_7KYT.js} +4 -4
- package/dist/assets/{appThemeRegistry-BDrIDWKH.js → appThemeRegistry-DpLe_jnW.js} +1 -1
- package/dist/assets/button-bhVnVYB_.js +1 -0
- package/dist/assets/collapsible-CoWJB_Zl.js +1 -0
- package/dist/assets/context-menu-gSO0b3sQ.js +1 -0
- package/dist/assets/diagram-Dx4UOZUn.js +1 -0
- package/dist/assets/dialog-C2Dw0yqA.js +1 -0
- package/dist/assets/{es-BQb6I8gl.js → es-Bxd4Lyu9.js} +2 -2
- package/dist/assets/{fileMentionTouchSelection-DzdgAvGS.js → fileMentionTouchSelection-CmQthb6Q.js} +2 -2
- package/dist/assets/{fr-BjGouC_l.js → fr-DiLDwVZs.js} +2 -2
- package/dist/assets/{gitApi-pLkl_IyQ.js → gitApi-8HxdR1zx.js} +3 -3
- package/dist/assets/input-8Te_vPwB.js +1 -0
- package/dist/assets/insertionBoundaries-Cdv9-1Bg.js +1 -0
- package/dist/assets/{ja-Cw9zliYY.js → ja-CWRlmEJM.js} +2 -2
- package/dist/assets/{ko-Dyz0Dk9b.js → ko-DmIugkgj.js} +2 -2
- package/dist/assets/main-CQY7JUX4.js +169 -0
- package/dist/assets/main-Cfru2-qr.js +2 -0
- package/dist/assets/{markdownHeightCache-BL8CUQ0M.js → markdownHeightCache-CT2d4yTV.js} +1 -1
- package/dist/assets/miniChat-BphFgAb_.js +2 -0
- package/dist/assets/mobile-BVRPTuLT.js +2 -0
- package/dist/assets/multirun-CYdieVzW.js +4 -0
- package/dist/assets/{pl-C7EY-dTH.js → pl-BU9AmdUM.js} +2 -2
- package/dist/assets/projectMeta-D8hiy3Dk.js +3 -0
- package/dist/assets/{pt-BR-B1uHpjFW.js → pt-BR-DQmEF9QB.js} +2 -2
- package/dist/assets/renderElectronMiniChatApp-CVqd3Nmc.js +2 -0
- package/dist/assets/renderMobileApp-DgtCGRKP.js +28 -0
- package/dist/assets/{runtimeConfig-BD1Fo5N5.js → runtimeConfig-DXXOBrK_.js} +1 -1
- package/dist/assets/runtimeEndpointReset-bSVOt7pi.js +147 -0
- package/dist/assets/sessionChangeSummary-CfnRZ0gS.js +2 -0
- package/dist/assets/sessionLookup-BZuujM6l.js +1 -0
- package/dist/assets/sortable-tabs-strip-BmvLnn6O.js +1 -0
- package/dist/assets/src-C_Yn9Ylz.css +2 -0
- package/dist/assets/{store-ClnJdJSj.js → store-BoixGrYS.js} +3 -3
- package/dist/assets/textarea-DRL916s6.js +1 -0
- package/dist/assets/tooltip-BLznq5KR.js +1 -0
- package/dist/assets/{uk-DgG8v2md.js → uk-Dax66sAC.js} +2 -2
- package/dist/assets/{useAppFontEffects-CN_3Jty7.js → useAppFontEffects-DhEfjuPp.js} +43 -43
- package/dist/assets/useDesktopWindowControlsLayout-BhNFU2Wd.js +1 -0
- package/dist/assets/{useEffectiveDirectory-C5Gg7EvP.js → useEffectiveDirectory-BhhzFJgX.js} +1 -1
- package/dist/assets/useMobileNavigationStore-1jdHeA49.js +413 -0
- package/dist/assets/useSessionAutoCleanup-C8u2-jrO.js +2 -0
- package/dist/assets/{useWorkerHighlightedLines-BSQQkZaO.js → useWorkerHighlightedLines-DFXK66lA.js} +2 -2
- package/dist/assets/vendor-zod-Dzk5kdUU.js +39 -0
- package/dist/assets/{zh-CN-C6OFKjeT.js → zh-CN-Du4VC8Z0.js} +2 -2
- package/dist/assets/{zh-TW-BVP99aMr.js → zh-TW-C0bY-Dso.js} +2 -2
- package/dist/index.html +3 -3
- package/dist/mini-chat.html +3 -3
- package/dist/mobile.html +3 -3
- package/package.json +1 -1
- package/server/index.js +51 -0
- package/server/lib/opencode/DOCUMENTATION.md +1 -0
- package/server/lib/opencode/core-routes.js +2 -0
- package/server/lib/opencode/feature-routes-runtime.js +20 -0
- package/server/lib/opencode/feature-routes-runtime.test.js +10 -0
- package/server/lib/opencode/routes.js +14 -1
- package/server/lib/opencode/settings-helpers.js +3 -0
- package/server/lib/opencode/settings-helpers.test.js +12 -0
- package/server/lib/opencode/shutdown-runtime.js +2 -0
- package/server/lib/question-auto-delegate/DOCUMENTATION.md +124 -0
- package/server/lib/question-auto-delegate/core.d.ts +255 -0
- package/server/lib/question-auto-delegate/core.js +1372 -0
- package/server/lib/question-auto-delegate/core.test.js +672 -0
- package/server/lib/question-auto-delegate/routes.js +223 -0
- package/server/lib/question-auto-delegate/routes.test.js +180 -0
- package/server/lib/question-auto-delegate/runtime.js +243 -0
- package/server/lib/session-goal/DOCUMENTATION.md +12 -2
- package/server/lib/session-goal/runtime.js +138 -35
- package/server/lib/session-goal/runtime.test.js +192 -0
- package/dist/assets/AgentAvatar-m1jNq4bX.js +0 -1
- package/dist/assets/AssistantView-DZMTfY1i.js +0 -3
- package/dist/assets/DiagramView-Byf2evGV.js +0 -1
- package/dist/assets/FadeInOnReveal-UGwClbL_.js +0 -1
- package/dist/assets/Icon-D1BcR8Tz.js +0 -1
- package/dist/assets/MarkdownRenderer-YMePGw0Z.js +0 -2
- package/dist/assets/MarkstreamRendererImpl-2oZKPfgd.js +0 -3
- package/dist/assets/MobileDetailNavigation-BeNUCxzK.js +0 -1
- package/dist/assets/MobileShareBridge-3tBtXXJJ.js +0 -4
- package/dist/assets/MobileSurface-ppn0zIpb.js +0 -2
- package/dist/assets/MultiRunWindow-CItY5bZ2.js +0 -1
- package/dist/assets/OnboardingScreen-bIWeMLVx.js +0 -1
- package/dist/assets/OverlayScrollbar-Bahg_P3r.js +0 -2
- package/dist/assets/SettingsView-0-Yqdzh-.js +0 -25
- package/dist/assets/SettingsWindow-1jOWzU2A.js +0 -1
- package/dist/assets/TerminalView-BLOCPFz9.js +0 -8
- package/dist/assets/button-9R-WgVMl.js +0 -1
- package/dist/assets/clipboard-GUUNlWIv.js +0 -1
- package/dist/assets/collapsible-Bbz9KiJf.js +0 -1
- package/dist/assets/context-menu-CSyOhRz8.js +0 -1
- package/dist/assets/diagram-NdsZih8P.js +0 -1
- package/dist/assets/dialog-DhMGbF_B.js +0 -1
- package/dist/assets/input-Cd_1HyQv.js +0 -1
- package/dist/assets/insertionBoundaries-DJvMDCJJ.js +0 -1
- package/dist/assets/main-B8fZfA3K.js +0 -169
- package/dist/assets/main-BGpPyUV2.js +0 -2
- package/dist/assets/miniChat-DHjphqgR.js +0 -2
- package/dist/assets/mobile-DNMX4u7x.js +0 -2
- package/dist/assets/multirun-BINJ2LCE.js +0 -4
- package/dist/assets/projectMeta-BMkGWqtz.js +0 -3
- package/dist/assets/renderElectronMiniChatApp-BonR3p7C.js +0 -2
- package/dist/assets/renderMobileApp-CZqNs2zK.js +0 -28
- package/dist/assets/runtimeEndpointReset-Dpx6GB_U.js +0 -147
- package/dist/assets/sessionChangeSummary-BG7l2heP.js +0 -2
- package/dist/assets/sessionLookup-BZuvc3Aa.js +0 -1
- package/dist/assets/sortable-tabs-strip-dYW6SH62.js +0 -1
- package/dist/assets/src-CO9q_82J.css +0 -2
- package/dist/assets/textarea-B9CmN13Z.js +0 -1
- package/dist/assets/tooltip-DSjr26A_.js +0 -1
- package/dist/assets/useDesktopWindowControlsLayout-C6kAkizT.js +0 -1
- package/dist/assets/useMobileNavigationStore-DDgESrzu.js +0 -413
- package/dist/assets/useSessionAutoCleanup-q2lauc7x.js +0 -2
- package/dist/assets/utils-2ZK8yboQ.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime-C0FnF6B9.js";import{nt as e,rt as t}from"./vendor-base-ui-CnHfUmDN.js";import{n}from"./vendor-react-DLPElpoQ.js";import{r}from"./button-bhVnVYB_.js";import{c as i,l as a}from"./dialog-C2Dw0yqA.js";var o=n();t();var s=e(),c=e=>{let t=(0,o.c)(32),{name:n,emoji:c,size:u,shape:d,className:f,label:p}=e,m=u===void 0?16:u,h=d===void 0?`rounded`:d,g,_,v;if(t[0]!==f||t[1]!==c||t[2]!==n||t[3]!==h){g=a(n);let e;t[7]===n?e=t[8]:(e=i(n),t[7]=n,t[8]=e),_=e,v=r(`inline-flex aspect-square shrink-0 overflow-hidden`,h===`circle`?`rounded-full`:`rounded-sm`,c&&`items-center justify-center select-none`,g.class,f),t[0]=f,t[1]=c,t[2]=n,t[3]=h,t[4]=g,t[5]=_,t[6]=v}else g=t[4],_=t[5],v=t[6];let y=`calc(${m}px * var(--dpt-n, 1))`,b=`calc(${m}px * var(--dpt-n, 1))`,x=`calc(${m}px * var(--dpt-n, 1))`,S=`calc(${m}px * var(--dpt-n, 1))`,C=`calc(${m}px * var(--dpt-n, 1))`,w=`calc(${m}px * var(--dpt-n, 1))`,T=`var(${g.var})`,E;t[9]===c?E=t[10]:(E=c?{display:`inline-flex`,alignItems:`center`,justifyContent:`center`}:null,t[9]=c,t[10]=E);let D;t[11]!==T||t[12]!==E||t[13]!==y||t[14]!==b||t[15]!==x||t[16]!==S||t[17]!==C||t[18]!==w?(D={width:y,minWidth:b,maxWidth:x,height:S,minHeight:C,maxHeight:w,color:T,...E},t[11]=T,t[12]=E,t[13]=y,t[14]=b,t[15]=x,t[16]=S,t[17]=C,t[18]=w,t[19]=D):D=t[19];let O=p?`img`:void 0,k=!p||void 0,A;t[20]!==c||t[21]!==_||t[22]!==m?(A=c?(0,s.jsx)(`span`,{"aria-hidden":`true`,className:`flex h-full w-full items-center justify-center leading-none`,style:{fontSize:`calc(${m*.75}px * var(--dpt-n, 1))`,lineHeight:1,transform:`translateY(0.06em)`},children:c}):(0,s.jsxs)(`svg`,{width:m,height:m,viewBox:`0 0 5 5`,shapeRendering:`crispEdges`,className:`oc-agent-avatar block h-full w-full`,"aria-hidden":`true`,children:[(0,s.jsx)(`rect`,{width:`5`,height:`5`,fill:`currentColor`,opacity:.14}),_.map(l)]}),t[20]=c,t[21]=_,t[22]=m,t[23]=A):A=t[23];let j;return t[24]!==p||t[25]!==h||t[26]!==D||t[27]!==O||t[28]!==k||t[29]!==A||t[30]!==v?(j=(0,s.jsx)(`span`,{className:v,style:D,"data-agent-avatar":``,"data-agent-avatar-shape":h,role:O,"aria-label":p,"aria-hidden":k,children:A}),t[24]=p,t[25]=h,t[26]=D,t[27]=O,t[28]=k,t[29]=A,t[30]=v,t[31]=j):j=t[31],j};function l(e,t){return e.map((e,n)=>e?(0,s.jsx)(`rect`,{x:n,y:t,width:`1`,height:`1`,fill:`currentColor`},`${n}-${t}`):null)}export{c as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ToolOutputDialog-CQs_7KYT.js","assets/rolldown-runtime-C0FnF6B9.js","assets/runtime-fetch-zIalUnbb.js","assets/runtime-auth-D66yq6ie.js","assets/runtime-switch-LvWDU-SL.js","assets/vendor-base-ui-CnHfUmDN.js","assets/useUIStore-CxOoCv7B.js","assets/vendor-zustand-B4dlGEM2.js","assets/vendor-react-DLPElpoQ.js","assets/vendor-pierre-diffs-DX7XTPG3.js","assets/vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js","assets/vendor-hast-util-to-html-B0p1k5Xa.js","assets/vendor-character-entities-legacy-Wut6vMuj.js","assets/vendor-character-entities-html4-DlN_yAFd.js","assets/vendor-ccount-CyGsA0u7.js","assets/vendor-comma-separated-tokens-B9ouxNNS.js","assets/vendor-oniguruma-to-es-CrHzjjSU.js","assets/vendor-oniguruma-parser-D2DIvhSP.js","assets/vendor-diff-Dq7CZNim.js","assets/vendor-lru_map-DpDied8H.js","assets/vendor-reactuses-core-BnW6GxJt.js","assets/vendor-lodash-es-DfLbG5Af.js","assets/vendor-js-cookie-hSOiFTtX.js","assets/button-bhVnVYB_.js","assets/persistence-DwRBC4zl.js","assets/vendor-pathe-vBmvQE8f.js","assets/vendor-tanstack-query-core-BWz0ose6.js","assets/store-BoixGrYS.js","assets/vendor-class-variance-authority-BLUaYARZ.js","assets/vendor-tailwind-merge-BicNWLTg.js","assets/dialog-C2Dw0yqA.js","assets/Icon-C9ZHbwqp.js","assets/useThemeSystem-DMzWVJaW.js","assets/markdownTheme-DOfGg-A7.js","assets/appThemeRegistry-DpLe_jnW.js","assets/platform-DQ5_LNKO.js","assets/vendor-opencode-sdk-C07HQypa.js","assets/useMobileNavigationStore-1jdHeA49.js","assets/vendor-tanstack-react-query-D7pys_c9.js","assets/vendor-sonner-DVzioF3d.js","assets/useAssistantUIStore-CLPCNoj_.js","assets/vendor-zod-Dzk5kdUU.js","assets/vendor-fuse.js-DB5wDJbI.js","assets/MarkdownRenderer-CAdfUgV1.js","assets/markdownHeightCache-CT2d4yTV.js","assets/dualLimitLru-D8Sphgua.js","assets/markdown-worker-CptoICmq.js","assets/useEffectiveDirectory-BhhzFJgX.js","assets/imageSource-BlAJJUEI.js","assets/relay-image-stream-DM7atqJs.js","assets/useWorkerHighlightedLines-DFXK66lA.js","assets/tooltip-BLznq5KR.js","assets/vendor-tanstack-react-virtual-tlDgH6PG.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{o as e,r as t}from"./rolldown-runtime-C0FnF6B9.js";import{c as n,i as r,n as i}from"./runtime-switch-LvWDU-SL.js";import{B as a,J as o,V as s,W as c,Y as l,Z as u,nt as d,q as f,ut as p}from"./persistence-DwRBC4zl.js";import{a as m}from"./vendor-zustand-B4dlGEM2.js";import{nt as h,rt as g}from"./vendor-base-ui-CnHfUmDN.js";import{n as _,r as v}from"./platform-DQ5_LNKO.js";import{t as y}from"./useUIStore-CxOoCv7B.js";import{o as b}from"./vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js";import{n as x}from"./vendor-react-DLPElpoQ.js";import{s as S}from"./vendor-tanstack-react-query-D7pys_c9.js";import{r as C}from"./vendor-sonner-DVzioF3d.js";import{a as w,d as ee,i as T,n as E,r as D,u as O}from"./vendor-reactuses-core-BnW6GxJt.js";import{f as k,r as A,t as j}from"./button-bhVnVYB_.js";import{a as M,n as N}from"./MobileShareBridge-ZlVURYWR.js";import{C as P,_ as F,a as I,f as L,g as R,j as z,k as B,l as V,n as H,r as te,s as ne,t as U,u as re,y as ie}from"./MobileDetailNavigation-BgCoDqtp.js";import{Kt as ae,Po as oe,_n as se,gr as ce,hr as le,ot as ue,r as W}from"./useMobileNavigationStore-1jdHeA49.js";import{i as G,n as K,r as de}from"./useAssistantUIStore-CLPCNoj_.js";import{a as q,i as J,n as Y,o as X,r as fe,t as pe}from"./dialog-C2Dw0yqA.js";import{t as me}from"./AgentAvatar-CUDJ3_nZ.js";import{n as Z}from"./Icon-C9ZHbwqp.js";import{i as he}from"./OverlayScrollbar-C7fAOAKT.js";import{a as ge,n as _e,r as ve,t as ye}from"./fileMentionTouchSelection-CmQthb6Q.js";import{o as be,t as xe}from"./MarkdownRenderer-CAdfUgV1.js";import{n as Se}from"./textarea-DRL916s6.js";import{c as Ce,s as we}from"./imageSource-BlAJJUEI.js";import{D as Te,S as Ee,T as De,a as Oe,c as ke,d as Ae,f as je,i as Me,l as Ne,m as Pe,n as Fe,o as Ie,p as Le,r as Re,t as ze,u as Be}from"./sessionChangeSummary-CfnRZ0gS.js";import{a as Ve,t as He}from"./sessionLookup-BZuujM6l.js";import{a as Ue,i as We,n as Ge,r as Ke,t as qe}from"./context-menu-gSO0b3sQ.js";import{i as Je,n as Ye,r as Xe}from"./assistant-attachment-cache-C0aRnFkj.js";var Ze=x();function Qe(e){return[...e].sort((e,t)=>{let n=e.latestMessagePreview?.createdAt??-1/0,r=t.latestMessagePreview?.createdAt??-1/0;return n===r?0:r-n})}var Q=e(g(),1),$=h();function $e({snapshot:e,rowClassName:t}){let{t:n}=k(),[r,i]=Q.useState(!1),a=Q.useRef(!1),o=E(async()=>{if(!a.current){a.current=!0,i(!0);try{(await V(e)).failed&&C.error(n(`assistants.unread.markAllFailed`))}catch{C.error(n(`assistants.unread.markAllFailed`))}finally{a.current=!1,i(!1)}}});return e.assistants.some(e=>(e.unreadCount??0)>0)?(0,$.jsx)(`div`,{className:t,children:(0,$.jsx)(j,{type:`button`,variant:`ghost`,size:`xs`,onClick:o,className:`max-w-full whitespace-normal text-right`,disabled:r||!e.assistants.some(e=>(e.unreadCount??0)>0&&e.readTip),"aria-busy":r,children:n(`assistants.unread.markAll`)})}):null}var et=e=>{let t=(0,Ze.c)(17),{name:n,emoji:r,size:i,label:a,working:o,className:s}=e,c=i===void 0?24:i,l=o!==void 0&&o,{t:u}=k(),d=`calc(${c}px * var(--dpt-n, 1))`,f;t[0]===s?f=t[1]:(f=A(`relative inline-block shrink-0 align-middle leading-none`,s),t[0]=s,t[1]=f);let p;t[2]===d?p=t[3]:(p={width:d,height:d},t[2]=d,t[3]=p);let m;t[4]!==r||t[5]!==a||t[6]!==n||t[7]!==c?(m=(0,$.jsx)(me,{name:n,emoji:r,size:c,label:a,shape:`circle`}),t[4]=r,t[5]=a,t[6]=n,t[7]=c,t[8]=m):m=t[8];let h;t[9]!==u||t[10]!==l?(h=l?(0,$.jsx)(`span`,{className:`pointer-events-none absolute right-0 bottom-0 size-2.5 translate-x-0.5 translate-y-0.5 rounded-full bg-[var(--status-success)] ring-2 ring-background`,"data-assistant-working-dot":``,"aria-label":u(`assistants.contact.working`)}):null,t[9]=u,t[10]=l,t[11]=h):h=t[11];let g;return t[12]!==f||t[13]!==p||t[14]!==m||t[15]!==h?(g=(0,$.jsxs)(`span`,{className:f,style:p,"data-assistant-working-avatar":``,children:[m,h]}),t[12]=f,t[13]=p,t[14]=m,t[15]=h,t[16]=g):g=t[16],g},tt=m(e=>({workingByID:{},setWorking:(t,n)=>e(e=>({workingByID:{...e.workingByID,[t]:n}}))})),nt=({sending:e=!1,processing:t=!1,serverWorking:n=!1})=>e||t||n,rt=(e,t)=>{let n=(0,Ze.c)(5),r=t!==void 0&&t,i;n[0]===e?i=n[1]:(i=t=>!!t.workingByID[e],n[0]=e,n[1]=i);let a=tt(i),o;return n[2]!==a||n[3]!==r?(o=nt({processing:a,serverWorking:r}),n[2]=a,n[3]=r,n[4]=o):o=n[4],o};function it(e){let t=(0,Ze.c)(12),{assistantID:n,position:a}=e,o=Q.useRef(null),s=Q.useRef(!1),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={busy:!1,done:!1,retryAt:0},t[0]=c):c=t[0];let l=Q.useRef(c),[u]=Q.useState(ut),d;t[1]!==n||t[2]!==a||t[3]!==u?(d=()=>{let e=o.current;if(!e||!s.current||l.current.busy||l.current.done||Date.now()<l.current.retryAt||u.transport!==r()||u.generation!==i()||document.visibilityState!==`visible`||(_()?!document.documentElement.classList.contains(`oc-native-app-active`):!document.hasFocus())||e.parentElement?.closest(`[inert], [aria-hidden="true"]`))return;let t=e.closest(`[data-assistant-contact-transcript]`);if(!t||t.scrollHeight-t.scrollTop-t.clientHeight>2)return;let c=e.getBoundingClientRect(),d=t.getBoundingClientRect(),f=window.visualViewport,p=f?.offsetTop??0,m=p+(f?.height??window.innerHeight);c.height<=0||c.width<=0||c.bottom>Math.min(d.bottom,m)||c.top<Math.max(d.top,p)||c.right<=Math.max(d.left,0)||c.left>=Math.min(d.right,window.innerWidth)||(l.current.busy=!0,re(n,a).then(()=>{l.current.done=!0}).catch(()=>{l.current.retryAt=Date.now()+15e3}).finally(()=>{l.current.busy=!1}))},t[1]=n,t[2]=a,t[3]=u,t[4]=d):d=t[4];let f=E(d),p;t[5]===f?p=t[6]:(p=e=>{s.current=e.some(lt),f()},t[5]=f,t[6]=p);let m;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(m={threshold:1},t[7]=m):m=t[7],T(o,E(p),m),D(`visibilitychange`,f,ct),D(`focus`,f,st),D(`resize`,f,ot);let h,g;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>o.current?.closest(`[data-assistant-contact-transcript]`),g={passive:!0},t[8]=h,t[9]=g):(h=t[8],g=t[9]),D(`scroll`,f,h,g);let v;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(v={attributes:!0,attributeFilter:[`class`]},t[10]=v):v=t[10],O(f,at,v),w(f,15e3);let y;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(`span`,{ref:o,"aria-hidden":`true`,className:`block h-px w-px shrink-0`,"data-assistant-read-marker":``}),t[11]=y):y=t[11],y}function at(){return document.documentElement}function ot(){return window.visualViewport}function st(){return window}function ct(){return document}function lt(e){return e.isIntersecting&&e.intersectionRatio===1}function ut(){return{transport:r(),generation:i()}}var dt=e=>e?.directories.flatMap(({directory:e,sessions:t})=>e?t.filter(e=>!e.time.archived).map(t=>({...t,directory:e})):[])??null,ft=Q.forwardRef(({query:e,isMobile:t,listId:n,onHighlightChange:r,onSelect:i,onClose:a},o)=>{let{t:s}=k(),c=Ce(),l=S({...ce(c),select:dt}),u=Q.useMemo(()=>ue({sessions:l.data??[],currentSessionId:null,searchQuery:e}),[l.data,e]),[d,f]=Q.useState({query:e,index:0}),p=Math.min(d.query===e?d.index:0,Math.max(0,u.length-1)),m=Q.useRef(null),h=Q.useRef([]),g=Q.useMemo(ye,[]);D(`pointerdown`,e=>{e.target instanceof Node&&!m.current?.contains(e.target)&&a()},void 0,{capture:!0}),Q.useLayoutEffect(()=>{h.current[p]?.scrollIntoView?.({block:`nearest`})},[p]),Q.useLayoutEffect(()=>{r(u.length?`${n}-${p}`:void 0)},[p,n,u.length,r]);let _=E(t=>{if(t===`Escape`){a();return}u.length&&(t===`ArrowDown`&&f({query:e,index:(p+1)%u.length}),t===`ArrowUp`&&f({query:e,index:(p-1+u.length)%u.length}),(t===`Enter`||t===`Tab`)&&i(u[p]))});return Q.useImperativeHandle(o,()=>({keyDown:_}),[_]),(0,$.jsxs)(_e,{ref:m,isMobile:t,className:`max-w-[640px] max-h-64`,children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 px-3 py-1`,children:[(0,$.jsx)(`span`,{className:`min-w-0 flex-1 text-[length:calc(var(--text-meta)*0.875)] leading-4 text-muted-foreground`,children:s(`assistants.contact.sessionMention.scope`)}),(0,$.jsx)(j,{type:`button`,size:`xs`,variant:`ghost`,"aria-label":s(`dialog.common.actions.close`),onClick:a,children:(0,$.jsx)(Z,{name:`close`,className:`size-4`})})]}),l.isPending?(0,$.jsx)(`p`,{role:`status`,className:`px-3 py-2 typography-meta text-muted-foreground`,children:s(`common.loading`)}):null,l.isError?(0,$.jsxs)(`div`,{role:`alert`,className:`px-3 py-2 typography-meta text-[var(--status-error)]`,children:[s(`assistants.contact.sessionMention.loadFailed`),(0,$.jsx)(j,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>void l.refetch(),children:s(`chat.history.retry`)})]}):null,l.isSuccess&&!u.length?(0,$.jsx)(`p`,{role:`status`,className:`px-3 py-2 typography-meta text-muted-foreground`,children:s(l.data===null?`common.unavailable`:`sessions.sidebar.empty.noMatches.title`)}):null,(0,$.jsx)(Se,{preventOverscroll:!0,outerClassName:`flex-1 min-h-0`,className:`px-0`,children:(0,$.jsx)(`div`,{id:n,role:`listbox`,"aria-label":s(`chat.fileMentionAutocomplete.groups.sessions`),className:`p-1.5`,children:u.map((r,a)=>(0,$.jsxs)(`div`,{id:`${n}-${a}`,role:`option`,"aria-selected":a===p,ref:e=>{h.current[a]=e},className:A(`flex min-h-10 cursor-pointer items-center gap-2 rounded-md px-1.5 py-1 typography-ui-label`,ve(t,a===p)),onMouseDown:e=>e.preventDefault(),onMouseMove:()=>f({query:e,index:a}),onPointerDown:e=>{e.pointerType===`touch`&&g.pointerDown(e.clientX,e.clientY)},onPointerMove:e=>{e.pointerType===`touch`&&g.pointerMove(e.clientX,e.clientY)},onPointerUp:e=>{e.pointerType===`touch`&&g.pointerUp(()=>i(r))&&(e.preventDefault(),e.stopPropagation())},onPointerCancel:()=>g.pointerCancel(),onClick:()=>g.click(()=>i(r)),children:[(0,$.jsx)(Z,{name:`chat-thread`,className:`size-4 shrink-0 text-muted-foreground`}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`div`,{className:`truncate font-medium leading-5`,title:r.title,children:r.title||s(`chat.fileMentionAutocomplete.untitledSession`)}),(0,$.jsx)(`div`,{className:`truncate text-[length:calc(var(--text-meta)*0.875)] leading-4 text-muted-foreground`,title:r.directory,children:r.directory})]})]},`${r.directory}:${r.id}`))})}),t?null:(0,$.jsx)(`div`,{className:`mx-1.5 shrink-0 border-t px-1.5 py-1 text-[length:calc(var(--text-meta)*0.875)] leading-4 text-muted-foreground`,children:s(`chat.autocomplete.keyboardHint`)})]})}),pt=e=>{let t=(0,Ze.c)(87),n,r,i,u;t[0]===e?(n=t[1],r=t[2],i=t[3],u=t[4]):({active:n,working:u,onChange:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=u);let d=u!==void 0&&u,{t:m}=k(),h;t[5]===i.value?h=t[6]:(h=()=>({canonical:i.value,document:c(i.value,new Map)}),t[5]=i.value,t[6]=h);let[g,_]=Q.useState(h),v;t[7]!==g.canonical||t[8]!==g.document||t[9]!==i.value?(v=g.canonical===i.value?g.document:c(i.value,new Map),t[7]=g.canonical,t[8]=g.document,t[9]=i.value,t[10]=v):v=t[10];let y=v,[b,x]=Q.useState(0),[S,C]=Q.useState(!0),[w,ee]=Q.useState(!1),[T,D]=Q.useState(),O=Q.useRef(null),j=Q.useRef(null),M=Q.useRef(null),N=Q.useRef(null),P;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(P=Ne(),t[11]=P):P=t[11];let F=Q.useRef(P),I=Q.useId(),L;t[12]!==n||t[13]!==w||t[14]!==b||t[15]!==S||t[16]!==y.text||t[17]!==i.disabled||t[18]!==i.pending?(L=n&&!i.pending&&!i.disabled&&!S&&!w?ge({text:y.text,cursor:b}):null,t[12]=n,t[13]=w,t[14]=b,t[15]=S,t[16]=y.text,t[17]=i.disabled,t[18]=i.pending,t[19]=L):L=t[19];let R=L,z=R?.kind===`mention`?R:null,B;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(B=()=>{N.current!==null&&(O.current?.focus({preventScroll:!0}),O.current?.setSelectionRange(N.current,N.current),N.current=null)},t[20]=B):B=t[20];let V;t[21]===y?V=t[22]:(V=[y],t[21]=y,t[22]=V),Q.useLayoutEffect(B,V);let H;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(H=()=>C(!0),t[23]=H):H=t[23];let te=E(H),ne;t[24]!==w||t[25]!==b||t[26]!==y||t[27]!==r?(ne=(e,t,n)=>{let i=n===void 0||n,a=l(e);a.ok&&(i&&(F.current=Be(F.current,{before:ke(y,[],{start:O.current?.selectionStart??b,end:O.current?.selectionEnd??b}),after:ke(e,[],{start:t,end:t})})),w||(N.current=t),x(t),_({canonical:a.text,document:e}),r(a.text))},t[24]=w,t[25]=b,t[26]=y,t[27]=r,t[28]=ne):ne=t[28];let U=E(ne),re;t[29]!==U||t[30]!==y||t[31]!==z||t[32]!==m?(re=e=>{if(!z)return;let t=e.title||m(`chat.fileMentionAutocomplete.untitledSession`),n=s(y,z.tokenStart,z.tokenEnd,{id:`session:${e.id}:${crypto.randomUUID()}`,kind:`session`,sessionId:e.id,display:p({trigger:`@`,icon:`chat-thread`,label:t})},{inlineBoundaries:!0,padDocumentEdges:!0}),r=n.caret+ +(n.document.text[n.caret]===` `);C(!0),U(n.document,r)},t[29]=U,t[30]=y,t[31]=z,t[32]=m,t[33]=re):re=t[33];let ie=E(re),ae;t[34]!==U||t[35]!==y?(ae=(e,t)=>{let n=e.currentTarget;if(n.selectionStart===n.selectionEnd||!e.clipboardData||!y.references.some(e=>e.start<n.selectionEnd&&e.end>n.selectionStart))return;let r=a(n.selectionStart,n.selectionEnd,y.references)??{start:n.selectionStart,end:n.selectionEnd},i=l({text:y.text.slice(r.start,r.end),references:y.references.filter(e=>e.start>=r.start&&e.end<=r.end).map(e=>({...e,start:e.start-r.start,end:e.end-r.start}))});if(i.ok&&(e.preventDefault(),e.clipboardData.setData(`text/plain`,i.text),t)){let e=f(y,y.text.slice(0,r.start)+y.text.slice(r.end),r.start,r.start);U(e.document,e.caret)}},t[34]=U,t[35]=y,t[36]=ae):ae=t[36];let oe=E(ae),se;t[37]!==y.references||t[38]!==y.text?(se=Pe(y.text,y.references.map(mt))?.map(ht),t[37]=y.references,t[38]=y.text,t[39]=se):se=t[39];let ce=se,le=y.text,ue=i.pending||d,W=i.pending===!0,G=i.layout===`inline`?`py-3 leading-6`:`pt-4 pb-2`,K;t[40]!==i.textLayoutClassName||t[41]!==G?(K=A(`whitespace-pre-wrap break-words overflow-hidden px-3 typography-markdown md:typography-ui-label`,G,i.textLayoutClassName),t[40]=i.textLayoutClassName,t[41]=G,t[42]=K):K=t[42];let de;t[43]!==U||t[44]!==y?(de=(e,t)=>{let n=f(y,e,t?.target.selectionStart??e.length,t?.target.selectionEnd??e.length);U(n.document,n.caret),C(t?.nativeEvent?.inputType===`insertFromPaste`)},t[43]=U,t[44]=y,t[45]=de):de=t[45];let q=z?I:void 0,J=z?T:void 0,Y;t[46]===i.textareaProps?Y=t[47]:(Y=e=>{i.textareaProps?.onScroll?.(e),j.current&&(j.current.scrollTop=e.currentTarget.scrollTop,j.current.scrollLeft=e.currentTarget.scrollLeft)},t[46]=i.textareaProps,t[47]=Y);let X,fe;t[48]!==oe||t[49]!==i.textareaProps?(X=e=>{i.textareaProps?.onCopy?.(e),e.defaultPrevented||oe(e,!1)},fe=e=>{i.textareaProps?.onCut?.(e),e.defaultPrevented||oe(e,!0)},t[48]=oe,t[49]=i.textareaProps,t[50]=X,t[51]=fe):(X=t[50],fe=t[51]);let pe;t[52]===i.textareaProps?pe=t[53]:(pe=e=>{x(e.currentTarget.selectionStart),i.textareaProps?.onSelect?.(e)},t[52]=i.textareaProps,t[53]=pe);let me,Z;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(me=()=>{ee(!0)},Z=e=>{ee(!1),x(e.currentTarget.selectionStart)},t[54]=me,t[55]=Z):(me=t[54],Z=t[55]);let he;t[56]!==U||t[57]!==w||t[58]!==y||t[59]!==z||t[60]!==i.textareaProps?(he=e=>{if(i.textareaProps?.onKeyDown?.(e),!(e.defaultPrevented||De(e))){if(w){e.key===`Enter`&&e.preventDefault();return}if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`z`){let t=e.shiftKey?Ae(F.current,y):je(F.current,y);t&&(e.preventDefault(),F.current=t.history,U(t.snapshot.document,t.snapshot.selection.end,!1),C(!0));return}if(e.key===`Backspace`||e.key===`Delete`){let t=o(y,{key:e.key,selectionStart:e.currentTarget.selectionStart,selectionEnd:e.currentTarget.selectionEnd,altKey:e.altKey});if(t){e.preventDefault(),U(t.document,t.caret),C(!0);return}}z&&[`ArrowDown`,`ArrowUp`,`Enter`,`Tab`,`Escape`].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),M.current?.keyDown(e.key))}},t[56]=U,t[57]=w,t[58]=y,t[59]=z,t[60]=i.textareaProps,t[61]=he):he=t[61];let _e;t[62]!==i.textareaProps||t[63]!==q||t[64]!==J||t[65]!==Y||t[66]!==X||t[67]!==fe||t[68]!==pe||t[69]!==he?(_e={...i.textareaProps,"aria-controls":q,"aria-activedescendant":J,"aria-autocomplete":`list`,onScroll:Y,onCopy:X,onCut:fe,onSelect:pe,onCompositionStart:me,onCompositionEnd:Z,onKeyDown:he},t[62]=i.textareaProps,t[63]=q,t[64]=J,t[65]=Y,t[66]=X,t[67]=fe,t[68]=pe,t[69]=he,t[70]=_e):_e=t[70];let ve;t[71]!==te||t[72]!==I||t[73]!==z||t[74]!==i.isMobile||t[75]!==ie?(ve=z?(0,$.jsx)(ft,{ref:M,query:z.query,isMobile:i.isMobile??!1,listId:I,onHighlightChange:D,onSelect:ie,onClose:te}):null,t[71]=te,t[72]=I,t[73]=z,t[74]=i.isMobile,t[75]=ie,t[76]=ve):ve=t[76];let ye;return t[77]!==y.text||t[78]!==ce||t[79]!==i||t[80]!==ue||t[81]!==W||t[82]!==K||t[83]!==de||t[84]!==_e||t[85]!==ve?(ye=(0,$.jsx)(Ee,{...i,value:le,pending:ue,disableInputWhilePending:W,inputRef:O,highlightedContent:ce,highlightRef:j,textLayoutClassName:K,onChange:de,textareaProps:_e,children:ve}),t[77]=y.text,t[78]=ce,t[79]=i,t[80]=ue,t[81]=W,t[82]=K,t[83]=de,t[84]=_e,t[85]=ve,t[86]=ye):ye=t[86],ye};function mt(e){return{start:e.start,end:e.end,priority:103,...u(e)}}function ht(e,t){return(0,$.jsx)(`span`,{className:e.className,children:e.visual?(0,$.jsx)(Le,{visual:e.visual,text:e.text}):e.text},`${t}-${e.text.length}`)}var gt=`max-h-72 max-w-full rounded-[1.35rem] border border-border/40 object-contain cursor-zoom-in`;function _t({assistantID:e,descriptor:t,onShowPopup:n}){let{t:r}=k(),i=Ce(),{attachmentID:a,sha256:o,size:s,mime:c,filename:l}=t,u=Q.useMemo(()=>({type:`file`,attachmentID:a,sha256:o,size:s,mime:c,filename:l}),[a,o,s,c,l]),d=c.startsWith(`image/`),[f,p]=Q.useState(0),[m,h]=Q.useState(``),[g,_]=Q.useState(!1),[v,y]=Q.useState(!1),b=Q.useRef(null),x=Q.useRef([]);Q.useEffect(()=>{h(``),_(!1);let t=new AbortController,n;return d&&Xe(e,u,{signal:t.signal}).then(e=>{if(t.signal.aborted){e.release();return}n=e.release,h(e.url)}).catch(()=>{t.signal.aborted||_(!0)}),()=>{t.abort(),n?.()}},[e,u,i,d,f]),Q.useEffect(()=>()=>{b.current?.abort(),x.current.forEach(e=>URL.revokeObjectURL(e)),x.current=[]},[e,u,i]);let S=E(async()=>{if(b.current)return;let t=new AbortController;b.current=t,y(!0),_(!1);try{let n=await Ye(e,u,{signal:t.signal});if(t.signal.aborted)return;x.current.forEach(e=>URL.revokeObjectURL(e));let i=URL.createObjectURL(n);x.current=[i];let a=document.createElement(`a`);a.href=i,a.download=l||r(`assistants.contact.attachment.file`),document.body.appendChild(a),a.click(),a.remove()}catch{t.signal.aborted||_(!0)}finally{b.current===t&&(b.current=null),t.signal.aborted||y(!1)}}),C=l||r(d?`assistants.contact.attachment.image`:`assistants.contact.attachment.file`),w=E(()=>{!n||!m||n({open:!0,title:C,content:``,metadata:{tool:`image-preview`,filename:C,mime:c},image:{url:m,mimeType:c,filename:C,size:s,gallery:[{url:m,mimeType:c,filename:C,size:s}],index:0}})});return d&&m&&!g?(0,$.jsx)(`img`,{src:m,alt:C,className:gt,onError:()=>_(!0),onClick:w,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),w())},role:`button`,tabIndex:0,"data-assistant-contact-image":``}):(0,$.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1 rounded-[1.25rem] bg-[var(--surface-muted)] px-3.5 py-2.5 ring-1 ring-inset ring-[var(--surface-subtle)]`,"data-assistant-contact-file":``,children:[(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,$.jsx)(Z,{name:`file-text`,className:`size-4 shrink-0 text-muted-foreground`}),(0,$.jsx)(`span`,{className:`truncate typography-ui`,children:C})]}),g?(0,$.jsx)(`p`,{role:`alert`,className:`typography-micro text-[var(--status-error)]`,children:r(`assistants.contact.attachment.loadFailed`)}):null,d&&!g||v?(0,$.jsx)(`span`,{role:`status`,className:`typography-micro text-muted-foreground`,children:r(`common.loading`)}):(0,$.jsx)(j,{type:`button`,size:`sm`,variant:`ghost`,onClick:d?()=>p(e=>e+1):()=>void S(),children:r(g?`chat.history.retry`:`assistants.contact.attachment.download`)})]})}function vt(e){let t=(0,Ze.c)(27),{part:n,onShowPopup:r}=e,{t:i}=k(),a=/^(?:https?:|data:|blob:)/i.test(n.url)?n.url:``,o=we(a,``),[s,c]=Q.useState(!1),l;t[0]!==n.filename||t[1]!==i?(l=n.filename||i(`assistants.contact.attachment.image`),t[0]=n.filename,t[1]=i,t[2]=l):l=t[2];let u=l,d;t[3]!==u||t[4]!==r||t[5]!==o?(d=()=>{!r||!o||r({open:!0,title:u,content:``,metadata:{tool:`image-preview`,filename:u},image:{url:o,filename:u,gallery:[{url:o,filename:u}],index:0}})},t[3]=u,t[4]=r,t[5]=o,t[6]=d):d=t[6];let f=E(d);if(n.mime.startsWith(`image/`)&&o&&!s){let e;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>c(!0),t[7]=e):e=t[7];let n;t[8]===f?n=t[9]:(n=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),f())},t[8]=f,t[9]=n);let r;return t[10]!==u||t[11]!==f||t[12]!==o||t[13]!==n?(r=(0,$.jsx)(`img`,{src:o,alt:u,className:gt,onError:e,onClick:f,onKeyDown:n,role:`button`,tabIndex:0,"data-assistant-contact-image":``}),t[10]=u,t[11]=f,t[12]=o,t[13]=n,t[14]=r):r=t[14],r}let p;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(Z,{name:`file-text`,className:`size-4 shrink-0 text-muted-foreground`}),t[15]=p):p=t[15];let m;t[16]!==n.filename||t[17]!==i?(m=n.filename||i(`assistants.contact.attachment.file`),t[16]=n.filename,t[17]=i,t[18]=m):m=t[18];let h;t[19]===m?h=t[20]:(h=(0,$.jsx)(`span`,{className:`truncate typography-ui`,children:m}),t[19]=m,t[20]=h);let g;t[21]!==s||t[22]!==i?(g=s?(0,$.jsx)(j,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>c(!1),children:i(`chat.history.retry`)}):null,t[21]=s,t[22]=i,t[23]=g):g=t[23];let _;return t[24]!==h||t[25]!==g?(_=(0,$.jsxs)(`div`,{className:`flex max-w-full items-center gap-2.5 rounded-[1.25rem] bg-[var(--surface-muted)] px-3.5 py-2.5`,"data-assistant-contact-file":``,children:[p,h,g]}),t[24]=h,t[25]=g,t[26]=_):_=t[26],_}function yt(e){let t=(0,Ze.c)(5),{assistantID:n,part:r,onShowPopup:i}=e,a=Ce(),o;return t[0]!==n||t[1]!==i||t[2]!==r||t[3]!==a?(o=`attachmentID`in r?(0,$.jsx)(_t,{assistantID:n,descriptor:r,onShowPopup:i},`${a}:${n}:${r.attachmentID}:${r.sha256}`):(0,$.jsx)(vt,{part:r,onShowPopup:i},`${a}:${r.url}`),t[0]=n,t[1]=i,t[2]=r,t[3]=a,t[4]=o):o=t[4],o}var bt=[],xt=e=>e.flatMap(e=>e.type===`text`&&e.text.trim()?[e.text]:[]).join(`
|
|
3
|
+
`),St=(e,t,n,r=Date.now())=>({assistantID:e,messageID:t,parts:n,status:`sending`,createdAt:r}),Ct=(e,t)=>{let n=e.filter(e=>e.assistantID===t);return n.length===e.length?e:n},wt=(e,t)=>{let n=e.filter(e=>e.assistantID===t);return n.length===e.length?e:n},Tt=(e,t,n,r)=>({messageID:t?`${e.turnID}:preview:${t.bubbleIndex}`:`${e.turnID}:preview:${r}`,assistantID:e.assistantID,role:`assistant`,turnID:e.turnID,bubbleIndex:t?.bubbleIndex??0,createdAt:t?.occurredAt??e.occurredAt,ordinal:n,status:r,fromAssistantID:null,fromAssistantName:null,parts:t?[{type:`text`,text:t.text}]:[],text:t?.text??``,cards:[]}),Et=(e,t,n)=>{let r=e.bubbles.filter(e=>!t.has(e.bubbleIndex)).map((t,r)=>Tt(e,t,n+r,t.done?`complete`:`streaming`));return e.status===`failed`?[...r,Tt(e,null,n+r.length,`failed`)]:e.status===`admitted`||e.status===`streaming`?[...r,Tt(e,null,n+r.length,`admitted`)]:r},Dt=(e,t,n,r=[])=>{let i=new Set(e.map(e=>e.messageID)),a=t.flatMap((t,r)=>t.assistantID!==n||i.has(t.messageID)?[]:[{messageID:t.messageID,assistantID:n,role:`user`,turnID:t.messageID,bubbleIndex:0,createdAt:t.createdAt,ordinal:e.length+r,status:t.status,fromAssistantID:null,fromAssistantName:null,parts:[...t.parts],text:xt(t.parts),cards:[]}]),o=a.length===0?e:[...e,...a],s=r.filter(e=>e.assistantID===n);if(s.length===0)return o;let c=new Map,l=new Map;o.forEach((e,t)=>{if(c.set(e.turnID,t),e.role!==`assistant`||e.messageID.includes(`:preview:`))return;let n=l.get(e.turnID)??new Set;n.add(e.bubbleIndex),l.set(e.turnID,n)});let u=new Map,d=[];for(let e of s){let t=Et(e,l.get(e.turnID)??new Set,o.length+d.length);if(t.length===0)continue;let n=c.get(e.turnID);if(n===void 0){if(e.status===`failed`&&o.some(t=>t.turnID!==e.turnID))continue;d.push(...t);continue}let r=u.get(n)??[];r.push(...t),u.set(n,r)}return u.size===0&&d.length===0?o:o.flatMap((e,t)=>[e,...u.get(t)??[]]).concat(d)},Ot=(e,t)=>{let n=new Set(t.map(e=>e.messageID)),r=e.filter(e=>!n.has(e.messageID));return r.length===e.length?e:r},kt=(e,t)=>e.map(e=>e.messageID===t?{...e,status:`admitted`}:e),At=(e,t,n,r=Date.now())=>{let i=e.filter(e=>e.assistantID!==t||e.status!==`failed`||e.turnID===n);return i.some(e=>e.assistantID===t&&e.turnID===n)?i.length===e.length?e:i:[...i,{assistantID:t,turnID:n,status:`admitted`,bubbles:[],occurredAt:r}]},jt=(e,t,n)=>!t?.turnID||!t.assistantID||n?.has(t.turnID)?e:At(e,t.assistantID,t.turnID,t.admittedAt),Mt=(e,t)=>{let n=t.assistantID,r=t.pendingSendTurnIDs??new Set,i=t.settledTurnIDs??new Set,a=typeof t.snapshotRevision==`number`&&Number.isFinite(t.snapshotRevision)?t.snapshotRevision:null,o=t.admissionRevisionByTurnID instanceof Map?t.admissionRevisionByTurnID:new Map(Object.entries(t.admissionRevisionByTurnID??{}).map(([e,t])=>[e,Number(t)])),s=t.occurredAt??Date.now(),c=t.activeContactTurn&&t.activeContactTurn.turnID?t.activeContactTurn:null,l=!!(t.serverWorking||c),u=jt(e,c?{assistantID:n,turnID:c.turnID,admittedAt:c.admittedAt}:null,i),d=Array.isArray(t.messages)?t.messages:[];for(let e of d)e.role===`assistant`&&e.status===`error`&&(r.has(e.turnID)||i.has(e.turnID)||(u=Pt(u,{assistantID:n,turnID:e.turnID,status:`error`,error:e.text||`upstream_error`,occurredAt:s})));if(u=Ft(u,d),l){let t=u.filter(e=>{if(e.assistantID!==n||e.status!==`admitted`&&e.status!==`streaming`||r.has(e.turnID)||c&&e.turnID===c.turnID)return!0;let t=o.get(e.turnID);return typeof t==`number`&&a!=null&&a<t?!0:typeof t==`number`&&a!=null&&a>=t&&e.turnID!==c?.turnID?!1:!c||e.turnID===c.turnID});return t.length===e.length&&t.every((t,n)=>t===e[n])?e:t}if(a==null)return u.length===e.length&&u.every((t,n)=>t===e[n])?e:u;let f=u.filter(e=>{if(e.assistantID!==n||e.status!==`admitted`&&e.status!==`streaming`||r.has(e.turnID))return!0;if(i.has(e.turnID))return!1;let t=o.get(e.turnID);return typeof t==`number`&&a<t});return f.length===e.length&&f.every((t,n)=>t===e[n])?e:f.length===u.length?u:f},Nt=(e,t)=>At(e,t.assistantID,t.turnID,t.occurredAt).map(e=>{if(e.assistantID!==t.assistantID||e.turnID!==t.turnID||e.status===`failed`||e.status===`complete`)return e;let n=e.bubbles.find(e=>e.bubbleIndex===t.bubbleIndex);if(n?.done)return e;let r=n?{...n,text:`${n.text}${t.delta}`,done:t.done,occurredAt:t.occurredAt}:{bubbleIndex:t.bubbleIndex,text:t.delta,done:t.done,occurredAt:t.occurredAt},i=n?e.bubbles.map(e=>e.bubbleIndex===t.bubbleIndex?r:e):[...e.bubbles,r].sort((e,t)=>e.bubbleIndex-t.bubbleIndex);return{...e,status:`streaming`,bubbles:i}}),Pt=(e,t,n={})=>n.requireExisting&&!e.some(e=>e.assistantID===t.assistantID&&e.turnID===t.turnID)?e:At(e,t.assistantID,t.turnID,t.occurredAt).map(e=>e.assistantID!==t.assistantID||e.turnID!==t.turnID||e.status===`complete`||e.status===`failed`?e:{...e,status:t.status===`error`?`failed`:`complete`,...t.error?{error:t.error}:{}}),Ft=(e,t)=>{let n=new Set(t.map(e=>e.turnID).filter(Boolean)),r=t.length>0?t[t.length-1]?.turnID??null:null,i=[...e].reverse().find(e=>e.status===`admitted`||e.status===`streaming`)?.turnID??r,a=new Set(t.flatMap(e=>e.role===`assistant`?[e.turnID]:[])),o=e.filter(e=>e.status===`admitted`||e.status===`streaming`||!(e.status===`complete`&&a.has(e.turnID)||!n.has(e.turnID)||e.status===`failed`&&(i&&i!==e.turnID||r&&r!==e.turnID)));return o.length===e.length?e:o},It=(e,t,n)=>e.map(e=>e.messageID===t?{...e,status:`failed`,error:n}:e),Lt=(e,t)=>{if(e instanceof B){if(e.code===`no_provider`)return t.noProvider;if(e.code===`admission_timeout`||e.code===`generate_timeout`)return t.timedOut;if(e.message&&e.message!==e.code)return e.message}return z(e)?t.timedOut:t.sendFailed},Rt=()=>{let e=!1;return{tryAcquire:()=>!e&&(e=!0,!0),release:()=>{e=!1}}},zt=e=>{let t=e.text.trim();if(e.sending||!t&&e.attachments.length===0||!e.gate.tryAcquire())return{ok:!1};let n=[...t?[{type:`text`,text:t}]:[],...e.attachments.map(e=>({type:`file`,mime:e.mime,url:e.url,filename:e.name}))],r=e.createMessageID();return{ok:!0,messageID:r,parts:n,turn:St(e.assistantID,r,n,e.createdAt)}},Bt=e=>e.some(e=>e.status===`sending`),Vt=e=>e.some(e=>e.status===`admitted`||e.status===`streaming`),Ht=[`cursor-pointer rounded-[1.35rem] bg-[var(--surface-elevated)] ring-1 ring-inset ring-[var(--surface-subtle)]`,`px-3.5 py-3 text-left transition-[background-color,box-shadow,transform] duration-200 ease-out motion-reduce:transition-none`,`hover:-translate-y-px hover:bg-interactive-hover/45 hover:shadow-sm active:translate-y-0 motion-reduce:hover:translate-y-0`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)]`].join(` `),Ut=`${Ht} w-fit min-w-0 max-w-[min(100%,15rem)]`,Wt=`${Ht} w-fit min-w-0 max-w-[min(100%,20rem)]`;function Gt(e,t){(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())}var Kt=e=>{let t=(0,Ze.c)(26),{card:n}=e,{t:r}=k(),i=Te(),a;t[0]===i?a=t[1]:(a=i&&!v(),t[0]=i,t[1]=a);let o=!!a,s=n.name,c=`${n.providerID}/${n.modelID}`,l;t[2]!==n.mode||t[3]!==c?(l=[c,n.mode].filter(Boolean),t[2]=n.mode,t[3]=c,t[4]=l):l=t[4];let u=l,d;t[5]!==n.assistantID||t[6]!==o?(d=()=>{if(o){W.getState().openAssistant(n.assistantID);return}K(n.assistantID)},t[5]=n.assistantID,t[6]=o,t[7]=d):d=t[7];let f=E(d),p;t[8]===f?p=t[9]:(p=e=>{Gt(e,f)},t[8]=f,t[9]=p);let m=E(p),h;t[10]!==r||t[11]!==s?(h=r(`assistants.contact.card.assistant.aria`,{name:s}),t[10]=r,t[11]=s,t[12]=h):h=t[12];let g;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(`span`,{className:`relative inline-block size-6 shrink-0 leading-none`,children:(0,$.jsx)(`span`,{className:`flex size-6 items-center justify-center rounded-lg bg-[var(--surface-muted)] text-muted-foreground`,children:(0,$.jsx)(Z,{name:`robot-2`,className:`size-3`})})}),t[13]=g):g=t[13];let _;t[14]===s?_=t[15]:(_=(0,$.jsx)(`h3`,{className:`min-w-0 truncate typography-ui-label font-medium text-foreground`,children:s}),t[14]=s,t[15]=_);let y;t[16]===u?y=t[17]:(y=u.length>0?(0,$.jsx)(`p`,{className:`truncate typography-micro text-muted-foreground`,children:u.join(` · `)}):null,t[16]=u,t[17]=y);let b;t[18]!==_||t[19]!==y?(b=(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[g,(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[_,y]})]}),t[18]=_,t[19]=y,t[20]=b):b=t[20];let x;return t[21]!==m||t[22]!==f||t[23]!==b||t[24]!==h?(x=(0,$.jsx)(`article`,{className:Ut,role:`button`,tabIndex:0,"aria-label":h,"data-assistant-contact-card":`assistant`,onClick:f,onKeyDown:m,children:b}),t[21]=m,t[22]=f,t[23]=b,t[24]=h,t[25]=x):x=t[25],x},qt=e=>{let t=(0,Ze.c)(25),{card:n}=e,{t:r}=k(),i=n.name,a;t[0]!==n.kind||t[1]!==n.time||t[2]!==n.timezone?(a=[n.kind,n.time,n.timezone].filter(Boolean),t[0]=n.kind,t[1]=n.time,t[2]=n.timezone,t[3]=a):a=t[3];let o=a.join(` `),s;t[4]!==n.prompt||t[5]!==o?(s=o.trim()||(typeof n.prompt==`string`?n.prompt.trim():``),t[4]=n.prompt,t[5]=o,t[6]=s):s=t[6];let c=s,l=E(Jt),u;t[7]===l?u=t[8]:(u=e=>{Gt(e,l)},t[7]=l,t[8]=u);let d=E(u),f;t[9]!==r||t[10]!==i?(f=r(`assistants.contact.card.schedule.aria`,{name:i}),t[9]=r,t[10]=i,t[11]=f):f=t[11];let p;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`relative inline-block size-6 shrink-0 leading-none`,children:(0,$.jsx)(`span`,{className:`flex size-6 items-center justify-center rounded-lg bg-[var(--surface-muted)] text-muted-foreground`,children:(0,$.jsx)(Z,{name:`calendar`,className:`size-3`})})}),t[12]=p):p=t[12];let m;t[13]===i?m=t[14]:(m=(0,$.jsx)(`h3`,{className:`min-w-0 truncate typography-ui-label font-medium text-foreground`,children:i}),t[13]=i,t[14]=m);let h;t[15]===c?h=t[16]:(h=c?(0,$.jsx)(`p`,{className:`truncate typography-micro text-muted-foreground`,children:c}):null,t[15]=c,t[16]=h);let g;t[17]!==m||t[18]!==h?(g=(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[p,(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[m,h]})]}),t[17]=m,t[18]=h,t[19]=g):g=t[19];let _;return t[20]!==d||t[21]!==l||t[22]!==f||t[23]!==g?(_=(0,$.jsx)(`article`,{className:Ut,role:`button`,tabIndex:0,"aria-label":f,"data-assistant-contact-card":`schedule`,onClick:l,onKeyDown:d,children:g}),t[20]=d,t[21]=l,t[22]=f,t[23]=g,t[24]=_):_=t[24],_};function Jt(){y.getState().setActiveMainTab(`schedule`),y.getState().setScheduledTasksDialogOpen(!0)}var Yt=(e,t)=>t===`cancelled`?t:e===`busy`||e===`retry`?e:t===`error`||t===`question`||t===`complete`?t:e===`idle`?`complete`:t===`busy`||t===`retry`||t===`idle`?t:t||`busy`,Xt=e=>e===`cancelled`?`assistants.contact.card.session.status.cancelled`:e===`busy`?`assistants.contact.card.session.status.busy`:e===`retry`?`assistants.contact.card.session.status.retry`:e===`idle`?`assistants.contact.card.session.status.idle`:e===`complete`?`assistants.contact.card.session.status.complete`:e===`error`?`assistants.contact.card.session.status.error`:e===`question`?`assistants.contact.card.session.status.question`:null,Zt=e=>e===`busy`?`bg-[var(--status-info)]/10 text-[var(--status-info)]`:e===`retry`||e===`question`?`bg-[var(--status-warning)]/10 text-[var(--status-warning)]`:e===`error`?`bg-[var(--status-error)]/10 text-[var(--status-error)]`:e===`idle`||e===`complete`?`bg-[var(--status-success)]/10 text-[var(--status-success)]`:`bg-[var(--surface-muted)] text-muted-foreground`,Qt=e=>e.split(/[/\\]/u).filter(Boolean).at(-1)||e,$t=e=>{let t=(0,Ze.c)(35),{card:n}=e,{t:r}=k(),i=Te(),a;t[0]===i?a=t[1]:(a=i&&!v(),t[0]=i,t[1]=a);let o=!!a,s;t[2]===n.sessionID?s=t[3]:(s=e=>e.activeSessions.find(e=>e.id===n.sessionID)??e.archivedSessions.find(e=>e.id===n.sessionID)??null,t[2]=n.sessionID,t[3]=s);let c=le(s),l=ae(n.sessionID),u=(typeof c?.title==`string`&&c.title.trim()?c.title.trim():null)||n.title||r(`assistants.contact.card.session.untitled`),d=Yt(l?.type,n.status),f=Xt(d),p=d===`busy`||d===`retry`,m=Qt(typeof c?.directory==`string`&&c.directory.trim()?c.directory.trim():n.directory),h=Fe(c)||n.branch,g=Me(c),_=Re(c),b=ze(_),x=[m,g,h].filter(en),S;t[4]!==n.directory||t[5]!==n.sessionID||t[6]!==o?(S=()=>{let e=He(n.sessionID)?.directory||n.directory;se(n.sessionID,e,{phoneShell:o,switchToChat:!0}),o||y.getState().setActiveMainTab(`chat`)},t[4]=n.directory,t[5]=n.sessionID,t[6]=o,t[7]=S):S=t[7];let C=E(S),w;t[8]===C?w=t[9]:(w=e=>{Gt(e,C)},t[8]=C,t[9]=w);let ee=E(w),T=Wt,D=r(`assistants.contact.card.session.aria`,{title:u}),O;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(`span`,{className:`flex size-6 items-center justify-center rounded-lg bg-[var(--surface-muted)] text-muted-foreground`,children:(0,$.jsx)(Z,{name:`chat-3`,className:`size-3`})}),t[10]=O):O=t[10];let j;t[11]===p?j=t[12]:(j=p?(0,$.jsx)(`span`,{className:`pointer-events-none absolute right-0 bottom-0 size-2.5 translate-x-0.5 translate-y-0.5 rounded-full bg-[var(--status-success)] ring-2 ring-[var(--surface-elevated)]`,"data-assistant-working-dot":``,"aria-hidden":!0}):null,t[11]=p,t[12]=j);let M;t[13]===j?M=t[14]:(M=(0,$.jsxs)(`span`,{className:`relative inline-block size-6 shrink-0 leading-none`,children:[O,j]}),t[13]=j,t[14]=M);let N;t[15]===u?N=t[16]:(N=(0,$.jsx)(`h3`,{className:`min-w-0 flex-1 truncate typography-ui-label font-medium text-foreground`,children:u}),t[15]=u,t[16]=N);let P=f?(0,$.jsx)(`span`,{className:A(`shrink-0 rounded-full px-1.5 py-0.5 typography-micro leading-none`,Zt(d)),children:r(f)}):null,F;t[17]!==N||t[18]!==P?(F=(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[N,P]}),t[17]=N,t[18]=P,t[19]=F):F=t[19];let I;t[20]===x?I=t[21]:(I=x.length>0?(0,$.jsx)(`p`,{className:`truncate typography-micro text-muted-foreground`,children:x.join(` · `)}):null,t[20]=x,t[21]=I);let L=b||_?.files!==void 0&&_.files>0?(0,$.jsxs)(`p`,{className:`flex flex-wrap items-baseline gap-x-1.5 typography-micro tabular-nums`,children:[_?.additions===void 0?null:(0,$.jsxs)(`span`,{className:`text-[var(--status-success)]`,children:[`+`,_.additions]}),_?.deletions===void 0?null:(0,$.jsxs)(`span`,{className:`text-[var(--status-error)]`,children:[`−`,_.deletions]}),_?.files===void 0?null:(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:_.files===1?r(`assistants.contact.card.session.changes.filesSingle`,{count:_.files}):r(`assistants.contact.card.session.changes.filesPlural`,{count:_.files})})]}):null,R;t[22]!==F||t[23]!==I||t[24]!==L?(R=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[F,I,L]}),t[22]=F,t[23]=I,t[24]=L,t[25]=R):R=t[25];let z;t[26]!==M||t[27]!==R?(z=(0,$.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[M,R]}),t[26]=M,t[27]=R,t[28]=z):z=t[28];let B;return t[29]!==ee||t[30]!==C||t[31]!==z||t[32]!==T||t[33]!==D?(B=(0,$.jsx)(`article`,{className:T,role:`button`,tabIndex:0,"aria-label":D,"data-assistant-contact-card":`session`,onClick:C,onKeyDown:ee,children:z}),t[29]=ee,t[30]=C,t[31]=z,t[32]=T,t[33]=D,t[34]=B):B=t[34],B};function en(e){return!!(e&&e.trim())}var tn=2,nn=1500,rn=e=>({scrollTop:e.scrollTop,scrollHeight:e.scrollHeight,clientHeight:e.clientHeight}),an=e=>e.scrollHeight-e.scrollTop-e.clientHeight,on=e=>an(e)<=tn,sn=(e,t)=>{let n=t instanceof Element?t:t instanceof Node?t.parentElement:null;for(;n&&n!==e;){if(n instanceof HTMLElement&&n.scrollHeight>n.clientHeight+1&&n.scrollTop+n.clientHeight<n.scrollHeight-1)return!0;n=n.parentElement}return!1},cn=e=>e.altKey||e.ctrlKey||e.metaKey?!1:e.key===`ArrowDown`||e.key===`PageDown`||e.key===`End`,ln=({active:e,assistantID:t,contentRevision:n,onLoadEarlier:r})=>{let i=Q.useRef(null),[a,o]=Q.useState(null),[s,c]=Q.useState(null),l=Q.useRef(!0),u=Q.useRef(null),d=Q.useRef(null),f=Q.useRef(null),p=Q.useRef(0),m=Q.useRef(null),h=Q.useRef(null),g=Q.useRef(e);g.current=e;let _=Q.useMemo(()=>e=>{i.current=e,o(t=>t===e?t:e)},[]),v=Q.useMemo(()=>e=>{c(t=>t===e?t:e)},[]),y=E(()=>{let e=i.current;if(!e||!g.current||l.current)return;let t=e.getBoundingClientRect().top,n=Array.from(e.querySelectorAll(`[data-message-id]`)).find(e=>e.getBoundingClientRect().bottom>t);u.current=n?{id:n.dataset.messageId,offset:n.getBoundingClientRect().top-t}:null}),b=E(()=>{let e=i.current,t=u.current;if(!e||!t||!g.current||l.current)return;if(Math.abs(e.scrollTop-p.current)>.5){p.current=e.scrollTop,y();return}let n=Array.from(e.querySelectorAll(`[data-message-id]`)).find(e=>e.dataset.messageId===t.id);if(!n){y();return}let r=n.getBoundingClientRect().top-e.getBoundingClientRect().top-t.offset;Math.abs(r)>.5&&(e.scrollTop+=r),p.current=e.scrollTop}),x=E(()=>{l.current=!1,p.current=i.current?.scrollTop??0,y()}),S=E(()=>{if(!g.current||!l.current)return!1;let e=i.current;if(!e)return!1;let t=rn(e),n=Math.min(p.current,Math.max(0,t.scrollHeight-t.clientHeight));return t.scrollTop<n-.5?(l.current=!1,p.current=t.scrollTop,y(),!1):on(t)?(p.current=t.scrollTop,!1):(e.scrollTop=e.scrollHeight,p.current=e.scrollTop,!0)}),C=E(e=>{h.current={direction:e,expiresAt:performance.now()+nn}}),w=E(()=>{let e=h.current;return e?performance.now()>e.expiresAt?(h.current=null,null):e.direction:null}),T=E(()=>{l.current=!1,y()}),O=E(()=>{if(!g.current)return;let e=i.current;if(!e)return;let t=rn(e),n=t.scrollTop>p.current,a=Math.min(p.current,Math.max(0,t.scrollHeight-t.clientHeight));if(p.current=t.scrollTop,l.current){t.scrollTop<a-.5&&T();return}let o=w();y(),t.scrollTop<=80&&o===`up`&&r?.(),n&&on(t)&&(o===`down`||o===`scrollbar`)&&(l.current=!0)}),k=E(e=>{let t=i.current;if(!(!t||e.deltaY===0)){if(e.deltaY<0){if(Ie(t,e.target))return;C(`up`),T(),t.scrollTop<=80&&r?.();return}sn(t,e.target)||C(`down`)}}),A=E(e=>{h.current=null;let t=e.touches.item(0);m.current=t?{x:t.clientX,y:t.clientY,deltaX:0,deltaY:0}:null}),j=E(e=>{let t=i.current,n=e.touches.item(0);if(!t||!n){m.current=null;return}let a=m.current;if(!a)return;let o=n.clientY-a.y,s=o*a.deltaY<0,c=(s?0:a.deltaX)+n.clientX-a.x,l=(s?0:a.deltaY)+o;if(m.current={x:n.clientX,y:n.clientY,deltaX:c,deltaY:l},!(Math.abs(c)>=Math.abs(l))){if(l>0&&Ie(t,e.target)||l<0&&sn(t,e.target)){m.current.deltaX=0,m.current.deltaY=0;return}C(l>0?`up`:`down`),l>2&&(T(),t.scrollTop<=80&&r?.())}}),M=E(()=>{m.current=null}),N=E(e=>{if(Oe(e)){C(`up`),T(),(i.current?.scrollTop??1/0)<=80&&r?.();return}cn(e)&&C(`down`)}),P=E(e=>{let t=i.current;e.pointerType===`mouse`&&e.target===t&&C(`scrollbar`)});Q.useLayoutEffect(()=>{let n=e?t:null,r=i.current;(d.current!==n||f.current!==r)&&(d.current=n,f.current=r,l.current=!0,u.current=null,h.current=null,m.current=null,p.current=r?.scrollTop??0),e&&(S(),b())},[e,t,n,a]);let F=Q.useMemo(()=>()=>void 0,[]),I=e&&a?a:F,L=Q.useMemo(()=>({passive:!0}),[]);D(`scroll`,O,I,L),D(`wheel`,k,I,L),D(`touchstart`,A,I,L),D(`touchmove`,j,I,L),D(`touchend`,M,I,L),D(`touchcancel`,M,I,L),D(`keydown`,N,I),D(`pointerdown`,P,I,L);let R=E(()=>{S(),b()});return ee(typeof ResizeObserver<`u`&&e?s:null,R),{scrollRef:_,contentRef:v,preparePrepend:x}},un=64,dn=e=>{if(!e)return[];let t=Array.from(e.files||[]);return t.length>0?t:Array.from(e.items||[]).filter(e=>e.kind===`file`).map(e=>e.getAsFile()).filter(e=>e instanceof File)},fn=e=>Array.from(e?.files||[]),pn=async(e,t=d)=>{let n=[],r=0;for(let i of Array.from(e||[])){if(!i||i.size<=0)continue;if(i.size>26214400){r+=1;continue}let e=URL.createObjectURL(i);n.push({id:t(),url:e,name:i.name.trim()||`attachment`,mime:i.type.trim()||`application/octet-stream`,file:i})}return{attachments:n,skippedTooLarge:r}},mn=(e,t)=>{let n=[...e,...t];for(let e of n.slice(un))e.url.startsWith(`blob:`)&&URL.revokeObjectURL(e.url);return n.slice(0,un)},hn=be(()=>b(()=>import(`./ToolOutputDialog-CQs_7KYT.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]))),gn=e=>e.trim().startsWith(`oc.settle.`),_n=({assistant:e,warning:t,active:n,overlayHeader:r=!1})=>{let{t:i}=k(),a=Ce(),o=y(e=>e.isMobile),s=R(),c=ie(),l=F(e.id,n),u=y(e=>e.isSettingsDialogOpen),f=n&&!u&&!l.hasMessageGap?P(e,l.data):null,p=M(e.name),m=p.displayName||e.name,h=(e,t)=>{let n=e?c.data?.assistants.find(t=>t.id===e):void 0;return n?M(n.name).displayName||n.name:t||i(`assistants.contact.peer.unknown`)},[g,_]=Q.useState(``),[v,b]=Q.useState([]),x=Q.useRef(null),S=Q.useRef(new Map),C=Q.useRef(new AbortController);Q.useEffect(()=>{let e=new AbortController;return C.current=e,()=>e.abort()},[e.id,a]);let w=Q.useRef(new Set);Q.useEffect(()=>{let e=new Set(v.map(e=>e.url));for(let t of w.current)e.has(t)||URL.revokeObjectURL(t);w.current=e},[v]),Q.useEffect(()=>()=>{for(let e of w.current)URL.revokeObjectURL(e)},[]);let[ee,T]=Q.useState([]),[D,O]=Q.useState([]),[I,z]=Q.useState(null),[V,ne]=Q.useState({open:!1,title:``,content:``}),U=y(e=>e.setImagePreviewOpen),re=E(e=>{(e.image||e.mermaid)&&(ne(e),U(!0))}),ae=E(e=>{ne(t=>({...t,open:e})),U(e)});Q.useEffect(()=>()=>{U(!1)},[U]);let se=Q.useRef(!1);Q.useEffect(()=>{S.current.clear(),x.current=null,T([]),O([]),z(null)},[a]);let ce=Q.useMemo(()=>Rt(),[]),le=Q.useRef(new Set),ue=Q.useRef(new Map),W=tt(e=>e.setWorking),G=l.data?.messages??bt,K=Ct(ee,e.id),de=wt(D,e.id),q=Dt(G,K,e.id,de).filter(e=>{let t=Array.isArray(e.parts)?e.parts:[];return t.length===0||t.some(e=>!(e.type===`text`&&gn(e.text)))}),J=Bt(K),Y=Vt(de),X=!!(e.working||e.activeContactTurn),fe=c.data?.revision??null,pe=de.reduce((e,t)=>e+t.bubbles.reduce((e,t)=>e+t.text.length,0),0),me=new Map(de.map(e=>[e.turnID,e])),he=Q.useRef(!1),ge=E(async(e=!1)=>{if(!(!n||he.current||l.isFetchingPreviousPage||l.isFillingMessageGap)&&!(e&&l.previousPageError)&&!(!l.hasPreviousPage&&!l.hasMessageGap)){he.current=!0,ye();try{l.hasMessageGap?await l.retryMessageGap():await l.fetchPreviousPage()}catch{}finally{he.current=!1}}}),{scrollRef:_e,contentRef:ve,preparePrepend:ye}=ln({active:n,assistantID:e.id,contentRevision:`${q[0]?.messageID}:${q.length}:${pe}:${l.isFetchingPreviousPage}:${l.hasPreviousPage}:${l.isFillingMessageGap}`,onLoadEarlier:()=>{ge(!0)}});Q.useEffect(()=>{z(null),le.current.clear(),ue.current=new Map,T(t=>Ct(t,e.id)),O(t=>wt(t,e.id)),ne({open:!1,title:``,content:``}),U(!1)},[e.id,U]),Q.useEffect(()=>{T(e=>Ot(e,G))},[G]),Q.useEffect(()=>{let t=new Set(K.filter(e=>e.status===`sending`).map(e=>e.messageID));O(n=>Mt(n,{assistantID:e.id,activeContactTurn:e.activeContactTurn?{turnID:e.activeContactTurn.turnID,admittedAt:e.activeContactTurn.admittedAt}:null,serverWorking:X,snapshotRevision:fe,admissionRevisionByTurnID:ue.current,pendingSendTurnIDs:t,messages:G,settledTurnIDs:le.current}))},[e.activeContactTurn,e.id,G,K,X,fe]),Q.useEffect(()=>{W(e.id,J||Y||X)},[e.id,Y,J,X,W]),Q.useEffect(()=>{let t=e.id;return()=>{W(t,!1)}},[e.id,W]);let be=E(t=>{if(!(!(`assistantID`in t)||t.assistantID!==e.id)){if(t.type===`contact-turn-start`){le.current.delete(t.turnID),O(e=>At(e,t.assistantID,t.turnID,t.occurredAt));return}if(t.type===`contact-bubble-delta`){if(le.current.has(t.turnID))return;O(e=>Nt(e,t));return}t.type===`contact-turn-end`&&(le.current.add(t.turnID),O(e=>Ft(Pt(e,t,{requireExisting:!0}),G)))}});Q.useEffect(()=>{if(n)return oe(be)},[n,e.id]);let Se=E(async e=>{if(J)return;let t=C.current,n=await pn(e);if(t.signal.aborted){n.attachments.forEach(e=>URL.revokeObjectURL(e.url));return}n.skippedTooLarge>0&&z(i(`assistants.contact.attachment.tooLarge`)),n.attachments.length!==0&&b(e=>mn(e,n.attachments))}),we=E(e=>{let t=dn(e.clipboardData);t.length!==0&&(e.preventDefault(),Se(t))}),Te=E(e=>{Array.from(e.dataTransfer?.types??[]).includes(`Files`)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)}),Ee=E(e=>{let t=fn(e.dataTransfer);t.length!==0&&(e.preventDefault(),Se(t))}),De=E(async()=>{let t=C.current,n=g,r=v,a=e.id,o=x.current,c=o?.assistantID===a&&o.text===n&&o.attachments===r?o.messageID:null,l=zt({gate:ce,sending:Bt(K),text:n,attachments:r,assistantID:a,createMessageID:()=>c||`oc_contact_${d()}`});if(!l.ok)return;x.current={assistantID:a,text:n,attachments:r,messageID:l.messageID},T(e=>[...e.filter(e=>e.messageID!==l.messageID),l.turn]),z(null);let u=()=>{_(e=>e===n?``:e),b(e=>e.filter(e=>!r.includes(e))),r.forEach(e=>S.current.delete(`${a}:${e.id}`)),x.current=null};try{let e=[];for(let n of r){let r=`${a}:${n.id}`,i=S.current.get(r);if(!i){if(i=await Je(a,n.file,n.id,t.signal),t.signal.aborted)return;S.current.set(r,i)}e.push(i)}if(t.signal.aborted)return;let n=[...l.parts.filter(e=>e.type===`text`),...e];T(e=>e.map(e=>e.messageID===l.messageID?{...e,parts:n}:e));let i=await L(a,l.messageID,{parts:n});if(t.signal.aborted)return;u(),typeof i.revision==`number`&&ue.current.set(l.messageID,i.revision),T(e=>kt(e,l.messageID)),le.current.has(l.messageID)||O(e=>At(e,a,l.messageID)),s.data?.serverInstanceID&&N({serverInstanceID:s.data.serverInstanceID,assistantID:a,name:m,avatarSeed:a,...p.avatarEmoji?{avatarEmoji:p.avatarEmoji}:{}}).catch(()=>void 0)}catch(e){if(t.signal.aborted)return;if(e instanceof B&&e.code===`admission_timeout`)try{let e=await te(a,l.messageID);if(t.signal.aborted)return;if(e){u(),typeof e.revision==`number`&&ue.current.set(l.messageID,e.revision),T(e=>kt(e,l.messageID)),le.current.has(l.messageID)||O(e=>At(e,a,l.messageID));return}}catch{}let n=Lt(e,{noProvider:i(`assistants.contact.noProvider`),sendFailed:i(`assistants.contact.sendFailed`),timedOut:i(`assistants.contact.timedOut`)});T(e=>It(e,l.messageID,n)),z(n)}finally{ce.release()}}),Oe=E(async()=>{if(se.current)return;se.current=!0;let t=C.current;z(null);try{await H(e.id,e)}catch(e){t.signal.aborted||z(e instanceof Error?e.message:i(`settings.mcp.page.toast.unexpectedError`))}finally{se.current=!1}}),ke=l.isError&&q.length===0,Ae=l.isSuccess&&q.length===0,je=new Map(K.map(e=>[e.messageID,e]));return(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col bg-background`,children:[(0,$.jsxs)(`div`,{ref:_e,className:A(`min-h-0 flex-1 overflow-x-hidden overflow-y-auto px-4 pb-9 sm:px-8 sm:pb-12`,r?`pt-[calc(max(0.625rem,var(--oc-safe-area-top,0px))+var(--oc-mobile-detail-navigation-height)+1.25rem)]`:`pt-5 sm:pt-7`),style:{overflowAnchor:`none`,overscrollBehavior:`contain`,overscrollBehaviorY:`contain`},"data-assistant-contact-transcript":``,children:[t?(0,$.jsx)(`p`,{className:`mb-3 typography-micro text-[var(--status-warning)]`,children:t}):null,ke?(0,$.jsxs)(`div`,{ref:ve,className:`mx-auto flex h-full min-h-56 max-w-xs flex-col items-center justify-center pb-16 text-center`,"data-assistant-contact-error":``,children:[(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(et,{name:e.id,emoji:p.avatarEmoji,size:44,label:m}),(0,$.jsx)(`span`,{"aria-hidden":!0,className:`absolute -right-1 -bottom-1 flex size-5 items-center justify-center rounded-full bg-[var(--surface-elevated)] text-[var(--status-error)] ring-2 ring-background`,children:(0,$.jsx)(Z,{name:`error-warning`,className:`size-3`})})]}),(0,$.jsx)(`p`,{className:`mt-4 typography-ui-label font-medium text-foreground`,children:m}),(0,$.jsx)(`p`,{className:`mt-1.5 typography-ui leading-6 text-muted-foreground`,children:i(`assistants.contact.loadFailed`)}),(0,$.jsx)(j,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>void l.refetch(),children:i(`chat.history.retry`)})]}):Ae?(0,$.jsxs)(`div`,{ref:ve,className:`mx-auto flex h-full min-h-56 max-w-sm flex-col items-center justify-center pb-16 text-center`,"data-assistant-contact-empty":``,children:[(0,$.jsx)(et,{name:e.id,emoji:p.avatarEmoji,size:48,label:m,className:`opacity-90`}),(0,$.jsx)(`p`,{className:`mt-5 typography-ui-header font-medium tracking-[-0.01em] text-foreground`,children:i(`assistants.conversation.emptyTitle`,{name:m})}),(0,$.jsx)(`p`,{className:`mt-2 max-w-xs typography-ui leading-6 text-muted-foreground/80`,children:i(`assistants.contact.empty`)})]}):(0,$.jsxs)(`div`,{ref:ve,className:`mx-auto flex w-full max-w-[42rem] flex-col`,children:[l.isPending?(0,$.jsx)(`p`,{role:`status`,className:`py-3 text-center typography-micro text-muted-foreground`,children:i(`common.loading`)}):null,l.hasPreviousPage||l.hasMessageGap?(0,$.jsxs)(`div`,{className:`mb-3 flex flex-col items-center gap-1`,"data-assistant-contact-pagination":``,"aria-busy":l.isFetchingPreviousPage||l.isFillingMessageGap,children:[l.previousPageError?(0,$.jsx)(`p`,{role:`alert`,className:`typography-micro text-[var(--status-error)]`,children:i(`chat.history.loadOlderFailed`)}):null,l.hasMessageGap?(0,$.jsx)(`p`,{role:`status`,className:`typography-micro text-muted-foreground`,children:i(`assistants.contact.history.gap`)}):null,(0,$.jsx)(j,{type:`button`,size:`sm`,variant:`ghost`,disabled:l.isFetchingPreviousPage||l.isFillingMessageGap,onClick:()=>void ge(),children:i(l.isFetchingPreviousPage||l.isFillingMessageGap?`chat.history.loadingMore`:l.previousPageError||l.hasMessageGap?`chat.history.retry`:`chat.history.loadOlder`)})]}):null,q.map((t,n)=>{let r=n>0?q[n-1]:null,o=t.role===`user`,s=t.role===`peer`,l=t.role===`assistant`&&r?.role===`assistant`&&r.turnID===t.turnID,u=r?.turnID!==t.turnID,d=!o&&(s||!l),p=s?h(t.fromAssistantID,t.fromAssistantName):m,g=s&&t.fromAssistantID?c.data?.assistants.find(e=>e.id===t.fromAssistantID):e,_=g?M(g.name):null,v=je.get(t.messageID),y=me.get(t.turnID),b=t.status===`admitted`&&t.messageID.endsWith(`:preview:admitted`),x=t.status===`failed`&&t.messageID.endsWith(`:preview:failed`);return t.status===`error`||x?(0,$.jsxs)(`div`,{"data-message-id":t.messageID,"data-assistant-contact-error":``,className:`mt-3 px-1`,children:[(0,$.jsx)(`p`,{role:`alert`,className:`whitespace-pre-wrap typography-micro text-[var(--status-error)] [overflow-wrap:anywhere]`,children:t.text||y?.error||i(`assistants.contact.sendFailed`)}),f?.messageID===t.messageID?(0,$.jsx)(it,{assistantID:e.id,position:f},`${a}:${e.id}:${f.generation}:${f.ordinal}`):null]},t.messageID):(0,$.jsxs)(`div`,{"data-message-id":t.messageID,className:A(`flex w-full`,o?`justify-end`:`justify-start`,u?`mt-6 first:mt-0`:l?`mt-1.5`:`mt-3`),"data-assistant-contact-role":t.role,"data-assistant-contact-turn-status":v?.status??t.status,"data-assistant-contact-run-start":t.role===`assistant`&&!l?``:void 0,children:[o?null:(0,$.jsx)(`div`,{className:`mr-2.5 flex w-8 shrink-0 justify-center pt-0.5`,children:d?(0,$.jsx)(et,{name:g?.id||t.fromAssistantID||e.id,emoji:_?.avatarEmoji,size:28,label:p}):(0,$.jsx)(`span`,{className:`size-7`,"aria-hidden":!0})}),(0,$.jsxs)(`div`,{className:A(`flex min-w-0 flex-col gap-1.5`,o?`max-w-[min(82%,30rem)] items-end`:`max-w-[min(84%,34rem)] items-start`),children:[s?(0,$.jsx)(`span`,{className:`mb-0.5 px-1 typography-micro text-muted-foreground/75`,children:i(`assistants.contact.peer.from`,{name:p})}):null,b?(0,$.jsxs)(`div`,{role:`status`,"aria-label":i(`assistants.contact.processing`),className:`inline-flex w-fit items-center gap-1 rounded-full bg-[var(--surface-muted)] px-3.5 py-2.5 text-muted-foreground/70`,"data-assistant-contact-processing":``,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-1.5 animate-pulse rounded-full bg-current [animation-delay:-0.45s] [animation-duration:1.4s] motion-reduce:animate-none`}),(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-1.5 animate-pulse rounded-full bg-current [animation-delay:-0.22s] [animation-duration:1.4s] motion-reduce:animate-none`}),(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-1.5 animate-pulse rounded-full bg-current [animation-duration:1.4s] motion-reduce:animate-none`})]}):null,t.parts.map((n,r)=>{if(n.type===`card`&&n.cardType===`session`)return(0,$.jsx)($t,{card:n},`${t.messageID}:card:${r}`);if(n.type===`card`&&n.cardType===`assistant`)return(0,$.jsx)(Kt,{card:n},`${t.messageID}:card:${r}`);if(n.type===`card`&&n.cardType===`schedule`)return(0,$.jsx)(qt,{card:n},`${t.messageID}:card:${r}`);if(n.type===`file`)return(0,$.jsx)(yt,{assistantID:e.id,part:n,onShowPopup:re},`${t.messageID}:file:${r}`);if(n.type===`text`&&gn(n.text))return null;if(n.type===`text`&&(n.text.trim()||t.status===`streaming`)){let e=!o;return(0,$.jsxs)(`div`,{"aria-label":s?i(`assistants.contact.peer.aria`,{name:p}):void 0,"data-assistant-contact-text":``,className:A(`min-w-0 max-w-full [overflow-wrap:anywhere] rounded-[1.35rem] px-4 py-2.5 typography-markdown leading-6`,e?null:`whitespace-pre-wrap`,o?`rounded-[1.15rem] rounded-br-lg bg-[var(--primary-base)]/90 text-[var(--primary-foreground)]`:s?`rounded-[1.25rem] border border-dashed border-border/50 bg-[var(--surface-muted)]/70 text-foreground`:A(`bg-[var(--surface-muted)] text-foreground`,l&&`rounded-tl-lg`)),children:[e?(0,$.jsx)(xe,{content:n.text,messageId:t.messageID,isAnimated:!1,isStreaming:t.status===`streaming`,variant:`assistant`,enableFileReferences:!1,onShowPopup:re,className:`w-full min-w-0 [overflow-wrap:anywhere]`}):n.text,t.status===`streaming`&&r===t.parts.length-1?(0,$.jsx)(`span`,{"aria-hidden":!0,className:`ml-0.5 inline-block h-[1em] w-px translate-y-[0.12em] animate-pulse bg-current opacity-45 [animation-duration:1.1s] motion-reduce:animate-none`,"data-assistant-contact-streaming-caret":``}):null]},`${t.messageID}:text:${r}`)}return null}),v?.status===`sending`?(0,$.jsx)(`p`,{className:`px-1 typography-micro text-muted-foreground/75`,children:i(`assistants.contact.sending`)}):null,v?.status===`failed`?(0,$.jsx)(`p`,{className:`px-1 typography-micro text-[var(--status-error)]`,children:v.error||i(`assistants.contact.sendFailed`)}):null,f?.messageID===t.messageID?(0,$.jsx)(it,{assistantID:e.id,position:f},`${a}:${e.id}:${f.generation}:${f.ordinal}`):null]})]},t.messageID)})]})]}),(0,$.jsxs)(`footer`,{className:`relative z-10 shrink-0 bg-background pt-1`,"data-assistant-contact-composer":``,children:[I?(0,$.jsxs)(`div`,{className:`chat-input-column mb-2 flex items-center gap-2`,children:[(0,$.jsx)(`p`,{role:`alert`,className:`typography-micro text-[var(--status-error)]`,children:I}),x.current?(0,$.jsx)(j,{type:`button`,size:`sm`,variant:`ghost`,disabled:J,onClick:()=>void De(),children:i(`chat.history.retry`)}):null]}):null,(0,$.jsx)(`form`,{className:A(`relative w-full pt-1.5 pb-4`,o&&`bottom-safe-area oc-mobile-composer`),onSubmit:e=>{e.preventDefault(),De()},onDragOver:Te,onDrop:Ee,children:(0,$.jsx)(`div`,{className:`chat-input-column relative overflow-visible`,children:(0,$.jsx)(pt,{active:n,layout:`inline`,value:g,attachments:v,pending:J,working:Y||X,onStop:Y||X?()=>{Oe()}:void 0,stopLabel:i(`chat.chatInput.actions.stopGeneratingAria`),isMobile:o,placeholder:i(`assistants.contact.placeholder`,{name:m}),sendLabel:i(`assistants.contact.send`),addFilesLabel:i(`assistants.contact.addFiles`),removeAttachmentLabel:i(`assistants.contact.removeAttachment`),fileAccept:`*/*`,onChange:e=>_(e),onSubmit:()=>{De()},onAddFiles:e=>{Se(e)},onRemoveAttachment:t=>{J||(S.current.delete(`${e.id}:${t}`),x.current=null,b(e=>e.filter(e=>e.id!==t)))},onPaste:we,onDragOver:Te,onDrop:Ee,className:A(`relative z-10`,o&&`oc-mobile-composer-surface`),style:{borderRadius:`1.5rem`},"data-assistant-contact-composer-surface":``,textareaProps:{"aria-label":i(`assistants.contact.placeholder`,{name:m})}},`${a}:${e.id}`)})})]}),V.open?(0,$.jsx)(Q.Suspense,{fallback:null,children:(0,$.jsx)(hn,{popup:V,onOpenChange:ae,isMobile:o})}):null]})};async function vn(e){await I(e);let t=G.getState().defaultShareAssistant;if(t?.assistantID!==e.id)return;let n=await ne();n.serverInstanceID&&t.serverInstanceID===n.serverInstanceID&&G.getState().setDefaultShareAssistant(null)}function yn({assistant:e,open:t,onOpenChange:n,onDeleted:r}){let{t:i}=k(),[a,o]=Q.useState(!1),s=e?M(e.name).displayName||e.name:``,c=E(e=>{a&&!e||n(e)}),l=E(()=>{a||n(!1)}),u=E(async()=>{if(!(!e||a)){o(!0);try{await vn(e),r?.(e.id),n(!1),C.success(i(`assistants.settings.toast.deleted`))}catch{C.error(i(`assistants.settings.toast.deleteFailed`))}finally{o(!1)}}});return(0,$.jsx)(pe,{open:t&&e!==null,onOpenChange:c,children:(0,$.jsxs)(Y,{className:`max-w-md`,children:[(0,$.jsxs)(q,{children:[(0,$.jsx)(X,{children:i(`assistants.settings.delete`)}),(0,$.jsx)(fe,{children:i(`assistants.settings.deleteConfirm`,{name:s})})]}),(0,$.jsxs)(J,{children:[(0,$.jsx)(j,{size:`sm`,variant:`ghost`,onClick:l,disabled:a,children:i(`settings.common.actions.cancel`)}),(0,$.jsx)(j,{size:`sm`,variant:`destructive`,onClick:u,disabled:a,children:i(`settings.common.actions.delete`)})]})]})})}var bn=`line-clamp-2 min-w-0 max-w-full overflow-clip whitespace-normal [overflow-wrap:anywhere] typography-micro text-muted-foreground`,xn={image:`assistants.contact.attachment.image`,file:`assistants.contact.attachment.file`,session:`assistants.contact.card.session.untitled`,assistant:`assistants.title`,schedule:`assistants.settings.scheduledTasks.title`};function Sn(e,t){return e?.text.replace(/\s+/gu,` `).trim()||t(e?.fallbackKind?xn[e.fallbackKind]:`assistants.contact.empty`)}var Cn=e=>e.capabilityPending?`loading`:e.capabilityError||e.supported!==!0||e.capabilityEnabled!==!0?`unavailable`:e.snapshotPending?`loading`:e.snapshotEnabled===!0?e.assistantCount===0?`onboarding`:e.hasAssistant?`ready`:e.snapshotSettled?`unavailable`:`loading`:`unavailable`,wn=t({AssistantView:()=>Dn}),Tn=e=>{let t=(0,Ze.c)(22),{assistant:n,onBack:r,onOpenSettings:i}=e,{t:a}=k(),o=Te(),s;t[0]===n?s=t[1]:(s=n?M(n.name):null,t[0]=n,t[1]=s);let c=s,l=n&&c?c.displayName||n.name:``,u;t[2]!==n||t[3]!==o||t[4]!==i?(u=()=>{if(n){if(i){i(n.id);return}de(n.id,o?{openMobileSettings:o.openSettings}:void 0)}},t[2]=n,t[3]=o,t[4]=i,t[5]=u):u=t[5];let d=E(u),f;t[6]!==n||t[7]!==l||t[8]!==c?.avatarEmoji||t[9]!==a?(f=n?(0,$.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-2.5`,children:[(0,$.jsx)(et,{name:n.id,emoji:c?.avatarEmoji,size:28,label:l}),(0,$.jsx)(`span`,{className:`truncate font-medium tracking-[-0.01em]`,children:l||a(`assistants.title`)})]}):l||a(`assistants.title`),t[6]=n,t[7]=l,t[8]=c?.avatarEmoji,t[9]=a,t[10]=f):f=t[10];let p;t[11]===a?p=t[12]:(p=a(`assistants.actions.backToChat`),t[11]=a,t[12]=p);let m;t[13]!==n||t[14]!==d||t[15]!==a?(m=n?[{icon:`settings-3`,ariaLabel:a(`assistants.conversation.openSettings`),onClick:d}]:[],t[13]=n,t[14]=d,t[15]=a,t[16]=m):m=t[16];let h;return t[17]!==r||t[18]!==f||t[19]!==p||t[20]!==m?(h=(0,$.jsx)(U,{title:f,backAriaLabel:p,onBack:r,actions:m,overlay:!0}),t[17]=r,t[18]=f,t[19]=p,t[20]=m,t[21]=h):h=t[21],h},En=e=>{let t=(0,Ze.c)(50),{unreadCount:n,summary:r,assistantID:i,displayName:a,avatarEmoji:o,selected:s,enabled:c,editLabel:l,deleteLabel:u,onSelect:d,onEdit:f,onDelete:p,serverWorking:m}=e,h=rt(i,m!==void 0&&m),[g,_]=Q.useState(!1),v;t[0]===d?v=t[1]:(v=()=>d(),t[0]=d,t[1]=v);let y=E(v),b;t[2]===f?b=t[3]:(b=()=>{_(!1),f()},t[2]=f,t[3]=b);let x=E(b),S;t[4]===p?S=t[5]:(S=()=>{_(!1),p()},t[4]=p,t[5]=S);let C=E(S),w;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>{e.preventDefault(),_(!0)},t[6]=w):w=t[6];let ee=s?`border-border/50 bg-[var(--surface-elevated)]`:`border-transparent hover:bg-interactive-hover`,T=!c&&`opacity-65`,D;t[7]!==ee||t[8]!==T?(D=A(`flex w-full min-h-11 items-center gap-3 rounded-xl border px-3 py-3 text-left outline-none transition-[background-color,border-color,opacity] duration-150 ease-out active:bg-interactive-active focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)] motion-reduce:transition-none`,ee,T),t[7]=ee,t[8]=T,t[9]=D):D=t[9];let O;t[10]!==y||t[11]!==s||t[12]!==D?(O=(0,$.jsx)(`button`,{type:`button`,role:`option`,"aria-selected":s,onClick:y,onContextMenu:w,className:D}),t[10]=y,t[11]=s,t[12]=D,t[13]=O):O=t[13];let k;t[14]!==i||t[15]!==o||t[16]!==a||t[17]!==h?(k=(0,$.jsx)(et,{name:i,emoji:o,size:24,label:a,working:h}),t[14]=i,t[15]=o,t[16]=a,t[17]=h,t[18]=k):k=t[18];let j;t[19]===a?j=t[20]:(j=(0,$.jsx)(`span`,{className:`block truncate typography-ui-label font-medium`,children:a}),t[19]=a,t[20]=j);let M;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(M=A(bn,`mt-1.5`),t[21]=M):M=t[21];let N;t[22]===r?N=t[23]:(N=(0,$.jsx)(`span`,{className:M,children:r}),t[22]=r,t[23]=N);let P;t[24]!==j||t[25]!==N?(P=(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[j,N]}),t[24]=j,t[25]=N,t[26]=P):P=t[26];let F;t[27]===n?F=t[28]:(F=(0,$.jsx)(Ve,{count:n}),t[27]=n,t[28]=F);let I;t[29]!==k||t[30]!==P||t[31]!==F||t[32]!==O?(I=(0,$.jsxs)(Ue,{render:O,children:[k,P,F]}),t[29]=k,t[30]=P,t[31]=F,t[32]=O,t[33]=I):I=t[33];let L;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,$.jsx)(Z,{name:`edit`,className:`size-4`}),t[34]=L):L=t[34];let R;t[35]!==l||t[36]!==x?(R=(0,$.jsxs)(Ke,{onClick:x,children:[L,l]}),t[35]=l,t[36]=x,t[37]=R):R=t[37];let z;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsx)(We,{}),t[38]=z):z=t[38];let B;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,$.jsx)(Z,{name:`delete-bin`,className:`size-4`}),t[39]=B):B=t[39];let V;t[40]!==u||t[41]!==C?(V=(0,$.jsxs)(Ke,{onClick:C,className:`text-[var(--status-error)] focus:text-[var(--status-error)] data-[highlighted]:text-[var(--status-error)] [&_svg]:text-[var(--status-error)]`,children:[B,u]}),t[40]=u,t[41]=C,t[42]=V):V=t[42];let H;t[43]!==R||t[44]!==V?(H=(0,$.jsxs)(Ge,{className:`min-w-[10rem]`,children:[R,z,V]}),t[43]=R,t[44]=V,t[45]=H):H=t[45];let te;return t[46]!==g||t[47]!==I||t[48]!==H?(te=(0,$.jsxs)(qe,{open:g,onOpenChange:_,children:[I,H]}),t[46]=g,t[47]=I,t[48]=H,t[49]=te):te=t[49],te},Dn=e=>{let t=(0,Ze.c)(118),{activeOverride:i,onMobileBack:a,onMobileOpenSettings:o}=e,{t:s}=k(),{isMobile:c}=he(),l=Te(),u=Q.useSyncExternalStore(n,r,r),d=y(On),f=i??d,p=y(kn),m=c||p,h=R(),g=ie(),_=g.data;_?.assistants;let v;t[0]===_?.assistants?v=t[1]:(v=_?.assistants??[],t[0]=_?.assistants,t[1]=v);let b;t[2]===v?b=t[3]:(b=Qe(v),t[2]=v,t[3]=b);let x=b,S;t[4]===u?S=t[5]:(S=e=>e.assistantByTransport[u]??null,t[4]=u,t[5]=S);let C=G(S),w=G(An),ee=G(jn),T;t[6]!==C||t[7]!==_?.assistants?(T=_?.assistants.find(e=>e.id===C)??null,t[6]=C,t[7]=_?.assistants,t[8]=T):T=t[8];let D=T,O;t[9]!==w||t[10]!==C||t[11]!==_?(O=()=>{!C&&_?.assistants[0]&&w(_.assistants[0].id)},t[9]=w,t[10]=C,t[11]=_,t[12]=O):O=t[12];let N=_?.assistants,P;t[13]!==w||t[14]!==C||t[15]!==N?(P=[w,C,N],t[13]=w,t[14]=C,t[15]=N,t[16]=P):P=t[16],Q.useEffect(O,P);let F;t[17]!==D||t[18]!==w||t[19]!==C||t[20]!==_?.assistants||t[21]!==g.isSuccess?(F=()=>{g.isSuccess&&C&&!D&&w(_?.assistants[0]?.id??null)},t[17]=D,t[18]=w,t[19]=C,t[20]=_?.assistants,t[21]=g.isSuccess,t[22]=F):F=t[22];let I=_?.assistants,L;t[23]!==D||t[24]!==w||t[25]!==C||t[26]!==g.isSuccess||t[27]!==I?(L=[D,w,C,I,g.isSuccess],t[23]=D,t[24]=w,t[25]=C,t[26]=g.isSuccess,t[27]=I,t[28]=L):L=t[28],Q.useEffect(F,L);let z;t[29]!==l||t[30]!==ee?(z=()=>{if(ee(),l){l.openSettings();return}let e=y.getState();e.setSettingsPage(`assistants`),e.setSettingsDialogOpen(!0)},t[29]=l,t[30]=ee,t[31]=z):z=t[31];let B=E(z),V;t[32]===l?V=t[33]:(V=e=>{de(e,l?{openMobileSettings:l.openSettings}:void 0)},t[32]=l,t[33]=V);let H=E(V),te;t[34]!==D||t[35]!==l?(te=()=>{D&&de(D.id,l?{openMobileSettings:l.openSettings}:void 0)},t[34]=D,t[35]=l,t[36]=te):te=t[36];let ne=E(te),[U,re]=Q.useState(null),ae;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(ae=e=>{re(e)},t[37]=ae):ae=t[37];let oe=E(ae),se;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(se=e=>{e||re(null)},t[38]=se):se=t[38];let ce=E(se),le=E(Mn),ue;t[39]!==a||t[40]!==le?(ue=()=>{if(a){a();return}le()},t[39]=a,t[40]=le,t[41]=ue):ue=t[41];let W=E(ue),K=Cn({capabilityPending:h.isPending,snapshotPending:g.isPending,capabilityError:h.isError,supported:h.data?.supported,capabilityEnabled:h.data?.enabled,snapshotEnabled:_?.enabled,snapshotSettled:g.isSuccess,assistantCount:_?.assistants.length??0,hasAssistant:!!D}),q;t[42]!==D||t[43]!==W||t[44]!==m||t[45]!==o?(q=(e,t,n,r)=>(0,$.jsxs)(`div`,{className:`relative flex h-full min-h-0 flex-col`,children:[m?(0,$.jsx)(Tn,{assistant:D,onBack:W,onOpenSettings:o}):null,(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center px-6 pt-[calc(max(0.25rem,var(--oc-safe-area-top,0px))+var(--oc-mobile-detail-navigation-height,3.5rem))] text-center`,children:[(0,$.jsx)(Z,{name:e,className:`size-6 text-muted-foreground`}),(0,$.jsx)(`h1`,{className:`mt-4 typography-ui-header font-semibold`,children:t}),n?(0,$.jsx)(`p`,{className:`mt-2 max-w-md typography-ui text-muted-foreground`,children:n}):null,r?(0,$.jsx)(`div`,{className:`mt-5`,children:r}):null]})]}),t[42]=D,t[43]=W,t[44]=m,t[45]=o,t[46]=q):q=t[46];let J=q;if(K===`loading`){let e;t[47]!==D||t[48]!==W||t[49]!==m||t[50]!==o?(e=m?(0,$.jsx)(Tn,{assistant:D,onBack:W,onOpenSettings:o}):null,t[47]=D,t[48]=W,t[49]=m,t[50]=o,t[51]=e):e=t[51];let n;t[52]===s?n=t[53]:(n=s(`common.loading`),t[52]=s,t[53]=n);let r;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(Z,{name:`loader-4`,className:`size-6 animate-spin text-muted-foreground`}),t[54]=r):r=t[54];let i;t[55]===n?i=t[56]:(i=(0,$.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center px-6 pt-[calc(max(0.25rem,var(--oc-safe-area-top,0px))+var(--oc-mobile-detail-navigation-height,3.5rem))] text-center`,"aria-busy":`true`,"aria-label":n,"data-assistant-workspace-loading":``,children:r}),t[55]=n,t[56]=i);let a;return t[57]!==e||t[58]!==i?(a=(0,$.jsxs)(`div`,{className:`relative flex h-full min-h-0 flex-col`,children:[e,i]}),t[57]=e,t[58]=i,t[59]=a):a=t[59],a}if(K===`unavailable`){let e;return t[60]!==J||t[61]!==s?(e=J(`cloud-off`,s(`assistants.state.unavailable`)),t[60]=J,t[61]=s,t[62]=e):e=t[62],e}if(K===`onboarding`){let e;if(t[63]!==B||t[64]!==J||t[65]!==s){let n=s(`assistants.onboarding.title`),r=s(`assistants.onboarding.description`),i;t[67]===s?i=t[68]:(i=s(`assistants.onboarding.action`),t[67]=s,t[68]=i);let a;t[69]!==B||t[70]!==i?(a=(0,$.jsx)(j,{onClick:B,children:i}),t[69]=B,t[70]=i,t[71]=a):a=t[71],e=J(`ai-agent`,n,r,a),t[63]=B,t[64]=J,t[65]=s,t[66]=e}else e=t[66];return e}if(!_||!D){let e;return t[72]!==J||t[73]!==s?(e=J(`cloud-off`,s(`assistants.state.unavailable`)),t[72]=J,t[73]=s,t[74]=e):e=t[74],e}let Y;t[75]===D.name?Y=t[76]:(Y=M(D.name),t[75]=D.name,t[76]=Y);let X=Y,fe;t[77]!==D.enabled||t[78]!==g.isError||t[79]!==s?(fe=D.enabled?g.isError?s(`assistants.state.staleSnapshot`):null:s(`assistants.state.assistantDisabled`),t[77]=D.enabled,t[78]=g.isError,t[79]=s,t[80]=fe):fe=t[80];let pe=fe,me;t[81]!==x||t[82]!==m||t[83]!==B||t[84]!==H||t[85]!==oe||t[86]!==w||t[87]!==C||t[88]!==_||t[89]!==s?(me=m?null:(0,$.jsxs)(`section`,{className:`flex h-full min-h-0 w-[clamp(16rem,22vw,20rem)] shrink-0 flex-col overflow-hidden`,children:[(0,$.jsxs)(`header`,{className:`flex shrink-0 items-center gap-3 px-4 pb-3 pt-4 sm:px-5`,children:[(0,$.jsx)(`h1`,{className:`min-w-0 flex-1 truncate typography-ui-label font-semibold text-foreground`,children:s(`assistants.title`)}),(0,$.jsx)(j,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":s(`assistants.settings.create`),onClick:B,children:(0,$.jsx)(Z,{name:`add`,className:`size-4`})})]}),(0,$.jsx)($e,{snapshot:_,rowClassName:`flex justify-end px-4 pb-2 sm:px-5`}),(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 pb-4 sm:px-4`,role:`listbox`,"aria-label":s(`assistants.listAria`),children:(0,$.jsx)(`div`,{className:`flex flex-col gap-1 border-t border-border/40 pt-3`,children:x.map(e=>{let t=e.id===C,n=M(e.name);return(0,$.jsx)(En,{assistantID:e.id,unreadCount:e.unreadCount??0,summary:Sn(e.latestMessagePreview,s),displayName:n.displayName,avatarEmoji:n.avatarEmoji??void 0,selected:t,enabled:e.enabled,editLabel:s(`assistants.menu.edit`),deleteLabel:s(`assistants.settings.delete`),assignedSessionIDs:e.assignedSessionIDs,serverWorking:e.working,onSelect:()=>w(e.id),onEdit:()=>H(e.id),onDelete:()=>oe(e)},e.id)})})})]}),t[81]=x,t[82]=m,t[83]=B,t[84]=H,t[85]=oe,t[86]=w,t[87]=C,t[88]=_,t[89]=s,t[90]=me):me=t[90];let ge=U!==null,_e;t[91]!==U||t[92]!==ce||t[93]!==ge?(_e=(0,$.jsx)(yn,{assistant:U,open:ge,onOpenChange:ce}),t[91]=U,t[92]=ce,t[93]=ge,t[94]=_e):_e=t[94];let ve=!m&&`border-l border-[var(--surface-subtle)]`,ye;t[95]===ve?ye=t[96]:(ye=A(`relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background`,ve),t[95]=ve,t[96]=ye);let be;t[97]!==D||t[98]!==W||t[99]!==m||t[100]!==o||t[101]!==ne||t[102]!==X||t[103]!==s?(be=m?(0,$.jsx)(Tn,{assistant:D,onBack:W,onOpenSettings:o}):(0,$.jsxs)(`header`,{className:`flex h-16 shrink-0 items-center gap-3.5 border-b border-[var(--surface-subtle)]/70 px-5 sm:px-7`,children:[(0,$.jsx)(et,{name:D.id,emoji:X.avatarEmoji,size:30,label:X.displayName||D.name}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`div`,{className:`truncate typography-ui-label font-semibold tracking-[-0.01em] text-foreground`,children:X.displayName}),(0,$.jsx)(`div`,{className:`mt-1 truncate typography-micro leading-none text-muted-foreground/55`,children:s(`assistants.conversation.contactHint`)})]}),(0,$.jsx)(j,{type:`button`,variant:`ghost`,size:`icon`,className:`size-8 shrink-0 rounded-full text-muted-foreground/65 transition-colors hover:text-foreground`,onClick:ne,"aria-label":s(`assistants.conversation.openSettings`),children:(0,$.jsx)(Z,{name:`settings-3`,className:`size-4`})})]}),t[97]=D,t[98]=W,t[99]=m,t[100]=o,t[101]=ne,t[102]=X,t[103]=s,t[104]=be):be=t[104];let xe;t[105]!==f||t[106]!==D||t[107]!==m||t[108]!==pe?(xe=(0,$.jsx)(_n,{assistant:D,warning:pe,active:f,overlayHeader:m}),t[105]=f,t[106]=D,t[107]=m,t[108]=pe,t[109]=xe):xe=t[109];let Se;t[110]!==ye||t[111]!==be||t[112]!==xe?(Se=(0,$.jsxs)(`div`,{className:ye,children:[be,xe]}),t[110]=ye,t[111]=be,t[112]=xe,t[113]=Se):Se=t[113];let Ce;return t[114]!==me||t[115]!==_e||t[116]!==Se?(Ce=(0,$.jsxs)(`div`,{className:`relative flex h-full min-h-0 overflow-hidden bg-background`,"data-presentation":`workspace`,children:[me,_e,Se]}),t[114]=me,t[115]=_e,t[116]=Se,t[117]=Ce):Ce=t[117],Ce};function On(e){return e.activeMainTab===`assistant`}function kn(e){return e.isMobile}function An(e){return e.selectAssistant}function jn(e){return e.requestCreate}function Mn(){y.getState().setActiveMainTab(`chat`)}export{yn as a,$e as c,Sn as i,Qe as l,wn as n,rt as o,bn as r,et as s,Dn as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{i as t}from"./runtime-switch-LvWDU-SL.js";import{nt as n,rt as r}from"./vendor-base-ui-CnHfUmDN.js";import{t as i}from"./useUIStore-CxOoCv7B.js";import{l as a}from"./vendor-tanstack-react-query-D7pys_c9.js";import{r as o}from"./vendor-sonner-DVzioF3d.js";import{f as s}from"./button-bhVnVYB_.js";import{n as c}from"./Icon-C9ZHbwqp.js";import{n as l}from"./useRuntimeAPIs-DSLXJybW.js";import{n as u}from"./useEffectiveDirectory-BhhzFJgX.js";import{n as d,r as f,t as p}from"./fileQueries-B_s_B-fH.js";import{t as m}from"./diagram-Dx4UOZUn.js";var h=e(r(),1),g=n();function _(){let{t:e}=s(),{files:n}=l(),r=a(),_=u()??null,v=t(),[y,b]=h.useState(null),[x,S]=h.useState(``),C=h.useRef(null),w=h.useRef(!1),T=h.useRef(null),E=h.useRef(0),D=h.useRef(Promise.resolve()),O=i(e=>e.pendingDiagramFile),k=f({scopeDirectory:_,path:y},{enabled:!!y});if(y&&(T.current?.path!==y||T.current.transport!==v||T.current.scopeDirectory!==_)){let e=E.current+1;E.current=e,T.current={path:y,generation:e,transport:v,scopeDirectory:_}}h.useEffect(()=>(w.current=!0,()=>{w.current=!1,E.current+=1}),[]),h.useEffect(()=>{if(!O)return;let e=i.getState().consumePendingDiagramFile();if(e){let t=E.current+1;E.current=t,T.current={path:e,generation:t,transport:v,scopeDirectory:_},b(e)}},[_,O,v]),h.useEffect(()=>{let e=T.current;if(!(!e||e.path!==y||e.transport!==v||e.scopeDirectory!==_)){if(k.data!==void 0){S(k.data);return}k.isError&&S(``)}},[_,y,k.data,k.isError,v]);let A=h.useCallback(async()=>{let t=C.current?.getXml(),i=T.current,a=n?.writeFile;if(!y||!a||!t||t===x||i?.path!==y)return;let{path:s,generation:c,scopeDirectory:l,transport:u}=i,f=D.current.then(async()=>{try{if(!(await a(s,t))?.success)throw Error(e(`filesView.toast.writeFileFailed`));let n={scopeDirectory:l,path:s};await r.cancelQueries({queryKey:p(n,u),exact:!0}),d(r,n,u,t);let i=T.current;w.current&&i?.path===s&&i.generation===c&&i.transport===u&&i.scopeDirectory===l&&S(t)}catch(t){o.error(t instanceof Error?t.message:e(`filesView.toast.saveFailed`))}});D.current=f.catch(()=>void 0),await f},[y,n,r,e,x]),j=y?y.split(`/`).pop()||y:``;return y?k.isPending?(0,g.jsx)(`div`,{className:`flex h-full items-center justify-center p-3`,children:(0,g.jsx)(c,{name:`loader-4`,className:`size-4 animate-spin`})}):(0,g.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border/30 px-3 py-1.5`,children:[(0,g.jsx)(c,{name:`file`,className:`size-4 shrink-0 text-muted-foreground`}),(0,g.jsx)(`span`,{className:`typography-ui text-muted-foreground truncate flex-1`,children:j}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>void A(),className:`size-6 flex items-center justify-center rounded-md text-foreground hover:bg-interactive-hover/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary`,title:e(`filesView.diagram.saveDiagram`),children:(0,g.jsx)(c,{name:`save-3`,className:`size-4`})}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>i.getState().setActiveMainTab(`chat`),className:`size-6 flex items-center justify-center rounded-md text-muted-foreground hover:bg-interactive-hover/50 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary`,title:e(`filesView.diagram.closeDiagramView`),children:(0,g.jsx)(c,{name:`close`,className:`size-4`})})]}),(0,g.jsx)(`div`,{className:`flex-1 min-h-0`,children:(0,g.jsx)(m,{ref:C,xml:x,className:`h-full`})})]}):(0,g.jsx)(`div`,{className:`flex h-full items-center justify-center p-3`,children:(0,g.jsx)(`div`,{className:`typography-ui text-muted-foreground`,children:e(`filesView.editor.pickFileFromTree`)})})}export{_ as DiagramView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{ln as t}from"./persistence-DwRBC4zl.js";import{nt as n,rt as r}from"./vendor-base-ui-CnHfUmDN.js";import{n as i}from"./vendor-react-DLPElpoQ.js";import{r as a}from"./button-bhVnVYB_.js";import{f as o,p as s}from"./imageSource-BlAJJUEI.js";var c=500,l=12,u=(e={})=>{let t=e.delayMs??c,n=(e.moveThresholdPx??l)**2,r=e.schedule??((e,t)=>setTimeout(e,t)),i=e.clear??(e=>clearTimeout(e)),a=null,o=null,s=(t=!1)=>{a&&(i(a.timer),a=null,t||e.onPressedKeyChange?.(null))};return{start:({pointerId:n,key:i,clientX:c,clientY:l,onTrigger:u})=>{s(),e.onPressedKeyChange?.(i),a={pointerId:n,key:i,startX:c,startY:l,timer:r(()=>{!a||a.pointerId!==n||a.key!==i||(a.triggered=!0,o=i,u())},t),triggered:!1}},move:(e,t,r)=>{if(a?.pointerId!==e||a.triggered)return;let i=t-a.startX,o=r-a.startY;i*i+o*o>n&&s()},end:e=>{a?.pointerId===e&&s(a.triggered)},cancel:e=>{a?.pointerId===e&&s()},openFromContextMenu:(t,n)=>{s(),o=t,e.onPressedKeyChange?.(t),n()},consumeClick:e=>o===e&&(o=null,!0),reset:()=>{s(),o=null,e.onPressedKeyChange?.(null)}}},d=`#openchamber-skill:`,f=`#openchamber-agent:`,p=e=>`https://opencode.ai/docs/agents/#${encodeURIComponent(e)}`,m=e=>`${d}${encodeURIComponent(e)}`,h=e=>`${f}${encodeURIComponent(e)}`,g=e=>{if(!e?.startsWith(d))return null;try{return decodeURIComponent(e.slice(19))}catch{return null}},_=e=>{if(!e?.startsWith(f))return null;try{return decodeURIComponent(e.slice(19))}catch{return null}},v=6e5,y=new Map,b=e=>{let t=s(e);if(!t)return;let n=y.get(t);if(n){if(n.expiresAt<=Date.now()){y.delete(t);return}return n.outsideFileGrant}},x=(e,t,n)=>{let r=s(e);!r||!t||y.set(r,{outsideFileGrant:t,expiresAt:typeof n==`number`&&Number.isFinite(n)?n:Date.now()+v})},S=async(e,n)=>{let r=s(e);if(!r||!n||o(r,n))return;let i=b(r);if(i)return i;let a=await t(r);if(!(!a.success||!a.path||!a.outsideFileGrant))return x(a.path,a.outsideFileGrant),s(a.path)!==r&&x(r,a.outsideFileGrant),a.outsideFileGrant},C=[`user-blocking`,`visible`,`background`],w=e=>{let t={"user-blocking":{head:null,tail:null},visible:{head:null,tail:null},background:{head:null,tail:null}},n=Math.max(1,Math.floor(e.maxTasksPerFrame)),r=Math.max(1,e.frameBudgetMs),i=null,a=!1,o=0,s=e=>{let n=t[e.priority];e.previous=n.tail,n.tail?n.tail.next=e:n.head=e,n.tail=e},c=e=>{let n=t[e.priority];e.previous?e.previous.next=e.next:n.head=e.next,e.next?e.next.previous=e.previous:n.tail=e.previous,e.next=null,e.previous=null},l=()=>{for(let e of C){let n=t[e].head;if(n)return c(n),n.consumed=!0,--o,n}return null},u=()=>{i===null&&o!==0&&(i=e.requestFrame(d))},d=()=>{i=null;let t=e.now(),a=0;for(;o>0&&a<n;){let n=l();if(!n||(n.run(),a+=1,e.now()-t>=r))break}u()},f=()=>{i!==null||a||o===0||(a=!0,i=e.requestFrame(()=>{i=null,a=!1,u()}))};return{enqueue(t,n){let r={cancelled:!1,consumed:!1,next:null,previous:null,priority:n?.priority??`background`,run:t};return s(r),o+=1,!a&&i===null&&f(),()=>{r.cancelled||r.consumed||(r.cancelled=!0,c(r),--o,o===0&&(i!==null&&(e.cancelFrame(i),i=null),a=!1))}},clear(){for(let e of C){let n=t[e],r=n.head;for(;r;){let e=r.next;r.cancelled=!0,r.next=null,r.previous=null,r=e}n.head=null,n.tail=null}o=0,i!==null&&(e.cancelFrame(i),i=null),a=!1}}},T=null,E=()=>typeof window>`u`?null:T||(T=w({requestFrame:e=>window.requestAnimationFrame(e),cancelFrame:e=>window.cancelAnimationFrame(e),now:()=>performance.now(),maxTasksPerFrame:2,frameBudgetMs:6}),T),D=(e,t)=>{let n=E();return n?n.enqueue(e,t):(e(),()=>{})},O={textThrottleMs:20,markdownPaceMs:64},k={textThrottleMs:100,markdownPaceMs:128},A=e=>e===`android`?k:O,j=i(),M=e(r(),1),N=n(),P=M.createContext(!1),F=e=>{let t=(0,j.c)(3),{disabled:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,N.jsx)(P.Provider,{value:n,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i},I=e=>{let t=(0,j.c)(8),{children:n,className:r}=e,[i,o]=M.useState(!1),s,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=null,t=()=>o(!0);return typeof window<`u`&&typeof window.requestAnimationFrame==`function`?e=window.requestAnimationFrame(t):t(),()=>{e!==null&&typeof window<`u`&&typeof window.cancelAnimationFrame==`function`&&window.cancelAnimationFrame(e)}},c=[],t[0]=s,t[1]=c):(s=t[0],c=t[1]),M.useEffect(s,c);let l=i?`opacity-100 translate-y-0`:`opacity-0 translate-y-2`,u;t[2]!==r||t[3]!==l?(u=a(`w-full transition-all duration-300 ease-out`,l,r),t[2]=r,t[3]=l,t[4]=u):u=t[4];let d;return t[5]!==n||t[6]!==u?(d=(0,N.jsx)(`div`,{className:u,children:n}),t[5]=n,t[6]=u,t[7]=d):d=t[7],d},L=e=>{let t=(0,j.c)(5),{children:n,className:r,skipAnimation:i,forceAnimation:a,ignoreContextDisabled:o,respectReducedMotion:s}=e,c=a!==void 0&&a,l=o!==void 0&&o,u=s!==void 0&&s,d=M.useContext(P),f=u&&typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;if(!c||i||!l&&d||f){let e;return t[0]===n?e=t[1]:(e=(0,N.jsx)(N.Fragment,{children:n}),t[0]=n,t[1]=e),e}let p;return t[2]!==n||t[3]!==r?(p=(0,N.jsx)(I,{className:r,children:n}),t[2]=n,t[3]=r,t[4]=p):p=t[4],p};export{S as a,p as c,g as d,u as f,D as i,m as l,L as n,b as o,A as r,h as s,F as t,_ as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{nt as t,rt as n}from"./vendor-base-ui-CnHfUmDN.js";import{r}from"./button-bhVnVYB_.js";var i=e(n(),1),a={add:`<path d="M5 12h14" /> <path d="M12 5v14" />`,"add-circle":`<circle cx="12" cy="12" r="10" /> <path d="M8 12h8" /> <path d="M12 8v8" />`,"ai-agent":`<rect x="4" y="7.5" width="16" height="13" rx="4.5" /><path d="M12 7.5V4.75" /><circle cx="12" cy="3.5" r="1.25" /><path d="M1.75 12.5v3M22.25 12.5v3M9 12.5v2M15 12.5v2" />`,"ai-agent-fill":`<path d="M12 8V4H8" fill="currentColor"/> <rect width="16" height="12" x="4" y="8" rx="2" /> <path d="M2 14h2" fill="currentColor"/> <path d="M20 14h2" fill="currentColor"/> <path d="M15 13v2" fill="currentColor"/> <path d="M9 13v2" fill="currentColor"/>`,"ai-generate-2":`<path d="m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72" /> <path d="m14 7 3 3" /> <path d="M5 6v4" /> <path d="M19 14v4" /> <path d="M10 2v2" /> <path d="M7 8H3" /> <path d="M21 16h-4" /> <path d="M11 3H9" />`,alert:`<circle cx="12" cy="12" r="10" /> <line x1="12" x2="12" y1="8" y2="12" /> <line x1="12" x2="12.01" y1="16" y2="16" />`,"alert-fill":`<path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z" fill="currentColor"/>`,"align-justify":`<path d="M3 5h18" /> <path d="M3 12h18" /> <path d="M3 19h18" />`,apple:`<path d="M12 6.528V3a1 1 0 0 1 1-1h0" /> <path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21" />`,"apps-2-ai":`<rect width="7" height="7" x="3" y="3" rx="1" /> <rect width="7" height="7" x="14" y="3" rx="1" /> <rect width="7" height="7" x="14" y="14" rx="1" /> <rect width="7" height="7" x="3" y="14" rx="1" />`,archive:`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" /> <path d="M10 12h4" />`,"archive-stack":`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" /> <path d="M10 12h4" />`,"arrow-down":`<path d="M12 5v14" /> <path d="m19 12-7 7-7-7" />`,"arrow-down-s":`<path d="m6 9 6 6 6-6" />`,"arrow-go-back":`<path d="M9 14 4 9l5-5" /><path d="M4 9h10.5a5.5 5.5 0 0 1 0 11H12" />`,"arrow-go-forward":`<path d="m15 14 5-5-5-5" /> <path d="M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" />`,"arrow-left":`<path d="m12 19-7-7 7-7" /> <path d="M19 12H5" />`,"arrow-left-long":`<path d="m12 19-7-7 7-7" /> <path d="M19 12H5" />`,"arrow-left-right":`<path d="M8 7H3v5" /><path d="m3 7 7 7" /><path d="M16 17h5v-5" /><path d="m21 17-7-7" />`,"arrow-left-s":`<path d="m15 18-6-6 6-6" />`,"arrow-right":`<path d="M5 12h14" /> <path d="m12 5 7 7-7 7" />`,"arrow-right-s":`<path d="m9 18 6-6-6-6" />`,"arrow-up":`<path d="m5 12 7-7 7 7" /> <path d="M12 19V5" />`,"arrow-up-double":`<path d="m17 11-5-5-5 5" /> <path d="m17 18-5-5-5 5" />`,"arrow-up-s":`<path d="m18 15-6-6-6 6" />`,"attachment-2":`<path d="m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" />`,"bar-chart-2":`<path d="M3 3v16a2 2 0 0 0 2 2h16" /> <path d="M18 17V9" /> <path d="M13 17V5" /> <path d="M8 17v-3" />`,"bar-chart-box":`<path d="M3 3v16a2 2 0 0 0 2 2h16" /> <path d="M18 17V9" /> <path d="M13 17V5" /> <path d="M8 17v-3" />`,book:`<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" />`,"book-open":`<path d="M12 7v14" /> <path d="M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z" />`,booklet:`<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" />`,brain:`<path d="M12 18V5" /> <path d="M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4" /> <path d="M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5" /> <path d="M17.997 5.125a4 4 0 0 1 2.526 5.77" /> <path d="M18 18a4 4 0 0 0 2-7.464" /> <path d="M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" /> <path d="M6 18a4 4 0 0 1-2-7.464" /> <path d="M6.003 5.125a4 4 0 0 0-2.526 5.77" />`,"brain-ai-3":`<path d="M12 18V5" /> <path d="M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4" /> <path d="M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5" /> <path d="M17.997 5.125a4 4 0 0 1 2.526 5.77" /> <path d="M18 18a4 4 0 0 0 2-7.464" /> <path d="M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" /> <path d="M6 18a4 4 0 0 1-2-7.464" /> <path d="M6.003 5.125a4 4 0 0 0-2.526 5.77" />`,briefcase:`<path d="M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16" /> <rect width="20" height="14" x="2" y="6" rx="2" />`,bug:`<path d="M12 20v-9" /> <path d="M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z" /> <path d="M14.12 3.88 16 2" /> <path d="M21 21a4 4 0 0 0-3.81-4" /> <path d="M21 5a4 4 0 0 1-3.55 3.97" /> <path d="M22 13h-4" /> <path d="M3 21a4 4 0 0 1 3.81-4" /> <path d="M3 5a4 4 0 0 0 3.55 3.97" /> <path d="M6 13H2" /> <path d="m8 2 1.88 1.88" /> <path d="M9 7.13V6a3 3 0 1 1 6 0v1.13" />`,calendar:`<path d="M8 2v4" /> <path d="M16 2v4" /> <rect width="18" height="18" x="3" y="4" rx="2" /> <path d="M3 10h18" />`,"calendar-schedule":`<path d="M16 14v2.2l1.6 1" /> <path d="M16 2v4" /> <path d="M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5" /> <path d="M3 10h5" /> <path d="M8 2v4" /> <circle cx="16" cy="16" r="6" />`,camera:`<path d="M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z" /> <circle cx="12" cy="13" r="3" />`,"chat-1":`<path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" />`,"chat-3":`<path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" />`,"chat-4":`<path d="M12 3a9 9 0 0 1 7.45 14.05L21 21l-4.05-1.55A9 9 0 1 1 12 3Z" />`,"chat-ai-3":`<path d="M12 6V2H8" /> <path d="M15 11v2" /> <path d="M2 12h2" /> <path d="M20 12h2" /> <path d="M20 16a2 2 0 0 1-2 2H8.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 4 20.286V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2z" /> <path d="M9 11v2" />`,"chat-history":`<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /> <path d="M3 3v5h5" /> <path d="M12 7v5l4 2" />`,"chat-new":`<path d="M11.5 4.5H9A4.5 4.5 0 0 0 4.5 9v6.5A4.5 4.5 0 0 0 9 20h6.5a4.5 4.5 0 0 0 4.5-4.5V13" /><path d="m10 14.25.6-1.8a2 2 0 0 1 .48-.78l6.62-6.62a1.91 1.91 0 0 1 2.7 2.7l-6.62 6.62a2 2 0 0 1-.78.48l-1.8.6a.95.95 0 0 1-1.2-1.2Z" />`,"chat-thread":`<path d="M10.5 7C11.3 4.9 13.1 3.5 15.25 3.5c3.45 0 6.25 2.45 6.25 5.5 0 1.13-.38 2.18-1.03 3.06l.58 2.14-2.3-.75c-.4.18-.8.32-1.2.43" /><path d="M8.5 8.25c-3.6 0-6.5 2.55-6.5 5.75 0 1.21.42 2.33 1.13 3.25l-.63 2.27 2.48-.8c1.04.56 2.24.88 3.52.88 3.6 0 6.5-2.55 6.5-5.75S12.1 8.25 8.5 8.25Z" />`,check:`<path d="M20 6 9 17l-5-5" />`,checkbox:`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="m9 12 2 2 4-4" />`,"checkbox-blank":`<rect width="18" height="18" x="3" y="3" rx="2" />`,"checkbox-blank-circle-fill":`<circle cx="12" cy="12" r="10" fill="currentColor"/>`,"checkbox-circle":`<circle cx="12" cy="12" r="10" /> <path d="m9 12 2 2 4-4" />`,"checkbox-circle-fill":`<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM17.4571 9.45711L11 15.9142L6.79289 11.7071L8.20711 10.2929L11 13.0858L16.0429 8.04289L17.4571 9.45711Z" fill="currentColor"/>`,"checkbox-multiple":`<path d="m12 15 2 2 4-4" /> <rect width="14" height="14" x="8" y="8" rx="2" ry="2" /> <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />`,clipboard:`<rect width="8" height="4" x="8" y="2" rx="1" ry="1" /> <path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" />`,close:`<path d="M18 6 6 18" /> <path d="m6 6 12 12" />`,"close-circle":`<circle cx="12" cy="12" r="10" /> <path d="m15 9-6 6" /> <path d="m9 9 6 6" />`,cloud:`<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" />`,"cloud-off":`<path d="M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057" /> <path d="M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78" /> <path d="m2 2 20 20" />`,code:`<path d="m16 18 6-6-6-6" /> <path d="m8 6-6 6 6 6" />`,"code-ai":`<path d="m16 18 6-6-6-6" /> <path d="m8 6-6 6 6 6" />`,"code-box":`<path d="m18 16 4-4-4-4" /> <path d="m6 8-4 4 4 4" /> <path d="m14.5 4-5 16" />`,"code-sslash":`<path d="m16 18 6-6-6-6" /> <path d="m8 6-6 6 6 6" />`,command:`<path d="M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3" />`,"compass-3":`<circle cx="12" cy="12" r="10" /> <path d="m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" />`,computer:`<rect width="20" height="14" x="2" y="3" rx="2" /> <line x1="8" x2="16" y1="21" y2="21" /> <line x1="12" x2="12" y1="17" y2="21" />`,"contract-up-down":`<path d="m7 20 5-5 5 5" /> <path d="m7 4 5 5 5-5" />`,"corner-down-left":`<path d="M20 4v7a4 4 0 0 1-4 4H4" /> <path d="m9 10-5 5 5 5" />`,cursor:`<path d="M12.586 12.586 19 19" /> <path d="M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z" />`,"database-2":`<ellipse cx="12" cy="5" rx="9" ry="3" /> <path d="M3 5V19A9 3 0 0 0 21 19V5" /> <path d="M3 12A9 3 0 0 0 21 12" />`,"delete-bin":`<path d="M10 11v6" /> <path d="M14 11v6" /> <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" /> <path d="M3 6h18" /> <path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />`,"discord-fill":`<path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" fill="currentColor"/>`,"donut-chart":`<path d="M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z" /> <path d="M21.21 15.89A10 10 0 1 1 8 2.83" />`,"donut-chart-fill":`<path d="M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z" fill="currentColor"/> <path d="M21.21 15.89A10 10 0 1 1 8 2.83" fill="currentColor"/>`,download:`<path d="M12 15V3" /> <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /> <path d="m7 10 5 5 5-5" />`,"download-cloud":`<path d="M12 13v8l-4-4" /> <path d="m12 21 4-4" /> <path d="M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284" />`,"drag-move-2":`<circle cx="9" cy="12" r="1" /> <circle cx="9" cy="5" r="1" /> <circle cx="9" cy="19" r="1" /> <circle cx="15" cy="12" r="1" /> <circle cx="15" cy="5" r="1" /> <circle cx="15" cy="19" r="1" />`,draggable:`<circle cx="9" cy="12" r="1" /> <circle cx="9" cy="5" r="1" /> <circle cx="9" cy="19" r="1" /> <circle cx="15" cy="12" r="1" /> <circle cx="15" cy="5" r="1" /> <circle cx="15" cy="19" r="1" />`,earth:`<circle cx="12" cy="12" r="10" /> <path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" /> <path d="M2 12h20" />`,edit:`<path d="M15 5.5 18.5 9" /><path d="M4.5 19.5 5.75 14.75 15.25 5.25a2.1 2.1 0 0 1 3 0l.5.5a2.1 2.1 0 0 1 0 3L9.25 18.25Z" />`,"edit-2":`<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" />`,"emotion-happy":`<circle cx="12" cy="12" r="10" /> <path d="M8 14s1.5 2 4 2 4-2 4-2" /> <line x1="9" x2="9.01" y1="9" y2="9" /> <line x1="15" x2="15.01" y1="9" y2="9" />`,"equalizer-2":`<path d="M10 5H3" /> <path d="M12 19H3" /> <path d="M14 3v4" /> <path d="M16 17v4" /> <path d="M21 12h-9" /> <path d="M21 19h-5" /> <path d="M21 5h-7" /> <path d="M8 10v4" /> <path d="M8 12H3" />`,"error-warning":`<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" /> <path d="M12 9v4" /> <path d="M12 17h.01" />`,"error-warning-fill":`<path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 15V17H13V15H11ZM11 7V13H13V7H11Z" fill="currentColor"/>`,"expand-up-down":`<path d="m7 15 5 5 5-5" /> <path d="m7 9 5-5 5 5" />`,"external-link":`<path d="M15 3h6v6" /> <path d="M10 14 21 3" /> <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />`,eye:`<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" /> <circle cx="12" cy="12" r="3" />`,"eye-off":`<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" /> <path d="M14.084 14.158a3 3 0 0 1-4.242-4.242" /> <path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" /> <path d="m2 2 20 20" />`,file:`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" />`,"file-add":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M9 15h6" /> <path d="M12 18v-6" />`,"file-check":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="m9 15 2 2 4-4" />`,"file-check-fill":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" fill="currentColor"/> <path d="M14 2v5a1 1 0 0 0 1 1h5" fill="currentColor"/> <path d="m9 15 2 2 4-4" fill="currentColor"/>`,"file-code":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10 12.5 8 15l2 2.5" /> <path d="m14 12.5 2 2.5-2 2.5" />`,"file-copy":`<rect width="14" height="14" x="8" y="8" rx="3.5" ry="3.5" /><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />`,"file-copy-2":`<path d="M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8" /> <path d="M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z" /> <path d="M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1" />`,"file-download":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M12 18v-6" /> <path d="m9 15 3 3 3-3" />`,"file-edit":`<path d="M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z" />`,"file-image":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <circle cx="10" cy="12" r="2" /> <path d="m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22" />`,"file-list-2":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10 9H8" /> <path d="M16 13H8" /> <path d="M16 17H8" />`,"file-music":`<path d="M11.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v10.35" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M8 20v-7l3 1.474" /> <circle cx="6" cy="20" r="2" />`,"file-pdf":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10 9H8" /> <path d="M16 13H8" /> <path d="M16 17H8" />`,"file-search":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <circle cx="11.5" cy="14.5" r="2.5" /> <path d="M13.3 16.3 15 18" />`,"file-text":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M10 9H8" /> <path d="M16 13H8" /> <path d="M16 17H8" />`,"file-transfer":`<path d="M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-1" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M2 15h10" /> <path d="m9 18 3-3-3-3" />`,"file-video":`<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /> <path d="M14 2v5a1 1 0 0 0 1 1h5" /> <path d="M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z" />`,flashlight:`<path d="M12 13v1" /> <path d="M17 2a1 1 0 0 1 1 1v4a3 3 0 0 1-.6 1.8l-.6.8A4 4 0 0 0 16 12v8a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2v-8a4 4 0 0 0-.8-2.4l-.6-.8A3 3 0 0 1 6 7V3a1 1 0 0 1 1-1z" /> <path d="M6 6h12" />`,flask:`<path d="M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2" /> <path d="M6.453 15h11.094" /> <path d="M8.5 2h7" />`,"fold-vertical":`<path d="M12 22v-6" /> <path d="M12 8V2" /> <path d="M4 12H2" /> <path d="M10 12H8" /> <path d="M16 12h-2" /> <path d="M22 12h-2" /> <path d="m15 19-3-3-3 3" /> <path d="m15 5-3 3-3-3" />`,folder:`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-3":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-3-fill":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-6":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-add":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" /><path d="M12 11v6" /><path d="M9 14h6" />`,"folder-open":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-open-fill":`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,"folder-received":`<path d="M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1" /> <path d="M2 13h10" /> <path d="m9 16 3-3-3-3" />`,folders:`<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />`,fullscreen:`<path d="M8 3H5a2 2 0 0 0-2 2v3" /> <path d="M21 8V5a2 2 0 0 0-2-2h-3" /> <path d="M3 16v3a2 2 0 0 0 2 2h3" /> <path d="M16 21h3a2 2 0 0 0 2-2v-3" />`,"fullscreen-exit":`<path d="M8 3v3a2 2 0 0 1-2 2H3" /> <path d="M21 8h-3a2 2 0 0 1-2-2V3" /> <path d="M3 16h3a2 2 0 0 1 2 2v3" /> <path d="M16 21v-3a2 2 0 0 1 2-2h3" />`,gamepad:`<line x1="6" x2="10" y1="11" y2="11" /> <line x1="8" x2="8" y1="9" y2="13" /> <line x1="15" x2="15.01" y1="12" y2="12" /> <line x1="18" x2="18.01" y1="10" y2="10" /> <path d="M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z" />`,"git-branch":`<circle cx="18" cy="6" r="2.6" /><circle cx="6" cy="18" r="2.6" /><path d="M6 15.4V3" /><path d="M18 8.6c0 4.6-3.4 7.4-9.4 8" />`,"git-close-pull-request":`<circle cx="6" cy="6" r="3" /> <path d="M6 9v12" /> <path d="m21 3-6 6" /> <path d="m21 9-6-6" /> <path d="M18 11.5V15" /> <circle cx="18" cy="18" r="3" />`,"git-commit":`<circle cx="12" cy="12" r="3" /> <line x1="3" x2="9" y1="12" y2="12" /> <line x1="15" x2="21" y1="12" y2="12" />`,"git-merge":`<circle cx="18" cy="18" r="3" /> <circle cx="6" cy="6" r="3" /> <path d="M6 21V9a9 9 0 0 0 9 9" />`,"git-pr-draft":`<circle cx="18" cy="18" r="3" /> <circle cx="6" cy="6" r="3" /> <path d="M18 6V5" /> <path d="M18 11v-1" /> <line x1="6" x2="6" y1="9" y2="21" />`,"git-pull-request":`<circle cx="18" cy="18" r="3" /> <circle cx="6" cy="6" r="3" /> <path d="M13 6h3a2 2 0 0 1 2 2v7" /> <line x1="6" x2="6" y1="9" y2="21" />`,"git-repository":`<path d="M18 19a5 5 0 0 1-5-5v8" /> <path d="M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5" /> <circle cx="13" cy="12" r="2" /> <circle cx="20" cy="19" r="2" />`,github:`<path d="M5.88401 18.6533C5.58404 18.4526 5.32587 18.1975 5.0239 17.8369C4.91473 17.7065 4.47283 17.1524 4.55811 17.2583C4.09533 16.6833 3.80296 16.417 3.50156 16.3089C2.9817 16.1225 2.7114 15.5499 2.89784 15.0301C3.08428 14.5102 3.65685 14.2399 4.17672 14.4263C4.92936 14.6963 5.43847 15.1611 6.12425 16.0143C6.03025 15.8974 6.46364 16.441 6.55731 16.5529C6.74784 16.7804 6.88732 16.9182 6.99629 16.9911C7.20118 17.1283 7.58451 17.1874 8.14709 17.1311C8.17065 16.7489 8.24136 16.3783 8.34919 16.0358C5.38097 15.3104 3.70116 13.3952 3.70116 9.63971C3.70116 8.40085 4.0704 7.28393 4.75917 6.3478C4.5415 5.45392 4.57433 4.37284 5.06092 3.15636C5.1725 2.87739 5.40361 2.66338 5.69031 2.57352C5.77242 2.54973 5.81791 2.53915 5.89878 2.52673C6.70167 2.40343 7.83573 2.69705 9.31449 3.62336C10.181 3.41879 11.0885 3.315 12.0012 3.315C12.9129 3.315 13.8196 3.4186 14.6854 3.62277C16.1619 2.69 17.2986 2.39649 18.1072 2.52651C18.1919 2.54013 18.2645 2.55783 18.3249 2.57766C18.6059 2.66991 18.8316 2.88179 18.9414 3.15636C19.4279 4.37256 19.4608 5.45344 19.2433 6.3472C19.9342 7.28337 20.3012 8.39208 20.3012 9.63971C20.3012 13.3968 18.627 15.3048 15.6588 16.032C15.7837 16.447 15.8496 16.9105 15.8496 17.4121C15.8496 18.0765 15.8471 18.711 15.8424 19.4225C15.8412 19.6127 15.8397 19.8159 15.8375 20.1281C16.2129 20.2109 16.5229 20.5077 16.6031 20.9089C16.7114 21.4504 16.3602 21.9773 15.8186 22.0856C14.6794 22.3134 13.8353 21.5538 13.8353 20.5611C13.8353 20.4708 13.836 20.3417 13.8375 20.1145C13.8398 19.8015 13.8412 19.599 13.8425 19.4094C13.8471 18.7019 13.8496 18.0716 13.8496 17.4121C13.8496 16.7148 13.6664 16.2602 13.4237 16.051C12.7627 15.4812 13.0977 14.3973 13.965 14.2999C16.9314 13.9666 18.3012 12.8177 18.3012 9.63971C18.3012 8.68508 17.9893 7.89571 17.3881 7.23559C17.1301 6.95233 17.0567 6.54659 17.199 6.19087C17.3647 5.77663 17.4354 5.23384 17.2941 4.57702L17.2847 4.57968C16.7928 4.71886 16.1744 5.0198 15.4261 5.5285C15.182 5.69438 14.8772 5.74401 14.5932 5.66413C13.7729 5.43343 12.8913 5.315 12.0012 5.315C11.111 5.315 10.2294 5.43343 9.40916 5.66413C9.12662 5.74359 8.82344 5.69492 8.57997 5.53101C7.8274 5.02439 7.2056 4.72379 6.71079 4.58376C6.56735 5.23696 6.63814 5.77782 6.80336 6.19087C6.94565 6.54659 6.87219 6.95233 6.61423 7.23559C6.01715 7.8912 5.70116 8.69376 5.70116 9.63971C5.70116 12.8116 7.07225 13.9683 10.023 14.2999C10.8883 14.3971 11.2246 15.4769 10.5675 16.0482C10.3751 16.2156 10.1384 16.7802 10.1384 17.4121V20.5611C10.1384 21.5474 9.30356 22.2869 8.17878 22.09C7.63476 21.9948 7.27093 21.4766 7.36613 20.9326C7.43827 20.5204 7.75331 20.2116 8.13841 20.1276V19.1381C7.22829 19.1994 6.47656 19.0498 5.88401 18.6533Z" fill="currentColor"/>`,"github-fill":`<path d="M12.001 2C6.47598 2 2.00098 6.475 2.00098 12C2.00098 16.425 4.86348 20.1625 8.83848 21.4875C9.33848 21.575 9.52598 21.275 9.52598 21.0125C9.52598 20.775 9.51348 19.9875 9.51348 19.15C7.00098 19.6125 6.35098 18.5375 6.15098 17.975C6.03848 17.6875 5.55098 16.8 5.12598 16.5625C4.77598 16.375 4.27598 15.9125 5.11348 15.9C5.90098 15.8875 6.46348 16.625 6.65098 16.925C7.55098 18.4375 8.98848 18.0125 9.56348 17.75C9.65098 17.1 9.91348 16.6625 10.201 16.4125C7.97598 16.1625 5.65098 15.3 5.65098 11.475C5.65098 10.3875 6.03848 9.4875 6.67598 8.7875C6.57598 8.5375 6.22598 7.5125 6.77598 6.1375C6.77598 6.1375 7.61348 5.875 9.52598 7.1625C10.326 6.9375 11.176 6.825 12.026 6.825C12.876 6.825 13.726 6.9375 14.526 7.1625C16.4385 5.8625 17.276 6.1375 17.276 6.1375C17.826 7.5125 17.476 8.5375 17.376 8.7875C18.0135 9.4875 18.401 10.375 18.401 11.475C18.401 15.3125 16.0635 16.1625 13.8385 16.4125C14.201 16.725 14.5135 17.325 14.5135 18.2625C14.5135 19.6 14.501 20.675 14.501 21.0125C14.501 21.275 14.6885 21.5875 15.1885 21.4875C19.259 20.1133 21.9999 16.2963 22.001 12C22.001 6.475 17.526 2 12.001 2Z" fill="currentColor"/>`,global:`<circle cx="12" cy="12" r="10" /> <path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" /> <path d="M2 12h20" />`,"graduation-cap":`<path d="M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z" /> <path d="M22 10v6" /> <path d="M6 12.5V16a6 3 0 0 0 12 0v-3.5" />`,hammer:`<path d="m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9" /> <path d="m18 15 4-4" /> <path d="m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5" />`,heart:`<path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5" />`,history:`<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /> <path d="M3 3v5h5" /> <path d="M12 7v5l4 2" />`,home:`<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" /> <path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />`,hourglass:`<path d="M8 3.5h8c.8 0 1.5.7 1.5 1.5 0 2.6-1.8 4.5-3.8 5.9-.4.3-.7.6-.7 1.1s.3.8.7 1.1c2 1.4 3.8 3.3 3.8 5.9 0 .8-.7 1.5-1.5 1.5H8c-.8 0-1.5-.7-1.5-1.5 0-2.6 1.8-4.5 3.8-5.9.4-.3.7-.6.7-1.1s-.3-.8-.7-1.1C8.3 9.5 6.5 7.6 6.5 5c0-.8.7-1.5 1.5-1.5z" />`,"hourglass-fill":`<path d="M5 22h14" fill="currentColor"/> <path d="M5 2h14" fill="currentColor"/> <path d="M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22" fill="currentColor"/> <path d="M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2" fill="currentColor"/>`,"image-download":`<path d="M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21" /> <path d="m14 19 3 3v-5.5" /> <path d="m17 22 3-3" /> <circle cx="9" cy="9" r="2" />`,"inbox-archive":`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" /> <path d="M10 12h4" />`,"inbox-unarchive":`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h2" /> <path d="M20 8v11a2 2 0 0 1-2 2h-2" /> <path d="m9 15 3-3 3 3" /> <path d="M12 12v9" />`,"inbox-unarchive-fill":`<rect width="20" height="5" x="2" y="3" rx="1" /> <path d="M4 8v11a2 2 0 0 0 2 2h2" fill="currentColor"/> <path d="M20 8v11a2 2 0 0 1-2 2h-2" fill="currentColor"/> <path d="m9 15 3-3 3 3" fill="currentColor"/> <path d="M12 12v9" fill="currentColor"/>`,information:`<circle cx="12" cy="12" r="10" /> <path d="M12 16v-4" /> <path d="M12 8h.01" />`,"information-fill":`<path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 11V17H13V11H11ZM11 7V9H13V7H11Z" fill="currentColor"/>`,key:`<path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4" /> <path d="m21 2-9.6 9.6" /> <circle cx="7.5" cy="15.5" r="5.5" />`,"layout-column":`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M12 3v18" />`,"layout-left":`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M9 3v18" />`,"layout-left-rounded":`<rect width="18" height="18" x="3" y="3" rx="4" /><path d="M9.5 3v18" />`,"layout-right":`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M15 3v18" />`,leaf:`<path d="M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z" /> <path d="M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12" />`,lightbulb:`<path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5" /> <path d="M9 18h6" /> <path d="M10 22h4" />`,"link-unlink-m":`<path d="m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71" /> <path d="m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71" /> <line x1="8" x2="8" y1="2" y2="5" /> <line x1="2" x2="5" y1="8" y2="8" /> <line x1="16" x2="16" y1="19" y2="22" /> <line x1="19" x2="22" y1="16" y2="16" />`,"list-check-2":`<path d="M13 5h8" /> <path d="M13 12h8" /> <path d="M13 19h8" /> <path d="m3 17 2 2 4-4" /> <path d="m3 7 2 2 4-4" />`,"list-check-3":`<path d="M13 5h8" /> <path d="M13 12h8" /> <path d="M13 19h8" /> <path d="m3 17 2 2 4-4" /> <rect x="3" y="4" width="6" height="6" rx="1" />`,"list-unordered":`<path d="M3 5h.01" /> <path d="M3 12h.01" /> <path d="M3 19h.01" /> <path d="M8 5h13" /> <path d="M8 12h13" /> <path d="M8 19h13" />`,loader:`<path d="M12 2v4" /> <path d="m16.2 7.8 2.9-2.9" /> <path d="M18 12h4" /> <path d="m16.2 16.2 2.9 2.9" /> <path d="M12 18v4" /> <path d="m4.9 19.1 2.9-2.9" /> <path d="M2 12h4" /> <path d="m4.9 4.9 2.9 2.9" />`,"loader-4":`<path d="M21 12a9 9 0 1 1-6.219-8.56" />`,lock:`<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /> <path d="M7 11V7a5 5 0 0 1 10 0v4" />`,"lock-2":`<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /> <path d="M7 11V7a5 5 0 0 1 10 0v4" />`,"lock-unlock":`<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /> <path d="M7 11V7a5 5 0 0 1 9.9-1" />`,"loop-right-ai":`<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /> <path d="M21 3v5h-5" /> <path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /> <path d="M8 16H3v5" />`,macbook:`<path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z" /> <path d="M20.054 15.987H3.946" />`,"menu-2":`<path d="M4 5h16" /> <path d="M4 12h16" /> <path d="M4 19h16" />`,"menu-fold-2":`<rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M9 3v18" /> <path d="m16 15-3-3 3-3" />`,"menu-search":`<path d="m21 21-4.34-4.34" /> <circle cx="11" cy="11" r="8" />`,mic:`<path d="M12 19v3" /> <path d="M19 10v2a7 7 0 0 1-14 0v-2" /> <rect x="9" y="2" width="6" height="13" rx="3" />`,more:`<circle cx="12" cy="12" r="1" /> <circle cx="19" cy="12" r="1" /> <circle cx="5" cy="12" r="1" />`,"more-2":`<circle cx="12" cy="12" r="1" /> <circle cx="19" cy="12" r="1" /> <circle cx="5" cy="12" r="1" />`,"more-2-fill":`<circle cx="12" cy="12" r="1" fill="currentColor"/> <circle cx="19" cy="12" r="1" fill="currentColor"/> <circle cx="5" cy="12" r="1" fill="currentColor"/>`,music:`<path d="M9 18V5l12-2v13" /> <circle cx="6" cy="18" r="3" /> <circle cx="18" cy="16" r="3" />`,"node-tree":`<rect x="16" y="16" width="6" height="6" rx="1" /> <rect x="2" y="16" width="6" height="6" rx="1" /> <rect x="9" y="2" width="6" height="6" rx="1" /> <path d="M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3" /> <path d="M12 12V8" />`,"notification-3":`<path d="M10.268 21a2 2 0 0 0 3.464 0" /> <path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" />`,palette:`<path d="M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z" /> <circle cx="13.5" cy="6.5" r=".5" fill="currentColor" /> <circle cx="17.5" cy="10.5" r=".5" fill="currentColor" /> <circle cx="6.5" cy="12.5" r=".5" fill="currentColor" /> <circle cx="8.5" cy="7.5" r=".5" fill="currentColor" />`,pause:`<path d="M6 5H8V19H6V5ZM16 5H18V19H16V5Z" fill="currentColor"/>`,pencil:`<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /> <path d="m15 5 4 4" />`,"pencil-ai":`<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" /> <path d="M20 2v4" /> <path d="M22 4h-4" /> <circle cx="4" cy="20" r="2" />`,"pencil-ai-2":`<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" /> <path d="M20 2v4" /> <path d="M22 4h-4" /> <circle cx="4" cy="20" r="2" />`,"picture-in-picture-2":`<path d="M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4" /> <rect width="10" height="7" x="12" y="13" rx="2" />`,"pie-chart":`<path d="M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z" /> <path d="M21.21 15.89A10 10 0 1 1 8 2.83" />`,play:`<path d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" />`,"play-list-add":`<path d="M16 5H3" /> <path d="M11 12H3" /> <path d="M16 19H3" /> <path d="M18 9v6" /> <path d="M21 12h-6" />`,plug:`<path d="M12 22v-5" /> <path d="M15 8V2" /> <path d="M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z" /> <path d="M9 8V2" />`,"plug-2":`<path d="M12 22v-5" /> <path d="M15 8V2" /> <path d="M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z" /> <path d="M9 8V2" />`,pulse:`<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" />`,pushpin:`<path d="M12 17v5" /> <path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" />`,"pushpin-2":`<path d="M12 17v5" /> <path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z" />`,"pushpin-2-fill":`<path d="M22.3126 10.1753L20.8984 11.5895L20.1913 10.8824L15.9486 15.125L15.2415 18.6606L13.8273 20.0748L9.58466 15.8321L4.63492 20.7819L3.2207 19.3677L8.17045 14.4179L3.92781 10.1753L5.34202 8.76107L8.87756 8.05396L13.1202 3.81132L12.4131 3.10422L13.8273 1.69L22.3126 10.1753Z" fill="currentColor" />`,question:`<circle cx="12" cy="12" r="10" /> <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" /> <path d="M12 17h.01" />`,"record-circle":`<circle cx="12" cy="12" r="10" /> <circle cx="12" cy="12" r="1" />`,refresh:`<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" /> <path d="M21 3v5h-5" /> <path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" /> <path d="M8 16H3v5" />`,restart:`<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /> <path d="M3 3v5h5" />`,robot:`<path d="M12 8V4H8" /> <rect width="16" height="12" x="4" y="8" rx="2" /> <path d="M2 14h2" /> <path d="M20 14h2" /> <path d="M15 13v2" /> <path d="M9 13v2" />`,"robot-2":`<path d="M12 8V4H8" /> <rect width="16" height="12" x="4" y="8" rx="2" /> <path d="M2 14h2" /> <path d="M20 14h2" /> <path d="M15 13v2" /> <path d="M9 13v2" />`,rocket:`<path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" /> <path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09" /> <path d="M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z" /> <path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05" />`,"save-3":`<path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" /> <path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" /> <path d="M7 3v4a1 1 0 0 0 1 1h7" />`,"scales-3":`<path d="M12 3v18" /> <path d="m19 8 3 8a5 5 0 0 1-6 0zV7" /> <path d="M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1" /> <path d="m5 8 3 8a5 5 0 0 1-6 0zV7" /> <path d="M7 21h10" />`,"scan-2":`<path d="M3 7V5a2 2 0 0 1 2-2h2" /> <path d="M17 3h2a2 2 0 0 1 2 2v2" /> <path d="M21 17v2a2 2 0 0 1-2 2h-2" /> <path d="M7 21H5a2 2 0 0 1-2-2v-2" />`,scissors:`<circle cx="6" cy="6" r="3" /> <path d="M8.12 8.12 12 12" /> <path d="M20 4 8.12 15.88" /> <circle cx="6" cy="18" r="3" /> <path d="M14.8 14.8 20 20" />`,search:`<path d="m21 21-4.34-4.34" /> <circle cx="11" cy="11" r="8" />`,"search-eye":`<path d="M3 7V5a2 2 0 0 1 2-2h2" /> <path d="M17 3h2a2 2 0 0 1 2 2v2" /> <path d="M21 17v2a2 2 0 0 1-2 2h-2" /> <path d="M7 21H5a2 2 0 0 1-2-2v-2" /> <circle cx="12" cy="12" r="3" /> <path d="m16 16-1.9-1.9" />`,"send-plane":`<path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" /> <path d="m21.854 2.147-10.94 10.939" />`,"send-plane-2":`<path d="M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z" /> <path d="M6 12h16" />`,server:`<rect width="20" height="8" x="2" y="2" rx="2" ry="2" /> <rect width="20" height="8" x="2" y="14" rx="2" ry="2" /> <line x1="6" x2="6.01" y1="6" y2="6" /> <line x1="6" x2="6.01" y1="18" y2="18" />`,"settings-3":`<path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" /> <circle cx="12" cy="12" r="3" />`,"share-2":`<path d="M12 2v13" /> <path d="m16 6-4-4-4 4" /> <path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" />`,shield:`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" />`,"shield-check":`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" /> <path d="m9 12 2 2 4-4" />`,"shield-keyhole":`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" />`,"shield-user":`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" /> <path d="M6.376 18.91a6 6 0 0 1 11.249.003" /> <circle cx="12" cy="11" r="4" />`,shuffle:`<path d="m18 14 4 4-4 4" /> <path d="m18 2 4 4-4 4" /> <path d="M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22" /> <path d="M2 6h1.972a4 4 0 0 1 3.6 2.2" /> <path d="M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45" />`,"slash-commands-2":`<path d="M12 19h8" /> <path d="m4 17 6-6-6-6" />`,smartphone:`<rect width="14" height="20" x="5" y="2" rx="2" ry="2" /> <path d="M12 18h.01" />`,sparkling:`<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" /> <path d="M20 2v4" /> <path d="M22 4h-4" /> <circle cx="4" cy="20" r="2" />`,"split-cells-horizontal":`<path d="M8 19H5c-1 0-2-1-2-2V7c0-1 1-2 2-2h3" /> <path d="M16 5h3c1 0 2 1 2 2v10c0 1-1 2-2 2h-3" /> <line x1="12" x2="12" y1="4" y2="20" />`,stack:`<path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z" /> <path d="M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12" /> <path d="M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17" />`,star:`<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z" />`,"star-fill":`<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z" fill="currentColor"/>`,"sticky-note":`<path d="M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z" /> <path d="M15 3v5a1 1 0 0 0 1 1h5" />`,stop:`<rect width="18" height="18" x="3" y="3" rx="2" />`,"stop-circle":`<circle cx="12" cy="12" r="9" /><rect x="9.25" y="9.25" width="5.5" height="5.5" rx="1.25" />`,subtract:`<path d="M5 12h14" />`,survey:`<rect width="8" height="4" x="8" y="2" rx="1" ry="1" /> <path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /> <path d="M12 11h4" /> <path d="M12 16h4" /> <path d="M8 11h.01" /> <path d="M8 16h.01" />`,target:`<circle cx="12" cy="12" r="10" /> <circle cx="12" cy="12" r="6" /> <circle cx="12" cy="12" r="2" />`,task:`<path d="M21.801 10A10 10 0 1 1 17 3.335" /> <path d="m9 11 3 3L22 4" />`,terminal:`<path d="M12 19h8" /> <path d="m4 17 6-6-6-6" />`,"terminal-box":`<path d="M12 19h8" /> <path d="m4 17 6-6-6-6" />`,"terminal-window":`<path d="m7 11 2-2-2-2" /> <path d="M11 13h4" /> <rect width="18" height="18" x="3" y="3" rx="2" ry="2" />`,text:`<path d="M12 4v16" /> <path d="M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2" /> <path d="M9 20h6" />`,"text-wrap":`<path d="m16 16-3 3 3 3" /> <path d="M3 12h14.5a1 1 0 0 1 0 7H13" /> <path d="M3 19h6" /> <path d="M3 5h18" />`,time:`<circle cx="12" cy="12" r="9" /><path d="M12 7v5.25l3.25 1.75" />`,timer:`<line x1="10" x2="14" y1="2" y2="2" /> <line x1="12" x2="15" y1="14" y2="11" /> <circle cx="12" cy="14" r="8" />`,tools:`<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" />`,"twitter-xfill":`<path d="M17.6874 3.0625L12.6907 8.77425L8.37045 3.0625H2.11328L9.58961 12.8387L2.50378 20.9375H5.53795L11.0068 14.6886L15.7863 20.9375H21.8885L14.095 10.6342L20.7198 3.0625H17.6874ZM16.6232 19.1225L5.65436 4.78217H7.45745L18.3034 19.1225H16.6232Z" fill="currentColor"/>`,unpin:`<path d="M12 17v5" /> <path d="M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89" /> <path d="m2 2 20 20" /> <path d="M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11" />`,user:`<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" /> <circle cx="12" cy="7" r="4" />`,"user-3":`<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" /> <circle cx="12" cy="7" r="4" />`,"video-chat":`<path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" /> <rect x="2" y="6" width="14" height="12" rx="2" />`,"volume-up":`<path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z" /> <path d="M16 9a5 5 0 0 1 0 6" /> <path d="M19.364 18.364a9 9 0 0 0 0-12.728" />`,window:`<rect x="2" y="4" width="20" height="16" rx="2" /> <path d="M10 4v4" /> <path d="M2 8h20" /> <path d="M6 4v4" />`},o=t(),s=`openchamber-icon-sprite-v2`,c=1.5,l=(()=>{let e=2166136261;for(let[t,n]of Object.entries(a)){let r=`${t}:${n};`;for(let t=0;t<r.length;t+=1)e=Math.imul(e^r.charCodeAt(t),16777619)}return(e>>>0).toString(36)})(),u=!1,d=new Set,f=null;function p(e){if(u&&d.has(e)&&f===l||typeof document>`u`)return;let t=document.body;if(!t)return;let n=document.getElementById(s);if(n){let t=new Set(Array.from(n.querySelectorAll(`symbol[id^="oc-"]`),e=>e.id.slice(3)));if(!n.innerHTML.includes(`--oc-icon-stroke`)||n.dataset.spriteSignature!==l||!t.has(e))n.remove();else{u=!0,d=t,f=l;return}}let r=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);r.id=s,r.setAttribute(`aria-hidden`,`true`),r.dataset.spriteSignature=l,r.style.display=`none`,r.innerHTML=Object.entries(a).map(([e,t])=>`<symbol id="oc-${e}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--oc-icon-stroke, ${c})" stroke-linecap="round" stroke-linejoin="round">${t}</symbol>`).join(``),t.insertBefore(r,t.firstChild),u=!0,d=new Set(Object.keys(a)),f=l}var m=i.memo(({name:e,className:t,weight:n=`regular`,style:i,...a})=>{typeof document<`u`&&p(e);let s=n===`medium`?2:c;return(0,o.jsx)(`svg`,{className:r(`oc-icon`,t),viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,stroke:`currentColor`,strokeWidth:s,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{"--oc-icon-stroke":s,...i},...a,children:(0,o.jsx)(`use`,{href:`#oc-${e}`})})});m.displayName=`Icon`;export{m as n,a as r,c as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkstreamRendererImpl-Drb2Tpv-.js","assets/rolldown-runtime-C0FnF6B9.js","assets/vendor-base-ui-CnHfUmDN.js","assets/vendor-react-DLPElpoQ.js","assets/vendor-markstream-react-DX55XLGO.js","assets/vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js","assets/vendor-markstream-core-Cm34iPLL.js","assets/vendor-floating-ui-dom-BHhLtF5l.js","assets/vendor-floating-ui-core-Co1I1lFV.js","assets/vendor-reactuses-core-BnW6GxJt.js","assets/vendor-lodash-es-DfLbG5Af.js","assets/vendor-js-cookie-hSOiFTtX.js","assets/button-bhVnVYB_.js","assets/persistence-DwRBC4zl.js","assets/runtime-switch-LvWDU-SL.js","assets/runtime-auth-D66yq6ie.js","assets/runtime-fetch-zIalUnbb.js","assets/vendor-zustand-B4dlGEM2.js","assets/useUIStore-CxOoCv7B.js","assets/vendor-pathe-vBmvQE8f.js","assets/vendor-tanstack-query-core-BWz0ose6.js","assets/store-BoixGrYS.js","assets/vendor-class-variance-authority-BLUaYARZ.js","assets/vendor-tailwind-merge-BicNWLTg.js","assets/useMobileNavigationStore-1jdHeA49.js","assets/platform-DQ5_LNKO.js","assets/vendor-opencode-sdk-C07HQypa.js","assets/vendor-tanstack-react-query-D7pys_c9.js","assets/vendor-sonner-DVzioF3d.js","assets/useAssistantUIStore-CLPCNoj_.js","assets/vendor-zod-Dzk5kdUU.js","assets/vendor-fuse.js-DB5wDJbI.js","assets/useThemeSystem-DMzWVJaW.js","assets/useRuntimeAPIs-DSLXJybW.js","assets/url-CMQwHq4k.js","assets/useEffectiveDirectory-BhhzFJgX.js","assets/markdownHeightCache-CT2d4yTV.js","assets/dualLimitLru-D8Sphgua.js","assets/MarkdownRendererImpl-D2dIlX0h.js","assets/vendor-katex--B5dHUyk.js","assets/markdownTheme-DOfGg-A7.js","assets/vendor-pierre-diffs-DX7XTPG3.js","assets/vendor-hast-util-to-html-B0p1k5Xa.js","assets/vendor-character-entities-legacy-Wut6vMuj.js","assets/vendor-character-entities-html4-DlN_yAFd.js","assets/vendor-ccount-CyGsA0u7.js","assets/vendor-comma-separated-tokens-B9ouxNNS.js","assets/vendor-oniguruma-to-es-CrHzjjSU.js","assets/vendor-oniguruma-parser-D2DIvhSP.js","assets/vendor-diff-Dq7CZNim.js","assets/vendor-lru_map-DpDied8H.js","assets/markdown-worker-CptoICmq.js","assets/FadeInOnReveal-BLSnyG2Z.js","assets/imageSource-BlAJJUEI.js","assets/relay-image-stream-DM7atqJs.js","assets/vendor-morphdom-BbKiNDAu.js","assets/vendor-beautiful-mermaid-DykqIK5D.js","assets/vendor-dompurify-CeJNOzik.js","assets/vendor-marked-WVekxjAN.js","assets/vendor-remend-C3cXc-tf.js","assets/MarkstreamRendererImpl-DKhVy3nF.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t}from"./vendor-zustand-B4dlGEM2.js";import{nt as n,rt as r}from"./vendor-base-ui-CnHfUmDN.js";import{o as i}from"./vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js";import{n as a}from"./vendor-react-DLPElpoQ.js";import{r as o}from"./button-bhVnVYB_.js";import{i as s,n as c,t as l}from"./markdownHeightCache-CT2d4yTV.js";var u=a(),d=e(r(),1),f=`openchamber:chunk-import-reload`,p=250,m=3e4,h=[/Importing a module script failed/i,/Failed to fetch dynamically imported module/i,/error loading dynamically imported module/i,/Loading chunk \S+ failed/i,/ChunkLoadError/i];function g(e){if(e instanceof Error)return`${e.name}\n${e.message}\n${e.stack??``}`;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function _(e){let t=g(e);return h.some(e=>e.test(t))}function v(e){return`1.19.17-beta.3:${g(e).slice(0,500)}`}function y(e){if(typeof window>`u`)return;let t=Date.now(),n=v(e),r=null;try{let e=window.sessionStorage.getItem(f);if(e)try{r=JSON.parse(e)}catch{r=null}}catch{return}let i=typeof r?.timestamp==`number`?r.timestamp:0;if(!(r?.signature===n&&t-i<m)){try{window.sessionStorage.setItem(f,JSON.stringify({signature:n,timestamp:t}))}catch{return}console.error(`[refresh-debug] chunk-import-reload`,{error:g(e).slice(0,1e3)}),window.setTimeout(()=>{window.location.reload()},0)}}async function b(e,t={}){let n=t.retries??1,r;for(let t=0;t<=n;t+=1)try{return await e()}catch(e){if(r=e,!_(e)||t>=n)break;await new Promise(e=>setTimeout(e,p*(t+1)))}throw _(r)&&y(r),r}var x=e=>(0,d.lazy)(()=>b(e)),S=(e,t)=>{try{let n=t??(typeof localStorage>`u`?null:localStorage);return n?n.getItem(e)===`1`:!1}catch{return!1}},C=(e,t)=>{try{let n=t??(typeof localStorage>`u`?null:localStorage);return!n||n.getItem(e)!==`0`}catch{return!0}},w=(e,t)=>{try{typeof localStorage<`u`&&localStorage.setItem(e,t?`1`:`0`)}catch{}},T=`oc:legend-timeline`,E=e=>S(T,e),D=`oc:markstream-react`,O=e=>C(D,e),k=t(e=>({legendTimelineEnabled:E(),setLegendTimelineEnabled:t=>{w(T,t),e({legendTimelineEnabled:t})},markstreamReactEnabled:O(),setMarkstreamReactEnabled:t=>{w(D,t),e({markstreamReactEnabled:t})}})),A=null,j=()=>(A??=i(()=>import(`./MarkstreamRendererImpl-Drb2Tpv-.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60])).catch(e=>{throw A=null,e}),A),M=()=>{j().catch(()=>void 0)},N=null,P=()=>(N??=i(()=>import(`./MarkdownRendererImpl-D2dIlX0h.js`).then(e=>e.n),__vite__mapDeps([38,1,14,15,16,13,17,2,18,19,3,20,25,26,5,39,9,10,11,12,21,22,23,24,27,28,29,30,31,32,40,41,42,43,44,45,46,47,48,49,50,33,34,51,37,35,52,53,54,36,55,56,57,58,59])).catch(e=>{throw N=null,e}),N),F=()=>{P().catch(()=>void 0),O()&&M()},I=class extends d.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){console.warn(`[markstream-react] falling back to the current Markdown renderer`,e)}render(){return this.state.hasError?this.props.fallback:this.props.children}},L=d.createContext(!0),R=()=>d.useContext(L),z=n(),B=x(()=>P().then(e=>({default:e.MarkdownRenderer}))),V=x(()=>j().then(e=>({default:e.MarkstreamRenderer}))),H=x(()=>P().then(e=>({default:e.SimpleMarkdownRenderer}))),U=e=>e===`tool`?`markdown-content markdown-tool`:e===`reasoning`?`markdown-content markdown-reasoning`:`markdown-content leading-relaxed`,W=e=>{let t=(0,u.c)(15),n=k(q),r=typeof e.content==`string`?e.content:``,i=typeof e.variant==`string`?e.variant:`assistant`,a;t[0]!==r||t[1]!==n||t[2]!==e.reserveMeasuredHeight||t[3]!==i?(a=e.reserveMeasuredHeight?c(l(r,n?`markstream:${i}`:i)):void 0,t[0]=r,t[1]=n,t[2]=e.reserveMeasuredHeight,t[3]=i,t[4]=a):a=t[4];let d=a,f;t[5]!==e.className||t[6]!==e.variant?(f=o(`relative break-words w-full min-w-0`,U(e.variant),typeof e.className==`string`?e.className:void 0),t[5]=e.className,t[6]=e.variant,t[7]=f):f=t[7];let p;t[8]!==r||t[9]!==e.animated||t[10]!==d?(p=(0,z.jsx)(s,{animated:e.animated,content:r,reservedHeight:d}),t[8]=r,t[9]=e.animated,t[10]=d,t[11]=p):p=t[11];let m;return t[12]!==f||t[13]!==p?(m=(0,z.jsx)(`div`,{className:f,"aria-busy":`true`,"data-markdown-hydration":`deferred`,"data-markdown-ready":`false`,children:p}),t[12]=f,t[13]=p,t[14]=m):m=t[14],m},G=e=>{let t=(0,u.c)(9),n=R(),r=k(J);if(!n&&e.isStreaming!==!0){let n;return t[0]===e?n=t[1]:(n=(0,z.jsx)(W,{...e,animated:!1,reserveMeasuredHeight:!0}),t[0]=e,t[1]=n),n}let i;t[2]===e?i=t[3]:(i=(0,z.jsx)(d.Suspense,{fallback:(0,z.jsx)(W,{...e,reserveMeasuredHeight:!0}),children:(0,z.jsx)(B,{...e})}),t[2]=e,t[3]=i);let a=i;if(!r)return a;let o;t[4]===e?o=t[5]:(o=(0,z.jsx)(d.Suspense,{fallback:(0,z.jsx)(W,{...e,reserveMeasuredHeight:!0}),children:(0,z.jsx)(V,{...e})}),t[4]=e,t[5]=o);let s;return t[6]!==a||t[7]!==o?(s=(0,z.jsx)(I,{fallback:a,children:o}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s},K=e=>{let t=(0,u.c)(4);if(!R()){let n;return t[0]===e?n=t[1]:(n=(0,z.jsx)(W,{...e,animated:!1}),t[0]=e,t[1]=n),n}let n;return t[2]===e?n=t[3]:(n=(0,z.jsx)(d.Suspense,{fallback:(0,z.jsx)(W,{...e}),children:(0,z.jsx)(H,{...e})}),t[2]=e,t[3]=n),n};function q(e){return e.markstreamReactEnabled}function J(e){return e.markstreamReactEnabled}export{k as a,F as i,K as n,x as o,L as r,G as t};
|