ryco-cli 0.1.9 → 0.1.10

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 (207) hide show
  1. package/dist/{AcpNativeLogging-CwXNgeCl.mjs → AcpNativeLogging-Ba9Nn9Re.mjs} +1 -1
  2. package/dist/{AcpNativeLogging-BBLrglnY.cjs → AcpNativeLogging-Be1KGJfF.cjs} +1 -1
  3. package/dist/{AzureDevOpsSourceControlProvider-lRTMr9X9.mjs → AzureDevOpsSourceControlProvider-CGlK6M0b.mjs} +2 -2
  4. package/dist/{AzureDevOpsSourceControlProvider-BMQxxk2n.cjs → AzureDevOpsSourceControlProvider-CVj-F-pW.cjs} +2 -2
  5. package/dist/{BitbucketSourceControlProvider-F1J_75c0.mjs → BitbucketSourceControlProvider-BV6iRDi7.mjs} +2 -2
  6. package/dist/{BitbucketSourceControlProvider-BXDk4GzL.cjs → BitbucketSourceControlProvider-CEZEd4PX.cjs} +2 -2
  7. package/dist/{ClaudeDriver-B_pvBuh5.cjs → ClaudeDriver-lBU7EyUX.cjs} +2 -2
  8. package/dist/{ClaudeDriver-BpYiEftb.mjs → ClaudeDriver-rooMNrJz.mjs} +2 -2
  9. package/dist/{CodexDriver-Bcju44ZM.cjs → CodexDriver-CZCIJSLV.cjs} +4 -4
  10. package/dist/{CodexDriver-6IRQy37T.mjs → CodexDriver-DBz2rPXb.mjs} +4 -4
  11. package/dist/{CodexTextGeneration-CCvcMT6Y.mjs → CodexTextGeneration-BeG7ymPC.mjs} +1 -1
  12. package/dist/{CodexTextGeneration-yaU53Kmz.cjs → CodexTextGeneration-BvIcyD1P.cjs} +1 -1
  13. package/dist/{CopilotDriver-CTxl0KmP.cjs → CopilotDriver-CX5zhEdZ.cjs} +3 -3
  14. package/dist/{CopilotDriver-BCe5V1Ll.mjs → CopilotDriver-D36vbGbn.mjs} +3 -3
  15. package/dist/{CursorDriver-D1Agqrbj.cjs → CursorDriver-CPBVeesr.cjs} +3 -3
  16. package/dist/{CursorDriver-C4V25d1y.mjs → CursorDriver-DWuuOSkJ.mjs} +3 -3
  17. package/dist/{ForgejoSourceControlProvider-C-NI9vaC.mjs → ForgejoSourceControlProvider-CeN7Snfr.mjs} +2 -2
  18. package/dist/{ForgejoSourceControlProvider-CV1lljGK.cjs → ForgejoSourceControlProvider-CzmmcAZO.cjs} +2 -2
  19. package/dist/{GitHubSourceControlProvider-B_7J1jOl.cjs → GitHubSourceControlProvider-DfFR9O2o.cjs} +2 -2
  20. package/dist/{GitHubSourceControlProvider-BeCMPF92.mjs → GitHubSourceControlProvider-Dmz1LJct.mjs} +2 -2
  21. package/dist/{GitLabSourceControlProvider-0BeWchVS.mjs → GitLabSourceControlProvider-C21lwphV.mjs} +2 -2
  22. package/dist/{GitLabSourceControlProvider-U0xcv577.cjs → GitLabSourceControlProvider-DGoelNmL.cjs} +2 -2
  23. package/dist/{GrokDriver-mkLP3IZl.cjs → GrokDriver-CIXj_4ry.cjs} +3 -3
  24. package/dist/{GrokDriver-DFw7DOdK.mjs → GrokDriver-qKX1a63G.mjs} +3 -3
  25. package/dist/{OpenCodeDriver-ChWHrFi7.mjs → OpenCodeDriver-CbdswhqU.mjs} +2 -2
  26. package/dist/{OpenCodeDriver-C_KFYA-P.cjs → OpenCodeDriver-DDEuwtXl.cjs} +2 -2
  27. package/dist/{SourceControlProviderDiscoveryCatalog-BTJDoEx1.mjs → SourceControlProviderDiscoveryCatalog-4_4yahsa.mjs} +1 -1
  28. package/dist/{SourceControlProviderDiscoveryCatalog-Bwu_JBJN.cjs → SourceControlProviderDiscoveryCatalog-DJWDCoup.cjs} +1 -1
  29. package/dist/bin.cjs +46 -20
  30. package/dist/bin.mjs +46 -20
  31. package/dist/client/assets/AccountSettings-CxbiGHT-.js +1 -0
  32. package/dist/client/assets/{AiFocusSettings-DGHWPxgZ.js → AiFocusSettings-Cx2vpGdu.js} +1 -1
  33. package/dist/client/assets/{AnimatedHeight-BwF3D1vB.js → AnimatedHeight-D5lUTPRn.js} +1 -1
  34. package/dist/client/assets/AppearanceSettings-eWri4YVm.js +1 -0
  35. package/dist/client/assets/{BranchToolbar.logic-CvclFpSW.js → BranchToolbar.logic-C1Dh4xQW.js} +1 -1
  36. package/dist/client/assets/{ChatRightPanel-CL4qBTZb.js → ChatRightPanel-DAVHrLN_.js} +9 -9
  37. package/dist/client/assets/{ChatThreadRouteView-BuOmyy7a.js → ChatThreadRouteView-D11uiGPL.js} +1 -1
  38. package/dist/client/assets/{CommandPaletteDialog-lCv8qmpm.js → CommandPaletteDialog-DDXuLFyX.js} +1 -1
  39. package/dist/client/assets/{CompositeItem-e0rusLTG.js → CompositeItem-D-K93PI3.js} +1 -1
  40. package/dist/client/assets/{CompositeRoot-vnNIb6NL.js → CompositeRoot-Cee5L4T9.js} +1 -1
  41. package/dist/client/assets/ConnectionsSettings-Cf1RRkcn.js +7 -0
  42. package/dist/client/assets/{DiagnosticsSettings-CxT6modq.js → DiagnosticsSettings-R00QjM1b.js} +2 -2
  43. package/dist/client/assets/{DialogHandle-DZVZpjWD.js → DialogHandle-pL0RAsXa.js} +1 -1
  44. package/dist/client/assets/{DialogPopup-BIJxt62s.js → DialogPopup-DqvvwMxX.js} +1 -1
  45. package/dist/client/assets/DialogRoot-BZCu6XdB.js +1 -0
  46. package/dist/client/assets/{DialogTitle-CtpwXIBL.js → DialogTitle-BamZsRNz.js} +1 -1
  47. package/dist/client/assets/{DialogTrigger-CdeFWE8i.js → DialogTrigger-DR3vtVpa.js} +1 -1
  48. package/dist/client/assets/{DialogViewport-C2oKvkDR.js → DialogViewport-CuRGvCfw.js} +1 -1
  49. package/dist/client/assets/{DraftChatThreadRouteView-FriWZLgB.js → DraftChatThreadRouteView-CGMtPPGt.js} +1 -1
  50. package/dist/client/assets/{ExternalIdentityWeb.logic-DsqwSlwL.js → ExternalIdentityWeb.logic-D64j70NH.js} +1 -1
  51. package/dist/client/assets/{GlassSurface-EZnNd1mF.js → GlassSurface-DTmaROoR.js} +1 -1
  52. package/dist/client/assets/HostedConnectionControls-CXiER4OL.js +1 -0
  53. package/dist/client/assets/HostedHubRoot-MbaWk1RQ.js +1 -0
  54. package/dist/client/assets/{HostedNativeAuthorizationRoute-B-F2I7S_.js → HostedNativeAuthorizationRoute-DQ71L_yc.js} +1 -1
  55. package/dist/client/assets/{HostedRelayTrustNotice-CB0O5OAN.js → HostedRelayTrustNotice-Cv7T3mW5.js} +1 -1
  56. package/dist/client/assets/{Icons-Cme5LL0k.js → Icons-DjUJVKIP.js} +1 -1
  57. package/dist/client/assets/{IntegrationsSettingsPanel-CS9vrmPw.js → IntegrationsSettingsPanel-BUDT_BAr.js} +1 -1
  58. package/dist/client/assets/{KeybindingsSettings-CQi3dbgG.js → KeybindingsSettings-DpU1kPiV.js} +1 -1
  59. package/dist/client/assets/{McpServersSettings-BMV56xhW.js → McpServersSettings-DQqM_vIq.js} +1 -1
  60. package/dist/client/assets/{MobileSheet-C8OrQzw0.js → MobileSheet-PksVmYO6.js} +1 -1
  61. package/dist/client/assets/{NewWorktreeDialog-DnxmXlh2.js → NewWorktreeDialog-CAe3UUk5.js} +1 -1
  62. package/dist/client/assets/{NoActiveThreadState-BWs9JspL.js → NoActiveThreadState-B020r2KX.js} +1 -1
  63. package/dist/client/assets/NodeSecuritySettings-DlVOOlej.js +1 -0
  64. package/dist/client/assets/{OpinionatedPluginsSettings-BcGJ1f7b.js → OpinionatedPluginsSettings-DMshW6cD.js} +1 -1
  65. package/dist/client/assets/{PhoneGetAppInterstitial-BJGf9FwA.js → PhoneGetAppInterstitial-BCO-RNVk.js} +1 -1
  66. package/dist/client/assets/{PhoneGetAppInterstitialBackdrop-KgY3ydJF.js → PhoneGetAppInterstitialBackdrop-CkHNzjRm.js} +1 -1
  67. package/dist/client/assets/{PhoneHome-kBrFqF5K.js → PhoneHome-DY2ItxYl.js} +1 -1
  68. package/dist/client/assets/{PhoneSettingsSurface-CBI6Gl8b.js → PhoneSettingsSurface-DTP9FXLL.js} +1 -1
  69. package/dist/client/assets/{ProjectFavicon-D0HVbYDF.js → ProjectFavicon-Dopa4Rxy.js} +1 -1
  70. package/dist/client/assets/{ProviderModelPicker-DZTCKskK.js → ProviderModelPicker-ChoxerzY.js} +1 -1
  71. package/dist/client/assets/ProviderUpdateLaunchNotification.logic-BkoRegCn.js +1 -0
  72. package/dist/client/assets/ProvidersSettingsPanel-Ubea3yAA.js +1 -0
  73. package/dist/client/assets/{RedactedSensitiveText-CRGSSHz3.js → RedactedSensitiveText-CdVeknPX.js} +1 -1
  74. package/dist/client/assets/RootAppShell-BkUPk443.js +6 -0
  75. package/dist/client/assets/{RycoLetterMark-E82lj57c.js → RycoLetterMark-GW-n9UxM.js} +1 -1
  76. package/dist/client/assets/SettingsDialog-DMPrhOeR.js +1 -0
  77. package/dist/client/assets/SettingsPanels-ChP1z6Bu.js +3 -0
  78. package/dist/client/assets/{SettingsPanels.editor-DTAK4nlM.js → SettingsPanels.editor-CiyAxlms.js} +1 -1
  79. package/dist/client/assets/{SourceControlSettings-CpnAAcyj.js → SourceControlSettings-8w3XlkuZ.js} +1 -1
  80. package/dist/client/assets/{StatisticsPage-DwU3oJRO.js → StatisticsPage-D4lU63rD.js} +1 -1
  81. package/dist/client/assets/{StatisticsPanel-8OSQWA79.js → StatisticsPanel-C2yBieuM.js} +1 -1
  82. package/dist/client/assets/{StatisticsSettingsLink-Bb86VtRL.js → StatisticsSettingsLink-DZwvRI-Y.js} +1 -1
  83. package/dist/client/assets/{ThreadStatusIndicators-wgiSGtn6.js → ThreadStatusIndicators-B43wkv-s.js} +0 -0
  84. package/dist/client/assets/{ThreadTerminalDrawer-Dju6roQA.js → ThreadTerminalDrawer-BYQ6EMgr.js} +1 -1
  85. package/dist/client/assets/{ThreadWorkspacePanel-hfIocZRN.js → ThreadWorkspacePanel-DuaQ9DMj.js} +1 -1
  86. package/dist/client/assets/{ToolbarRootContext-CgV898DN.js → ToolbarRootContext-Cp1bgmpz.js} +1 -1
  87. package/dist/client/assets/{WorkItemsTab-DYgsIthY.js → WorkItemsTab-BDfun24H.js} +6 -6
  88. package/dist/client/assets/{alert-DFo8_l6D.js → alert-DdU9OGtC.js} +1 -1
  89. package/dist/client/assets/{alert-dialog-Cmodiuqg.js → alert-dialog-zAmnOpaF.js} +1 -1
  90. package/dist/client/assets/{authorization-CFcCWeGd.js → authorization-mIJKV2yp.js} +1 -1
  91. package/dist/client/assets/{badge-BbJiUmhG.js → badge-CNPL77i3.js} +1 -1
  92. package/dist/client/assets/{branding-CG1VEma6.js → branding-yW_ACj9l.js} +1 -1
  93. package/dist/client/assets/{button-BT6cGe5S.js → button-CXfaxtRp.js} +1 -1
  94. package/dist/client/assets/{capabilities-CK9Wa-Au.js → capabilities-j43xmCXg.js} +1 -1
  95. package/dist/client/assets/{chatThreadActions-Ooky34bb.js → chatThreadActions-DQ8aOQ1g.js} +1 -1
  96. package/dist/client/assets/{collapsible-BIEfHdzc.js → collapsible-oJfDmFRs.js} +1 -1
  97. package/dist/client/assets/{command-BjXuIvYa.js → command-DK1D8p4-.js} +1 -1
  98. package/dist/client/assets/{composerDraftStore-_Xy-iY4b.js → composerDraftStore-BaAeiPHc.js} +1 -1
  99. package/dist/client/assets/copy-UQjKGt7t.js +1 -0
  100. package/dist/client/assets/{data-list-iVYHRfWS.js → data-list-BpzwKa1z.js} +1 -1
  101. package/dist/client/assets/{desktopUpdateAtoms-C9VOpM6h.js → desktopUpdateAtoms-Cy06xm8M.js} +1 -1
  102. package/dist/client/assets/{desktopWorkspace-BOWgdyPs.js → desktopWorkspace-Cw4Fu0Dd.js} +1 -1
  103. package/dist/client/assets/{device-CLd1blIe.js → device-hx7RX9fI.js} +1 -1
  104. package/dist/client/assets/{dialog-BUIS3TXH.js → dialog-JVv-MNDj.js} +1 -1
  105. package/dist/client/assets/{draft-input-CUkU2EAu.js → draft-input-CxoGkZxM.js} +1 -1
  106. package/dist/client/assets/{editorPreferences-C79SevBP.js → editorPreferences-C3i2Nkh2.js} +1 -1
  107. package/dist/client/assets/{empty-BNn5X77p.js → empty-DhkXzm1N.js} +1 -1
  108. package/dist/client/assets/{env-CBdFekj3.js → env-B4arEvJg.js} +1 -1
  109. package/dist/client/assets/{getPseudoElementBounds-CWoLtsYr.js → getPseudoElementBounds-NLvUMZyQ.js} +1 -1
  110. package/dist/client/assets/{group-a6GUMeTh.js → group-CafmSbGU.js} +1 -1
  111. package/dist/client/assets/{index-Bbc24tew.js → index-COc-h_V9.js} +2 -2
  112. package/dist/client/assets/{input-zjUwoDs3.js → input-Bz9pd_f3.js} +1 -1
  113. package/dist/client/assets/{kbd-BGOWI5KX.js → kbd-qh5s29Yp.js} +1 -1
  114. package/dist/client/assets/{keybindings-n2U57Td0.js → keybindings-BCns_TPr.js} +1 -1
  115. package/dist/client/assets/{label-DWGvDLsD.js → label-Ct6uH6qL.js} +1 -1
  116. package/dist/client/assets/{lib-DoLGGVrW.js → lib-BBbQoz14.js} +1 -1
  117. package/dist/client/assets/{logging-FtLrPmK_.js → logging-M8H3z7rQ.js} +1 -1
  118. package/dist/client/assets/{main-C2i8ecSj.js → main-9Wu8G64Y.js} +2 -2
  119. package/dist/client/assets/main-DaYHZt-J.css +2 -0
  120. package/dist/client/assets/{menu-CwPZHq2g.js → menu-DL-18Hfn.js} +1 -1
  121. package/dist/client/assets/{popover-j6ZF-s94.js → popover-C9y_0-ZN.js} +1 -1
  122. package/dist/client/assets/{primary-0ymoUGkq.js → primary-OskAInOO.js} +1 -1
  123. package/dist/client/assets/{projectPaths-CHDYD_Gc.js → projectPaths-DSRhOXwD.js} +1 -1
  124. package/dist/client/assets/{providerDriverMeta-lsEf84Mz.js → providerDriverMeta-DcAmgw5o.js} +1 -1
  125. package/dist/client/assets/{providerIconUtils-_WuNo2Ek.js → providerIconUtils-DSXSWHwg.js} +1 -1
  126. package/dist/client/assets/providerInstances-D5NRn-MS.js +1 -0
  127. package/dist/client/assets/providerModels-D5NRn-MS.js +1 -0
  128. package/dist/client/assets/{qr-code-DbscZ6Qz.js → qr-code-DsN9sWfN.js} +1 -1
  129. package/dist/client/assets/{radio-group-BTtFIcDI.js → radio-group-DGUZYMAN.js} +1 -1
  130. package/dist/client/assets/{resolveAriaLabelledBy-CxOsaNI8.js → resolveAriaLabelledBy-l3Wj7Mso.js} +1 -1
  131. package/dist/client/assets/{rightPanelRouteSearch-DkhE1otz.js → rightPanelRouteSearch-DE_7uWlN.js} +1 -1
  132. package/dist/client/assets/runtime-CqhG6EOG.js +1 -0
  133. package/dist/client/assets/{scroll-area-B-bu3v0j.js → scroll-area-gtur6NxN.js} +1 -1
  134. package/dist/client/assets/{scrollEdges-CDEU4fOg.js → scrollEdges-Ccq9Jqpk.js} +1 -1
  135. package/dist/client/assets/{select-rPdFVPfm.js → select-BB7zCkpA.js} +1 -1
  136. package/dist/client/assets/{separator-CaVw81t6.js → separator-DOGIr29S.js} +1 -1
  137. package/dist/client/assets/{session-logic-B0shVXpN.js → session-logic-DOQPF0oN.js} +1 -1
  138. package/dist/client/assets/{settingsDialogStore-CPtQPrek.js → settingsDialogStore-DM98Sea0.js} +1 -1
  139. package/dist/client/assets/settingsLayout-CS7P71tz.js +1 -0
  140. package/dist/client/assets/settingsSections.logic-F8RXVmAq.js +1 -0
  141. package/dist/client/assets/{sheet-DQBndeJT.js → sheet-DVALF6mw.js} +1 -1
  142. package/dist/client/assets/{sidebar-H-CSxQVD.js → sidebar-Dft4bIEi.js} +1 -1
  143. package/dist/client/assets/{sidebarProjectFolders-CsZlmaJg.js → sidebarProjectFolders-BOfJCYjK.js} +1 -1
  144. package/dist/client/assets/{sidebarStatusText-DjLAEM1H.js → sidebarStatusText-DaNVnBiR.js} +1 -1
  145. package/dist/client/assets/{skeleton-CCuGgPK1.js → skeleton-CBHDWLDX.js} +1 -1
  146. package/dist/client/assets/{spinner-CgrOdIjl.js → spinner-JhkVC8d7.js} +1 -1
  147. package/dist/client/assets/src-Vf4LVnMX.js +14 -0
  148. package/dist/client/assets/storeSelectors-CP3vrsGY.js +1 -0
  149. package/dist/client/assets/{switch-cMx5Wv_R.js → switch-vkC1QGDn.js} +1 -1
  150. package/dist/client/assets/{terminal-links-DERnXf-G.js → terminal-links-BaX-ICJT.js} +1 -1
  151. package/dist/client/assets/{textarea-DIqqrD8A.js → textarea-Cz_x76EQ.js} +1 -1
  152. package/dist/client/assets/{threadPriorityRefreshRuntime-D2XRdn_X.js → threadPriorityRefreshRuntime-DqqfcbZE.js} +1 -1
  153. package/dist/client/assets/toast-Bnfw8LOb.js +1 -0
  154. package/dist/client/assets/{toggle-BIs83JSj.js → toggle-DNtHlm45.js} +1 -1
  155. package/dist/client/assets/{toggle-group-0LgplGMc.js → toggle-group-BNtjyirT.js} +1 -1
  156. package/dist/client/assets/{tooltip-BaJgdXlL.js → tooltip-lYatfjuN.js} +1 -1
  157. package/dist/client/assets/types-CP3vrsGY.js +1 -0
  158. package/dist/client/assets/{uiStateStore-hgy2ilHo.js → uiStateStore-VVodpTkG.js} +1 -1
  159. package/dist/client/assets/{useAtlassian-1BSXt3BO.js → useAtlassian-DzQhYzCz.js} +0 -0
  160. package/dist/client/assets/{useButton-_xmxdcVX.js → useButton-CQaIys_r.js} +1 -1
  161. package/dist/client/assets/{useCompositeListItem-dLIU4XjY.js → useCompositeListItem-D_u_nlWz.js} +1 -1
  162. package/dist/client/assets/useCopyToClipboard-BTpWxumf.js +1 -0
  163. package/dist/client/assets/{useDebouncedValue-DU7gLY9w.js → useDebouncedValue-Dl2JtWSe.js} +1 -1
  164. package/dist/client/assets/{useFloatingRootContext-CSPbIu1q.js → useFloatingRootContext-DKAeq7FI.js} +1 -1
  165. package/dist/client/assets/useHandleNewThread-CzfIpG9Y.js +1 -0
  166. package/dist/client/assets/{useLabelableId-COmfNFnd.js → useLabelableId-C7EOshps.js} +1 -1
  167. package/dist/client/assets/{useLocation-DsqdpYA5.js → useLocation-CvhfNIUj.js} +1 -1
  168. package/dist/client/assets/{useOpenInteractionType-JaQBnIly.js → useOpenInteractionType-D9ngong8.js} +1 -1
  169. package/dist/client/assets/{usePhoneThreadActions-RjcSVspy.js → usePhoneThreadActions-CiFBnOHD.js} +1 -1
  170. package/dist/client/assets/{usePopupViewport-wXfO6SZE.js → usePopupViewport-CQTeg5Y-.js} +1 -1
  171. package/dist/client/assets/{useScrollLock-Dr_P7FLZ.js → useScrollLock-TdF-Iq8H.js} +1 -1
  172. package/dist/client/assets/{useStatistics-B2NNfOqV.js → useStatistics-CP8uxvx6.js} +1 -1
  173. package/dist/client/assets/{useSwipeDismiss-B8Fo31QE.js → useSwipeDismiss-DESLmDpT.js} +1 -1
  174. package/dist/client/assets/{useThreadActions-B9kmG6FU.js → useThreadActions-fOb3ApmL.js} +1 -1
  175. package/dist/client/assets/{useTriggerFocusGuards-O2ZE3JtI.js → useTriggerFocusGuards-DkAmJBLw.js} +1 -1
  176. package/dist/client/assets/{useValueChanged-Dj0YXujm.js → useValueChanged-CSGMZCwN.js} +1 -1
  177. package/dist/client/assets/{utils-c6dglOTK.js → utils-BPUctpTG.js} +1 -1
  178. package/dist/client/index.html +1 -1
  179. package/dist/{collectUint8StreamText-Dn-L1KcR.cjs → collectUint8StreamText-Bb52hlpd.cjs} +36 -6
  180. package/dist/{collectUint8StreamText-DNY4x71l.mjs → collectUint8StreamText-EDg4F0TU.mjs} +31 -7
  181. package/dist/{makeManagedServerProvider-D3T5X-B4.mjs → makeManagedServerProvider-Cf8bNWwc.mjs} +1 -1
  182. package/dist/{makeManagedServerProvider-DNnEIuhW.cjs → makeManagedServerProvider-itynW7xv.cjs} +1 -1
  183. package/package.json +1 -1
  184. package/dist/client/assets/AccountSettings-ckhtafp7.js +0 -1
  185. package/dist/client/assets/AppearanceSettings-CDvljGDS.js +0 -1
  186. package/dist/client/assets/ConnectionsSettings-BJJrdASq.js +0 -7
  187. package/dist/client/assets/DialogRoot-8xRqqTn8.js +0 -1
  188. package/dist/client/assets/HostedConnectionControls-BYS30u9D.js +0 -1
  189. package/dist/client/assets/HostedHubRoot-Bi0LEQCK.js +0 -1
  190. package/dist/client/assets/NodeSecuritySettings-iTvQFged.js +0 -1
  191. package/dist/client/assets/ProviderUpdateLaunchNotification.logic-CtfZzmYI.js +0 -1
  192. package/dist/client/assets/ProvidersSettingsPanel-DAz8hMXw.js +0 -1
  193. package/dist/client/assets/RootAppShell-BWtqIOLh.js +0 -6
  194. package/dist/client/assets/SettingsDialog-RrFirXQp.js +0 -1
  195. package/dist/client/assets/SettingsPanels-bLK5JAV2.js +0 -3
  196. package/dist/client/assets/main-an0sD0U2.css +0 -2
  197. package/dist/client/assets/providerInstances-DEQekDE8.js +0 -1
  198. package/dist/client/assets/providerModels-DEQekDE8.js +0 -1
  199. package/dist/client/assets/runtime-BkRtSwRY.js +0 -1
  200. package/dist/client/assets/settingsLayout-B8os-EWr.js +0 -1
  201. package/dist/client/assets/settingsSections.logic-Be8uaymC.js +0 -1
  202. package/dist/client/assets/src-b7-hpIff.js +0 -14
  203. package/dist/client/assets/storeSelectors-BLHJVLCP.js +0 -1
  204. package/dist/client/assets/toast-DonYDy-6.js +0 -1
  205. package/dist/client/assets/types-BLHJVLCP.js +0 -1
  206. package/dist/client/assets/useCopyToClipboard-qG2nhvjQ.js +0 -1
  207. package/dist/client/assets/useHandleNewThread-COAg-4eT.js +0 -1
