@yuriai/web 0.2.36 → 0.2.38-beta.2

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.
Files changed (237) hide show
  1. package/README.md +6 -0
  2. package/dist/assets/AgentAvatar-DNVD6VCV.js +1 -0
  3. package/dist/assets/AssistantContactStatus-C5zpVdGa.js +3 -0
  4. package/dist/assets/AssistantUnreadBadge-7KpCtnd3.js +1 -0
  5. package/dist/assets/AssistantView-BZU6TlwK.js +1 -0
  6. package/dist/assets/DiagramView-CXgsVJ3A.js +1 -0
  7. package/dist/assets/FadeInOnReveal-CK7jBcu4.js +1 -0
  8. package/dist/assets/GuiPluginSurface-Bk01hnV6.js +1 -0
  9. package/dist/assets/GuiPluginWindow-BgOCEgEb.js +1 -0
  10. package/dist/assets/Icon-DsN23fuV.js +1 -0
  11. package/dist/assets/ImageLoadingPlaceholder-MfVzv_y1.js +1 -0
  12. package/dist/assets/LoadingImage-MAgXscGl.js +1 -0
  13. package/dist/assets/MarkdownRenderer-DswMDaKf.js +2 -0
  14. package/dist/assets/{MarkdownRendererImpl-DBaGpRQS.js → MarkdownRendererImpl-ecACjpZw.js} +2 -2
  15. package/dist/assets/MarkstreamRendererImpl-Bqbq2VPn.js +3 -0
  16. package/dist/assets/MobileDetailNavigation-CXcMdlRH.js +1 -0
  17. package/dist/assets/MobileResizableSheet-D_PnyzR0.js +1 -0
  18. package/dist/assets/MobileShareBridge-DfgyncNh.js +4 -0
  19. package/dist/assets/MobileTabPageHeader-Bm8nYrzH.js +2 -0
  20. package/dist/assets/MultiRunWindow-CvCgKiyV.js +1 -0
  21. package/dist/assets/OnboardingScreen-BwJ3iMGY.js +1 -0
  22. package/dist/assets/OverlayScrollbar-BLhv7Nq-.js +1 -0
  23. package/dist/assets/SettingsView-DGduWj3I.js +29 -0
  24. package/dist/assets/SettingsWindow-BM8abllV.js +1 -0
  25. package/dist/assets/SetupTourDialog-vmNGHNXl.js +1 -0
  26. package/dist/assets/TerminalView-BZObkK0H.js +8 -0
  27. package/dist/assets/ToolOutputDialog-D_CH2A0-.js +10 -0
  28. package/dist/assets/VoiceSettings-Ru8tm8eq.js +2 -0
  29. package/dist/assets/YuriLogo-C5K_9jSK.js +1 -0
  30. package/dist/assets/{YuriWordmark-CGDlDvEH.js → YuriWordmark-CJ8qJ14A.js} +1 -1
  31. package/dist/assets/{appThemeRegistry-2DEQy44q.js → appThemeRegistry-CcdIpK3S.js} +1 -1
  32. package/dist/assets/{assistant-attachment-cache-oatc8F4t.js → assistant-attachment-cache-C-SlEpSB.js} +1 -1
  33. package/dist/assets/bootstrap-BzeQds0D.js +9 -0
  34. package/dist/assets/{capgoAdapter-Dz8eMW5Y.js → capgoAdapter-DceVw3SM.js} +1 -1
  35. package/dist/assets/checkbox-CJsiyoER.js +1 -0
  36. package/dist/assets/collapsible-B3zojUm2.js +1 -0
  37. package/dist/assets/context-menu-DFRg1NJF.js +1 -0
  38. package/dist/assets/desktop-Brp3xDpd.js +1 -0
  39. package/dist/assets/desktopHosts-qQ2Rz26_.js +1 -0
  40. package/dist/assets/desktopRelayRestore-DifJHAur.js +1 -0
  41. package/dist/assets/{device-w1ioiqv3.js → device-Db_TcRdX.js} +1 -1
  42. package/dist/assets/diagram-OTF8YAve.js +1 -0
  43. package/dist/assets/dialog-CgtwKUKd.js +1 -0
  44. package/dist/assets/{es-CPoqPlVn.js → es-CrVDn7XV.js} +2 -2
  45. package/dist/assets/{fileMentionTouchSelection-B-oPBD2a.js → fileMentionTouchSelection-CorehkTj.js} +1 -1
  46. package/dist/assets/fileQueries-BaEKb7SZ.js +1 -0
  47. package/dist/assets/fileReferenceActions-D06_lyuL.js +1 -0
  48. package/dist/assets/{fileReferenceParser-1HHDBUum.js → fileReferenceParser-BayaidRM.js} +1 -1
  49. package/dist/assets/{fr-F7aQyu3-.js → fr-CCwt5AOu.js} +2 -2
  50. package/dist/assets/{gitApi-Dy__-dVB.js → gitApi-C6rhS4rG.js} +5 -5
  51. package/dist/assets/{gui-CJjEj3l4.js → gui-CFdPKvfq.js} +1 -1
  52. package/dist/assets/historyImportQueries-BrhVXQhP.js +1 -0
  53. package/dist/assets/host-8TDDnZXo.js +1 -0
  54. package/dist/assets/image-loading-D1DfK_bJ.js +1 -0
  55. package/dist/assets/input-B7-PmgcW.js +1 -0
  56. package/dist/assets/insertionBoundaries-B-ncem5c.js +1 -0
  57. package/dist/assets/{ja-BVQSzC4w.js → ja-BfwjUNPc.js} +2 -2
  58. package/dist/assets/{ko-DW2WaBw6.js → ko-CZQZFkal.js} +2 -2
  59. package/dist/assets/main-BMvwUUi4.js +2 -0
  60. package/dist/assets/main-Chq1F31E.js +169 -0
  61. package/dist/assets/{markdownHeightCache-D0fP62uP.js → markdownHeightCache-DlRC53XG.js} +1 -1
  62. package/dist/assets/mcpQueries-BRFr-Gfm.js +1 -0
  63. package/dist/assets/miniChat-C3vDY9WG.js +2 -0
  64. package/dist/assets/mobile-B2KYTY1c.js +2 -0
  65. package/dist/assets/{mobileBackNavigation-B-dgoPw6.js → mobileBackNavigation-ByUDCJde.js} +1 -1
  66. package/dist/assets/multirun-F1yOJb2_.js +3 -0
  67. package/dist/assets/{native-config-CLcCZ6JT.js → native-config-C2j59qnN.js} +1 -1
  68. package/dist/assets/path-utils-HRmerlyU.js +1 -0
  69. package/dist/assets/{pl-BWVfAt6z.js → pl-B6C3vXqv.js} +3 -3
  70. package/dist/assets/platform-Dids8J9D.js +1 -0
  71. package/dist/assets/projectActions-C-9Z8R7y.js +1 -0
  72. package/dist/assets/projectMeta-C08trpZE.js +1 -0
  73. package/dist/assets/{pt-BR-BifD1KYG.js → pt-BR-BUDTNopP.js} +2 -2
  74. package/dist/assets/pwa-C956NPB0.js +2 -0
  75. package/dist/assets/queue-abort-optimistic-CWyeG_sJ.js +1 -0
  76. package/dist/assets/readiness-CUPPcONt.js +1 -0
  77. package/dist/assets/renderElectronMiniChatApp-DNK4YFG8.js +2 -0
  78. package/dist/assets/renderMobileApp-DagPx3n0.js +28 -0
  79. package/dist/assets/runtime-auth-Bh3htXtG.js +1 -0
  80. package/dist/assets/runtime-fetch-9B8F_rKW.js +1 -0
  81. package/dist/assets/runtime-file-download-D4WGSMk-.js +1 -0
  82. package/dist/assets/runtime-file-resource-tDTBpJT_.js +2 -0
  83. package/dist/assets/{runtime-switch-DEZ1K7qW.js → runtime-switch-ibQIZnws.js} +1 -1
  84. package/dist/assets/runtimeConfig-D_McrwNd.js +2 -0
  85. package/dist/assets/runtimeEndpointReset-6jhYadQt.css +1 -0
  86. package/dist/assets/runtimeEndpointReset-D-aHzKPN.js +149 -0
  87. package/dist/assets/{scheduledTaskNavigation-7dD6PWMD.js → scheduledTaskNavigation-C8tBjNoP.js} +1 -1
  88. package/dist/assets/select-DoYUmvbX.js +1 -0
  89. package/dist/assets/sessionLookup-D2JIMvDo.js +1 -0
  90. package/dist/assets/sortable-tabs-strip-B-W7ADKC.js +1 -0
  91. package/dist/assets/{speechSettingsQueries-sb0ZHAri.js → speechSettingsQueries-CJqxaC2Q.js} +1 -1
  92. package/dist/assets/src-CzDk_0Pp.css +2 -0
  93. package/dist/assets/{store-Dvb_y7vz.js → store-Myt_Fv8d.js} +3 -3
  94. package/dist/assets/terminalApi-BXf0a2VZ.js +1 -0
  95. package/dist/assets/textarea-BCTNmuPZ.js +1 -0
  96. package/dist/assets/tooltip-D5Xeh6py.js +1 -0
  97. package/dist/assets/types-DXSnGXVb.js +2 -0
  98. package/dist/assets/{uk-3_q1FN3X.js → uk-Ct9y1Y2t.js} +2 -2
  99. package/dist/assets/url-DO6Zrx1P.js +1 -0
  100. package/dist/assets/{useAppFontEffects-BBRIHYET.js → useAppFontEffects-Blo2lGTo.js} +60 -60
  101. package/dist/assets/{useAssistantUIStore-cHle1U5H.js → useAssistantUIStore-CVSFSgJV.js} +1 -1
  102. package/dist/assets/useDesktopWindowControlsLayout-YAxhtSDl.js +1 -0
  103. package/dist/assets/useDictation-Dp2Y3X49.js +1 -0
  104. package/dist/assets/useEffectiveDirectory-Uc8I6wXt.js +1 -0
  105. package/dist/assets/{useFontPreferences-D-AOjd9H.js → useFontPreferences-DqBoLHp6.js} +1 -1
  106. package/dist/assets/useMobileNavigationStore-SCjA_7jP.js +17 -0
  107. package/dist/assets/usePluginsStore-DfksbEZx.js +1 -0
  108. package/dist/assets/{useStreamingTextThrottle-C2ORuOtg.js → useStreamingTextThrottle-BY1Ynoj1.js} +1 -1
  109. package/dist/assets/{useUIStore-B61bCFEM.js → useUIStore-BsCfUWQw.js} +1 -1
  110. package/dist/assets/useWorkerHighlightedLines-DAxMD3fK.js +7 -0
  111. package/dist/assets/vendor-reactuses-core-CuTmqEMK.js +1 -0
  112. package/dist/assets/{zh-CN-DvlJbsyJ.js → zh-CN-BegPizz4.js} +2 -2
  113. package/dist/assets/{zh-TW-B4FmXnzP.js → zh-TW-4xftqQQG.js} +2 -2
  114. package/dist/index.html +22 -26
  115. package/dist/mini-chat.html +22 -26
  116. package/dist/mobile.html +22 -26
  117. package/package.json +1 -1
  118. package/server/index.js +4 -3
  119. package/server/lib/assistants/DOCUMENTATION.md +37 -5
  120. package/server/lib/assistants/contact-store.js +8 -1
  121. package/server/lib/assistants/contact-tools.js +6 -6
  122. package/server/lib/assistants/contact-tools.test.js +4 -2
  123. package/server/lib/assistants/harness.js +14 -8
  124. package/server/lib/assistants/harness.test.js +33 -0
  125. package/server/lib/assistants/pi-tools.js +15 -2
  126. package/server/lib/assistants/pi-tools.test.js +35 -1
  127. package/server/lib/assistants/service.js +6 -9
  128. package/server/lib/assistants/service.test.js +90 -12
  129. package/server/lib/assistants/summary.js +2 -0
  130. package/server/lib/assistants/tool-execution.js +53 -0
  131. package/server/lib/assistants/tool-execution.test.js +82 -0
  132. package/server/lib/assistants/yuri-project.http.test.js +2 -3
  133. package/server/lib/assistants/yuri-tools.js +1 -1
  134. package/server/lib/git/DOCUMENTATION.md +3 -0
  135. package/server/lib/git/service.js +9 -3
  136. package/server/lib/git/worktrees.catalog.test.js +31 -0
  137. package/server/lib/notifications/DOCUMENTATION.md +34 -0
  138. package/server/lib/notifications/session-unread-runtime.js +101 -0
  139. package/server/lib/notifications/session-unread-store.js +93 -0
  140. package/server/lib/notifications/session-unread.test.js +176 -0
  141. package/server/lib/opencode/feature-routes-runtime.js +22 -1
  142. package/server/lib/opencode/session-directory-runtime.js +29 -3
  143. package/server/lib/opencode/session-directory-runtime.test.js +78 -0
  144. package/server/lib/relay/DOCUMENTATION.md +5 -0
  145. package/server/lib/scheduled-tasks/DOCUMENTATION.md +12 -0
  146. package/server/lib/scheduled-tasks/runtime.js +24 -0
  147. package/server/lib/scheduled-tasks/runtime.test.js +41 -0
  148. package/server/lib/session-index/DOCUMENTATION.md +9 -0
  149. package/server/lib/session-index/sync-runtime.js +10 -1
  150. package/server/lib/ui-auth/DOCUMENTATION.md +7 -0
  151. package/server/lib/ui-auth/ui-auth.test.js +25 -0
  152. package/dist/assets/AgentAvatar-0zDTBIBH.js +0 -1
  153. package/dist/assets/AssistantContactStatus-CqBzrMI3.js +0 -3
  154. package/dist/assets/AssistantUnreadBadge-CqMHWeGm.js +0 -1
  155. package/dist/assets/AssistantView-DSnDwWGc.js +0 -1
  156. package/dist/assets/DiagramView-xGg1oS8b.js +0 -1
  157. package/dist/assets/FadeInOnReveal-C_UU65YY.js +0 -1
  158. package/dist/assets/GuiPluginSurface-Dpiaq__1.js +0 -1
  159. package/dist/assets/GuiPluginWindow-B0oHkEwj.js +0 -1
  160. package/dist/assets/Icon-BNzwtZlI.js +0 -1
  161. package/dist/assets/ImageLoadingPlaceholder-CH4TCRvH.js +0 -1
  162. package/dist/assets/LoadingImage-C6jr50EL.js +0 -1
  163. package/dist/assets/MarkdownRenderer-BonJRvHM.js +0 -2
  164. package/dist/assets/MarkstreamRendererImpl-DcxDrUW1.js +0 -3
  165. package/dist/assets/MobileDetailNavigation-DacHr77a.js +0 -1
  166. package/dist/assets/MobileResizableSheet-DZ7Kq3ZS.js +0 -1
  167. package/dist/assets/MobileShareBridge-CKDkjJIK.js +0 -4
  168. package/dist/assets/MobileTabPageHeader-CT5jeuHU.js +0 -2
  169. package/dist/assets/MultiRunWindow-GFioSTDw.js +0 -1
  170. package/dist/assets/OnboardingScreen-DAiSh2kq.js +0 -1
  171. package/dist/assets/OverlayScrollbar-5yODT_nG.js +0 -1
  172. package/dist/assets/SettingsView-BoDwWc6-.js +0 -29
  173. package/dist/assets/SettingsWindow-BGPVsXUi.js +0 -1
  174. package/dist/assets/SetupTourDialog-CM8-QHJ3.js +0 -1
  175. package/dist/assets/TerminalView-BnR50Mgm.js +0 -8
  176. package/dist/assets/ToolOutputDialog-BhD4QiRH.js +0 -10
  177. package/dist/assets/VoiceSettings-BeMRGXfr.js +0 -2
  178. package/dist/assets/YuriLogo-D7QXHCf6.js +0 -1
  179. package/dist/assets/bootstrap-Bi91NjXG.js +0 -3
  180. package/dist/assets/button-CPRnAdlm.js +0 -1
  181. package/dist/assets/checkbox-DZkjNegP.js +0 -1
  182. package/dist/assets/collapsible-CP7z1jKL.js +0 -1
  183. package/dist/assets/context-menu-B8yin969.js +0 -1
  184. package/dist/assets/desktop-BAmoc_34.js +0 -1
  185. package/dist/assets/desktopHosts-BLU1tGSX.js +0 -1
  186. package/dist/assets/desktopRelayRestore-2BIIs8mZ.js +0 -1
  187. package/dist/assets/diagram-O7VUqG75.js +0 -1
  188. package/dist/assets/dialog-Dq8l3IQC.js +0 -1
  189. package/dist/assets/fileQueries-C2Rs6TPz.js +0 -1
  190. package/dist/assets/fileReferenceActions-DrAZHld4.js +0 -1
  191. package/dist/assets/gitApiHttp-CKrsk1tw.js +0 -7
  192. package/dist/assets/historyImportQueries-C8VK9R5_.js +0 -1
  193. package/dist/assets/host-z9PU8q1e.js +0 -1
  194. package/dist/assets/image-loading-DKQOYtti.js +0 -1
  195. package/dist/assets/input-9A1m0Yjq.js +0 -1
  196. package/dist/assets/insertionBoundaries-DdpR3zaP.js +0 -1
  197. package/dist/assets/main-B2Bi3ueT.js +0 -2
  198. package/dist/assets/main-CpoO7VOS.js +0 -169
  199. package/dist/assets/mcpQueries-DcbmHgNY.js +0 -1
  200. package/dist/assets/miniChat-C52LB0Yu.js +0 -2
  201. package/dist/assets/mobile-U4WSU-8R.js +0 -2
  202. package/dist/assets/multirun-VckoCH5p.js +0 -3
  203. package/dist/assets/path-utils-jGozTg9d.js +0 -1
  204. package/dist/assets/pathNormalization-ewtPqJWn.js +0 -1
  205. package/dist/assets/platform-sEg2IOLZ.js +0 -1
  206. package/dist/assets/projectActions-BX0cjZoq.js +0 -1
  207. package/dist/assets/projectMeta-BYNpABmO.js +0 -1
  208. package/dist/assets/pwa--whpkoe7.js +0 -2
  209. package/dist/assets/queryRuntime-2dx7jbt9.js +0 -1
  210. package/dist/assets/queue-abort-optimistic-CsU9CtHa.js +0 -1
  211. package/dist/assets/readiness-CafO-iNt.js +0 -1
  212. package/dist/assets/renderElectronMiniChatApp-BOZWsCQP.js +0 -2
  213. package/dist/assets/renderMobileApp-Cc6uK66H.js +0 -28
  214. package/dist/assets/runtime-auth-DBn9yahL.js +0 -1
  215. package/dist/assets/runtime-fetch-D0YWp3FJ.js +0 -1
  216. package/dist/assets/runtime-file-download-D6bwc3Kj.js +0 -1
  217. package/dist/assets/runtime-file-resource-BP4P52ry.js +0 -2
  218. package/dist/assets/runtimeAPIRegistry-C2VogTny.js +0 -1
  219. package/dist/assets/runtimeConfig-Coh1hryT.js +0 -2
  220. package/dist/assets/runtimeEndpointReset-BP4JwHFJ.css +0 -1
  221. package/dist/assets/runtimeEndpointReset-Bwm_RwzE.js +0 -149
  222. package/dist/assets/select-BNDVM5KL.js +0 -1
  223. package/dist/assets/sessionLookup-BI6ygHcL.js +0 -1
  224. package/dist/assets/sortable-tabs-strip-lZ6K_9ug.js +0 -1
  225. package/dist/assets/src-B_i0g2Ca.css +0 -2
  226. package/dist/assets/terminalApi-Bo6KWljy.js +0 -1
  227. package/dist/assets/textarea-Ds63PD7U.js +0 -1
  228. package/dist/assets/tooltip-C25g1ojI.js +0 -1
  229. package/dist/assets/types-DD3a5G5L.js +0 -2
  230. package/dist/assets/url-MRa-FtQa.js +0 -1
  231. package/dist/assets/useDesktopWindowControlsLayout-CTSEy8Ep.js +0 -1
  232. package/dist/assets/useDictation-ozXiBIfG.js +0 -1
  233. package/dist/assets/useEffectiveDirectory-DO311OTB.js +0 -1
  234. package/dist/assets/useMobileNavigationStore-D59MROJU.js +0 -17
  235. package/dist/assets/usePluginsStore-3VJgeLvf.js +0 -1
  236. package/dist/assets/useWorkerHighlightedLines-DaoXaYxw.js +0 -7
  237. package/dist/assets/vendor-reactuses-core-DWo5Wn6R.js +0 -1
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{c as n,w as r}from"./runtime-auth-Bh3htXtG.js";import{c as i,i as a,t as o}from"./runtime-switch-ibQIZnws.js";import{n as s,y as c}from"./desktop-Brp3xDpd.js";import{ot as l,st as u}from"./vendor-base-ui-CzHs0bHY.js";import{r as d}from"./useUIStore-BsCfUWQw.js";import{n as f}from"./vendor-react-DlzBev0S.js";import{n as p}from"./vendor-tanstack-react-query-B-Wpqq5J.js";import{r as m}from"./vendor-sonner-BEHGipm5.js";import{r as h}from"./vendor-reactuses-core-CuTmqEMK.js";import{Jn as g,Kn as _,Va as v}from"./useMobileNavigationStore-SCjA_7jP.js";import{i as y}from"./MobileShareBridge-DfgyncNh.js";import{a as b,h as x,l as S,m as C,s as w,t as T,v as E}from"./MobileDetailNavigation-CXcMdlRH.js";import{i as D,r as O}from"./useAssistantUIStore-CVSFSgJV.js";import{n as k}from"./Icon-DsN23fuV.js";import{a as A,i as j,n as M,o as N,r as P,t as F}from"./dialog-CgtwKUKd.js";import{r as ee}from"./device-Db_TcRdX.js";import{E as te}from"./sessionLookup-D2JIMvDo.js";import{a as ne,i as re,n as ie,t as ae}from"./AssistantContactStatus-C5zpVdGa.js";import{n as I,r as oe}from"./AssistantUnreadBadge-7KpCtnd3.js";import{a as L,i as se,n as ce,r as R,t as z}from"./context-menu-DFRg1NJF.js";var B=t(u(),1),V=f(),le=()=>s()&&!r(),ue=async e=>{if(!le())throw Error(`Assistant Mini Chat requires a direct desktop connection`);await c(`desktop_open_assistant_mini_chat_window`,{assistantID:e,apiBaseUrl:o(),clientToken:n()})},H=l();function U(e){let t=(0,V.c)(49),{assistant:n,trigger:r,onEdit:i,onDelete:o,doubleClickMiniChat:s}=e,c=s!==void 0&&s,{t:l}=v(),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=a(),t[0]=u):u=t[0];let d;t[1]===n.id?d=t[2]:(d=[u,`assistants`,n.id,`pin`],t[1]=n.id,t[2]=d);let f;t[3]===n?f=t[4]:(f=()=>C(n,{pinned:n.pinnedAt==null}),t[3]=n,t[4]=f);let h;t[5]===l?h=t[6]:(h=()=>m.error(l(`assistants.menu.pinError`)),t[5]=l,t[6]=h);let g;t[7]!==d||t[8]!==f||t[9]!==h?(g={mutationKey:d,mutationFn:f,onError:h},t[7]=d,t[8]=f,t[9]=h,t[10]=g):g=t[10];let _=p(g),y;t[11]!==n.id||t[12]!==l?(y=()=>{ue(n.id).catch(()=>m.error(l(`miniChat.actions.failed`)))},t[11]=n.id,t[12]=l,t[13]=y):y=t[13];let b=y,x=r,S;t[14]!==x||t[15]!==c||t[16]!==b||t[17]!==r?(S=c?B.cloneElement(x,{onDoubleClick:e=>{x.props.onDoubleClick?.(e),!e.defaultPrevented&&le()&&b()}}):r,t[14]=x,t[15]=c,t[16]=b,t[17]=r,t[18]=S):S=t[18];let w;t[19]===S?w=t[20]:(w=(0,H.jsx)(L,{render:S}),t[19]=S,t[20]=w);let T;t[21]!==n.pinnedAt||t[22]!==_||t[23]!==l?(T=n.pinnedAt===void 0?null:(0,H.jsxs)(R,{disabled:_.isPending,onClick:()=>_.mutate(),children:[(0,H.jsx)(k,{name:n.pinnedAt==null?`pushpin-2`:`unpin`,className:`size-4`}),l(n.pinnedAt==null?`assistants.menu.pin`:`assistants.menu.unpin`)]}),t[21]=n.pinnedAt,t[22]=_,t[23]=l,t[24]=T):T=t[24];let E;t[25]!==b||t[26]!==l?(E=le()?(0,H.jsxs)(R,{onClick:b,children:[(0,H.jsx)(k,{name:`external-link`,className:`size-4`}),l(`sessions.sidebar.session.menu.openMiniChatWindow`)]}):null,t[25]=b,t[26]=l,t[27]=E):E=t[27];let D;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,H.jsx)(k,{name:`edit`,className:`size-4`}),t[28]=D):D=t[28];let O;t[29]===l?O=t[30]:(O=l(`assistants.menu.edit`),t[29]=l,t[30]=O);let A;t[31]!==i||t[32]!==O?(A=(0,H.jsxs)(R,{onClick:i,children:[D,O]}),t[31]=i,t[32]=O,t[33]=A):A=t[33];let j;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,H.jsx)(se,{}),t[34]=j):j=t[34];let M;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,H.jsx)(k,{name:`delete-bin`,className:`size-4 text-inherit`}),t[35]=M):M=t[35];let N;t[36]===l?N=t[37]:(N=l(`assistants.settings.delete`),t[36]=l,t[37]=N);let P;t[38]!==o||t[39]!==N?(P=(0,H.jsxs)(R,{onClick:o,className:`text-[var(--status-error)] focus:text-[var(--status-error)] data-[highlighted]:text-[var(--status-error)]`,children:[M,N]}),t[38]=o,t[39]=N,t[40]=P):P=t[40];let F;t[41]!==T||t[42]!==E||t[43]!==A||t[44]!==P?(F=(0,H.jsxs)(ce,{className:`min-w-[10rem]`,children:[T,E,A,j,P]}),t[41]=T,t[42]=E,t[43]=A,t[44]=P,t[45]=F):F=t[45];let ee;return t[46]!==F||t[47]!==w?(ee=(0,H.jsxs)(z,{children:[w,F]}),t[46]=F,t[47]=w,t[48]=ee):ee=t[48],ee}function de(e){let t=(0,V.c)(38),{assistant:n,selected:r,onSelect:i,onEdit:a,onDelete:o}=e,s=B.useRef(null),c=ne(n.id,n.working),l;t[0]===n.name?l=t[1]:(l=y(n.name).displayName||n.name,t[0]=n.name,t[1]=l);let u=l,d;t[2]!==n.id||t[3]!==a?(d=()=>a(n.id),t[2]=n.id,t[3]=a,t[4]=d):d=t[4];let f;t[5]!==n||t[6]!==o?(f=()=>o(n),t[5]=n,t[6]=o,t[7]=f):f=t[7];let p=n.id,m;t[8]!==n.id||t[9]!==i?(m=()=>i(n.id),t[8]=n.id,t[9]=i,t[10]=m):m=t[10];let h=r?`bg-[var(--surface-muted)]`:`hover:bg-interactive-hover`,_;t[11]===h?_=t[12]:(_=g(`flex w-full min-w-0 max-w-28 flex-col items-center gap-2 rounded-2xl px-2 py-3 text-center outline-none transition-colors focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)] active:bg-interactive-active motion-reduce:transition-none`,h),t[11]=h,t[12]=_);let v;t[13]!==n.avatarSeed||t[14]!==n.id||t[15]!==u||t[16]!==c?(v=(0,H.jsx)(re,{name:n.id,avatarSeed:n.avatarSeed,size:64,label:u,working:c,hoverTarget:s}),t[13]=n.avatarSeed,t[14]=n.id,t[15]=u,t[16]=c,t[17]=v):v=t[17];let b=n.unreadCount??0,x;t[18]===b?x=t[19]:(x=(0,H.jsx)(I,{count:b,className:`absolute -right-1 -top-1`}),t[18]=b,t[19]=x);let S;t[20]!==x||t[21]!==v?(S=(0,H.jsxs)(`span`,{className:`relative`,children:[v,x]}),t[20]=x,t[21]=v,t[22]=S):S=t[22];let C;t[23]===u?C=t[24]:(C=(0,H.jsx)(`span`,{className:`w-full truncate typography-ui-label font-medium leading-5`,children:u}),t[23]=u,t[24]=C);let w;t[25]!==n.id||t[26]!==u||t[27]!==r||t[28]!==S||t[29]!==C||t[30]!==m||t[31]!==_?(w=(0,H.jsxs)(`button`,{ref:s,type:`button`,role:`option`,"aria-selected":r,title:u,"data-assistant-pinned":p,"data-mobile-press-feedback":`soft`,onClick:m,className:_,children:[S,C]}),t[25]=n.id,t[26]=u,t[27]=r,t[28]=S,t[29]=C,t[30]=m,t[31]=_,t[32]=w):w=t[32];let T;return t[33]!==n||t[34]!==w||t[35]!==d||t[36]!==f?(T=(0,H.jsx)(U,{assistant:n,doubleClickMiniChat:!0,onEdit:d,onDelete:f,trigger:w}),t[33]=n,t[34]=w,t[35]=d,t[36]=f,t[37]=T):T=t[37],T}function fe(e){let t=(0,V.c)(16),{contacts:n,selectedAssistantID:r,onSelect:i,onEdit:a,onDelete:o}=e,{t:s}=v();if(n.length===0)return null;let c;t[0]===s?c=t[1]:(c=s(`assistants.list.pinned`),t[0]=s,t[1]=c);let l;if(t[2]!==n||t[3]!==o||t[4]!==a||t[5]!==i||t[6]!==r){let e;t[8]!==o||t[9]!==a||t[10]!==i||t[11]!==r?(e=e=>(0,H.jsx)(de,{assistant:e,selected:e.id===r,onSelect:i,onEdit:a,onDelete:o},e.id),t[8]=o,t[9]=a,t[10]=i,t[11]=r,t[12]=e):e=t[12],l=n.map(e),t[2]=n,t[3]=o,t[4]=a,t[5]=i,t[6]=r,t[7]=l}else l=t[7];let u;return t[13]!==c||t[14]!==l?(u=(0,H.jsx)(`div`,{role:`group`,"aria-label":c,className:`yuri-assistant-pinned-contacts grid grid-cols-1 justify-items-center gap-2 pb-3 pt-2`,children:l}),t[13]=c,t[14]=l,t[15]=u):u=t[15],u}function pe({snapshot:e,rowClassName:t,compact:n=!1,mobile:r=!1}){let{t:i}=v(),[a,o]=B.useState(!1),s=B.useRef(!1),c=h(async()=>{if(!s.current){s.current=!0,o(!0);try{(await S(e)).failed&&m.error(i(`assistants.unread.markAllFailed`))}catch{m.error(i(`assistants.unread.markAllFailed`))}finally{s.current=!1,o(!1)}}}),l=e.assistants.some(e=>(e.unreadCount??0)>0);return!n&&!l?null:(0,H.jsx)(`div`,{className:t,style:n&&!l?{visibility:`hidden`}:void 0,children:(0,H.jsx)(_,{type:`button`,variant:r?`mobileGlass`:`ghost`,size:r?`mobileIcon`:`icon`,onClick:c,"aria-label":i(`assistants.unread.markAll`),title:i(`assistants.unread.markAll`),disabled:a||!e.assistants.some(e=>(e.unreadCount??0)>0&&e.readTip),"aria-busy":a,children:(0,H.jsx)(k,{name:`check-double`,className:r?`size-5`:`size-4`})})})}async function me(e){await b(e);let t=D.getState().defaultShareAssistant;if(t?.assistantID!==e.id)return;let n=await w();n.serverInstanceID&&t.serverInstanceID===n.serverInstanceID&&D.getState().setDefaultShareAssistant(null)}function he({assistant:e,open:t,onOpenChange:n,onDeleted:r}){let{t:i}=v(),[a,o]=B.useState(!1),s=e?y(e.name).displayName||e.name:``,c=h(e=>{a&&!e||n(e)}),l=h(()=>{a||n(!1)}),u=h(async()=>{if(!(!e||a)){o(!0);try{await me(e),r?.(e.id),n(!1),m.success(i(`assistants.settings.toast.deleted`))}catch{m.error(i(`assistants.settings.toast.deleteFailed`))}finally{o(!1)}}});return(0,H.jsx)(F,{open:t&&e!==null,onOpenChange:c,children:(0,H.jsxs)(M,{className:`max-w-md`,children:[(0,H.jsxs)(A,{children:[(0,H.jsx)(N,{children:i(`assistants.settings.delete`)}),(0,H.jsx)(P,{children:i(`assistants.settings.deleteConfirm`,{name:s})})]}),(0,H.jsxs)(j,{children:[(0,H.jsx)(_,{size:`sm`,variant:`ghost`,onClick:l,disabled:a,children:i(`settings.common.actions.cancel`)}),(0,H.jsx)(_,{size:`sm`,variant:`destructive`,onClick:u,disabled:a,children:i(`settings.common.actions.delete`)})]})]})})}var W=`block min-w-0 max-w-full truncate typography-micro text-muted-foreground`,ge={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 _e(e,t){return e?.text.replace(/\s+/gu,` `).trim()||t(e?.fallbackKind?ge[e.fallbackKind]:`assistants.contact.empty`)}var ve=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`,ye=e({AssistantView:()=>G}),be=e=>{let t=(0,V.c)(21),{assistant:n,onBack:r,onOpenSettings:i}=e,{t:a}=v(),o=te(),s;t[0]===n?s=t[1]:(s=n?y(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}O(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=h(u),f;t[6]!==n||t[7]!==l||t[8]!==a?(f=n?(0,H.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-2.5`,children:[(0,H.jsx)(re,{name:n.id,avatarSeed:n.avatarSeed,size:40,label:l,working:!!(n.working||n.activeContactTurn),showWorkingDot:!1}),(0,H.jsxs)(`span`,{className:`min-w-0`,children:[(0,H.jsx)(`span`,{className:`block truncate font-medium leading-5 tracking-[-0.01em]`,children:l||a(`assistants.title`)}),(0,H.jsx)(ae,{assistantID:n.id,serverWorking:!!(n.working||n.activeContactTurn),lastContactAt:n.latestMessagePreview?.createdAt})]})]}):l||a(`assistants.title`),t[6]=n,t[7]=l,t[8]=a,t[9]=f):f=t[9];let p;t[10]===a?p=t[11]:(p=a(`assistants.actions.backToChat`),t[10]=a,t[11]=p);let m;t[12]!==n||t[13]!==d||t[14]!==a?(m=n?[{icon:`settings-3`,ariaLabel:a(`assistants.conversation.openSettings`),onClick:d}]:[],t[12]=n,t[13]=d,t[14]=a,t[15]=m):m=t[15];let g;return t[16]!==r||t[17]!==f||t[18]!==p||t[19]!==m?(g=(0,H.jsx)(T,{title:f,backAriaLabel:p,onBack:r,actions:m,overlay:!0}),t[16]=r,t[17]=f,t[18]=p,t[19]=m,t[20]=g):g=t[20],g},xe=e=>{let t=(0,V.c)(34),{assistant:n,avatarSeed:r,unreadCount:i,summary:a,assistantID:o,displayName:s,selected:c,onSelect:l,onEdit:u,onDelete:d,serverWorking:f}=e,p=ne(o,f!==void 0&&f),m=B.useRef(null),_;t[0]===l?_=t[1]:(_=()=>l(),t[0]=l,t[1]=_);let v=h(_),y=c?`border-border/50 bg-[var(--surface-elevated)]`:`border-transparent hover:bg-interactive-hover`,b;t[2]===y?b=t[3]:(b=g(`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`,y),t[2]=y,t[3]=b);let x;t[4]!==o||t[5]!==r||t[6]!==s||t[7]!==p?(x=(0,H.jsx)(re,{name:o,avatarSeed:r,size:44,label:s,working:p,hoverTarget:m}),t[4]=o,t[5]=r,t[6]=s,t[7]=p,t[8]=x):x=t[8];let S=c?`font-semibold`:`font-medium`,C;t[9]===S?C=t[10]:(C=g(`block truncate typography-ui-label leading-5`,S),t[9]=S,t[10]=C);let w;t[11]!==s||t[12]!==C?(w=(0,H.jsx)(`span`,{className:C,children:s}),t[11]=s,t[12]=C,t[13]=w):w=t[13];let T;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(T=g(W,`mt-1 text-[length:calc(var(--text-micro)*0.9)] leading-5`),t[14]=T):T=t[14];let E;t[15]===a?E=t[16]:(E=(0,H.jsx)(`span`,{className:T,children:a}),t[15]=a,t[16]=E);let D;t[17]!==E||t[18]!==w?(D=(0,H.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[w,E]}),t[17]=E,t[18]=w,t[19]=D):D=t[19];let O;t[20]===i?O=t[21]:(O=(0,H.jsx)(I,{count:i,className:`h-3.5 min-w-3.5 bg-[oklch(from_var(--primary-base)_calc(l_*_0.78)_c_h)] px-1 text-[10px] text-[var(--color-white)] shadow-none`}),t[20]=i,t[21]=O);let k;t[22]!==v||t[23]!==c||t[24]!==D||t[25]!==O||t[26]!==b||t[27]!==x?(k=(0,H.jsxs)(`button`,{ref:m,type:`button`,role:`option`,"aria-selected":c,onClick:v,className:b,children:[x,D,O]}),t[22]=v,t[23]=c,t[24]=D,t[25]=O,t[26]=b,t[27]=x,t[28]=k):k=t[28];let A;return t[29]!==n||t[30]!==d||t[31]!==u||t[32]!==k?(A=(0,H.jsx)(U,{assistant:n,doubleClickMiniChat:!0,onEdit:u,onDelete:d,trigger:k}),t[29]=n,t[30]=d,t[31]=u,t[32]=k,t[33]=A):A=t[33],A},G=e=>{let t=(0,V.c)(117),{activeOverride:n,onMobileBack:r,onMobileOpenSettings:o}=e,{t:s}=v(),{isMobile:c}=ee(),l=te(),u=B.useSyncExternalStore(i,a,a),f=d(Se),p=n??f,b=d(Ce),S=c||b,C=x(),w=E(),T=w.data;T?.assistants;let A;t[0]===T?.assistants?A=t[1]:(A=T?.assistants??[],t[0]=T?.assistants,t[1]=A);let j;t[2]===A?j=t[3]:(j=oe(A),t[2]=A,t[3]=j);let M=j,N;t[4]===u?N=t[5]:(N=e=>e.assistantByTransport[u]??null,t[4]=u,t[5]=N);let P=D(N),F=D(we),ne=D(Te),I;t[6]!==P||t[7]!==T?.assistants?(I=T?.assistants.find(e=>e.id===P)??null,t[6]=P,t[7]=T?.assistants,t[8]=I):I=t[8];let L=I,se;t[9]!==F||t[10]!==P||t[11]!==T?(se=()=>{!P&&T?.assistants[0]&&F(T.assistants[0].id)},t[9]=F,t[10]=P,t[11]=T,t[12]=se):se=t[12];let ce=T?.assistants,R;t[13]!==F||t[14]!==P||t[15]!==ce?(R=[F,P,ce],t[13]=F,t[14]=P,t[15]=ce,t[16]=R):R=t[16],B.useEffect(se,R);let z;t[17]!==L||t[18]!==F||t[19]!==P||t[20]!==T?.assistants||t[21]!==w.isSuccess?(z=()=>{w.isSuccess&&P&&!L&&F(T?.assistants[0]?.id??null)},t[17]=L,t[18]=F,t[19]=P,t[20]=T?.assistants,t[21]=w.isSuccess,t[22]=z):z=t[22];let U=T?.assistants,de;t[23]!==L||t[24]!==F||t[25]!==P||t[26]!==w.isSuccess||t[27]!==U?(de=[L,F,P,U,w.isSuccess],t[23]=L,t[24]=F,t[25]=P,t[26]=w.isSuccess,t[27]=U,t[28]=de):de=t[28],B.useEffect(z,de);let me;t[29]!==l||t[30]!==ne?(me=()=>{if(ne(),l){l.openSettings();return}let e=d.getState();e.setSettingsPage(`assistants`),e.setSettingsDialogOpen(!0)},t[29]=l,t[30]=ne,t[31]=me):me=t[31];let W=h(me),ge;t[32]===l?ge=t[33]:(ge=e=>{O(e,l?{openMobileSettings:l.openSettings}:void 0)},t[32]=l,t[33]=ge);let ye=h(ge),G;t[34]!==L||t[35]!==l?(G=()=>{L&&O(L.id,l?{openMobileSettings:l.openSettings}:void 0)},t[34]=L,t[35]=l,t[36]=G):G=t[36];let De=h(G),[Oe,ke]=B.useState(null),Ae;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=e=>{ke(e)},t[37]=Ae):Ae=t[37];let je=h(Ae),Me;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(Me=e=>{e||ke(null)},t[38]=Me):Me=t[38];let Ne=h(Me),Pe=h(Ee),Fe;t[39]!==r||t[40]!==Pe?(Fe=()=>{if(r){r();return}Pe()},t[39]=r,t[40]=Pe,t[41]=Fe):Fe=t[41];let K=h(Fe),Ie=ve({capabilityPending:C.isPending,snapshotPending:w.isPending,capabilityError:C.isError,supported:C.data?.supported,capabilityEnabled:C.data?.enabled,snapshotEnabled:T?.enabled,snapshotSettled:w.isSuccess,assistantCount:T?.assistants.length??0,hasAssistant:!!L}),Le;t[42]!==L||t[43]!==K||t[44]!==S||t[45]!==o?(Le=(e,t,n,r)=>(0,H.jsxs)(`div`,{className:`relative flex h-full min-h-0 flex-col`,children:[S?(0,H.jsx)(be,{assistant:L,onBack:K,onOpenSettings:o}):null,(0,H.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center px-6 pt-[calc(max(0.25rem,var(--yuri-safe-area-top,0px))+var(--yuri-mobile-detail-navigation-height,3.5rem))] text-center`,children:[(0,H.jsx)(k,{name:e,className:`size-6 text-muted-foreground`}),(0,H.jsx)(`h1`,{className:`mt-4 typography-ui-header font-semibold`,children:t}),n?(0,H.jsx)(`p`,{className:`mt-2 max-w-md typography-ui text-muted-foreground`,children:n}):null,r?(0,H.jsx)(`div`,{className:`mt-5`,children:r}):null]})]}),t[42]=L,t[43]=K,t[44]=S,t[45]=o,t[46]=Le):Le=t[46];let q=Le;if(Ie===`loading`){let e;t[47]!==L||t[48]!==K||t[49]!==S||t[50]!==o?(e=S?(0,H.jsx)(be,{assistant:L,onBack:K,onOpenSettings:o}):null,t[47]=L,t[48]=K,t[49]=S,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,H.jsx)(k,{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,H.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center px-6 pt-[calc(max(0.25rem,var(--yuri-safe-area-top,0px))+var(--yuri-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,H.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(Ie===`unavailable`){let e;return t[60]!==q||t[61]!==s?(e=q(`cloud-off`,s(`assistants.state.unavailable`)),t[60]=q,t[61]=s,t[62]=e):e=t[62],e}if(Ie===`onboarding`){let e;if(t[63]!==W||t[64]!==q||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]!==W||t[70]!==i?(a=(0,H.jsx)(_,{onClick:W,children:i}),t[69]=W,t[70]=i,t[71]=a):a=t[71],e=q(`ai-agent`,n,r,a),t[63]=W,t[64]=q,t[65]=s,t[66]=e}else e=t[66];return e}if(!T||!L){let e;return t[72]!==q||t[73]!==s?(e=q(`cloud-off`,s(`assistants.state.unavailable`)),t[72]=q,t[73]=s,t[74]=e):e=t[74],e}let Re;t[75]===L.name?Re=t[76]:(Re=y(L.name),t[75]=L.name,t[76]=Re);let ze=Re,Be;t[77]!==w.isError||t[78]!==s?(Be=w.isError?s(`assistants.state.staleSnapshot`):null,t[77]=w.isError,t[78]=s,t[79]=Be):Be=t[79];let Ve=Be,J;t[80]!==M||t[81]!==S||t[82]!==W||t[83]!==ye||t[84]!==je||t[85]!==F||t[86]!==P||t[87]!==T||t[88]!==s?(J=S?null:(0,H.jsxs)(`section`,{className:`flex h-full min-h-0 w-[clamp(16rem,22vw,20rem)] shrink-0 flex-col overflow-hidden`,children:[(0,H.jsxs)(`header`,{className:`flex shrink-0 items-center gap-3 px-4 pb-1 pt-4 sm:px-5`,children:[(0,H.jsx)(`h1`,{className:`min-w-0 truncate typography-ui-label font-semibold text-foreground`,children:s(`assistants.title`)}),(0,H.jsx)(pe,{snapshot:T,compact:!0,rowClassName:`flex min-w-0 flex-1 justify-end`}),(0,H.jsx)(_,{type:`button`,variant:`mobileGlass`,size:`mobileIcon`,className:`size-8 min-h-0 min-w-0 !shadow-[0_0_0_0.5px_rgb(0_0_0/0.08),0_1px_2px_rgb(0_0_0/0.05)] dark:!shadow-[var(--yuri-mobile-glass-shadow)]`,"aria-label":s(`assistants.settings.create`),onClick:W,children:(0,H.jsx)(k,{name:`add`,className:`size-4`})})]}),(0,H.jsxs)(`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,H.jsx)(fe,{contacts:M.pinned,selectedAssistantID:P,onSelect:F,onEdit:ye,onDelete:je}),(0,H.jsx)(`div`,{className:`flex flex-col gap-1 pt-1`,children:M.unpinned.map(e=>{let t=e.id===P,n=y(e.name);return(0,H.jsx)(xe,{assistant:e,assistantID:e.id,avatarSeed:e.avatarSeed,unreadCount:e.unreadCount??0,summary:_e(e.latestMessagePreview,s),displayName:n.displayName,selected:t,assignedSessionIDs:e.assignedSessionIDs,serverWorking:e.working,onSelect:()=>F(e.id),onEdit:()=>ye(e.id),onDelete:()=>je(e)},e.id)})})]})]}),t[80]=M,t[81]=S,t[82]=W,t[83]=ye,t[84]=je,t[85]=F,t[86]=P,t[87]=T,t[88]=s,t[89]=J):J=t[89];let He=Oe!==null,Y;t[90]!==Oe||t[91]!==Ne||t[92]!==He?(Y=(0,H.jsx)(he,{assistant:Oe,open:He,onOpenChange:Ne}),t[90]=Oe,t[91]=Ne,t[92]=He,t[93]=Y):Y=t[93];let Ue=!S&&`border-l border-[var(--surface-subtle)]`,X;t[94]===Ue?X=t[95]:(X=g(`relative flex min-h-0 min-w-0 flex-1 flex-col overflow-clip bg-background`,Ue),t[94]=Ue,t[95]=X);let Z;t[96]!==L||t[97]!==K||t[98]!==S||t[99]!==o||t[100]!==De||t[101]!==ze||t[102]!==s?(Z=S?(0,H.jsx)(be,{assistant:L,onBack:K,onOpenSettings:o}):(0,H.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,H.jsx)(re,{name:L.id,avatarSeed:L.avatarSeed,size:40,label:ze.displayName||L.name,working:!!(L.working||L.activeContactTurn),showWorkingDot:!1}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`div`,{className:`truncate typography-ui-label font-semibold leading-5 tracking-[-0.01em] text-foreground`,children:ze.displayName}),(0,H.jsx)(ae,{assistantID:L.id,serverWorking:!!(L.working||L.activeContactTurn),lastContactAt:L.latestMessagePreview?.createdAt})]}),le()?(0,H.jsx)(_,{type:`button`,variant:`ghost`,size:`icon`,className:`text-muted-foreground/65`,onClick:()=>{ue(L.id).catch(()=>m.error(s(`miniChat.actions.failed`)))},"aria-label":s(`sessions.sidebar.session.menu.openMiniChatWindow`),title:s(`sessions.sidebar.session.menu.openMiniChatWindow`),children:(0,H.jsx)(k,{name:`external-link`,className:`size-4`})}):null,(0,H.jsx)(_,{type:`button`,variant:`ghost`,size:`icon`,className:`size-8 shrink-0 rounded-full text-muted-foreground/65 transition-colors hover:text-foreground`,onClick:De,"aria-label":s(`assistants.conversation.openSettings`),children:(0,H.jsx)(k,{name:`settings-3`,className:`size-4`})})]}),t[96]=L,t[97]=K,t[98]=S,t[99]=o,t[100]=De,t[101]=ze,t[102]=s,t[103]=Z):Z=t[103];let Q;t[104]!==p||t[105]!==L||t[106]!==S||t[107]!==Ve?(Q=(0,H.jsx)(ie,{assistant:L,warning:Ve,active:p,overlayHeader:S}),t[104]=p,t[105]=L,t[106]=S,t[107]=Ve,t[108]=Q):Q=t[108];let $;t[109]!==X||t[110]!==Z||t[111]!==Q?($=(0,H.jsxs)(`div`,{className:X,children:[Z,Q]}),t[109]=X,t[110]=Z,t[111]=Q,t[112]=$):$=t[112];let We;return t[113]!==J||t[114]!==Y||t[115]!==$?(We=(0,H.jsxs)(`div`,{className:`relative flex h-full min-h-0 overflow-clip bg-background`,"data-presentation":`workspace`,children:[J,Y,$]}),t[113]=J,t[114]=Y,t[115]=$,t[116]=We):We=t[116],We};function Se(e){return e.activeMainTab===`assistant`}function Ce(e){return e.isMobile}function we(e){return e.selectAssistant}function Te(e){return e.requestCreate}function Ee(){d.getState().setActiveMainTab(`chat`)}export{he as a,U as c,_e as i,ye as n,pe as o,W as r,fe as s,G as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./runtime-switch-ibQIZnws.js";import{ot as n,st as r}from"./vendor-base-ui-CzHs0bHY.js";import{r as i}from"./useUIStore-BsCfUWQw.js";import{l as a}from"./vendor-tanstack-react-query-B-Wpqq5J.js";import{a as o,i as s,t as c,u as l}from"./fileQueries-BaEKb7SZ.js";import{r as u}from"./vendor-sonner-BEHGipm5.js";import{Va as d}from"./useMobileNavigationStore-SCjA_7jP.js";import{n as f}from"./Icon-DsN23fuV.js";import{n as p}from"./useEffectiveDirectory-Uc8I6wXt.js";import{t as m}from"./diagram-OTF8YAve.js";var h=e(r(),1),g=n();function _(){let{t:e}=d(),{files:n}=l(),r=a(),_=p()??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=o({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:o,generation:l,scopeDirectory:d,transport:f}=i,p=D.current.then(async()=>{try{if(!(await a(o,t))?.success)throw Error(e(`filesView.toast.writeFileFailed`));let n={scopeDirectory:d,path:o};await r.cancelQueries({queryKey:c(n,f),exact:!0}),s(r,n,f,t);let i=T.current;w.current&&i?.path===o&&i.generation===l&&i.transport===f&&i.scopeDirectory===d&&S(t)}catch(t){u.error(t instanceof Error?t.message:e(`filesView.toast.saveFailed`))}});D.current=p.catch(()=>void 0),await p},[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)(f,{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)(f,{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)(f,{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)(f,{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{r as e}from"./rolldown-runtime-hePW80VL.js";import{ot as t,st as n}from"./vendor-base-ui-CzHs0bHY.js";import{n as r}from"./vendor-react-DlzBev0S.js";import{Jn as i}from"./useMobileNavigationStore-SCjA_7jP.js";var a=`#yuri-skill:`,o=`#yuri-agent:`,s=e=>`https://opencode.ai/docs/agents/#${encodeURIComponent(e)}`,c=e=>`${a}${encodeURIComponent(e)}`,l=e=>`${o}${encodeURIComponent(e)}`,u=e=>{let t=[a,`#openchamber-skill:`].find(t=>e?.startsWith(t));if(!t||!e)return null;try{return decodeURIComponent(e.slice(t.length))}catch{return null}},d=e=>{let t=[o,`#openchamber-agent:`].find(t=>e?.startsWith(t));if(!t||!e)return null;try{return decodeURIComponent(e.slice(t.length))}catch{return null}},f=[`user-blocking`,`visible`,`background`],p=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 f){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()},p=()=>{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&&p(),()=>{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 f){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}}},m=null,h=()=>typeof window>`u`?null:m||(m=p({requestFrame:e=>window.requestAnimationFrame(e),cancelFrame:e=>window.cancelAnimationFrame(e),now:()=>performance.now(),maxTasksPerFrame:2,frameBudgetMs:6}),m),g=(e,t)=>{let n=h();return n?n.enqueue(e,t):(e(),()=>{})},_={textThrottleMs:20,markdownPaceMs:64},v={textThrottleMs:100,markdownPaceMs:128},y=e=>e===`android`?v:_,b=r(),x=e(n(),1),S=t(),C=x.createContext(!1),w=e=>{let t=(0,b.c)(3),{disabled:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,S.jsx)(C.Provider,{value:n,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i},T=e=>{let t=(0,b.c)(8),{children:n,className:r}=e,[a,o]=x.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]),x.useEffect(s,c);let l=a?`opacity-100 translate-y-0`:`opacity-0 translate-y-2`,u;t[2]!==r||t[3]!==l?(u=i(`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,S.jsx)(`div`,{className:u,children:n}),t[5]=n,t[6]=u,t[7]=d):d=t[7],d},E=e=>{let t=(0,b.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=x.useContext(C),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,S.jsx)(S.Fragment,{children:n}),t[0]=n,t[1]=e),e}let p;return t[2]!==n||t[3]!==r?(p=(0,S.jsx)(T,{className:r,children:n}),t[2]=n,t[3]=r,t[4]=p):p=t[4],p};export{l as a,d as c,g as i,u as l,E as n,s as o,y as r,c as s,w as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{ot as t,st as n}from"./vendor-base-ui-CzHs0bHY.js";import{n as r}from"./vendor-react-DlzBev0S.js";import{Kn as i,Va as a}from"./useMobileNavigationStore-SCjA_7jP.js";import{r as o}from"./device-Db_TcRdX.js";import{a as s}from"./react-a6PrrNTm.js";import{a as c,n as l,t as u}from"./readiness-CUPPcONt.js";import{t as d}from"./GuiPluginWindow-BgOCEgEb.js";var f=r(),p=e(n(),1),m=t();function h(){let e=(0,f.c)(12),{host:t,snapshot:n}=s(),{t:r}=a(),{isMobile:h}=o(),[_]=p.useState(g),v;if(e[0]!==_||e[1]!==t||e[2]!==h||e[3]!==n.activePanel||e[4]!==n.panels||e[5]!==n.plugins||e[6]!==r){let a;e[8]===n.activePanel?a=e[9]:(a=e=>e.key===n.activePanel&&!e.inline,e[8]=n.activePanel,e[9]=a);let o=n.panels.find(a),s;e[10]===t?s=e[11]:(s=()=>t?.hidePanel(),e[10]=t,e[11]=s),v=(0,m.jsx)(d,{id:`gui-plugin-panel`,open:!!(t&&o),title:o?.title??r(`guiPlugins.title`),onClose:s,actions:h&&o?(0,m.jsx)(c,{target:_}):null,children:t&&o?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`div`,{className:`flex shrink-0 flex-wrap gap-1`,"aria-label":r(`guiPlugins.panels`),children:n.panels.map(e=>(0,m.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[(0,m.jsx)(i,{variant:`chip`,size:`sm`,"aria-pressed":e.key===o.key,onClick:()=>t.selectPanel(e.key),className:`max-w-64 truncate`,children:e.title}),(0,m.jsx)(i,{variant:`ghost`,size:`xs`,"aria-label":r(`guiPlugins.closePanel`,{title:e.title}),onClick:()=>t.closePanel(e.key),children:r(`guiPlugins.close`)})]},e.key))}),(0,m.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,"data-mobile-edge-to-edge-preview":`true`,children:(0,m.jsx)(l,{host:t,contributionKey:o.key,kind:`panel`,actions:h?_:void 0,revision:u(n.plugins,o.pluginId)})})]}):null}),e[0]=_,e[1]=t,e[2]=h,e[3]=n.activePanel,e[4]=n.panels,e[5]=n.plugins,e[6]=r,e[7]=v}else v=e[7];return v}function g(){return document.createElement(`div`)}export{h as GuiPluginSurface};
@@ -0,0 +1 @@
1
+ import{ot as e}from"./vendor-base-ui-CzHs0bHY.js";import{n as t}from"./vendor-react-DlzBev0S.js";import{Va as n}from"./useMobileNavigationStore-SCjA_7jP.js";import{a as r,n as i,o as a,t as o}from"./dialog-CgtwKUKd.js";import{r as s}from"./device-Db_TcRdX.js";import{t as c}from"./MobileResizableSheet-D_PnyzR0.js";var l=t(),u=e();function d(e){let t=(0,l.c)(24),{id:d,open:f,title:p,onClose:m,children:h,actions:g}=e,{isMobile:_}=s(),{t:v}=n(),y;t[0]===m?y=t[1]:(y=e=>{e||m()},t[0]=m,t[1]=y);let b=y;if(_){let e;t[2]===v?e=t[3]:(e=v(`guiPlugins.close`),t[2]=v,t[3]=e);let n;t[4]===v?n=t[5]:(n=v(`guiPlugins.resize`),t[4]=v,t[5]=n);let r;return t[6]!==g||t[7]!==h||t[8]!==d||t[9]!==b||t[10]!==f||t[11]!==e||t[12]!==n||t[13]!==p?(r=(0,u.jsx)(c,{id:d,open:f,onOpenChange:b,title:p,ariaLabel:p,closeAriaLabel:e,resizeAriaLabel:n,trailing:g,initiallyExpanded:!0,children:h}),t[6]=g,t[7]=h,t[8]=d,t[9]=b,t[10]=f,t[11]=e,t[12]=n,t[13]=p,t[14]=r):r=t[14],r}let x;t[15]===p?x=t[16]:(x=(0,u.jsx)(r,{children:(0,u.jsx)(a,{children:p})}),t[15]=p,t[16]=x);let S;t[17]!==h||t[18]!==x?(S=(0,u.jsxs)(i,{className:`flex h-[80dvh] max-w-5xl flex-col overflow-hidden`,"aria-describedby":void 0,children:[x,h]}),t[17]=h,t[18]=x,t[19]=S):S=t[19];let C;return t[20]!==b||t[21]!==f||t[22]!==S?(C=(0,u.jsx)(o,{open:f,onOpenChange:b,children:S}),t[20]=b,t[21]=f,t[22]=S,t[23]=C):C=t[23],C}export{d as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{ot as t,st as n}from"./vendor-base-ui-CzHs0bHY.js";import{Jn as r}from"./useMobileNavigationStore-SCjA_7jP.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" />`,"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-circle":`<circle cx="12" cy="12" r="10" /> <path d="m12 16 4-4-4-4" /> <path d="M8 12h8" />`,"arrow-right-s":`<path d="m9 18 6-6-6-6" />`,"arrow-right-to-line":`<path d="M17 12H3" /> <path d="m11 18 6-6-6-6" /> <path d="M21 5v14" />`,"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" />`,changes:`<path d="M6 8h12M12 2v12M6 21h12" />`,"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" />`,"check-double":`<path d="M18 6 7 17l-5-5" /> <path d="m22 10-7.5 7.5L13 16" />`,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-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" />`,"circle-dashed":`<path d="M10.1 2.182a10 10 0 0 1 3.8 0" /> <path d="M13.9 21.818a10 10 0 0 1-3.8 0" /> <path d="M17.609 3.721a10 10 0 0 1 2.69 2.7" /> <path d="M2.182 13.9a10 10 0 0 1 0-3.8" /> <path d="M20.279 17.609a10 10 0 0 1-2.7 2.69" /> <path d="M21.818 10.1a10 10 0 0 1 0 3.8" /> <path d="M3.721 6.391a10 10 0 0 1 2.7-2.69" /> <path d="M6.391 20.279a10 10 0 0 1-2.69-2.7" />`,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" />`,"collapse-diagonal":`<path d="m14 10 7-7" /> <path d="M20 10h-6V4" /> <path d="m3 21 7-7" /> <path d="M4 14h6v6" />`,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" />`,"connection-lan":`<g transform="scale(.75)" stroke-width="1.65"><rect x="5" y="18" width="22" height="9" rx="4"/><path d="M10 18v-4m12 4v-4M10 8a9 9 0 0 1 12 0m-9 3a4.7 4.7 0 0 1 6 0M10 22.5h3m8 0h1"/><circle cx="16" cy="14" r="1" fill="currentColor" stroke="none"/></g>`,"connection-local":`<g transform="scale(.75)" stroke-width="1.65"><rect x="6" y="5" width="20" height="17" rx="4"/><path d="M12 26h8m-4-4v4M3 27h26M10 18h12"/></g>`,"connection-relay":`<g transform="scale(.75)" stroke-width="1.65"><path d="M9 21H8a5 5 0 0 1-1-9.9A7.2 7.2 0 0 1 20.8 9a5.9 5.9 0 0 1 4 11.5M11 19h10m-3-3 3 3-3 3M21 25H11m3-3-3 3 3 3"/><path d="m25 4 .5 1.5L27 6l-1.5.5L25 8l-.5-1.5L23 6l1.5-.5Z" fill="currentColor" stroke="none"/></g>`,"connection-ssh":`<g transform="scale(.75)" stroke-width="1.65"><path d="M18 27H9a5 5 0 0 1-5-5V11a5 5 0 0 1 5-5h14a5 5 0 0 1 5 5v8M4 12h24m-19-3h.1m3 0h.1m-3 7 3.5 3L9 22m7 0h2M23 24v-2a2 2 0 0 1 4 0v2"/><rect x="21.5" y="24" width="7" height="5" rx="1.6"/></g>`,"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" />`,"corner-up-left":`<path d="M20 20v-7a4 4 0 0 0-4-4H4" /> <path d="M9 14 4 9l5-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-back":`<path d="M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z" /> <path d="m12 9 6 6" /> <path d="m18 9-6 6" />`,"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" />`,"device-android":`<path d="m7 9-2-3.5M17 9l2-3.5" /><path d="M2 18a10 10 0 0 1 20 0H2Z" /><path d="M7.5 14h.01M16.5 14h.01" />`,"device-apple":`<path d="M12.9 6.3c.9-.1 2-.6 2.6-1.5.6-.8.9-1.9.8-2.8-1 .1-2.1.7-2.8 1.5-.6.7-1 1.8-.9 2.8Z" /><path d="M16.4 12.6c0-2 1.6-3 1.7-3.1-.9-1.4-2.4-1.6-2.9-1.6-1.2-.1-2.4.7-3 .7-.6 0-1.6-.7-2.6-.7-1.3 0-2.6.8-3.3 2-1.4 2.5-.4 6.1 1 8.1.7 1 1.5 2.1 2.5 2 1-.04 1.4-.6 2.6-.6s1.5.6 2.6.6c1.1 0 1.8-1 2.5-2 .8-1.2 1.1-2.3 1.1-2.4-.02-.01-2.2-.9-2.2-3z" />`,"device-cli":`<rect x="2.5" y="3.5" width="19" height="17" rx="4" /><path d="m8 10 2.25 2L8 14" /><path d="M12.75 14h3.5" />`,"device-desktop":`<rect x="2.5" y="4" width="19" height="12.5" rx="3.5" /><path d="M9 20h6" /><path d="M12 16.5V20" />`,"device-ios":`<path d="M12.9 6.3c.9-.1 2-.6 2.6-1.5.6-.8.9-1.9.8-2.8-1 .1-2.1.7-2.8 1.5-.6.7-1 1.8-.9 2.8Z" /><path d="M16.4 12.6c0-2 1.6-3 1.7-3.1-.9-1.4-2.4-1.6-2.9-1.6-1.2-.1-2.4.7-3 .7-.6 0-1.6-.7-2.6-.7-1.3 0-2.6.8-3.3 2-1.4 2.5-.4 6.1 1 8.1.7 1 1.5 2.1 2.5 2 1-.04 1.4-.6 2.6-.6s1.5.6 2.6.6c1.1 0 1.8-1 2.5-2 .8-1.2 1.1-2.3 1.1-2.4-.02-.01-2.2-.9-2.2-3z" />`,"device-linux":`<rect x="2.5" y="3.5" width="19" height="17" rx="4" /><path d="m8 10 2.25 2L8 14" /><path d="M12.75 14h3.5" />`,"device-macos":`<rect x="2.5" y="4" width="19" height="12.5" rx="3.5" /><path d="M9 20h6" /><path d="M12 16.5V20" />`,"device-tablet":`<rect x="4.5" y="2.5" width="15" height="19" rx="4" /><path d="M11.5 18h1" />`,"device-windows":`<rect x="2.5" y="4" width="19" height="12.5" rx="3.5" /><path d="M9 20h6" /><path d="M12 16.5V20" />`,"devices-connected":`<path d="M13 17H5a2.5 2.5 0 0 1-2.5-2.5v-8A2.5 2.5 0 0 1 5 4h12a2.5 2.5 0 0 1 2.5 2.5V8M8 20h4M10 17v3" /><rect x="15" y="10" width="7" height="11" rx="2" /><path d="M18 18.5h1" />`,"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-2-fill":`<path d="M4 19H20V12H22V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V12H4V19ZM14 9H19L12 16L5 9H10V3H14V9Z" fill="currentColor" stroke="none"/>`,"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" stroke="none"/>`,"exclamation-fill":`<path d="M10.5 4h3v10h-3zm0 13h3v3h-3z" fill="currentColor" stroke="none" />`,"expand-diagonal":`<path d="M15 3h6v6" /> <path d="m21 3-7 7" /> <path d="m3 21 7-7" /> <path d="M9 21H3v-6" />`,"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="M10 21H7a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h5.2c.8 0 1.6.3 2.1.9l2.8 2.8c.6.5.9 1.3.9 2.1V10M12 3.2V7a2 2 0 0 0 2 2h3.8" /><path d="m12 17 6-6a2.1 2.1 0 0 1 3 3l-6 6-4 1 1-4ZM17 12l3 3" />`,"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="M3 17V6a3 3 0 0 1 3-3h2.2c.9 0 1.7.4 2.2 1.1l.6.8c.5.7 1.3 1.1 2.2 1.1H18a3 3 0 0 1 3 3v1M3 17l3-5a3 3 0 0 1 2.6-1.5h10.6a2 2 0 0 1 1.9 2.6l-1.5 5a2.7 2.7 0 0 1-2.6 1.9H6a3 3 0 0 1-3-3Z" />`,"folder-3":`<path d="M3 17V6a3 3 0 0 1 3-3h2.2c.9 0 1.7.4 2.2 1.1l.6.8c.5.7 1.3 1.1 2.2 1.1H18a3 3 0 0 1 3 3v1M3 17l3-5a3 3 0 0 1 2.6-1.5h10.6a2 2 0 0 1 1.9 2.6l-1.5 5a2.7 2.7 0 0 1-2.6 1.9H6a3 3 0 0 1-3-3Z" />`,"folder-3-fill":`<path d="M3 17V6a3 3 0 0 1 3-3h2.2c.9 0 1.7.4 2.2 1.1l.6.8c.5.7 1.3 1.1 2.2 1.1H18a3 3 0 0 1 3 3v1M3 17l3-5a3 3 0 0 1 2.6-1.5h10.6a2 2 0 0 1 1.9 2.6l-1.5 5a2.7 2.7 0 0 1-2.6 1.9H6a3 3 0 0 1-3-3Z" />`,"folder-6":`<path d="M3 17V6a3 3 0 0 1 3-3h2.2c.9 0 1.7.4 2.2 1.1l.6.8c.5.7 1.3 1.1 2.2 1.1H18a3 3 0 0 1 3 3v1M3 17l3-5a3 3 0 0 1 2.6-1.5h10.6a2 2 0 0 1 1.9 2.6l-1.5 5a2.7 2.7 0 0 1-2.6 1.9H6a3 3 0 0 1-3-3Z" />`,"folder-add":`<path d="M3 17V6a3 3 0 0 1 3-3h2.2c.9 0 1.7.4 2.2 1.1l.6.8c.5.7 1.3 1.1 2.2 1.1H18a3 3 0 0 1 3 3v1M3 17l3-5a3 3 0 0 1 2.6-1.5h10.6a2 2 0 0 1 1.9 2.6l-1.5 5a2.7 2.7 0 0 1-2.6 1.9H6a3 3 0 0 1-3-3Z" /><path d="M12 11v6" /><path d="M9 14h6" />`,"folder-open":`<path d="M3 17V6a3 3 0 0 1 3-3h2.2c.9 0 1.7.4 2.2 1.1l.6.8c.5.7 1.3 1.1 2.2 1.1H18a3 3 0 0 1 3 3v1M3 17l3-5a3 3 0 0 1 2.6-1.5h10.6a2 2 0 0 1 1.9 2.6l-1.5 5a2.7 2.7 0 0 1-2.6 1.9H6a3 3 0 0 1-3-3Z" />`,"folder-open-fill":`<path d="M3 17V6a3 3 0 0 1 3-3h2.2c.9 0 1.7.4 2.2 1.1l.6.8c.5.7 1.3 1.1 2.2 1.1H18a3 3 0 0 1 3 3v1M3 17l3-5a3 3 0 0 1 2.6-1.5h10.6a2 2 0 0 1 1.9 2.6l-1.5 5a2.7 2.7 0 0 1-2.6 1.9H6a3 3 0 0 1-3-3Z" />`,"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="M3 17V6a3 3 0 0 1 3-3h2.2c.9 0 1.7.4 2.2 1.1l.6.8c.5.7 1.3 1.1 2.2 1.1H18a3 3 0 0 1 3 3v1M3 17l3-5a3 3 0 0 1 2.6-1.5h10.6a2 2 0 0 1 1.9 2.6l-1.5 5a2.7 2.7 0 0 1-2.6 1.9H6a3 3 0 0 1-3-3Z" />`,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="6" cy="17.5" r="2.75" /><circle cx="18" cy="6.5" r="2.75" /><path d="M6 14.75V3.5M18 9.25c0 4.75-3.5 8.25-9.25 8.25" />`,"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" />`,globe:`<path d="M13.0003 21H18.0003V23H6.00032V21H11.0003V19.9506C7.70689 19.6236 4.88351 17.6987 3.31641 14.9622L5.05319 13.9697C6.43208 16.3776 9.02674 18 12.0003 18C16.4186 18 20.0003 14.4182 20.0003 9.99995C20.0003 7.02637 18.378 4.43171 15.9701 3.05282L16.9626 1.31604C19.9724 3.03965 22.0003 6.28297 22.0003 9.99995C22.0003 15.1853 18.0536 19.4489 13.0003 19.9506V21ZM12.0003 17C8.13433 17 5.00032 13.8659 5.00032 9.99995C5.00032 6.13396 8.13433 2.99995 12.0003 2.99995C15.8663 2.99995 19.0003 6.13396 19.0003 9.99995C19.0003 13.8659 15.8663 17 12.0003 17ZM12.0003 15C14.7617 15 17.0003 12.7614 17.0003 9.99995C17.0003 7.23853 14.7617 4.99995 12.0003 4.99995C9.2389 4.99995 7.00032 7.23853 7.00032 9.99995C7.00032 12.7614 9.2389 15 12.0003 15Z" fill="currentColor" stroke="none"/>`,"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" />`,hand:`<path d="M12.5002 2C12.2241 2 12.0002 2.22386 12.0002 2.5V12H10.0002V4.5C10.0002 4.22386 9.77634 4 9.5002 4C9.22405 4 9.0002 4.22386 9.0002 4.5V14C8.64653 14 7.00024 14 7.00024 14C6.61911 12.3792 5.64236 11.4407 4.5954 11.3216C4.87926 12.0664 5.36117 13.2592 6.16634 15.0995C7.02511 17.0622 7.89128 18.5218 9.00374 19.4986C10.0783 20.442 11.4586 21 13.5002 21C16.5378 21 19.0002 18.5377 19.0002 15.5002V7C19.0002 6.72386 18.7763 6.5 18.5002 6.5C18.2241 6.5 18.0002 6.72386 18.0002 7V12H16.0002V4C16.0002 3.72386 15.7763 3.5 15.5002 3.5C15.2241 3.5 15.0002 3.72386 15.0002 4V12H13.0002V2.5C13.0002 2.22386 12.7763 2 12.5002 2ZM21.0002 15.5002C21.0002 19.6424 17.6423 23 13.5002 23C11.0417 23 9.17214 22.308 7.68416 21.0015C6.23411 19.7283 5.22528 17.9381 4.33405 15.9012C3.40393 13.7753 2.89004 12.4804 2.60991 11.7235C2.25318 10.7597 2.74616 9.41212 4.08583 9.31846C5.24076 9.23771 6.22061 9.61249 7.0002 10.2587V4.5C7.0002 3.11929 8.11949 2 9.5002 2C9.68522 2 9.86554 2.0201 10.0391 2.05823C10.2477 0.888227 11.2702 0 12.5002 0C13.5602 0 14.4661 0.659694 14.8298 1.59091C15.0431 1.53167 15.268 1.5 15.5002 1.5C16.8809 1.5 18.0002 2.61929 18.0002 4V4.55001C18.1618 4.51722 18.329 4.5 18.5002 4.5C19.8809 4.5 21.0002 5.61929 21.0002 7V15.5002Z" fill="currentColor" stroke="none"/>`,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" />`,"home-fill":`<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 2h-4v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8H5a2 2 0 0 1-2-2Z" fill="currentColor" stroke="none"/>`,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" />`,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" />`,keyboard:`<path d="M3 17H21V19H3V17ZM3 11H6V14H3V11ZM8 11H11V14H8V11ZM3 5H6V8H3V5ZM13 5H16V8H13V5ZM18 5H21V8H18V5ZM13 11H16V14H13V11ZM18 11H21V14H18V11ZM8 5H11V8H8V5Z" fill="currentColor" stroke="none"/>`,"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" />`,mail:`<path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" /> <rect x="2" y="4" width="20" height="16" rx="2" />`,"mail-open":`<path d="M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z" /> <path d="m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10" />`,"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" />`,"mic-fill":`<path d="M11.9998 1C14.7612 1 16.9998 3.23858 16.9998 6V10C16.9998 12.7614 14.7612 15 11.9998 15C9.23833 15 6.99976 12.7614 6.99976 10V6C6.99976 3.23858 9.23833 1 11.9998 1ZM3.05469 11H5.07065C5.55588 14.3923 8.47329 17 11.9998 17C15.5262 17 18.4436 14.3923 18.9289 11H20.9448C20.4837 15.1716 17.1714 18.4839 12.9998 18.9451V23H10.9998V18.9451C6.82814 18.4839 3.51584 15.1716 3.05469 11Z" fill="currentColor" stroke="none"/>`,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="9" y="3" width="6" height="5" rx="2" /><path d="M12 8v1.5c0 4-6 2-6 6.5M12 9.5c0 4 6 2 6 6.5" /><rect x="3" y="16" width="6" height="5" rx="2" /><rect x="15" y="16" width="6" height="5" rx="2" />`,"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" stroke="none"/>`,"pause-circle":`<circle cx="12" cy="12" r="10" /> <line x1="10" x2="10" y1="15" y2="9" /> <line x1="14" x2="14" y1="15" y2="9" />`,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-2":`<path d="M14 17H5" /> <path d="M19 7h-9" /> <circle cx="17" cy="17" r="3" /> <circle cx="7" cy="7" r="3" />`,"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.5 4.25a.75.75 0 0 0-1.25-.56L6 7.5H3.5A1.5 1.5 0 0 0 2 9v6a1.5 1.5 0 0 0 1.5 1.5H6l4.25 3.81a.75.75 0 0 0 1.25-.56Z" /><path d="M16 8a6 6 0 0 1 0 8M19 4.5a10.5 10.5 0 0 1 0 15" />`,"volume-up-fill":`<path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z" fill="currentColor" stroke="none"/>`,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=`yuri-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^="yuri-"]`),e=>e.id.slice(3)));if(!n.innerHTML.includes(`--yuri-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="yuri-${e}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--yuri-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(`yuri-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:{"--yuri-icon-stroke":s,...i},...a,children:(0,o.jsx)(`use`,{href:`#yuri-${e}`})})});m.displayName=`Icon`;export{m as n,a as r,c as t};
@@ -0,0 +1 @@
1
+ import{ot as e}from"./vendor-base-ui-CzHs0bHY.js";import{n as t}from"./vendor-react-DlzBev0S.js";import{Jn as n,Va as r}from"./useMobileNavigationStore-SCjA_7jP.js";import"./image-loading-D1DfK_bJ.js";var i=t(),a=e();function o(e){let t=(0,i.c)(7),{className:o}=e,{t:s}=r(),c;t[0]===o?c=t[1]:(c=n(`yuri-image-loading`,o),t[0]=o,t[1]=c);let l;t[2]===s?l=t[3]:(l=s(`chat.fileAttachment.image.loading`),t[2]=s,t[3]=l);let u;return t[4]!==c||t[5]!==l?(u=(0,a.jsx)(`span`,{className:c,role:`status`,"aria-label":l}),t[4]=c,t[5]=l,t[6]=u):u=t[6],u}export{o as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{ot as t,st as n}from"./vendor-base-ui-CzHs0bHY.js";import{r}from"./useUIStore-BsCfUWQw.js";import{n as i}from"./vendor-react-DlzBev0S.js";import{Va as a}from"./useMobileNavigationStore-SCjA_7jP.js";import{t as o}from"./ImageLoadingPlaceholder-MfVzv_y1.js";var s=i(),c=e(n(),1),l=t();function u(e){let t=(0,s.c)(39),n,i,u,f,p,m,h;t[0]===e?(n=t[1],i=t[2],u=t[3],f=t[4],p=t[5],m=t[6],h=t[7]):({resourceError:m,fill:i,contentFrame:n,onLoad:f,onError:u,style:h,...p}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=u,t[4]=f,t[5]=p,t[6]=m,t[7]=h);let g=r(d),{t:_}=a(),v=c.useRef(null),[y,b]=c.useState(`loading`),x=m?`error`:y,S,C;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>{let e=v.current;e?.complete&&e.naturalWidth>0&&b(`loaded`)},C=[],t[8]=S,t[9]=C):(S=t[8],C=t[9]),c.useLayoutEffect(S,C);let w=i||void 0,T=n?g?`mobile`:`desktop`:void 0,E=x===`loading`,D=p.src||void 0,O;t[10]===x?O=t[11]:(O=x===`loaded`?{}:{opacity:0},t[10]=x,t[11]=O);let k;t[12]!==h||t[13]!==O?(k={...h,...O},t[12]=h,t[13]=O,t[14]=k):k=t[14];let A;t[15]===f?A=t[16]:(A=e=>{b(`loaded`),f?.(e)},t[15]=f,t[16]=A);let j;t[17]!==u||t[18]!==p.src?(j=e=>{p.src&&(b(`error`),u?.(e))},t[17]=u,t[18]=p.src,t[19]=j):j=t[19];let M;t[20]!==p||t[21]!==j||t[22]!==D||t[23]!==k||t[24]!==A?(M=(0,l.jsx)(`img`,{...p,ref:v,src:D,style:k,onLoad:A,onError:j}),t[20]=p,t[21]=j,t[22]=D,t[23]=k,t[24]=A,t[25]=M):M=t[25];let N;t[26]===x?N=t[27]:(N=x===`loading`&&(0,l.jsx)(o,{}),t[26]=x,t[27]=N);let P;t[28]!==x||t[29]!==_?(P=x===`error`&&(0,l.jsx)(`span`,{className:`yuri-image-error`,role:`status`,children:_(`chat.fileAttachment.image.loadFailed`)}),t[28]=x,t[29]=_,t[30]=P):P=t[30];let F;return t[31]!==x||t[32]!==M||t[33]!==N||t[34]!==P||t[35]!==w||t[36]!==T||t[37]!==E?(F=(0,l.jsxs)(`span`,{className:`yuri-image-frame`,"data-image-state":x,"data-image-fill":w,"data-image-content":T,"aria-busy":E,children:[M,N,P]}),t[31]=x,t[32]=M,t[33]=N,t[34]=P,t[35]=w,t[36]=T,t[37]=E,t[38]=F):F=t[38],F}function d(e){return e.isMobile}var f=c.memo(function(e){let t=(0,s.c)(11),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({resourceError:a,fill:r,contentFrame:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=`${i.src??``}\n${i.srcSet??``}`,c;return t[5]!==n||t[6]!==r||t[7]!==i||t[8]!==a||t[9]!==o?(c=(0,l.jsx)(u,{...i,resourceError:a,fill:r,contentFrame:n},o),t[5]=n,t[6]=r,t[7]=i,t[8]=a,t[9]=o,t[10]=c):c=t[10],c});export{f as t};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkstreamRendererImpl-Bqbq2VPn.js","assets/rolldown-runtime-hePW80VL.js","assets/vendor-base-ui-CzHs0bHY.js","assets/useUIStore-BsCfUWQw.js","assets/runtime-switch-ibQIZnws.js","assets/runtime-auth-Bh3htXtG.js","assets/vendor-zustand-vDaAPGfl.js","assets/brand-storage-bootstrap-D4BW3w-M.js","assets/brand-storage-migration-Bhz6UOBJ.js","assets/vendor-react-DlzBev0S.js","assets/fileQueries-BaEKb7SZ.js","assets/runtime-fetch-9B8F_rKW.js","assets/vendor-tanstack-query-core-Y_YoRHtC.js","assets/vendor-tanstack-react-query-B-Wpqq5J.js","assets/platform-Dids8J9D.js","assets/desktop-Brp3xDpd.js","assets/path-utils-HRmerlyU.js","assets/vendor-pathe-vBmvQE8f.js","assets/vendor-markstream-react-6zxyQLCD.js","assets/vendor-aparajita-capacitor-secure-storage-xol_6BsB.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-CuTmqEMK.js","assets/vendor-lodash-es-BS45jPoZ.js","assets/vendor-js-cookie-hSOiFTtX.js","assets/useMobileNavigationStore-SCjA_7jP.js","assets/bootstrap-BzeQds0D.js","assets/vendor-opencode-client-cQ47ywrT.js","assets/vendor-effect-X1Hqc7ba.js","assets/runtime-file-resource-tDTBpJT_.js","assets/runtime-file-store-BVRgEtI-.js","assets/runtime-ead7P81A.js","assets/vendor-sonner-BEHGipm5.js","assets/store-Myt_Fv8d.js","assets/tour-DDI0Zg7l.js","assets/useAssistantUIStore-CVSFSgJV.js","assets/vendor-zod-DZzbCm1s.js","assets/vendor-opencode-schema-DWT45VBX.js","assets/vendor-class-variance-authority-BLUaYARZ.js","assets/vendor-tailwind-merge-BicNWLTg.js","assets/useThemeSystem-CNzUUkFn.js","assets/vendor-framer-motion-DDMKlXiP.js","assets/tooltip-D5Xeh6py.js","assets/url-DO6Zrx1P.js","assets/useEffectiveDirectory-Uc8I6wXt.js","assets/image-loading-D1DfK_bJ.js","assets/image-loading-D9Z_BASK.css","assets/LoadingImage-MAgXscGl.js","assets/ImageLoadingPlaceholder-MfVzv_y1.js","assets/FadeInOnReveal-CK7jBcu4.js","assets/markdownHeightCache-DlRC53XG.js","assets/dualLimitLru-D8Sphgua.js","assets/useStreamingTextThrottle-BY1Ynoj1.js","assets/MarkdownRendererImpl-ecACjpZw.js","assets/vendor-katex-DNVSTX6g.js","assets/themes-BgDJcxRc.js","assets/vendor-marked-S3gCOYp1.js","assets/markdownTheme-CHNl6tUv.js","assets/vendor-pierre-diffs-BFiZ3IhI.js","assets/vendor-hast-util-to-html-Bw_SgZ1t.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-BMOrLc9L.js","assets/markdown-worker-oBGEB9Eg.js","assets/vendor-morphdom-BbKiNDAu.js","assets/vendor-dompurify-CeJNOzik.js","assets/vendor-pele-C1WTNWUm.js","assets/vendor-remend-C3cXc-tf.js","assets/fileReferenceActions-D06_lyuL.js","assets/toolHelpers-iEHVHQ9p.js","assets/fileReferenceParser-BayaidRM.js","assets/MarkstreamRendererImpl-C6aiJnjl.css"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t}from"./vendor-zustand-vDaAPGfl.js";import{ot as n,st as r}from"./vendor-base-ui-CzHs0bHY.js";import"./brand-storage-bootstrap-D4BW3w-M.js";import{n as i}from"./vendor-react-DlzBev0S.js";import{o as a}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{Jn as o}from"./useMobileNavigationStore-SCjA_7jP.js";import{t as s}from"./useEffectiveDirectory-Uc8I6wXt.js";import{i as c,n as l,t as u}from"./markdownHeightCache-DlRC53XG.js";var d=i(),f=e(r(),1),p=`yuri:chunk-import-reload`,m=250,h=3e4,g=[/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 _(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 v(e){let t=_(e);return g.some(e=>e.test(t))}function y(e){return`0.2.38-beta.2:${_(e).slice(0,500)}`}function b(e){if(typeof window>`u`)return;let t=Date.now(),n=y(e),r=null;try{let e=window.sessionStorage.getItem(p);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<h)){try{window.sessionStorage.setItem(p,JSON.stringify({signature:n,timestamp:t}))}catch{return}console.error(`[refresh-debug] chunk-import-reload`,{error:_(e).slice(0,1e3)}),window.setTimeout(()=>{window.location.reload()},0)}}async function x(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,!v(e)||t>=n)break;await new Promise(e=>setTimeout(e,m*(t+1)))}throw v(r)&&b(r),r}var S=e=>(0,f.lazy)(()=>x(e)),C=(e,t)=>!!t?.toLowerCase().startsWith(`video/`)||/^data:video\//i.test(e)||/\.(?:mp4|m4v|webm|mov|ogv|ogg)(?:[?#]|$)/i.test(e),w=(e,t)=>{try{let n=t??(typeof localStorage>`u`?null:localStorage);return!n||n.getItem(e)!==`0`}catch{return!0}},T=(e,t)=>{try{typeof localStorage<`u`&&localStorage.setItem(e,t?`1`:`0`)}catch{}},E=`yuri:markstream-react`,D=e=>w(E,e),O=t(e=>({markstreamReactEnabled:D(),setMarkstreamReactEnabled:t=>{T(E,t),e({markstreamReactEnabled:t})}})),k=null,A=()=>(k??=a(()=>import(`./MarkstreamRendererImpl-Bqbq2VPn.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,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77])).catch(e=>{throw k=null,e}),k),j=()=>{A().catch(()=>void 0)},M=null,N=()=>(M??=a(()=>import(`./MarkdownRendererImpl-ecACjpZw.js`).then(e=>e.n),__vite__mapDeps([54,1,4,5,15,16,2,3,6,7,8,9,10,11,12,13,14,17,55,23,24,25,26,27,28,29,30,31,19,32,33,34,35,36,37,38,39,40,52,41,56,44,45,46,47,50,51,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76])).catch(e=>{throw M=null,e}),M),P=()=>{N().catch(()=>void 0),D()&&j()},F=class extends f.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}},I=f.createContext(!0),L=()=>f.useContext(I),R=n(),z=S(()=>N().then(e=>({default:e.MarkdownRenderer}))),B=S(()=>A().then(e=>({default:e.MarkstreamRenderer}))),V=S(()=>N().then(e=>({default:e.SimpleMarkdownRenderer}))),H=e=>e===`tool`?`markdown-content markdown-tool`:e===`reasoning`?`markdown-content markdown-reasoning`:`markdown-content leading-relaxed`,U=e=>{let t=(0,d.c)(15),n=O(K),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?l(u(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 s=a,f;t[5]!==e.className||t[6]!==e.variant?(f=o(`relative break-words w-full min-w-0`,H(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]!==s?(p=(0,R.jsx)(c,{animated:e.animated,content:r,reservedHeight:s}),t[8]=r,t[9]=e.animated,t[10]=s,t[11]=p):p=t[11];let m;return t[12]!==f||t[13]!==p?(m=(0,R.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},W=e=>{let t=(0,d.c)(13),n=L(),r=O(q);if(!n&&e.isStreaming!==!0){let n;return t[0]===e?n=t[1]:(n=(0,R.jsx)(U,{...e,animated:!1,reserveMeasuredHeight:!0}),t[0]=e,t[1]=n),n}let i;t[2]===e?i=t[3]:(i=(0,R.jsx)(f.Suspense,{fallback:(0,R.jsx)(U,{...e,reserveMeasuredHeight:!0}),children:(0,R.jsx)(z,{...e})}),t[2]=e,t[3]=i);let a=i,o;t[4]!==a||t[5]!==r||t[6]!==e?(o=r?(0,R.jsx)(F,{fallback:a,children:(0,R.jsx)(f.Suspense,{fallback:(0,R.jsx)(U,{...e,reserveMeasuredHeight:!0}),children:(0,R.jsx)(B,{...e})})}):a,t[4]=a,t[5]=r,t[6]=e,t[7]=o):o=t[7];let c=o,l;t[8]===e?l=t[9]:(l=t=>{if(!e.onShowPopup||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let n=t.target instanceof Element?t.target.closest(`a[href]`):null,r=n?.getAttribute(`href`);if(!r||!C(r))return;t.preventDefault(),t.stopPropagation();let i=n?.textContent?.trim()||r.split(/[/?#]/).filter(Boolean).pop()||r;e.onShowPopup({open:!0,title:i,content:``,video:{url:r,filename:i,directory:s()??``}})},t[8]=e,t[9]=l);let u;return t[10]!==c||t[11]!==l?(u=(0,R.jsx)(`div`,{className:`contents`,onClickCapture:l,children:c}),t[10]=c,t[11]=l,t[12]=u):u=t[12],u},G=e=>{let t=(0,d.c)(4);if(!L()){let n;return t[0]===e?n=t[1]:(n=(0,R.jsx)(U,{...e,animated:!1}),t[0]=e,t[1]=n),n}let n;return t[2]===e?n=t[3]:(n=(0,R.jsx)(f.Suspense,{fallback:(0,R.jsx)(U,{...e}),children:(0,R.jsx)(V,{...e})}),t[2]=e,t[3]=n),n};function K(e){return e.markstreamReactEnabled}function q(e){return e.markstreamReactEnabled}export{C as a,P as i,G as n,S as o,I as r,W as t};
@@ -1,4 +1,4 @@
1
- import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{i as n}from"./runtime-switch-DEZ1K7qW.js";import{T as r}from"./desktop-BAmoc_34.js";import{ot as i,st as a}from"./vendor-base-ui-CzHs0bHY.js";import{r as o}from"./useUIStore-B61bCFEM.js";import{n as s}from"./vendor-react-DlzBev0S.js";import{u as c}from"./fileQueries-C2Rs6TPz.js";import{t as l}from"./platform-sEg2IOLZ.js";import{n as u}from"./vendor-katex-DNVSTX6g.js";import{a as d,i as f,m as p}from"./vendor-reactuses-core-DWo5Wn6R.js";import{d as m,f as h,r as g}from"./button-CPRnAdlm.js";import{Rn as _}from"./useMobileNavigationStore-D59MROJU.js";import{t as v}from"./dualLimitLru-D8Sphgua.js";import{t as y}from"./useThemeSystem-CNzUUkFn.js";import{r as b}from"./themes-BgDJcxRc.js";import{a as x,i as S,n as C,r as w}from"./url-MRa-FtQa.js";import{n as ee}from"./useEffectiveDirectory-DO311OTB.js";import{a as T,i as E,t as D}from"./image-loading-DKQOYtti.js";import{c as O,i as k,l as A,n as te,o as j,r as ne}from"./FadeInOnReveal-C_UU65YY.js";import{i as re,r as ie,t as ae}from"./markdownHeightCache-D0fP62uP.js";import{t as M}from"./vendor-marked-S3gCOYp1.js";import{n as oe,t as se}from"./markdownTheme-CHNl6tUv.js";import{i as ce,n as N,t as P}from"./markdown-worker-oBGEB9Eg.js";import{t as le}from"./vendor-morphdom-BbKiNDAu.js";import{t as F}from"./vendor-dompurify-CeJNOzik.js";import{t as ue}from"./vendor-pele-C1WTNWUm.js";import{t as I}from"./vendor-remend-C3cXc-tf.js";import{a as L,c as R,f as z,g as de,h as B,i as V,l as H,n as fe,o as U,p as pe,t as me,u as he}from"./fileReferenceActions-DrAZHld4.js";var W=t(a(),1),ge=s(),G=new v({maxEntries:100,maxBytes:8388608}),_e=(e,t)=>{let{surface:n,interactive:r,primary:i,status:a}=t.colors,o={bg:n.elevated,fg:n.foreground,muted:n.mutedForeground,line:r.border,surface:n.muted,"surface-alt":n.background,border:r.border,accent:i.base,critical:a.error,error:a.error,"series-1":i.base,"series-2":a.info,"series-3":a.success,"series-4":a.warning,"series-5":a.error,"series-6":i.hover??i.base,"series-7":a.infoForeground,"series-8":a.successForeground},s=JSON.stringify([o,new Date().toDateString(),e]),c=G.get(s);if(c)return c;let l;try{let{svg:t}=ue(e,{fontFamily:`system-ui, sans-serif`,autoDirection:!1,links:!1,images:!1}),n=F.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0},RETURN_DOM_FRAGMENT:!0}).querySelector(`svg`);if(!n)throw Error(`Missing diagram SVG`);for(let[e,t]of Object.entries(o))n.style.setProperty(`--pele-${e}`,t);l={svg:n.outerHTML}}catch{l={}}return G.set(s,l,(s.length+(l.svg?.length??0))*2),l},ve=`data-md-stream-fence`,ye=`data-md-stream-line`,be=`data-md-stream-src`,K=`data-md-stream-applied`,xe=(e,t)=>{let n=Math.min(e.length,t.length);for(let r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n},Se=e=>Array.from(e.children).filter(e=>e instanceof HTMLElement&&e.hasAttribute(`data-md-stream-line`)),Ce=(e,t)=>{let n=document.createElement(`span`);return n.setAttribute(ye,String(t)),n.className=`line`,n.innerHTML=e,n},we=(e,t)=>{let n=Se(e),r=n.map(e=>e.innerHTML),i=xe(r,t);if(n.length===0&&e.childNodes.length>0&&t.length>0){let n=document.createDocumentFragment();for(let e=0;e<t.length;e+=1)e>0&&n.appendChild(document.createTextNode(`
1
+ import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{i as n}from"./runtime-switch-ibQIZnws.js";import{E as r}from"./desktop-Brp3xDpd.js";import{ot as i,st as a}from"./vendor-base-ui-CzHs0bHY.js";import{r as o}from"./useUIStore-BsCfUWQw.js";import{n as s}from"./vendor-react-DlzBev0S.js";import{u as c}from"./fileQueries-BaEKb7SZ.js";import{t as l}from"./platform-Dids8J9D.js";import{n as u}from"./vendor-katex-DNVSTX6g.js";import{i as d,p as f,r as p}from"./vendor-reactuses-core-CuTmqEMK.js";import{Jn as m,Rn as h,Va as g,ji as _}from"./useMobileNavigationStore-SCjA_7jP.js";import{t as v}from"./dualLimitLru-D8Sphgua.js";import{t as y}from"./useThemeSystem-CNzUUkFn.js";import{r as b}from"./themes-BgDJcxRc.js";import{a as x,i as S,n as C,r as w}from"./url-DO6Zrx1P.js";import{n as ee}from"./useEffectiveDirectory-Uc8I6wXt.js";import{a as T,i as E,t as D}from"./image-loading-D1DfK_bJ.js";import{c as O,i as k,l as A,n as te,o as j,r as ne}from"./FadeInOnReveal-CK7jBcu4.js";import{i as re,r as ie,t as ae}from"./markdownHeightCache-DlRC53XG.js";import{t as M}from"./vendor-marked-S3gCOYp1.js";import{n as oe,t as se}from"./markdownTheme-CHNl6tUv.js";import{i as ce,n as N,t as P}from"./markdown-worker-oBGEB9Eg.js";import{t as le}from"./vendor-morphdom-BbKiNDAu.js";import{t as F}from"./vendor-dompurify-CeJNOzik.js";import{t as ue}from"./vendor-pele-C1WTNWUm.js";import{t as I}from"./vendor-remend-C3cXc-tf.js";import{a as L,c as R,f as z,g as de,h as B,i as V,l as H,n as fe,o as U,p as pe,t as me,u as he}from"./fileReferenceActions-D06_lyuL.js";var W=t(a(),1),ge=s(),G=new v({maxEntries:100,maxBytes:8388608}),_e=(e,t)=>{let{surface:n,interactive:r,primary:i,status:a}=t.colors,o={bg:n.elevated,fg:n.foreground,muted:n.mutedForeground,line:r.border,surface:n.muted,"surface-alt":n.background,border:r.border,accent:i.base,critical:a.error,error:a.error,"series-1":i.base,"series-2":a.info,"series-3":a.success,"series-4":a.warning,"series-5":a.error,"series-6":i.hover??i.base,"series-7":a.infoForeground,"series-8":a.successForeground},s=JSON.stringify([o,new Date().toDateString(),e]),c=G.get(s);if(c)return c;let l;try{let{svg:t}=ue(e,{fontFamily:`system-ui, sans-serif`,autoDirection:!1,links:!1,images:!1}),n=F.sanitize(t,{USE_PROFILES:{svg:!0,svgFilters:!0},RETURN_DOM_FRAGMENT:!0}).querySelector(`svg`);if(!n)throw Error(`Missing diagram SVG`);for(let[e,t]of Object.entries(o))n.style.setProperty(`--pele-${e}`,t);l={svg:n.outerHTML}}catch{l={}}return G.set(s,l,(s.length+(l.svg?.length??0))*2),l},ve=`data-md-stream-fence`,ye=`data-md-stream-line`,be=`data-md-stream-src`,K=`data-md-stream-applied`,xe=(e,t)=>{let n=Math.min(e.length,t.length);for(let r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n},Se=e=>Array.from(e.children).filter(e=>e instanceof HTMLElement&&e.hasAttribute(`data-md-stream-line`)),Ce=(e,t)=>{let n=document.createElement(`span`);return n.setAttribute(ye,String(t)),n.className=`line`,n.innerHTML=e,n},we=(e,t)=>{let n=Se(e),r=n.map(e=>e.innerHTML),i=xe(r,t);if(n.length===0&&e.childNodes.length>0&&t.length>0){let n=document.createDocumentFragment();for(let e=0;e<t.length;e+=1)e>0&&n.appendChild(document.createTextNode(`
2
2
  `)),n.appendChild(Ce(t[e]??``,e));return e.replaceChildren(n),{reused:0,replaced:0,added:t.length,removed:0}}let a=0;for(let e=i;e<Math.min(n.length,t.length);e+=1)r[e]!==t[e]&&(n[e].innerHTML=t[e]??``,a+=1);let o=0;for(let r=n.length;r<t.length;r+=1)r>0&&e.appendChild(document.createTextNode(`
3
3
  `)),e.appendChild(Ce(t[r]??``,r)),o+=1;let s=0;for(let e=n.length-1;e>=t.length;--e){let t=n[e]?.previousSibling;t?.nodeType===Node.TEXT_NODE&&t.remove(),n[e]?.remove(),s+=1}return{reused:i,replaced:a,added:o,removed:s}},Te=e=>{if(e.includes(`data-md-stream-fence=`))return e;let t=e.toLowerCase().lastIndexOf(`<pre`);return t<0?e:`${e.slice(0,t)}${e.slice(t).replace(/<pre\b/i,`<pre ${ve}="true"`)}`},Ee=(e,t)=>{if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement)||e.getAttribute(`data-md-stream-fence`)!==`true`||t.getAttribute(`data-md-stream-fence`)!==`true`)return!1;let n=e.tagName===`CODE`?e:e.querySelector(`code`),r=t.tagName===`CODE`?t:t.querySelector(`code`);if(n instanceof HTMLElement&&r instanceof HTMLElement){let e=ke(n),t=n.closest(`pre`)??n,i=r.closest(`pre`)??r;for(let e of[`data-md-lang`,`data-md-label`]){let n=i.getAttribute(e);t.getAttribute(e)!==n&&(n===null?t.removeAttribute(e):t.setAttribute(e,n))}let a=r.getAttribute(`class`);n.getAttribute(`class`)!==a&&(a===null?n.removeAttribute(`class`):n.setAttribute(`class`,a)),ke(n)!==e&&n.removeAttribute(K),n.setAttribute(be,r.textContent??``)}return!0},De=e=>e.getAttribute(`data-md-stream-src`)??e.textContent??``,Oe=e=>{let t=e.querySelectorAll(`pre[${ve}="true"]`),n=[];return t.forEach(e=>{let t=e.querySelector(`code`);t instanceof HTMLElement&&n.push(t)}),n},ke=e=>e.closest(`pre`)?.getAttribute(`data-md-lang`)||e.className.match(/language-([^\s"]+)/)?.[1]||`text`,Ae=async(e,t,n)=>{if(n?.signal?.aborted)return;let r=Oe(e);await Promise.all(r.map(async r=>{let i=De(r);if(!i||n?.signal?.aborted||r.getAttribute(`data-md-stream-applied`)===i)return;let a=ke(r);if(a===`mermaid`)return;let o=await t(i,a,n);if(!(n?.signal?.aborted||!e.contains(r)||De(r)!==i||ke(r)!==a)){if(!o){let e=Se(r),t=document.createElement(`span`);we(r,i.split(`
4
4
  `).map((n,r)=>{let i=e[r];return i?.textContent===n?i.innerHTML:(t.textContent=n,t.innerHTML)}));return}we(r,o),r.setAttribute(K,i),r.removeAttribute(be)}}))},je=`text`,Me=/^(\d+):(\d+):(.+)$/,Ne={ts:`typescript`,mts:`typescript`,cts:`typescript`,tsx:`tsx`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jsx:`jsx`,vue:`vue`,svelte:`svelte`,astro:`astro`,json:`json`,jsonc:`jsonc`,json5:`json5`,jsonl:`json`,ndjson:`json`,geojson:`json`,yaml:`yaml`,yml:`yaml`,toml:`toml`,ini:`ini`,cfg:`ini`,conf:`ini`,properties:`properties`,env:`dotenv`,css:`css`,scss:`scss`,sass:`sass`,less:`less`,styl:`stylus`,html:`html`,htm:`html`,xml:`xml`,svg:`xml`,md:`markdown`,markdown:`markdown`,mdown:`markdown`,mkd:`markdown`,mdx:`mdx`,py:`python`,pyw:`python`,pyi:`python`,rb:`ruby`,go:`go`,rs:`rust`,java:`java`,kt:`kotlin`,kts:`kotlin`,swift:`swift`,scala:`scala`,c:`c`,h:`c`,cc:`cpp`,cpp:`cpp`,cxx:`cpp`,hpp:`cpp`,hh:`cpp`,m:`objective-c`,mm:`objective-cpp`,cs:`csharp`,fs:`fsharp`,fsx:`fsharp`,vb:`vb`,php:`php`,pl:`perl`,pm:`perl`,lua:`lua`,r:`r`,dart:`dart`,ex:`elixir`,exs:`elixir`,erl:`erlang`,hrl:`erlang`,hs:`haskell`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,groovy:`groovy`,jl:`julia`,ml:`ocaml`,mli:`ocaml`,zig:`zig`,nix:`nix`,sol:`solidity`,prisma:`prisma`,proto:`proto`,graphql:`graphql`,gql:`graphql`,sql:`sql`,sh:`shellscript`,bash:`shellscript`,zsh:`shellscript`,fish:`shellscript`,ps1:`powershell`,psm1:`powershell`,bat:`bat`,cmd:`bat`,tf:`terraform`,tfvars:`terraform`,hcl:`hcl`,diff:`diff`,patch:`diff`,csv:`csv`,tex:`latex`,vim:`viml`,wgsl:`wgsl`,glsl:`glsl`,wat:`wasm`,mermaid:`mermaid`,mmd:`mermaid`},Pe={dockerfile:`docker`,containerfile:`docker`,makefile:`make`,gnumakefile:`make`,"cmakelists.txt":`cmake`,gemfile:`ruby`,rakefile:`ruby`,podfile:`ruby`,".env":`dotenv`,".bashrc":`shellscript`,".zshrc":`shellscript`,".profile":`shellscript`},Fe=e=>{let t=e.split(/[\\/]/).pop()?.toLowerCase()??``;if(!t)return je;let n=Pe[t];if(n)return n;let r=t.lastIndexOf(`.`);return r<=0?je:Ne[t.slice(r+1)]??je},Ie=e=>{let t=e?.trim()??``;if(!t)return{lang:je,label:je,reference:!1};let n=Me.exec(t);if(!n){let e=t.toLowerCase();return{lang:e,label:e,reference:!1}}let[,r=``,i=``,a=``]=n,o=r===i?r:`${r}-${i}`;return{lang:Fe(a),label:`${a}:${o}`,reference:!0}},Le=e=>e===` `||e===` `||e===`
@@ -7,4 +7,4 @@ import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{i as n}from"./r
7
7
  `)?r.split(`
8
8
  `).length-1:r.split(`
9
9
  `).length);for(let e=1;e<=i;e+=1){let n=document.createElement(`div`);n.className=`tabular-nums`,n.textContent=String(e),t.appendChild(n)}return t},Cn=e=>{let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),r=n.nextNode();for(;r;)t.push(r),r=n.nextNode();return t},wn=(e,t)=>{let n=0;for(let r of e){let e=n+r.data.length;if(t<=e)return{node:r,offset:Math.max(0,t-n)};n=e}let r=e.at(-1);return r?{node:r,offset:r.data.length}:null},Tn=(e,t)=>{let n=1/0,r=-1/0;for(let t=0;t<e.length;t+=1){let i=e[t];!i||i.width===0&&i.height===0||(i.top<n&&(n=i.top),i.bottom>r&&(r=i.bottom))}return!Number.isFinite(n)||r<=n?t:Math.max(t,r-n)},En=e=>Array.from(e.children).filter(e=>e instanceof HTMLElement&&e.classList.contains(`line`)),Dn=(e,t,n)=>{e.style.height=`${t}px`,e.style.lineHeight=`${n}px`},On=(e,t,n)=>{let r=document.createRange();r.setStart(e.node,e.offset),r.setEnd(t.node,t.offset);let i=Math.max(Tn(r.getClientRects(),n),Tn([r.getBoundingClientRect()],n));return r.detach(),i},kn=e=>{let t=e.querySelectorAll(`[data-component="markdown-code"]`);for(let e of Array.from(t)){let t=e.querySelector(`pre code`),n=e.querySelector(`[data-md-code-line-numbers]`);if(!t||!n)continue;let r=Array.from(n.children),i=window.getComputedStyle(t),a=Number.parseFloat(i.lineHeight)||20;n.style.fontFamily=i.fontFamily,n.style.fontSize=i.fontSize,n.style.lineHeight=`${a}px`;let o=En(t);if(o.length===r.length){let e=o.map(e=>e.getBoundingClientRect()),t=e=>(e?.textContent??``).length===0;for(let n=0;n<r.length;n+=1){let i=r[n],s=o[n],c=e[n];if(!i||!s||!c)continue;if(t(s)){Dn(i,a,a);continue}let l=o[n+1],u=e[n+1],d=u&&!t(l)?u.top:c.bottom;Dn(i,Tn([{top:c.top,bottom:d,width:1,height:d-c.top}],a),a)}continue}let s=t.textContent??``,c=Cn(t),l=0;for(let e=0;e<r.length;e+=1){let t=s.indexOf(`
10
- `,l),n=t===-1?s.length:t,i=r[e];if(!i)continue;let o=wn(c,l),u=wn(c,n);!o||!u||l===n?Dn(i,a,a):Dn(i,On(o,u,a),a),l=n+1}}},An=e=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>kn(e))})},jn=(e,t,n)=>{let r=e.querySelectorAll(`[data-component="markdown-code"]`);for(let e of Array.from(r)){let r=e.querySelector(`[data-md-code-body]`),i=e.querySelector(`pre`);r&&i&&!r.querySelector(`[data-md-code-line-numbers]`)&&(r.classList.add(`flex`,`gap-3`),r.insertBefore(Sn(i),i)),xn(e,t,n)}An(e)},Mn=(e,t,n,r)=>{bn(e,vn.check),e.setAttribute(`title`,t),e.setAttribute(`aria-label`,t),window.setTimeout(()=>{bn(e,vn[n]),e.setAttribute(`title`,r),e.setAttribute(`aria-label`,r)},2e3)},Nn=e=>{let t=e.querySelectorAll(`:not(pre) > code`);for(let e of Array.from(t))e.getAttribute(`data-markdown`)!==`inline-code`&&e.setAttribute(`data-markdown`,`inline-code`)},Pn=(e,t)=>{let n=e.querySelectorAll(`pre`);for(let e of Array.from(n)){if(e.querySelector(`code.language-mermaid`))continue;let n=e.parentElement;if(!n||n.closest(`[data-component="markdown-code"]`))continue;let r=e.querySelector(`code`)?.className.match(/language-([^\s"]+)/)?.[1],i=e.getAttribute(`data-md-label`)??e.getAttribute(`data-md-lang`)??Ie(r).label,a=document.createElement(`div`);a.setAttribute(`data-component`,`markdown-code`),a.className=`my-4 group overflow-clip rounded-2xl border border-border/80 bg-[var(--surface-elevated)]`;let o=document.createElement(`div`);o.className=`flex items-center justify-between border-b border-border/70 px-3 py-1.5`;let s=document.createElement(`span`);s.className=`font-mono text-[13px] text-muted-foreground`,s.textContent=i;let c=Z(`copy`,t.labels.copy,`copy-code`),l=Z(`textWrap`,t.codeBlockLineWrap?t.labels.disableCodeWrap:t.labels.enableCodeWrap,`toggle-code-wrap`);o.appendChild(s);let u=document.createElement(`div`);u.className=`flex items-center gap-1`,u.appendChild(l),u.appendChild(c),o.appendChild(u);let d=document.createElement(`div`);d.setAttribute(`data-md-code-body`,``),d.className=`px-3 py-2.5 overflow-x-auto`,n.replaceChild(a,e),e.style.margin=`0`,e.style.background=`transparent`,e.classList.add(`min-w-0`,`w-full`,`flex-1`),d.appendChild(e),a.appendChild(o),a.appendChild(d),xn(a,t.codeBlockLineWrap,t.labels)}},Fn=e=>{let t=e.querySelectorAll(`table`);for(let e of Array.from(t)){if(e.closest(`[data-markdown="table-wrapper"]`))continue;let t=document.createElement(`div`);t.className=`my-4`,t.setAttribute(`data-markdown`,`table-wrapper`);let n=document.createElement(`div`);n.setAttribute(`data-markdown`,`table-scroll`);let r=e.parentElement;if(r){r.replaceChild(t,e),e.setAttribute(`data-markdown`,`table`);for(let t of Array.from(e.querySelectorAll(`tr`)))t.setAttribute(`data-markdown`,`table-row`);for(let t of Array.from(e.querySelectorAll(`th`)))t.setAttribute(`data-markdown`,`table-header-cell`);for(let t of Array.from(e.querySelectorAll(`td`)))t.setAttribute(`data-markdown`,`table-cell`);n.appendChild(e),t.appendChild(n)}}},In=0,Ln=(e,t)=>{let n=e.querySelectorAll(`pre > code.language-mermaid`);for(let e of Array.from(n)){let n=e.parentElement;if(!n)continue;let r=(e.textContent??``).replace(/\s+$/,``),i=t.renderMermaid(r),a=document.createElement(`div`);a.setAttribute(`data-markdown`,`mermaid-block`),a.setAttribute(`data-md-source`,r),a.className=`group relative`;let o=document.createElement(`div`);o.setAttribute(`data-markdown`,`mermaid-scroll`);let s=document.createElement(`div`);if(s.setAttribute(`data-markdown`,`mermaid-toolbar`),s.className=`absolute top-1 right-2 flex items-center gap-1 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity`,i.svg){a.setAttribute(`data-mermaid-render`,`svg`);let e=document.createElement(`div`);e.setAttribute(`data-markdown`,`mermaid-viewport`);let n=document.createElement(`div`);n.setAttribute(`data-markdown`,`mermaid`),n.setAttribute(`data-md-original-svg`,i.svg),n.innerHTML=i.svg;let c=n.querySelector(`svg`),l=++In;for(let[e,t]of[[`title[id]`,`aria-labelledby`],[`desc[id]`,`aria-describedby`]]){let n=c?.querySelector(e);n&&(n.id=`yuri-mermaid-${l}-${n.localName}`,c?.setAttribute(t,n.id))}if(e.appendChild(n),o.appendChild(e),t.mermaidControls.showPanZoomControls&&(s.appendChild(Z(`zoomIn`,t.labels.zoomInDiagram,`mermaid-zoom-in`)),s.appendChild(Z(`zoomOut`,t.labels.zoomOutDiagram,`mermaid-zoom-out`)),s.appendChild(Z(`fit`,t.labels.resetDiagramView,`mermaid-fit`))),t.mermaidControls.copy){let e=Z(`copy`,t.labels.copyDiagram,`mermaid-copy`);e.setAttribute(`data-md-source`,r),s.appendChild(e)}if(t.mermaidControls.download){let e=Z(`download`,t.labels.downloadDiagram,`mermaid-download`);e.setAttribute(`data-md-svg`,`1`),s.appendChild(e)}}else{a.setAttribute(`data-mermaid-render`,`source`);let e=document.createElement(`pre`);if(e.setAttribute(`data-markdown`,`mermaid-source`),e.textContent=r,o.appendChild(e),t.mermaidControls.copy){let e=Z(`copy`,t.labels.copyDiagram,`mermaid-copy`);e.setAttribute(`data-md-source`,r),s.appendChild(e)}}a.appendChild(o),a.appendChild(s);let c=n.parentElement;c&&c.replaceChild(a,n)}},Rn=(e,t)=>{let n=e.querySelectorAll(`a[href]`);for(let e of Array.from(n)){if(e.getAttribute(`data-md-link-decorated`)===`true`||e.getAttribute(`data-yuri-file-link`)===`true`)continue;let n=e.getAttribute(`href`)??``;if(!w(n))continue;e.setAttribute(`data-md-link-decorated`,`true`);let r=C(n);if(r){let t=document.createElement(`span`);t.className=`mr-1 inline-flex size-[18px] items-center justify-center rounded border border-[var(--border)] bg-[var(--interactive-hover)] align-middle`;let n=document.createElement(`img`);n.setAttribute(`data-md-link-favicon`,`true`),n.src=r,n.alt=``,n.setAttribute(`aria-hidden`,`true`),n.loading=`lazy`,n.decoding=`async`,n.className=`size-3.5 rounded-sm`,n.addEventListener(`error`,()=>t.remove(),{once:!0}),t.appendChild(n),e.parentNode?.insertBefore(t,e)}if(t.onPreviewLoopback&&S(n)){let r=document.createElement(`button`);r.type=`button`,r.className=`ml-1 align-middle ${yn}`,r.setAttribute(`data-md-action`,`preview-loopback`),r.setAttribute(`data-md-url`,n),r.setAttribute(`title`,t.labels.previewTitle),r.setAttribute(`aria-label`,t.labels.previewLabel),bn(r,vn.download),e.parentNode?.insertBefore(r,e.nextSibling)}}},zn=`img:not([data-md-link-favicon="true"])`,Bn=`[data-md-image-presentation="true"]`,Vn=`data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="576" height="324" viewBox="0 0 576 324"%3E%3C/svg%3E`,Hn=[`block`,`max-w-full`,`rounded-xl`,`border`,`border-border/80`,`bg-[var(--surface-muted)]`,`transition-colors`,`focus-visible:outline`,`focus-visible:outline-2`,`focus-visible:outline-offset-2`,`focus-visible:outline-[var(--interactive-focus-ring)]`],Un=[`cursor-pointer`,`hover:bg-interactive-hover/60`],Wn=[`object-contain`],Gn=e=>{let t=e.parentElement;if(t?.matches(Bn))return t;let n=document.createElement(`span`);n.setAttribute(`data-md-image-presentation`,`true`),n.className=`relative my-4 block w-fit max-w-full`;let r=document.createElement(`span`);r.setAttribute(`data-md-image-placeholder-visual`,`true`),r.setAttribute(`aria-hidden`,`true`),r.className=`pointer-events-none absolute inset-0 flex items-center justify-center text-muted-foreground`,r.classList.add(`yuri-image-loading`),_()&&n.setAttribute(`data-mobile-image`,`true`);let i=document.createElement(`span`);i.className=`relative flex size-14 items-center justify-center rounded-2xl border border-border/80 bg-[var(--surface-elevated)] shadow-sm`,bn(i,vn.image);let a=document.createElement(`span`);a.setAttribute(`data-md-image-download-badge`,`true`),a.className=`absolute -right-1.5 -bottom-1.5 flex size-6 items-center justify-center rounded-full border border-border bg-[var(--surface-elevated)] text-foreground shadow-sm`,bn(a,vn.imageDownload);let o=document.createElement(`span`);return o.setAttribute(`data-md-image-loading-badge`,`true`),o.className=`absolute -right-1.5 -bottom-1.5 hidden size-6 items-center justify-center rounded-full border border-border bg-[var(--surface-elevated)] text-foreground shadow-sm`,bn(o,vn.imageLoading),i.appendChild(a),i.appendChild(o),r.appendChild(i),t?.replaceChild(n,e),n.appendChild(e),n.appendChild(r),n},Kn=e=>{e.src=Vn,e.setAttribute(`data-md-placeholder-source`,Vn),e.setAttribute(`data-md-image-state`,`placeholder`),e.classList.add(...Wn)},qn=e=>{e.removeAttribute(`data-md-image-state`),e.removeAttribute(`data-md-placeholder-source`),e.removeAttribute(`aria-busy`),e.classList.remove(...Wn)},Jn=(e,t)=>{if(!t.imagePreviewEnabled)return;let n=e.querySelectorAll(zn);for(let e of Array.from(n)){let n=e.getAttribute(`data-md-image-source`)??e.getAttribute(`src`)??``,r=T(n,t.imageEffectiveDirectory);if(!E(r)){e.setAttribute(`data-md-image-source`,n),Gn(e),e.setAttribute(`data-md-image-state`,e.complete&&e.naturalWidth>0?`loaded`:`loading`);continue}e.classList.add(...Hn,...Un),e.setAttribute(`role`,`button`),e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-md-image-source`,n),Gn(e),Kn(e)}},Yn=(e,t)=>{Nn(e),Ln(e,t),Pn(e,t),Fn(e),Rn(e,t),Jn(e,t),de(e)},Xn=(e,t,n)=>{let r=new Blob([t],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},Zn=(e,t)=>{let n=e=>{let n=e.target;if(!(n instanceof Element))return;let r=n.closest(`[data-md-action]`);if(!r)return;let i=r.getAttribute(`data-md-action`)??``;if(i===`copy-code`){let e=r.closest(`[data-component="markdown-code"]`)?.querySelector(`code`)?.textContent??``;e&&m(e).then(()=>Mn(r,t.labels.copied,`copy`,t.labels.copy));return}if(i===`toggle-code-wrap`){e.preventDefault(),t.onToggleCodeBlockLineWrap?.();return}if(i===`mermaid-copy`){let e=r.getAttribute(`data-md-source`)??``;e&&m(e).then(()=>Mn(r,t.labels.copied,`copy`,t.labels.copyDiagram));return}if(i===`mermaid-zoom-in`||i===`mermaid-zoom-out`||i===`mermaid-fit`){e.preventDefault();let t=ln(r.closest(`[data-markdown="mermaid-block"]`));i===`mermaid-zoom-in`?t?.zoomIn():i===`mermaid-zoom-out`?t?.zoomOut():t?.fit();return}if(i===`mermaid-download`){let e=r.closest(`[data-markdown="mermaid-block"]`)?.querySelector(`[data-markdown="mermaid"]`),t=e?.getAttribute(`data-md-original-svg`)??e?.innerHTML??``;t&&Xn(`diagram.svg`,t,`image/svg+xml;charset=utf-8`);return}if(i===`preview-loopback`){e.preventDefault();let n=r.getAttribute(`data-md-url`)??``;n&&t.onPreviewLoopback?.(n);return}};return e.addEventListener(`click`,n),()=>e.removeEventListener(`click`,n)},Qn=e({MarkdownRenderer:()=>Sr,SimpleMarkdownRenderer:()=>Cr}),Q=i(),$n=()=>{let e=(0,ge.c)(4),t=y(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=b(!1),e[0]=n):n=e[0];let r=n,i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=b(!0),e[1]=i):i=e[1];let a=i,o;return e[2]===t?.currentTheme?o=e[3]:(o=t?.currentTheme??(typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?a:r),e[2]=t?.currentTheme,e[3]=o),o},er=e=>{let t=(0,ge.c)(5),{containerRef:n,enabled:r,effectiveDirectory:i,openInAppBrowser:a,fileReference:o}=e,s;t[0]!==i||t[1]!==r||t[2]!==o||t[3]!==a?(s=e=>{if(r===!1||e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;let t=e.target;if(!(t instanceof Element)||t.closest($))return;let n=t.closest(`a[href]`);if(!(n instanceof HTMLAnchorElement)||n.getAttribute(`data-yuri-file-link`)===`true`)return;let s=n.getAttribute(`href`)??``;if(B(s)){e.preventDefault(),e.stopPropagation(),o&&L(s,o.effectiveDirectory,`href`)&&U(n,o);return}if(!w(s))return;e.preventDefault(),e.stopPropagation();let c=(i||``).trim();if(!_()&&c&&a){a(c,s);return}x(s)},t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s):s=t[4];let c=f(s);d(`click`,c,n)},$=`img:not([data-md-link-favicon="true"])`,tr=e=>e.getAttribute(`data-md-image-source`)??e.getAttribute(`src`)??``,nr=({containerRef:e,effectiveDirectory:t,onShowPopup:r})=>{let i=W.useRef(null);i.current??=n();let a=i.current,o=!!r,s=f(e=>r?.(e)),c=W.useRef(()=>{}),l=W.useRef(new Map),u=W.useRef(null),d=W.useMemo(()=>e=>c.current(e),[]);return W.useLayoutEffect(()=>{let n=l.current;if(u.current!==null&&(clearTimeout(u.current),u.current=null),c.current=()=>{},!o){for(let[e,t]of n)t.controller?.abort(),t.release?.(),n.delete(e);return}let r=e.current;if(!r)return;let i=e=>{let n=Array.from(r.querySelectorAll($));if(n.indexOf(e)<0)return;let i=n.map(e=>({url:tr(e),filename:e.alt||tr(e)||void 0})).filter(e=>e.url),a=tr(e),o=i.findIndex(e=>e.url===a),c=e.alt||a;s({open:!0,title:c,content:``,metadata:{tool:`image-preview`,filename:c},previewSource:e,image:{url:a,filename:c,gallery:i,index:Math.max(0,o),directory:t}})},d=e=>{let t=n.get(e);t&&(t.controller?.abort(),t.release?.(),n.delete(e))},f=e=>{let n=tr(e),r=T(n,t);if(E(r))return`${a}\n${t}\n${n}`},p=e=>{let t=f(e);if(!t){d(e);return}let r=n.get(e);if(r?.key===t)return r;d(e);let i={key:t};return n.set(e,i),i},m=(e,i)=>{if(i.controller||i.objectUrl||!r.contains(e))return;let a=tr(e),o=T(a,t);if(!E(o)){d(e);return}let s=new AbortController;i.controller=s,e.setAttribute(`data-md-image-state`,`loading`),e.setAttribute(`aria-busy`,`true`),D(o.path,s.signal).then(t=>{let r=n.get(e);if(!r||r!==i||r.controller!==s||s.signal.aborted){t.release();return}r.controller=void 0,r.objectUrl=t.url,r.release=t.release,e.src=t.url}).catch(()=>{let t=n.get(e);t===i&&(t.controller=void 0,e.removeAttribute(`aria-busy`),e.setAttribute(`data-md-image-state`,`error`))})};c.current=e=>{for(let[t,r]of n)(!e.contains(t)||f(t)!==r.key)&&d(t);for(let t of Array.from(e.querySelectorAll($))){let e=p(t);e&&!e.objectUrl&&m(t,e)}},c.current(r);let h=e=>{let t=p(e);if(t&&!t.objectUrl){m(e,t);return}i(e)},g=e=>{let t=e.target;if(!(t instanceof Element))return;let n=t.closest($);n&&(e.preventDefault(),e.stopPropagation(),h(n))},_=e=>{if(e.key!==`Enter`&&e.key!==` `)return;let t=e.target;!(t instanceof HTMLImageElement)||!t.matches($)||(e.preventDefault(),e.stopPropagation(),h(t))},v=e=>{let t=e.target;t instanceof Element&&t.closest($)&&(e.preventDefault(),e.stopPropagation())},y=e=>{let t=e.target;!(t instanceof HTMLImageElement)||!t.matches($)||t.getAttribute(`src`)!==t.getAttribute(`data-md-placeholder-source`)&&(qn(t),t.setAttribute(`data-md-image-state`,`loaded`))},b=e=>{let t=e.target;!(t instanceof HTMLImageElement)||!t.matches($)||(t.removeAttribute(`aria-busy`),t.setAttribute(`data-md-image-state`,`error`))};return r.addEventListener(`load`,y,!0),r.addEventListener(`error`,b,!0),r.addEventListener(`click`,g),r.addEventListener(`keydown`,_),r.addEventListener(`contextmenu`,v),()=>{c.current=()=>{},r.removeEventListener(`load`,y,!0),r.removeEventListener(`error`,b,!0),r.removeEventListener(`click`,g),r.removeEventListener(`keydown`,_),r.removeEventListener(`contextmenu`,v),u.current=setTimeout(()=>{u.current=null;for(let e of Array.from(n.keys()))r.contains(e)&&Kn(e),d(e)},0)}},[e,t,o,a]),{reconcileMarkdownImageResources:d,transportIdentity:a}},rr={download:!0,copy:!0,showPanZoomControls:!0},ir=!0,ar=e=>{let t=e.match(/^(?:\uFEFF)?(---|\+\+\+)[^\S\r\n]*\r?\n[\s\S]*?\r?\n\1[^\S\r\n]*(?:\r?\n|$)/);return t?e.slice(t[0].length):e},or=160,sr=e=>{let t=(0,ge.c)(8),{containerRef:n,effectiveDirectory:r,editor:i,preferRuntimeEditor:a,onShowPopup:o,enabled:s}=e,c=W.useRef(null),l,u;t[0]!==n||t[1]!==i||t[2]!==r||t[3]!==s||t[4]!==o||t[5]!==a?(l=()=>{let e=n.current;if(!e)return;let t=!1,l=_(),u=V(),d=s,f=wr,p=()=>{let t=e.querySelectorAll(z);for(let e of Array.from(t))f(e)};if(!d){p();return}let m=e=>{let n=e===void 0?0:e;if(c.current!==null&&typeof window<`u`&&window.clearTimeout(c.current),typeof window>`u`){h();return}c.current=window.setTimeout(()=>{c.current=null,window.requestAnimationFrame(()=>{t||h()})},n)},h=()=>{let n=e.querySelectorAll(`[data-markdown="inline-code"], a, ${he}`),i=0;for(let a of Array.from(n)){let n=fe(a),o=L(n,r,a.tagName.toLowerCase()===`a`?`href`:`path`);if(!o){f(a);continue}if(i>=u){f(a);continue}i+=1,(a.getAttribute(`data-yuri-file-link`)!==`true`||a.getAttribute(`data-yuri-file-path`)!==o.resolvedPath)&&R(o.resolvedPath,r).then(n=>{if(t||!e.contains(a))return;let i=fe(a),s=L(i,r,a.tagName.toLowerCase()===`a`?`href`:`path`);if(!(!s||s.resolvedPath!==o.resolvedPath)){if(!H(s.resolvedPath,n,l)){f(a);return}a.setAttribute(`data-yuri-file-link`,`true`),a.setAttribute(`data-yuri-file-ref`,i),a.setAttribute(`data-yuri-file-path`,s.resolvedPath),a.setAttribute(`data-yuri-file-binary`,String(n.isBinary)),a.setAttribute(`title`,me),a.tagName.toLowerCase()!==`a`&&(a.setAttribute(`role`,`button`),a.setAttribute(`tabindex`,`0`))}}).catch(Tr)}},g=e=>U(e,{effectiveDirectory:r,editor:i,preferRuntimeEditor:a,onShowPopup:o}),v=e=>{let t=e.target;if(!(t instanceof Element)||t.closest($))return;let n=t.closest(z);n instanceof HTMLElement&&(e.preventDefault(),e.stopPropagation(),g(n))},y=e=>{if(e.key!==`Enter`&&e.key!==` `)return;let t=e.target;!(t instanceof HTMLElement)||t.getAttribute(`data-yuri-file-link`)!==`true`||(e.preventDefault(),e.stopPropagation(),g(t))};m(or);let b=new MutationObserver(()=>{m(or)});return b.observe(e,{childList:!0,subtree:!0}),e.addEventListener(`click`,v),e.addEventListener(`keydown`,y),()=>{t=!0,c.current!==null&&typeof window<`u`&&window.clearTimeout(c.current),c.current=null,b.disconnect(),e.removeEventListener(`click`,v),e.removeEventListener(`keydown`,y)}},u=[n,i,r,o,a,s],t[0]=n,t[1]=i,t[2]=r,t[3]=s,t[4]=o,t[5]=a,t[6]=l,t[7]=u):(l=t[6],u=t[7]),W.useEffect(l,u)},cr=({containerRef:e,onShowPopup:t,enableFullscreen:n,enablePanZoom:r,allowMermaidWheelEvents:i})=>{let a=f(e=>t?.(e)),o=!!t,s=f(t=>{if(!n||!o)return;let r=e.current;if(!r)return;let i=t.target;if(!(i instanceof Element)||i.closest(`button, a, [role="button"]`))return;let s=i.closest(Jt);if(!s)return;if(s instanceof HTMLElement&&s.hasAttribute(`data-mermaid-suppress-click`)){s.removeAttribute(`data-mermaid-suppress-click`);return}let c=Array.from(r.querySelectorAll(Jt)).indexOf(s);if(c<0)return;let l=s instanceof HTMLElement?s.getAttribute(`data-md-source`):null;if(!l||l.trim().length===0)return;let u=`Diagram ${c+1}`;a({open:!0,title:u,content:``,metadata:{tool:`mermaid-preview`,filename:u},mermaid:{url:`data:text/plain;charset=utf-8,${encodeURIComponent(l)}`,source:l,filename:u},previewSource:s instanceof HTMLElement?s:void 0})}),c=f(e=>{if(i||r)return;let t=e.target;t instanceof Element&&t.closest(`[data-markdown="mermaid-block"]`)&&e.stopPropagation()});d(`click`,s,e),W.useEffect(()=>{let t=e.current;if(t)return t.addEventListener(`wheel`,c,{capture:!0,passive:!0}),()=>{t.removeEventListener(`wheel`,c,!0)}},[e])},lr=24,ur=1,dr=12,fr=/[\s.,!?;:)\]]/,pr=(e,t)=>{let n=e<=12?2:e<=48?4:e<=96?8:Math.min(24,Math.ceil(e/8));return Math.max(1,Math.round(t/lr*n))},mr=(e,t)=>pr(e,t)*(1e3/t),hr=(e,t,n)=>{let r=Math.min(e.length,t+n);for(let t=r;t<Math.min(e.length,r+8);t+=1)if(fr.test(e[t]??``))return t+1;return r},gr=(e,t,n)=>{let[r,i]=W.useState(()=>t?0:e.length),a=W.useRef(r),o=W.useRef(0),s=W.useRef(null);return a.current=r,W.useEffect(()=>{if(!t||typeof window>`u`){o.current=0,s.current=null,i(e.length);return}a.current>e.length&&(a.current=e.length,o.current=0,i(e.length));let r=null,c=t=>{let l=Math.min(a.current,e.length);if(l>=e.length){r=null,s.current=null;return}let u=s.current;if(u===null){s.current=t,r=window.requestAnimationFrame(c);return}let d=Math.min(t-u,100);s.current=t,o.current+=mr(e.length-l,n)*(d/1e3);let f=Math.min(dr,Math.floor(o.current));if(f>=ur){o.current-=f;let t=hr(e,l,f);a.current=t,i(t)}r=window.requestAnimationFrame(c)};return a.current<e.length&&(r=window.requestAnimationFrame(c)),()=>{r!==null&&window.cancelAnimationFrame(r)}},[e,t,n]),t?e.slice(0,Math.min(r,e.length)):e},_r=(e,t,r,i=rr,a=n(),s=``,c=!1)=>{let{t:l}=h(),u=W.useMemo(()=>({copy:l(`markdownRenderer.code.actions.copyTitle`),copied:l(`markdownRenderer.code.actions.copiedTitle`),enableCodeWrap:l(`markdownRenderer.code.actions.enableWrapTitle`),disableCodeWrap:l(`markdownRenderer.code.actions.disableWrapTitle`),copyDiagram:l(`markdownRenderer.mermaid.actions.copySourceTitle`),downloadDiagram:l(`markdownRenderer.mermaid.actions.downloadSvgTitle`),zoomInDiagram:l(`markdownRenderer.mermaid.actions.zoomInTitle`),zoomOutDiagram:l(`markdownRenderer.mermaid.actions.zoomOutTitle`),resetDiagramView:l(`markdownRenderer.mermaid.actions.resetViewTitle`),previewLabel:l(`terminalView.preview.open`),previewTitle:l(`terminalView.preview.openTitle`)}),[l]),d=o(e=>e.codeBlockLineWrap),p=o(e=>e.setCodeBlockLineWrap),m=f(()=>{p(!o.getState().codeBlockLineWrap)});return W.useMemo(()=>({labels:u,mermaidControls:i,codeBlockLineWrap:d,deferCodeLineNumberSync:t,onToggleCodeBlockLineWrap:m,renderMermaid:t=>_e(t,e),onPreviewLoopback:r,imageTransportIdentity:a,imageEffectiveDirectory:s,imagePreviewEnabled:c}),[e,u,i,d,t,r,a,s,c])},vr=({containerRef:e,text:t,streaming:n,cacheKey:r,syntaxVars:i,ctx:a,reconcileMarkdownImageResources:o,onRichContentReady:s})=>{W.useEffect(()=>{se()},[]);let c=W.useRef(null),l=f(()=>{s?.()}),u=f(()=>{let t=e.current;if(t){if(!c.current){if(!Yt(t))return;c.current=_n(t);return}c.current.refresh()}});W.useLayoutEffect(()=>{let r=e.current,i=r?.querySelector(`[data-markdown-content]`)??r;if(i&&t&&i.childNodes.length===0){for(let e of At(t)){let t=document.createElement(`div`);t.setAttribute(`data-md-block`,``),t.style.display=`contents`,t.innerHTML=e,Yn(t,a),i.appendChild(t)}o(i),n||l()}},[e,a,o,n,t]),W.useEffect(()=>()=>{c.current?.cleanup(),c.current=null},[]),W.useEffect(()=>{let i=e.current;if(!i)return;let s=i.querySelector(`[data-markdown-content]`)??i,c=!0,d=new AbortController,f=()=>{},p=()=>{},m=()=>{if(!c||n||d.signal.aborted)return;s.replaceChildren();let e=document.createElement(`div`);e.setAttribute(`data-md-block`,``),e.setAttribute(`data-md-render-fallback`,`text`),e.style.display=`contents`;let r=document.createElement(`span`);r.style.whiteSpace=`pre-wrap`,r.textContent=t,e.appendChild(r),s.appendChild(e),o(s),l()},h=e=>{if(!c)return;let t=Array.from(s.children);e.forEach((e,n)=>{let r=t[n];if(r||(r=document.createElement(`div`),r.setAttribute(`data-md-block`,``),r.style.display=`contents`,s.appendChild(r)),r.getAttribute(`data-md-id`)===e.id)return;let i=document.createElement(`div`);i.innerHTML=e.html,Yn(i,a);let o=Yt(r),c=Yt(i);le(r,i,{childrenOnly:!0,onBeforeElUpdated:(e,t)=>{if(Ee(e,t))return!1;if(pe(e,t),e instanceof HTMLImageElement&&t instanceof HTMLImageElement){let n=e.getAttribute(`data-md-image-source`);if(n&&n===t.getAttribute(`data-md-image-source`)){let n=e.getAttribute(`src`);n===null?t.removeAttribute(`src`):t.setAttribute(`src`,n),t.className=e.className;for(let n of[`data-md-image-state`,`data-md-placeholder-source`,`aria-busy`]){let r=e.getAttribute(n);r===null?t.removeAttribute(n):t.setAttribute(n,r)}}}return!e.isEqualNode(t)}}),r.setAttribute(`data-md-id`,e.id),(o||c||Yt(r))&&u()});let n=Yt(s),r=!1;for(let n=t.length-1;n>=e.length;--n){let e=t[n];e&&Yt(e)&&(r=!0),e?.remove()}(r||t.length>e.length&&n)&&u(),o(s),a.deferCodeLineNumberSync||jn(s,a.codeBlockLineWrap,a.labels),Ae(s,N,{signal:d.signal,priority:`visible`}),l()},g=e=>{try{h(e)}catch{m()}},_=()=>{Lt(t,n,r,d.signal).then(e=>{if(c){if(n){g(e);return}p=k(()=>g(e),{priority:`visible`})}}).catch(m)};return n?_():f=k(_,{priority:`visible`}),()=>{c=!1,d.abort(),f(),p()}},[e,t,n,r,a,o]),W.useEffect(()=>{let t=e.current;if(t)return Zn(t,a)},[e,a]),W.useEffect(()=>{let t=e.current,n=t?.querySelector(`[data-markdown-content]`)??t;if(n)for(let[e,t]of Object.entries(i))n.style.setProperty(e,t)},[e,i]),W.useEffect(()=>{let t=e.current,n=t?.querySelector(`[data-markdown-content]`)??t;n&&(a.deferCodeLineNumberSync||jn(n,a.codeBlockLineWrap,a.labels))},[e,a.codeBlockLineWrap,a.deferCodeLineNumberSync,a.labels]);let d=W.useRef(null),m=f(()=>{let t=e.current,n=t?.querySelector(`[data-markdown-content]`)??t;n&&(d.current!==null&&window.cancelAnimationFrame(d.current),d.current=window.requestAnimationFrame(()=>{d.current=null,kn(n)}))});p(e,m),W.useEffect(()=>()=>{d.current!==null&&window.cancelAnimationFrame(d.current)},[])},yr=e=>e===`tool`?`markdown-content markdown-tool`:e===`reasoning`?`markdown-content markdown-reasoning`:`markdown-content leading-relaxed`,br=e=>{let t=(0,ge.c)(4),[n,r]=W.useState(e),i=W.useRef(e),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{i.current||(i.current=!0,r(!0))},t[0]=a):a=t[0];let o=f(a),s;return t[1]!==o||t[2]!==n?(s=[n,o],t[1]=o,t[2]=n,t[3]=s):s=t[3],s},xr=(e,t,n)=>{let r=W.useRef(n);r.current=n;let i=W.useRef(t);i.current=t;let a=f(e=>{if(!r.current)return;let t=e[0];if(!t)return;let n=t.borderBoxSize?.[0],a=n?n.blockSize:t.contentRect.height,o=n?n.inlineSize:t.contentRect.width;ie(i.current,a,o)});p(e,a)},Sr=W.memo(e=>{let t=(0,ge.c)(64),{content:n,part:r,messageId:i,isAnimated:a,skipFadeIn:o,className:s,isStreaming:u,disableStreamAnimation:d,sourceIsPaced:p,variant:m,onShowPopup:h,enableFileReferences:_}=e,v=a===void 0||a,y=o!==void 0&&o,b=u!==void 0&&u,x=d!==void 0&&d,S=p!==void 0&&p,C=m===void 0?`assistant`:m,w=_===void 0||_,T=$n(),{editor:E,runtime:D}=c(),O=W.useRef(null),k=ee()??``,A=f(Er),j;t[0]!==k||t[1]!==A?(j=e=>{k&&A(k,e)},t[0]=k,t[1]=A,t[2]=j):j=t[2];let ie=f(j),M=b&&!x,se;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(se=ne(l()),t[3]=se):se=t[3];let ce=gr(S?``:n,M&&!S,se.markdownPaceMs),N=S?n:ce,[P,le]=br(M),F;t[4]===h?F=t[5]:(F={containerRef:O,onShowPopup:h,enableFullscreen:ir,enablePanZoom:rr.showPanZoomControls},t[4]=h,t[5]=F),cr(F);let ue=w&&!b,I;t[6]!==E||t[7]!==k||t[8]!==h||t[9]!==D.isVSCode||t[10]!==ue?(I={containerRef:O,effectiveDirectory:k,editor:E,preferRuntimeEditor:D.isVSCode,onShowPopup:h,enabled:ue},t[6]=E,t[7]=k,t[8]=h,t[9]=D.isVSCode,t[10]=ue,t[11]=I):I=t[11],sr(I);let L;t[12]!==E||t[13]!==k||t[14]!==w||t[15]!==b||t[16]!==h||t[17]!==D.isVSCode?(L=w&&!b?{effectiveDirectory:k,editor:E,preferRuntimeEditor:D.isVSCode,onShowPopup:h}:void 0,t[12]=E,t[13]=k,t[14]=w,t[15]=b,t[16]=h,t[17]=D.isVSCode,t[18]=L):L=t[18];let R;t[19]!==k||t[20]!==A||t[21]!==L?(R={containerRef:O,effectiveDirectory:k,openInAppBrowser:A,fileReference:L},t[19]=k,t[20]=A,t[21]=L,t[22]=R):R=t[22],er(R);let z;t[23]!==k||t[24]!==h?(z={containerRef:O,effectiveDirectory:k,onShowPopup:h},t[23]=k,t[24]=h,t[25]=z):z=t[25];let{reconcileMarkdownImageResources:de,transportIdentity:B}=nr(z),V;t[26]===T?V=t[27]:(V=oe(T),t[26]=T,t[27]=V);let H=V,fe=_r(T,M,k?ie:void 0,rr,B,k,!!h),U=`markdown-${r?.id?`part-${r.id}`:`message-${i}`}`,pe;t[28]!==U||t[29]!==fe||t[30]!==N||t[31]!==M||t[32]!==de||t[33]!==le||t[34]!==H?(pe={containerRef:O,text:N,streaming:M,cacheKey:U,syntaxVars:H,ctx:fe,reconcileMarkdownImageResources:de,onRichContentReady:le},t[28]=U,t[29]=fe,t[30]=N,t[31]=M,t[32]=de,t[33]=le,t[34]=H,t[35]=pe):pe=t[35],vr(pe);let me;t[36]!==n||t[37]!==b||t[38]!==P||t[39]!==C?(me=P&&!b?ae(n,C):``,t[36]=n,t[37]=b,t[38]=P,t[39]=C,t[40]=me):me=t[40],xr(O,me,P&&!b);let he=!P||void 0,G;t[41]===s?G=t[42]:(G=g(`relative break-words w-full min-w-0`,s),t[41]=s,t[42]=G);let _e=P?`true`:`false`,ve=P?`ready`:`pending`,ye;t[43]!==N||t[44]!==P||t[45]!==C?(ye=!P&&(0,Q.jsx)(`div`,{className:g(yr(C),`pointer-events-none absolute inset-0 overflow-clip`),children:(0,Q.jsx)(re,{content:N})}),t[43]=N,t[44]=P,t[45]=C,t[46]=ye):ye=t[46];let be=!P||void 0,K;t[47]!==P||t[48]!==C?(K=g(yr(C),!P&&`invisible`),t[47]=P,t[48]=C,t[49]=K):K=t[49];let xe;t[50]!==be||t[51]!==K?(xe=(0,Q.jsx)(`div`,{"aria-hidden":be,className:K,"data-markdown-content":!0}),t[50]=be,t[51]=K,t[52]=xe):xe=t[52];let Se;t[53]!==he||t[54]!==G||t[55]!==_e||t[56]!==ve||t[57]!==ye||t[58]!==xe?(Se=(0,Q.jsxs)(`div`,{"aria-busy":he,className:G,"data-markdown-ready":_e,"data-markdown-hydration":ve,ref:O,children:[ye,xe]}),t[53]=he,t[54]=G,t[55]=_e,t[56]=ve,t[57]=ye,t[58]=xe,t[59]=Se):Se=t[59];let Ce=Se;if(v){let e;return t[60]!==U||t[61]!==Ce||t[62]!==y?(e=(0,Q.jsx)(te,{skipAnimation:y,children:Ce},U),t[60]=U,t[61]=Ce,t[62]=y,t[63]=e):e=t[63],e}return Ce},(e,t)=>e.content===t.content&&e.isStreaming===t.isStreaming&&e.disableStreamAnimation===t.disableStreamAnimation&&e.sourceIsPaced===t.sourceIsPaced&&e.variant===t.variant&&e.isAnimated===t.isAnimated&&e.skipFadeIn===t.skipFadeIn&&e.className===t.className&&e.messageId===t.messageId&&e.onShowPopup===t.onShowPopup&&e.enableFileReferences===t.enableFileReferences&&e.part?.id===t.part?.id),Cr=W.memo(e=>{let t=(0,ge.c)(55),{content:n,className:r,variant:i,disableLinkSafety:a,stripFrontmatter:o,onShowPopup:s,mermaidControls:l,mermaidTheme:u,allowMermaidWheelEvents:d,enableFileReferences:p}=e,m=i===void 0?`assistant`:i,h=o!==void 0&&o,_=l===void 0?rr:l,v=d!==void 0&&d,y=p===void 0||p,{editor:b,runtime:x}=c(),S=$n(),C=W.useRef(null),[w,T]=br(!1),E=ee()??``,D;t[0]!==n||t[1]!==h?(D=h?ar(n):n,t[0]=n,t[1]=h,t[2]=D):D=t[2];let O=D,k;t[3]!==v||t[4]!==_.showPanZoomControls||t[5]!==s?(k={containerRef:C,onShowPopup:s,enableFullscreen:ir,enablePanZoom:_.showPanZoomControls,allowMermaidWheelEvents:v},t[3]=v,t[4]=_.showPanZoomControls,t[5]=s,t[6]=k):k=t[6],cr(k);let A=f(Dr),te;t[7]!==b||t[8]!==E||t[9]!==y||t[10]!==s||t[11]!==x.isVSCode?(te={containerRef:C,effectiveDirectory:E,editor:b,preferRuntimeEditor:x.isVSCode,onShowPopup:s,enabled:y},t[7]=b,t[8]=E,t[9]=y,t[10]=s,t[11]=x.isVSCode,t[12]=te):te=t[12],sr(te);let j=!a,ne;t[13]!==b||t[14]!==E||t[15]!==y||t[16]!==s||t[17]!==x.isVSCode?(ne=y?{effectiveDirectory:E,editor:b,preferRuntimeEditor:x.isVSCode,onShowPopup:s}:void 0,t[13]=b,t[14]=E,t[15]=y,t[16]=s,t[17]=x.isVSCode,t[18]=ne):ne=t[18];let ie;t[19]!==E||t[20]!==A||t[21]!==ne||t[22]!==j?(ie={containerRef:C,enabled:j,effectiveDirectory:E,openInAppBrowser:A,fileReference:ne},t[19]=E,t[20]=A,t[21]=ne,t[22]=j,t[23]=ie):ie=t[23],er(ie);let ae;t[24]!==E||t[25]!==s?(ae={containerRef:C,effectiveDirectory:E,onShowPopup:s},t[24]=E,t[25]=s,t[26]=ae):ae=t[26];let{reconcileMarkdownImageResources:M,transportIdentity:se}=nr(ae),ce;t[27]===S?ce=t[28]:(ce=oe(S),t[27]=S,t[28]=ce);let N=ce,P=_r(u??S,!1,void 0,_,se,E,!!s),le=`simple:${m}`,F;t[29]!==P||t[30]!==M||t[31]!==O||t[32]!==T||t[33]!==N||t[34]!==le?(F={containerRef:C,text:O,streaming:!1,cacheKey:le,syntaxVars:N,ctx:P,reconcileMarkdownImageResources:M,onRichContentReady:T},t[29]=P,t[30]=M,t[31]=O,t[32]=T,t[33]=N,t[34]=le,t[35]=F):F=t[35],vr(F);let ue=!w||void 0,I;t[36]===r?I=t[37]:(I=g(`relative break-words w-full min-w-0`,r),t[36]=r,t[37]=I);let L=w?`true`:`false`,R=w?`ready`:`pending`,z;t[38]!==O||t[39]!==w||t[40]!==m?(z=!w&&(0,Q.jsx)(`div`,{className:g(yr(m),`pointer-events-none absolute inset-0 overflow-clip`),children:(0,Q.jsx)(re,{content:O})}),t[38]=O,t[39]=w,t[40]=m,t[41]=z):z=t[41];let de=!w||void 0,B;t[42]!==w||t[43]!==m?(B=g(yr(m),!w&&`invisible`),t[42]=w,t[43]=m,t[44]=B):B=t[44];let V;t[45]!==de||t[46]!==B?(V=(0,Q.jsx)(`div`,{"aria-hidden":de,className:B,"data-markdown-content":!0}),t[45]=de,t[46]=B,t[47]=V):V=t[47];let H;return t[48]!==ue||t[49]!==I||t[50]!==L||t[51]!==R||t[52]!==z||t[53]!==V?(H=(0,Q.jsxs)(`div`,{"aria-busy":ue,className:I,"data-markdown-ready":L,"data-markdown-hydration":R,ref:C,children:[z,V]}),t[48]=ue,t[49]=I,t[50]=L,t[51]=R,t[52]=z,t[53]=V,t[54]=H):H=t[54],H},(e,t)=>{let n=e.mermaidControls??rr,r=t.mermaidControls??rr;return e.content===t.content&&e.variant===t.variant&&e.className===t.className&&e.disableLinkSafety===t.disableLinkSafety&&e.stripFrontmatter===t.stripFrontmatter&&e.onShowPopup===t.onShowPopup&&n.download===r.download&&n.copy===r.copy&&n.showPanZoomControls===r.showPanZoomControls&&e.mermaidTheme===t.mermaidTheme&&e.allowMermaidWheelEvents===t.allowMermaidWheelEvents&&e.enableFileReferences===t.enableFileReferences});function wr(e){e.removeAttribute(`data-yuri-file-link`),e.removeAttribute(`data-yuri-file-ref`),e.removeAttribute(`data-yuri-file-path`),e.removeAttribute(`data-yuri-file-binary`),e.getAttribute(`title`)===`Open file`&&e.removeAttribute(`title`),e.tagName.toLowerCase()!==`a`&&(e.removeAttribute(`role`),e.removeAttribute(`tabindex`))}function Tr(){}function Er(e,t){o.getState().openContextBrowser(e,t)}function Dr(e,t){o.getState().openContextBrowser(e,t)}export{Qn as n,He as r,Sr as t};
10
+ `,l),n=t===-1?s.length:t,i=r[e];if(!i)continue;let o=wn(c,l),u=wn(c,n);!o||!u||l===n?Dn(i,a,a):Dn(i,On(o,u,a),a),l=n+1}}},An=e=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>kn(e))})},jn=(e,t,n)=>{let r=e.querySelectorAll(`[data-component="markdown-code"]`);for(let e of Array.from(r)){let r=e.querySelector(`[data-md-code-body]`),i=e.querySelector(`pre`);r&&i&&!r.querySelector(`[data-md-code-line-numbers]`)&&(r.classList.add(`flex`,`gap-3`),r.insertBefore(Sn(i),i)),xn(e,t,n)}An(e)},Mn=(e,t,n,r)=>{bn(e,vn.check),e.setAttribute(`title`,t),e.setAttribute(`aria-label`,t),window.setTimeout(()=>{bn(e,vn[n]),e.setAttribute(`title`,r),e.setAttribute(`aria-label`,r)},2e3)},Nn=e=>{let t=e.querySelectorAll(`:not(pre) > code`);for(let e of Array.from(t))e.getAttribute(`data-markdown`)!==`inline-code`&&e.setAttribute(`data-markdown`,`inline-code`)},Pn=(e,t)=>{let n=e.querySelectorAll(`pre`);for(let e of Array.from(n)){if(e.querySelector(`code.language-mermaid`))continue;let n=e.parentElement;if(!n||n.closest(`[data-component="markdown-code"]`))continue;let r=e.querySelector(`code`)?.className.match(/language-([^\s"]+)/)?.[1],i=e.getAttribute(`data-md-label`)??e.getAttribute(`data-md-lang`)??Ie(r).label,a=document.createElement(`div`);a.setAttribute(`data-component`,`markdown-code`),a.className=`my-4 group overflow-clip rounded-2xl border border-border/80 bg-[var(--surface-elevated)]`;let o=document.createElement(`div`);o.className=`flex items-center justify-between border-b border-border/70 px-3 py-1.5`;let s=document.createElement(`span`);s.className=`font-mono text-[13px] text-muted-foreground`,s.textContent=i;let c=Z(`copy`,t.labels.copy,`copy-code`),l=Z(`textWrap`,t.codeBlockLineWrap?t.labels.disableCodeWrap:t.labels.enableCodeWrap,`toggle-code-wrap`);o.appendChild(s);let u=document.createElement(`div`);u.className=`flex items-center gap-1`,u.appendChild(l),u.appendChild(c),o.appendChild(u);let d=document.createElement(`div`);d.setAttribute(`data-md-code-body`,``),d.className=`px-3 py-2.5 overflow-x-auto`,n.replaceChild(a,e),e.style.margin=`0`,e.style.background=`transparent`,e.classList.add(`min-w-0`,`w-full`,`flex-1`),d.appendChild(e),a.appendChild(o),a.appendChild(d),xn(a,t.codeBlockLineWrap,t.labels)}},Fn=e=>{let t=e.querySelectorAll(`table`);for(let e of Array.from(t)){if(e.closest(`[data-markdown="table-wrapper"]`))continue;let t=document.createElement(`div`);t.className=`my-4`,t.setAttribute(`data-markdown`,`table-wrapper`);let n=document.createElement(`div`);n.setAttribute(`data-markdown`,`table-scroll`);let r=e.parentElement;if(r){r.replaceChild(t,e),e.setAttribute(`data-markdown`,`table`);for(let t of Array.from(e.querySelectorAll(`tr`)))t.setAttribute(`data-markdown`,`table-row`);for(let t of Array.from(e.querySelectorAll(`th`)))t.setAttribute(`data-markdown`,`table-header-cell`);for(let t of Array.from(e.querySelectorAll(`td`)))t.setAttribute(`data-markdown`,`table-cell`);n.appendChild(e),t.appendChild(n)}}},In=0,Ln=(e,t)=>{let n=e.querySelectorAll(`pre > code.language-mermaid`);for(let e of Array.from(n)){let n=e.parentElement;if(!n)continue;let r=(e.textContent??``).replace(/\s+$/,``),i=t.renderMermaid(r),a=document.createElement(`div`);a.setAttribute(`data-markdown`,`mermaid-block`),a.setAttribute(`data-md-source`,r),a.className=`group relative`;let o=document.createElement(`div`);o.setAttribute(`data-markdown`,`mermaid-scroll`);let s=document.createElement(`div`);if(s.setAttribute(`data-markdown`,`mermaid-toolbar`),s.className=`absolute top-1 right-2 flex items-center gap-1 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity`,i.svg){a.setAttribute(`data-mermaid-render`,`svg`);let e=document.createElement(`div`);e.setAttribute(`data-markdown`,`mermaid-viewport`);let n=document.createElement(`div`);n.setAttribute(`data-markdown`,`mermaid`),n.setAttribute(`data-md-original-svg`,i.svg),n.innerHTML=i.svg;let c=n.querySelector(`svg`),l=++In;for(let[e,t]of[[`title[id]`,`aria-labelledby`],[`desc[id]`,`aria-describedby`]]){let n=c?.querySelector(e);n&&(n.id=`yuri-mermaid-${l}-${n.localName}`,c?.setAttribute(t,n.id))}if(e.appendChild(n),o.appendChild(e),t.mermaidControls.showPanZoomControls&&(s.appendChild(Z(`zoomIn`,t.labels.zoomInDiagram,`mermaid-zoom-in`)),s.appendChild(Z(`zoomOut`,t.labels.zoomOutDiagram,`mermaid-zoom-out`)),s.appendChild(Z(`fit`,t.labels.resetDiagramView,`mermaid-fit`))),t.mermaidControls.copy){let e=Z(`copy`,t.labels.copyDiagram,`mermaid-copy`);e.setAttribute(`data-md-source`,r),s.appendChild(e)}if(t.mermaidControls.download){let e=Z(`download`,t.labels.downloadDiagram,`mermaid-download`);e.setAttribute(`data-md-svg`,`1`),s.appendChild(e)}}else{a.setAttribute(`data-mermaid-render`,`source`);let e=document.createElement(`pre`);if(e.setAttribute(`data-markdown`,`mermaid-source`),e.textContent=r,o.appendChild(e),t.mermaidControls.copy){let e=Z(`copy`,t.labels.copyDiagram,`mermaid-copy`);e.setAttribute(`data-md-source`,r),s.appendChild(e)}}a.appendChild(o),a.appendChild(s);let c=n.parentElement;c&&c.replaceChild(a,n)}},Rn=(e,t)=>{let n=e.querySelectorAll(`a[href]`);for(let e of Array.from(n)){if(e.getAttribute(`data-md-link-decorated`)===`true`||e.getAttribute(`data-yuri-file-link`)===`true`)continue;let n=e.getAttribute(`href`)??``;if(!w(n))continue;e.setAttribute(`data-md-link-decorated`,`true`);let r=C(n);if(r){let t=document.createElement(`span`);t.className=`mr-1 inline-flex size-[18px] items-center justify-center rounded border border-[var(--border)] bg-[var(--interactive-hover)] align-middle`;let n=document.createElement(`img`);n.setAttribute(`data-md-link-favicon`,`true`),n.src=r,n.alt=``,n.setAttribute(`aria-hidden`,`true`),n.loading=`lazy`,n.decoding=`async`,n.className=`size-3.5 rounded-sm`,n.addEventListener(`error`,()=>t.remove(),{once:!0}),t.appendChild(n),e.parentNode?.insertBefore(t,e)}if(t.onPreviewLoopback&&S(n)){let r=document.createElement(`button`);r.type=`button`,r.className=`ml-1 align-middle ${yn}`,r.setAttribute(`data-md-action`,`preview-loopback`),r.setAttribute(`data-md-url`,n),r.setAttribute(`title`,t.labels.previewTitle),r.setAttribute(`aria-label`,t.labels.previewLabel),bn(r,vn.download),e.parentNode?.insertBefore(r,e.nextSibling)}}},zn=`img:not([data-md-link-favicon="true"])`,Bn=`[data-md-image-presentation="true"]`,Vn=`data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="576" height="324" viewBox="0 0 576 324"%3E%3C/svg%3E`,Hn=[`block`,`max-w-full`,`rounded-xl`,`border`,`border-border/80`,`bg-[var(--surface-muted)]`,`transition-colors`,`focus-visible:outline`,`focus-visible:outline-2`,`focus-visible:outline-offset-2`,`focus-visible:outline-[var(--interactive-focus-ring)]`],Un=[`cursor-pointer`,`hover:bg-interactive-hover/60`],Wn=[`object-contain`],Gn=e=>{let t=e.parentElement;if(t?.matches(Bn))return t;let n=document.createElement(`span`);n.setAttribute(`data-md-image-presentation`,`true`),n.className=`relative my-4 block w-fit max-w-full`;let r=document.createElement(`span`);r.setAttribute(`data-md-image-placeholder-visual`,`true`),r.setAttribute(`aria-hidden`,`true`),r.className=`pointer-events-none absolute inset-0 flex items-center justify-center text-muted-foreground`,r.classList.add(`yuri-image-loading`),h()&&n.setAttribute(`data-mobile-image`,`true`);let i=document.createElement(`span`);i.className=`relative flex size-14 items-center justify-center rounded-2xl border border-border/80 bg-[var(--surface-elevated)] shadow-sm`,bn(i,vn.image);let a=document.createElement(`span`);a.setAttribute(`data-md-image-download-badge`,`true`),a.className=`absolute -right-1.5 -bottom-1.5 flex size-6 items-center justify-center rounded-full border border-border bg-[var(--surface-elevated)] text-foreground shadow-sm`,bn(a,vn.imageDownload);let o=document.createElement(`span`);return o.setAttribute(`data-md-image-loading-badge`,`true`),o.className=`absolute -right-1.5 -bottom-1.5 hidden size-6 items-center justify-center rounded-full border border-border bg-[var(--surface-elevated)] text-foreground shadow-sm`,bn(o,vn.imageLoading),i.appendChild(a),i.appendChild(o),r.appendChild(i),t?.replaceChild(n,e),n.appendChild(e),n.appendChild(r),n},Kn=e=>{e.src=Vn,e.setAttribute(`data-md-placeholder-source`,Vn),e.setAttribute(`data-md-image-state`,`placeholder`),e.classList.add(...Wn)},qn=e=>{e.removeAttribute(`data-md-image-state`),e.removeAttribute(`data-md-placeholder-source`),e.removeAttribute(`aria-busy`),e.classList.remove(...Wn)},Jn=(e,t)=>{if(!t.imagePreviewEnabled)return;let n=e.querySelectorAll(zn);for(let e of Array.from(n)){let n=e.getAttribute(`data-md-image-source`)??e.getAttribute(`src`)??``,r=T(n,t.imageEffectiveDirectory);if(!E(r)){e.setAttribute(`data-md-image-source`,n),Gn(e),e.setAttribute(`data-md-image-state`,e.complete&&e.naturalWidth>0?`loaded`:`loading`);continue}e.classList.add(...Hn,...Un),e.setAttribute(`role`,`button`),e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-md-image-source`,n),Gn(e),Kn(e)}},Yn=(e,t)=>{Nn(e),Ln(e,t),Pn(e,t),Fn(e),Rn(e,t),Jn(e,t),de(e)},Xn=(e,t,n)=>{let r=new Blob([t],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},Zn=(e,t)=>{let n=e=>{let n=e.target;if(!(n instanceof Element))return;let r=n.closest(`[data-md-action]`);if(!r)return;let i=r.getAttribute(`data-md-action`)??``;if(i===`copy-code`){let e=r.closest(`[data-component="markdown-code"]`)?.querySelector(`code`)?.textContent??``;e&&_(e).then(()=>Mn(r,t.labels.copied,`copy`,t.labels.copy));return}if(i===`toggle-code-wrap`){e.preventDefault(),t.onToggleCodeBlockLineWrap?.();return}if(i===`mermaid-copy`){let e=r.getAttribute(`data-md-source`)??``;e&&_(e).then(()=>Mn(r,t.labels.copied,`copy`,t.labels.copyDiagram));return}if(i===`mermaid-zoom-in`||i===`mermaid-zoom-out`||i===`mermaid-fit`){e.preventDefault();let t=ln(r.closest(`[data-markdown="mermaid-block"]`));i===`mermaid-zoom-in`?t?.zoomIn():i===`mermaid-zoom-out`?t?.zoomOut():t?.fit();return}if(i===`mermaid-download`){let e=r.closest(`[data-markdown="mermaid-block"]`)?.querySelector(`[data-markdown="mermaid"]`),t=e?.getAttribute(`data-md-original-svg`)??e?.innerHTML??``;t&&Xn(`diagram.svg`,t,`image/svg+xml;charset=utf-8`);return}if(i===`preview-loopback`){e.preventDefault();let n=r.getAttribute(`data-md-url`)??``;n&&t.onPreviewLoopback?.(n);return}};return e.addEventListener(`click`,n),()=>e.removeEventListener(`click`,n)},Qn=e({MarkdownRenderer:()=>Sr,SimpleMarkdownRenderer:()=>Cr}),Q=i(),$n=()=>{let e=(0,ge.c)(4),t=y(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=b(!1),e[0]=n):n=e[0];let r=n,i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=b(!0),e[1]=i):i=e[1];let a=i,o;return e[2]===t?.currentTheme?o=e[3]:(o=t?.currentTheme??(typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?a:r),e[2]=t?.currentTheme,e[3]=o),o},er=e=>{let t=(0,ge.c)(5),{containerRef:n,enabled:r,effectiveDirectory:i,openInAppBrowser:a,fileReference:o}=e,s;t[0]!==i||t[1]!==r||t[2]!==o||t[3]!==a?(s=e=>{if(r===!1||e.defaultPrevented||e.button!==0||e.altKey||e.shiftKey)return;let t=e.target;if(!(t instanceof Element)||t.closest($))return;let n=t.closest(`a[href]`);if(!(n instanceof HTMLAnchorElement)||n.getAttribute(`data-yuri-file-link`)===`true`)return;let s=n.getAttribute(`href`)??``;if(B(s)){e.preventDefault(),e.stopPropagation(),o&&L(s,o.effectiveDirectory,`href`)&&U(n,o);return}if(!w(s)||e.metaKey||e.ctrlKey)return;e.preventDefault(),e.stopPropagation();let c=(i||``).trim();if(!h()&&c&&a){a(c,s);return}x(s)},t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s):s=t[4];let c=p(s);d(`click`,c,n)},$=`img:not([data-md-link-favicon="true"])`,tr=e=>e.getAttribute(`data-md-image-source`)??e.getAttribute(`src`)??``,nr=({containerRef:e,effectiveDirectory:t,onShowPopup:r})=>{let i=W.useRef(null);i.current??=n();let a=i.current,o=!!r,s=p(e=>r?.(e)),c=W.useRef(()=>{}),l=W.useRef(new Map),u=W.useRef(null),d=W.useMemo(()=>e=>c.current(e),[]);return W.useLayoutEffect(()=>{let n=l.current;if(u.current!==null&&(clearTimeout(u.current),u.current=null),c.current=()=>{},!o){for(let[e,t]of n)t.controller?.abort(),t.release?.(),n.delete(e);return}let r=e.current;if(!r)return;let i=e=>{let n=Array.from(r.querySelectorAll($));if(n.indexOf(e)<0)return;let i=n.map(e=>({url:tr(e),filename:e.alt||tr(e)||void 0})).filter(e=>e.url),a=tr(e),o=i.findIndex(e=>e.url===a),c=e.alt||a;s({open:!0,title:c,content:``,metadata:{tool:`image-preview`,filename:c},previewSource:e,image:{url:a,filename:c,gallery:i,index:Math.max(0,o),directory:t}})},d=e=>{let t=n.get(e);t&&(t.controller?.abort(),t.release?.(),n.delete(e))},f=e=>{let n=tr(e),r=T(n,t);if(E(r))return`${a}\n${t}\n${n}`},p=e=>{let t=f(e);if(!t){d(e);return}let r=n.get(e);if(r?.key===t)return r;d(e);let i={key:t};return n.set(e,i),i},m=(e,i)=>{if(i.controller||i.objectUrl||!r.contains(e))return;let a=tr(e),o=T(a,t);if(!E(o)){d(e);return}let s=new AbortController;i.controller=s,e.setAttribute(`data-md-image-state`,`loading`),e.setAttribute(`aria-busy`,`true`),D(o.path,s.signal).then(t=>{let r=n.get(e);if(!r||r!==i||r.controller!==s||s.signal.aborted){t.release();return}r.controller=void 0,r.objectUrl=t.url,r.release=t.release,e.src=t.url}).catch(()=>{let t=n.get(e);t===i&&(t.controller=void 0,e.removeAttribute(`aria-busy`),e.setAttribute(`data-md-image-state`,`error`))})};c.current=e=>{for(let[t,r]of n)(!e.contains(t)||f(t)!==r.key)&&d(t);for(let t of Array.from(e.querySelectorAll($))){let e=p(t);e&&!e.objectUrl&&m(t,e)}},c.current(r);let h=e=>{let t=p(e);if(t&&!t.objectUrl){m(e,t);return}i(e)},g=e=>{let t=e.target;if(!(t instanceof Element))return;let n=t.closest($);n&&(e.preventDefault(),e.stopPropagation(),h(n))},_=e=>{if(e.key!==`Enter`&&e.key!==` `)return;let t=e.target;!(t instanceof HTMLImageElement)||!t.matches($)||(e.preventDefault(),e.stopPropagation(),h(t))},v=e=>{let t=e.target;t instanceof Element&&t.closest($)&&(e.preventDefault(),e.stopPropagation())},y=e=>{let t=e.target;!(t instanceof HTMLImageElement)||!t.matches($)||t.getAttribute(`src`)!==t.getAttribute(`data-md-placeholder-source`)&&(qn(t),t.setAttribute(`data-md-image-state`,`loaded`))},b=e=>{let t=e.target;!(t instanceof HTMLImageElement)||!t.matches($)||(t.removeAttribute(`aria-busy`),t.setAttribute(`data-md-image-state`,`error`))};return r.addEventListener(`load`,y,!0),r.addEventListener(`error`,b,!0),r.addEventListener(`click`,g),r.addEventListener(`keydown`,_),r.addEventListener(`contextmenu`,v),()=>{c.current=()=>{},r.removeEventListener(`load`,y,!0),r.removeEventListener(`error`,b,!0),r.removeEventListener(`click`,g),r.removeEventListener(`keydown`,_),r.removeEventListener(`contextmenu`,v),u.current=setTimeout(()=>{u.current=null;for(let e of Array.from(n.keys()))r.contains(e)&&Kn(e),d(e)},0)}},[e,t,o,a]),{reconcileMarkdownImageResources:d,transportIdentity:a}},rr={download:!0,copy:!0,showPanZoomControls:!0},ir=!0,ar=e=>{let t=e.match(/^(?:\uFEFF)?(---|\+\+\+)[^\S\r\n]*\r?\n[\s\S]*?\r?\n\1[^\S\r\n]*(?:\r?\n|$)/);return t?e.slice(t[0].length):e},or=160,sr=e=>{let t=(0,ge.c)(8),{containerRef:n,effectiveDirectory:r,editor:i,preferRuntimeEditor:a,onShowPopup:o,enabled:s}=e,c=W.useRef(null),l,u;t[0]!==n||t[1]!==i||t[2]!==r||t[3]!==s||t[4]!==o||t[5]!==a?(l=()=>{let e=n.current;if(!e)return;let t=!1,l=h(),u=V(),d=s,f=wr,p=()=>{let t=e.querySelectorAll(z);for(let e of Array.from(t))f(e)};if(!d){p();return}let m=e=>{let n=e===void 0?0:e;if(c.current!==null&&typeof window<`u`&&window.clearTimeout(c.current),typeof window>`u`){g();return}c.current=window.setTimeout(()=>{c.current=null,window.requestAnimationFrame(()=>{t||g()})},n)},g=()=>{let n=e.querySelectorAll(`[data-markdown="inline-code"], a, ${he}`),i=0;for(let a of Array.from(n)){let n=fe(a),o=L(n,r,a.tagName.toLowerCase()===`a`?`href`:`path`);if(!o){f(a);continue}if(i>=u){f(a);continue}i+=1,(a.getAttribute(`data-yuri-file-link`)!==`true`||a.getAttribute(`data-yuri-file-path`)!==o.resolvedPath)&&R(o.resolvedPath,r).then(n=>{if(t||!e.contains(a))return;let i=fe(a),s=L(i,r,a.tagName.toLowerCase()===`a`?`href`:`path`);if(!(!s||s.resolvedPath!==o.resolvedPath)){if(!H(s.resolvedPath,n,l)){f(a);return}a.setAttribute(`data-yuri-file-link`,`true`),a.setAttribute(`data-yuri-file-ref`,i),a.setAttribute(`data-yuri-file-path`,s.resolvedPath),a.setAttribute(`data-yuri-file-binary`,String(n.isBinary)),a.setAttribute(`title`,me),a.tagName.toLowerCase()!==`a`&&(a.setAttribute(`role`,`button`),a.setAttribute(`tabindex`,`0`))}}).catch(Tr)}},_=e=>U(e,{effectiveDirectory:r,editor:i,preferRuntimeEditor:a,onShowPopup:o}),v=e=>{let t=e.target;if(!(t instanceof Element)||t.closest($))return;let n=t.closest(z);n instanceof HTMLElement&&(e.preventDefault(),e.stopPropagation(),_(n))},y=e=>{if(e.key!==`Enter`&&e.key!==` `)return;let t=e.target;!(t instanceof HTMLElement)||t.getAttribute(`data-yuri-file-link`)!==`true`||(e.preventDefault(),e.stopPropagation(),_(t))};m(or);let b=new MutationObserver(()=>{m(or)});return b.observe(e,{childList:!0,subtree:!0}),e.addEventListener(`click`,v),e.addEventListener(`keydown`,y),()=>{t=!0,c.current!==null&&typeof window<`u`&&window.clearTimeout(c.current),c.current=null,b.disconnect(),e.removeEventListener(`click`,v),e.removeEventListener(`keydown`,y)}},u=[n,i,r,o,a,s],t[0]=n,t[1]=i,t[2]=r,t[3]=s,t[4]=o,t[5]=a,t[6]=l,t[7]=u):(l=t[6],u=t[7]),W.useEffect(l,u)},cr=({containerRef:e,onShowPopup:t,enableFullscreen:n,enablePanZoom:r,allowMermaidWheelEvents:i})=>{let a=p(e=>t?.(e)),o=!!t,s=p(t=>{if(!n||!o)return;let r=e.current;if(!r)return;let i=t.target;if(!(i instanceof Element)||i.closest(`button, a, [role="button"]`))return;let s=i.closest(Jt);if(!s)return;if(s instanceof HTMLElement&&s.hasAttribute(`data-mermaid-suppress-click`)){s.removeAttribute(`data-mermaid-suppress-click`);return}let c=Array.from(r.querySelectorAll(Jt)).indexOf(s);if(c<0)return;let l=s instanceof HTMLElement?s.getAttribute(`data-md-source`):null;if(!l||l.trim().length===0)return;let u=`Diagram ${c+1}`;a({open:!0,title:u,content:``,metadata:{tool:`mermaid-preview`,filename:u},mermaid:{url:`data:text/plain;charset=utf-8,${encodeURIComponent(l)}`,source:l,filename:u},previewSource:s instanceof HTMLElement?s:void 0})}),c=p(e=>{if(i||r)return;let t=e.target;t instanceof Element&&t.closest(`[data-markdown="mermaid-block"]`)&&e.stopPropagation()});d(`click`,s,e),W.useEffect(()=>{let t=e.current;if(t)return t.addEventListener(`wheel`,c,{capture:!0,passive:!0}),()=>{t.removeEventListener(`wheel`,c,!0)}},[e])},lr=24,ur=1,dr=12,fr=/[\s.,!?;:)\]]/,pr=(e,t)=>{let n=e<=12?2:e<=48?4:e<=96?8:Math.min(24,Math.ceil(e/8));return Math.max(1,Math.round(t/lr*n))},mr=(e,t)=>pr(e,t)*(1e3/t),hr=(e,t,n)=>{let r=Math.min(e.length,t+n);for(let t=r;t<Math.min(e.length,r+8);t+=1)if(fr.test(e[t]??``))return t+1;return r},gr=(e,t,n)=>{let[r,i]=W.useState(()=>t?0:e.length),a=W.useRef(r),o=W.useRef(0),s=W.useRef(null);return a.current=r,W.useEffect(()=>{if(!t||typeof window>`u`){o.current=0,s.current=null,i(e.length);return}a.current>e.length&&(a.current=e.length,o.current=0,i(e.length));let r=null,c=t=>{let l=Math.min(a.current,e.length);if(l>=e.length){r=null,s.current=null;return}let u=s.current;if(u===null){s.current=t,r=window.requestAnimationFrame(c);return}let d=Math.min(t-u,100);s.current=t,o.current+=mr(e.length-l,n)*(d/1e3);let f=Math.min(dr,Math.floor(o.current));if(f>=ur){o.current-=f;let t=hr(e,l,f);a.current=t,i(t)}r=window.requestAnimationFrame(c)};return a.current<e.length&&(r=window.requestAnimationFrame(c)),()=>{r!==null&&window.cancelAnimationFrame(r)}},[e,t,n]),t?e.slice(0,Math.min(r,e.length)):e},_r=(e,t,r,i=rr,a=n(),s=``,c=!1)=>{let{t:l}=g(),u=W.useMemo(()=>({copy:l(`markdownRenderer.code.actions.copyTitle`),copied:l(`markdownRenderer.code.actions.copiedTitle`),enableCodeWrap:l(`markdownRenderer.code.actions.enableWrapTitle`),disableCodeWrap:l(`markdownRenderer.code.actions.disableWrapTitle`),copyDiagram:l(`markdownRenderer.mermaid.actions.copySourceTitle`),downloadDiagram:l(`markdownRenderer.mermaid.actions.downloadSvgTitle`),zoomInDiagram:l(`markdownRenderer.mermaid.actions.zoomInTitle`),zoomOutDiagram:l(`markdownRenderer.mermaid.actions.zoomOutTitle`),resetDiagramView:l(`markdownRenderer.mermaid.actions.resetViewTitle`),previewLabel:l(`terminalView.preview.open`),previewTitle:l(`terminalView.preview.openTitle`)}),[l]),d=o(e=>e.codeBlockLineWrap),f=o(e=>e.setCodeBlockLineWrap),m=p(()=>{f(!o.getState().codeBlockLineWrap)});return W.useMemo(()=>({labels:u,mermaidControls:i,codeBlockLineWrap:d,deferCodeLineNumberSync:t,onToggleCodeBlockLineWrap:m,renderMermaid:t=>_e(t,e),onPreviewLoopback:r,imageTransportIdentity:a,imageEffectiveDirectory:s,imagePreviewEnabled:c}),[e,u,i,d,t,r,a,s,c])},vr=({containerRef:e,text:t,streaming:n,cacheKey:r,syntaxVars:i,ctx:a,reconcileMarkdownImageResources:o,onRichContentReady:s})=>{W.useEffect(()=>{se()},[]);let c=W.useRef(null),l=p(()=>{s?.()}),u=p(()=>{let t=e.current;if(t){if(!c.current){if(!Yt(t))return;c.current=_n(t);return}c.current.refresh()}});W.useLayoutEffect(()=>{let r=e.current,i=r?.querySelector(`[data-markdown-content]`)??r;if(i&&t&&i.childNodes.length===0){for(let e of At(t)){let t=document.createElement(`div`);t.setAttribute(`data-md-block`,``),t.style.display=`contents`,t.innerHTML=e,Yn(t,a),i.appendChild(t)}o(i),n||l()}},[e,a,o,n,t]),W.useEffect(()=>()=>{c.current?.cleanup(),c.current=null},[]),W.useEffect(()=>{let i=e.current;if(!i)return;let s=i.querySelector(`[data-markdown-content]`)??i,c=!0,d=new AbortController,f=()=>{},p=()=>{},m=()=>{if(!c||n||d.signal.aborted)return;s.replaceChildren();let e=document.createElement(`div`);e.setAttribute(`data-md-block`,``),e.setAttribute(`data-md-render-fallback`,`text`),e.style.display=`contents`;let r=document.createElement(`span`);r.style.whiteSpace=`pre-wrap`,r.textContent=t,e.appendChild(r),s.appendChild(e),o(s),l()},h=e=>{if(!c)return;let t=Array.from(s.children);e.forEach((e,n)=>{let r=t[n];if(r||(r=document.createElement(`div`),r.setAttribute(`data-md-block`,``),r.style.display=`contents`,s.appendChild(r)),r.getAttribute(`data-md-id`)===e.id)return;let i=document.createElement(`div`);i.innerHTML=e.html,Yn(i,a);let o=Yt(r),c=Yt(i);le(r,i,{childrenOnly:!0,onBeforeElUpdated:(e,t)=>{if(Ee(e,t))return!1;if(pe(e,t),e instanceof HTMLImageElement&&t instanceof HTMLImageElement){let n=e.getAttribute(`data-md-image-source`);if(n&&n===t.getAttribute(`data-md-image-source`)){let n=e.getAttribute(`src`);n===null?t.removeAttribute(`src`):t.setAttribute(`src`,n),t.className=e.className;for(let n of[`data-md-image-state`,`data-md-placeholder-source`,`aria-busy`]){let r=e.getAttribute(n);r===null?t.removeAttribute(n):t.setAttribute(n,r)}}}return!e.isEqualNode(t)}}),r.setAttribute(`data-md-id`,e.id),(o||c||Yt(r))&&u()});let n=Yt(s),r=!1;for(let n=t.length-1;n>=e.length;--n){let e=t[n];e&&Yt(e)&&(r=!0),e?.remove()}(r||t.length>e.length&&n)&&u(),o(s),a.deferCodeLineNumberSync||jn(s,a.codeBlockLineWrap,a.labels),Ae(s,N,{signal:d.signal,priority:`visible`}),l()},g=e=>{try{h(e)}catch{m()}},_=()=>{Lt(t,n,r,d.signal).then(e=>{if(c){if(n){g(e);return}p=k(()=>g(e),{priority:`visible`})}}).catch(m)};return n?_():f=k(_,{priority:`visible`}),()=>{c=!1,d.abort(),f(),p()}},[e,t,n,r,a,o]),W.useEffect(()=>{let t=e.current;if(t)return Zn(t,a)},[e,a]),W.useEffect(()=>{let t=e.current,n=t?.querySelector(`[data-markdown-content]`)??t;if(n)for(let[e,t]of Object.entries(i))n.style.setProperty(e,t)},[e,i]),W.useEffect(()=>{let t=e.current,n=t?.querySelector(`[data-markdown-content]`)??t;n&&(a.deferCodeLineNumberSync||jn(n,a.codeBlockLineWrap,a.labels))},[e,a.codeBlockLineWrap,a.deferCodeLineNumberSync,a.labels]);let d=W.useRef(null),m=p(()=>{let t=e.current,n=t?.querySelector(`[data-markdown-content]`)??t;n&&(d.current!==null&&window.cancelAnimationFrame(d.current),d.current=window.requestAnimationFrame(()=>{d.current=null,kn(n)}))});f(e,m),W.useEffect(()=>()=>{d.current!==null&&window.cancelAnimationFrame(d.current)},[])},yr=e=>e===`tool`?`markdown-content markdown-tool`:e===`reasoning`?`markdown-content markdown-reasoning`:`markdown-content leading-relaxed`,br=e=>{let t=(0,ge.c)(4),[n,r]=W.useState(e),i=W.useRef(e),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{i.current||(i.current=!0,r(!0))},t[0]=a):a=t[0];let o=p(a),s;return t[1]!==o||t[2]!==n?(s=[n,o],t[1]=o,t[2]=n,t[3]=s):s=t[3],s},xr=(e,t,n)=>{let r=W.useRef(n);r.current=n;let i=W.useRef(t);i.current=t;let a=p(e=>{if(!r.current)return;let t=e[0];if(!t)return;let n=t.borderBoxSize?.[0],a=n?n.blockSize:t.contentRect.height,o=n?n.inlineSize:t.contentRect.width;ie(i.current,a,o)});f(e,a)},Sr=W.memo(e=>{let t=(0,ge.c)(64),{content:n,part:r,messageId:i,isAnimated:a,skipFadeIn:o,className:s,isStreaming:u,disableStreamAnimation:d,sourceIsPaced:f,variant:h,onShowPopup:g,enableFileReferences:_}=e,v=a===void 0||a,y=o!==void 0&&o,b=u!==void 0&&u,x=d!==void 0&&d,S=f!==void 0&&f,C=h===void 0?`assistant`:h,w=_===void 0||_,T=$n(),{editor:E,runtime:D}=c(),O=W.useRef(null),k=ee()??``,A=p(Er),j;t[0]!==k||t[1]!==A?(j=e=>{k&&A(k,e)},t[0]=k,t[1]=A,t[2]=j):j=t[2];let ie=p(j),M=b&&!x,se;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(se=ne(l()),t[3]=se):se=t[3];let ce=gr(S?``:n,M&&!S,se.markdownPaceMs),N=S?n:ce,[P,le]=br(M),F;t[4]===g?F=t[5]:(F={containerRef:O,onShowPopup:g,enableFullscreen:ir,enablePanZoom:rr.showPanZoomControls},t[4]=g,t[5]=F),cr(F);let ue=w&&!b,I;t[6]!==E||t[7]!==k||t[8]!==g||t[9]!==D.isVSCode||t[10]!==ue?(I={containerRef:O,effectiveDirectory:k,editor:E,preferRuntimeEditor:D.isVSCode,onShowPopup:g,enabled:ue},t[6]=E,t[7]=k,t[8]=g,t[9]=D.isVSCode,t[10]=ue,t[11]=I):I=t[11],sr(I);let L;t[12]!==E||t[13]!==k||t[14]!==w||t[15]!==b||t[16]!==g||t[17]!==D.isVSCode?(L=w&&!b?{effectiveDirectory:k,editor:E,preferRuntimeEditor:D.isVSCode,onShowPopup:g}:void 0,t[12]=E,t[13]=k,t[14]=w,t[15]=b,t[16]=g,t[17]=D.isVSCode,t[18]=L):L=t[18];let R;t[19]!==k||t[20]!==A||t[21]!==L?(R={containerRef:O,effectiveDirectory:k,openInAppBrowser:A,fileReference:L},t[19]=k,t[20]=A,t[21]=L,t[22]=R):R=t[22],er(R);let z;t[23]!==k||t[24]!==g?(z={containerRef:O,effectiveDirectory:k,onShowPopup:g},t[23]=k,t[24]=g,t[25]=z):z=t[25];let{reconcileMarkdownImageResources:de,transportIdentity:B}=nr(z),V;t[26]===T?V=t[27]:(V=oe(T),t[26]=T,t[27]=V);let H=V,fe=_r(T,M,k?ie:void 0,rr,B,k,!!g),U=`markdown-${r?.id?`part-${r.id}`:`message-${i}`}`,pe;t[28]!==U||t[29]!==fe||t[30]!==N||t[31]!==M||t[32]!==de||t[33]!==le||t[34]!==H?(pe={containerRef:O,text:N,streaming:M,cacheKey:U,syntaxVars:H,ctx:fe,reconcileMarkdownImageResources:de,onRichContentReady:le},t[28]=U,t[29]=fe,t[30]=N,t[31]=M,t[32]=de,t[33]=le,t[34]=H,t[35]=pe):pe=t[35],vr(pe);let me;t[36]!==n||t[37]!==b||t[38]!==P||t[39]!==C?(me=P&&!b?ae(n,C):``,t[36]=n,t[37]=b,t[38]=P,t[39]=C,t[40]=me):me=t[40],xr(O,me,P&&!b);let he=!P||void 0,G;t[41]===s?G=t[42]:(G=m(`relative break-words w-full min-w-0`,s),t[41]=s,t[42]=G);let _e=P?`true`:`false`,ve=P?`ready`:`pending`,ye;t[43]!==N||t[44]!==P||t[45]!==C?(ye=!P&&(0,Q.jsx)(`div`,{className:m(yr(C),`pointer-events-none absolute inset-0 overflow-clip`),children:(0,Q.jsx)(re,{content:N})}),t[43]=N,t[44]=P,t[45]=C,t[46]=ye):ye=t[46];let be=!P||void 0,K;t[47]!==P||t[48]!==C?(K=m(yr(C),!P&&`invisible`),t[47]=P,t[48]=C,t[49]=K):K=t[49];let xe;t[50]!==be||t[51]!==K?(xe=(0,Q.jsx)(`div`,{"aria-hidden":be,className:K,"data-markdown-content":!0}),t[50]=be,t[51]=K,t[52]=xe):xe=t[52];let Se;t[53]!==he||t[54]!==G||t[55]!==_e||t[56]!==ve||t[57]!==ye||t[58]!==xe?(Se=(0,Q.jsxs)(`div`,{"aria-busy":he,className:G,"data-markdown-ready":_e,"data-markdown-hydration":ve,ref:O,children:[ye,xe]}),t[53]=he,t[54]=G,t[55]=_e,t[56]=ve,t[57]=ye,t[58]=xe,t[59]=Se):Se=t[59];let Ce=Se;if(v){let e;return t[60]!==U||t[61]!==Ce||t[62]!==y?(e=(0,Q.jsx)(te,{skipAnimation:y,children:Ce},U),t[60]=U,t[61]=Ce,t[62]=y,t[63]=e):e=t[63],e}return Ce},(e,t)=>e.content===t.content&&e.isStreaming===t.isStreaming&&e.disableStreamAnimation===t.disableStreamAnimation&&e.sourceIsPaced===t.sourceIsPaced&&e.variant===t.variant&&e.isAnimated===t.isAnimated&&e.skipFadeIn===t.skipFadeIn&&e.className===t.className&&e.messageId===t.messageId&&e.onShowPopup===t.onShowPopup&&e.enableFileReferences===t.enableFileReferences&&e.part?.id===t.part?.id),Cr=W.memo(e=>{let t=(0,ge.c)(55),{content:n,className:r,variant:i,disableLinkSafety:a,stripFrontmatter:o,onShowPopup:s,mermaidControls:l,mermaidTheme:u,allowMermaidWheelEvents:d,enableFileReferences:f}=e,h=i===void 0?`assistant`:i,g=o!==void 0&&o,_=l===void 0?rr:l,v=d!==void 0&&d,y=f===void 0||f,{editor:b,runtime:x}=c(),S=$n(),C=W.useRef(null),[w,T]=br(!1),E=ee()??``,D;t[0]!==n||t[1]!==g?(D=g?ar(n):n,t[0]=n,t[1]=g,t[2]=D):D=t[2];let O=D,k;t[3]!==v||t[4]!==_.showPanZoomControls||t[5]!==s?(k={containerRef:C,onShowPopup:s,enableFullscreen:ir,enablePanZoom:_.showPanZoomControls,allowMermaidWheelEvents:v},t[3]=v,t[4]=_.showPanZoomControls,t[5]=s,t[6]=k):k=t[6],cr(k);let A=p(Dr),te;t[7]!==b||t[8]!==E||t[9]!==y||t[10]!==s||t[11]!==x.isVSCode?(te={containerRef:C,effectiveDirectory:E,editor:b,preferRuntimeEditor:x.isVSCode,onShowPopup:s,enabled:y},t[7]=b,t[8]=E,t[9]=y,t[10]=s,t[11]=x.isVSCode,t[12]=te):te=t[12],sr(te);let j=!a,ne;t[13]!==b||t[14]!==E||t[15]!==y||t[16]!==s||t[17]!==x.isVSCode?(ne=y?{effectiveDirectory:E,editor:b,preferRuntimeEditor:x.isVSCode,onShowPopup:s}:void 0,t[13]=b,t[14]=E,t[15]=y,t[16]=s,t[17]=x.isVSCode,t[18]=ne):ne=t[18];let ie;t[19]!==E||t[20]!==A||t[21]!==ne||t[22]!==j?(ie={containerRef:C,enabled:j,effectiveDirectory:E,openInAppBrowser:A,fileReference:ne},t[19]=E,t[20]=A,t[21]=ne,t[22]=j,t[23]=ie):ie=t[23],er(ie);let ae;t[24]!==E||t[25]!==s?(ae={containerRef:C,effectiveDirectory:E,onShowPopup:s},t[24]=E,t[25]=s,t[26]=ae):ae=t[26];let{reconcileMarkdownImageResources:M,transportIdentity:se}=nr(ae),ce;t[27]===S?ce=t[28]:(ce=oe(S),t[27]=S,t[28]=ce);let N=ce,P=_r(u??S,!1,void 0,_,se,E,!!s),le=`simple:${h}`,F;t[29]!==P||t[30]!==M||t[31]!==O||t[32]!==T||t[33]!==N||t[34]!==le?(F={containerRef:C,text:O,streaming:!1,cacheKey:le,syntaxVars:N,ctx:P,reconcileMarkdownImageResources:M,onRichContentReady:T},t[29]=P,t[30]=M,t[31]=O,t[32]=T,t[33]=N,t[34]=le,t[35]=F):F=t[35],vr(F);let ue=!w||void 0,I;t[36]===r?I=t[37]:(I=m(`relative break-words w-full min-w-0`,r),t[36]=r,t[37]=I);let L=w?`true`:`false`,R=w?`ready`:`pending`,z;t[38]!==O||t[39]!==w||t[40]!==h?(z=!w&&(0,Q.jsx)(`div`,{className:m(yr(h),`pointer-events-none absolute inset-0 overflow-clip`),children:(0,Q.jsx)(re,{content:O})}),t[38]=O,t[39]=w,t[40]=h,t[41]=z):z=t[41];let de=!w||void 0,B;t[42]!==w||t[43]!==h?(B=m(yr(h),!w&&`invisible`),t[42]=w,t[43]=h,t[44]=B):B=t[44];let V;t[45]!==de||t[46]!==B?(V=(0,Q.jsx)(`div`,{"aria-hidden":de,className:B,"data-markdown-content":!0}),t[45]=de,t[46]=B,t[47]=V):V=t[47];let H;return t[48]!==ue||t[49]!==I||t[50]!==L||t[51]!==R||t[52]!==z||t[53]!==V?(H=(0,Q.jsxs)(`div`,{"aria-busy":ue,className:I,"data-markdown-ready":L,"data-markdown-hydration":R,ref:C,children:[z,V]}),t[48]=ue,t[49]=I,t[50]=L,t[51]=R,t[52]=z,t[53]=V,t[54]=H):H=t[54],H},(e,t)=>{let n=e.mermaidControls??rr,r=t.mermaidControls??rr;return e.content===t.content&&e.variant===t.variant&&e.className===t.className&&e.disableLinkSafety===t.disableLinkSafety&&e.stripFrontmatter===t.stripFrontmatter&&e.onShowPopup===t.onShowPopup&&n.download===r.download&&n.copy===r.copy&&n.showPanZoomControls===r.showPanZoomControls&&e.mermaidTheme===t.mermaidTheme&&e.allowMermaidWheelEvents===t.allowMermaidWheelEvents&&e.enableFileReferences===t.enableFileReferences});function wr(e){e.removeAttribute(`data-yuri-file-link`),e.removeAttribute(`data-yuri-file-ref`),e.removeAttribute(`data-yuri-file-path`),e.removeAttribute(`data-yuri-file-binary`),e.getAttribute(`title`)===`Open file`&&e.removeAttribute(`title`),e.tagName.toLowerCase()!==`a`&&(e.removeAttribute(`role`),e.removeAttribute(`tabindex`))}function Tr(){}function Er(e,t){o.getState().openContextBrowser(e,t)}function Dr(e,t){o.getState().openContextBrowser(e,t)}export{Qn as n,He as r,Sr as t};
@@ -0,0 +1,3 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{ot as t,st as n}from"./vendor-base-ui-CzHs0bHY.js";import{r}from"./useUIStore-BsCfUWQw.js";import{n as i}from"./vendor-react-DlzBev0S.js";import{u as a}from"./fileQueries-BaEKb7SZ.js";import{t as o}from"./platform-Dids8J9D.js";import{a as s,i as c,n as l,o as u,r as d,t as f}from"./vendor-markstream-react-6zxyQLCD.js";import{i as p,p as m,r as h}from"./vendor-reactuses-core-CuTmqEMK.js";import{Jn as g,Rn as _}from"./useMobileNavigationStore-SCjA_7jP.js";import{t as v}from"./useThemeSystem-CNzUUkFn.js";import{a as y,t as b}from"./vendor-framer-motion-DDMKlXiP.js";import{i as x,n as S,t as C}from"./tooltip-D5Xeh6py.js";import{a as w,r as T}from"./url-DO6Zrx1P.js";import{n as E}from"./useEffectiveDirectory-Uc8I6wXt.js";import{o as D}from"./image-loading-D1DfK_bJ.js";import{t as O}from"./LoadingImage-MAgXscGl.js";import{r as k}from"./FadeInOnReveal-CK7jBcu4.js";import{r as ee,t as te}from"./markdownHeightCache-DlRC53XG.js";import{t as A}from"./useStreamingTextThrottle-BY1Ynoj1.js";import{r as j,t as M}from"./MarkdownRendererImpl-ecACjpZw.js";import{n as N}from"./fileReferenceParser-BayaidRM.js";import{a as P,c as F,f as I,h as L,i as ne,l as re,m as R,o as z,s as ie,t as ae}from"./fileReferenceActions-D06_lyuL.js";var B=e(n(),1),V=i(),H=`img:not([data-md-link-favicon="true"])`,U=e=>e.getAttribute(`data-md-image-source`)??e.getAttribute(`src`)??``,oe=(e,t)=>{if(e.defaultPrevented||e.button!==0||e.altKey||e.shiftKey)return;let n=e.target;if(!(n instanceof Element))return;if(e.metaKey||e.ctrlKey){let e=n.closest(`a[href]`);if(!(e instanceof HTMLAnchorElement)||!L(e.getAttribute(`href`)??``))return}let r=n.closest(H);if(r instanceof HTMLImageElement&&t.onShowPopup){let n=e.currentTarget;if(!(n instanceof HTMLElement))return;let i=Array.from(n.querySelectorAll(H)).map(e=>({url:U(e),filename:e.alt||U(e)||void 0})).filter(e=>e.url),a=U(r),o=i.findIndex(e=>e.url===a);if(!a)return;e.preventDefault(),e.stopPropagation(),t.onShowPopup({open:!0,title:r.alt||a,content:``,previewSource:r,image:{url:a,...t.effectiveDirectory?{directory:t.effectiveDirectory}:{},filename:r.alt||a,gallery:i,index:o>=0?o:0}});return}if(t.fileReference){let r=n.closest(I);if(r instanceof HTMLElement){e.preventDefault(),e.stopPropagation(),z(r,t.fileReference);return}}let i=n.closest(`a[href]`);if(!(i instanceof HTMLAnchorElement))return;let a=i.getAttribute(`href`)??``;if(L(a)){e.preventDefault(),e.stopPropagation(),t.fileReference&&z(i,t.fileReference);return}if(!T(a))return;e.preventDefault(),e.stopPropagation();let o=(t.effectiveDirectory||``).trim();if(!_()&&o&&t.openInAppBrowser){t.openInAppBrowser(o,a);return}w(a)},se=(e,t)=>{if(e.key!==`Enter`&&e.key!==` `||!t.fileReference)return;let n=e.target;if(!(n instanceof Element))return;let r=n.closest(I);!(r instanceof HTMLElement)||r.getAttribute(`data-yuri-file-link`)!==`true`||(e.preventDefault(),e.stopPropagation(),z(r,t.fileReference))},ce=(e,t)=>{let n=t>=2?e.slice(t-2,t):``;return(t>=1?e.charAt(t-1):``)===`:`||n===`:/`},le=e=>{if(!e.includes(`/`)||!e.includes(`.`))return[{kind:`text`,value:e}];N.lastIndex=0;let t=[],n=0,r=N.exec(e);for(;r;){let i=r[0];if(!i||ce(e,r.index)||!R(i)){r=N.exec(e);continue}r.index>n&&t.push({kind:`text`,value:e.slice(n,r.index)}),t.push({kind:`path`,value:i}),n=r.index+i.length,r=N.exec(e)}return n===0?[{kind:`text`,value:e}]:(n<e.length&&t.push({kind:`text`,value:e.slice(n)}),t)},W=B.createContext({messageId:`markstream`,isStreaming:!1,disableStreamAnimation:!1,variant:`assistant`,enableFileReferences:!0}),G=()=>B.useContext(W),K=t(),ue=24,q=4,de=new Intl.Segmenter(void 0,{granularity:`grapheme`});function fe({node:e}){let t=G(),n=b(),r=t.isStreaming&&!t.disableStreamAnimation&&!n,i=e.content??``,a=B.useRef(i),o=B.useRef(i),s=B.useRef(null),c=B.useRef(new Map);return B.useLayoutEffect(()=>{let e=s.current;if(!e)return;let t=t=>{c.current.delete(t),t.parentNode===e&&(t.replaceWith(document.createTextNode(t.textContent??``)),e.normalize())},n=()=>{for(let[e,n]of c.current)n.stop(),t(e)};if(!r||!i.startsWith(o.current)){n(),e.textContent=i,o.current=i;return}let a=i.slice(o.current.length);if(o.current=i,!a)return;let l=Array.from(de.segment(a),e=>e.segment),u=Math.max(0,l.length-96),d=[];for(let e=u;e<l.length;e+=q)d.push(l.slice(e,e+q).join(``));c.current.size+d.length>ue&&n(),u>0&&e.appendChild(document.createTextNode(l.slice(0,u).join(``))),d.forEach((n,r)=>{let i=document.createElement(`span`);i.dataset.motionStreamChunk=``,i.textContent=n,i.style.opacity=`0`,e.appendChild(i);let a=y([i],{opacity:[0,1]},{duration:.16,delay:Math.min(r*.008,.08),ease:`easeOut`});c.current.set(i,a),a.then(()=>t(i))})},[i,r]),B.useLayoutEffect(()=>{let e=c.current;return()=>{for(let t of e.values())t.stop();e.clear()}},[]),(0,K.jsx)(`span`,{ref:s,className:g(`text-node whitespace-pre-wrap break-words`,e.center&&`text-node-center`),children:a.current})}var J=B.createContext({enabled:!1,insideLink:!1,isMobileSurface:!1,effectiveDirectory:``,preferRuntimeEditor:!1,slots:{used:0,limit:0}}),pe=e=>{let t=(0,V.c)(14),{enabled:n,effectiveDirectory:r,editor:i,preferRuntimeEditor:a,onShowPopup:o,content:s,children:c}=e,l=n?s:``,u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=_(),t[0]=u):u=t[0];let d;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d=ne(),t[1]=d):d=t[1];let f;t[2]===l?f=t[3]:(f={content:l,used:0,limit:d},t[2]=l,t[3]=f);let p;t[4]!==i||t[5]!==r||t[6]!==n||t[7]!==o||t[8]!==a||t[9]!==f?(p={enabled:n,insideLink:!1,isMobileSurface:u,effectiveDirectory:r,editor:i,preferRuntimeEditor:a,onShowPopup:o,slots:f},t[4]=i,t[5]=r,t[6]=n,t[7]=o,t[8]=a,t[9]=f,t[10]=p):p=t[10];let m=p,h;return t[11]!==c||t[12]!==m?(h=(0,K.jsx)(J.Provider,{value:m,children:c}),t[11]=c,t[12]=m,t[13]=h):h=t[13],h},Y=({raw:e,referenceKind:t,children:n})=>{let r=B.useContext(J),i=P(e,r.effectiveDirectory,t),a=B.useRef(!1);r.enabled&&i&&!a.current&&r.slots.used<r.slots.limit&&(r.slots.used+=1,a.current=!0);let[o,s]=B.useState(i?ie(i.resolvedPath,r.effectiveDirectory)??null:null),c=i?.resolvedPath;if(B.useEffect(()=>{if(!r.enabled||!c||!a.current)return;let e=!1;return F(c,r.effectiveDirectory).then(t=>{e||s(t)}).catch(()=>{}),()=>{e=!0}},[r.enabled,r.effectiveDirectory,c]),!i)return n??e;let l=!!(a.current&&o&&re(i.resolvedPath,o,r.isMobileSurface));return(0,K.jsx)(`span`,{"data-yuri-block-path-token":`true`,...l?{"data-yuri-file-link":`true`,"data-yuri-file-ref":e,"data-yuri-file-path":i.resolvedPath,"data-yuri-file-binary":String(o?.isBinary===!0),title:ae,...n?{}:{role:`button`,tabIndex:0}}:{},children:n??e})};function me(e){let t=(0,V.c)(18),n=B.useContext(J),r=G(),i;t[0]===r?i=t[1]:(i=()=>r.isStreaming&&!r.disableStreamAnimation&&r.variant!==`tool`?fe:d,t[0]=r,t[1]=i);let[a]=B.useState(i),o=e.node.content??``;if(!n.enabled||n.insideLink){let n;return t[2]!==a||t[3]!==e?(n=(0,K.jsx)(a,{...e,fade:!1}),t[2]=a,t[3]=e,t[4]=n):n=t[4],n}let s,c;if(t[5]!==a||t[6]!==o||t[7]!==e){c=Symbol.for(`react.early_return_sentinel`);bb0:{let n=le(o);if(n.length===1&&n[0]?.kind!==`path`){let n;t[10]!==a||t[11]!==e?(n=(0,K.jsx)(a,{...e,fade:!1}),t[10]=a,t[11]=e,t[12]=n):n=t[12],c=n;break bb0}let r;t[13]!==a||t[14]!==e?(r=(t,n)=>t.kind===`path`?(0,K.jsx)(Y,{raw:t.value},`path-${n}-${t.value}`):(0,K.jsx)(a,{...e,fade:!1,node:{...e.node,content:t.value}},`text-${n}`),t[13]=a,t[14]=e,t[15]=r):r=t[15],s=n.map(r)}t[5]=a,t[6]=o,t[7]=e,t[8]=s,t[9]=c}else s=t[8],c=t[9];if(c!==Symbol.for(`react.early_return_sentinel`))return c;let l;return t[16]===s?l=t[17]:(l=(0,K.jsx)(K.Fragment,{children:s}),t[16]=s,t[17]=l),l}function he(e){let t=(0,V.c)(7),n=B.useContext(J),r=e.node.code??``;if(!n.enabled||!R(r)){let n;return t[0]===e?n=t[1]:(n=(0,K.jsx)(c,{...e}),t[0]=e,t[1]=n),n}let i;t[2]===r?i=t[3]:(i=(0,K.jsx)(Y,{raw:r}),t[2]=r,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,K.jsx)(c,{...e,children:i}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}function ge(e){let t=(0,V.c)(20),n=B.useContext(J),r=e.node.href??``,i;t[0]!==n.enabled||t[1]!==r?(i=n.enabled&&R(r),t[0]=n.enabled,t[1]=r,t[2]=i):i=t[2];let a=i,o;t[3]===e?o=t[4]:(o=(0,K.jsx)(l,{...e,showTooltip:!1}),t[3]=e,t[4]=o);let s=o,c;t[5]!==n.isMobileSurface||t[6]!==r||t[7]!==s||t[8]!==e.node.title||t[9]!==e.showTooltip?(c=n.isMobileSurface||e.showTooltip===!1?s:(0,K.jsxs)(C,{children:[(0,K.jsx)(x,{asChild:!0,children:(0,K.jsx)(`span`,{children:s})}),(0,K.jsx)(S,{children:e.node.title||r})]}),t[5]=n.isMobileSurface,t[6]=r,t[7]=s,t[8]=e.node.title,t[9]=e.showTooltip,t[10]=c):c=t[10];let u=c,d;t[11]===n?d=t[12]:(d={...n,insideLink:!0},t[11]=n,t[12]=d);let f;t[13]!==u||t[14]!==a||t[15]!==r?(f=a?(0,K.jsx)(Y,{raw:r,referenceKind:`href`,children:u}):u,t[13]=u,t[14]=a,t[15]=r,t[16]=f):f=t[16];let p;return t[17]!==d||t[18]!==f?(p=(0,K.jsx)(J.Provider,{value:d,children:f}),t[17]=d,t[18]=f,t[19]=p):p=t[19],p}var _e=/^[ \t]{0,3}(`{3,}|~{3,})/,ve=e=>{if(typeof e!=`string`||e.length===0)return!1;let t=e.split(/\r?\n/,1)[0]??``;return _e.test(t)},ye=e=>{let t=0,n=0,r=e.match(/[`~]+/g)??[];for(let e of r)e[0]==="`"?t=Math.max(t,e.length):n=Math.max(n,e.length);return t>=3?"`".repeat(Math.max(3,t+1)):n>=3&&t===0?"```":n>=3?`~`.repeat(Math.max(3,n+1)):"```"},be=e=>{let t=typeof e.raw==`string`?e.raw:``;if(ve(t))return t.endsWith(`
2
+ `)?t:`${t}\n`;let n=(e.language??``).trim(),r=e.code??``,i=ye(r),a=r.endsWith(`
3
+ `)?r:`${r}\n`;return e.loading?`${i}${n}\n${a}`:`${i}${n}\n${a}${i}\n`},xe=e=>{let t=e.partId?`part-${e.partId}`:`body`,n=e.indexKey!==void 0&&e.indexKey!==null&&String(e.indexKey).length>0?String(e.indexKey):e.language&&e.language.length>0?e.language:`code`;return`${e.messageId}:${t}:code:${n}`};function Se(e,t){let n=5381;for(let e=0;e<t.length;e+=1)n=Math.imul(n,33)^t.charCodeAt(e);return`${e}:${(n>>>0).toString(36)}:${t.length}`}function X(e){let t=(0,V.c)(7),n;if(t[0]!==e.indexKey||t[1]!==e.node.code||t[2]!==e.node.language){let r=(e.node.language??``).trim().toLowerCase()||`diagram`;n=e.indexKey??Se(r,e.node.code??``),t[0]=e.indexKey,t[1]=e.node.code,t[2]=e.node.language,t[3]=n}else n=t[3];let r=n,i;return t[4]!==r||t[5]!==e?(i=(0,K.jsx)(Z,{...e,indexKey:r}),t[4]=r,t[5]=e,t[6]=i):i=t[6],i}function Z(e){let t=(0,V.c)(21),n=G(),r=e.node.language??``,i=e.node.code??``,a=e.node.raw??``,o=e.node.loading===!0||e.loading===!0,s;t[0]!==i||t[1]!==r||t[2]!==o||t[3]!==a?(s=be({type:`code_block`,language:r,code:i,raw:a,loading:o}),t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s):s=t[4];let c=s,l=n.isStreaming||e.loading===!0||e.node.loading===!0,u;t[5]!==n.messageId||t[6]!==n.partId||t[7]!==e.indexKey||t[8]!==e.node.language?(u=xe({messageId:n.messageId,partId:n.partId,indexKey:e.indexKey,language:e.node.language}),t[5]=n.messageId,t[6]=n.partId,t[7]=e.indexKey,t[8]=e.node.language,t[9]=u):u=t[9];let d=u,f=n.enableFileReferences&&!l,p;t[10]!==c||t[11]!==n.disableStreamAnimation||t[12]!==n.onShowPopup||t[13]!==n.variant||t[14]!==d||t[15]!==l||t[16]!==f?(p=(0,K.jsx)(M,{content:c,messageId:d,isAnimated:!1,skipFadeIn:!0,isStreaming:l,disableStreamAnimation:n.disableStreamAnimation,sourceIsPaced:!0,variant:n.variant,onShowPopup:n.onShowPopup,enableFileReferences:f}),t[10]=c,t[11]=n.disableStreamAnimation,t[12]=n.onShowPopup,t[13]=n.variant,t[14]=d,t[15]=l,t[16]=f,t[17]=p):p=t[17];let m;return t[18]!==d||t[19]!==p?(m=(0,K.jsx)(`div`,{className:`yuri-markstream-code-host min-w-0 w-full`,"data-yuri-markstream-code":`markdown-impl`,"data-yuri-markstream-code-id":d,children:p}),t[18]=d,t[19]=p,t[20]=m):m=t[20],m}function Ce(e){let t=(0,V.c)(9),{node:n}=e,r=E()??``,i=D(n.src,r),{onShowPopup:a}=G(),o=h(we),s=i.source||void 0,c=n.title??void 0,l=a?`button`:void 0,u=a?0:void 0,d=a?o:void 0,f;return t[0]!==n.alt||t[1]!==n.src||t[2]!==i.error||t[3]!==s||t[4]!==c||t[5]!==l||t[6]!==u||t[7]!==d?(f=(0,K.jsx)(O,{contentFrame:!0,src:s,resourceError:i.error,"data-md-image-source":n.src,alt:n.alt,title:c,className:`rounded-lg`,role:l,tabIndex:u,onKeyDown:d}),t[0]=n.alt,t[1]=n.src,t[2]=i.error,t[3]=s,t[4]=c,t[5]=l,t[6]=u,t[7]=d,t[8]=f):f=t[8],f}function we(e){(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.currentTarget.click())}function Q(e){let t=(0,V.c)(4);if(e.node.type===`code_block`){let n=e,r;return t[0]===n?r=t[1]:(r=(0,K.jsx)(Z,{...n}),t[0]=n,t[1]=r),r}let n=e,r;return t[2]===n?r=t[3]:(r=(0,K.jsx)(Ce,{...n}),t[2]=n,t[3]=r),r}var $=!1;function Te(e){return e.node?.type===`code_block`?B.createElement(Z,e):B.createElement(me,e)}var Ee=()=>{$||($=!0,s({text:Te,inline_code:he,link:ge,image:Q,code_block:u(Z,`block`),mermaid:u(X,`block`),d2:u(X,`block`),d2lang:u(X,`block`),infographic:u(X,`block`)}))},De={parseOptions:{reuseStableTopLevelNodes:!0},maxLiveNodes:0,liveNodeBuffer:0,batchRendering:!1,deferNodesUntilVisible:!1,viewportPriority:!1,smoothStreaming:!1,typewriter:!1,fade:!1};Ee();var Oe=e=>(e.inline.ruler.at(`math`,(e,t)=>{let n=e.src.slice(e.pos),r=j(n),i=n.startsWith(`\\(`)?/^\\\(([\s\S]+?)\\\)/.exec(n):null,a=r?.raw??i?.[0],o=r?.text??i?.[1];if(!a||!o)return!1;if(!t){let t=e.push(`math_inline`,`math`,0);t.content=o,t.markup=r?r.display?`$$`:`$`:`\\(\\)`}return e.pos+=a.length,!0}),e),ke=e=>e===`tool`?`markdown-content markdown-tool yuri-markstream-host`:e===`reasoning`?`markdown-content markdown-reasoning yuri-markstream-host`:`markdown-content leading-relaxed yuri-markstream-host`,Ae=B.memo(({content:e,part:t,messageId:n,className:i,isStreaming:o=!1,disableStreamAnimation:s=!1,variant:c=`assistant`,onShowPopup:l,enableFileReferences:u=!0})=>{let d=v()?.currentTheme.metadata.variant===`dark`,{editor:_,runtime:y}=a(),b=E()??``,x=B.useRef(null),S=t?.id?`yuri-ms-${t.id}`:`yuri-ms-${n}`,C=t?.id,w=!o,T=w?te(e,`markstream:${c}`):``,D=u&&!o,O=D?{effectiveDirectory:b,editor:_,preferRuntimeEditor:y.isVSCode,onShowPopup:l}:void 0,k=B.useMemo(()=>({messageId:n,partId:C,isStreaming:o,disableStreamAnimation:s,variant:c,onShowPopup:l,enableFileReferences:u}),[n,C,o,s,c,l,u]),A=B.useRef(w);A.current=w;let j=B.useRef(T);j.current=T;let M=h(e=>{if(!A.current)return;let t=e[0];if(!t)return;let n=t.borderBoxSize?.[0],r=n?n.blockSize:t.contentRect.height,i=n?n.inlineSize:t.contentRect.width;ee(j.current,r,i)});m(x,M);let N=h((e,t)=>{r.getState().openContextBrowser(e,t)}),P=h(e=>{oe(e,{onShowPopup:l,fileReference:O,effectiveDirectory:b,openInAppBrowser:N})}),F=h(e=>{se(e,{fileReference:O})});return p(`click`,P,x),p(`keydown`,F,x),(0,K.jsx)(`div`,{ref:x,className:g(`relative break-words w-full min-w-0`,ke(c),i),"data-markdown-ready":`true`,"data-markdown-hydration":`ready`,"data-yuri-markdown-engine":`markstream`,"data-yuri-markstream-virtual":`off`,"data-yuri-markstream-streaming":o?`true`:void 0,children:(0,K.jsx)(W.Provider,{value:k,children:(0,K.jsx)(pe,{enabled:D,effectiveDirectory:b,editor:_,preferRuntimeEditor:y.isVSCode,onShowPopup:l,content:e,children:(0,K.jsx)(f,{content:e,customMarkdownIt:Oe,customId:S,final:!o,isDark:d,codeBlockStream:o,...De})})})})},(e,t)=>e.content===t.content&&e.isStreaming===t.isStreaming&&e.disableStreamAnimation===t.disableStreamAnimation&&e.variant===t.variant&&e.isAnimated===t.isAnimated&&e.skipFadeIn===t.skipFadeIn&&e.className===t.className&&e.messageId===t.messageId&&e.onShowPopup===t.onShowPopup&&e.enableFileReferences===t.enableFileReferences&&e.part?.id===t.part?.id),je=e=>{let t=(0,V.c)(7),n=e.content,r=e.isStreaming===!0,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=k(o()),t[0]=i):i=t[0];let a;t[1]!==e.content||t[2]!==r?(a={text:n,isStreaming:r,throttleMs:i.markdownPaceMs},t[1]=e.content,t[2]=r,t[3]=a):a=t[3];let s=A(a),c=e.isStreaming?s:e.content,l;return t[4]!==e||t[5]!==c?(l=(0,K.jsx)(Ae,{...e,content:c}),t[4]=e,t[5]=c,t[6]=l):l=t[6],l},Me=e=>{let t=(0,V.c)(3),n=`${e.messageId}:${e.part?.id??`text`}`,r;return t[0]!==e||t[1]!==n?(r=(0,K.jsx)(je,{...e},n),t[0]=e,t[1]=n,t[2]=r):r=t[2],r};export{Me as MarkstreamRenderer};