@@ -1,2 +1,2 @@
1
- import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{t as r}from"./env-CBdFekj3.js";import{Bn as i,Gn as a,Kn as o,Xt as s,bn as c,jn as l,xn as u,yn as d}from"./runtime-BkRtSwRY.js";import{f,t as p}from"./utils-c6dglOTK.js";import{i as m,r as h}from"./branding-CG1VEma6.js";import{t as g}from"./settingsDialogStore-CPtQPrek.js";import{f as _}from"./useRenderElement-DchFnsR8.js";import{t as v}from"./chevron-down-B7C6FKzM.js";import{i as y}from"./toast-DonYDy-6.js";import{t as b}from"./clipboard-copy-C4VV20QR.js";import{t as x}from"./useCopyToClipboard-qG2nhvjQ.js";import{n as S,t as C}from"./play-DYDxlTKo.js";import{t as w}from"./refresh-cw-DopCMrtR.js";import{t as T}from"./triangle-alert-RL_T3KLo.js";import{t as E}from"./button-BT6cGe5S.js";import{t as D}from"./toastHelpers-CSQRKo4F.js";import"./usePresentationTier-B_SCFvN7.js";import{i as O,r as k,t as A}from"./alert-DFo8_l6D.js";import{a as ee,i as te,o as j,s as M,t as N}from"./select-rPdFVPfm.js";import{r as P}from"./editorPreferences-C79SevBP.js";import{t as F}from"./badge-BbJiUmhG.js";import{i as I,n as ne,r as L}from"./settingsLayout-B8os-EWr.js";var re=_(`clipboard-check`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`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`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),R=e(t(),1),z=n(),ie=`[redacted]`,B=/(token|secret|password|passwd|credential|authorization|bearer|api[-_]?key|apikey|cookie|session[-_]?id|private[-_]?key|pairing[-_]?code|access[-_]?key|signature|email)/i;function ae(e){let t;try{t=new URL(e)}catch{return e}(t.username||t.password)&&(t.username=``,t.password=``);for(let e of t.searchParams.keys())B.test(e)&&t.searchParams.set(e,ie);return t.toString()}function oe(e){return V(e,!1)}function V(e,t){if(t)return e==null?e:ie;if(typeof e==`string`)return ae(e);if(Array.isArray(e))return e.map(e=>V(e,!1));if(typeof e==`object`&&e){let t={};for(let[n,r]of Object.entries(e))t[n]=V(r,B.test(n));return t}return e}function se(e){return oe({generatedAt:e.generatedAt,app:e.app,environments:e.environments.map(e=>({environmentId:e.environmentId,label:e.record?.label??null,connectionState:e.runtime?.connectionState??null,authState:e.runtime?.authState??null,role:e.runtime?.role??null,lastError:e.runtime?.lastError??null,lastErrorAt:e.runtime?.lastErrorAt??null,connectedAt:e.runtime?.connectedAt??null,disconnectedAt:e.runtime?.disconnectedAt??null,pushSequence:e.pushSequence})),providers:e.providers.map(e=>({instanceId:e.instanceId,driver:e.driver,enabled:e.enabled,installed:e.installed,version:e.version,status:e.status,availability:e.availability??`available`,authStatus:e.auth.status,authType:e.auth.type??null,message:e.message??null,unavailableReason:e.unavailableReason??null,checkedAt:e.checkedAt})),observability:e.observability?{logsDirectoryConfigured:e.observability.logsDirectoryPath.length>0,localTracingEnabled:e.observability.localTracingEnabled,otlpTracesEnabled:e.observability.otlpTracesEnabled,otlpMetricsEnabled:e.observability.otlpMetricsEnabled,localMetrics:e.observability.localMetrics?{turnQuiescenceAvgMs:e.observability.localMetrics.turnQuiescenceAvgMs,checkpointDurationP95Ms:e.observability.localMetrics.checkpointDurationP95Ms,wsReconnectCount:e.observability.localMetrics.wsReconnectCount,capturedAt:e.observability.localMetrics.capturedAt}:null}:null,performance:e.performance?{local:{turnQuiescenceAvgMs:e.performance.local.turnQuiescenceAvgMs,checkpointDurationP95Ms:e.performance.local.checkpointDurationP95Ms,latestThreadSnapshotDurationMs:e.performance.local.latestThreadSnapshotDurationMs,threadSnapshotDurationP95Ms:e.performance.local.threadSnapshotDurationP95Ms,wsReconnectCount:e.performance.local.wsReconnectCount,windowSampleCounts:{...e.performance.local.windowSampleCounts},capturedAt:e.performance.local.capturedAt},queues:{...e.performance.queues},traceSink:e.performance.traceSink?{...e.performance.traceSink}:null,snapshotCollectionDurationMs:e.performance.snapshotCollectionDurationMs}:null})}function ce(e){return JSON.stringify(e,null,2)}function le(e){return(e?.gapCount??0)>0}var H=f(),ue={connected:`bg-success`,connecting:`bg-warning`,error:`bg-destructive`,disconnected:`bg-muted-foreground/40`},de={ready:`bg-success`,warning:`bg-warning`,error:`bg-destructive`,disabled:`bg-muted-foreground/40`};function U(e){let t=(0,z.c)(4),{className:n}=e,r;t[0]===n?r=t[1]:(r=p(`inline-block size-2 shrink-0 rounded-full`,n),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,H.jsx)(`span`,{className:r,"aria-hidden":!0}),t[2]=r,t[3]=i),i}function W(e){if(!e)return`No push events observed yet.`;let t=[`last #${e.highestSequence??`—`}`,`${e.eventCount} events`,`${e.snapshotCount} snapshots`];return e.gapCount>0?t.push(`${e.gapCount} gap${e.gapCount===1?``:`s`}`):t.push(`no gaps`),t.join(` · `)}function fe(e){let t=(0,z.c)(25),{environmentId:n,record:r,runtime:i,pushSequence:a}=e,o=i?.connectionState??`disconnected`,s=r?.label??n,c=le(a),l=ue[o]??`bg-muted-foreground/40`,u;t[0]===l?u=t[1]:(u=(0,H.jsx)(U,{className:l}),t[0]=l,t[1]=u);let d;t[2]!==s||t[3]!==u?(d=(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[u,s]}),t[2]=s,t[3]=u,t[4]=d):d=t[4];let f=i?.authState?` · auth ${i.authState}`:``,m=i?.role?` · ${i.role}`:``,h;t[5]!==o||t[6]!==f||t[7]!==m?(h=(0,H.jsxs)(`span`,{className:`block`,children:[`WS `,o,f,m]}),t[5]=o,t[6]=f,t[7]=m,t[8]=h):h=t[8];let g=c?`text-warning`:`text-muted-foreground/70`,_;t[9]===g?_=t[10]:(_=p(`block`,g),t[9]=g,t[10]=_);let v;t[11]===a?v=t[12]:(v=W(a),t[11]=a,t[12]=v);let y;t[13]!==_||t[14]!==v?(y=(0,H.jsx)(`span`,{className:_,children:v}),t[13]=_,t[14]=v,t[15]=y):y=t[15];let b;t[16]===i?b=t[17]:(b=i?.lastError?(0,H.jsx)(`span`,{className:`block break-all text-destructive`,children:i.lastError}):null,t[16]=i,t[17]=b);let x;t[18]!==y||t[19]!==b||t[20]!==h?(x=(0,H.jsxs)(`span`,{className:`space-y-0.5`,children:[h,y,b]}),t[18]=y,t[19]=b,t[20]=h,t[21]=x):x=t[21];let S;return t[22]!==x||t[23]!==d?(S=(0,H.jsx)(L,{title:d,description:x}),t[22]=x,t[23]=d,t[24]=S):S=t[24],S}function G(e){let t=(0,z.c)(52),{snapshot:n}=e,l=d(ye),f=c(ve),p=s(_e),g=o(),_=a(),v=i(),S=n?.performance?.local??null,[C,w]=(0,R.useState)(!1),T;t[0]!==S||t[1]!==_?(T=_?{..._,...S?{localMetrics:S}:{}}:null,t[0]=S,t[1]=_,t[2]=T):T=t[2];let O=T,k;t[3]!==p||t[4]!==l||t[5]!==f?(k=[...new Set([...Object.keys(l),...Object.keys(f),...Object.keys(p)])].toSorted(),t[3]=p,t[4]=l,t[5]=f,t[6]=k):k=t[6];let A=k,ee;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(ee={onCopy:ge,onError:he},t[7]=ee):ee=t[7];let{copyToClipboard:te,isCopied:j}=x(ee),M;t[8]!==te||t[9]!==A||t[10]!==O||t[11]!==g||t[12]!==p||t[13]!==l||t[14]!==f||t[15]!==n?.performance?(M=()=>{let e=se({generatedAt:new Date().toISOString(),app:{version:m,stage:h,isElectron:r,userAgent:typeof navigator>`u`?null:navigator.userAgent},environments:A.map(e=>({environmentId:e,record:l[e]??null,runtime:f[e]??null,pushSequence:p[e]??null})),providers:g,observability:O,performance:n?.performance??null});te(ce(e),void 0)},t[8]=te,t[9]=A,t[10]=O,t[11]=g,t[12]=p,t[13]=l,t[14]=f,t[15]=n?.performance,t[16]=M):M=t[16],n?.performance;let N=M,F=_?.logsDirectoryPath??null,ne;t[17]!==v||t[18]!==F?(ne=()=>{if(!F)return;w(!0);let e=P(v??[]);if(!e){w(!1),y.add(D({type:`error`,title:`Could not open logs folder`,description:`No available editors found.`}));return}u().shell.openInEditor(F,e).catch(me).finally(()=>{w(!1)})},t[17]=v,t[18]=F,t[19]=ne):ne=t[19];let ie=ne,B;t[20]===j?B=t[21]:(B=j?(0,H.jsx)(re,{className:`size-3.5`}):(0,H.jsx)(b,{className:`size-3.5`}),t[20]=j,t[21]=B);let ae=j?`Copied`:`Copy debug bundle`,oe;t[22]!==N||t[23]!==B||t[24]!==ae?(oe=(0,H.jsxs)(E,{size:`xs`,variant:`outline`,onClick:N,children:[B,ae]}),t[22]=N,t[23]=B,t[24]=ae,t[25]=oe):oe=t[25];let V;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,H.jsx)(L,{title:`Application`,description:`Version ${m} · ${h}${r?` · Desktop`:` · Browser`}`}),t[26]=V):V=t[26];let le=F??`Resolving logs directory…`,ue=!F||C,de=C?`Opening…`:`Open logs folder`,U;t[27]!==ie||t[28]!==ue||t[29]!==de?(U=(0,H.jsx)(E,{size:`xs`,variant:`outline`,disabled:ue,onClick:ie,children:de}),t[27]=ie,t[28]=ue,t[29]=de,t[30]=U):U=t[30];let W;t[31]!==le||t[32]!==U?(W=(0,H.jsx)(L,{title:`Logs`,description:le,control:U}),t[31]=le,t[32]=U,t[33]=W):W=t[33];let G;t[34]!==W||t[35]!==oe?(G=(0,H.jsxs)(I,{title:`Diagnostics`,headerAction:oe,children:[V,W]}),t[34]=W,t[35]=oe,t[36]=G):G=t[36];let K;t[37]!==A||t[38]!==p||t[39]!==l||t[40]!==f?(K=A.length===0?(0,H.jsx)(L,{title:`No environments`,description:`No environment connections are tracked yet.`}):A.map(e=>(0,H.jsx)(fe,{environmentId:e,record:l[e]??null,runtime:f[e]??null,pushSequence:p[e]??null},e)),t[37]=A,t[38]=p,t[39]=l,t[40]=f,t[41]=K):K=t[41];let q;t[42]===K?q=t[43]:(q=(0,H.jsx)(I,{title:`Environments`,children:K}),t[42]=K,t[43]=q);let J;t[44]===g?J=t[45]:(J=g.length===0?(0,H.jsx)(L,{title:`No providers`,description:`No provider instances are configured.`}):g.map(pe),t[44]=g,t[45]=J);let Y;t[46]===J?Y=t[47]:(Y=(0,H.jsx)(I,{title:`Providers`,children:J}),t[46]=J,t[47]=Y);let be;return t[48]!==G||t[49]!==q||t[50]!==Y?(be=(0,H.jsxs)(H.Fragment,{children:[G,q,Y]}),t[48]=G,t[49]=q,t[50]=Y,t[51]=be):be=t[51],be}function pe(e){let t=e.unavailableReason??e.message??null;return(0,H.jsx)(L,{title:(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,H.jsx)(U,{className:de[e.status]??`bg-muted-foreground/40`}),e.displayName??e.instanceId]}),description:(0,H.jsxs)(`span`,{className:`space-y-0.5`,children:[(0,H.jsxs)(`span`,{className:`block`,children:[e.status,` · auth `,e.auth.status,e.version?` · v${e.version}`:``]}),t?(0,H.jsx)(`span`,{className:`block break-all text-muted-foreground/70`,children:t}):null]})},e.instanceId)}function me(e){y.add(D({type:`error`,title:`Could not open logs folder`,description:e instanceof Error?e.message:`Failed to open logs folder.`}))}function he(e){y.add(D({type:`error`,title:`Could not copy debug bundle`,description:e.message}))}function ge(){y.add({type:`success`,title:`Debug bundle copied`,description:`Secrets are redacted before export.`})}function _e(e){return e.byEnvironment}function ve(e){return e.byId}function ye(e){return e.byId}var K=[{method:`thread/snapshot`,requestId:`req_9f2c81d4a6`,startedAt:`12s ago`},{method:`git/status`,requestId:`req_c07b3e51fd`,startedAt:`9s ago`}];function q(e){y.update(e,{type:`loading`,title:`Updating Claude Code`,description:`Running provider update command.`,timeout:0,actionProps:void 0,data:{hideCopyButton:!0}}),window.setTimeout(()=>{y.update(e,{type:`success`,title:`Provider updated`,description:`New sessions will use the updated provider.`,timeout:0,data:{hideCopyButton:!0,dismissAfterVisibleMs:3e3}})},1800)}var J=[{value:`provider-update`,label:`Provider update available`,fire:()=>{let e=y.add(D({type:`warning`,title:`Update Available: Claude Code v2.1.4`,description:`Install the update now or review provider settings.`,timeout:0,actionProps:{children:`Update`,onClick:()=>q(e)},actionVariant:`default`,data:{hideCopyButton:!0,secondaryActionProps:{children:`Settings`,onClick:()=>g.getState().openSettings(`providers`)},secondaryActionVariant:`outline`}}))}},{value:`pr-checks-passed`,label:`PR checks passed`,fire:()=>{y.add({type:`success`,title:`Checks passed for PR #316`,description:`Redesign the notification toasts · 3273af68e412`,timeout:6e3,actionProps:{children:`Open PR`,onClick:()=>void 0},data:{actionVariant:`outline`}})}},{value:`git-push`,label:`Git push with follow-up action`,fire:()=>{y.add(D({type:`success`,title:`Pushed`,description:`3 commits pushed to origin/feat/notifications-toasts.`,timeout:0,actionProps:{children:`Open PR`,onClick:()=>void 0},actionVariant:`outline`,data:{dismissAfterVisibleMs:1e4}}))}},{value:`git-failed`,label:`Git action failed`,fire:()=>{y.add(D({type:`error`,title:`Action failed`,description:`remote: Permission to sak0a/ryco.git denied to deploy-bot.
2
- fatal: unable to access 'https://github.com/sak0a/ryco.git/': The requested URL returned error: 403`,timeout:0}))}},{value:`git-pull`,label:`Git pull (loading → result)`,fire:()=>{y.promise(new Promise(e=>{window.setTimeout(e,2400)}),{loading:{title:`Pulling...`},success:{title:`Pulled`,description:`Updated main from origin/main.`},error:{title:`Pull failed`,description:`Could not fast-forward.`}})}},{value:`slow-requests`,label:`Slow requests (expandable)`,fire:()=>{y.add({type:`warning`,title:`Some requests are slow`,description:`2 requests waiting longer than 5s.`,timeout:0,data:{expandableDescriptionTrigger:!0,expandableLabels:{expand:`Show requests`,collapse:`Hide requests`},expandableContent:(0,H.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:K.map(e=>(0,H.jsxs)(`li`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,H.jsx)(`span`,{className:`shrink-0 rounded-sm bg-muted px-1 py-0.5 font-mono text-[10px]`,children:e.method}),(0,H.jsx)(`span`,{className:`min-w-0 truncate font-mono text-[11px] text-muted-foreground`,children:e.requestId}),(0,H.jsx)(`span`,{className:`ml-auto shrink-0 text-[11px] text-muted-foreground`,children:e.startedAt})]},e.requestId))})}})}},{value:`reconnected`,label:`Connection restored`,fire:()=>{y.add({type:`success`,title:`Reconnected to Ryco Server`,description:`Connection restored at ${new Date().toLocaleTimeString()}.`,timeout:0,data:{dismissAfterVisibleMs:8e3,hideCopyButton:!0}})}},{value:`long-error`,label:`Error with long details`,fire:()=>{y.add({type:`error`,title:`Provider session crashed`,description:`The provider session exited unexpectedly with code 137 while processing the turn. Last stderr output: FATAL ERROR: Reached heap limit — allocation failed, JavaScript heap out of memory. Restart the session or reduce the attached context, then try again.`,timeout:0})}}],Y=[`pr-checks-passed`,`provider-update`,`git-failed`];function be(){Y.forEach((e,t)=>{let n=J.find(t=>t.value===e);n&&window.setTimeout(()=>n.fire(),t*350)})}function xe(){let e=(0,z.c)(17),[t,n]=(0,R.useState)(J[0]?.value??``),r;e[0]===t?r=e[1]:(r=J.find(e=>e.value===t)??J[0],e[0]=t,e[1]=r);let i=r,a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=e=>{typeof e==`string`&&n(e)},e[2]=a):a=e[2];let o=i?.label,s;e[3]===o?s=e[4]:(s=(0,H.jsx)(j,{className:`w-full sm:w-56`,"aria-label":`Notification sample`,children:(0,H.jsx)(M,{children:o})}),e[3]=o,e[4]=s);let c;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,H.jsx)(ee,{align:`end`,alignItemWithTrigger:!1,children:J.map(Se)}),e[5]=c):c=e[5];let l;e[6]!==t||e[7]!==s?(l=(0,H.jsxs)(N,{value:t,onValueChange:a,children:[s,c]}),e[6]=t,e[7]=s,e[8]=l):l=e[8];let u;e[9]===i?u=e[10]:(u=(0,H.jsx)(E,{"aria-label":`Show test notification`,size:`xs`,onClick:()=>i?.fire(),children:`Show`}),e[9]=i,e[10]=u);let d;e[11]!==l||e[12]!==u?(d=(0,H.jsx)(L,{title:`Test notification`,description:`Preview the notification design with realistic samples. Nothing is sent or changed.`,control:(0,H.jsxs)(`div`,{className:`flex w-full items-center gap-2 sm:w-auto`,children:[l,u]})}),e[11]=l,e[12]=u,e[13]=d):d=e[13];let f;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,H.jsx)(L,{title:`Notification stack`,description:`Fire a short burst to preview stacking, peeking, and hover expansion.`,control:(0,H.jsx)(E,{size:`xs`,variant:`outline`,onClick:be,children:`Show stack`})}),e[14]=f):f=e[14];let p;return e[15]===d?p=e[16]:(p=(0,H.jsxs)(I,{title:`Notifications`,children:[d,f]}),e[15]=d,e[16]=p),p}function Se(e){return(0,H.jsx)(te,{hideIndicator:!0,value:e.value,children:e.label},e.value)}function X(e){if(!Number.isFinite(e)||e<=0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n>=10||r===0?n.toFixed(0):n.toFixed(1)} ${t[r]}`}function Z(e){return!Number.isFinite(e)||e<=0?`0 ms`:e<1e3?`${Math.round(e)} ms`:e<6e4?`${(e/1e3).toFixed(+(e<1e4))} s`:`${(e/6e4).toFixed(1)} min`}function Ce(e){return e===void 0||!Number.isFinite(e)?`n/a`:`${Math.max(0,Math.min(100,e)).toFixed(1)}%`}function Q(e,t=Date.now()){let n=Date.parse(e);if(!Number.isFinite(n))return e;let r=Math.max(0,t-n);return r<1e3?`just now`:r<6e4?`${Math.floor(r/1e3)}s ago`:r<36e5?`${Math.floor(r/6e4)}m ago`:r<864e5?`${Math.floor(r/36e5)}h ago`:`${Math.floor(r/864e5)}d ago`}function we(e){return e.map(e=>({label:e.sampledAt,value:e.memory.rssBytes}))}function Te(e){return e.map(e=>({label:e.sampledAt,value:e.cpu.utilizationPercent??0}))}function Ee(e){return e.map(e=>({label:e.label,value:e.count}))}function De(e){return e.slice(0,8).map(e=>({label:e.name,value:e.count}))}function Oe(e){let t=e.failures.latest[0];return t?t.message:`No failures`}var ke=5e3;function Ae(e){let t=(0,z.c)(33),{points:n,formatValue:r}=e,i;bb0:{if(n.length===0){i=``;break bb0}let e;t[0]===n?e=t[1]:(e=Math.max(...n.map(je),1),t[0]=n,t[1]=e);let r=e,a;if(t[2]!==r||t[3]!==n){let e;t[5]!==r||t[6]!==n.length?(e=(e,t)=>{let i=n.length===1?320:t/(n.length-1)*320,a=96-e.value/r*84-6;return`${t===0?`M`:`L`}${i.toFixed(2)},${a.toFixed(2)}`},t[5]=r,t[6]=n.length,t[7]=e):e=t[7],a=n.map(e).join(` `),t[2]=r,t[3]=n,t[4]=a}else a=t[4];i=a}let a=i,o,s,c,l,u;if(t[8]!==r||t[9]!==n){let e=n.at(-1)?.value??0;u=`min-w-0`,c=`mb-2 flex items-baseline justify-between gap-3`,t[15]===n.length?l=t[16]:(l=(0,H.jsxs)(`span`,{className:`font-mono text-[11px] text-muted-foreground/70`,children:[n.length,` samples`]}),t[15]=n.length,t[16]=l),o=`font-mono text-xs text-foreground`,s=r(e),t[8]=r,t[9]=n,t[10]=o,t[11]=s,t[12]=c,t[13]=l,t[14]=u}else o=t[10],s=t[11],c=t[12],l=t[13],u=t[14];let d;t[17]!==o||t[18]!==s?(d=(0,H.jsx)(`span`,{className:o,children:s}),t[17]=o,t[18]=s,t[19]=d):d=t[19];let f;t[20]!==c||t[21]!==l||t[22]!==d?(f=(0,H.jsxs)(`div`,{className:c,children:[l,d]}),t[20]=c,t[21]=l,t[22]=d,t[23]=f):f=t[23];let p;t[24]===a?p=t[25]:(p=(0,H.jsx)(`path`,{d:a,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,vectorEffect:`non-scaling-stroke`}),t[24]=a,t[25]=p);let m;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,H.jsx)(`line`,{x1:`0`,y1:95,x2:320,y2:95,className:`stroke-border`}),t[26]=m):m=t[26];let h;t[27]===p?h=t[28]:(h=(0,H.jsxs)(`svg`,{viewBox:`0 0 320 96`,className:`h-24 w-full overflow-visible text-info`,role:`img`,"aria-label":`Diagnostics history chart`,children:[p,m]}),t[27]=p,t[28]=h);let g;return t[29]!==h||t[30]!==u||t[31]!==f?(g=(0,H.jsxs)(`div`,{className:u,children:[f,h]}),t[29]=h,t[30]=u,t[31]=f,t[32]=g):g=t[32],g}function je(e){return e.value}function Me(e){let t=(0,z.c)(12),{points:n,formatValue:r}=e,i=r===void 0?String:r,a;t[0]===n?a=t[1]:(a=Math.max(...n.map(Ne),1),t[0]=n,t[1]=a);let o=a;if(n.length===0){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,H.jsx)(`p`,{className:`px-4 py-4 text-muted-foreground text-sm`,children:`No data yet.`}),t[2]=e):e=t[2],e}let s;if(t[3]!==i||t[4]!==o||t[5]!==n){let e;t[7]!==i||t[8]!==o?(e=e=>(0,H.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_5rem] items-center gap-3 px-4 py-2.5`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`div`,{className:`mb-1 truncate text-[12px] font-medium`,children:e.label}),(0,H.jsx)(`div`,{className:`h-1.5 overflow-hidden rounded-full bg-muted`,children:(0,H.jsx)(`div`,{className:`h-full rounded-full bg-info`,style:{width:`${Math.max(4,e.value/o*100)}%`}})})]}),(0,H.jsx)(`div`,{className:`text-right font-mono text-[11px] text-muted-foreground`,children:i(e.value)})]},e.label),t[7]=i,t[8]=o,t[9]=e):e=t[9],s=n.map(e),t[3]=i,t[4]=o,t[5]=n,t[6]=s}else s=t[6];let c;return t[10]===s?c=t[11]:(c=(0,H.jsx)(`div`,{className:`divide-y divide-border/60`,children:s}),t[10]=s,t[11]=c),c}function Ne(e){return e.value}function $(e){let t=(0,z.c)(10),{label:n,value:r,detail:i}=e,a;t[0]===n?a=t[1]:(a=(0,H.jsx)(`div`,{className:`truncate text-[11px] font-medium text-muted-foreground uppercase tracking-[0.08em]`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=(0,H.jsx)(`div`,{className:`mt-1 truncate text-[15px] font-semibold text-foreground`,children:r}),t[2]=r,t[3]=o);let s;t[4]===i?s=t[5]:(s=i?(0,H.jsx)(`div`,{className:`mt-0.5 truncate text-[11px] text-muted-foreground`,children:i}):null,t[4]=i,t[5]=s);let c;return t[6]!==a||t[7]!==o||t[8]!==s?(c=(0,H.jsxs)(`div`,{className:`min-w-0 border-border/60 border-t px-4 py-3 first:border-t-0 sm:px-5`,children:[a,o,s]}),t[6]=a,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function Pe(e){let t=(0,z.c)(12),{label:n,value:r,detail:i}=e,a;t[0]===n?a=t[1]:(a=(0,H.jsx)(`div`,{className:`text-[12px] font-medium text-foreground`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=(0,H.jsx)(`div`,{className:`font-mono text-[12px] text-foreground`,children:r}),t[2]=r,t[3]=o);let s;t[4]===i?s=t[5]:(s=(0,H.jsx)(`div`,{className:`mt-0.5 text-[11px] text-muted-foreground`,children:i}),t[4]=i,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,H.jsxs)(`div`,{className:`min-w-0`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,H.jsxs)(`div`,{className:`grid gap-1 border-border/60 border-t px-4 py-3 first:border-t-0 sm:grid-cols-[11rem_minmax(0,1fr)] sm:px-5`,children:[a,c]}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}function Fe(e){let t=(0,z.c)(5),{value:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,H.jsx)(`summary`,{className:`cursor-pointer select-none text-[11px] text-muted-foreground hover:text-foreground`,children:`raw`}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=JSON.stringify(n,null,2),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,H.jsxs)(`details`,{className:`group`,children:[r,(0,H.jsx)(`pre`,{className:`mt-2 max-h-64 overflow-auto rounded-md bg-muted/60 p-3 text-[11px] leading-relaxed`,children:i})]}),t[3]=i,t[4]=a),a}function Ie(e){let t=(0,z.c)(5),{spans:n}=e;if(n.length===0){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,H.jsx)(`p`,{className:`px-4 py-4 text-muted-foreground text-sm`,children:`No spans retained yet.`}),t[0]=e):e=t[0],e}let r;t[1]===n?r=t[2]:(r=n.slice(0,10).map(Le),t[1]=n,t[2]=r);let i;return t[3]===r?i=t[4]:(i=(0,H.jsx)(`div`,{className:`divide-y divide-border/60`,children:r}),t[3]=r,t[4]=i),i}function Le(e){return(0,H.jsxs)(`div`,{className:`grid gap-2 px-4 py-3 sm:grid-cols-[minmax(0,1fr)_6rem_5rem] sm:items-start`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`truncate text-[13px] font-medium`,children:e.name}),(0,H.jsx)(F,{size:`sm`,variant:e.status===`success`?`outline`:`error`,children:e.status})]}),(0,H.jsxs)(`div`,{className:`mt-1 truncate font-mono text-[11px] text-muted-foreground`,children:[e.source,` / `,e.kind,` / `,e.spanId]}),e.failureMessage?(0,H.jsx)(`div`,{className:`mt-1 line-clamp-2 text-[11px] text-destructive`,children:e.failureMessage}):null,(0,H.jsx)(`div`,{className:`mt-2`,children:(0,H.jsx)(Fe,{value:e})})]}),(0,H.jsx)(`div`,{className:`font-mono text-[11px] text-muted-foreground sm:text-right`,children:Z(e.durationMs)}),(0,H.jsx)(`div`,{className:`font-mono text-[11px] text-muted-foreground sm:text-right`,children:Q(e.endTime)})]},e.id)}function Re(e){let t=(0,z.c)(9),{memorySeries:n,cpuSeries:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,H.jsx)(`div`,{className:`mb-1 text-[12px] font-semibold`,children:`RSS memory`}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,H.jsxs)(`div`,{className:`min-w-0 p-4`,children:[i,(0,H.jsx)(Ae,{points:n,formatValue:X})]}),t[1]=n,t[2]=a);let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,H.jsx)(`div`,{className:`mb-1 text-[12px] font-semibold`,children:`CPU utilization`}),t[3]=o):o=t[3];let s;t[4]===r?s=t[5]:(s=(0,H.jsxs)(`div`,{className:`min-w-0 p-4`,children:[o,(0,H.jsx)(Ae,{points:r,formatValue:ze})]}),t[4]=r,t[5]=s);let c;return t[6]!==a||t[7]!==s?(c=(0,H.jsx)(I,{title:`Resource history`,children:(0,H.jsxs)(`div`,{className:`grid gap-0 divide-y divide-border/60 lg:grid-cols-2 lg:divide-x lg:divide-y-0`,children:[a,s]})}),t[6]=a,t[7]=s,t[8]=c):c=t[8],c}function ze(e){return`${e.toFixed(1)}%`}function Be(e){let t=(0,z.c)(25),{snapshot:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,H.jsx)(`div`,{className:`border-border/60 border-b px-4 py-2 text-[12px] font-semibold`,children:`Top span names`}),t[0]=r):r=t[0];let i;t[1]===n?.tracing.topSpanNames?i=t[2]:(i=n?.tracing.topSpanNames??[],t[1]=n?.tracing.topSpanNames,t[2]=i);let a;t[3]===i?a=t[4]:(a=De(i),t[3]=i,t[4]=a);let o;t[5]===a?o=t[6]:(o=(0,H.jsxs)(`div`,{className:`min-w-0`,children:[r,(0,H.jsx)(Me,{points:a})]}),t[5]=a,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,H.jsx)(`div`,{className:`border-border/60 border-b px-4 py-2 text-[12px] font-semibold`,children:`Duration buckets`}),t[7]=s):s=t[7];let c;t[8]===n?.tracing.durationBuckets?c=t[9]:(c=n?.tracing.durationBuckets??[],t[8]=n?.tracing.durationBuckets,t[9]=c);let l;t[10]===c?l=t[11]:(l=Ee(c),t[10]=c,t[11]=l);let u;t[12]===l?u=t[13]:(u=(0,H.jsxs)(`div`,{className:`min-w-0`,children:[s,(0,H.jsx)(Me,{points:l})]}),t[12]=l,t[13]=u);let d;t[14]!==o||t[15]!==u?(d=(0,H.jsxs)(`div`,{className:`grid gap-0 divide-y divide-border/60 lg:grid-cols-2 lg:divide-x lg:divide-y-0`,children:[o,u]}),t[14]=o,t[15]=u,t[16]=d):d=t[16];let f;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,H.jsx)(`div`,{className:`border-border/60 border-b px-4 py-2 text-[12px] font-semibold`,children:`Slowest spans`}),t[17]=f):f=t[17];let p;t[18]===n?.tracing.slowestSpans?p=t[19]:(p=n?.tracing.slowestSpans??[],t[18]=n?.tracing.slowestSpans,t[19]=p);let m;t[20]===p?m=t[21]:(m=(0,H.jsxs)(`div`,{className:`border-border/60 border-t`,children:[f,(0,H.jsx)(Ie,{spans:p})]}),t[20]=p,t[21]=m);let h;return t[22]!==m||t[23]!==d?(h=(0,H.jsxs)(I,{title:`Tracing diagnostics`,children:[d,m]}),t[22]=m,t[23]=d,t[24]=h):h=t[24],h}function Ve(e){let t=(0,z.c)(10),{snapshot:n,nowMs:r}=e,i;if(t[0]!==r||t[1]!==n?.failures.latest){let e;t[3]===r?e=t[4]:(e=e=>(0,H.jsxs)(`div`,{className:`grid gap-2 px-4 py-3 sm:grid-cols-[minmax(0,1fr)_6rem]`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,H.jsx)(F,{size:`sm`,variant:`error`,children:e.category}),(0,H.jsx)(`span`,{className:`truncate text-[13px] font-medium`,children:e.message})]}),(0,H.jsxs)(`div`,{className:`mt-1 truncate font-mono text-[11px] text-muted-foreground`,children:[e.source,` / `,e.signature]}),(0,H.jsx)(`div`,{className:`mt-2`,children:(0,H.jsx)(Fe,{value:e.raw??e})})]}),(0,H.jsx)(`div`,{className:`font-mono text-[11px] text-muted-foreground sm:text-right`,children:Q(e.occurredAt,r)})]},e.id),t[3]=r,t[4]=e),i=(n?.failures.latest??[]).slice(0,8).map(e),t[0]=r,t[1]=n?.failures.latest,t[2]=i}else i=t[2];let a;t[5]===n?a=t[6]:(a=n&&n.failures.latest.length===0?(0,H.jsx)(`p`,{className:`px-4 py-4 text-muted-foreground text-sm`,children:`No failures retained.`}):null,t[5]=n,t[6]=a);let o;return t[7]!==i||t[8]!==a?(o=(0,H.jsx)(I,{title:`Failures`,children:(0,H.jsxs)(`div`,{className:`divide-y divide-border/60`,children:[i,a]})}),t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function He(e){let t=(0,z.c)(27),{snapshot:n,slowRpcAcks:r,nowMs:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,H.jsx)(`div`,{className:`border-border/60 border-b px-4 py-2 text-[12px] font-semibold`,children:`Providers`}),t[0]=a):a=t[0];let o;t[1]===n?.liveProcesses.providers?o=t[2]:(o=n?.liveProcesses.providers??[],t[1]=n?.liveProcesses.providers,t[2]=o);let s;t[3]===o?s=t[4]:(s=o.map(We),t[3]=o,t[4]=s);let c;t[5]===s?c=t[6]:(c=(0,H.jsxs)(`div`,{className:`min-w-0`,children:[a,(0,H.jsx)(`div`,{className:`divide-y divide-border/60`,children:s})]}),t[5]=s,t[6]=c);let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,H.jsx)(`div`,{className:`border-border/60 border-b px-4 py-2 text-[12px] font-semibold`,children:`Terminals and slow RPCs`}),t[7]=l):l=t[7];let u;t[8]===n?.liveProcesses.terminals?u=t[9]:(u=n?.liveProcesses.terminals??[],t[8]=n?.liveProcesses.terminals,t[9]=u);let d;t[10]===u?d=t[11]:(d=u.map(Ue),t[10]=u,t[11]=d);let f;if(t[12]!==i||t[13]!==r){let e;t[15]===i?e=t[16]:(e=e=>(0,H.jsxs)(`div`,{className:`px-4 py-2.5`,children:[(0,H.jsx)(`div`,{className:`truncate text-[13px] font-medium`,children:e.tag}),(0,H.jsxs)(`div`,{className:`mt-1 font-mono text-[11px] text-muted-foreground`,children:[`slow ack / `,Q(e.startedAt,i)]})]},e.requestId),t[15]=i,t[16]=e),f=r.map(e),t[12]=i,t[13]=r,t[14]=f}else f=t[14];let p;t[17]!==r.length||t[18]!==n?.liveProcesses.terminals.length?(p=(n?.liveProcesses.terminals.length??0)===0&&r.length===0?(0,H.jsx)(`p`,{className:`px-4 py-4 text-muted-foreground text-sm`,children:`No live terminal or slow RPC activity.`}):null,t[17]=r.length,t[18]=n?.liveProcesses.terminals.length,t[19]=p):p=t[19];let m;t[20]!==d||t[21]!==f||t[22]!==p?(m=(0,H.jsxs)(`div`,{className:`min-w-0`,children:[l,(0,H.jsxs)(`div`,{className:`divide-y divide-border/60`,children:[d,f,p]})]}),t[20]=d,t[21]=f,t[22]=p,t[23]=m):m=t[23];let h;return t[24]!==m||t[25]!==c?(h=(0,H.jsx)(I,{title:`Live activity`,children:(0,H.jsxs)(`div`,{className:`grid gap-0 divide-y divide-border/60 lg:grid-cols-2 lg:divide-x lg:divide-y-0`,children:[c,m]})}),t[24]=m,t[25]=c,t[26]=h):h=t[26],h}function Ue(e){return(0,H.jsxs)(`div`,{className:`px-4 py-2.5`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,H.jsx)(`span`,{className:`truncate text-[13px] font-medium`,children:e.terminalId}),(0,H.jsx)(F,{size:`sm`,variant:e.status===`error`?`error`:`outline`,children:e.status})]}),(0,H.jsxs)(`div`,{className:`mt-1 truncate font-mono text-[11px] text-muted-foreground`,children:[`pid `,e.pid??`n/a`,` / subprocess`,` `,e.hasRunningSubprocess?`yes`:`no`]})]},`${e.threadId}:${e.terminalId}`)}function We(e){return(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3 px-4 py-2.5`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`div`,{className:`truncate text-[13px] font-medium`,children:e.displayName??e.instanceId}),(0,H.jsx)(`div`,{className:`truncate font-mono text-[11px] text-muted-foreground`,children:e.driver})]}),(0,H.jsx)(F,{size:`sm`,variant:e.status===`error`?`error`:e.status===`warning`?`warning`:`outline`,children:e.status})]},e.instanceId)}function Ge(e){let t=(0,z.c)(57),{snapshot:n,memorySeries:r,cpuSeries:i,slowRpcAcks:a,latestFailure:o,nowMs:s}=e,c;t[0]===n?c=t[1]:(c=n?Z(n.uptimeMs):`n/a`,t[0]=n,t[1]=c);let l;t[2]!==s||t[3]!==n?(l=n?`Started ${Q(n.serverStartedAt,s)}`:void 0,t[2]=s,t[3]=n,t[4]=l):l=t[4];let u;t[5]!==c||t[6]!==l?(u=(0,H.jsx)($,{label:`Uptime`,value:c,detail:l}),t[5]=c,t[6]=l,t[7]=u):u=t[7];let d;t[8]===n?d=t[9]:(d=n?X(n.resources.current.memory.rssBytes):`n/a`,t[8]=n,t[9]=d);let f;t[10]===n?f=t[11]:(f=n?`${X(n.resources.current.memory.heapUsedBytes)} heap used`:void 0,t[10]=n,t[11]=f);let p;t[12]!==d||t[13]!==f?(p=(0,H.jsx)($,{label:`Memory`,value:d,detail:f}),t[12]=d,t[13]=f,t[14]=p):p=t[14];let m;t[15]===n?m=t[16]:(m=n?Ce(n.resources.current.cpu.utilizationPercent):`n/a`,t[15]=n,t[16]=m);let h;t[17]===n?h=t[18]:(h=n?.resources.current.eventLoopDelayMs===void 0?void 0:`${Z(n.resources.current.eventLoopDelayMs)} event loop delay`,t[17]=n,t[18]=h);let g;t[19]!==m||t[20]!==h?(g=(0,H.jsx)($,{label:`CPU`,value:m,detail:h}),t[19]=m,t[20]=h,t[21]=g):g=t[21];let _;t[22]===n?.liveProcesses.providers?_=t[23]:(_=n?.liveProcesses.providers.filter(Ke).length??0,t[22]=n?.liveProcesses.providers,t[23]=_);let v=`${_} providers`,y=`${n?.liveProcesses.terminals.length??0} terminal sessions`,b;t[24]!==v||t[25]!==y?(b=(0,H.jsx)($,{label:`Activity`,value:v,detail:y}),t[24]=v,t[25]=y,t[26]=b):b=t[26];let x=`${n?.tracing.retainedSpanCount??0} spans`,S=n?`${n.limits.fileTailBytes/1024} KB file tail`:void 0,C;t[27]!==x||t[28]!==S?(C=(0,H.jsx)($,{label:`Tracing`,value:x,detail:S}),t[27]=x,t[28]=S,t[29]=C):C=t[29];let w;t[30]===o?w=t[31]:(w=(0,H.jsx)($,{label:`Latest failure`,value:o}),t[30]=o,t[31]=w);let T;t[32]!==b||t[33]!==C||t[34]!==w||t[35]!==u||t[36]!==p||t[37]!==g?(T=(0,H.jsx)(I,{title:`Overview`,children:(0,H.jsxs)(`div`,{className:`grid sm:grid-cols-2 lg:grid-cols-3`,children:[u,p,g,b,C,w]})}),t[32]=b,t[33]=C,t[34]=w,t[35]=u,t[36]=p,t[37]=g,t[38]=T):T=t[38];let E;t[39]!==i||t[40]!==r?(E=(0,H.jsx)(Re,{memorySeries:r,cpuSeries:i}),t[39]=i,t[40]=r,t[41]=E):E=t[41];let D;t[42]===n?D=t[43]:(D=(0,H.jsx)(Be,{snapshot:n}),t[42]=n,t[43]=D);let O;t[44]!==s||t[45]!==n?(O=(0,H.jsx)(Ve,{snapshot:n,nowMs:s}),t[44]=s,t[45]=n,t[46]=O):O=t[46];let k;t[47]!==s||t[48]!==a||t[49]!==n?(k=(0,H.jsx)(He,{snapshot:n,slowRpcAcks:a,nowMs:s}),t[47]=s,t[48]=a,t[49]=n,t[50]=k):k=t[50];let A;return t[51]!==T||t[52]!==E||t[53]!==D||t[54]!==O||t[55]!==k?(A=(0,H.jsxs)(H.Fragment,{children:[T,E,D,O,k]}),t[51]=T,t[52]=E,t[53]=D,t[54]=O,t[55]=k,t[56]=A):A=t[56],A}function Ke(e){return e.enabled}function qe(e){let t=(0,z.c)(14),{snapshot:n,error:r}=e;if(!r&&(!n||n.warnings.length===0))return null;let i=r?`error`:`warning`,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,H.jsx)(T,{}),t[0]=a):a=t[0];let o=r?`Diagnostics refresh failed`:`Diagnostics warnings`,s;t[1]===o?s=t[2]:(s=(0,H.jsx)(O,{children:o}),t[1]=o,t[2]=s);let c;t[3]===r?c=t[4]:(c=r?(0,H.jsx)(`span`,{children:r}):null,t[3]=r,t[4]=c);let l;t[5]===n?.warnings?l=t[6]:(l=n?.warnings.slice(0,4).map(Je),t[5]=n?.warnings,t[6]=l);let u;t[7]!==c||t[8]!==l?(u=(0,H.jsxs)(k,{children:[c,l]}),t[7]=c,t[8]=l,t[9]=u):u=t[9];let d;return t[10]!==i||t[11]!==s||t[12]!==u?(d=(0,H.jsxs)(A,{variant:i,children:[a,s,u]}),t[10]=i,t[11]=s,t[12]=u,t[13]=d):d=t[13],d}function Je(e){return(0,H.jsxs)(`span`,{children:[e.message,e.count?` (${e.count})`:``]},`${e.code}:${e.source??``}`)}function Ye({presentation:e=`performance`}){let[t,n]=(0,R.useState)(null),[r,i]=(0,R.useState)(null),[a,o]=(0,R.useState)(!0),[s,d]=(0,R.useState)(!1),f=(0,R.useRef)(!1),m=(0,R.useRef)(!1),h=(0,R.useRef)(!1),g=l(),_=c(e=>e.byId),y=Date.now(),b=(0,R.useCallback)(async(e=!1)=>{if(!(!e&&document.visibilityState!==`visible`)&&!f.current){f.current=!0,o(e=>e&&!m.current);try{let e=await u().server.getDiagnosticsSnapshot();if(h.current)return;n(e),i(null),m.current=!0}catch(e){if(h.current)return;i(e instanceof Error?e.message:`Unable to refresh diagnostics.`)}finally{f.current=!1,h.current||o(!1)}}},[]);(0,R.useEffect)(()=>{if(h.current=!1,b(),s)return()=>{h.current=!0};let e=null,t=()=>{e!==null&&(window.clearInterval(e),e=null)},n=()=>{document.visibilityState===`visible`&&e===null&&(e=window.setInterval(()=>void b(),ke))};n();let r=()=>{if(document.visibilityState===`visible`){b(),n();return}t()};return document.addEventListener(`visibilitychange`,r),()=>{h.current=!0,t(),document.removeEventListener(`visibilitychange`,r)}},[s,b]);let x=(0,R.useMemo)(()=>we(t?.resources.history??[]),[t]),T=(0,R.useMemo)(()=>Te(t?.resources.history??[]),[t]),D=t?Oe(t):`No snapshot`,O=t?.liveProcesses.providers.filter(e=>e.enabled).length??0,k=t?.liveProcesses.terminals.filter(e=>e.status===`starting`||e.status===`running`).length??0,A=Object.values(_),ee=A.filter(e=>e.connectionState===`connected`).length,te=A.filter(e=>e.connectionState===`connecting`).length,j=A.length===0?`No tracked clients`:`${ee} connected${te>0?` · ${te} connecting`:``}`,M=t?.tracing.slowestSpans.find(e=>e.source===`server`)??null,N=g[0]??null,P=t?.performance??null,F=P?.local.turnQuiescenceAvgMs??null,L=P?.local.checkpointDurationP95Ms??null,re=P?.local.latestThreadSnapshotDurationMs??null,z=P?.local.threadSnapshotDurationP95Ms??null;return(0,H.jsxs)(ne,{children:[(0,H.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h1`,{className:`text-base font-semibold`,children:`Diagnostics`}),(0,H.jsx)(`p`,{className:`mt-1 text-muted-foreground text-xs`,children:t?`Updated ${Q(t.generatedAt,y)}`:`Waiting for snapshot`})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsxs)(E,{size:`xs`,variant:`outline`,onClick:()=>d(e=>!e),children:[s?(0,H.jsx)(C,{className:`size-3.5`}):(0,H.jsx)(S,{className:`size-3.5`}),s?`Resume`:`Pause`]}),(0,H.jsxs)(E,{size:`xs`,variant:`outline`,onClick:()=>void b(!0),disabled:a,children:[(0,H.jsx)(w,{className:p(`size-3.5`,a&&`animate-spin`)}),`Refresh`]})]})]}),(0,H.jsx)(qe,{snapshot:t,error:r}),null,e===`phone-legacy`?null:(0,H.jsx)(xe,{}),e===`phone-legacy`?(0,H.jsx)(Ge,{snapshot:t,memorySeries:x,cpuSeries:T,slowRpcAcks:g,latestFailure:D,nowMs:y}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(I,{title:`Performance now`,children:(0,H.jsxs)(`div`,{className:`grid sm:grid-cols-2 lg:grid-cols-3`,children:[(0,H.jsx)($,{label:`Backend CPU`,value:t?Ce(t.resources.current.cpu.utilizationPercent):`n/a`,detail:t?`Process uptime ${Z(t.uptimeMs)}`:void 0}),(0,H.jsx)($,{label:`RSS / heap`,value:t?X(t.resources.current.memory.rssBytes):`n/a`,detail:t?`${X(t.resources.current.memory.heapUsedBytes)} heap used`:void 0}),(0,H.jsx)($,{label:`Event-loop delay`,value:t?.resources.current.eventLoopDelayMs===void 0?`n/a`:Z(t.resources.current.eventLoopDelayMs),detail:`Measured once for this requested snapshot`}),(0,H.jsx)($,{label:`Providers / terminals`,value:`${O} enabled providers`,detail:`${k} active terminals`}),(0,H.jsx)($,{label:`Turn quiescence`,value:F===null?`No samples`:Z(F),detail:`Rolling average`}),(0,H.jsx)($,{label:`Checkpoint duration`,value:L===null?`No samples`:Z(L),detail:`Rolling p95`}),(0,H.jsx)($,{label:`WebSocket state`,value:j,detail:`${P?.local.wsReconnectCount??0} reconnects in this server process`}),(0,H.jsx)($,{label:`Thread snapshot`,value:re===null?`No samples`:Z(re),detail:z===null?`Latest successful subscription snapshot`:`${Z(z)} rolling p95`}),(0,H.jsx)($,{label:`Latest failure`,value:D})]})}),(0,H.jsxs)(I,{title:`Why was this slow?`,children:[(0,H.jsx)(Pe,{label:`Thread snapshot`,value:re===null?`No thread snapshot timing yet`:`${Z(re)} latest`,detail:z===null?`Replay duration and payload bytes are not collected because the current transport has no zero-copy attribution hook.`:`${Z(z)} rolling p95. Replay duration and payload bytes are not collected because the current transport has no zero-copy attribution hook.`}),(0,H.jsx)(Pe,{label:`Queue pressure`,value:P?`${P.queues.runtimeDepthTotal+P.queues.liveBufferDepthTotal} queued now`:`No snapshot`,detail:P?`Largest runtime high-water ${P.queues.runtimeHighWaterMax}; live-buffer high-water ${P.queues.liveBufferHighWaterMax}; ${P.queues.liveBufferOverflowCount} overflows; replay depth ${P.queues.replayDepthMax}; replay lag ${P.queues.replayLagMax}; ${P.queues.providerLogDroppedRecords} provider log records dropped.`:`Runtime and replay queue evidence will appear after the first snapshot.`}),(0,H.jsx)(Pe,{label:`Slowest server stage`,value:M?`${M.name} · ${Z(M.durationMs)}`:`No retained spans`,detail:M?`Server span completed ${Q(M.endTime,y)}.`:`Tracing has not retained a server stage yet.`}),(0,H.jsx)(Pe,{label:`Current slow client RPC`,value:N?.tag??`No slow RPC acknowledgement in progress`,detail:N?`Exceeded its ${Z(N.thresholdMs)} acknowledgement threshold; started ${Q(N.startedAt,y)}.`:`Only RPCs that cross the existing client acknowledgement threshold appear here.`}),(0,H.jsx)(Pe,{label:`Reconnect / resume`,value:j,detail:`${P?.local.wsReconnectCount??0} server-side reconnects. Per-environment push gaps and recovery state are in Advanced diagnostics.`}),(0,H.jsx)(Pe,{label:`Recent failure`,value:t?.failures.latest[0]?.message??`No retained failures`,detail:t?.failures.latest[0]?`${t.failures.latest[0].source} · ${Q(t.failures.latest[0].occurredAt,y)}`:`No failure evidence is available for the current server process.`}),(0,H.jsx)(Pe,{label:`Trace persistence`,value:P?.traceSink?`${X(P.traceSink.bufferedBytes)} buffered`:`Health unavailable`,detail:P?.traceSink?`${X(P.traceSink.maxBufferedBytes)} cap; ${P.traceSink.droppedRecords} dropped records; ${P.traceSink.writeFailures} write failures; retry delay ${Z(P.traceSink.retryDelayMs)}.`:`This diagnostics service is not attached to the local trace-file sink.`})]}),(0,H.jsxs)(`details`,{className:`group/diagnostics`,children:[(0,H.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between rounded-xl border bg-card px-4 py-3 text-sm font-medium text-foreground shadow-sm/4 marker:hidden hover:bg-accent/30`,children:[`Advanced diagnostics`,(0,H.jsx)(v,{className:`size-4 text-muted-foreground transition-transform group-open/diagnostics:rotate-180 motion-reduce:transition-none`})]}),(0,H.jsxs)(`div`,{className:`mt-5 space-y-5`,children:[(0,H.jsx)(Re,{memorySeries:x,cpuSeries:T}),(0,H.jsx)(Be,{snapshot:t}),(0,H.jsx)(Ve,{snapshot:t,nowMs:y}),(0,H.jsx)(He,{snapshot:t,slowRpcAcks:g,nowMs:y}),(0,H.jsx)(G,{snapshot:t})]})]})]})]})}export{Ye as DiagnosticsSettings};
1
+ import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{t as r}from"./env-B4arEvJg.js";import{Bn as i,Gn as a,Kn as o,Xt as s,bn as c,jn as l,xn as u,yn as d}from"./runtime-CqhG6EOG.js";import{f,t as p}from"./utils-BPUctpTG.js";import{i as m,r as h}from"./branding-yW_ACj9l.js";import{t as g}from"./settingsDialogStore-DM98Sea0.js";import{f as _}from"./useRenderElement-DchFnsR8.js";import{t as v}from"./chevron-down-B7C6FKzM.js";import{i as y}from"./toast-Bnfw8LOb.js";import{t as b}from"./clipboard-copy-C4VV20QR.js";import{n as x,t as S}from"./play-DYDxlTKo.js";import{t as C}from"./refresh-cw-DopCMrtR.js";import{t as w}from"./triangle-alert-RL_T3KLo.js";import{t as T}from"./button-CXfaxtRp.js";import{t as E}from"./useCopyToClipboard-BTpWxumf.js";import{t as D}from"./toastHelpers-CSQRKo4F.js";import"./usePresentationTier-B_SCFvN7.js";import{i as O,r as k,t as A}from"./alert-DdU9OGtC.js";import{a as ee,i as te,o as j,s as M,t as N}from"./select-BB7zCkpA.js";import{r as P}from"./editorPreferences-C3i2Nkh2.js";import{t as F}from"./badge-CNPL77i3.js";import{i as I,n as ne,r as L}from"./settingsLayout-CS7P71tz.js";var re=_(`clipboard-check`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`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`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),R=e(t(),1),z=n(),ie=`[redacted]`,B=/(token|secret|password|passwd|credential|authorization|bearer|api[-_]?key|apikey|cookie|session[-_]?id|private[-_]?key|pairing[-_]?code|access[-_]?key|signature|email)/i;function ae(e){let t;try{t=new URL(e)}catch{return e}(t.username||t.password)&&(t.username=``,t.password=``);for(let e of t.searchParams.keys())B.test(e)&&t.searchParams.set(e,ie);return t.toString()}function oe(e){return V(e,!1)}function V(e,t){if(t)return e==null?e:ie;if(typeof e==`string`)return ae(e);if(Array.isArray(e))return e.map(e=>V(e,!1));if(typeof e==`object`&&e){let t={};for(let[n,r]of Object.entries(e))t[n]=V(r,B.test(n));return t}return e}function se(e){return oe({generatedAt:e.generatedAt,app:e.app,environments:e.environments.map(e=>({environmentId:e.environmentId,label:e.record?.label??null,connectionState:e.runtime?.connectionState??null,authState:e.runtime?.authState??null,role:e.runtime?.role??null,lastError:e.runtime?.lastError??null,lastErrorAt:e.runtime?.lastErrorAt??null,connectedAt:e.runtime?.connectedAt??null,disconnectedAt:e.runtime?.disconnectedAt??null,pushSequence:e.pushSequence})),providers:e.providers.map(e=>({instanceId:e.instanceId,driver:e.driver,enabled:e.enabled,installed:e.installed,version:e.version,status:e.status,availability:e.availability??`available`,authStatus:e.auth.status,authType:e.auth.type??null,message:e.message??null,unavailableReason:e.unavailableReason??null,checkedAt:e.checkedAt})),observability:e.observability?{logsDirectoryConfigured:e.observability.logsDirectoryPath.length>0,localTracingEnabled:e.observability.localTracingEnabled,otlpTracesEnabled:e.observability.otlpTracesEnabled,otlpMetricsEnabled:e.observability.otlpMetricsEnabled,localMetrics:e.observability.localMetrics?{turnQuiescenceAvgMs:e.observability.localMetrics.turnQuiescenceAvgMs,checkpointDurationP95Ms:e.observability.localMetrics.checkpointDurationP95Ms,wsReconnectCount:e.observability.localMetrics.wsReconnectCount,capturedAt:e.observability.localMetrics.capturedAt}:null}:null,performance:e.performance?{local:{turnQuiescenceAvgMs:e.performance.local.turnQuiescenceAvgMs,checkpointDurationP95Ms:e.performance.local.checkpointDurationP95Ms,latestThreadSnapshotDurationMs:e.performance.local.latestThreadSnapshotDurationMs,threadSnapshotDurationP95Ms:e.performance.local.threadSnapshotDurationP95Ms,wsReconnectCount:e.performance.local.wsReconnectCount,windowSampleCounts:{...e.performance.local.windowSampleCounts},capturedAt:e.performance.local.capturedAt},queues:{...e.performance.queues},traceSink:e.performance.traceSink?{...e.performance.traceSink}:null,snapshotCollectionDurationMs:e.performance.snapshotCollectionDurationMs}:null})}function ce(e){return JSON.stringify(e,null,2)}function le(e){return(e?.gapCount??0)>0}var H=f(),ue={connected:`bg-success`,connecting:`bg-warning`,error:`bg-destructive`,disconnected:`bg-muted-foreground/40`},de={ready:`bg-success`,warning:`bg-warning`,error:`bg-destructive`,disabled:`bg-muted-foreground/40`};function U(e){let t=(0,z.c)(4),{className:n}=e,r;t[0]===n?r=t[1]:(r=p(`inline-block size-2 shrink-0 rounded-full`,n),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,H.jsx)(`span`,{className:r,"aria-hidden":!0}),t[2]=r,t[3]=i),i}function W(e){if(!e)return`No push events observed yet.`;let t=[`last #${e.highestSequence??`—`}`,`${e.eventCount} events`,`${e.snapshotCount} snapshots`];return e.gapCount>0?t.push(`${e.gapCount} gap${e.gapCount===1?``:`s`}`):t.push(`no gaps`),t.join(` · `)}function fe(e){let t=(0,z.c)(25),{environmentId:n,record:r,runtime:i,pushSequence:a}=e,o=i?.connectionState??`disconnected`,s=r?.label??n,c=le(a),l=ue[o]??`bg-muted-foreground/40`,u;t[0]===l?u=t[1]:(u=(0,H.jsx)(U,{className:l}),t[0]=l,t[1]=u);let d;t[2]!==s||t[3]!==u?(d=(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[u,s]}),t[2]=s,t[3]=u,t[4]=d):d=t[4];let f=i?.authState?` · auth ${i.authState}`:``,m=i?.role?` · ${i.role}`:``,h;t[5]!==o||t[6]!==f||t[7]!==m?(h=(0,H.jsxs)(`span`,{className:`block`,children:[`WS `,o,f,m]}),t[5]=o,t[6]=f,t[7]=m,t[8]=h):h=t[8];let g=c?`text-warning`:`text-muted-foreground/70`,_;t[9]===g?_=t[10]:(_=p(`block`,g),t[9]=g,t[10]=_);let v;t[11]===a?v=t[12]:(v=W(a),t[11]=a,t[12]=v);let y;t[13]!==_||t[14]!==v?(y=(0,H.jsx)(`span`,{className:_,children:v}),t[13]=_,t[14]=v,t[15]=y):y=t[15];let b;t[16]===i?b=t[17]:(b=i?.lastError?(0,H.jsx)(`span`,{className:`block break-all text-destructive`,children:i.lastError}):null,t[16]=i,t[17]=b);let x;t[18]!==y||t[19]!==b||t[20]!==h?(x=(0,H.jsxs)(`span`,{className:`space-y-0.5`,children:[h,y,b]}),t[18]=y,t[19]=b,t[20]=h,t[21]=x):x=t[21];let S;return t[22]!==x||t[23]!==d?(S=(0,H.jsx)(L,{title:d,description:x}),t[22]=x,t[23]=d,t[24]=S):S=t[24],S}function G(e){let t=(0,z.c)(52),{snapshot:n}=e,l=d(ye),f=c(ve),p=s(_e),g=o(),_=a(),v=i(),x=n?.performance?.local??null,[S,C]=(0,R.useState)(!1),w;t[0]!==x||t[1]!==_?(w=_?{..._,...x?{localMetrics:x}:{}}:null,t[0]=x,t[1]=_,t[2]=w):w=t[2];let O=w,k;t[3]!==p||t[4]!==l||t[5]!==f?(k=[...new Set([...Object.keys(l),...Object.keys(f),...Object.keys(p)])].toSorted(),t[3]=p,t[4]=l,t[5]=f,t[6]=k):k=t[6];let A=k,ee;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(ee={onCopy:ge,onError:he},t[7]=ee):ee=t[7];let{copyToClipboard:te,isCopied:j}=E(ee),M;t[8]!==te||t[9]!==A||t[10]!==O||t[11]!==g||t[12]!==p||t[13]!==l||t[14]!==f||t[15]!==n?.performance?(M=()=>{let e=se({generatedAt:new Date().toISOString(),app:{version:m,stage:h,isElectron:r,userAgent:typeof navigator>`u`?null:navigator.userAgent},environments:A.map(e=>({environmentId:e,record:l[e]??null,runtime:f[e]??null,pushSequence:p[e]??null})),providers:g,observability:O,performance:n?.performance??null});te(ce(e),void 0)},t[8]=te,t[9]=A,t[10]=O,t[11]=g,t[12]=p,t[13]=l,t[14]=f,t[15]=n?.performance,t[16]=M):M=t[16],n?.performance;let N=M,F=_?.logsDirectoryPath??null,ne;t[17]!==v||t[18]!==F?(ne=()=>{if(!F)return;C(!0);let e=P(v??[]);if(!e){C(!1),y.add(D({type:`error`,title:`Could not open logs folder`,description:`No available editors found.`}));return}u().shell.openInEditor(F,e).catch(me).finally(()=>{C(!1)})},t[17]=v,t[18]=F,t[19]=ne):ne=t[19];let ie=ne,B;t[20]===j?B=t[21]:(B=j?(0,H.jsx)(re,{className:`size-3.5`}):(0,H.jsx)(b,{className:`size-3.5`}),t[20]=j,t[21]=B);let ae=j?`Copied`:`Copy debug bundle`,oe;t[22]!==N||t[23]!==B||t[24]!==ae?(oe=(0,H.jsxs)(T,{size:`xs`,variant:`outline`,onClick:N,children:[B,ae]}),t[22]=N,t[23]=B,t[24]=ae,t[25]=oe):oe=t[25];let V;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,H.jsx)(L,{title:`Application`,description:`Version ${m} · ${h}${r?` · Desktop`:` · Browser`}`}),t[26]=V):V=t[26];let le=F??`Resolving logs directory…`,ue=!F||S,de=S?`Opening…`:`Open logs folder`,U;t[27]!==ie||t[28]!==ue||t[29]!==de?(U=(0,H.jsx)(T,{size:`xs`,variant:`outline`,disabled:ue,onClick:ie,children:de}),t[27]=ie,t[28]=ue,t[29]=de,t[30]=U):U=t[30];let W;t[31]!==le||t[32]!==U?(W=(0,H.jsx)(L,{title:`Logs`,description:le,control:U}),t[31]=le,t[32]=U,t[33]=W):W=t[33];let G;t[34]!==W||t[35]!==oe?(G=(0,H.jsxs)(I,{title:`Diagnostics`,headerAction:oe,children:[V,W]}),t[34]=W,t[35]=oe,t[36]=G):G=t[36];let K;t[37]!==A||t[38]!==p||t[39]!==l||t[40]!==f?(K=A.length===0?(0,H.jsx)(L,{title:`No environments`,description:`No environment connections are tracked yet.`}):A.map(e=>(0,H.jsx)(fe,{environmentId:e,record:l[e]??null,runtime:f[e]??null,pushSequence:p[e]??null},e)),t[37]=A,t[38]=p,t[39]=l,t[40]=f,t[41]=K):K=t[41];let q;t[42]===K?q=t[43]:(q=(0,H.jsx)(I,{title:`Environments`,children:K}),t[42]=K,t[43]=q);let J;t[44]===g?J=t[45]:(J=g.length===0?(0,H.jsx)(L,{title:`No providers`,description:`No provider instances are configured.`}):g.map(pe),t[44]=g,t[45]=J);let Y;t[46]===J?Y=t[47]:(Y=(0,H.jsx)(I,{title:`Providers`,children:J}),t[46]=J,t[47]=Y);let be;return t[48]!==G||t[49]!==q||t[50]!==Y?(be=(0,H.jsxs)(H.Fragment,{children:[G,q,Y]}),t[48]=G,t[49]=q,t[50]=Y,t[51]=be):be=t[51],be}function pe(e){let t=e.unavailableReason??e.message??null;return(0,H.jsx)(L,{title:(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,H.jsx)(U,{className:de[e.status]??`bg-muted-foreground/40`}),e.displayName??e.instanceId]}),description:(0,H.jsxs)(`span`,{className:`space-y-0.5`,children:[(0,H.jsxs)(`span`,{className:`block`,children:[e.status,` · auth `,e.auth.status,e.version?` · v${e.version}`:``]}),t?(0,H.jsx)(`span`,{className:`block break-all text-muted-foreground/70`,children:t}):null]})},e.instanceId)}function me(e){y.add(D({type:`error`,title:`Could not open logs folder`,description:e instanceof Error?e.message:`Failed to open logs folder.`}))}function he(e){y.add(D({type:`error`,title:`Could not copy debug bundle`,description:e.message}))}function ge(){y.add({type:`success`,title:`Debug bundle copied`,description:`Secrets are redacted before export.`})}function _e(e){return e.byEnvironment}function ve(e){return e.byId}function ye(e){return e.byId}var K=[{method:`thread/snapshot`,requestId:`req_9f2c81d4a6`,startedAt:`12s ago`},{method:`git/status`,requestId:`req_c07b3e51fd`,startedAt:`9s ago`}];function q(e){y.update(e,{type:`loading`,title:`Updating Claude Code`,description:`Running provider update command.`,timeout:0,actionProps:void 0,data:{hideCopyButton:!0}}),window.setTimeout(()=>{y.update(e,{type:`success`,title:`Provider updated`,description:`New sessions will use the updated provider.`,timeout:0,data:{hideCopyButton:!0,dismissAfterVisibleMs:3e3}})},1800)}var J=[{value:`provider-update`,label:`Provider update available`,fire:()=>{let e=y.add(D({type:`warning`,title:`Update Available: Claude Code v2.1.4`,description:`Install the update now or review provider settings.`,timeout:0,actionProps:{children:`Update`,onClick:()=>q(e)},actionVariant:`default`,data:{hideCopyButton:!0,secondaryActionProps:{children:`Settings`,onClick:()=>g.getState().openSettings(`providers`)},secondaryActionVariant:`outline`}}))}},{value:`pr-checks-passed`,label:`PR checks passed`,fire:()=>{y.add({type:`success`,title:`Checks passed for PR #316`,description:`Redesign the notification toasts · 3273af68e412`,timeout:6e3,actionProps:{children:`Open PR`,onClick:()=>void 0},data:{actionVariant:`outline`}})}},{value:`git-push`,label:`Git push with follow-up action`,fire:()=>{y.add(D({type:`success`,title:`Pushed`,description:`3 commits pushed to origin/feat/notifications-toasts.`,timeout:0,actionProps:{children:`Open PR`,onClick:()=>void 0},actionVariant:`outline`,data:{dismissAfterVisibleMs:1e4}}))}},{value:`git-failed`,label:`Git action failed`,fire:()=>{y.add(D({type:`error`,title:`Action failed`,description:`remote: Permission to sak0a/ryco.git denied to deploy-bot.
2
+ fatal: unable to access 'https://github.com/sak0a/ryco.git/': The requested URL returned error: 403`,timeout:0}))}},{value:`git-pull`,label:`Git pull (loading → result)`,fire:()=>{y.promise(new Promise(e=>{window.setTimeout(e,2400)}),{loading:{title:`Pulling...`},success:{title:`Pulled`,description:`Updated main from origin/main.`},error:{title:`Pull failed`,description:`Could not fast-forward.`}})}},{value:`slow-requests`,label:`Slow requests (expandable)`,fire:()=>{y.add({type:`warning`,title:`Some requests are slow`,description:`2 requests waiting longer than 5s.`,timeout:0,data:{expandableDescriptionTrigger:!0,expandableLabels:{expand:`Show requests`,collapse:`Hide requests`},expandableContent:(0,H.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:K.map(e=>(0,H.jsxs)(`li`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,H.jsx)(`span`,{className:`shrink-0 rounded-sm bg-muted px-1 py-0.5 font-mono text-[10px]`,children:e.method}),(0,H.jsx)(`span`,{className:`min-w-0 truncate font-mono text-[11px] text-muted-foreground`,children:e.requestId}),(0,H.jsx)(`span`,{className:`ml-auto shrink-0 text-[11px] text-muted-foreground`,children:e.startedAt})]},e.requestId))})}})}},{value:`reconnected`,label:`Connection restored`,fire:()=>{y.add({type:`success`,title:`Reconnected to Ryco Server`,description:`Connection restored at ${new Date().toLocaleTimeString()}.`,timeout:0,data:{dismissAfterVisibleMs:8e3,hideCopyButton:!0}})}},{value:`long-error`,label:`Error with long details`,fire:()=>{y.add({type:`error`,title:`Provider session crashed`,description:`The provider session exited unexpectedly with code 137 while processing the turn. Last stderr output: FATAL ERROR: Reached heap limit — allocation failed, JavaScript heap out of memory. Restart the session or reduce the attached context, then try again.`,timeout:0})}}],Y=[`pr-checks-passed`,`provider-update`,`git-failed`];function be(){Y.forEach((e,t)=>{let n=J.find(t=>t.value===e);n&&window.setTimeout(()=>n.fire(),t*350)})}function xe(){let e=(0,z.c)(17),[t,n]=(0,R.useState)(J[0]?.value??``),r;e[0]===t?r=e[1]:(r=J.find(e=>e.value===t)??J[0],e[0]=t,e[1]=r);let i=r,a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=e=>{typeof e==`string`&&n(e)},e[2]=a):a=e[2];let o=i?.label,s;e[3]===o?s=e[4]:(s=(0,H.jsx)(j,{className:`w-full sm:w-56`,"aria-label":`Notification sample`,children:(0,H.jsx)(M,{children:o})}),e[3]=o,e[4]=s);let c;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,H.jsx)(ee,{align:`end`,alignItemWithTrigger:!1,children:J.map(Se)}),e[5]=c):c=e[5];let l;e[6]!==t||e[7]!==s?(l=(0,H.jsxs)(N,{value:t,onValueChange:a,children:[s,c]}),e[6]=t,e[7]=s,e[8]=l):l=e[8];let u;e[9]===i?u=e[10]:(u=(0,H.jsx)(T,{"aria-label":`Show test notification`,size:`xs`,onClick:()=>i?.fire(),children:`Show`}),e[9]=i,e[10]=u);let d;e[11]!==l||e[12]!==u?(d=(0,H.jsx)(L,{title:`Test notification`,description:`Preview the notification design with realistic samples. Nothing is sent or changed.`,control:(0,H.jsxs)(`div`,{className:`flex w-full items-center gap-2 sm:w-auto`,children:[l,u]})}),e[11]=l,e[12]=u,e[13]=d):d=e[13];let f;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,H.jsx)(L,{title:`Notification stack`,description:`Fire a short burst to preview stacking, peeking, and hover expansion.`,control:(0,H.jsx)(T,{size:`xs`,variant:`outline`,onClick:be,children:`Show stack`})}),e[14]=f):f=e[14];let p;return e[15]===d?p=e[16]:(p=(0,H.jsxs)(I,{title:`Notifications`,children:[d,f]}),e[15]=d,e[16]=p),p}function Se(e){return(0,H.jsx)(te,{hideIndicator:!0,value:e.value,children:e.label},e.value)}function X(e){if(!Number.isFinite(e)||e<=0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n>=10||r===0?n.toFixed(0):n.toFixed(1)} ${t[r]}`}function Z(e){return!Number.isFinite(e)||e<=0?`0 ms`:e<1e3?`${Math.round(e)} ms`:e<6e4?`${(e/1e3).toFixed(+(e<1e4))} s`:`${(e/6e4).toFixed(1)} min`}function Ce(e){return e===void 0||!Number.isFinite(e)?`n/a`:`${Math.max(0,Math.min(100,e)).toFixed(1)}%`}function Q(e,t=Date.now()){let n=Date.parse(e);if(!Number.isFinite(n))return e;let r=Math.max(0,t-n);return r<1e3?`just now`:r<6e4?`${Math.floor(r/1e3)}s ago`:r<36e5?`${Math.floor(r/6e4)}m ago`:r<864e5?`${Math.floor(r/36e5)}h ago`:`${Math.floor(r/864e5)}d ago`}function we(e){return e.map(e=>({label:e.sampledAt,value:e.memory.rssBytes}))}function Te(e){return e.map(e=>({label:e.sampledAt,value:e.cpu.utilizationPercent??0}))}function Ee(e){return e.map(e=>({label:e.label,value:e.count}))}function De(e){return e.slice(0,8).map(e=>({label:e.name,value:e.count}))}function Oe(e){let t=e.failures.latest[0];return t?t.message:`No failures`}var ke=5e3;function Ae(e){let t=(0,z.c)(33),{points:n,formatValue:r}=e,i;bb0:{if(n.length===0){i=``;break bb0}let e;t[0]===n?e=t[1]:(e=Math.max(...n.map(je),1),t[0]=n,t[1]=e);let r=e,a;if(t[2]!==r||t[3]!==n){let e;t[5]!==r||t[6]!==n.length?(e=(e,t)=>{let i=n.length===1?320:t/(n.length-1)*320,a=96-e.value/r*84-6;return`${t===0?`M`:`L`}${i.toFixed(2)},${a.toFixed(2)}`},t[5]=r,t[6]=n.length,t[7]=e):e=t[7],a=n.map(e).join(` `),t[2]=r,t[3]=n,t[4]=a}else a=t[4];i=a}let a=i,o,s,c,l,u;if(t[8]!==r||t[9]!==n){let e=n.at(-1)?.value??0;u=`min-w-0`,c=`mb-2 flex items-baseline justify-between gap-3`,t[15]===n.length?l=t[16]:(l=(0,H.jsxs)(`span`,{className:`font-mono text-[11px] text-muted-foreground/70`,children:[n.length,` samples`]}),t[15]=n.length,t[16]=l),o=`font-mono text-xs text-foreground`,s=r(e),t[8]=r,t[9]=n,t[10]=o,t[11]=s,t[12]=c,t[13]=l,t[14]=u}else o=t[10],s=t[11],c=t[12],l=t[13],u=t[14];let d;t[17]!==o||t[18]!==s?(d=(0,H.jsx)(`span`,{className:o,children:s}),t[17]=o,t[18]=s,t[19]=d):d=t[19];let f;t[20]!==c||t[21]!==l||t[22]!==d?(f=(0,H.jsxs)(`div`,{className:c,children:[l,d]}),t[20]=c,t[21]=l,t[22]=d,t[23]=f):f=t[23];let p;t[24]===a?p=t[25]:(p=(0,H.jsx)(`path`,{d:a,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,vectorEffect:`non-scaling-stroke`}),t[24]=a,t[25]=p);let m;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,H.jsx)(`line`,{x1:`0`,y1:95,x2:320,y2:95,className:`stroke-border`}),t[26]=m):m=t[26];let h;t[27]===p?h=t[28]:(h=(0,H.jsxs)(`svg`,{viewBox:`0 0 320 96`,className:`h-24 w-full overflow-visible text-info`,role:`img`,"aria-label":`Diagnostics history chart`,children:[p,m]}),t[27]=p,t[28]=h);let g;return t[29]!==h||t[30]!==u||t[31]!==f?(g=(0,H.jsxs)(`div`,{className:u,children:[f,h]}),t[29]=h,t[30]=u,t[31]=f,t[32]=g):g=t[32],g}function je(e){return e.value}function Me(e){let t=(0,z.c)(12),{points:n,formatValue:r}=e,i=r===void 0?String:r,a;t[0]===n?a=t[1]:(a=Math.max(...n.map(Ne),1),t[0]=n,t[1]=a);let o=a;if(n.length===0){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,H.jsx)(`p`,{className:`px-4 py-4 text-muted-foreground text-sm`,children:`No data yet.`}),t[2]=e):e=t[2],e}let s;if(t[3]!==i||t[4]!==o||t[5]!==n){let e;t[7]!==i||t[8]!==o?(e=e=>(0,H.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_5rem] items-center gap-3 px-4 py-2.5`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`div`,{className:`mb-1 truncate text-[12px] font-medium`,children:e.label}),(0,H.jsx)(`div`,{className:`h-1.5 overflow-hidden rounded-full bg-muted`,children:(0,H.jsx)(`div`,{className:`h-full rounded-full bg-info`,style:{width:`${Math.max(4,e.value/o*100)}%`}})})]}),(0,H.jsx)(`div`,{className:`text-right font-mono text-[11px] text-muted-foreground`,children:i(e.value)})]},e.label),t[7]=i,t[8]=o,t[9]=e):e=t[9],s=n.map(e),t[3]=i,t[4]=o,t[5]=n,t[6]=s}else s=t[6];let c;return t[10]===s?c=t[11]:(c=(0,H.jsx)(`div`,{className:`divide-y divide-border/60`,children:s}),t[10]=s,t[11]=c),c}function Ne(e){return e.value}function $(e){let t=(0,z.c)(10),{label:n,value:r,detail:i}=e,a;t[0]===n?a=t[1]:(a=(0,H.jsx)(`div`,{className:`truncate text-[11px] font-medium text-muted-foreground uppercase tracking-[0.08em]`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=(0,H.jsx)(`div`,{className:`mt-1 truncate text-[15px] font-semibold text-foreground`,children:r}),t[2]=r,t[3]=o);let s;t[4]===i?s=t[5]:(s=i?(0,H.jsx)(`div`,{className:`mt-0.5 truncate text-[11px] text-muted-foreground`,children:i}):null,t[4]=i,t[5]=s);let c;return t[6]!==a||t[7]!==o||t[8]!==s?(c=(0,H.jsxs)(`div`,{className:`min-w-0 border-border/60 border-t px-4 py-3 first:border-t-0 sm:px-5`,children:[a,o,s]}),t[6]=a,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function Pe(e){let t=(0,z.c)(12),{label:n,value:r,detail:i}=e,a;t[0]===n?a=t[1]:(a=(0,H.jsx)(`div`,{className:`text-[12px] font-medium text-foreground`,children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=(0,H.jsx)(`div`,{className:`font-mono text-[12px] text-foreground`,children:r}),t[2]=r,t[3]=o);let s;t[4]===i?s=t[5]:(s=(0,H.jsx)(`div`,{className:`mt-0.5 text-[11px] text-muted-foreground`,children:i}),t[4]=i,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,H.jsxs)(`div`,{className:`min-w-0`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,H.jsxs)(`div`,{className:`grid gap-1 border-border/60 border-t px-4 py-3 first:border-t-0 sm:grid-cols-[11rem_minmax(0,1fr)] sm:px-5`,children:[a,c]}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}function Fe(e){let t=(0,z.c)(5),{value:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,H.jsx)(`summary`,{className:`cursor-pointer select-none text-[11px] text-muted-foreground hover:text-foreground`,children:`raw`}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=JSON.stringify(n,null,2),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,H.jsxs)(`details`,{className:`group`,children:[r,(0,H.jsx)(`pre`,{className:`mt-2 max-h-64 overflow-auto rounded-md bg-muted/60 p-3 text-[11px] leading-relaxed`,children:i})]}),t[3]=i,t[4]=a),a}function Ie(e){let t=(0,z.c)(5),{spans:n}=e;if(n.length===0){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,H.jsx)(`p`,{className:`px-4 py-4 text-muted-foreground text-sm`,children:`No spans retained yet.`}),t[0]=e):e=t[0],e}let r;t[1]===n?r=t[2]:(r=n.slice(0,10).map(Le),t[1]=n,t[2]=r);let i;return t[3]===r?i=t[4]:(i=(0,H.jsx)(`div`,{className:`divide-y divide-border/60`,children:r}),t[3]=r,t[4]=i),i}function Le(e){return(0,H.jsxs)(`div`,{className:`grid gap-2 px-4 py-3 sm:grid-cols-[minmax(0,1fr)_6rem_5rem] sm:items-start`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`truncate text-[13px] font-medium`,children:e.name}),(0,H.jsx)(F,{size:`sm`,variant:e.status===`success`?`outline`:`error`,children:e.status})]}),(0,H.jsxs)(`div`,{className:`mt-1 truncate font-mono text-[11px] text-muted-foreground`,children:[e.source,` / `,e.kind,` / `,e.spanId]}),e.failureMessage?(0,H.jsx)(`div`,{className:`mt-1 line-clamp-2 text-[11px] text-destructive`,children:e.failureMessage}):null,(0,H.jsx)(`div`,{className:`mt-2`,children:(0,H.jsx)(Fe,{value:e})})]}),(0,H.jsx)(`div`,{className:`font-mono text-[11px] text-muted-foreground sm:text-right`,children:Z(e.durationMs)}),(0,H.jsx)(`div`,{className:`font-mono text-[11px] text-muted-foreground sm:text-right`,children:Q(e.endTime)})]},e.id)}function Re(e){let t=(0,z.c)(9),{memorySeries:n,cpuSeries:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,H.jsx)(`div`,{className:`mb-1 text-[12px] font-semibold`,children:`RSS memory`}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,H.jsxs)(`div`,{className:`min-w-0 p-4`,children:[i,(0,H.jsx)(Ae,{points:n,formatValue:X})]}),t[1]=n,t[2]=a);let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,H.jsx)(`div`,{className:`mb-1 text-[12px] font-semibold`,children:`CPU utilization`}),t[3]=o):o=t[3];let s;t[4]===r?s=t[5]:(s=(0,H.jsxs)(`div`,{className:`min-w-0 p-4`,children:[o,(0,H.jsx)(Ae,{points:r,formatValue:ze})]}),t[4]=r,t[5]=s);let c;return t[6]!==a||t[7]!==s?(c=(0,H.jsx)(I,{title:`Resource history`,children:(0,H.jsxs)(`div`,{className:`grid gap-0 divide-y divide-border/60 lg:grid-cols-2 lg:divide-x lg:divide-y-0`,children:[a,s]})}),t[6]=a,t[7]=s,t[8]=c):c=t[8],c}function ze(e){return`${e.toFixed(1)}%`}function Be(e){let t=(0,z.c)(25),{snapshot:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,H.jsx)(`div`,{className:`border-border/60 border-b px-4 py-2 text-[12px] font-semibold`,children:`Top span names`}),t[0]=r):r=t[0];let i;t[1]===n?.tracing.topSpanNames?i=t[2]:(i=n?.tracing.topSpanNames??[],t[1]=n?.tracing.topSpanNames,t[2]=i);let a;t[3]===i?a=t[4]:(a=De(i),t[3]=i,t[4]=a);let o;t[5]===a?o=t[6]:(o=(0,H.jsxs)(`div`,{className:`min-w-0`,children:[r,(0,H.jsx)(Me,{points:a})]}),t[5]=a,t[6]=o);let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,H.jsx)(`div`,{className:`border-border/60 border-b px-4 py-2 text-[12px] font-semibold`,children:`Duration buckets`}),t[7]=s):s=t[7];let c;t[8]===n?.tracing.durationBuckets?c=t[9]:(c=n?.tracing.durationBuckets??[],t[8]=n?.tracing.durationBuckets,t[9]=c);let l;t[10]===c?l=t[11]:(l=Ee(c),t[10]=c,t[11]=l);let u;t[12]===l?u=t[13]:(u=(0,H.jsxs)(`div`,{className:`min-w-0`,children:[s,(0,H.jsx)(Me,{points:l})]}),t[12]=l,t[13]=u);let d;t[14]!==o||t[15]!==u?(d=(0,H.jsxs)(`div`,{className:`grid gap-0 divide-y divide-border/60 lg:grid-cols-2 lg:divide-x lg:divide-y-0`,children:[o,u]}),t[14]=o,t[15]=u,t[16]=d):d=t[16];let f;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,H.jsx)(`div`,{className:`border-border/60 border-b px-4 py-2 text-[12px] font-semibold`,children:`Slowest spans`}),t[17]=f):f=t[17];let p;t[18]===n?.tracing.slowestSpans?p=t[19]:(p=n?.tracing.slowestSpans??[],t[18]=n?.tracing.slowestSpans,t[19]=p);let m;t[20]===p?m=t[21]:(m=(0,H.jsxs)(`div`,{className:`border-border/60 border-t`,children:[f,(0,H.jsx)(Ie,{spans:p})]}),t[20]=p,t[21]=m);let h;return t[22]!==m||t[23]!==d?(h=(0,H.jsxs)(I,{title:`Tracing diagnostics`,children:[d,m]}),t[22]=m,t[23]=d,t[24]=h):h=t[24],h}function Ve(e){let t=(0,z.c)(10),{snapshot:n,nowMs:r}=e,i;if(t[0]!==r||t[1]!==n?.failures.latest){let e;t[3]===r?e=t[4]:(e=e=>(0,H.jsxs)(`div`,{className:`grid gap-2 px-4 py-3 sm:grid-cols-[minmax(0,1fr)_6rem]`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,H.jsx)(F,{size:`sm`,variant:`error`,children:e.category}),(0,H.jsx)(`span`,{className:`truncate text-[13px] font-medium`,children:e.message})]}),(0,H.jsxs)(`div`,{className:`mt-1 truncate font-mono text-[11px] text-muted-foreground`,children:[e.source,` / `,e.signature]}),(0,H.jsx)(`div`,{className:`mt-2`,children:(0,H.jsx)(Fe,{value:e.raw??e})})]}),(0,H.jsx)(`div`,{className:`font-mono text-[11px] text-muted-foreground sm:text-right`,children:Q(e.occurredAt,r)})]},e.id),t[3]=r,t[4]=e),i=(n?.failures.latest??[]).slice(0,8).map(e),t[0]=r,t[1]=n?.failures.latest,t[2]=i}else i=t[2];let a;t[5]===n?a=t[6]:(a=n&&n.failures.latest.length===0?(0,H.jsx)(`p`,{className:`px-4 py-4 text-muted-foreground text-sm`,children:`No failures retained.`}):null,t[5]=n,t[6]=a);let o;return t[7]!==i||t[8]!==a?(o=(0,H.jsx)(I,{title:`Failures`,children:(0,H.jsxs)(`div`,{className:`divide-y divide-border/60`,children:[i,a]})}),t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function He(e){let t=(0,z.c)(27),{snapshot:n,slowRpcAcks:r,nowMs:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,H.jsx)(`div`,{className:`border-border/60 border-b px-4 py-2 text-[12px] font-semibold`,children:`Providers`}),t[0]=a):a=t[0];let o;t[1]===n?.liveProcesses.providers?o=t[2]:(o=n?.liveProcesses.providers??[],t[1]=n?.liveProcesses.providers,t[2]=o);let s;t[3]===o?s=t[4]:(s=o.map(We),t[3]=o,t[4]=s);let c;t[5]===s?c=t[6]:(c=(0,H.jsxs)(`div`,{className:`min-w-0`,children:[a,(0,H.jsx)(`div`,{className:`divide-y divide-border/60`,children:s})]}),t[5]=s,t[6]=c);let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,H.jsx)(`div`,{className:`border-border/60 border-b px-4 py-2 text-[12px] font-semibold`,children:`Terminals and slow RPCs`}),t[7]=l):l=t[7];let u;t[8]===n?.liveProcesses.terminals?u=t[9]:(u=n?.liveProcesses.terminals??[],t[8]=n?.liveProcesses.terminals,t[9]=u);let d;t[10]===u?d=t[11]:(d=u.map(Ue),t[10]=u,t[11]=d);let f;if(t[12]!==i||t[13]!==r){let e;t[15]===i?e=t[16]:(e=e=>(0,H.jsxs)(`div`,{className:`px-4 py-2.5`,children:[(0,H.jsx)(`div`,{className:`truncate text-[13px] font-medium`,children:e.tag}),(0,H.jsxs)(`div`,{className:`mt-1 font-mono text-[11px] text-muted-foreground`,children:[`slow ack / `,Q(e.startedAt,i)]})]},e.requestId),t[15]=i,t[16]=e),f=r.map(e),t[12]=i,t[13]=r,t[14]=f}else f=t[14];let p;t[17]!==r.length||t[18]!==n?.liveProcesses.terminals.length?(p=(n?.liveProcesses.terminals.length??0)===0&&r.length===0?(0,H.jsx)(`p`,{className:`px-4 py-4 text-muted-foreground text-sm`,children:`No live terminal or slow RPC activity.`}):null,t[17]=r.length,t[18]=n?.liveProcesses.terminals.length,t[19]=p):p=t[19];let m;t[20]!==d||t[21]!==f||t[22]!==p?(m=(0,H.jsxs)(`div`,{className:`min-w-0`,children:[l,(0,H.jsxs)(`div`,{className:`divide-y divide-border/60`,children:[d,f,p]})]}),t[20]=d,t[21]=f,t[22]=p,t[23]=m):m=t[23];let h;return t[24]!==m||t[25]!==c?(h=(0,H.jsx)(I,{title:`Live activity`,children:(0,H.jsxs)(`div`,{className:`grid gap-0 divide-y divide-border/60 lg:grid-cols-2 lg:divide-x lg:divide-y-0`,children:[c,m]})}),t[24]=m,t[25]=c,t[26]=h):h=t[26],h}function Ue(e){return(0,H.jsxs)(`div`,{className:`px-4 py-2.5`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,H.jsx)(`span`,{className:`truncate text-[13px] font-medium`,children:e.terminalId}),(0,H.jsx)(F,{size:`sm`,variant:e.status===`error`?`error`:`outline`,children:e.status})]}),(0,H.jsxs)(`div`,{className:`mt-1 truncate font-mono text-[11px] text-muted-foreground`,children:[`pid `,e.pid??`n/a`,` / subprocess`,` `,e.hasRunningSubprocess?`yes`:`no`]})]},`${e.threadId}:${e.terminalId}`)}function We(e){return(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3 px-4 py-2.5`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`div`,{className:`truncate text-[13px] font-medium`,children:e.displayName??e.instanceId}),(0,H.jsx)(`div`,{className:`truncate font-mono text-[11px] text-muted-foreground`,children:e.driver})]}),(0,H.jsx)(F,{size:`sm`,variant:e.status===`error`?`error`:e.status===`warning`?`warning`:`outline`,children:e.status})]},e.instanceId)}function Ge(e){let t=(0,z.c)(57),{snapshot:n,memorySeries:r,cpuSeries:i,slowRpcAcks:a,latestFailure:o,nowMs:s}=e,c;t[0]===n?c=t[1]:(c=n?Z(n.uptimeMs):`n/a`,t[0]=n,t[1]=c);let l;t[2]!==s||t[3]!==n?(l=n?`Started ${Q(n.serverStartedAt,s)}`:void 0,t[2]=s,t[3]=n,t[4]=l):l=t[4];let u;t[5]!==c||t[6]!==l?(u=(0,H.jsx)($,{label:`Uptime`,value:c,detail:l}),t[5]=c,t[6]=l,t[7]=u):u=t[7];let d;t[8]===n?d=t[9]:(d=n?X(n.resources.current.memory.rssBytes):`n/a`,t[8]=n,t[9]=d);let f;t[10]===n?f=t[11]:(f=n?`${X(n.resources.current.memory.heapUsedBytes)} heap used`:void 0,t[10]=n,t[11]=f);let p;t[12]!==d||t[13]!==f?(p=(0,H.jsx)($,{label:`Memory`,value:d,detail:f}),t[12]=d,t[13]=f,t[14]=p):p=t[14];let m;t[15]===n?m=t[16]:(m=n?Ce(n.resources.current.cpu.utilizationPercent):`n/a`,t[15]=n,t[16]=m);let h;t[17]===n?h=t[18]:(h=n?.resources.current.eventLoopDelayMs===void 0?void 0:`${Z(n.resources.current.eventLoopDelayMs)} event loop delay`,t[17]=n,t[18]=h);let g;t[19]!==m||t[20]!==h?(g=(0,H.jsx)($,{label:`CPU`,value:m,detail:h}),t[19]=m,t[20]=h,t[21]=g):g=t[21];let _;t[22]===n?.liveProcesses.providers?_=t[23]:(_=n?.liveProcesses.providers.filter(Ke).length??0,t[22]=n?.liveProcesses.providers,t[23]=_);let v=`${_} providers`,y=`${n?.liveProcesses.terminals.length??0} terminal sessions`,b;t[24]!==v||t[25]!==y?(b=(0,H.jsx)($,{label:`Activity`,value:v,detail:y}),t[24]=v,t[25]=y,t[26]=b):b=t[26];let x=`${n?.tracing.retainedSpanCount??0} spans`,S=n?`${n.limits.fileTailBytes/1024} KB file tail`:void 0,C;t[27]!==x||t[28]!==S?(C=(0,H.jsx)($,{label:`Tracing`,value:x,detail:S}),t[27]=x,t[28]=S,t[29]=C):C=t[29];let w;t[30]===o?w=t[31]:(w=(0,H.jsx)($,{label:`Latest failure`,value:o}),t[30]=o,t[31]=w);let T;t[32]!==b||t[33]!==C||t[34]!==w||t[35]!==u||t[36]!==p||t[37]!==g?(T=(0,H.jsx)(I,{title:`Overview`,children:(0,H.jsxs)(`div`,{className:`grid sm:grid-cols-2 lg:grid-cols-3`,children:[u,p,g,b,C,w]})}),t[32]=b,t[33]=C,t[34]=w,t[35]=u,t[36]=p,t[37]=g,t[38]=T):T=t[38];let E;t[39]!==i||t[40]!==r?(E=(0,H.jsx)(Re,{memorySeries:r,cpuSeries:i}),t[39]=i,t[40]=r,t[41]=E):E=t[41];let D;t[42]===n?D=t[43]:(D=(0,H.jsx)(Be,{snapshot:n}),t[42]=n,t[43]=D);let O;t[44]!==s||t[45]!==n?(O=(0,H.jsx)(Ve,{snapshot:n,nowMs:s}),t[44]=s,t[45]=n,t[46]=O):O=t[46];let k;t[47]!==s||t[48]!==a||t[49]!==n?(k=(0,H.jsx)(He,{snapshot:n,slowRpcAcks:a,nowMs:s}),t[47]=s,t[48]=a,t[49]=n,t[50]=k):k=t[50];let A;return t[51]!==T||t[52]!==E||t[53]!==D||t[54]!==O||t[55]!==k?(A=(0,H.jsxs)(H.Fragment,{children:[T,E,D,O,k]}),t[51]=T,t[52]=E,t[53]=D,t[54]=O,t[55]=k,t[56]=A):A=t[56],A}function Ke(e){return e.enabled}function qe(e){let t=(0,z.c)(14),{snapshot:n,error:r}=e;if(!r&&(!n||n.warnings.length===0))return null;let i=r?`error`:`warning`,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,H.jsx)(w,{}),t[0]=a):a=t[0];let o=r?`Diagnostics refresh failed`:`Diagnostics warnings`,s;t[1]===o?s=t[2]:(s=(0,H.jsx)(O,{children:o}),t[1]=o,t[2]=s);let c;t[3]===r?c=t[4]:(c=r?(0,H.jsx)(`span`,{children:r}):null,t[3]=r,t[4]=c);let l;t[5]===n?.warnings?l=t[6]:(l=n?.warnings.slice(0,4).map(Je),t[5]=n?.warnings,t[6]=l);let u;t[7]!==c||t[8]!==l?(u=(0,H.jsxs)(k,{children:[c,l]}),t[7]=c,t[8]=l,t[9]=u):u=t[9];let d;return t[10]!==i||t[11]!==s||t[12]!==u?(d=(0,H.jsxs)(A,{variant:i,children:[a,s,u]}),t[10]=i,t[11]=s,t[12]=u,t[13]=d):d=t[13],d}function Je(e){return(0,H.jsxs)(`span`,{children:[e.message,e.count?` (${e.count})`:``]},`${e.code}:${e.source??``}`)}function Ye({presentation:e=`performance`}){let[t,n]=(0,R.useState)(null),[r,i]=(0,R.useState)(null),[a,o]=(0,R.useState)(!0),[s,d]=(0,R.useState)(!1),f=(0,R.useRef)(!1),m=(0,R.useRef)(!1),h=(0,R.useRef)(!1),g=l(),_=c(e=>e.byId),y=Date.now(),b=(0,R.useCallback)(async(e=!1)=>{if(!(!e&&document.visibilityState!==`visible`)&&!f.current){f.current=!0,o(e=>e&&!m.current);try{let e=await u().server.getDiagnosticsSnapshot();if(h.current)return;n(e),i(null),m.current=!0}catch(e){if(h.current)return;i(e instanceof Error?e.message:`Unable to refresh diagnostics.`)}finally{f.current=!1,h.current||o(!1)}}},[]);(0,R.useEffect)(()=>{if(h.current=!1,b(),s)return()=>{h.current=!0};let e=null,t=()=>{e!==null&&(window.clearInterval(e),e=null)},n=()=>{document.visibilityState===`visible`&&e===null&&(e=window.setInterval(()=>void b(),ke))};n();let r=()=>{if(document.visibilityState===`visible`){b(),n();return}t()};return document.addEventListener(`visibilitychange`,r),()=>{h.current=!0,t(),document.removeEventListener(`visibilitychange`,r)}},[s,b]);let w=(0,R.useMemo)(()=>we(t?.resources.history??[]),[t]),E=(0,R.useMemo)(()=>Te(t?.resources.history??[]),[t]),D=t?Oe(t):`No snapshot`,O=t?.liveProcesses.providers.filter(e=>e.enabled).length??0,k=t?.liveProcesses.terminals.filter(e=>e.status===`starting`||e.status===`running`).length??0,A=Object.values(_),ee=A.filter(e=>e.connectionState===`connected`).length,te=A.filter(e=>e.connectionState===`connecting`).length,j=A.length===0?`No tracked clients`:`${ee} connected${te>0?` · ${te} connecting`:``}`,M=t?.tracing.slowestSpans.find(e=>e.source===`server`)??null,N=g[0]??null,P=t?.performance??null,F=P?.local.turnQuiescenceAvgMs??null,L=P?.local.checkpointDurationP95Ms??null,re=P?.local.latestThreadSnapshotDurationMs??null,z=P?.local.threadSnapshotDurationP95Ms??null;return(0,H.jsxs)(ne,{children:[(0,H.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h1`,{className:`text-base font-semibold`,children:`Diagnostics`}),(0,H.jsx)(`p`,{className:`mt-1 text-muted-foreground text-xs`,children:t?`Updated ${Q(t.generatedAt,y)}`:`Waiting for snapshot`})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsxs)(T,{size:`xs`,variant:`outline`,onClick:()=>d(e=>!e),children:[s?(0,H.jsx)(S,{className:`size-3.5`}):(0,H.jsx)(x,{className:`size-3.5`}),s?`Resume`:`Pause`]}),(0,H.jsxs)(T,{size:`xs`,variant:`outline`,onClick:()=>void b(!0),disabled:a,children:[(0,H.jsx)(C,{className:p(`size-3.5`,a&&`animate-spin`)}),`Refresh`]})]})]}),(0,H.jsx)(qe,{snapshot:t,error:r}),null,e===`phone-legacy`?null:(0,H.jsx)(xe,{}),e===`phone-legacy`?(0,H.jsx)(Ge,{snapshot:t,memorySeries:w,cpuSeries:E,slowRpcAcks:g,latestFailure:D,nowMs:y}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(I,{title:`Performance now`,children:(0,H.jsxs)(`div`,{className:`grid sm:grid-cols-2 lg:grid-cols-3`,children:[(0,H.jsx)($,{label:`Backend CPU`,value:t?Ce(t.resources.current.cpu.utilizationPercent):`n/a`,detail:t?`Process uptime ${Z(t.uptimeMs)}`:void 0}),(0,H.jsx)($,{label:`RSS / heap`,value:t?X(t.resources.current.memory.rssBytes):`n/a`,detail:t?`${X(t.resources.current.memory.heapUsedBytes)} heap used`:void 0}),(0,H.jsx)($,{label:`Event-loop delay`,value:t?.resources.current.eventLoopDelayMs===void 0?`n/a`:Z(t.resources.current.eventLoopDelayMs),detail:`Measured once for this requested snapshot`}),(0,H.jsx)($,{label:`Providers / terminals`,value:`${O} enabled providers`,detail:`${k} active terminals`}),(0,H.jsx)($,{label:`Turn quiescence`,value:F===null?`No samples`:Z(F),detail:`Rolling average`}),(0,H.jsx)($,{label:`Checkpoint duration`,value:L===null?`No samples`:Z(L),detail:`Rolling p95`}),(0,H.jsx)($,{label:`WebSocket state`,value:j,detail:`${P?.local.wsReconnectCount??0} reconnects in this server process`}),(0,H.jsx)($,{label:`Thread snapshot`,value:re===null?`No samples`:Z(re),detail:z===null?`Latest successful subscription snapshot`:`${Z(z)} rolling p95`}),(0,H.jsx)($,{label:`Latest failure`,value:D})]})}),(0,H.jsxs)(I,{title:`Why was this slow?`,children:[(0,H.jsx)(Pe,{label:`Thread snapshot`,value:re===null?`No thread snapshot timing yet`:`${Z(re)} latest`,detail:z===null?`Replay duration and payload bytes are not collected because the current transport has no zero-copy attribution hook.`:`${Z(z)} rolling p95. Replay duration and payload bytes are not collected because the current transport has no zero-copy attribution hook.`}),(0,H.jsx)(Pe,{label:`Queue pressure`,value:P?`${P.queues.runtimeDepthTotal+P.queues.liveBufferDepthTotal} queued now`:`No snapshot`,detail:P?`Largest runtime high-water ${P.queues.runtimeHighWaterMax}; live-buffer high-water ${P.queues.liveBufferHighWaterMax}; ${P.queues.liveBufferOverflowCount} overflows; replay depth ${P.queues.replayDepthMax}; replay lag ${P.queues.replayLagMax}; ${P.queues.providerLogDroppedRecords} provider log records dropped.`:`Runtime and replay queue evidence will appear after the first snapshot.`}),(0,H.jsx)(Pe,{label:`Slowest server stage`,value:M?`${M.name} · ${Z(M.durationMs)}`:`No retained spans`,detail:M?`Server span completed ${Q(M.endTime,y)}.`:`Tracing has not retained a server stage yet.`}),(0,H.jsx)(Pe,{label:`Current slow client RPC`,value:N?.tag??`No slow RPC acknowledgement in progress`,detail:N?`Exceeded its ${Z(N.thresholdMs)} acknowledgement threshold; started ${Q(N.startedAt,y)}.`:`Only RPCs that cross the existing client acknowledgement threshold appear here.`}),(0,H.jsx)(Pe,{label:`Reconnect / resume`,value:j,detail:`${P?.local.wsReconnectCount??0} server-side reconnects. Per-environment push gaps and recovery state are in Advanced diagnostics.`}),(0,H.jsx)(Pe,{label:`Recent failure`,value:t?.failures.latest[0]?.message??`No retained failures`,detail:t?.failures.latest[0]?`${t.failures.latest[0].source} · ${Q(t.failures.latest[0].occurredAt,y)}`:`No failure evidence is available for the current server process.`}),(0,H.jsx)(Pe,{label:`Trace persistence`,value:P?.traceSink?`${X(P.traceSink.bufferedBytes)} buffered`:`Health unavailable`,detail:P?.traceSink?`${X(P.traceSink.maxBufferedBytes)} cap; ${P.traceSink.droppedRecords} dropped records; ${P.traceSink.writeFailures} write failures; retry delay ${Z(P.traceSink.retryDelayMs)}.`:`This diagnostics service is not attached to the local trace-file sink.`})]}),(0,H.jsxs)(`details`,{className:`group/diagnostics`,children:[(0,H.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between rounded-xl border bg-card px-4 py-3 text-sm font-medium text-foreground shadow-sm/4 marker:hidden hover:bg-accent/30`,children:[`Advanced diagnostics`,(0,H.jsx)(v,{className:`size-4 text-muted-foreground transition-transform group-open/diagnostics:rotate-180 motion-reduce:transition-none`})]}),(0,H.jsxs)(`div`,{className:`mt-5 space-y-5`,children:[(0,H.jsx)(Re,{memorySeries:w,cpuSeries:E}),(0,H.jsx)(Be,{snapshot:t}),(0,H.jsx)(Ve,{snapshot:t,nowMs:y}),(0,H.jsx)(He,{snapshot:t,slowRpcAcks:g,nowMs:y}),(0,H.jsx)(G,{snapshot:t})]})]})]})]})}export{Ye as DiagnosticsSettings};
@@ -1 +1 @@
1
- import{V as e,hn as t,on as n}from"./usePopupViewport-wXfO6SZE.js";import{r}from"./DialogViewport-C2oKvkDR.js";var i=class extends e{constructor(){super(r(),`Dialog`,!1)}open(e){this.openByTrigger(e)}openWithPayload(e){let r=this.attachedStore;r!==null&&(r.set(`payload`,e),r.setOpen(!0,n(t)))}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function a(){return new i}export{a as n,i as t};
1
+ import{V as e,hn as t,on as n}from"./usePopupViewport-CQTeg5Y-.js";import{r}from"./DialogViewport-CuRGvCfw.js";var i=class extends e{constructor(){super(r(),`Dialog`,!1)}open(e){this.openByTrigger(e)}openWithPayload(e){let r=this.attachedStore;r!==null&&(r.set(`payload`,e),r.setOpen(!0,n(t)))}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function a(){return new i}export{a as n,i as t};
@@ -1 +1 @@
1
- import{i as e,t}from"./react-SIfiwpqq.js";import{f as n}from"./utils-c6dglOTK.js";import{C as r,Kn as i,j as a,y as o}from"./usePopupViewport-wXfO6SZE.js";import{t as s}from"./useRenderElement-DchFnsR8.js";import{a as c,o as l,s as u}from"./DialogViewport-C2oKvkDR.js";import{p as d,s as f}from"./useScrollLock-Dr_P7FLZ.js";var p=e(t(),1),m=p.forwardRef(function(e,t){let{render:n,className:r,style:a,forceRender:o=!1,...c}=e,l=u(),d=l.useState(`open`),f=l.useState(`nested`),p=l.useState(`mounted`),m={open:d,transitionStatus:l.useState(`transitionStatus`)};return s(`div`,e,{state:m,ref:[l.context.backdropRef,t],stateAttributesMapping:i,props:[{role:`presentation`,hidden:!p,style:{userSelect:`none`,WebkitUserSelect:`none`}},c],enabled:o||!f})}),h=n(),g=p.forwardRef(function(e,t){let{render:n,className:i,style:p,finalFocus:m,initialFocus:g,..._}=e,v=u(),y=v.useState(`descriptionElementId`),b=v.useState(`disablePointerDismissal`),x=v.useState(`floatingRootContext`),S=v.useState(`popupProps`),C=v.useState(`modal`),w=v.useState(`mounted`),T=v.useState(`nested`),E=v.useState(`nestedOpenDialogCount`),D=v.useState(`open`),O=v.useState(`openMethod`),k=v.useState(`titleElementId`),A=v.useState(`transitionStatus`),j=v.useState(`role`),M=x.useState(`floatingId`);l(),a({open:D,ref:v.context.popupRef,onComplete(){D&&v.context.onOpenChangeComplete?.(!0)}});let N=g===void 0?r(v.context.popupRef):g,P=E>0,F=v.useStateSetter(`popupElement`),I=s(`div`,e,{state:{open:D,nested:T,transitionStatus:A,nestedDialogOpen:P},props:[S,{id:M,"aria-labelledby":k,"aria-describedby":y,role:j,...o,hidden:!w,onKeyDown(e){f.has(e.key)&&e.stopPropagation()},style:{"--nested-dialogs":E}},_],ref:[t,v.context.popupRef,F],stateAttributesMapping:c});return(0,h.jsx)(d,{context:x,openInteractionType:O,disabled:!w,closeOnFocusOut:!b,initialFocus:N,returnFocus:m,modal:C!==!1,restoreFocus:`popup`,children:I})});export{m as n,g as t};
1
+ import{i as e,t}from"./react-SIfiwpqq.js";import{f as n}from"./utils-BPUctpTG.js";import{C as r,Kn as i,j as a,y as o}from"./usePopupViewport-CQTeg5Y-.js";import{t as s}from"./useRenderElement-DchFnsR8.js";import{a as c,o as l,s as u}from"./DialogViewport-CuRGvCfw.js";import{p as d,s as f}from"./useScrollLock-TdF-Iq8H.js";var p=e(t(),1),m=p.forwardRef(function(e,t){let{render:n,className:r,style:a,forceRender:o=!1,...c}=e,l=u(),d=l.useState(`open`),f=l.useState(`nested`),p=l.useState(`mounted`),m={open:d,transitionStatus:l.useState(`transitionStatus`)};return s(`div`,e,{state:m,ref:[l.context.backdropRef,t],stateAttributesMapping:i,props:[{role:`presentation`,hidden:!p,style:{userSelect:`none`,WebkitUserSelect:`none`}},c],enabled:o||!f})}),h=n(),g=p.forwardRef(function(e,t){let{render:n,className:i,style:p,finalFocus:m,initialFocus:g,..._}=e,v=u(),y=v.useState(`descriptionElementId`),b=v.useState(`disablePointerDismissal`),x=v.useState(`floatingRootContext`),S=v.useState(`popupProps`),C=v.useState(`modal`),w=v.useState(`mounted`),T=v.useState(`nested`),E=v.useState(`nestedOpenDialogCount`),D=v.useState(`open`),O=v.useState(`openMethod`),k=v.useState(`titleElementId`),A=v.useState(`transitionStatus`),j=v.useState(`role`),M=x.useState(`floatingId`);l(),a({open:D,ref:v.context.popupRef,onComplete(){D&&v.context.onOpenChangeComplete?.(!0)}});let N=g===void 0?r(v.context.popupRef):g,P=E>0,F=v.useStateSetter(`popupElement`),I=s(`div`,e,{state:{open:D,nested:T,transitionStatus:A,nestedDialogOpen:P},props:[S,{id:M,"aria-labelledby":k,"aria-describedby":y,role:j,...o,hidden:!w,onKeyDown(e){f.has(e.key)&&e.stopPropagation()},style:{"--nested-dialogs":E}},_],ref:[t,v.context.popupRef,F],stateAttributesMapping:c});return(0,h.jsx)(d,{context:x,openInteractionType:O,disabled:!w,closeOnFocusOut:!b,initialFocus:N,returnFocus:m,modal:C!==!1,restoreFocus:`popup`,children:I})});export{m as n,g as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./DialogViewport-CuRGvCfw.js";function t(t){return e(`dialog`,t)}export{t};
@@ -1 +1 @@
1
- import{i as e,t}from"./react-SIfiwpqq.js";import{in as n,on as r,un as i}from"./usePopupViewport-wXfO6SZE.js";import{t as a}from"./useRenderElement-DchFnsR8.js";import{s as o}from"./DialogViewport-C2oKvkDR.js";import{t as s}from"./useButton-_xmxdcVX.js";var c=e(t(),1),l=c.forwardRef(function(e,t){let{render:n,className:c,style:l,disabled:u=!1,nativeButton:d=!0,...f}=e,p=o(),m=p.useState(`open`),{getButtonProps:h,buttonRef:g}=s({disabled:u,native:d}),_={disabled:u};function v(e){m&&p.setOpen(!1,r(i,e.nativeEvent))}return a(`button`,e,{state:_,ref:[t,g],props:[{onClick:v},f,h]})}),u=c.forwardRef(function(e,t){let{render:r,className:i,style:s,id:c,...l}=e,u=o(),d=n(c);return u.useSyncedValueWithCleanup(`descriptionElementId`,d),a(`p`,e,{ref:t,props:[{id:d},l]})}),d=c.forwardRef(function(e,t){let{render:r,className:i,style:s,id:c,...l}=e,u=o(),d=n(c);return u.useSyncedValueWithCleanup(`titleElementId`,d),a(`h2`,e,{ref:t,props:[{id:d},l]})});export{u as n,l as r,d as t};
1
+ import{i as e,t}from"./react-SIfiwpqq.js";import{in as n,on as r,un as i}from"./usePopupViewport-CQTeg5Y-.js";import{t as a}from"./useRenderElement-DchFnsR8.js";import{s as o}from"./DialogViewport-CuRGvCfw.js";import{t as s}from"./useButton-CQaIys_r.js";var c=e(t(),1),l=c.forwardRef(function(e,t){let{render:n,className:c,style:l,disabled:u=!1,nativeButton:d=!0,...f}=e,p=o(),m=p.useState(`open`),{getButtonProps:h,buttonRef:g}=s({disabled:u,native:d}),_={disabled:u};function v(e){m&&p.setOpen(!1,r(i,e.nativeEvent))}return a(`button`,e,{state:_,ref:[t,g],props:[{onClick:v},f,h]})}),u=c.forwardRef(function(e,t){let{render:r,className:i,style:s,id:c,...l}=e,u=o(),d=n(c);return u.useSyncedValueWithCleanup(`descriptionElementId`,d),a(`p`,e,{ref:t,props:[{id:d},l]})}),d=c.forwardRef(function(e,t){let{render:r,className:i,style:s,id:c,...l}=e,u=o(),d=n(c);return u.useSyncedValueWithCleanup(`titleElementId`,d),a(`h2`,e,{ref:t,props:[{id:d},l]})});export{u as n,l as r,d as t};
@@ -1 +1 @@
1
- import{i as e,t}from"./react-SIfiwpqq.js";import{A as n,Jn as r,in as i,m as a,tt as o}from"./usePopupViewport-wXfO6SZE.js";import{d as s,t as c}from"./useRenderElement-DchFnsR8.js";import{s as l}from"./DialogViewport-C2oKvkDR.js";import{t as u}from"./useButton-_xmxdcVX.js";import{n as d,r as f}from"./useOpenInteractionType-JaQBnIly.js";var p=e(t(),1),m=p.forwardRef(function(e,t){let{render:m,className:h,style:g,disabled:_=!1,nativeButton:v=!0,id:y,payload:b,handle:x,...S}=e,C=l(!0),w=a(x)??C;if(!w)throw Error(s(79));let T=i(y),E=w.useState(`floatingRootContext`),D=w.useState(`isOpenedByTrigger`,T),O=w.useState(`triggerPopupId`,T),k=p.useRef(null),{registerTrigger:A,isMountedByThisTrigger:j}=n(T,k,w,{payload:b}),{getButtonProps:M,buttonRef:N}=u({disabled:_,native:v}),P=f(E),F=d(()=>w.select(`open`),e=>{w.set(`openMethod`,e)}),I={disabled:_,open:D},L=w.useState(`triggerProps`,j);return c(`button`,e,{state:I,ref:[N,t,A,k],props:[P.reference,L,F,{[o]:``,id:T,"aria-haspopup":`dialog`,"aria-expanded":D,"aria-controls":O},S,M],stateAttributesMapping:r})});export{m as t};
1
+ import{i as e,t}from"./react-SIfiwpqq.js";import{A as n,Jn as r,in as i,m as a,tt as o}from"./usePopupViewport-CQTeg5Y-.js";import{d as s,t as c}from"./useRenderElement-DchFnsR8.js";import{s as l}from"./DialogViewport-CuRGvCfw.js";import{t as u}from"./useButton-CQaIys_r.js";import{n as d,r as f}from"./useOpenInteractionType-D9ngong8.js";var p=e(t(),1),m=p.forwardRef(function(e,t){let{render:m,className:h,style:g,disabled:_=!1,nativeButton:v=!0,id:y,payload:b,handle:x,...S}=e,C=l(!0),w=a(x)??C;if(!w)throw Error(s(79));let T=i(y),E=w.useState(`floatingRootContext`),D=w.useState(`isOpenedByTrigger`,T),O=w.useState(`triggerPopupId`,T),k=p.useRef(null),{registerTrigger:A,isMountedByThisTrigger:j}=n(T,k,w,{payload:b}),{getButtonProps:M,buttonRef:N}=u({disabled:_,native:v}),P=f(E),F=d(()=>w.select(`open`),e=>{w.set(`openMethod`,e)}),I={disabled:_,open:D},L=w.useState(`triggerProps`,j);return c(`button`,e,{state:I,ref:[N,t,A,k],props:[P.reference,L,F,{[o]:``,id:T,"aria-haspopup":`dialog`,"aria-expanded":D,"aria-controls":O},S,M],stateAttributesMapping:r})});export{m as t};
@@ -1 +1 @@
1
- import{i as e,t}from"./react-SIfiwpqq.js";import{f as n}from"./utils-c6dglOTK.js";import{Bt as r,D as i,E as a,Gn as o,I as s,Mn as c,O as l,T as u,U as d,Xn as f,Z as p,_ as m,b as h,c as g,g as _,h as v,hn as y,k as b,l as x,on as S,v as C,w,zt as T}from"./usePopupViewport-wXfO6SZE.js";import{d as E,t as D}from"./useRenderElement-DchFnsR8.js";import{n as O,t as k}from"./useScrollLock-Dr_P7FLZ.js";var A=e(t(),1),j=A.createContext(void 0);function M(e){let t=A.useContext(j);if(!e&&t===void 0)throw Error(E(27));return t}var N=A.createContext(void 0);function P(){let e=A.useContext(N);if(e===void 0)throw Error(E(26));return e}var F=n(),I={...o,...f,nestedDialogOpen(e){return e?{"data-nested-dialog-open":``}:null}},L=A.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=M(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,F.jsx)(N.Provider,{value:n,children:(0,F.jsxs)(p,{ref:t,...r,children:[a&&o===!0&&(0,F.jsx)(O,{ref:i.context.internalBackdropRef,inert:x(!s)}),e.children]})}):null});function R({store:e,parentContext:t,isDrawer:n}){let a=e.useState(`open`),o=e.useState(`disablePointerDismissal`),s=e.useState(`modal`),l=e.useState(`popupElement`),u=e.useState(`floatingRootContext`),[f,p]=A.useState(0),[m,h]=A.useState(0),g=f===0,_=d(u,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:s===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=r(t);if(g&&!o){if(s){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||T(n,l)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:g});return k(a&&s===!0,l),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{p(e),h(t)}),c(()=>(t?.onNestedDialogOpen&&(a?t.onNestedDialogOpen(f+1,m+ +!!n):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&a&&t.onNestedDialogOpen(0,0)}),[n,a,f,m,t]),i(e,{activeTriggerProps:_.reference,inactiveTriggerProps:_.trigger,popupProps:_.floating,nestedOpenDialogCount:f,nestedOpenDrawerCount:m}),null}var z={...m,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},B=class extends s{constructor(e,t,n){let r=new C,i=H(e,r,t,n);super(i,U(r),z)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};w(n,e,t.trigger),this.update(n)}};function V(){let e=new C;return new g(Object.freeze(H(void 0,e)),Object.freeze(U(e)),z)}function H(e,t,n,r=!1){let i={...v(),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e};return i.floatingRootContext=_(t,n,r),i}function U(e){return{popupRef:A.createRef(),backdropRef:A.createRef(),internalBackdropRef:A.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function W(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:o,onOpenChangeComplete:s,disablePointerDismissal:c=!1,modal:d=!0,actionsRef:f,handle:p,triggerId:m,defaultTriggerId:g=null}=t,_=e===`drawer`,v=e===`alert-dialog`,x=v?!0:d,C=v||c,w=v?`alertdialog`:`dialog`,T=M(!0),E={modal:x,disablePointerDismissal:C,nested:T!=null,role:w},D=l((e,t)=>new B({open:i,openProp:r,activeTriggerId:g,triggerIdProp:m,...E},e,t),!0);D.useControlledProp(`openProp`,r),D.useControlledProp(`triggerIdProp`,m),D.useSyncedValues(E),D.useContextCallback(`onOpenChange`,o),D.useContextCallback(`onOpenChangeComplete`,s);let O=D.useState(`open`),k=D.useState(`mounted`),N=D.useState(`payload`);b(D,O),u(D);let{forceUnmount:P}=a(O,D);A.useImperativeHandle(f,()=>({unmount:P,close:()=>D.setOpen(!1,S(y))}),[P,D]);let I=O||k;return(0,F.jsxs)(j.Provider,{value:D,children:[p&&(0,F.jsx)(h,{handle:p,store:D}),I&&(0,F.jsx)(R,{store:D,parentContext:T?.context,isDrawer:_}),typeof n==`function`?n({payload:N}):n]})}var G=A.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=P(),c=M(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`transitionStatus`),f=c.useState(`nestedOpenDialogCount`),p=c.useState(`mounted`),m=c.useStateSetter(`viewportElement`);return D(`div`,e,{enabled:s||p,state:{open:l,nested:u,transitionStatus:d,nestedDialogOpen:f>0},ref:[t,m],stateAttributesMapping:I,props:[{role:`presentation`,hidden:!p,style:{pointerEvents:l?void 0:`none`},children:a},o]})});export{I as a,L as i,W as n,P as o,V as r,M as s,G as t};
1
+ import{i as e,t}from"./react-SIfiwpqq.js";import{f as n}from"./utils-BPUctpTG.js";import{Bt as r,D as i,E as a,Gn as o,I as s,Mn as c,O as l,T as u,U as d,Xn as f,Z as p,_ as m,b as h,c as g,g as _,h as v,hn as y,k as b,l as x,on as S,v as C,w,zt as T}from"./usePopupViewport-CQTeg5Y-.js";import{d as E,t as D}from"./useRenderElement-DchFnsR8.js";import{n as O,t as k}from"./useScrollLock-TdF-Iq8H.js";var A=e(t(),1),j=A.createContext(void 0);function M(e){let t=A.useContext(j);if(!e&&t===void 0)throw Error(E(27));return t}var N=A.createContext(void 0);function P(){let e=A.useContext(N);if(e===void 0)throw Error(E(26));return e}var F=n(),I={...o,...f,nestedDialogOpen(e){return e?{"data-nested-dialog-open":``}:null}},L=A.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=M(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,F.jsx)(N.Provider,{value:n,children:(0,F.jsxs)(p,{ref:t,...r,children:[a&&o===!0&&(0,F.jsx)(O,{ref:i.context.internalBackdropRef,inert:x(!s)}),e.children]})}):null});function R({store:e,parentContext:t,isDrawer:n}){let a=e.useState(`open`),o=e.useState(`disablePointerDismissal`),s=e.useState(`modal`),l=e.useState(`popupElement`),u=e.useState(`floatingRootContext`),[f,p]=A.useState(0),[m,h]=A.useState(0),g=f===0,_=d(u,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:s===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=r(t);if(g&&!o){if(s){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||T(n,l)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:g});return k(a&&s===!0,l),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{p(e),h(t)}),c(()=>(t?.onNestedDialogOpen&&(a?t.onNestedDialogOpen(f+1,m+ +!!n):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&a&&t.onNestedDialogOpen(0,0)}),[n,a,f,m,t]),i(e,{activeTriggerProps:_.reference,inactiveTriggerProps:_.trigger,popupProps:_.floating,nestedOpenDialogCount:f,nestedOpenDrawerCount:m}),null}var z={...m,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},B=class extends s{constructor(e,t,n){let r=new C,i=H(e,r,t,n);super(i,U(r),z)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};w(n,e,t.trigger),this.update(n)}};function V(){let e=new C;return new g(Object.freeze(H(void 0,e)),Object.freeze(U(e)),z)}function H(e,t,n,r=!1){let i={...v(),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e};return i.floatingRootContext=_(t,n,r),i}function U(e){return{popupRef:A.createRef(),backdropRef:A.createRef(),internalBackdropRef:A.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function W(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:o,onOpenChangeComplete:s,disablePointerDismissal:c=!1,modal:d=!0,actionsRef:f,handle:p,triggerId:m,defaultTriggerId:g=null}=t,_=e===`drawer`,v=e===`alert-dialog`,x=v?!0:d,C=v||c,w=v?`alertdialog`:`dialog`,T=M(!0),E={modal:x,disablePointerDismissal:C,nested:T!=null,role:w},D=l((e,t)=>new B({open:i,openProp:r,activeTriggerId:g,triggerIdProp:m,...E},e,t),!0);D.useControlledProp(`openProp`,r),D.useControlledProp(`triggerIdProp`,m),D.useSyncedValues(E),D.useContextCallback(`onOpenChange`,o),D.useContextCallback(`onOpenChangeComplete`,s);let O=D.useState(`open`),k=D.useState(`mounted`),N=D.useState(`payload`);b(D,O),u(D);let{forceUnmount:P}=a(O,D);A.useImperativeHandle(f,()=>({unmount:P,close:()=>D.setOpen(!1,S(y))}),[P,D]);let I=O||k;return(0,F.jsxs)(j.Provider,{value:D,children:[p&&(0,F.jsx)(h,{handle:p,store:D}),I&&(0,F.jsx)(R,{store:D,parentContext:T?.context,isDrawer:_}),typeof n==`function`?n({payload:N}):n]})}var G=A.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=P(),c=M(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`transitionStatus`),f=c.useState(`nestedOpenDialogCount`),p=c.useState(`mounted`),m=c.useStateSetter(`viewportElement`);return D(`div`,e,{enabled:s||p,state:{open:l,nested:u,transitionStatus:d,nestedDialogOpen:f>0},ref:[t,m],stateAttributesMapping:I,props:[{role:`presentation`,hidden:!p,style:{pointerEvents:l?void 0:`none`},children:a},o]})});export{I as a,L as i,W as n,P as o,V as r,M as s,G as t};
@@ -1 +1 @@
1
- import{i as e,t}from"./react-SIfiwpqq.js";import{Dt as n,Jt as r}from"./runtime-BkRtSwRY.js";import{Tt as i}from"./primary-0ymoUGkq.js";import{P as a}from"./composerDraftStore-_Xy-iY4b.js";import{f as o,t as ee}from"./utils-c6dglOTK.js";import{c as te}from"./useSwipeDismiss-B8Fo31QE.js";import{a as s,c,i as l,l as u,n as ne,o as d,s as f,t as re,u as p}from"./rightPanelRouteSearch-DkhE1otz.js";import{t as ie}from"./useNavigate-2tVq4iZ2.js";import{a as ae,c as oe,d as se,f as ce,i as m,l as le,n as ue,o as de,p as fe,r as pe,t as h,u as me}from"./ChatRightPanel-CL4qBTZb.js";import{s as he}from"./tabSwitchInstrumentation-CLDM7g1_.js";import"./device-CLd1blIe.js";import"./storeSelectors-BLHJVLCP.js";import{t as ge}from"./usePresentationTier-B_SCFvN7.js";import{o as g}from"./sidebar-H-CSxQVD.js";import{n as _e}from"./NoActiveThreadState-BWs9JspL.js";var _=e(t(),1),v=o();function y({rawDraftId:e,search:t}){let o=ie(),y=a.make(e),b=`draft:${y}`,ve=(0,_.useCallback)(e=>{o({to:`/draft/$draftId`,params:{draftId:y},replace:!0,search:e})},[y,o]),x=me({threadKey:b,search:t,replaceSearch:ve}),S=fe(y),C=r((0,_.useMemo)(()=>n(S?.threadId??null),[S?.threadId])),w=oe(C),T=(0,_.useMemo)(()=>S?.promotedTo?w?S.promotedTo:null:C?{environmentId:C.environmentId,threadId:C.id}:null,[S?.promotedTo,C,w]),E=x.diff===`1`,D=x.preview===`1`,O=re(x),k=ne(x),A=x.workspaceTab===`agent`&&x.workspaceAgentKey?x.workspaceAgentKey:null,j=he(le),M=ge(),N=T?`${T.environmentId}:${T.threadId}`:null,P=i(e=>N?e.pendingOpenByThreadKey[N]:void 0),F=i(e=>e.consumeOpenRequest),ye=_e(),{maximized:I,toggleMaximized:be}=ce({threadKey:y,open:k,canMaximize:!j&&M!==`phone`}),[L,R]=(0,_.useState)(()=>({draftId:y,hasOpenedDiff:E,hasOpenedPreview:D,hasOpenedTerminal:O===`terminal`,hasOpenedSimulator:O===`simulator`,hasOpenedAgents:O===`agents`,openedAgentKeys:A?[A]:[]}));(0,_.useEffect)(()=>{!T||!P||M===`phone`||(F(T.environmentId,T.threadId),o({to:`/draft/$draftId`,params:{draftId:y},search:e=>c(e)}))},[T,F,y,o,P,M]);let z=L.draftId===y?L.hasOpenedDiff:E,B=L.draftId===y?L.hasOpenedPreview:D,V=L.draftId===y?L.hasOpenedTerminal:O===`terminal`,H=L.draftId===y?L.hasOpenedSimulator:O===`simulator`,U=L.draftId===y?L.hasOpenedAgents:O===`agents`,W=(0,_.useMemo)(()=>{let e=L.draftId===y?L.openedAgentKeys:A?[A]:[];return A&&!e.includes(A)?[...e,A]:e},[A,y,L]),[G,K]=(0,_.useState)(()=>O??`files`),q=(0,_.useMemo)(()=>{let e=[];return(B||O===`files`)&&e.push(`files`),(z||O===`review`)&&e.push(`review`),(V||O===`terminal`)&&e.push(`terminal`),(H||O===`simulator`)&&e.push(`simulator`),(U||O===`agents`)&&e.push(`agents`),e},[U,z,B,H,V,O]),J=(0,_.useCallback)(e=>{K(e),R(t=>{let n={draftId:y,hasOpenedDiff:(t.draftId===y?t.hasOpenedDiff:E)||e===`review`,hasOpenedPreview:(t.draftId===y?t.hasOpenedPreview:D)||e===`files`,hasOpenedTerminal:(t.draftId===y?t.hasOpenedTerminal:O===`terminal`)||e===`terminal`,hasOpenedSimulator:(t.draftId===y?t.hasOpenedSimulator:O===`simulator`)||e===`simulator`,hasOpenedAgents:(t.draftId===y?t.hasOpenedAgents:O===`agents`)||e===`agents`,openedAgentKeys:t.draftId===y?t.openedAgentKeys:W};return t.draftId===n.draftId&&t.hasOpenedDiff===n.hasOpenedDiff&&t.hasOpenedPreview===n.hasOpenedPreview&&t.hasOpenedTerminal===n.hasOpenedTerminal&&t.hasOpenedSimulator===n.hasOpenedSimulator&&t.hasOpenedAgents===n.hasOpenedAgents&&t.openedAgentKeys===n.openedAgentKeys?t:n})},[E,y,W,D,O]),Y=(0,_.useCallback)(()=>{o({to:`/draft/$draftId`,params:{draftId:y},search:e=>pe(e)})},[y,o]),X=(0,_.useCallback)(()=>{o({to:`/draft/$draftId`,params:{draftId:y},search:e=>{let t=W[W.length-1];return G===`agent`&&t?l(e,t):G===`files`&&B?d(e):G===`review`&&z?f(e):G===`terminal`&&V?u(e):G===`simulator`&&H?c(e):G===`agents`&&U?s(e):B?d(e):z?f(e):V?u(e):H?c(e):U?s(e):t?l(e,t):p(e)}})},[y,U,z,B,H,V,G,o,W]),Z=(0,_.useCallback)(()=>{if(k){Y();return}X()},[Y,X,k]),Q=(0,_.useCallback)(e=>{if(e.mode===`agent`){let t=W.filter(t=>t!==e.agentKey);R(e=>({draftId:y,hasOpenedDiff:e.draftId===y?e.hasOpenedDiff:z,hasOpenedPreview:e.draftId===y?e.hasOpenedPreview:B,hasOpenedTerminal:e.draftId===y?e.hasOpenedTerminal:V,hasOpenedSimulator:e.draftId===y?e.hasOpenedSimulator:H,hasOpenedAgents:e.draftId===y?e.hasOpenedAgents:U,openedAgentKeys:t})),O===`agent`&&A===e.agentKey&&o({to:`/draft/$draftId`,params:{draftId:y},search:e=>{let n=t[t.length-1];return n?l(e,n):B?d(e):z?f(e):V?u(e):H?c(e):U?s(e):p(e)}});return}let t=e.mode===`review`?!1:z||O===`review`,n=e.mode===`files`?!1:B||O===`files`,r=e.mode===`terminal`?!1:V||O===`terminal`,i=e.mode===`simulator`?!1:H||O===`simulator`,a=e.mode===`agents`?!1:U||O===`agents`;R(e=>{let o={draftId:y,hasOpenedDiff:t,hasOpenedPreview:n,hasOpenedTerminal:r,hasOpenedSimulator:i,hasOpenedAgents:a,openedAgentKeys:e.draftId===y?e.openedAgentKeys:W};return e.draftId===o.draftId&&e.hasOpenedDiff===o.hasOpenedDiff&&e.hasOpenedPreview===o.hasOpenedPreview&&e.hasOpenedTerminal===o.hasOpenedTerminal&&e.hasOpenedSimulator===o.hasOpenedSimulator&&e.hasOpenedAgents===o.hasOpenedAgents&&e.openedAgentKeys===o.openedAgentKeys?e:o}),O===e.mode&&o({to:`/draft/$draftId`,params:{draftId:y},search:o=>e.mode!==`files`&&n?d(o):e.mode!==`review`&&t?f(o):e.mode!==`terminal`&&r?u(o):e.mode!==`simulator`&&i?c(o):e.mode!==`agents`&&a?s(o):p(o)})},[A,y,U,z,B,H,V,o,W,O]);if((0,_.useEffect)(()=>{O!==null&&(K(O),J(O))},[J,O]),(0,_.useEffect)(()=>{A&&R(e=>{let t=e.draftId===y?e.openedAgentKeys:[];return t.includes(A)?e.draftId===y?e:{draftId:y,hasOpenedDiff:z,hasOpenedPreview:B,hasOpenedTerminal:V,hasOpenedSimulator:H,hasOpenedAgents:U,openedAgentKeys:t}:{draftId:y,hasOpenedDiff:e.draftId===y?e.hasOpenedDiff:E,hasOpenedPreview:e.draftId===y?e.hasOpenedPreview:D,hasOpenedTerminal:e.draftId===y?e.hasOpenedTerminal:O===`terminal`,hasOpenedSimulator:e.draftId===y?e.hasOpenedSimulator:O===`simulator`,hasOpenedAgents:e.draftId===y?e.hasOpenedAgents:O===`agents`,openedAgentKeys:[...t,A]}})},[A,E,y,U,z,B,H,V,D,O]),(0,_.useEffect)(()=>{T&&(se(b,`${T.environmentId}:${T.threadId}`),o({to:`/$environmentId/$threadId`,params:te(T),replace:!0}))},[T,o,b]),(0,_.useEffect)(()=>{S||T||o({to:`/`,replace:!0})},[T,S,o]),T)return(0,v.jsx)(g,{className:`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,children:(0,v.jsx)(m,{environmentId:T.environmentId,threadId:T.threadId,routeKind:`server`})});if(!S)return null;let xe=k||O===`review`||z||O===`files`||B||O===`terminal`||V||O===`simulator`||H||O===`agents`||U||O===`agent`||W.length>0,Se=k||O===`review`||z||O===`files`||B||O===`terminal`||V||O===`agent`||W.length>0,$=k?O:G;return M===`phone`?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(g,{className:`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,children:(0,v.jsx)(m,{draftId:y,environmentId:S.environmentId,threadId:S.threadId,onDiffPanelOpen:()=>J(`review`),onPreviewPanelOpen:()=>J(`files`),onTerminalPanelOpen:()=>J(`terminal`),onAgentPanelOpen:()=>J(`agent`),workspacePanelOpen:k,onToggleWorkspacePanel:Z,routeKind:`draft`})}),(0,v.jsx)(de,{label:`Workspace`,open:k,onClose:Y,children:Se?(0,v.jsx)(h,{mode:`phone`,panelMode:$,openedPanelModes:q,openedAgentKeys:W,onClosePanelTab:Q}):null})]}):j?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(g,{className:`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,children:(0,v.jsx)(m,{draftId:y,environmentId:S.environmentId,threadId:S.threadId,onDiffPanelOpen:()=>J(`review`),onPreviewPanelOpen:()=>J(`files`),onTerminalPanelOpen:()=>J(`terminal`),onAgentPanelOpen:()=>J(`agent`),workspacePanelOpen:k,onToggleWorkspacePanel:Z,routeKind:`draft`})}),(0,v.jsx)(ae,{open:k,onClose:Y,children:xe?(0,v.jsx)(h,{mode:`sheet`,panelMode:$,openedPanelModes:q,openedAgentKeys:W,onClosePanelTab:Q}):null})]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(g,{className:ee(`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,I&&`w-0 flex-none`),inert:I?!0:void 0,children:(0,v.jsx)(m,{draftId:y,environmentId:S.environmentId,threadId:S.threadId,onDiffPanelOpen:()=>J(`review`),onPreviewPanelOpen:()=>J(`files`),onTerminalPanelOpen:()=>J(`terminal`),onAgentPanelOpen:()=>J(`agent`),workspacePanelOpen:k,onToggleWorkspacePanel:Z,routeKind:`draft`})}),(0,v.jsx)(ue,{open:k,panelMode:$,openedPanelModes:q,openedAgentKeys:W,onClosePanelTab:Q,onClose:Y,onOpen:X,renderContent:xe,maximized:I,onToggleMaximized:be,reserveChromeInset:I&&ye})]})}export{y as DraftChatThreadRouteView};
1
+ import{i as e,t}from"./react-SIfiwpqq.js";import{Dt as n,Jt as r}from"./runtime-CqhG6EOG.js";import{Tt as i}from"./primary-OskAInOO.js";import{P as a}from"./composerDraftStore-BaAeiPHc.js";import{f as o,t as ee}from"./utils-BPUctpTG.js";import{c as te}from"./useSwipeDismiss-DESLmDpT.js";import{a as s,c,i as l,l as u,n as ne,o as d,s as f,t as re,u as p}from"./rightPanelRouteSearch-DE_7uWlN.js";import{t as ie}from"./useNavigate-2tVq4iZ2.js";import{a as ae,c as oe,d as se,f as ce,i as m,l as le,n as ue,o as de,p as fe,r as pe,t as h,u as me}from"./ChatRightPanel-DAVHrLN_.js";import{s as he}from"./tabSwitchInstrumentation-CLDM7g1_.js";import"./device-hx7RX9fI.js";import"./storeSelectors-CP3vrsGY.js";import{t as ge}from"./usePresentationTier-B_SCFvN7.js";import{o as g}from"./sidebar-Dft4bIEi.js";import{n as _e}from"./NoActiveThreadState-B020r2KX.js";var _=e(t(),1),v=o();function y({rawDraftId:e,search:t}){let o=ie(),y=a.make(e),b=`draft:${y}`,ve=(0,_.useCallback)(e=>{o({to:`/draft/$draftId`,params:{draftId:y},replace:!0,search:e})},[y,o]),x=me({threadKey:b,search:t,replaceSearch:ve}),S=fe(y),C=r((0,_.useMemo)(()=>n(S?.threadId??null),[S?.threadId])),w=oe(C),T=(0,_.useMemo)(()=>S?.promotedTo?w?S.promotedTo:null:C?{environmentId:C.environmentId,threadId:C.id}:null,[S?.promotedTo,C,w]),E=x.diff===`1`,D=x.preview===`1`,O=re(x),k=ne(x),A=x.workspaceTab===`agent`&&x.workspaceAgentKey?x.workspaceAgentKey:null,j=he(le),M=ge(),N=T?`${T.environmentId}:${T.threadId}`:null,P=i(e=>N?e.pendingOpenByThreadKey[N]:void 0),F=i(e=>e.consumeOpenRequest),ye=_e(),{maximized:I,toggleMaximized:be}=ce({threadKey:y,open:k,canMaximize:!j&&M!==`phone`}),[L,R]=(0,_.useState)(()=>({draftId:y,hasOpenedDiff:E,hasOpenedPreview:D,hasOpenedTerminal:O===`terminal`,hasOpenedSimulator:O===`simulator`,hasOpenedAgents:O===`agents`,openedAgentKeys:A?[A]:[]}));(0,_.useEffect)(()=>{!T||!P||M===`phone`||(F(T.environmentId,T.threadId),o({to:`/draft/$draftId`,params:{draftId:y},search:e=>c(e)}))},[T,F,y,o,P,M]);let z=L.draftId===y?L.hasOpenedDiff:E,B=L.draftId===y?L.hasOpenedPreview:D,V=L.draftId===y?L.hasOpenedTerminal:O===`terminal`,H=L.draftId===y?L.hasOpenedSimulator:O===`simulator`,U=L.draftId===y?L.hasOpenedAgents:O===`agents`,W=(0,_.useMemo)(()=>{let e=L.draftId===y?L.openedAgentKeys:A?[A]:[];return A&&!e.includes(A)?[...e,A]:e},[A,y,L]),[G,K]=(0,_.useState)(()=>O??`files`),q=(0,_.useMemo)(()=>{let e=[];return(B||O===`files`)&&e.push(`files`),(z||O===`review`)&&e.push(`review`),(V||O===`terminal`)&&e.push(`terminal`),(H||O===`simulator`)&&e.push(`simulator`),(U||O===`agents`)&&e.push(`agents`),e},[U,z,B,H,V,O]),J=(0,_.useCallback)(e=>{K(e),R(t=>{let n={draftId:y,hasOpenedDiff:(t.draftId===y?t.hasOpenedDiff:E)||e===`review`,hasOpenedPreview:(t.draftId===y?t.hasOpenedPreview:D)||e===`files`,hasOpenedTerminal:(t.draftId===y?t.hasOpenedTerminal:O===`terminal`)||e===`terminal`,hasOpenedSimulator:(t.draftId===y?t.hasOpenedSimulator:O===`simulator`)||e===`simulator`,hasOpenedAgents:(t.draftId===y?t.hasOpenedAgents:O===`agents`)||e===`agents`,openedAgentKeys:t.draftId===y?t.openedAgentKeys:W};return t.draftId===n.draftId&&t.hasOpenedDiff===n.hasOpenedDiff&&t.hasOpenedPreview===n.hasOpenedPreview&&t.hasOpenedTerminal===n.hasOpenedTerminal&&t.hasOpenedSimulator===n.hasOpenedSimulator&&t.hasOpenedAgents===n.hasOpenedAgents&&t.openedAgentKeys===n.openedAgentKeys?t:n})},[E,y,W,D,O]),Y=(0,_.useCallback)(()=>{o({to:`/draft/$draftId`,params:{draftId:y},search:e=>pe(e)})},[y,o]),X=(0,_.useCallback)(()=>{o({to:`/draft/$draftId`,params:{draftId:y},search:e=>{let t=W[W.length-1];return G===`agent`&&t?l(e,t):G===`files`&&B?d(e):G===`review`&&z?f(e):G===`terminal`&&V?u(e):G===`simulator`&&H?c(e):G===`agents`&&U?s(e):B?d(e):z?f(e):V?u(e):H?c(e):U?s(e):t?l(e,t):p(e)}})},[y,U,z,B,H,V,G,o,W]),Z=(0,_.useCallback)(()=>{if(k){Y();return}X()},[Y,X,k]),Q=(0,_.useCallback)(e=>{if(e.mode===`agent`){let t=W.filter(t=>t!==e.agentKey);R(e=>({draftId:y,hasOpenedDiff:e.draftId===y?e.hasOpenedDiff:z,hasOpenedPreview:e.draftId===y?e.hasOpenedPreview:B,hasOpenedTerminal:e.draftId===y?e.hasOpenedTerminal:V,hasOpenedSimulator:e.draftId===y?e.hasOpenedSimulator:H,hasOpenedAgents:e.draftId===y?e.hasOpenedAgents:U,openedAgentKeys:t})),O===`agent`&&A===e.agentKey&&o({to:`/draft/$draftId`,params:{draftId:y},search:e=>{let n=t[t.length-1];return n?l(e,n):B?d(e):z?f(e):V?u(e):H?c(e):U?s(e):p(e)}});return}let t=e.mode===`review`?!1:z||O===`review`,n=e.mode===`files`?!1:B||O===`files`,r=e.mode===`terminal`?!1:V||O===`terminal`,i=e.mode===`simulator`?!1:H||O===`simulator`,a=e.mode===`agents`?!1:U||O===`agents`;R(e=>{let o={draftId:y,hasOpenedDiff:t,hasOpenedPreview:n,hasOpenedTerminal:r,hasOpenedSimulator:i,hasOpenedAgents:a,openedAgentKeys:e.draftId===y?e.openedAgentKeys:W};return e.draftId===o.draftId&&e.hasOpenedDiff===o.hasOpenedDiff&&e.hasOpenedPreview===o.hasOpenedPreview&&e.hasOpenedTerminal===o.hasOpenedTerminal&&e.hasOpenedSimulator===o.hasOpenedSimulator&&e.hasOpenedAgents===o.hasOpenedAgents&&e.openedAgentKeys===o.openedAgentKeys?e:o}),O===e.mode&&o({to:`/draft/$draftId`,params:{draftId:y},search:o=>e.mode!==`files`&&n?d(o):e.mode!==`review`&&t?f(o):e.mode!==`terminal`&&r?u(o):e.mode!==`simulator`&&i?c(o):e.mode!==`agents`&&a?s(o):p(o)})},[A,y,U,z,B,H,V,o,W,O]);if((0,_.useEffect)(()=>{O!==null&&(K(O),J(O))},[J,O]),(0,_.useEffect)(()=>{A&&R(e=>{let t=e.draftId===y?e.openedAgentKeys:[];return t.includes(A)?e.draftId===y?e:{draftId:y,hasOpenedDiff:z,hasOpenedPreview:B,hasOpenedTerminal:V,hasOpenedSimulator:H,hasOpenedAgents:U,openedAgentKeys:t}:{draftId:y,hasOpenedDiff:e.draftId===y?e.hasOpenedDiff:E,hasOpenedPreview:e.draftId===y?e.hasOpenedPreview:D,hasOpenedTerminal:e.draftId===y?e.hasOpenedTerminal:O===`terminal`,hasOpenedSimulator:e.draftId===y?e.hasOpenedSimulator:O===`simulator`,hasOpenedAgents:e.draftId===y?e.hasOpenedAgents:O===`agents`,openedAgentKeys:[...t,A]}})},[A,E,y,U,z,B,H,V,D,O]),(0,_.useEffect)(()=>{T&&(se(b,`${T.environmentId}:${T.threadId}`),o({to:`/$environmentId/$threadId`,params:te(T),replace:!0}))},[T,o,b]),(0,_.useEffect)(()=>{S||T||o({to:`/`,replace:!0})},[T,S,o]),T)return(0,v.jsx)(g,{className:`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,children:(0,v.jsx)(m,{environmentId:T.environmentId,threadId:T.threadId,routeKind:`server`})});if(!S)return null;let xe=k||O===`review`||z||O===`files`||B||O===`terminal`||V||O===`simulator`||H||O===`agents`||U||O===`agent`||W.length>0,Se=k||O===`review`||z||O===`files`||B||O===`terminal`||V||O===`agent`||W.length>0,$=k?O:G;return M===`phone`?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(g,{className:`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,children:(0,v.jsx)(m,{draftId:y,environmentId:S.environmentId,threadId:S.threadId,onDiffPanelOpen:()=>J(`review`),onPreviewPanelOpen:()=>J(`files`),onTerminalPanelOpen:()=>J(`terminal`),onAgentPanelOpen:()=>J(`agent`),workspacePanelOpen:k,onToggleWorkspacePanel:Z,routeKind:`draft`})}),(0,v.jsx)(de,{label:`Workspace`,open:k,onClose:Y,children:Se?(0,v.jsx)(h,{mode:`phone`,panelMode:$,openedPanelModes:q,openedAgentKeys:W,onClosePanelTab:Q}):null})]}):j?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(g,{className:`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,children:(0,v.jsx)(m,{draftId:y,environmentId:S.environmentId,threadId:S.threadId,onDiffPanelOpen:()=>J(`review`),onPreviewPanelOpen:()=>J(`files`),onTerminalPanelOpen:()=>J(`terminal`),onAgentPanelOpen:()=>J(`agent`),workspacePanelOpen:k,onToggleWorkspacePanel:Z,routeKind:`draft`})}),(0,v.jsx)(ae,{open:k,onClose:Y,children:xe?(0,v.jsx)(h,{mode:`sheet`,panelMode:$,openedPanelModes:q,openedAgentKeys:W,onClosePanelTab:Q}):null})]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(g,{className:ee(`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,I&&`w-0 flex-none`),inert:I?!0:void 0,children:(0,v.jsx)(m,{draftId:y,environmentId:S.environmentId,threadId:S.threadId,onDiffPanelOpen:()=>J(`review`),onPreviewPanelOpen:()=>J(`files`),onTerminalPanelOpen:()=>J(`terminal`),onAgentPanelOpen:()=>J(`agent`),workspacePanelOpen:k,onToggleWorkspacePanel:Z,routeKind:`draft`})}),(0,v.jsx)(ue,{open:k,panelMode:$,openedPanelModes:q,openedAgentKeys:W,onClosePanelTab:Q,onClose:Y,onOpen:X,renderContent:xe,maximized:I,onToggleMaximized:be,reserveChromeInset:I&&ye})]})}export{y as DraftChatThreadRouteView};
@@ -1,2 +1,2 @@
1
- import{v as e}from"./authorization-CFcCWeGd.js";function t(e){return e.status===`refused`&&e.errorCode===`step_up_required`}function n(t){return t===e}function r(e,t){return!e.inferredErrorCode||t<3}var i=`The Hub refused this change every time. It answers a missing authenticator code and other refusals identically, so if the codes you entered were current then something else is blocking this — sign in again with a passkey, or try again later.`;function a(e,t,n){return!e||n&&t===`step_up_required`?null:e}function o(e){return e.revokedAt!==null}function s(e){return e.filter(e=>!o(e))}function c(e){return e.toSorted((e,t)=>!!o(e)-+!!o(t))}function l(e){return s(e).filter(e=>e.backupState===!0).length}function u(e,t){if(t!==`ready`)return null;let n=s(e).length;return n===0?{variant:`error`,title:`No usable passkey on this account`,description:`Without one you can only get back in through a fallback credential. Adding a passkey is the only action on this page that makes the account stronger.`,actionLabel:`Add your first passkey`}:n===1?{variant:`warning`,title:`One passkey on this account`,description:`If you lose this device you fall back to a password or a recovery code. Add a second passkey on another device.`,actionLabel:`Add another passkey`}:null}function d(e){return e.label?.trim()||`Unnamed passkey (${e.id.slice(0,12)}…)`}function f(e){return e.backupState===!0?`Synced to your password manager`:e.backupEligible===!0?`Can be synced, not yet backed up`:e.backupEligible===!1?`Tied to this device only`:null}function p(e){let t=e.trim();return t.length===0?null:t}function m(e){return e.replace(/\D/gu,``).slice(0,16)}function h(e){return m(e).length>=6}function g(e,t){return e.length===0?`Enter a password.`:e.length>256?`Use 256 characters or fewer.`:t.length===0?`Re-enter the password to confirm it.`:e===t?null:`The two passwords do not match.`}function _(e){let t=e.trim();return t.length===0?`Enter an email address.`:t.length>254?`Use 254 characters or fewer.`:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u.test(t)?null:`Enter a valid email address.`}function v(e){return e.join(`
1
+ import{v as e}from"./authorization-mIJKV2yp.js";function t(e){return e.status===`refused`&&e.errorCode===`step_up_required`}function n(t){return t===e}function r(e,t){return!e.inferredErrorCode||t<3}var i=`The Hub refused this change every time. It answers a missing authenticator code and other refusals identically, so if the codes you entered were current then something else is blocking this — sign in again with a passkey, or try again later.`;function a(e,t,n){return!e||n&&t===`step_up_required`?null:e}function o(e){return e.revokedAt!==null}function s(e){return e.filter(e=>!o(e))}function c(e){return e.toSorted((e,t)=>!!o(e)-+!!o(t))}function l(e){return s(e).filter(e=>e.backupState===!0).length}function u(e,t){if(t!==`ready`)return null;let n=s(e).length;return n===0?{variant:`error`,title:`No usable passkey on this account`,description:`Without one you can only get back in through a fallback credential. Adding a passkey is the only action on this page that makes the account stronger.`,actionLabel:`Add your first passkey`}:n===1?{variant:`warning`,title:`One passkey on this account`,description:`If you lose this device you fall back to a password or a recovery code. Add a second passkey on another device.`,actionLabel:`Add another passkey`}:null}function d(e){return e.label?.trim()||`Unnamed passkey (${e.id.slice(0,12)}…)`}function f(e){return e.backupState===!0?`Synced to your password manager`:e.backupEligible===!0?`Can be synced, not yet backed up`:e.backupEligible===!1?`Tied to this device only`:null}function p(e){let t=e.trim();return t.length===0?null:t}function m(e){return e.replace(/\D/gu,``).slice(0,16)}function h(e){return m(e).length>=6}function g(e,t){return e.length===0?`Enter a password.`:e.length>256?`Use 256 characters or fewer.`:t.length===0?`Re-enter the password to confirm it.`:e===t?null:`The two passwords do not match.`}function _(e){let t=e.trim();return t.length===0?`Enter an email address.`:t.length>254?`Use 254 characters or fewer.`:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u.test(t)?null:`Enter a valid email address.`}function v(e){return e.join(`
2
2
  `)}var y={"set-password":`Confirm the password change`,"remove-password":`Confirm removing the password`,"revoke-totp":`Confirm removing two-factor authentication`,"request-email-verification":`Confirm the email change`,"add-passkey":`Confirm adding a passkey`,"regenerate-recovery-codes":`Confirm new recovery codes`,"connect-github":`Confirm connecting GitHub`,"disconnect-github":`Confirm disconnecting GitHub`};function b(e){return y[e]}function x(e,t){return e===0?t?`The Hub refused this change without saying why. The usual reason is that it wants a code from your authenticator app.`:`The Hub asked for a code from your authenticator app before making this change.`:t?`That did not work. The Hub answers a wrong code and other refusals identically, so this may not be about the code at all. You can try the code showing now.`:`That code was not accepted. Codes change every 30 seconds — enter the one showing now.`}function S(e){return e?.providers.find(e=>e.provider===`github`)??null}var C={external_provider_unavailable:`GitHub sign-in is temporarily unavailable. Try again later.`,external_authorization_cancelled:`GitHub authorization was cancelled.`,external_authorization_expired:`GitHub authorization expired. Start again.`,external_authorization_rejected:`GitHub could not authorize this request. Try again.`,external_identity_email_conflict:`An account already uses that verified email. Sign in another way, then connect GitHub from account settings.`,external_identity_verified_email_required:`GitHub needs a verified primary email before it can create a Ryco account.`,signup_disabled:`New account signup is closed. Linked GitHub accounts can still sign in.`,username_unavailable:`That username is unavailable. Choose another one and try again.`};function w(e){return C[e]}async function T(e){let t=await e.start({provider:`github`,intent:e.intent,returnTo:e.returnTo});e.navigate(t.authorizationUrl)}export{l as C,b as S,f as _,u as a,r as b,v as c,n as d,t as f,c as g,m as h,i,a as l,p as m,w as n,s as o,h as p,S as r,_ as s,T as t,o as u,d as v,x,g as y};
@@ -1 +1 @@
1
- import{t as e}from"./utils-c6dglOTK.js";import"./appearancePreferences-COvj0WMT.js";var t={sheet:`app-glass-surface-sheet`,chip:`app-glass-surface-chip`,dock:`app-glass-surface-dock`};function n(n){return e(`app-glass-surface`,t[n])}export{n as t};
1
+ import{t as e}from"./utils-BPUctpTG.js";import"./appearancePreferences-COvj0WMT.js";var t={sheet:`app-glass-surface-sheet`,chip:`app-glass-surface-chip`,dock:`app-glass-surface-dock`};function n(n){return e(`app-glass-surface`,t[n])}export{n as t};
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{n as r}from"./env-B4arEvJg.js";import{Ir as i,Nr as a}from"./src-Vf4LVnMX.js";import{N as o}from"./runtime-CqhG6EOG.js";import{f as s,t as c}from"./utils-BPUctpTG.js";import{_ as l,d as u,f as d,h as f,l as p,m,p as h,r as g,v as _}from"./useHandleNewThread-CzfIpG9Y.js";import{t as v}from"./useNavigate-2tVq4iZ2.js";import{o as y}from"./authorization-mIJKV2yp.js";import{f as b}from"./useRenderElement-DchFnsR8.js";import{t as x}from"./chevron-down-B7C6FKzM.js";import{t as S}from"./copy-UQjKGt7t.js";import{t as C}from"./download-CQZ-m4zW.js";import{t as ee}from"./log-out-tMJm0Gk6.js";import{t as te}from"./refresh-cw-DopCMrtR.js";import{t as w}from"./shield-check-dQ-4cMKk.js";import{t as T}from"./shield-IZEIJ8r7.js";import{t as E}from"./smartphone-gNe1ynB8.js";import{t as ne}from"./user-round-Cpzx8pSw.js";import{t as D}from"./x-C1Cemsov.js";import{t as O}from"./button-CXfaxtRp.js";import{t as k}from"./usePresentationTier-B_SCFvN7.js";import{a as A,i as j,n as re,o as M,s as N,t as P}from"./MobileSheet-PksVmYO6.js";import{t as F}from"./GlassSurface-DTmaROoR.js";import{a as ie,c as ae,i as I,n as L,o as R,r as z,s as oe,t as B}from"./HostedRelayTrustNotice-Cv7T3mW5.js";import{n as V,o as se}from"./settingsSections.logic-F8RXVmAq.js";var ce=b(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),H=b(`shield-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),U=b(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),W=b(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),G=n(),K=e(t(),1),le=Object.freeze({"":`overview`,security:`security`,appearance:`appearance`}),q=Object.freeze({"sign-in":`/sign-in`,"sign-in-password":`/sign-in/password`,"sign-in-recovery-code":`/sign-in/recovery-code`,"sign-up":`/sign-up`,"sign-up-verify":`/public-signup/verify`,"reset-password":`/password-reset`,invitation:`/invitation`,setup:`/setup`,"email-verification":`/email-verification`,nodes:`/nodes`,"nodes-enroll":`/nodes/enroll`}),ue=Object.freeze([`sign-in`,`sign-up`,`public-signup`,`password-reset`,`invitation`,`setup`,`email-verification`,`nodes`,`account`]);function de(e){return e.length>1&&e.endsWith(`/`)?e.slice(0,-1):e===``?`/`:e}function fe(e){let t=de(e);if(t.startsWith(`/account`))return{kind:`account`,section:le[t.slice(8).replace(/^\//,``)]??`overview`};for(let[e,n]of Object.entries(q))if(t===n)return{kind:e};return null}function pe(e){return e.kind===`account`?e.section===`overview`?`/account`:`/account/${e.section}`:q[e.kind]}function me(e){switch(e.kind){case`sign-in`:return`Sign in`;case`sign-in-password`:return`Sign in with a password`;case`sign-in-recovery-code`:return`Use a recovery code`;case`sign-up`:return`Create your account`;case`sign-up-verify`:return`Verify your email`;case`reset-password`:return`Reset your password`;case`invitation`:return`Redeem your invitation`;case`setup`:return`Claim this Hub`;case`email-verification`:return`Email verification`;case`nodes`:return`Your nodes`;case`nodes-enroll`:return`Enroll a node`;case`account`:return e.section===`overview`?`Account`:e.section===`security`?`Security`:`Appearance`}}var he=typeof window>`u`?`/`:de(window.location.pathname),ge=new Set;function _e(){for(let e of Array.from(ge))e()}function ve(e){let t=de(e);t!==he&&(he=t,_e())}var ye=!1;function be(){ye||(ye=!0,_(()=>{ve(f().logicalPathname)}))}function xe(){return m()===null?typeof window>`u`?he:de(window.location.pathname):he}var Se=!1;function Ce(){Se||typeof window>`u`||(Se=!0,window.addEventListener(`popstate`,()=>{m()===null&&_e()}))}function we(e){return be(),Ce(),ge.add(e),()=>{ge.delete(e)}}function Te(e,t){Ee(pe(e),t)}function Ee(e,t){let n=de(e),r=m();if(r){t?.replace===!0?r.replace(n):r.push(n),ve(n);return}typeof window<`u`&&(t?.replace===!0?window.history.replaceState(window.history.state,``,n):window.history.pushState(window.history.state,``,n)),he=n,_e()}function De(){let e=(0,G.c)(2),t=(0,K.useSyncExternalStore)(we,xe),n;return e[0]===t?n=e[1]:(n=fe(t),e[0]=t,e[1]=n),n}var J=s(),Oe={unavailable:`The node from this link is not in your authorized node directory. Choose a node to continue.`,revoked:`Access to the node from this link was revoked. Choose a node to continue.`,offline:`The node from this link is offline. Choose a node to continue.`,"invalid-link":`This node link is not valid. Choose a node to continue.`},ke=null,Ae=new Set;function Y(e){if(ke!==e){ke=e;for(let e of Array.from(Ae))e()}}function je(e){return Ae.add(e),()=>{Ae.delete(e)}}function Me(){return ke===null?null:Oe[ke]}function Ne(){return(0,K.useSyncExternalStore)(je,Me)}function Pe(){return(0,K.useSyncExternalStore)(_,f)}var Fe=new Set([`node`,`draft`,`pair`,`diagnostics`,...ue]);function Ie(e){let t=/^\/([^/]+)\/([^/]+)\/?$/.exec(e);if(!t)return null;let n=t[1]??``;if(Fe.has(n))return null;try{return decodeURIComponent(n)}catch{return n}}function Le(e){let t=/^\/([^/]+)\/([^/]+)\/?$/u.exec(e);if(!t||Fe.has(t[1]??``))return null;try{return{environmentId:a.make(decodeURIComponent(t[1]??``)),threadId:i.make(decodeURIComponent(t[2]??``))}}catch{return null}}function Re(e){return e.startsWith(`/draft/`)}var X=null,Z=null,Q=null,ze=!1,Be=null,Ve=0,He=!1,Ue=null,We=null;function $(e){let t=e?JSON.stringify([e.environmentId,e.threadId]):null;t!==Ue&&(We?.(),We=null,Ue=t,e&&(We=p(e.environmentId,e.threadId)))}function Ge(e){return e?JSON.stringify([e.environmentId,e.threadId]):null}function Ke(){He||(He=!0,queueMicrotask(()=>{He=!1,Ve!==0&&Ye()}))}function qe(e){ze=!0;try{e()}finally{ze=!1}Ke()}function Je(e,t){X=null,Z=null,Q=null,(e===`none`||e===`online`||e===`offline`)&&Y(t),d()}function Ye(){if(ze||!m())return;let e=f(),t=o.getState();if(e.malformed){Y(`invalid-link`),$(null),d();return}if(t.accountStatus!==`authenticated`){$(null),Be===`authenticated`&&Y(null),Be=t.accountStatus;return}Be=t.accountStatus;let n=e.nodeId;if(n===null){if(Q=null,$(null),X=null,Z=null,t.selectedNode&&!g()){let e=t.selectionStatus===`revoked`||t.selectionStatus===`authorization-removed`||t.selectionStatus===`incompatible`;y.returnToDirectory(e?{preserveTerminalSelection:!0}:void 0);return}Xe(e.logicalPathname,t);return}let r=Le(e.logicalPathname);Ge(r)!==Ue&&$(null);let i=t.nodes.find(e=>e.id===n)??null;if(i&&(i.capabilities?.nativeClientRequired===!0||r&&i.environmentId!==r.environmentId)){$(null),Je(t.selectionStatus,`unavailable`);return}if(t.selectedNode?.id===n){if($(r),X=null,Q=null,t.sessionEstablished){Z=null,Y(null);return}if(Z===n&&t.transportStatus===`terminal-failure`&&(t.selectionStatus===`revoked`||t.selectionStatus===`authorization-removed`||t.selectionStatus===`incompatible`)){Z=null,qe(()=>{d(),y.returnToDirectory({preserveTerminalSelection:!0})});return}Z===n&&t.transportStatus===`terminal-failure`&&t.selectionStatus===`offline`&&t.errorMessage===`Ryco state could not be synchronized.`&&qe(()=>{Je(t.selectionStatus,`offline`),y.returnToDirectory()});return}if(t.directoryStatus===`stale`){Je(t.selectionStatus,`unavailable`);return}if(t.directoryStatus!==`ready`||t.browserStatus!==`current`)return;let a=t.nodes.find(e=>e.id===n);if(!a){Je(t.selectionStatus,`unavailable`);return}if(a.revokedAt!==null){Je(t.selectionStatus,`revoked`);return}let s=Q===n;$(r);let c=r!==null&&!a.presence.online&&!s;r&&g()&&!c||X!==n&&(X=n,Z=s?null:n,Q=null,Y(null),y.selectNode(a.id).finally(()=>{X===n&&(X=null)}))}function Xe(e,t){if(Re(e)){d();return}let n=Ie(e);if(n===null)return;if(t.directoryStatus===`stale`){Y(`unavailable`),d();return}if(t.directoryStatus!==`ready`)return;let r=t.nodes.find(e=>e.environmentId===n&&e.revokedAt===null);if(!r){Y(`unavailable`),d();return}u(r.id)}function Ze(e){return m()?(Q=e,Y(null),h(e)):!1}function Qe(){if(!m())return!1;Q=null,Y(null);let e=f();return e.nodeId===null&&e.logicalPathname===`/nodes`||l()}function $e(){Ve+=1;let e=_(Ke),t=o.subscribe(Ke),n=m()?.subscribe(()=>Ke());Ke();let r=!1;return()=>{r||(r=!0,--Ve,e(),t(),n?.())}}function et(){let e=(0,G.c)(1),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,K.useEffect)(tt,t)}function tt(){return $e()}function nt(e){let t=(0,G.c)(11),{label:n,status:r,icon:i,onClick:a,testId:o,className:s}=e,l;t[0]===s?l=t[1]:(l=c(F(`chip`),`flex min-h-11 min-w-11 max-w-[136px] shrink items-center justify-center gap-1.5 rounded-full border border-border px-2.5 text-xs font-medium outline-none focus-visible:ring-2 focus-visible:ring-ring`,s),t[0]=s,t[1]=l);let u;t[2]===r?u=t[3]:(u=(0,J.jsx)(`span`,{"data-slot":`mobile-status-chip-status`,className:`min-w-0 truncate`,children:r}),t[2]=r,t[3]=u);let d;return t[4]!==i||t[5]!==n||t[6]!==a||t[7]!==l||t[8]!==u||t[9]!==o?(d=(0,J.jsxs)(`button`,{type:`button`,"aria-label":n,"data-slot":`mobile-status-chip`,"data-testid":o,className:l,onClick:a,children:[i,u]}),t[4]=i,t[5]=n,t[6]=a,t[7]=l,t[8]=u,t[9]=o,t[10]=d):d=t[10],d}var rt={legacy:{glyph:`legacy`,iconClassName:`text-amber-500`},web:{glyph:`browser-encrypted`,iconClassName:`text-sky-500`},e2ee:{glyph:`native-verified`,iconClassName:`text-emerald-500`}};function it(e){return e.guarantee===`none`?e.connected?{glyph:`connected`,iconClassName:`text-emerald-500`}:{glyph:`disconnected`,iconClassName:`text-amber-500`}:rt[e.guarantee]}function at(){let e=(0,G.c)(19),t=ie(),n=R(),i=o(ct),a=o(st),s=o(ot);if(t!==`web-unsigned`)return null;let c,l;e[0]!==n||e[1]!==a||e[2]!==i||e[3]!==s?(c=z(se(`security`,{hosted:r(),role:V(i,a,s)})),l=I(n,c),e[0]=n,e[1]=a,e[2]=i,e[3]=s,e[4]=c,e[5]=l):(c=e[4],l=e[5]);let u=l;if(!u){let t;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsxs)(`section`,{"aria-label":`Session code`,"data-testid":`hosted-e2ee-verification`,"data-code":`absent`,className:`space-y-2`,children:[(0,J.jsx)(`p`,{className:`text-xs font-medium`,children:`Session code`}),(0,J.jsx)(`p`,{"data-testid":`hosted-e2ee-verification-unavailable`,className:`text-[11px] leading-relaxed text-muted-foreground`,children:L})]}),e[6]=t):t=e[6],t}let d;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,J.jsx)(`p`,{className:`text-xs font-medium`,children:`Session code`}),e[7]=d):d=e[7];let f;e[8]===u.display?f=e[9]:(f=(0,J.jsx)(`p`,{"data-testid":`hosted-e2ee-verification-code`,className:`font-mono text-base leading-none font-semibold tracking-[0.2em] whitespace-nowrap select-all`,children:u.display}),e[8]=u.display,e[9]=f);let p;e[10]===u.display?p=e[11]:(p=()=>void navigator.clipboard.writeText(u.display),e[10]=u.display,e[11]=p);let m;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,J.jsx)(S,{"aria-hidden":!0,className:`size-3.5`}),e[12]=m):m=e[12];let h;e[13]===p?h=e[14]:(h=(0,J.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground`,onClick:p,children:[m,` Copy`]}),e[13]=p,e[14]=h);let g;return e[15]!==c||e[16]!==f||e[17]!==h?(g=(0,J.jsxs)(`section`,{"aria-label":`Session code`,"data-testid":`hosted-e2ee-verification`,"data-code":`present`,"data-form":c,className:`space-y-2`,children:[d,f,h]}),e[15]=c,e[16]=f,e[17]=h,e[18]=g):g=e[18],g}function ot(e){return e.transportStatus}function st(e){return e.directoryStatus}function ct(e){return e.effectiveRole}var lt=`ryco:pwa:activate:v1`,ut=`Installation is temporarily unavailable.`,dt={errorMessage:null,installState:`hidden`,platform:`other`,registrationState:`disabled`,updateState:`idle`};function ft(e){return e===``||e===`./`?`./`:e.endsWith(`/`)?e:`${e}/`}function pt(e){let t=e.navigator.userAgent;return/iPad|iPhone|iPod/.test(t)||/Macintosh/.test(t)&&e.navigator.maxTouchPoints>1}function mt(e){let t=e;return typeof t.prompt==`function`&&t.userChoice instanceof Promise}function ht(e){let t=dt,n=!1,r=null,i=null,a=!!e.navigator.serviceWorker?.controller,o=!1,s=!1,c=new Set,l=e.window.matchMedia(`(display-mode: standalone)`),u=e=>{let n={...t,...e};Object.entries(n).every(([e,n])=>t[e]===n)||(t=n,c.forEach(e=>e()))},d=()=>l.matches||e.navigator.standalone===!0,f=()=>d()?`installed`:`manual-available`,p=e=>{!mt(e)||d()||(e.preventDefault(),r=e,u({installState:`native-available`}))},m=()=>{r=null,u({installState:`installed`})},h=()=>{d()?(r=null,u({installState:`installed`})):u({installState:r?`native-available`:`manual-available`})},g=()=>{let t=a;a=!!e.navigator.serviceWorker?.controller,!(o||!s&&!t)&&(s=!1,o=!0,e.window.reload())},_=t=>{i=t,t.waiting&&u({updateState:`ready`}),t.addEventListener(`updatefound`,()=>{let n=t.installing;n&&n.addEventListener(`statechange`,()=>{n.state===`installed`&&e.navigator.serviceWorker?.controller&&u({updateState:`ready`})})})},v=async()=>{let t=e.navigator.serviceWorker;if(!t){u({registrationState:`unavailable`,errorMessage:ut});return}u({registrationState:`registering`,errorMessage:null});try{let n=ft(e.baseUrl);_(await t.register(`${n}service-worker.js`,{scope:n})),u({registrationState:`ready`,errorMessage:null})}catch{u({registrationState:`unavailable`,errorMessage:ut})}};return{activateUpdate(){let e=i?.waiting;!e||t.updateState!==`ready`||(s=!0,u({updateState:`activating`}),e.postMessage({type:lt}))},dismissInstall(){r=null,u({installState:d()?`installed`:`hidden`})},getSnapshot(){return t},async promptInstall(){let e=r;e&&(r=null,u({installState:`hidden`}),await e.prompt(),(await e.userChoice).outcome===`dismissed`&&!d()&&u({installState:`manual-available`}))},async start(t){n||(n=!0,t.enabled&&(a=!!e.navigator.serviceWorker?.controller,o=!1,u({installState:f(),platform:pt(e)?`ios`:`other`}),e.window.addEventListener(`beforeinstallprompt`,p),e.window.addEventListener(`appinstalled`,m),l.addEventListener(`change`,h),e.navigator.serviceWorker?.addEventListener(`controllerchange`,g),e.document.readyState===`complete`?await v():e.window.addEventListener(`load`,()=>void v(),{once:!0})))},stop(){n&&(n=!1,r=null,i=null,a=!1,o=!1,s=!1,e.window.removeEventListener(`beforeinstallprompt`,p),e.window.removeEventListener(`appinstalled`,m),l.removeEventListener(`change`,h),e.navigator.serviceWorker?.removeEventListener(`controllerchange`,g),t=dt,c.forEach(e=>e()))},subscribe(e){return c.add(e),()=>c.delete(e)}}}function gt(){let e=navigator;return{baseUrl:`/`,document,navigator:{maxTouchPoints:e.maxTouchPoints,userAgent:e.userAgent,...e.serviceWorker?{serviceWorker:e.serviceWorker}:{},...typeof e.standalone==`boolean`?{standalone:e.standalone}:{}},window:{addEventListener:window.addEventListener.bind(window),removeEventListener:window.removeEventListener.bind(window),matchMedia:window.matchMedia.bind(window),reload:()=>window.location.reload()}}}var _t=typeof window>`u`?null:ht(gt());function vt(e){let t=(0,G.c)(3),{compact:n,lifecycle:r}=e,i=n!==void 0&&n,a=r===void 0?_t:r,o;return t[0]!==i||t[1]!==a?(o=a?(0,J.jsx)(yt,{compact:i,lifecycle:a}):null,t[0]=i,t[1]=a,t[2]=o):o=t[2],o}function yt(e){let t=(0,G.c)(27),{compact:n,lifecycle:r}=e,i=(0,K.useSyncExternalStore)(r.subscribe,r.getSnapshot,r.getSnapshot),[a,o]=(0,K.useState)(!1);if(i.installState!==`native-available`&&i.installState!==`manual-available`&&i.updateState===`idle`&&i.registrationState!==`unavailable`)return null;let s=n?`space-y-2`:`mt-4 space-y-3`,c;t[0]!==n||t[1]!==r||t[2]!==i.installState?(c=i.installState===`native-available`?(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,onClick:()=>void r.promptInstall(),children:[(0,J.jsx)(C,{"aria-hidden":!0}),` Install Ryco`]}):null,t[0]=n,t[1]=r,t[2]=i.installState,t[3]=c):c=t[3];let l;t[4]!==n||t[5]!==a||t[6]!==i.installState?(l=i.installState===`manual-available`?(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,"aria-expanded":a,onClick:()=>o(bt),children:[(0,J.jsx)(E,{"aria-hidden":!0}),` How to install`]}):null,t[4]=n,t[5]=a,t[6]=i.installState,t[7]=l):l=t[7];let u;t[8]!==n||t[9]!==r||t[10]!==i.updateState?(u=i.updateState===`idle`?null:(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,disabled:i.updateState===`activating`,onClick:()=>r.activateUpdate(),children:[(0,J.jsx)(te,{"aria-hidden":!0}),i.updateState===`activating`?`Updating…`:`Update ready`]}),t[8]=n,t[9]=r,t[10]=i.updateState,t[11]=u):u=t[11];let d;t[12]!==c||t[13]!==l||t[14]!==u?(d=(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[c,l,u]}),t[12]=c,t[13]=l,t[14]=u,t[15]=d):d=t[15];let f;t[16]!==a||t[17]!==i?(f=a?(0,J.jsx)(xt,{snapshot:i,onClose:()=>o(!1)}):null,t[16]=a,t[17]=i,t[18]=f):f=t[18];let p;t[19]!==i.errorMessage||t[20]!==i.registrationState?(p=i.registrationState===`unavailable`&&i.errorMessage?(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:i.errorMessage}):null,t[19]=i.errorMessage,t[20]=i.registrationState,t[21]=p):p=t[21];let m;return t[22]!==s||t[23]!==d||t[24]!==f||t[25]!==p?(m=(0,J.jsxs)(`section`,{className:s,"aria-label":`Ryco app installation`,children:[d,f,p]}),t[22]=s,t[23]=d,t[24]=f,t[25]=p,t[26]=m):m=t[26],m}function bt(e){return!e}function xt(e){let t=(0,G.c)(13),{snapshot:n,onClose:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsx)(`p`,{className:`font-medium`,children:`Install Ryco on this device`}),t[0]=i):i=t[0];let a;t[1]===n.platform?a=t[2]:(a=(0,J.jsxs)(`div`,{children:[i,n.platform===`ios`?(0,J.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:`In Safari, open the Share or browser menu, choose Add to Home Screen, enable Open as Web App when offered, then tap Add.`}):(0,J.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:`Open the browser menu, choose Add to home screen or Install app, then confirm Install.`})]}),t[1]=n.platform,t[2]=a);let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsx)(D,{"aria-hidden":!0}),t[3]=o):o=t[3];let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsx)(`span`,{className:`sr-only`,children:`Close install instructions`}),t[4]=s):s=t[4];let c;t[5]===r?c=t[6]:(c=(0,J.jsxs)(O,{className:`size-11 shrink-0`,size:`icon`,variant:`ghost`,onClick:r,children:[o,` `,s]}),t[5]=r,t[6]=c);let l;t[7]!==a||t[8]!==c?(l=(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[a,c]}),t[7]=a,t[8]=c,t[9]=l):l=t[9];let u;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,J.jsx)(`div`,{className:`mt-3 border-t border-border pt-3`,children:(0,J.jsx)(B,{compact:!0})}),t[10]=u):u=t[10];let d;return t[11]===l?d=t[12]:(d=(0,J.jsxs)(`div`,{role:`region`,"aria-label":`Install Ryco instructions`,className:`rounded-lg border border-border bg-background p-3 text-sm`,children:[l,u]}),t[11]=l,t[12]=d),d}var St={connected:W,disconnected:U,legacy:H,"browser-encrypted":T,"native-verified":w};function Ct(e){let t=(0,G.c)(9),{indicator:n,className:r,testId:i}=e,a;t[0]===n?a=t[1]:(a=it(n),t[0]=n,t[1]=a);let{glyph:o,iconClassName:s}=a,c=St[o],l=String(n.connected),u=`${r} ${s}`,d;return t[2]!==c||t[3]!==o||t[4]!==n.guarantee||t[5]!==l||t[6]!==u||t[7]!==i?(d=(0,J.jsx)(c,{"aria-hidden":!0,"data-testid":i,"data-connected":l,"data-guarantee":n.guarantee,"data-glyph":o,className:u}),t[2]=c,t[3]=o,t[4]=n.guarantee,t[5]=l,t[6]=u,t[7]=i,t[8]=d):d=t[8],d}function wt(e){let t=(0,G.c)(3),{node:n}=e;if(n.revokedAt){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(`span`,{className:`text-xs text-destructive`,children:`Revoked`}),t[0]=e):e=t[0],e}let r;return t[1]===n.presence.online?r=t[2]:(r=n.presence.online?(0,J.jsxs)(`span`,{className:`flex items-center gap-1 text-xs text-emerald-600 dark:text-emerald-400`,children:[(0,J.jsx)(W,{"aria-hidden":!0,className:`size-3.5`}),` Online`]}):(0,J.jsxs)(`span`,{className:`flex items-center gap-1 text-xs text-muted-foreground`,children:[(0,J.jsx)(U,{"aria-hidden":!0,className:`size-3.5`}),` Offline`]}),t[1]=n.presence.online,t[2]=r),r}function Tt(){let e=(0,G.c)(7),t=v(),n;e[0]===t?n=e[1]:(n=async e=>{Ze(e.id)||(await t({to:`/`,replace:!0}),await y.selectNode(e.id))},e[0]=t,e[1]=n);let r=n,i;e[2]===t?i=e[3]:(i=async()=>{Qe()||(await t({to:`/`,replace:!0}),await y.returnToDirectory())},e[2]=t,e[3]=i);let a=i,o;return e[4]!==a||e[5]!==r?(o={switchNode:r,returnToAllNodes:a},e[4]=a,e[5]=r,e[6]=o):o=e[6],o}function Et(){let e=(0,G.c)(5),t=o(kt),n=o(Ot);if(t!==`delivery-unknown`)return null;let r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(`p`,{children:`A request may or may not have reached the node. Ryco did not resend it automatically.`}),e[0]=r):r=e[0];let i=!n,a=n?void 0:`Wait for session replay to finish before acknowledging this warning.`,s=n?`Acknowledge`:`Synchronizing…`,c;return e[1]!==i||e[2]!==a||e[3]!==s?(c=(0,J.jsxs)(`div`,{role:`alert`,className:`mt-2 rounded-md border border-amber-500/30 bg-amber-500/5 p-2 text-xs`,children:[r,(0,J.jsx)(O,{className:`mt-2`,size:`sm`,variant:`outline`,disabled:i,title:a,onClick:Dt,children:s})]}),e[1]=i,e[2]=a,e[3]=s,e[4]=c):c=e[4],c}function Dt(){return y.acknowledgeDeliveryUnknown()}function Ot(e){return e.sessionRecoveredAfterUnknown}function kt(e){return e.sessionStatus}function At(){let e=(0,G.c)(62),t=o(Vt),n=o(Bt),r=o(zt),i=o(Rt),a=o(Lt),s=o(It),c=o(Ft),l=o(Pt),u=o(Nt),d=ie(),{switchNode:f,returnToAllNodes:p}=Tt(),m=(0,K.useRef)(null);if(!t)return null;let h,g;if(e[0]!==u||e[1]!==d||e[2]!==a||e[3]!==i||e[4]!==r){let t={browserStatus:u,sessionStatus:i,selectionStatus:a,transportStatus:r,e2eeStatus:d};h=ae(t),g=oe(t),e[0]=u,e[1]=d,e[2]=a,e[3]=i,e[4]=r,e[5]=h,e[6]=g}else h=e[5],g=e[6];let _=g,v;e[7]===_?v=e[8]:(v=(0,J.jsx)(Ct,{indicator:_,className:`size-4`}),e[7]=_,e[8]=v);let y;e[9]===t.label?y=e[10]:(y=(0,J.jsx)(`span`,{className:`max-w-32 truncate font-medium`,children:t.label}),e[9]=t.label,e[10]=y);let b;e[11]===h?b=e[12]:(b=(0,J.jsx)(`span`,{className:`max-w-24 truncate text-xs text-muted-foreground`,children:h}),e[11]=h,e[12]=b);let S;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,J.jsx)(x,{"aria-hidden":!0,className:`size-3.5 transition-transform group-open:rotate-180`}),e[13]=S):S=e[13];let C;e[14]!==v||e[15]!==y||e[16]!==b?(C=(0,J.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center gap-2 rounded-lg border border-border bg-card/95 px-3 py-2 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[v,y,b,S]}),e[14]=v,e[15]=y,e[16]=b,e[17]=C):C=e[17];let w;e[18]===t.label?w=e[19]:(w=(0,J.jsx)(`p`,{className:`font-medium`,children:t.label}),e[18]=t.label,e[19]=w);let T=c??`Role unavailable`,E;e[20]!==h||e[21]!==T?(E=(0,J.jsxs)(`p`,{className:`mt-0.5 text-xs capitalize text-muted-foreground`,children:[T,` · `,h]}),e[20]=h,e[21]=T,e[22]=E):E=e[22];let D;e[23]!==t.label||e[24]!==h?(D=(0,J.jsxs)(`p`,{className:`sr-only`,"aria-live":`polite`,children:[`Node `,t.label,`: `,h,`.`]}),e[23]=t.label,e[24]=h,e[25]=D):D=e[25];let k;e[26]===l?k=e[27]:(k=l?(0,J.jsx)(`p`,{role:`status`,className:`mt-2 text-xs text-muted-foreground`,children:l}):null,e[26]=l,e[27]=k);let A;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,J.jsx)(Et,{}),e[28]=A):A=e[28];let j;e[29]===p?j=e[30]:(j=()=>void p(),e[29]=p,e[30]=j);let re;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,J.jsx)(ce,{"aria-hidden":!0,className:`size-4`}),e[31]=re):re=e[31];let M;e[32]===j?M=e[33]:(M=(0,J.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:j,children:[re,` All nodes`]}),e[32]=j,e[33]=M);let N;if(e[34]!==u||e[35]!==s||e[36]!==t.id||e[37]!==n||e[38]!==f){let r;e[40]===t.id?r=e[41]:(r=e=>e.id!==t.id,e[40]=t.id,e[41]=r);let i;e[42]!==u||e[43]!==s||e[44]!==f?(i=e=>(0,J.jsxs)(`button`,{type:`button`,disabled:s!==`ready`||u!==`current`||e.revokedAt!==null||e.capabilities?.nativeClientRequired===!0,title:e.capabilities?.nativeClientRequired===!0?`Open in Desktop/Mobile`:void 0,className:`flex w-full items-center justify-between rounded-md px-2 py-2 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50`,onClick:()=>void f(e),children:[(0,J.jsx)(`span`,{className:`truncate`,children:e.label}),(0,J.jsx)(wt,{node:e})]},e.id),e[42]=u,e[43]=s,e[44]=f,e[45]=i):i=e[45],N=n.filter(r).map(i),e[34]=u,e[35]=s,e[36]=t.id,e[37]=n,e[38]=f,e[39]=N}else N=e[39];let P;e[46]!==M||e[47]!==N?(P=(0,J.jsxs)(`div`,{className:`mt-3 max-h-48 space-y-1 overflow-auto border-t border-border pt-3`,children:[M,N]}),e[46]=M,e[47]=N,e[48]=P):P=e[48];let F;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,J.jsxs)(O,{size:`sm`,variant:`outline`,onClick:Mt,children:[(0,J.jsx)(te,{"aria-hidden":!0}),` Refresh`]}),e[49]=F):F=e[49];let I;e[50]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,onClick:jt,children:[(0,J.jsx)(ee,{"aria-hidden":!0}),` Sign out`]}),e[50]=I):I=e[50];let L;e[51]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,J.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 border-t border-border pt-3`,children:[F,I,(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,onClick:()=>{m.current&&(m.current.open=!1),Te({kind:`account`,section:`security`})},children:[(0,J.jsx)(ne,{"aria-hidden":!0}),` Security details`]})]}),e[51]=L):L=e[51];let R;e[52]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,J.jsxs)(`div`,{className:`mt-3 space-y-3 border-t border-border pt-3`,children:[(0,J.jsx)(at,{}),(0,J.jsx)(vt,{compact:!0})]}),e[52]=R):R=e[52];let z;e[53]!==k||e[54]!==P||e[55]!==w||e[56]!==E||e[57]!==D?(z=(0,J.jsxs)(`div`,{className:`absolute right-0 z-50 mt-2 w-72 rounded-xl border border-border bg-popover p-3 shadow-xl`,children:[w,E,D,k,A,P,L,R]}),e[53]=k,e[54]=P,e[55]=w,e[56]=E,e[57]=D,e[58]=z):z=e[58];let B;return e[59]!==z||e[60]!==C?(B=(0,J.jsx)(`div`,{className:`relative max-w-full`,children:(0,J.jsxs)(`details`,{ref:m,className:`group relative`,children:[C,z]})}),e[59]=z,e[60]=C,e[61]=B):B=e[61],B}function jt(){y.signOut()}function Mt(){y.refreshDirectory()}function Nt(e){return e.browserStatus}function Pt(e){return e.errorMessage}function Ft(e){return e.effectiveRole}function It(e){return e.directoryStatus}function Lt(e){return e.selectionStatus}function Rt(e){return e.sessionStatus}function zt(e){return e.transportStatus}function Bt(e){return e.nodes}function Vt(e){return e.selectedNode}function Ht(e){let t=(0,G.c)(66),{open:n,onOpenChange:r}=e,i=o($t),a=o(Qt),s=o(Zt),c=o(Xt),l=o(Yt),u=o(Jt),d=o(qt),f=o(Kt),p=o(Gt),m=ie(),{switchNode:h,returnToAllNodes:g}=Tt();if(!i)return null;let _,v;if(t[0]!==p||t[1]!==m||t[2]!==l||t[3]!==c||t[4]!==s){let e={browserStatus:p,sessionStatus:c,selectionStatus:l,transportStatus:s,e2eeStatus:m};_=ae(e),v=oe(e),t[0]=p,t[1]=m,t[2]=l,t[3]=c,t[4]=s,t[5]=_,t[6]=v}else _=t[5],v=t[6];let y=v,b=u!==`ready`||p!==`current`,x;t[7]===y?x=t[8]:(x=(0,J.jsx)(Ct,{indicator:y,className:`size-4`}),t[7]=y,t[8]=x);let S;t[9]===i.label?S=t[10]:(S=(0,J.jsx)(`span`,{className:`truncate`,children:i.label}),t[9]=i.label,t[10]=S);let C;t[11]!==x||t[12]!==S?(C=(0,J.jsxs)(M,{className:`flex items-center gap-2`,children:[x,S]}),t[11]=x,t[12]=S,t[13]=C):C=t[13];let w=d??`Role unavailable`,T;t[14]!==_||t[15]!==w?(T=(0,J.jsxs)(re,{className:`capitalize`,children:[w,` · `,_]}),t[14]=_,t[15]=w,t[16]=T):T=t[16];let E;t[17]!==i.label||t[18]!==_?(E=(0,J.jsxs)(`p`,{className:`sr-only`,"aria-live":`polite`,children:[`Node `,i.label,`: `,_,`.`]}),t[17]=i.label,t[18]=_,t[19]=E):E=t[19];let D;t[20]!==C||t[21]!==T||t[22]!==E?(D=(0,J.jsxs)(j,{children:[C,T,E]}),t[20]=C,t[21]=T,t[22]=E,t[23]=D):D=t[23];let k;t[24]===f?k=t[25]:(k=f?(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:f}):null,t[24]=f,t[25]=k);let F;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,J.jsx)(Et,{}),t[26]=F):F=t[26];let I;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,J.jsx)(ne,{"aria-hidden":!0,className:`size-4 shrink-0`}),t[27]=I):I=t[27];let L;t[28]===r?L=t[29]:(L=(0,J.jsx)(N,{label:`Security details`,icon:I,onClick:()=>{r(!1),Te({kind:`account`,section:`security`})}}),t[28]=r,t[29]=L);let R;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,J.jsx)(ce,{"aria-hidden":!0,className:`size-4 shrink-0`}),t[30]=R):R=t[30];let z;t[31]!==r||t[32]!==g?(z=(0,J.jsx)(N,{label:`All nodes`,icon:R,onClick:()=>{r(!1),g()}}),t[31]=r,t[32]=g,t[33]=z):z=t[33];let B;if(t[34]!==i.id||t[35]!==a||t[36]!==r||t[37]!==h||t[38]!==b){let e;t[40]===i.id?e=t[41]:(e=e=>e.id!==i.id,t[40]=i.id,t[41]=e);let n;t[42]!==r||t[43]!==h||t[44]!==b?(n=e=>(0,J.jsx)(N,{label:e.label,disabled:b||e.revokedAt!==null||e.capabilities?.nativeClientRequired===!0,disabledReason:e.capabilities?.nativeClientRequired===!0?`Open in Desktop/Mobile`:e.revokedAt===null?`Node switching is unavailable until the directory and this browser are current.`:`Access to this node was revoked.`,trailing:(0,J.jsx)(wt,{node:e}),onClick:()=>{r(!1),h(e)}},e.id),t[42]=r,t[43]=h,t[44]=b,t[45]=n):n=t[45],B=a.filter(e).map(n),t[34]=i.id,t[35]=a,t[36]=r,t[37]=h,t[38]=b,t[39]=B}else B=t[39];let V;t[46]!==L||t[47]!==z||t[48]!==B?(V=(0,J.jsxs)(`div`,{className:`mt-3 space-y-1 border-t border-border pt-3`,children:[L,z,B]}),t[46]=L,t[47]=z,t[48]=B,t[49]=V):V=t[49];let se=u===`loading`,H;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,J.jsx)(te,{"aria-hidden":!0}),t[50]=H):H=t[50];let U;t[51]===se?U=t[52]:(U=(0,J.jsxs)(O,{size:`sm`,variant:`outline`,className:`min-h-11`,disabled:se,onClick:Wt,children:[H,` Refresh nodes`]}),t[51]=se,t[52]=U);let W;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,className:`min-h-11`,onClick:Ut,children:[(0,J.jsx)(ee,{"aria-hidden":!0}),` Sign out`]}),t[53]=W):W=t[53];let K;t[54]===U?K=t[55]:(K=(0,J.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 border-t border-border pt-3`,children:[U,W]}),t[54]=U,t[55]=K);let le;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,J.jsx)(`div`,{className:`mt-3 space-y-3 border-t border-border pt-3`,children:(0,J.jsx)(vt,{compact:!0})}),t[56]=le):le=t[56];let q;t[57]!==V||t[58]!==K||t[59]!==k?(q=(0,J.jsxs)(A,{children:[k,F,V,K,le]}),t[57]=V,t[58]=K,t[59]=k,t[60]=q):q=t[60];let ue;return t[61]!==r||t[62]!==n||t[63]!==q||t[64]!==D?(ue=(0,J.jsxs)(P,{open:n,onOpenChange:r,label:`Connection`,children:[D,q]}),t[61]=r,t[62]=n,t[63]=q,t[64]=D,t[65]=ue):ue=t[65],ue}function Ut(){y.signOut()}function Wt(){y.refreshDirectory()}function Gt(e){return e.browserStatus}function Kt(e){return e.errorMessage}function qt(e){return e.effectiveRole}function Jt(e){return e.directoryStatus}function Yt(e){return e.selectionStatus}function Xt(e){return e.sessionStatus}function Zt(e){return e.transportStatus}function Qt(e){return e.nodes}function $t(e){return e.selectedNode}function en(){let e=(0,G.c)(25),t=o(on),n=o(an),r=o(rn),i=o(nn),a=o(tn),s=ie(),[c,l]=(0,K.useState)(!1);if(!t)return null;let u,d;if(e[0]!==a||e[1]!==s||e[2]!==i||e[3]!==r||e[4]!==n){let t={browserStatus:a,sessionStatus:r,selectionStatus:i,transportStatus:n,e2eeStatus:s};u=ae(t),d=oe(t),e[0]=a,e[1]=s,e[2]=i,e[3]=r,e[4]=n,e[5]=u,e[6]=d}else u=e[5],d=e[6];let f=d,p;e[7]!==t.label||e[8]!==c||e[9]!==r||e[10]!==u?(p=c?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`span`,{role:`status`,"aria-live":`polite`,"data-testid":`hosted-connection-status-announcer`,className:`sr-only`,children:[`Node `,t.label,`: `,u,`.`]}),r===`delivery-unknown`?(0,J.jsx)(`span`,{role:`alert`,className:`sr-only`,children:`Delivery unknown: a request may or may not have reached the node. Open the connection controls to acknowledge.`}):null]}),e[7]=t.label,e[8]=c,e[9]=r,e[10]=u,e[11]=p):p=e[11];let m=`Connection: ${t.label}, ${u}`,h;e[12]===f?h=e[13]:(h=(0,J.jsx)(Ct,{indicator:f,testId:`hosted-connection-icon`,className:`size-3.5 shrink-0`}),e[12]=f,e[13]=h);let g;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>l(!0),e[14]=g):g=e[14];let _;e[15]!==f.shortLabel||e[16]!==m||e[17]!==h?(_=(0,J.jsx)(nt,{testId:`hosted-connection-pill`,label:m,status:f.shortLabel,icon:h,onClick:g}),e[15]=f.shortLabel,e[16]=m,e[17]=h,e[18]=_):_=e[18];let v;e[19]===c?v=e[20]:(v=(0,J.jsx)(Ht,{open:c,onOpenChange:l}),e[19]=c,e[20]=v);let y;return e[21]!==p||e[22]!==_||e[23]!==v?(y=(0,J.jsxs)(J.Fragment,{children:[p,_,v]}),e[21]=p,e[22]=_,e[23]=v,e[24]=y):y=e[24],y}function tn(e){return e.browserStatus}function nn(e){return e.selectionStatus}function rn(e){return e.sessionStatus}function an(e){return e.transportStatus}function on(e){return e.selectedNode}function sn(){let e=(0,G.c)(2),t=k(),n;return e[0]===t?n=e[1]:(n=t===`phone`?(0,J.jsx)(en,{}):(0,J.jsx)(At,{}),e[0]=t,e[1]=n),n}export{De as _,Tt as a,Le as c,et as d,Pe as f,Ee as g,Te as h,wt as i,Ze as l,me as m,en as n,vt as o,pe as p,At as r,_t as s,sn as t,Ne as u,U as v};