ryco-cli 0.1.30 → 0.1.31

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 (493) hide show
  1. package/dist/{AcpAdapter-DjP0IHpH.cjs → AcpAdapter-ByUp9-wk.cjs} +71 -51
  2. package/dist/{AcpAdapter-CKWzfB3Q.mjs → AcpAdapter-CY_ANTKu.mjs} +73 -53
  3. package/dist/{AcpNativeLogging-Do0LktDb.mjs → AcpNativeLogging-C7PC6imv.mjs} +30 -4
  4. package/dist/{AcpNativeLogging-5gTPK9Fq.cjs → AcpNativeLogging-OQeAya9d.cjs} +33 -1
  5. package/dist/{AcpRegistryDriver-BblCFfev.cjs → AcpRegistryDriver-CD9GN7rI.cjs} +3 -3
  6. package/dist/{AcpRegistryDriver-BzohT-PC.mjs → AcpRegistryDriver-DMZ5VBWJ.mjs} +4 -4
  7. package/dist/AzureDevOpsSourceControlProvider-5giVYoNi.mjs +2053 -0
  8. package/dist/AzureDevOpsSourceControlProvider-BKMXEUaN.cjs +2055 -0
  9. package/dist/{BitbucketSourceControlProvider-D5UVAc9z.mjs → BitbucketSourceControlProvider-BVUBsEUF.mjs} +63 -23
  10. package/dist/{BitbucketSourceControlProvider-Bvl_q1o2.cjs → BitbucketSourceControlProvider-BWnnrbch.cjs} +62 -22
  11. package/dist/{BunPTY-Dcl1Lp62.mjs → BunPTY-CMbDQ1Xb.mjs} +1 -1
  12. package/dist/{ClaudeDriver-DZkz0QPr.cjs → ClaudeDriver-DCrqouOR.cjs} +1373 -191
  13. package/dist/{ClaudeDriver-BuQ_azDw.mjs → ClaudeDriver-DVOss8cC.mjs} +1375 -193
  14. package/dist/{CodexDriver-6Ph2cjAW.cjs → CodexDriver-CBQPHJqU.cjs} +258 -28
  15. package/dist/{CodexDriver-Bi49RIL4.mjs → CodexDriver-DJoTky7Z.mjs} +261 -31
  16. package/dist/{CodexTextGeneration-C5TIspJA.mjs → CodexTextGeneration-BSgNgfZv.mjs} +6 -6
  17. package/dist/{CodexTextGeneration-sXPR9eld.cjs → CodexTextGeneration-C9MDQmZm.cjs} +7 -7
  18. package/dist/{CopilotDriver-Bcdpz6U_.mjs → CopilotDriver-CUkdPXcH.mjs} +78 -20
  19. package/dist/{CopilotDriver-D6P0xgRX.cjs → CopilotDriver-DbaMDH16.cjs} +76 -18
  20. package/dist/{CursorDriver-CRnDGwEv.mjs → CursorDriver-B-ZilXJB.mjs} +114 -97
  21. package/dist/{CursorDriver-DMJ7sGSx.cjs → CursorDriver-DKQqPbKH.cjs} +114 -97
  22. package/dist/{ForgejoSourceControlProvider-D4jGdaJX.cjs → ForgejoSourceControlProvider-CgpjFECj.cjs} +94 -60
  23. package/dist/{ForgejoSourceControlProvider-Dl_Fk3RY.mjs → ForgejoSourceControlProvider-DemMYUye.mjs} +95 -61
  24. package/dist/{GitHubSourceControlProvider-QMe-zymI.cjs → GitHubSourceControlProvider-C4un6hOK.cjs} +218 -119
  25. package/dist/{GitHubSourceControlProvider-DnwKf0ap.mjs → GitHubSourceControlProvider-CRSDYcjc.mjs} +206 -108
  26. package/dist/GitLabSourceControlProvider-D8W1ZLPh.cjs +2260 -0
  27. package/dist/GitLabSourceControlProvider-DpWkJ0M3.mjs +2258 -0
  28. package/dist/{GrokDriver-jy8JIvYY.cjs → GrokDriver-BQ6G_7ZZ.cjs} +6 -7
  29. package/dist/{GrokDriver-Bvq1jP3S.mjs → GrokDriver-Buvas9-q.mjs} +5 -6
  30. package/dist/{Metrics-CnmjpbWk.mjs → Metrics-C3vLS9rz.mjs} +123 -13
  31. package/dist/{Metrics-C0LSU8s7.cjs → Metrics-DjRPLE98.cjs} +170 -12
  32. package/dist/{NodePTY-D7tFWuQe.mjs → NodePTY-DgnuBruq.mjs} +1 -1
  33. package/dist/{OpenCodeDriver-DhyVaBMT.mjs → OpenCodeDriver-BWEZD841.mjs} +183 -49
  34. package/dist/{OpenCodeDriver-Bu5D19tl.cjs → OpenCodeDriver-qUiX0RLH.cjs} +183 -49
  35. package/dist/{SideQuestionIsolation-B-aE6aBz.mjs → SideQuestionIsolation-B1T-DsR0.mjs} +1 -1
  36. package/dist/{SideQuestionIsolation-CtJ4wX83.cjs → SideQuestionIsolation-BPC-Bxsz.cjs} +1 -1
  37. package/dist/bin.cjs +37021 -10253
  38. package/dist/bin.mjs +36892 -10178
  39. package/dist/client/assets/AccountSettings-B88Q_w9Y.js +1 -0
  40. package/dist/client/assets/AiFocusSettings-Bb0TrCPn.js +1 -0
  41. package/dist/client/assets/{AnimatedHeight-UXn4-nUd.js → AnimatedHeight-epXOsgdm.js} +1 -1
  42. package/dist/client/assets/AppearanceSettings-XS9WRVPU.js +1 -0
  43. package/dist/client/assets/AutomationsDialog-bZckh4Y3.js +1 -0
  44. package/dist/client/assets/AutomationsSummary-wPFZCF49.js +1 -0
  45. package/dist/client/assets/BranchToolbar.logic-DjzLKbbB.js +3 -0
  46. package/dist/client/assets/BrowserPanel-CdBLnnfz.js +1 -0
  47. package/dist/client/assets/ChatRightPanel-BCINd0vP.js +34 -0
  48. package/dist/client/assets/ChatThreadRouteView-BFZ0Si-l.js +1 -0
  49. package/dist/client/assets/ColorSwatchPicker-CGyo99o0.js +1 -0
  50. package/dist/client/assets/CommandPalette.logic-BIOMtnEQ.js +1 -0
  51. package/dist/client/assets/CommandPaletteDialog-Db4LH--z.js +2 -0
  52. package/dist/client/assets/CompositeRoot-DtnwMJKj.js +1 -0
  53. package/dist/client/assets/ComputerUseSettings-CkqCqDsU.js +1 -0
  54. package/dist/client/assets/ConnectionsSettings-B9mxExdG.js +7 -0
  55. package/dist/client/assets/CreatePullRequestDialog-CJ7pNCue.js +1 -0
  56. package/dist/client/assets/CreatePullRequestDialogHost-n4ZjdSr4.js +1 -0
  57. package/dist/client/assets/DiagnosticsSettings-f9rFG9re.js +2 -0
  58. package/dist/client/assets/DiagnosticsSettings.logic-Byf-Bu4S.js +1 -0
  59. package/dist/client/assets/DialogHandle-C0c_rK3I.js +1 -0
  60. package/dist/client/assets/{DialogPopup-NfwDyR5c.js → DialogPopup-BKW1PEEa.js} +1 -1
  61. package/dist/client/assets/DialogRoot-BIubqrv0.js +1 -0
  62. package/dist/client/assets/DialogTitle-BAX_FLoG.js +1 -0
  63. package/dist/client/assets/{DialogViewport-B6w_ROOE.js → DialogViewport-C2iOUx0O.js} +1 -1
  64. package/dist/client/assets/DiffPanel-BkqDt_SS.js +25 -0
  65. package/dist/client/assets/DisclosureRegion-B8556yU0.js +1 -0
  66. package/dist/client/assets/DraftChatThreadRouteView-BKgRKJ2w.js +1 -0
  67. package/dist/client/assets/{ExternalIdentityWeb.logic-BlKX8J9h.js → ExternalIdentityWeb.logic-Cu6suNrN.js} +1 -1
  68. package/dist/client/assets/GlassSurface-DLYYzRdP.js +1 -0
  69. package/dist/client/assets/HostedConnectionControls-CoVqtnrK.js +1 -0
  70. package/dist/client/assets/HostedHubRoot-CM2CwPUr.js +2 -0
  71. package/dist/client/assets/{HostedNativeAuthorizationRoute-j7oSlakZ.js → HostedNativeAuthorizationRoute-Bizmqrh_.js} +2 -2
  72. package/dist/client/assets/HostedNodeRenameDialog-SXWMsTO0.js +1 -0
  73. package/dist/client/assets/HostedRelayTrustNotice-BfTyrBi5.js +1 -0
  74. package/dist/client/assets/InboxStatusGlyph-BPTqzp7l.js +1 -0
  75. package/dist/client/assets/IntegrationsSettingsPanel-DAPvkV4i.js +1 -0
  76. package/dist/client/assets/KeybindingsSettings-B8g-YI2O.js +1 -0
  77. package/dist/client/assets/LazyBrowserPanel-Ds9cdOC_.js +2 -0
  78. package/dist/client/assets/McpServersSettings-Dw6G3ff3.js +6 -0
  79. package/dist/client/assets/MobileSheet-DfgXNWbd.js +1 -0
  80. package/dist/client/assets/ModelTuningDial-DQBAbuNL.js +1 -0
  81. package/dist/client/assets/NewWorktreeDialog-CDZAJmK6.js +4 -0
  82. package/dist/client/assets/NodeSecuritySettings-3MELA9ru.js +1 -0
  83. package/dist/client/assets/NullStore-gT_6_xZE.js +1 -0
  84. package/dist/client/assets/OnboardingDialog-CAAtNnJf.js +1 -0
  85. package/dist/client/assets/OpinionatedPluginsSettings-AiDB0Vl4.js +1 -0
  86. package/dist/client/assets/{PdfAttachmentPreview-C8-hT8KQ.js → PdfAttachmentPreview-BFNW2wjN.js} +2 -2
  87. package/dist/client/assets/{PhoneGetAppInterstitial-Zh0zpBgT.js → PhoneGetAppInterstitial-D8fwZ8E9.js} +1 -1
  88. package/dist/client/assets/PhoneHome-YHgHljA0.js +1 -0
  89. package/dist/client/assets/PhoneSettingsSurface-BVxJppvK.js +2 -0
  90. package/dist/client/assets/PreviewPanel-BYcEnkv9.js +643 -0
  91. package/dist/client/assets/ProjectScriptDialog-K34K2Kzm.js +1 -0
  92. package/dist/client/assets/ProjectsPage-DXnMYLjb.js +1 -0
  93. package/dist/client/assets/PromoteChatDialog-CAY7_wJ-.js +1 -0
  94. package/dist/client/assets/ProviderLimitWindow-CK04BSkM.js +1 -0
  95. package/dist/client/assets/ProviderUpdateLaunchNotification.logic-BMBrDDOC.js +1 -0
  96. package/dist/client/assets/ProvidersSettingsPanel-C85PX9Es.js +1 -0
  97. package/dist/client/assets/PullRequestsPage-C0rgfGwB.js +1 -0
  98. package/dist/client/assets/{QuitShortcutFeedback-Qs9XsuZ4.js → QuitShortcutFeedback-DSkKqETs.js} +1 -1
  99. package/dist/client/assets/RedactedSensitiveText-DQ0YveQd.js +1 -0
  100. package/dist/client/assets/RollingText-BzvpP5fa.js +1 -0
  101. package/dist/client/assets/RootAppShell-BYQ-eGNT.js +6 -0
  102. package/dist/client/assets/{Separator-B6Esv57Y.js → Separator-DpiW19Vw.js} +1 -1
  103. package/dist/client/assets/SettingsPage-BCFN7Ju2.js +2 -0
  104. package/dist/client/assets/SettingsPanels-CP6z2b1x.js +3 -0
  105. package/dist/client/assets/SettingsPanels.editor-D8U-TWWG.js +1 -0
  106. package/dist/client/assets/SettingsSelect-DEhNaz3E.js +1 -0
  107. package/dist/client/assets/Sidebar.logic-D_ODfSpl.js +1 -0
  108. package/dist/client/assets/SimulatorPanel-DCT6fZ0X.js +1 -0
  109. package/dist/client/assets/SourceControlSettings-DxUtvPMK.js +1 -0
  110. package/dist/client/assets/StatisticsPage-C9SrwtM4.js +1 -0
  111. package/dist/client/assets/StatisticsPanel-BMYLETs0.js +1 -0
  112. package/dist/client/assets/ThreadLinkList-BN5z5EpS.js +169 -0
  113. package/dist/client/assets/ThreadTerminalDrawer-CgIFOlR-.js +18 -0
  114. package/dist/client/assets/ThreadWorkspacePanel-DvXoqQPF.js +3 -0
  115. package/dist/client/assets/ToolbarRootContext-8FsV9Cpj.js +1 -0
  116. package/dist/client/assets/TraitsPicker-DcrpJahy.js +1 -0
  117. package/dist/client/assets/Virtualizer-CwXeUPla.js +1345 -0
  118. package/dist/client/assets/WorkspacePullRequestPanel-3mlcJn9G.js +1 -0
  119. package/dist/client/assets/WorkspaceReview-UGbCgXeK.js +2 -0
  120. package/dist/client/assets/{abnfDiagram-N423BO3Z-ByEe3mC0.js → abnfDiagram-N423BO3Z-DVEM6Scc.js} +1 -1
  121. package/dist/client/assets/{activity-CwTUF6lv.js → activity-DVCuAejY.js} +1 -1
  122. package/dist/client/assets/{alert-DQEkrtUJ.js → alert-FV7ZIit_.js} +1 -1
  123. package/dist/client/assets/alert-dialog-CgXR9tED.js +1 -0
  124. package/dist/client/assets/app-window-3xtwqZgI.js +1 -0
  125. package/dist/client/assets/appChrome-COCz-T7w.js +1 -0
  126. package/dist/client/assets/{appearancePreferences-nFx4MHoI.js → appearancePreferences-NnsvXwBe.js} +1 -1
  127. package/dist/client/assets/architecture-7GRP2DOG-DXXb_0_g.js +1 -0
  128. package/dist/client/assets/{architectureDiagram-T3A2C74G-Bd-yxaTr.js → architectureDiagram-T3A2C74G-B6pcKiCj.js} +1 -1
  129. package/dist/client/assets/{arrow-left-DUOpzEbP.js → arrow-left-Blu3LSE2.js} +1 -1
  130. package/dist/client/assets/{arrow-right-HOYJnPKw.js → arrow-right-CO3CH0ne.js} +1 -1
  131. package/dist/client/assets/arrow-up-B69gV2Bq.js +1 -0
  132. package/dist/client/assets/{arrow-up-right-DHnMKuVA.js → arrow-up-right-BbPGFOLA.js} +1 -1
  133. package/dist/client/assets/authorization-Ob6YwWiI.js +1 -0
  134. package/dist/client/assets/autocomplete-RVpjsrDv.js +1 -0
  135. package/dist/client/assets/ban-BIm2PVkE.js +1 -0
  136. package/dist/client/assets/{blockDiagram-VBNYF7ZC-CPDBonMC.js → blockDiagram-VBNYF7ZC-WNerGp9V.js} +1 -1
  137. package/dist/client/assets/{bot-DxjPA7Bw.js → bot-C9nWtaWq.js} +1 -1
  138. package/dist/client/assets/browserState-jt47YsqD.js +1 -0
  139. package/dist/client/assets/{c4Diagram-5PPSVZJV-BM6pAiqT.js → c4Diagram-5PPSVZJV-wp1ioOoM.js} +1 -1
  140. package/dist/client/assets/camera-C13VoW3c.js +1 -0
  141. package/dist/client/assets/capabilities-CfOhq009.js +1 -0
  142. package/dist/client/assets/channel-56r2qL2v.js +1 -0
  143. package/dist/client/assets/{chart-column-Cg7d41tb.js → chart-column-DRv0YtL_.js} +1 -1
  144. package/dist/client/assets/checkbox-CIIIY9FA.js +1 -0
  145. package/dist/client/assets/checks-Dw022Bvy.js +1 -0
  146. package/dist/client/assets/{chunk-2GRJ4B5K-DVKozJ41.js → chunk-2GRJ4B5K-DRl3ILpc.js} +1 -1
  147. package/dist/client/assets/{chunk-4I5QYGJK-BRoMwPkW.js → chunk-4I5QYGJK-CYTRl4bo.js} +1 -1
  148. package/dist/client/assets/{chunk-5RXB4S5H-DFMKyoqP.js → chunk-5RXB4S5H-VCNwRsOa.js} +1 -1
  149. package/dist/client/assets/{chunk-6Q2QTUOP-Ba6UENe9.js → chunk-6Q2QTUOP-DnSeKGPG.js} +1 -1
  150. package/dist/client/assets/{chunk-7Z6QIM7H-B87gYLWH.js → chunk-7Z6QIM7H-Cjilh9TF.js} +1 -1
  151. package/dist/client/assets/{chunk-GF5L2VYU-DZ840GRQ.js → chunk-GF5L2VYU-CGR7AW0t.js} +1 -1
  152. package/dist/client/assets/{chunk-I66GZJ75-BO6p4Aqg.js → chunk-I66GZJ75-CXSn8dDu.js} +1 -1
  153. package/dist/client/assets/{chunk-JQJVKLGR-5dTfVinz.js → chunk-JQJVKLGR-Dro-75lU.js} +1 -1
  154. package/dist/client/assets/{chunk-KBJHAD2P-BeWfBZdP.js → chunk-KBJHAD2P-BDqN2kVf.js} +1 -1
  155. package/dist/client/assets/{chunk-NSK5VX7P-DuRkdn5k.js → chunk-NSK5VX7P-DGo5UczH.js} +1 -1
  156. package/dist/client/assets/{chunk-QR6OTTB3-Duz4Y_uE.js → chunk-QR6OTTB3-RWuyWnBI.js} +1 -1
  157. package/dist/client/assets/{chunk-UBXNYLIW-D-z8URgN.js → chunk-UBXNYLIW-BPRzeB0w.js} +1 -1
  158. package/dist/client/assets/{chunk-W5SLKNZC-AGjFjjoJ.js → chunk-W5SLKNZC-DYWocTFi.js} +1 -1
  159. package/dist/client/assets/{chunk-WRU74C26-BgY3UiXB.js → chunk-WRU74C26-ChbB1jY3.js} +1 -1
  160. package/dist/client/assets/circle-stop-D8B4hRpY.js +1 -0
  161. package/dist/client/assets/circle-x-CNLfrTqR.js +1 -0
  162. package/dist/client/assets/classDiagram-JCYQIIEL-DGvmFev3.js +1 -0
  163. package/dist/client/assets/classDiagram-v2-OCEON4UE-DGvmFev3.js +1 -0
  164. package/dist/client/assets/{clipboard-copy-BWf3JuTE.js → clipboard-copy-DGi8FKNO.js} +1 -1
  165. package/dist/client/assets/clock-3-DmJ4_XPI.js +1 -0
  166. package/dist/client/assets/clock-DZIuPtNG.js +1 -0
  167. package/dist/client/assets/color-picker-BdBXje-a.js +1 -0
  168. package/dist/client/assets/columns-2-CWlMOClK.js +1 -0
  169. package/dist/client/assets/combobox-Dtjtf7AB.js +1 -0
  170. package/dist/client/assets/{cynefin-OW5HDTMX-BuOAGqlK.js → cynefin-OW5HDTMX-TuShvMuM.js} +1 -1
  171. package/dist/client/assets/{cynefinDiagram-MW4NZA55-DqV0Aokp.js → cynefinDiagram-MW4NZA55-B0Edt2Em.js} +1 -1
  172. package/dist/client/assets/{dagre-VZM6K2ZE-D_GFquDW.js → dagre-VZM6K2ZE-D-eiuqHx.js} +1 -1
  173. package/dist/client/assets/{data-list-BJCq3CVP.js → data-list-BAx6jBY1.js} +1 -1
  174. package/dist/client/assets/desktopUpdateAtoms-BjrLa3tl.js +1 -0
  175. package/dist/client/assets/desktopWorkspace-C2wXVBhc.js +1 -0
  176. package/dist/client/assets/{deviceName-C2N8ZRX3.js → deviceName-B4youG0v.js} +1 -1
  177. package/dist/client/assets/{diagram-7IWD3JNH-B1wlsNg2.js → diagram-7IWD3JNH-DgM6lMlR.js} +1 -1
  178. package/dist/client/assets/{diagram-B4RE2ZJO-D-CYoym7.js → diagram-B4RE2ZJO-CyHNDjzV.js} +1 -1
  179. package/dist/client/assets/{diagram-LBJQPF4R-DqJ9NCqt.js → diagram-LBJQPF4R-DDzuLIN5.js} +1 -1
  180. package/dist/client/assets/{diagram-Q27KOJAE-3yp1D2u4.js → diagram-Q27KOJAE-BaBvK9QB.js} +1 -1
  181. package/dist/client/assets/{diagram-UB23O5K3-Byp25nGC.js → diagram-UB23O5K3-CzZ2ewuZ.js} +1 -1
  182. package/dist/client/assets/dialogWords-Cg0YkJVg.js +1 -0
  183. package/dist/client/assets/diffRouteSearch-D2MKN_ah.js +1 -0
  184. package/dist/client/assets/disclosureMotion-cbMJn5-z.js +1 -0
  185. package/dist/client/assets/{download-DsYNYJeu.js → download-TvtXS4hE.js} +1 -1
  186. package/dist/client/assets/{ebnfDiagram-BXEA7PRR-B_IM1l6o.js → ebnfDiagram-BXEA7PRR-CL1vdOKi.js} +1 -1
  187. package/dist/client/assets/editorPreferences-DqKyA-2Z.js +1 -0
  188. package/dist/client/assets/ellipsis-CDK1dNFZ.js +1 -0
  189. package/dist/client/assets/ellipsis-vertical-CwzEUTwV.js +1 -0
  190. package/dist/client/assets/{empty-BbJHvskr.js → empty-BovKoxbn.js} +1 -1
  191. package/dist/client/assets/{erDiagram-JOGREHBK--OtcrCRJ.js → erDiagram-JOGREHBK-DmQR2if6.js} +1 -1
  192. package/dist/client/assets/eventmodeling-NTZA5JFV-D272GIcY.js +1 -0
  193. package/dist/client/assets/external-link-CJeVJZ7s.js +1 -0
  194. package/dist/client/assets/eye-BUmrXqzg.js +1 -0
  195. package/dist/client/assets/file-diff-BWc3mYsz.js +1 -0
  196. package/dist/client/assets/flowDiagram-UKHOOZJN-DLyS38Mm.js +1 -0
  197. package/dist/client/assets/folder-git-2-CPxg5wKP.js +1 -0
  198. package/dist/client/assets/folder-open-DcMymvp1.js +1 -0
  199. package/dist/client/assets/formatCount-B4KLI651.js +1 -0
  200. package/dist/client/assets/{ganttDiagram-PKOTCBZU-w0seBi3Q.js → ganttDiagram-PKOTCBZU-1q2nUL92.js} +1 -1
  201. package/dist/client/assets/git-pull-request-BFPwpm3c.js +1 -0
  202. package/dist/client/assets/{gitGraph-4MIJSDKK-BOJ0lcSW.js → gitGraph-4MIJSDKK-COtwmv2S.js} +1 -1
  203. package/dist/client/assets/{gitGraphDiagram-DS77QQ5N-BMfOCCYn.js → gitGraphDiagram-DS77QQ5N-ChsvaxX4.js} +1 -1
  204. package/dist/client/assets/{group-tVMKGp7Q.js → group-DWWn0dTx.js} +1 -1
  205. package/dist/client/assets/hammer-BXo-EU88.js +1 -0
  206. package/dist/client/assets/hostedConnectionCoordinator-BkAE-RhA.js +1 -0
  207. package/dist/client/assets/{index-BqZvnGNr.js → index-DARIYokI.js} +2 -2
  208. package/dist/client/assets/{info-A6RAGUB7-acjBTQ5o.js → info-A6RAGUB7-CI2qZ9wW.js} +1 -1
  209. package/dist/client/assets/{infoDiagram-6WML65LV-DB01Nc2m.js → infoDiagram-6WML65LV-BPmgcTPH.js} +1 -1
  210. package/dist/client/assets/{input-BDWSVClC.js → input-CCie4mm1.js} +1 -1
  211. package/dist/client/assets/{ishikawaDiagram-WSZJBQD7-KhZTvm-J.js → ishikawaDiagram-WSZJBQD7-LyS9p3Yg.js} +1 -1
  212. package/dist/client/assets/{journeyDiagram-NVQOT4AX-C3JCYk-2.js → journeyDiagram-NVQOT4AX-BYaAmN65.js} +1 -1
  213. package/dist/client/assets/{kanban-definition-27J2QSJJ-Dbo0C1s6.js → kanban-definition-27J2QSJJ-D-pwzqFt.js} +1 -1
  214. package/dist/client/assets/{key-round-CETZqe3h.js → key-round-BlrUTfxB.js} +1 -1
  215. package/dist/client/assets/keyboard-DlBdq6sz.js +1 -0
  216. package/dist/client/assets/label-ChtVI9lp.js +1 -0
  217. package/dist/client/assets/layers-BB-ruGvd.js +1 -0
  218. package/dist/client/assets/lifecycleSuggestionPolicy-0ERe_O53.js +1 -0
  219. package/dist/client/assets/list-checks-BkM_ZRsj.js +1 -0
  220. package/dist/client/assets/loader-3vQnfqIT.js +1 -0
  221. package/dist/client/assets/{log-out-D5-aSBAz.js → log-out-CKq9YiLY.js} +1 -1
  222. package/dist/client/assets/{logging-B_qXVrk6.js → logging-CCg76rgn.js} +1 -1
  223. package/dist/client/assets/main-Ch0bwS-M.js +9 -0
  224. package/dist/client/assets/main-Di0isH9D.css +2 -0
  225. package/dist/client/assets/{mermaid-parser.core-B6Q-3x_q.js → mermaid-parser.core-RK9ah5RM.js} +2 -2
  226. package/dist/client/assets/{mermaidEngine-DksLcesB.js → mermaidEngine-Dr8UsPhH.js} +3 -3
  227. package/dist/client/assets/message-circle-dashed-BrjwqS7-.js +1 -0
  228. package/dist/client/assets/messageQueueDrain-B7R7Qmq6.js +1 -0
  229. package/dist/client/assets/messages-square-cDTkDJv_.js +1 -0
  230. package/dist/client/assets/{mindmap-definition-FAOFIHXS-LaMzRxqw.js → mindmap-definition-FAOFIHXS-DVudWasx.js} +1 -1
  231. package/dist/client/assets/{packet-AYTQ26CC-BHhg59Si.js → packet-AYTQ26CC-DnkTsVhD.js} +1 -1
  232. package/dist/client/assets/panels-top-left-B7jZiLth.js +1 -0
  233. package/dist/client/assets/path-text-3Rfu6lt8.js +1 -0
  234. package/dist/client/assets/{pegDiagram-VL7TDLO6-s7l7UD9d.js → pegDiagram-VL7TDLO6-Do5PIp8B.js} +1 -1
  235. package/dist/client/assets/pencil-Bzg-nc6d.js +1 -0
  236. package/dist/client/assets/{pie-WAS4IAKB-DygX31Z9.js → pie-WAS4IAKB-B_nNQOzn.js} +1 -1
  237. package/dist/client/assets/{pieDiagram-7S7Q4E2Y-bb6I9TtZ.js → pieDiagram-7S7Q4E2Y-D_IG4xwA.js} +1 -1
  238. package/dist/client/assets/{play-DUvOxTpL.js → play-DpXXQ1qB.js} +1 -1
  239. package/dist/client/assets/popover-OWEv6cQz.js +48 -0
  240. package/dist/client/assets/presentationTier-DPVAxTK4.js +1 -0
  241. package/dist/client/assets/previewRouteSearch-BjZdTuSf.js +1 -0
  242. package/dist/client/assets/primary-Cf-xJExj.js +4 -0
  243. package/dist/client/assets/primitives-CxTBN7D4.js +1 -0
  244. package/dist/client/assets/projectCheckouts.logic-DUT4AxXr.js +1 -0
  245. package/dist/client/assets/projectPaths-B8aVmOZX.js +1 -0
  246. package/dist/client/assets/projectPreferences-CzWBItFj.js +1 -0
  247. package/dist/client/assets/providerCapabilities-B2YOPsLN.js +1 -0
  248. package/dist/client/assets/providerDriverMeta-BHHL9uw0.js +1 -0
  249. package/dist/client/assets/providerModels-v9PYbzRE.js +1 -0
  250. package/dist/client/assets/providerStatus-CDPaqb0S.js +1 -0
  251. package/dist/client/assets/pullRequestsModel.logic-Dv_om_C4.js +1 -0
  252. package/dist/client/assets/{qr-code-dbkTo07n.js → qr-code-BlbiBIwH.js} +1 -1
  253. package/dist/client/assets/{qr-code-D4CtBq2F.js → qr-code-DywzVgQC.js} +1 -1
  254. package/dist/client/assets/{quadrantDiagram-CIZ2JOQS-Cj1Y68ZF.js → quadrantDiagram-CIZ2JOQS-DY6fJyrM.js} +1 -1
  255. package/dist/client/assets/{radar-RG4KPBEZ-FHM3ftPp.js → radar-RG4KPBEZ-D9689I5m.js} +1 -1
  256. package/dist/client/assets/radio-group-DVwD6Cuy.js +1 -0
  257. package/dist/client/assets/{railroad-74A4TZTK-CPMn18Cm.js → railroad-74A4TZTK-DVzWbQnl.js} +1 -1
  258. package/dist/client/assets/railroad-abnf-HS5TGJTU-C_2P6umA.js +1 -0
  259. package/dist/client/assets/railroad-ebnf-LZEXJU2U-aGlR3R3z.js +1 -0
  260. package/dist/client/assets/railroad-peg-WCYAUIDC-DCB9oE8y.js +1 -0
  261. package/dist/client/assets/{railroadDiagram-AXF67PYL-DyV3SuDj.js → railroadDiagram-AXF67PYL-D1oJ6Jtl.js} +1 -1
  262. package/dist/client/assets/readCache-B7cDPz2O.js +1 -0
  263. package/dist/client/assets/{refresh-cw-CgDa2Ok_.js → refresh-cw-CRUTivd6.js} +1 -1
  264. package/dist/client/assets/{requirementDiagram-LRYGKXZP-_xEAGWaH.js → requirementDiagram-LRYGKXZP-7RM8iREp.js} +1 -1
  265. package/dist/client/assets/rotate-ccw-BE2ZCwL6.js +1 -0
  266. package/dist/client/assets/roving-radio-group-NMPWrDqe.js +1 -0
  267. package/dist/client/assets/rows-2-DDS4dGTX.js +1 -0
  268. package/dist/client/assets/runtime-DjjjAcTE.js +18 -0
  269. package/dist/client/assets/safePolygon-C1AzMRS4.js +1 -0
  270. package/dist/client/assets/{sankeyDiagram-W5VNT64P-Clf6oTLi.js → sankeyDiagram-W5VNT64P-C1tKAPGN.js} +1 -1
  271. package/dist/client/assets/{save-C8h0AMdl.js → save-OZdkPs_y.js} +1 -1
  272. package/dist/client/assets/scroll-area-80P7vbjw.js +1 -0
  273. package/dist/client/assets/{scrollEdges-BXYnwntN.js → scrollEdges-C0Oc-5qi.js} +1 -1
  274. package/dist/client/assets/select-Cb9FUPHD.js +1 -0
  275. package/dist/client/assets/separator-CO8bC7Wc.js +1 -0
  276. package/dist/client/assets/{sequenceDiagram-SI44F4Z6-CcYtQLSe.js → sequenceDiagram-SI44F4Z6-DGVpb7jL.js} +1 -1
  277. package/dist/client/assets/settings-2-PrRDu6Lc.js +1 -0
  278. package/dist/client/assets/settingsLayout-CRFNCk_D.js +1 -0
  279. package/dist/client/assets/sheet-C5DW7qVO.js +1 -0
  280. package/dist/client/assets/{shield-DPC4oHTi.js → shield-CBHYqlkR.js} +1 -1
  281. package/dist/client/assets/{shield-alert-CwH36qZb.js → shield-alert-Dc2cGwyR.js} +1 -1
  282. package/dist/client/assets/{shield-check-CGD7sEeF.js → shield-check-_wl7R4Js.js} +1 -1
  283. package/dist/client/assets/sidebar-0BBaFNm3.js +1 -0
  284. package/dist/client/assets/sidebarProjectFolders-BjWzbt8C.js +3 -0
  285. package/dist/client/assets/sidebarProjectGrouping-nQRStWrZ.js +1 -0
  286. package/dist/client/assets/sidebarStatusText-BBKuNies.js +1 -0
  287. package/dist/client/assets/sidebarUndo-Dfq1lvyF.js +1 -0
  288. package/dist/client/assets/{skeleton-rS3IgBob.js → skeleton-DfUe6VV_.js} +1 -1
  289. package/dist/client/assets/sliders-horizontal-BGXkwvKv.js +1 -0
  290. package/dist/client/assets/sliding-tabs-BnDSjRU3.js +39 -0
  291. package/dist/client/assets/{smartphone-DgVJfbv3.js → smartphone-OEAQOTdv.js} +1 -1
  292. package/dist/client/assets/spinner-lHRJWsym.js +1 -0
  293. package/dist/client/assets/square-B05NKv3e.js +1 -0
  294. package/dist/client/assets/{star-Cqay-Cae.js → star-C8mHmfZu.js} +1 -1
  295. package/dist/client/assets/{stateDiagram-OKZ733FA-DEKURpRP.js → stateDiagram-OKZ733FA-CCOAegCG.js} +1 -1
  296. package/dist/client/assets/stateDiagram-v2-UEYNNEHI-D60qqBed.js +1 -0
  297. package/dist/client/assets/storeSelectors-BichCKDC.js +1 -0
  298. package/dist/client/assets/surfaceMorph-BTRijmlU.js +1 -0
  299. package/dist/client/assets/{swimlanes-SLNWSIFB-DrR6sbi6.js → swimlanes-SLNWSIFB-CFsLYT4h.js} +1 -1
  300. package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-D0SaJgSn.js +8 -0
  301. package/dist/client/assets/switch-oQc7Ifbl.js +1 -0
  302. package/dist/client/assets/text-wrap-DSRdSfDm.js +1 -0
  303. package/dist/client/assets/textarea-VyiIZ0wQ.js +1 -0
  304. package/dist/client/assets/threadPriorityRefreshRuntime-H656C1J_.js +1 -0
  305. package/dist/client/assets/ticker-CPutfhZ4.js +1 -0
  306. package/dist/client/assets/{timeline-definition-Z64GVDOM-bQJvmJx5.js → timeline-definition-Z64GVDOM-B4agmO7R.js} +1 -1
  307. package/dist/client/assets/toggle-DFqtCPt-.js +1 -0
  308. package/dist/client/assets/toggle-group-C5ICmqkI.js +1 -0
  309. package/dist/client/assets/{tokenModePresentation-BkS-mry_.js → tokenModePresentation-umDRm4k1.js} +1 -1
  310. package/dist/client/assets/tooltip-DbqhseXd.js +1 -0
  311. package/dist/client/assets/{treeView-Q6P3EWNA-D4Ex5QTp.js → treeView-Q6P3EWNA-C_S3udFB.js} +1 -1
  312. package/dist/client/assets/{treemap-WGGIJYW6-C4B6Y6qM.js → treemap-WGGIJYW6-B-kUSAkE.js} +1 -1
  313. package/dist/client/assets/undo-2-lyluTGMW.js +1 -0
  314. package/dist/client/assets/{unplug-B1dczi-t.js → unplug-D6iu-qlh.js} +1 -1
  315. package/dist/client/assets/usage-ClF-eUmy.js +1 -0
  316. package/dist/client/assets/useActiveIndicator-R5NWu8Fg.js +1 -0
  317. package/dist/client/assets/useAppSidebarCollapsed-BbMxfio5.js +1 -0
  318. package/dist/client/assets/useAppearancePreference-Ix13pMKy.js +1 -0
  319. package/dist/client/assets/useAtlassian-BYDCc9lv.js +0 -0
  320. package/dist/client/assets/useCheckoutResolution-CR-oOp5-.js +1 -0
  321. package/dist/client/assets/useDesktopRelaunchGuard-Jmh615iZ.js +1 -0
  322. package/dist/client/assets/useDiffFileNavigation-DeuzdD5E.js +15 -0
  323. package/dist/client/assets/useDiffLayout-DhcXwhBL.js +1 -0
  324. package/dist/client/assets/useEnvironmentSettingsTarget-DM6BRDT7.js +1 -0
  325. package/dist/client/assets/useFocus-CV0KIZwg.js +1 -0
  326. package/dist/client/assets/useGit-CUcs7h5_.js +1 -0
  327. package/dist/client/assets/useGitBranchSearch-CeKFtnCL.js +1 -0
  328. package/dist/client/assets/useHostedDraftExecutionTarget-DvQU5UOq.js +1 -0
  329. package/dist/client/assets/useLabelableId-CEgCRi6q.js +1 -0
  330. package/dist/client/assets/useLandingFlash-BfOOlFtW.js +1 -0
  331. package/dist/client/assets/useLogicalProjectSnapshots-CRNZke74.js +1 -0
  332. package/dist/client/assets/useNavigate-sQZthdyT.js +1 -0
  333. package/dist/client/assets/usePageLeadingInsetClass-Bf4nUvx4.js +1 -0
  334. package/dist/client/assets/usePhoneThreadActions-VaQ-mZex.js +1 -0
  335. package/dist/client/assets/usePopupHandleStore-DimKo2Yy.js +1 -0
  336. package/dist/client/assets/usePopupViewport-YeqX_UM3.js +1 -0
  337. package/dist/client/assets/usePresentationTier-B9kCQ4YH.js +1 -0
  338. package/dist/client/assets/useProject-Kt74Z12J.js +1 -0
  339. package/dist/client/assets/useProviderOptionsUpdater-CTzNh2B7.js +2 -0
  340. package/dist/client/assets/usePullRequestFilesViewed-D5Snmzys.js +1 -0
  341. package/dist/client/assets/usePullRequestsModel-DJL5HHbP.js +40 -0
  342. package/dist/client/assets/useScrollLock-CLZ31xsK.js +1 -0
  343. package/dist/client/assets/useSidebarThreadActions-n6EkLATf.js +6 -0
  344. package/dist/client/assets/{useStatistics-B76_r68I.js → useStatistics-DD0mYS4J.js} +14 -14
  345. package/dist/client/assets/{useTheme-B441xg4F.js → useTheme-Bdy-BDs-.js} +1 -1
  346. package/dist/client/assets/useValueChanged-DoumqMnV.js +1 -0
  347. package/dist/client/assets/{user-round-CLy1Qy1Y.js → user-round-BPDXr8Gq.js} +1 -1
  348. package/dist/client/assets/{vennDiagram-T6HMQDX7-8iiroXim.js → vennDiagram-T6HMQDX7-B1UEn_j_.js} +1 -1
  349. package/dist/client/assets/{vscode-icons-CJBVQtq5.js → vscode-icons-Ccy-gzFN.js} +1 -1
  350. package/dist/client/assets/{wardley-WFR3VGLG-DpyNUbTc.js → wardley-WFR3VGLG-gPdyDc-7.js} +1 -1
  351. package/dist/client/assets/{wardleyDiagram-T6FBY63Y-CI7is3QO.js → wardleyDiagram-T6FBY63Y-2aDcwOA4.js} +1 -1
  352. package/dist/client/assets/workspaceLifecycle-OJ1aKksw.js +3 -0
  353. package/dist/client/assets/workspaceMetadataProjection-CyEyJhUa.js +1 -0
  354. package/dist/client/assets/workspaceRouteSearch-CCavUdbH.js +1 -0
  355. package/dist/client/assets/{wrench-7pbbxqrZ.js → wrench-CPUCA_rn.js} +1 -1
  356. package/dist/client/assets/wsTransport-C88seBPA.js +15 -0
  357. package/dist/client/assets/{xychartDiagram-ELKLHX3M-BTEX3m2y.js → xychartDiagram-ELKLHX3M-C1_7Q-1i.js} +1 -1
  358. package/dist/client/favicon.svg +1 -1
  359. package/dist/client/index.html +1 -1
  360. package/dist/collectUint8StreamText-BsLSgI8i.mjs +710 -0
  361. package/dist/collectUint8StreamText-D5olwfpM.cjs +757 -0
  362. package/dist/{deviceHostWorker-L8C9wy38.mjs → deviceHostWorker-B-Dn-6An.mjs} +1 -1
  363. package/dist/{makeManagedServerProvider-CF776SAO.cjs → makeManagedServerProvider-B5tP7tvg.cjs} +1 -1
  364. package/dist/{makeManagedServerProvider-B90UKjnv.mjs → makeManagedServerProvider-B65ipCxM.mjs} +2 -2
  365. package/dist/resource-monitor/linux-arm64/ryco-resource-monitor +0 -0
  366. package/dist/resource-monitor/ryco-resource-monitor +0 -0
  367. package/dist/resource-monitor/ryco-resource-monitor.exe +0 -0
  368. package/dist/resource-monitor/win32-arm64/ryco-resource-monitor.exe +0 -0
  369. package/dist/resource-monitor/win32-x64/ryco-resource-monitor.exe +0 -0
  370. package/dist/{runtimeSession-V3RIy8Ao.mjs → runtimeSession-D_BZ-wRH.mjs} +1 -1
  371. package/dist/{src-CARHuYkT.cjs → src-FmeCeBJ9.cjs} +2291 -72
  372. package/dist/{src-CtsgPPhb.mjs → src-VTj60bUm.mjs} +1974 -61
  373. package/package.json +1 -1
  374. package/dist/AzureDevOpsSourceControlProvider-CKSvfuDS.cjs +0 -190
  375. package/dist/AzureDevOpsSourceControlProvider-DRWSXTml.mjs +0 -188
  376. package/dist/GitLabSourceControlProvider-Cj07OTBD.mjs +0 -186
  377. package/dist/GitLabSourceControlProvider-CvvN5pHt.cjs +0 -188
  378. package/dist/client/assets/AccountSettings-v6-r6gYl.js +0 -1
  379. package/dist/client/assets/AiFocusSettings-BVdLON0q.js +0 -1
  380. package/dist/client/assets/AppearanceSettings-DRChsQnN.js +0 -1
  381. package/dist/client/assets/BranchToolbar.logic-YN3KjVr9.js +0 -3
  382. package/dist/client/assets/BrowserPanel-Dxw3stFP.js +0 -1
  383. package/dist/client/assets/ChatRightPanel-CygpcJiF.js +0 -201
  384. package/dist/client/assets/ChatThreadRouteView-DYLZFHu0.js +0 -1
  385. package/dist/client/assets/CommandPaletteDialog-BRvBzP1R.js +0 -1
  386. package/dist/client/assets/CompositeRoot-BeEGGWwn.js +0 -1
  387. package/dist/client/assets/ComputerUseSettings-Cq8Pi0ZU.js +0 -1
  388. package/dist/client/assets/ConnectionsSettings-RSYtexxd.js +0 -7
  389. package/dist/client/assets/ContextHandoffEndpointLabel-CeGDLNA4.js +0 -4
  390. package/dist/client/assets/DiagnosticsSettings-CDa6MVx4.js +0 -2
  391. package/dist/client/assets/DialogHandle-BE7egDQQ.js +0 -1
  392. package/dist/client/assets/DialogRoot-C4mtzigX.js +0 -1
  393. package/dist/client/assets/DialogTitle-B_Q4DykI.js +0 -1
  394. package/dist/client/assets/DialogTrigger-BSqd4Crj.js +0 -1
  395. package/dist/client/assets/DraftChatThreadRouteView-JW_bXVrM.js +0 -1
  396. package/dist/client/assets/GlassSurface-DDG4eTlj.js +0 -1
  397. package/dist/client/assets/HostedConnectionControls-CscV6hm1.js +0 -1
  398. package/dist/client/assets/HostedHubRoot-gp7-ClBP.js +0 -2
  399. package/dist/client/assets/HostedNodeRenameDialog-D1DSiTpx.js +0 -1
  400. package/dist/client/assets/HostedRelayTrustNotice-B9jp4SRh.js +0 -1
  401. package/dist/client/assets/IntegrationsSettingsPanel-DH7SfWtV.js +0 -2
  402. package/dist/client/assets/KeybindingsSettings-DkgYYSHS.js +0 -7
  403. package/dist/client/assets/LazyBrowserPanel-D4e76vc_.js +0 -2
  404. package/dist/client/assets/McpServersSettings-Dc1kPa-X.js +0 -6
  405. package/dist/client/assets/MobileSheet-lT--mLEz.js +0 -1
  406. package/dist/client/assets/NodeSecuritySettings-DcfSx4KT.js +0 -1
  407. package/dist/client/assets/NullStore-8d2s-Re3.js +0 -1
  408. package/dist/client/assets/OnboardingDialog-CnLjwM6Z.js +0 -1
  409. package/dist/client/assets/OpinionatedPluginsSettings-BTJyS3rN.js +0 -1
  410. package/dist/client/assets/PhoneHome-CIMkuDJF.js +0 -1
  411. package/dist/client/assets/PhoneSettingsSurface-CfZQxJNI.js +0 -2
  412. package/dist/client/assets/ProvidersSettingsPanel-DAVSiwE1.js +0 -1
  413. package/dist/client/assets/RedactedSensitiveText-BHGbQJwB.js +0 -1
  414. package/dist/client/assets/RootAppShell-T056pByH.js +0 -7
  415. package/dist/client/assets/SettingsDialog-BERU2Qg7.js +0 -2
  416. package/dist/client/assets/SettingsPanels-De_XZOQF.js +0 -3
  417. package/dist/client/assets/SettingsPanels.editor-Dkva9gX_.js +0 -2
  418. package/dist/client/assets/SourceControlSettings-B4HS17cB.js +0 -1
  419. package/dist/client/assets/StatisticsPage-Bj2ftFdH.js +0 -1
  420. package/dist/client/assets/StatisticsPanel-Dw7GBBmd.js +0 -1
  421. package/dist/client/assets/StatisticsSettingsLink-_XL3ABoI.js +0 -1
  422. package/dist/client/assets/ThreadTerminalDrawer-CPPzQSXN.js +0 -18
  423. package/dist/client/assets/ThreadWorkspacePanel-DWKU7Omm.js +0 -2073
  424. package/dist/client/assets/appChrome-TkWLAGxk.js +0 -1
  425. package/dist/client/assets/architecture-7GRP2DOG-HS59zfrk.js +0 -1
  426. package/dist/client/assets/authorization-D8dOcEYq.js +0 -1
  427. package/dist/client/assets/badge-2AZ3HfVS.js +0 -1
  428. package/dist/client/assets/capabilities-CsHjxjab.js +0 -1
  429. package/dist/client/assets/channel-Dn3_cOkm.js +0 -1
  430. package/dist/client/assets/chevron-right-Dsw16yGn.js +0 -1
  431. package/dist/client/assets/classDiagram-JCYQIIEL-ZQvrS8No.js +0 -1
  432. package/dist/client/assets/classDiagram-v2-OCEON4UE-ZQvrS8No.js +0 -1
  433. package/dist/client/assets/compiler-runtime-C4g8XhC5.js +0 -1
  434. package/dist/client/assets/desktopWorkspace-_iM6B9Kf.js +0 -1
  435. package/dist/client/assets/editorPreferences-D8q1ItMW.js +0 -1
  436. package/dist/client/assets/eventmodeling-NTZA5JFV-Dj71kuPV.js +0 -1
  437. package/dist/client/assets/flowDiagram-UKHOOZJN-BaAiwuvL.js +0 -1
  438. package/dist/client/assets/hostedConnectionCoordinator-BuRWCvUG.js +0 -1
  439. package/dist/client/assets/hubRoutes-jcMPIFy3.js +0 -1
  440. package/dist/client/assets/kbd-Dxm5Elqj.js +0 -1
  441. package/dist/client/assets/layers-Dqez1Uq8.js +0 -1
  442. package/dist/client/assets/liquidGlass-CA2o_Cq0.js +0 -1
  443. package/dist/client/assets/liquidGlass.worker-icvLJKHf.js +0 -1
  444. package/dist/client/assets/main-BqSANuAs.css +0 -2
  445. package/dist/client/assets/main-DAbEANjY.js +0 -9
  446. package/dist/client/assets/motion-BdscFixQ.js +0 -1
  447. package/dist/client/assets/palette-92ylWqeC.js +0 -1
  448. package/dist/client/assets/perfInstrumentation-BT27w4tn.js +0 -1
  449. package/dist/client/assets/presentationTier-xlIjcFab.js +0 -1
  450. package/dist/client/assets/primary-DZjgHvyf.js +0 -5
  451. package/dist/client/assets/providerDriverMeta-T2YbXzuS.js +0 -1
  452. package/dist/client/assets/providerStatus-DBGvvkyF.js +0 -1
  453. package/dist/client/assets/radio-group-CRnHYWa8.js +0 -1
  454. package/dist/client/assets/railroad-abnf-HS5TGJTU-DxU7Mt1k.js +0 -1
  455. package/dist/client/assets/railroad-ebnf-LZEXJU2U-BYAPVjRd.js +0 -1
  456. package/dist/client/assets/railroad-peg-WCYAUIDC-BOqgR_X7.js +0 -1
  457. package/dist/client/assets/runtime-BwHA1GUS.js +0 -18
  458. package/dist/client/assets/scroll-area-7n2X_RLQ.js +0 -1
  459. package/dist/client/assets/separator-CL1qjMqJ.js +0 -1
  460. package/dist/client/assets/settingsLayout-DxsFwhF0.js +0 -1
  461. package/dist/client/assets/sheet-CGiaw8-i.js +0 -1
  462. package/dist/client/assets/sidebar-Cc6ANbOP.js +0 -1
  463. package/dist/client/assets/sidebarProjectFolders-DO2Uv84F.js +0 -4
  464. package/dist/client/assets/sidebarStatusText-B4AtFXZo.js +0 -1
  465. package/dist/client/assets/sidebarUndo-gdSrfa4O.js +0 -1
  466. package/dist/client/assets/square-Cr9X8U6y.js +0 -1
  467. package/dist/client/assets/src-C3Y_imaX.js +0 -14
  468. package/dist/client/assets/stateDiagram-v2-UEYNNEHI-CWtHILqh.js +0 -1
  469. package/dist/client/assets/storeSelectors-CTDWheMy.js +0 -1
  470. package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-DuaPce9O.js +0 -8
  471. package/dist/client/assets/switch-DnpJB2xv.js +0 -48
  472. package/dist/client/assets/toggle-D10FsFoE.js +0 -1
  473. package/dist/client/assets/toggle-group-BhzbQPEQ.js +0 -1
  474. package/dist/client/assets/tooltip-BlweKBxc.js +0 -1
  475. package/dist/client/assets/usage-BBwaxMif.js +0 -1
  476. package/dist/client/assets/useAppSidebarCollapsed-CFy476E3.js +0 -1
  477. package/dist/client/assets/useAppearancePreference-Dlh9P8iu.js +0 -1
  478. package/dist/client/assets/useBaseUiId-DKOjzmu3.js +0 -1
  479. package/dist/client/assets/useLabelableId-DQbY2GG1.js +0 -1
  480. package/dist/client/assets/useNavigate-B8oXtF30.js +0 -1
  481. package/dist/client/assets/usePhoneThreadActions-6DCLiyJ5.js +0 -1
  482. package/dist/client/assets/usePopupViewport-CNWcP7Od.js +0 -1
  483. package/dist/client/assets/usePresentationTier-hxB7Yv_Q.js +0 -1
  484. package/dist/client/assets/useScrollLock-BbKeKZdj.js +0 -1
  485. package/dist/client/assets/useTriggerFocusGuards-BC4Wb3GI.js +0 -1
  486. package/dist/client/assets/useValueChanged-BkTbyZdO.js +0 -1
  487. package/dist/client/assets/workspaceMetadataProjection-aqZEXDrQ.js +0 -1
  488. package/dist/collectUint8StreamText-BAUF-vzz.mjs +0 -37
  489. package/dist/collectUint8StreamText-vagpNUMJ.cjs +0 -42
  490. package/dist/git-9xWsJYIH.mjs +0 -132
  491. package/dist/git-xIkXFy_l.cjs +0 -218
  492. package/dist/sourceControl-B0D1Op29.cjs +0 -253
  493. package/dist/sourceControl-BiEBxN01.mjs +0 -224
@@ -1,2 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{K as t,q as n}from"./primary-DZjgHvyf.js";import{t as r}from"./src-C3Y_imaX.js";import{$l as i,Bl as a,Gl as o,Hn as s,K as c,Kl as l,Kr as u,Mr as d,Or as f,P as p,Ql as m,Qr as h,Zl as g,Zr as _,ei as v,ho as y,hr as b,kr as x,mr as S,oo as C,p as w,pr as T,sr as E}from"./runtime-BwHA1GUS.js";import{t as D}from"./react-CwJFpaho.js";import{t as O}from"./compiler-runtime-C4g8XhC5.js";import{a as k,c as A,n as j,o as M,s as N,t as P}from"./badge-2AZ3HfVS.js";import{c as F}from"./hostedConnectionCoordinator-BuRWCvUG.js";import{t as ee}from"./clipboard-copy-BWf3JuTE.js";import{n as I,t as L}from"./play-DUvOxTpL.js";import{t as te}from"./refresh-cw-CgDa2Ok_.js";import{r as ne}from"./editorPreferences-D8q1ItMW.js";import{t as R}from"./toastHelpers-CSQRKo4F.js";import{t as z}from"./authorization-D8dOcEYq.js";import"./usePresentationTier-hxB7Yv_Q.js";import{i as B,r as re,t as V}from"./alert-DQEkrtUJ.js";import{i as H,n as U,r as W}from"./settingsLayout-DxsFwhF0.js";var G={name:`clipboard-check`,size:24,node:[[`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`}]]};G.node;var ie=y(G),K=e(D(),1),q=O();function ae(e){return!e.connected||e.role===`client`?!1:e.primary||e.role===`owner`}function oe(e){let t=(0,q.c)(16),r=m(),i=p(se),a=F(),o;t[0]===r?o=t[1]:(o=e=>r?e.byId[r.environmentId]:void 0,t[0]=r,t[1]=o);let s=S(o),c,l;if(t[2]!==e||t[3]!==i.browserStatus||t[4]!==i.directoryStatus||t[5]!==i.effectiveRole||t[6]!==i.sessionStatus||t[7]!==i.transportStatus||t[8]!==r||t[9]!==a.machines){let o;t[12]===r?.environmentId?o=t[13]:(o=e=>e.environmentId===r?.environmentId,t[12]=r?.environmentId,t[13]=o);let s=a.machines.find(o);c=n(),l=z({hosted:c,role:s?s.effectiveRole:r&&!r.primary?null:i.effectiveRole,fresh:i.directoryStatus===`ready`&&(s?s.connectionState===`connected`&&s.canMutate&&s.cacheDisposition===`available`&&s.presence.online:i.transportStatus===`online`),browserCurrent:i.browserStatus===`current`,sessionReady:i.sessionStatus===`ready`,method:e}),t[2]=e,t[3]=i.browserStatus,t[4]=i.directoryStatus,t[5]=i.effectiveRole,t[6]=i.sessionStatus,t[7]=i.transportStatus,t[8]=r,t[9]=a.machines,t[10]=c,t[11]=l}else c=t[10],l=t[11];let u=l;if(!c&&r&&!ae({primary:r.primary,connected:r.connected&&(!s||s.connectionState===`connected`),role:s?.role})){let e;return t[14]===c?e=t[15]:(e={hosted:c,allowed:!1,reason:`Diagnostics require a connected owner session.`},t[14]=c,t[15]=e),e}return u}function se(e){return e}function ce(e){let t=!1,n=!1;return{async refresh(){if(!(t||n)){n=!0,e.onLoading(!0);try{let n=await e.fetch();t||e.onSuccess(n)}catch(n){t||e.onError(n)}finally{n=!1,t||e.onLoading(!1)}}},dispose(){t=!0}}}function le(e,t){let n=new Map(e.map(e=>[e.identity.pid,e]));return e.filter(e=>{let r=new Set([e.identity.pid]),i=n.get(e.ppid);for(;i&&!r.has(i.identity.pid);){if(t.has(`${i.identity.pid}:${i.identity.startTimeMs}`))return!1;r.add(i.identity.pid),i=n.get(i.ppid)}return!0})}function ue(e){return e===`failure`||e===`error`}function J(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 Y(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 X(e){return e===void 0||!Number.isFinite(e)?`n/a`:`${Math.max(0,e).toFixed(1)}%`}function Z(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 de(e){return e.map(e=>({label:e.sampledAt,value:e.memory.rssBytes}))}function fe(e){return e.map(e=>({label:e.sampledAt,value:e.cpu.utilizationPercent??0}))}function pe(e){return e.map(e=>({label:e.label,value:e.count}))}function me(e){return e.slice(0,8).map(e=>({label:e.name,value:e.count}))}function he(e){let t=e.failures.latest[0];return t?t.message:`No failures`}var Q=i(),ge=[{label:`5m`,windowMs:3e5,bucketMs:15e3},{label:`15m`,windowMs:9e5,bucketMs:3e4},{label:`30m`,windowMs:18e5,bucketMs:6e4},{label:`1h`,windowMs:36e5,bucketMs:12e4}];function _e({telemetry:e,paused:t,refresh:n}){let i=m()?.environmentId,[a,o]=(0,K.useState)(0),[s,c]=(0,K.useState)(null),[l,u]=(0,K.useState)(null),[d,f]=(0,K.useState)(!1),[p,g]=(0,K.useState)(!1),[_,v]=(0,K.useState)(!0),[y,x]=(0,K.useState)(new Set),S=(0,K.useRef)(null),C=(0,K.useRef)(t);C.current=t;let w=oe(r.serverRetryResourceTelemetry),T=oe(r.serverGetResourceTelemetryHistory),D=ge[a]??ge[0],O=(0,K.useRef)(0);(0,K.useEffect)(()=>(O.current+=1,g(!1),()=>{O.current+=1}),[i]),(0,K.useEffect)(()=>{if(c(null),u(null),!T.allowed){f(!1);return}let e=ce({fetch:async()=>{let e=i?E(i)?.server:b().server;if(!e?.getResourceTelemetryHistory)throw Error(`Resource history is unavailable on this server.`);return e.getResourceTelemetryHistory({windowMs:D.windowMs,bucketMs:D.bucketMs})},onSuccess:e=>{c(e),u(null)},onError:e=>u(e instanceof Error?e.message:`Resource history could not be refreshed.`),onLoading:f});S.current=e.refresh;let t=()=>{!C.current&&document.visibilityState===`visible`&&e.refresh()};t();let n=window.setInterval(t,5e3);return document.addEventListener(`visibilitychange`,t),()=>{e.dispose(),S.current=null,window.clearInterval(n),document.removeEventListener(`visibilitychange`,t)}},[i,D,T.allowed,T.reason]);async function k(){if(p||!w.allowed)return;let e=O.current;g(!0);try{let t=i?E(i)?.server:b().server;if(!t?.retryResourceTelemetry)throw Error(`Resource monitor retry is unavailable on this server.`);if(await t.retryResourceTelemetry(),e!==O.current)return;await n(),await S.current?.()}catch(t){e===O.current&&u(t instanceof Error?t.message:`Could not retry resource monitor.`)}finally{e===O.current&&g(!1)}}let A=e?.health,j=le(e?.processes??[],y).filter(e=>_||e.cpuPercent>0||e.ioReadBytesPerSecond>0||e.ioWriteBytesPerSecond>0||e.category===`server`),M=s?.buckets??[],N=Math.max(1,...M.map(e=>e.maxCpuPercent)),P=Math.max(1,...M.map(e=>Math.max(e.ioReadBytes,e.ioWriteBytes))),F=Math.max(1,...M.map(e=>e.maxRssBytes));return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(H,{title:`Resource monitor`,headerAction:(0,Q.jsx)(h,{size:`xs`,variant:`outline`,disabled:p||!w.allowed,onClick:()=>void k(),children:p?`Retrying…`:`Retry monitor`}),children:[(0,Q.jsxs)(`p`,{className:`px-4 py-3 text-xs text-muted-foreground`,children:[e?`Sampled ${Z(e.readAt)} · interval ${Y(e.sampleIntervalMs)}`:`Waiting for resource telemetry.`,` `,`CPU may exceed 100% across cores. I/O availability depends on the platform.`]}),(0,Q.jsx)(`dl`,{className:`grid grid-cols-2 divide-x divide-y border-t lg:grid-cols-3`,children:[[`Current CPU`,e?X(e.groups.allRyco.currentCpuPercent):`Loading…`],[`Resident memory`,e?J(e.groups.allRyco.currentRssBytes):`Loading…`],[`Process count`,e?String(e.groups.allRyco.processCount):`Loading…`],[`Read throughput`,e?`${J(e.groups.allRyco.ioReadBytesPerSecond)}/s`:`Loading…`],[`Write throughput`,e?`${J(e.groups.allRyco.ioWriteBytesPerSecond)}/s`:`Loading…`],[`CPU speed limit`,e?.speedLimitPercent==null?`Unknown`:`${e.speedLimitPercent}%`]].map(([e,t])=>(0,Q.jsxs)(`div`,{className:`px-4 py-4`,children:[(0,Q.jsx)(`dt`,{className:`text-[11px] font-medium uppercase tracking-wide text-muted-foreground`,children:e}),(0,Q.jsx)(`dd`,{className:`mt-2 text-2xl font-semibold tabular-nums`,children:t})]},e))}),(0,Q.jsx)(`div`,{className:`overflow-x-auto`,children:(0,Q.jsxs)(`table`,{className:`w-full min-w-[850px] text-left text-xs [&_td]:px-4 [&_td]:py-3`,children:[(0,Q.jsx)(`thead`,{className:`border-y text-muted-foreground`,children:(0,Q.jsx)(`tr`,{children:[`Group`,`Processes`,`CPU / time`,`RSS / peak`,`Read / write rate`,`Read / write total`,`Starts / exits`].map(e=>(0,Q.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:e},e))})}),(0,Q.jsx)(`tbody`,{className:`divide-y`,children:e?Object.entries(e.groups).map(([e,t])=>(0,Q.jsxs)(`tr`,{children:[(0,Q.jsx)(`td`,{children:{allRyco:`All Ryco`,backend:`Backend + agents`,electron:`Desktop`,monitor:`Monitor overhead`}[e]??e}),(0,Q.jsx)(`td`,{children:t.processCount}),(0,Q.jsxs)(`td`,{children:[X(t.currentCpuPercent),(0,Q.jsx)(`div`,{children:Y(t.cpuTimeMs)})]}),(0,Q.jsxs)(`td`,{children:[J(t.currentRssBytes),(0,Q.jsx)(`div`,{children:J(t.peakRssBytes)})]}),(0,Q.jsxs)(`td`,{children:[J(t.ioReadBytesPerSecond),`/s`,(0,Q.jsxs)(`div`,{children:[J(t.ioWriteBytesPerSecond),`/s`]})]}),(0,Q.jsxs)(`td`,{children:[J(t.ioReadBytes),(0,Q.jsx)(`div`,{children:J(t.ioWriteBytes)})]}),(0,Q.jsxs)(`td`,{children:[t.processStarts,` / `,t.processExits]})]},e)):null})]})})]}),(0,Q.jsxs)(H,{title:`Host & collection`,children:[A?(0,Q.jsxs)(`div`,{className:`grid gap-3 border-t px-4 py-3 text-xs sm:grid-cols-2`,children:[[`native`,`desktop`].map(e=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`strong`,{className:`capitalize`,children:[e,`: `,A[e].status]}),(0,Q.jsx)(`p`,{className:`mt-1 text-muted-foreground`,children:A[e].lastSampleAt?`Last sample ${Z(A[e].lastSampleAt)}`:`No sample`}),A[e].lastError?(0,Q.jsx)(`p`,{className:`mt-1 text-warning`,children:A[e].lastError}):null]},e)),(0,Q.jsxs)(`p`,{children:[`Monitor `,A.sidecarVersion??`version unavailable`,` · PID`,` `,A.sidecarPid??`unavailable`,` · `,A.restartCount,` restarts`]}),(0,Q.jsxs)(`p`,{children:[(A.collectionDurationMicros/1e3).toFixed(2),` ms collection ·`,` `,A.scannedProcessCount,` scanned · `,A.retainedProcessCount,` retained ·`,` `,A.inaccessibleProcessCount,` inaccessible`]})]}):null,(0,Q.jsxs)(`div`,{className:`border-t px-4 py-3 text-xs`,children:[(0,Q.jsx)(`h3`,{className:`text-xs font-medium`,children:`Power and background state`}),e?.power?(0,Q.jsx)(`dl`,{className:`mt-3 grid grid-cols-2 gap-3`,children:Object.entries(e.power).map(([e,t])=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`dt`,{className:`text-muted-foreground`,children:{idleState:`Idle state`,idleSeconds:`Idle seconds`,onBattery:`On battery`,thermalState:`Thermal state`,speedLimitPercent:`CPU speed limit (%)`,suspended:`Suspended`,lowPowerMode:`Low power mode`,locked:`Screen locked`,updatedAt:`Updated`,stale:`Stale`}[e]??e}),(0,Q.jsx)(`dd`,{children:t===null?`Unknown`:typeof t==`boolean`?t?`Yes`:`No`:String(t)})]},e))}):(0,Q.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:`Desktop power state is unavailable on this connection.`}),(0,Q.jsxs)(`p`,{className:`mt-2`,children:[`CPU speed limit:`,` `,e?.speedLimitPercent==null?`Unknown`:`${e.speedLimitPercent}%`]})]})]}),(0,Q.jsxs)(H,{title:`Resource timeline`,headerAction:(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Q.jsx)(`div`,{role:`group`,"aria-label":`Resource history period`,className:`flex gap-1`,children:ge.map((e,t)=>(0,Q.jsx)(h,{size:`xs`,variant:a===t?`secondary`:`outline`,"aria-pressed":a===t,onClick:()=>o(t),children:e.label},e.label))}),(0,Q.jsx)(h,{size:`xs`,variant:`outline`,disabled:d,onClick:()=>void S.current?.(),children:`Refresh`})]}),children:[l?(0,Q.jsx)(`p`,{role:`alert`,className:`px-4 py-3 text-xs text-destructive`,children:l}):null,(0,Q.jsx)(`p`,{className:`px-4 py-3 text-xs text-muted-foreground`,children:s?`${s.totalCpuTimeMs===void 0?`Unavailable`:Y(s.totalCpuTimeMs)} total CPU time · ${s.retainedSampleCount} retained samples · ${Y(s.sampleIntervalMs)} sampling interval · checked ${Z(s.readAt)}`:`Collecting resource history…`}),(0,Q.jsx)(`div`,{className:`grid gap-4 px-4 pb-4 sm:grid-cols-2`,children:[`cpu`,`memory`,`read`,`write`].map(e=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`p`,{className:`mb-2 text-xs font-medium`,children:e===`cpu`?`CPU average / peak`:e===`memory`?`Peak RSS`:e===`read`?`I/O reads`:`I/O writes`}),(0,Q.jsx)(`svg`,{viewBox:`0 0 400 100`,role:`img`,"aria-label":e===`cpu`?`CPU history`:e===`memory`?`Memory history`:e===`read`?`I/O read history`:`I/O write history`,className:`h-24 w-full text-info`,children:M.map((t,n)=>{let r=e===`cpu`?t.maxCpuPercent/N:e===`memory`?t.maxRssBytes/F:(e===`read`?t.ioReadBytes:t.ioWriteBytes)/P,i=t.avgCpuPercent/N;return(0,Q.jsxs)(`g`,{children:[(0,Q.jsxs)(`title`,{children:[new Date(t.startedAt).toLocaleTimeString(),`: average`,` `,X(t.avgCpuPercent),`, peak`,` `,X(t.maxCpuPercent),`, RSS `,J(t.maxRssBytes),`, read `,J(t.ioReadBytes),`, write`,` `,J(t.ioWriteBytes),`, `,t.maxProcessCount,` processes`]}),(0,Q.jsx)(`rect`,{x:n*400/Math.max(1,M.length),y:100-r*100,width:Math.max(1,400/Math.max(1,M.length)-2),height:r*100,fill:`currentColor`,opacity:e===`cpu`?.3:1}),e===`cpu`?(0,Q.jsx)(`rect`,{x:n*400/Math.max(1,M.length),y:100-i*100,width:Math.max(1,400/Math.max(1,M.length)-2),height:i*100,fill:`currentColor`}):null]},t.startedAt)})}),(0,Q.jsxs)(`p`,{className:`text-[11px] text-muted-foreground`,children:[`Scale:`,` `,e===`cpu`?X(N):J(e===`memory`?F:P)]})]},e))}),(0,Q.jsx)(`div`,{className:`overflow-x-auto`,children:(0,Q.jsxs)(`table`,{className:`w-full min-w-[850px] text-left text-xs [&_td]:px-4 [&_td]:py-3`,children:[(0,Q.jsx)(`thead`,{className:`border-y text-muted-foreground`,children:(0,Q.jsx)(`tr`,{children:[`Process`,`CPU avg / peak`,`CPU time`,`RSS / peak`,`I/O read / write`,`Samples / last seen`].map(e=>(0,Q.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:e},e))})}),(0,Q.jsx)(`tbody`,{className:`divide-y`,children:s?.topProcesses.map(e=>(0,Q.jsxs)(`tr`,{children:[(0,Q.jsxs)(`td`,{children:[(0,Q.jsxs)(`details`,{children:[(0,Q.jsxs)(`summary`,{className:`cursor-pointer`,children:[e.name,` (`,e.identity.pid,`)`]}),(0,Q.jsx)(`p`,{className:`max-w-72 break-all font-mono`,children:e.command})]}),(0,Q.jsx)(`div`,{className:`text-muted-foreground`,children:e.category})]}),(0,Q.jsxs)(`td`,{children:[X(e.avgCpuPercent),` / `,X(e.maxCpuPercent)]}),(0,Q.jsx)(`td`,{children:Y(e.cpuTimeMs)}),(0,Q.jsxs)(`td`,{children:[J(e.currentRssBytes),` / `,J(e.peakRssBytes)]}),(0,Q.jsx)(`td`,{children:e.ioSemantics===`unavailable`?`Unavailable`:`${J(e.ioReadBytes)} / ${J(e.ioWriteBytes)}`}),(0,Q.jsxs)(`td`,{children:[e.sampleCount,` · `,Z(e.lastSeenAt)]})]},`${e.identity.pid}:${e.identity.startTimeMs}`))})]})})]}),(0,Q.jsxs)(H,{title:`Live process tree`,headerAction:(0,Q.jsx)(h,{size:`xs`,variant:`outline`,"aria-pressed":_,onClick:()=>v(e=>!e),children:_?`Hide idle processes`:`Show idle processes`}),children:[(0,Q.jsx)(`div`,{className:`overflow-x-auto`,children:(0,Q.jsxs)(`table`,{className:`w-full min-w-[1000px] text-left text-xs [&_td]:px-4 [&_td]:py-3 [&_td]:align-top`,children:[(0,Q.jsx)(`thead`,{className:`border-b text-muted-foreground`,children:(0,Q.jsx)(`tr`,{children:[`Process / category`,`PID / parent`,`CPU / time`,`RSS / peak / virtual`,`I/O rate / semantics`,`Wakeups / uptime`].map(e=>(0,Q.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:e},e))})}),(0,Q.jsx)(`tbody`,{className:`divide-y`,children:j.map(e=>(0,Q.jsxs)(`tr`,{children:[(0,Q.jsxs)(`td`,{className:`max-w-80`,children:[(0,Q.jsxs)(`div`,{style:{paddingLeft:Math.min(e.depth,8)*10},children:[e.childPids.length>0?(0,Q.jsx)(h,{size:`xs`,variant:`ghost`,"aria-label":`${y.has(`${e.identity.pid}:${e.identity.startTimeMs}`)?`Expand`:`Collapse`} ${e.name} children`,"aria-expanded":!y.has(`${e.identity.pid}:${e.identity.startTimeMs}`),onClick:()=>x(t=>{let n=new Set(t),r=`${e.identity.pid}:${e.identity.startTimeMs}`;return n.has(r)?n.delete(r):n.add(r),n}),children:y.has(`${e.identity.pid}:${e.identity.startTimeMs}`)?`+`:`−`}):null,(0,Q.jsxs)(`details`,{children:[(0,Q.jsx)(`summary`,{className:`cursor-pointer break-all`,children:e.name}),(0,Q.jsx)(`p`,{className:`mt-2 break-all font-mono`,children:e.command}),(0,Q.jsxs)(`p`,{children:[`First seen `,Z(e.firstSeenAt),` · last seen`,` `,Z(e.lastSeenAt)]})]})]}),(0,Q.jsxs)(`div`,{className:`mt-1 text-muted-foreground`,children:[e.category,` `,e.electronType,` `,e.electronServiceName,` ·`,` `,e.status]})]}),(0,Q.jsxs)(`td`,{children:[e.identity.pid,` / `,e.ppid]}),(0,Q.jsxs)(`td`,{children:[X(e.cpuPercent),(0,Q.jsx)(`div`,{children:Y(e.cpuTimeMs)})]}),(0,Q.jsxs)(`td`,{children:[J(e.residentBytes),(0,Q.jsx)(`div`,{children:J(e.peakResidentBytes)}),(0,Q.jsx)(`div`,{children:J(e.virtualBytes)})]}),(0,Q.jsxs)(`td`,{children:[e.ioSemantics===`unavailable`?`Unavailable`:(0,Q.jsxs)(Q.Fragment,{children:[J(e.ioReadBytesPerSecond),`/s read`,(0,Q.jsxs)(`div`,{children:[J(e.ioWriteBytesPerSecond),`/s write`]}),(0,Q.jsxs)(`div`,{children:[J(e.ioReadBytes),` / `,J(e.ioWriteBytes),` `,`total`]})]}),(0,Q.jsx)(`div`,{className:`text-muted-foreground`,children:e.ioSemantics})]}),(0,Q.jsxs)(`td`,{children:[e.idleWakeupsPerSecond==null?`Unavailable`:`${e.idleWakeupsPerSecond.toFixed(1)}/s`,(0,Q.jsx)(`div`,{children:Y(e.runTimeMs)})]})]},`${e.identity.pid}:${e.identity.startTimeMs}`))})]})}),j.length===0?(0,Q.jsx)(`p`,{className:`px-4 py-3 text-xs text-muted-foreground`,children:`No active processes in this sample. Show idle processes to include retained idle entries.`}):null]}),(0,Q.jsxs)(H,{title:`Instrumented application I/O`,children:[(0,Q.jsx)(`p`,{className:`px-4 py-3 text-xs text-muted-foreground`,children:`Application read/write counters describe logical work and are separate from operating-system storage bytes.`}),(0,Q.jsx)(`div`,{className:`overflow-x-auto`,children:(0,Q.jsxs)(`table`,{className:`w-full min-w-[650px] text-left text-xs [&_td]:px-4 [&_td]:py-3`,children:[(0,Q.jsx)(`thead`,{className:`border-y text-muted-foreground`,children:(0,Q.jsx)(`tr`,{children:[`Component / operation`,`Read`,`Write`,`Count`,`Duration`].map(e=>(0,Q.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:e},e))})}),(0,Q.jsx)(`tbody`,{className:`divide-y`,children:e?.attribution.entries.map(e=>(0,Q.jsxs)(`tr`,{children:[(0,Q.jsxs)(`td`,{children:[e.component,` / `,e.operation]}),(0,Q.jsx)(`td`,{children:J(e.logicalReadBytes)}),(0,Q.jsx)(`td`,{children:J(e.logicalWriteBytes)}),(0,Q.jsx)(`td`,{children:e.count}),(0,Q.jsx)(`td`,{children:Y(e.durationMs)})]},`${e.component}:${e.operation}`))})]})}),e?.attribution.entries.length?null:(0,Q.jsx)(`p`,{className:`px-4 py-3 text-xs text-muted-foreground`,children:`No logical I/O attribution captured.`})]})]})}function ve({snapshot:e,refresh:t}){let n=m(),i=oe(r.serverSignalDiagnosticProcess),[a,o]=(0,K.useState)(null),[s,c]=(0,K.useState)(null),l=(0,K.useRef)({target:n,snapshot:e,allowed:!1}),u=(0,K.useRef)(!1),d=(0,K.useRef)(!0),f=i.allowed;l.current={target:n,snapshot:e,allowed:f},(0,K.useEffect)(()=>(d.current=!0,()=>{d.current=!1}),[]);async function p(e,n){if(u.current||!l.current.allowed)return;let r=l.current.target?.environmentId;u.current=!0,o(e.pid),c(null);try{if(!await b().dialogs.confirm(`${n===`SIGKILL`?`Force kill`:`Interrupt`} process ${e.pid} (${e.command})? ${n===`SIGKILL`?`Unsaved work may be lost.`:`This may stop an active agent or terminal task.`}`)||!d.current||!l.current.allowed||l.current.target?.environmentId!==r)return;if(!l.current.snapshot?.processTree?.processes.find(t=>t.pid===e.pid&&t.startTimeMs===e.startTimeMs)){c(`Process already exited or changed. Refresh diagnostics.`);return}let i=r?E(r)?.server:b().server;if(!i?.signalDiagnosticProcess)throw Error(`Process controls are unavailable on this server.`);let a=await i.signalDiagnosticProcess({pid:e.pid,startTimeMs:e.startTimeMs,signal:n});if(!d.current||l.current.target?.environmentId!==r)return;c(a.signaled?`${n} sent to process ${e.pid}.`:a.message??`Process already exited or is no longer a server child.`),await t()}catch(e){d.current&&l.current.target?.environmentId===r&&c(e instanceof Error?e.message:`Could not signal process.`)}finally{u.current=!1,d.current&&o(null)}}let g=e?.processTree;return(0,Q.jsxs)(H,{title:`Live descendant processes`,children:[(0,Q.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 px-4 py-4 text-xs lg:grid-cols-4`,children:[(0,Q.jsxs)(`div`,{children:[`Child processes`,(0,Q.jsx)(`div`,{className:`mt-1 font-mono`,children:g?.processes.length??`Unavailable`})]}),(0,Q.jsxs)(`div`,{children:[`Child CPU`,(0,Q.jsx)(`div`,{className:`mt-1 font-mono`,children:X(g?.totalCpuPercent)})]}),(0,Q.jsxs)(`div`,{children:[`Child RSS`,(0,Q.jsx)(`div`,{className:`mt-1 font-mono`,children:g?J(g.totalRssBytes):`Unavailable`})]}),(0,Q.jsxs)(`div`,{children:[`Server PID`,(0,Q.jsx)(`div`,{className:`mt-1 font-mono`,children:g?.serverPid??e?.liveProcesses.server.pid??`Unavailable`})]})]}),(0,Q.jsxs)(`p`,{className:`px-4 pb-3 text-xs text-muted-foreground`,children:[`Live children of the selected server. The server and desktop shell are excluded.`,` `,g?`Checked ${Z(g.readAt)}.`:`This server has not supplied process diagnostics.`]}),g?.error?(0,Q.jsx)(`p`,{role:`alert`,className:`px-4 pb-3 text-xs text-destructive`,children:g.error}):null,s?(0,Q.jsx)(`p`,{role:`status`,className:`px-4 pb-3 text-xs`,children:s}):null,f?null:(0,Q.jsx)(`p`,{className:`px-4 pb-3 text-xs text-muted-foreground`,children:i.reason??`Process controls require a connected owner session.`}),(0,Q.jsx)(`div`,{className:`overflow-x-auto`,children:(0,Q.jsxs)(`table`,{className:`w-full min-w-[760px] text-left text-xs [&_td]:px-4 [&_td]:py-3 [&_td]:align-top`,children:[(0,Q.jsx)(`thead`,{className:`border-y text-muted-foreground`,children:(0,Q.jsx)(`tr`,{children:[`Process`,`PID / Parent`,`CPU`,`RSS`,`Status / Age`,`Actions`].map(e=>(0,Q.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:e},e))})}),(0,Q.jsx)(`tbody`,{className:`divide-y divide-border/60`,children:g?.processes.map(e=>(0,Q.jsxs)(`tr`,{children:[(0,Q.jsx)(`td`,{className:`max-w-96`,children:(0,Q.jsxs)(`details`,{style:{marginLeft:Math.min(e.depth,8)*10},children:[(0,Q.jsx)(`summary`,{className:`cursor-pointer break-all`,children:e.command.split(/[\\/]/).at(-1)||`Process`}),(0,Q.jsx)(`div`,{className:`mt-2 break-all font-mono`,children:e.command}),(0,Q.jsxs)(`div`,{className:`mt-1 text-muted-foreground`,children:[e.childPids.length,` children · Started`,` `,new Date(e.startTimeMs).toLocaleString()]})]})}),(0,Q.jsxs)(`td`,{className:`font-mono`,children:[e.pid,` / `,e.ppid]}),(0,Q.jsx)(`td`,{children:X(e.cpuPercent)}),(0,Q.jsx)(`td`,{children:J(e.rssBytes)}),(0,Q.jsxs)(`td`,{children:[e.status,(0,Q.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:e.elapsed})]}),(0,Q.jsx)(`td`,{children:(0,Q.jsxs)(`div`,{className:`flex gap-1`,children:[(0,Q.jsx)(h,{size:`xs`,variant:`outline`,disabled:!f||a!==null,onClick:()=>void p(e,`SIGINT`),children:`Interrupt`}),(0,Q.jsx)(h,{size:`xs`,variant:`outline`,disabled:!f||a!==null,onClick:()=>void p(e,`SIGKILL`),children:`Force kill`})]})})]},`${e.pid}:${e.startTimeMs}`))})]})}),g?.processes.length===0?(0,Q.jsx)(`p`,{className:`px-4 py-4 text-sm text-muted-foreground`,children:`No live descendant processes.`}):null]})}function ye(e){let t=(0,q.c)(11),{value:n}=e,{copyToClipboard:r,isCopied:i}=_(),a;t[0]===n?a=t[1]:(a=(0,Q.jsx)(`code`,{className:`break-all text-[11px]`,children:n}),t[0]=n,t[1]=a);let o;t[2]!==r||t[3]!==n?(o=()=>r(n,void 0),t[2]=r,t[3]=n,t[4]=o):o=t[4];let s=i?`Copied`:`Copy`,c;t[5]!==o||t[6]!==s?(c=(0,Q.jsx)(h,{size:`xs`,variant:`ghost`,"aria-label":`Copy trace ID`,onClick:o,children:s}),t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==a||t[9]!==c?(l=(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[a,c]}),t[8]=a,t[9]=c,t[10]=l):l=t[10],l}function be(e){let t=(0,q.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=n.length>180?(0,Q.jsxs)(`details`,{children:[(0,Q.jsxs)(`summary`,{className:`cursor-pointer break-words`,children:[n.slice(0,180),`…`]}),(0,Q.jsx)(`pre`,{className:`mt-2 max-h-64 overflow-auto whitespace-pre-wrap break-words font-sans`,children:n})]}):(0,Q.jsx)(`span`,{className:`break-words`,children:n}),t[0]=n,t[1]=r),r}function xe(e){let t=(0,q.c)(10),{headers:n,children:r,empty:i}=e;if(i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(`p`,{className:`px-4 py-4 text-sm text-muted-foreground`,children:`No retained records.`}),t[0]=e):e=t[0],e}let a;t[1]===n?a=t[2]:(a=n.map(Se),t[1]=n,t[2]=a);let o;t[3]===a?o=t[4]:(o=(0,Q.jsx)(`thead`,{className:`border-b text-muted-foreground`,children:(0,Q.jsx)(`tr`,{children:a})}),t[3]=a,t[4]=o);let s;t[5]===r?s=t[6]:(s=(0,Q.jsx)(`tbody`,{className:`divide-y divide-border/60`,children:r}),t[5]=r,t[6]=s);let c;return t[7]!==o||t[8]!==s?(c=(0,Q.jsx)(`div`,{className:`overflow-x-auto`,children:(0,Q.jsxs)(`table`,{className:`w-full min-w-[680px] text-left text-xs [&_td]:px-4 [&_td]:py-3 [&_td]:align-top`,children:[o,s]})}),t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function Se(e){return(0,Q.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:e},e)}function Ce(e){let t=(0,q.c)(84),{snapshot:n,nowMs:r}=e,i=n?.tracing.summary,a;t[0]===n?.tracing.topSpanNames?a=t[1]:(a=n?.tracing.topSpanNames??[],t[0]=n?.tracing.topSpanNames,t[1]=a);let o=a,s;t[2]===n?.failures.common?s=t[3]:(s=n?.failures.common??[],t[2]=n?.failures.common,t[3]=s);let c=s,l;t[4]===i?.latestWarningAndErrorLogs?l=t[5]:(l=i?.latestWarningAndErrorLogs??[],t[4]=i?.latestWarningAndErrorLogs,t[5]=l);let u=l,d=n?.tracing.retainedSpanCount,f;t[6]===d?f=t[7]:(f=[`Retained spans`,d],t[6]=d,t[7]=f);let p=i?.failureCount,m;t[8]===p?m=t[9]:(m=[`Failures`,p],t[8]=p,t[9]=m);let h=i?.interruptionCount,g;t[10]===h?g=t[11]:(g=[`Interrupted spans`,h],t[10]=h,t[11]=g);let _=i?.slowSpanCount,v;t[12]===_?v=t[13]:(v=[`Slow spans`,_],t[12]=_,t[13]=v);let y=i?.parseErrorCount,b;t[14]===y?b=t[15]:(b=[`Parse errors`,y],t[14]=y,t[15]=b);let x;t[16]===i?x=t[17]:(x=i?Y(i.slowSpanThresholdMs):void 0,t[16]=i,t[17]=x);let S;t[18]===x?S=t[19]:(S=[`Slow threshold`,x],t[18]=x,t[19]=S);let C;t[20]!==r||t[21]!==i?(C=i?.firstSpanAt?Z(i.firstSpanAt,r):void 0,t[20]=r,t[21]=i,t[22]=C):C=t[22];let w;t[23]===C?w=t[24]:(w=[`First span`,C],t[23]=C,t[24]=w);let T;t[25]!==r||t[26]!==i?(T=i?.lastSpanAt?Z(i.lastSpanAt,r):void 0,t[25]=r,t[26]=i,t[27]=T):T=t[27];let E;t[28]===T?E=t[29]:(E=[`Last span`,T],t[28]=T,t[29]=E);let D;t[30]!==v||t[31]!==b||t[32]!==S||t[33]!==w||t[34]!==E||t[35]!==f||t[36]!==m||t[37]!==g?(D=(0,Q.jsx)(`dl`,{className:`grid grid-cols-2 gap-4 px-4 py-4 text-xs lg:grid-cols-4`,children:[f,m,g,v,b,S,w,E].map(De)}),t[30]=v,t[31]=b,t[32]=S,t[33]=w,t[34]=E,t[35]=f,t[36]=m,t[37]=g,t[38]=D):D=t[38];let O;t[39]===i?.partialFailure?O=t[40]:(O=i?.partialFailure?(0,Q.jsx)(`p`,{className:`px-4 pb-3 text-xs text-warning`,children:`Some trace files could not be read. These results are incomplete.`}):null,t[39]=i?.partialFailure,t[40]=O);let k;t[41]===i?k=t[42]:(k=i?(0,Q.jsxs)(`details`,{className:`border-t px-4 py-3 text-xs`,children:[(0,Q.jsx)(`summary`,{className:`cursor-pointer`,children:`Collection details`}),(0,Q.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,Q.jsxs)(`p`,{children:[`Log levels:`,` `,Object.entries(i.logLevelCounts).map(Ee).join(` · `)||`None`]}),i.scannedFilePaths.map(Te)]})]}):null,t[41]=i,t[42]=k);let A;t[43]!==D||t[44]!==O||t[45]!==k?(A=(0,Q.jsxs)(H,{title:`Trace diagnostics`,children:[D,O,k]}),t[43]=D,t[44]=O,t[45]=k,t[46]=A):A=t[46];let j;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(j=[`Source / category`,`Count`,`Cause`,`Last seen`],t[47]=j):j=t[47];let M=c.length===0,N;if(t[48]!==c||t[49]!==r){let e;t[51]===r?e=t[52]:(e=e=>(0,Q.jsxs)(`tr`,{children:[(0,Q.jsxs)(`td`,{children:[e.source,(0,Q.jsx)(`div`,{className:`text-muted-foreground`,children:e.category})]}),(0,Q.jsx)(`td`,{className:`font-mono`,children:e.count}),(0,Q.jsx)(`td`,{className:`max-w-96`,children:(0,Q.jsx)(be,{children:e.sampleMessage})}),(0,Q.jsx)(`td`,{className:`whitespace-nowrap`,children:Z(e.latestAt,r)})]},`${e.source}:${e.signature}`),t[51]=r,t[52]=e),N=c.map(e),t[48]=c,t[49]=r,t[50]=N}else N=t[50];let P;t[53]!==M||t[54]!==N?(P=(0,Q.jsx)(H,{title:`Most common failures`,children:(0,Q.jsx)(xe,{headers:j,empty:M,children:N})}),t[53]=M,t[54]=N,t[55]=P):P=t[55];let F;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(F=[`Time`,`Level`,`Span`,`Message`,`Trace`],t[56]=F):F=t[56];let ee=u.length===0,I;if(t[57]!==u||t[58]!==r){let e;t[60]===r?e=t[61]:(e=e=>(0,Q.jsxs)(`tr`,{children:[(0,Q.jsx)(`td`,{className:`whitespace-nowrap`,children:Z(e.seenAt,r)}),(0,Q.jsx)(`td`,{children:e.level}),(0,Q.jsx)(`td`,{children:e.spanName}),(0,Q.jsx)(`td`,{className:`max-w-96`,children:(0,Q.jsx)(be,{children:e.message})}),(0,Q.jsx)(`td`,{children:(0,Q.jsx)(ye,{value:e.traceId})})]},`${e.traceId}:${e.spanId}:${e.seenAt}:${e.level}:${e.message}`),t[60]=r,t[61]=e),I=u.map(e),t[57]=u,t[58]=r,t[59]=I}else I=t[59];let L;t[62]!==ee||t[63]!==I?(L=(0,Q.jsx)(H,{title:`Span warning and error logs`,children:(0,Q.jsx)(xe,{headers:F,empty:ee,children:I})}),t[62]=ee,t[63]=I,t[64]=L):L=t[64];let te;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(te=[`Span`,`Count`,`Failures`,`Average`,`Maximum`,`Total`],t[65]=te):te=t[65];let ne=o.length===0,R;t[66]===o?R=t[67]:(R=o.map(we),t[66]=o,t[67]=R);let z;t[68]!==ne||t[69]!==R?(z=(0,Q.jsx)(H,{title:`Top span names`,children:(0,Q.jsx)(xe,{headers:te,empty:ne,children:R})}),t[68]=ne,t[69]=R,t[70]=z):z=t[70];let B;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(B=[`Span`,`Status`,`Duration`,`Ended`,`Trace`],t[71]=B):B=t[71];let re=!n?.tracing.recentSpans.length,V;t[72]!==r||t[73]!==n?.tracing.recentSpans?(V=n?.tracing.recentSpans.map(e=>(0,Q.jsxs)(`tr`,{children:[(0,Q.jsxs)(`td`,{children:[e.name,e.failureMessage?(0,Q.jsx)(`div`,{className:`mt-1 text-destructive`,children:(0,Q.jsx)(be,{children:e.failureMessage})}):null]}),(0,Q.jsx)(`td`,{children:e.status}),(0,Q.jsx)(`td`,{children:Y(e.durationMs)}),(0,Q.jsx)(`td`,{className:`whitespace-nowrap`,children:Z(e.endTime,r)}),(0,Q.jsx)(`td`,{children:(0,Q.jsx)(ye,{value:e.traceId})})]},e.id)),t[72]=r,t[73]=n?.tracing.recentSpans,t[74]=V):V=t[74];let U;t[75]!==re||t[76]!==V?(U=(0,Q.jsx)(H,{title:`Recent spans`,children:(0,Q.jsx)(xe,{headers:B,empty:re,children:V})}),t[75]=re,t[76]=V,t[77]=U):U=t[77];let W;return t[78]!==A||t[79]!==P||t[80]!==L||t[81]!==z||t[82]!==U?(W=(0,Q.jsxs)(Q.Fragment,{children:[A,P,L,z,U]}),t[78]=A,t[79]=P,t[80]=L,t[81]=z,t[82]=U,t[83]=W):W=t[83],W}function we(e){return(0,Q.jsxs)(`tr`,{children:[(0,Q.jsx)(`td`,{children:e.name}),(0,Q.jsx)(`td`,{children:e.count}),(0,Q.jsx)(`td`,{children:e.failureCount}),(0,Q.jsx)(`td`,{children:Y(e.averageDurationMs)}),(0,Q.jsx)(`td`,{children:Y(e.maxDurationMs)}),(0,Q.jsx)(`td`,{children:Y(e.totalDurationMs)})]},e.name)}function Te(e){return(0,Q.jsx)(`p`,{className:`break-all font-mono`,children:e},e)}function Ee(e){let[t,n]=e;return`${t}: ${n}`}function De(e){let[t,n]=e;return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`dt`,{className:`text-muted-foreground`,children:t}),(0,Q.jsx)(`dd`,{className:`mt-1 font-mono`,children:n??`Unavailable`})]},t)}var Oe=/token|secret|password|passwd|credential|authorization|bearer|api[-_]?key|cookie|session|private[-_]?key|pairing[-_]?code|access[-_]?key|signature|email|proof|ticket/iu;function ke(e){return e.replace(/-----BEGIN [^-]*PRIVATE KEY-----[\s\S]*?(?:-----END [^-]*PRIVATE KEY-----|$)/gu,`[redacted]`).replace(/\bBearer\s+[^\s,;"']+/giu,`Bearer [redacted]`).replace(/\b(?:sk-[A-Za-z0-9_-]{8,}|gh[pousr]_[A-Za-z0-9_]{8,}|github_pat_[A-Za-z0-9_]+)\b/gu,`[redacted]`).replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/gu,`[redacted]`).replace(/\b((?:access[-_]?token|refresh[-_]?token|token|secret|password|passwd|credential|authorization|api[-_]?key|cookie|pairing[-_]?code|proof|ticket)\s*[=:]\s*)(?:"[^"]*"|'[^']*'|[^\s,;&]+)/giu,`$1[redacted]`).replace(/https?:\/\/[^\s<>"']+/giu,e=>{try{let t=new URL(e);t.username=``,t.password=``,t.hash=``;for(let e of t.searchParams.keys())/token|secret|password|credential|authorization|key|cookie|proof|ticket|signature|code/iu.test(e)&&t.searchParams.set(e,`[redacted]`);return t.toString()}catch{return`[redacted URL]`}})}var Ae=`[redacted]`,je=Oe;function Me(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())je.test(e)&&t.searchParams.set(e,Ae);return t.toString()}function Ne(e){return Pe(e,!1)}function Pe(e,t){if(t)return e==null?e:Ae;if(typeof e==`string`)return ke(Me(e));if(Array.isArray(e))return e.map(e=>Pe(e,!1));if(typeof e==`object`&&e){let t={};for(let[n,r]of Object.entries(e))t[n]=Pe(r,je.test(n));return t}return e}function Fe(e){return Ne({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 Ie(e){return JSON.stringify(e,null,2)}function Le(e){return(e?.gapCount??0)>0}var Re={connected:`bg-success`,connecting:`bg-warning`,error:`bg-destructive`,disconnected:`bg-muted-foreground/40`},ze={ready:`bg-success`,warning:`bg-warning`,error:`bg-destructive`,disabled:`bg-muted-foreground/40`};function Be(e){let t=(0,q.c)(4),{className:n}=e,r;t[0]===n?r=t[1]:(r=v(`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,Q.jsx)(`span`,{className:r,"aria-hidden":!0}),t[2]=r,t[3]=i),i}function Ve(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 He(e){let t=(0,q.c)(25),{environmentId:n,record:r,runtime:i,pushSequence:a}=e,o=i?.connectionState??`disconnected`,s=r?.label??n,c=Le(a),l=Re[o]??`bg-muted-foreground/40`,u;t[0]===l?u=t[1]:(u=(0,Q.jsx)(Be,{className:l}),t[0]=l,t[1]=u);let d;t[2]!==s||t[3]!==u?(d=(0,Q.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}`:``,p=i?.role?` · ${i.role}`:``,m;t[5]!==o||t[6]!==f||t[7]!==p?(m=(0,Q.jsxs)(`span`,{className:`block`,children:[`WS `,o,f,p]}),t[5]=o,t[6]=f,t[7]=p,t[8]=m):m=t[8];let h=c?`text-warning`:`text-muted-foreground/70`,g;t[9]===h?g=t[10]:(g=v(`block`,h),t[9]=h,t[10]=g);let _;t[11]===a?_=t[12]:(_=Ve(a),t[11]=a,t[12]=_);let y;t[13]!==g||t[14]!==_?(y=(0,Q.jsx)(`span`,{className:g,children:_}),t[13]=g,t[14]=_,t[15]=y):y=t[15];let b;t[16]===i?b=t[17]:(b=i?.lastError?(0,Q.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]!==m?(x=(0,Q.jsxs)(`span`,{className:`space-y-0.5`,children:[m,y,b]}),t[18]=y,t[19]=b,t[20]=m,t[21]=x):x=t[21];let S;return t[22]!==x||t[23]!==d?(S=(0,Q.jsx)(W,{title:d,description:x}),t[22]=x,t[23]=d,t[24]=S):S=t[24],S}function Ue(e){let n=(0,q.c)(59),{snapshot:r}=e,i=T(Xe),c=S(Ye),d=s(Je),p=m(),g=l(),v=o(),y=a(),C;n[0]!==g||n[1]!==p?(C=p?p.serverConfig?.providers??[]:g,n[0]=g,n[1]=p,n[2]=C):C=n[2];let E=C,D=r?.observability??(p?p.serverConfig?.observability??null:v),O;n[3]!==y||n[4]!==p?(O=p?p.serverConfig?.availableEditors??[]:y,n[3]=y,n[4]=p,n[5]=O):O=n[5];let k=O,A=r?.performance?.local??null,[j,M]=(0,K.useState)(!1),N;n[6]!==A||n[7]!==D?(N=D?{...D,...A?{localMetrics:A}:{}}:null,n[6]=A,n[7]=D,n[8]=N):N=n[8];let P=N,F;n[9]!==d||n[10]!==i||n[11]!==c?(F=[...new Set([...Object.keys(i),...Object.keys(c),...Object.keys(d)])].toSorted(),n[9]=d,n[10]=i,n[11]=c,n[12]=F):F=n[12];let I=F,L;n[13]===Symbol.for(`react.memo_cache_sentinel`)?(L={onCopy:qe,onError:Ke},n[13]=L):L=n[13];let{copyToClipboard:te,isCopied:z}=_(L),B;n[14]!==te||n[15]!==I||n[16]!==P||n[17]!==E||n[18]!==d||n[19]!==i||n[20]!==c||n[21]!==r?.performance?(B=()=>{let e=Fe({generatedAt:new Date().toISOString(),app:{version:x,stage:f,isElectron:t,userAgent:typeof navigator>`u`?null:navigator.userAgent},environments:I.map(e=>({environmentId:e,record:i[e]??null,runtime:c[e]??null,pushSequence:d[e]??null})),providers:E,observability:P,performance:r?.performance??null});te(Ie(e),void 0)},n[14]=te,n[15]=I,n[16]=P,n[17]=E,n[18]=d,n[19]=i,n[20]=c,n[21]=r?.performance,n[22]=B):B=n[22],r?.performance;let re=B,V=D?.logsDirectoryPath??null,U;n[23]!==k||n[24]!==V||n[25]!==p?(U=()=>{if(!V)return;M(!0);let e=ne(k??[]);if(!e){M(!1),u.add(R({type:`error`,title:`Could not open logs folder`,description:`No available editors found.`}));return}(p?w(p.environmentId)?.client.shell.openInEditor({cwd:V,editor:e})??Promise.reject(Error(`Selected environment is disconnected.`)):b().shell.openInEditor(V,e)).catch(Ge).finally(()=>{M(!1)})},n[23]=k,n[24]=V,n[25]=p,n[26]=U):U=n[26];let G=U,ae;n[27]===z?ae=n[28]:(ae=z?(0,Q.jsx)(ie,{className:`size-3.5`}):(0,Q.jsx)(ee,{className:`size-3.5`}),n[27]=z,n[28]=ae);let oe=z?`Copied`:`Copy debug bundle`,se;n[29]!==re||n[30]!==ae||n[31]!==oe?(se=(0,Q.jsxs)(h,{size:`xs`,variant:`outline`,onClick:re,children:[ae,oe]}),n[29]=re,n[30]=ae,n[31]=oe,n[32]=se):se=n[32];let ce;n[33]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,Q.jsx)(W,{title:`Application`,description:`Version ${x} · ${f}${t?` · Desktop`:` · Browser`}`}),n[33]=ce):ce=n[33];let le=V??`Resolving logs directory…`,ue=!V||j,J=j?`Opening…`:`Open logs folder`,Y;n[34]!==G||n[35]!==ue||n[36]!==J?(Y=(0,Q.jsx)(h,{size:`xs`,variant:`outline`,disabled:ue,onClick:G,children:J}),n[34]=G,n[35]=ue,n[36]=J,n[37]=Y):Y=n[37];let X;n[38]!==le||n[39]!==Y?(X=(0,Q.jsx)(W,{title:`Logs`,description:le,control:Y}),n[38]=le,n[39]=Y,n[40]=X):X=n[40];let Z;n[41]!==se||n[42]!==X?(Z=(0,Q.jsxs)(H,{title:`Diagnostics`,headerAction:se,children:[ce,X]}),n[41]=se,n[42]=X,n[43]=Z):Z=n[43];let de;n[44]!==I||n[45]!==d||n[46]!==i||n[47]!==c?(de=I.length===0?(0,Q.jsx)(W,{title:`No environments`,description:`No environment connections are tracked yet.`}):I.map(e=>(0,Q.jsx)(He,{environmentId:e,record:i[e]??null,runtime:c[e]??null,pushSequence:d[e]??null},e)),n[44]=I,n[45]=d,n[46]=i,n[47]=c,n[48]=de):de=n[48];let fe;n[49]===de?fe=n[50]:(fe=(0,Q.jsx)(H,{title:`Environments`,children:de}),n[49]=de,n[50]=fe);let pe;n[51]===E?pe=n[52]:(pe=E.length===0?(0,Q.jsx)(W,{title:`No providers`,description:`No provider instances are configured.`}):E.map(We),n[51]=E,n[52]=pe);let me;n[53]===pe?me=n[54]:(me=(0,Q.jsx)(H,{title:`Providers`,children:pe}),n[53]=pe,n[54]=me);let he;return n[55]!==Z||n[56]!==fe||n[57]!==me?(he=(0,Q.jsxs)(Q.Fragment,{children:[Z,fe,me]}),n[55]=Z,n[56]=fe,n[57]=me,n[58]=he):he=n[58],he}function We(e){let t=e.unavailableReason??e.message??null;return(0,Q.jsx)(W,{title:(0,Q.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,Q.jsx)(Be,{className:ze[e.status]??`bg-muted-foreground/40`}),e.displayName??e.instanceId]}),description:(0,Q.jsxs)(`span`,{className:`space-y-0.5`,children:[(0,Q.jsxs)(`span`,{className:`block`,children:[e.status,` · auth `,e.auth.status,e.version?` · v${e.version}`:``]}),t?(0,Q.jsx)(`span`,{className:`block break-all text-muted-foreground/70`,children:t}):null]})},e.instanceId)}function Ge(e){u.add(R({type:`error`,title:`Could not open logs folder`,description:e instanceof Error?e.message:`Failed to open logs folder.`}))}function Ke(e){u.add(R({type:`error`,title:`Could not copy debug bundle`,description:e.message}))}function qe(){u.add({type:`success`,title:`Debug bundle copied`,description:`Secrets are redacted before export.`})}function Je(e){return e.byEnvironment}function Ye(e){return e.byId}function Xe(e){return e.byId}var Ze=[{method:`thread/snapshot`,requestId:`req_9f2c81d4a6`,startedAt:`12s ago`},{method:`git/status`,requestId:`req_c07b3e51fd`,startedAt:`9s ago`}];function Qe(e){u.update(e,{type:`loading`,title:`Updating Claude Code`,description:`Running provider update command.`,timeout:0,actionProps:void 0,data:{hideCopyButton:!0}}),window.setTimeout(()=>{u.update(e,{type:`success`,title:`Provider updated`,description:`New sessions will use the updated provider.`,timeout:0,data:{hideCopyButton:!0,dismissAfterVisibleMs:3e3}})},1800)}var $e=[{value:`provider-update`,label:`Provider update available`,fire:()=>{let e=u.add(R({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:()=>Qe(e)},actionVariant:`default`,data:{hideCopyButton:!0,secondaryActionProps:{children:`Settings`,onClick:()=>c.getState().openSettings(`providers`)},secondaryActionVariant:`outline`}}))}},{value:`pr-checks-passed`,label:`PR checks passed`,fire:()=>{u.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:()=>{u.add(R({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:()=>{u.add(R({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:()=>{u.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:()=>{u.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,Q.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:Ze.map(e=>(0,Q.jsxs)(`li`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,Q.jsx)(`span`,{className:`shrink-0 rounded-sm bg-muted px-1 py-0.5 font-mono text-[10px]`,children:e.method}),(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-[11px] text-muted-foreground`,children:e.requestId}),(0,Q.jsx)(`span`,{className:`ml-auto shrink-0 text-[11px] text-muted-foreground`,children:e.startedAt})]},e.requestId))})}})}},{value:`reconnected`,label:`Connection restored`,fire:()=>{u.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:()=>{u.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})}}],et=[`pr-checks-passed`,`provider-update`,`git-failed`];function tt(){et.forEach((e,t)=>{let n=$e.find(t=>t.value===e);n&&window.setTimeout(()=>n.fire(),t*350)})}function nt(){let e=(0,q.c)(17),[t,n]=(0,K.useState)($e[0]?.value??``),r;e[0]===t?r=e[1]:(r=$e.find(e=>e.value===t)??$e[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,Q.jsx)(N,{className:`w-full sm:w-56`,"aria-label":`Notification sample`,children:(0,Q.jsx)(A,{children:o})}),e[3]=o,e[4]=s);let c;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(M,{align:`end`,alignItemWithTrigger:!1,children:$e.map(rt)}),e[5]=c):c=e[5];let l;e[6]!==t||e[7]!==s?(l=(0,Q.jsxs)(j,{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,Q.jsx)(h,{"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,Q.jsx)(W,{title:`Test notification`,description:`Preview the notification design with realistic samples. Nothing is sent or changed.`,control:(0,Q.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,Q.jsx)(W,{title:`Notification stack`,description:`Fire a short burst to preview stacking, peeking, and hover expansion.`,control:(0,Q.jsx)(h,{size:`xs`,variant:`outline`,onClick:tt,children:`Show stack`})}),e[14]=f):f=e[14];let p;return e[15]===d?p=e[16]:(p=(0,Q.jsxs)(H,{title:`Notifications`,children:[d,f]}),e[15]=d,e[16]=p),p}function rt(e){return(0,Q.jsx)(k,{hideIndicator:!0,value:e.value,children:e.label},e.value)}var it=5e3;function at(e){let t=(0,q.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(ot),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,Q.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,Q.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,Q.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,Q.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,Q.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,Q.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,Q.jsxs)(`div`,{className:u,children:[f,h]}),t[29]=h,t[30]=u,t[31]=f,t[32]=g):g=t[32],g}function ot(e){return e.value}function st(e){let t=(0,q.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(ct),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,Q.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,Q.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_5rem] items-center gap-3 px-4 py-2.5`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`div`,{className:`mb-1 truncate text-[12px] font-medium`,children:e.label}),(0,Q.jsx)(`div`,{className:`h-1.5 overflow-hidden rounded-full bg-muted`,children:(0,Q.jsx)(`div`,{className:`h-full rounded-full bg-info`,style:{width:`${Math.max(4,e.value/o*100)}%`}})})]}),(0,Q.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,Q.jsx)(`div`,{className:`divide-y divide-border/60`,children:s}),t[10]=s,t[11]=c),c}function ct(e){return e.value}function $(e){let t=(0,q.c)(10),{label:n,value:r,detail:i}=e,a;t[0]===n?a=t[1]:(a=(0,Q.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,Q.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,Q.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,Q.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 lt(e){let t=(0,q.c)(12),{label:n,value:r,detail:i}=e,a;t[0]===n?a=t[1]:(a=(0,Q.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,Q.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,Q.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,Q.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,Q.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 ut(e){let t=(0,q.c)(5),{value:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Q.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,Q.jsxs)(`details`,{className:`group`,children:[r,(0,Q.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 dt(e){let t=(0,q.c)(8),{spans:n,showTraceId:r}=e,i=r!==void 0&&r;if(n.length===0){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.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 a;if(t[1]!==i||t[2]!==n){let e;t[4]===i?e=t[5]:(e=e=>(0,Q.jsxs)(`div`,{className:`grid gap-2 px-4 py-3 sm:grid-cols-[minmax(0,1fr)_6rem_5rem] sm:items-start`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`truncate text-[13px] font-medium`,children:e.name}),(0,Q.jsx)(P,{size:`sm`,variant:ue(e.status)?`error`:`outline`,children:e.status})]}),(0,Q.jsxs)(`div`,{className:`mt-1 truncate font-mono text-[11px] text-muted-foreground`,children:[e.source,` / `,e.kind,` / `,e.spanId]}),i?(0,Q.jsx)(ye,{value:e.traceId}):null,e.failureMessage&&ue(e.status)?(0,Q.jsx)(`div`,{className:`mt-1 line-clamp-2 text-[11px] text-destructive`,children:e.failureMessage}):null,(0,Q.jsx)(`div`,{className:`mt-2`,children:(0,Q.jsx)(ut,{value:e})})]}),(0,Q.jsx)(`div`,{className:`font-mono text-[11px] text-muted-foreground sm:text-right`,children:Y(e.durationMs)}),(0,Q.jsx)(`div`,{className:`font-mono text-[11px] text-muted-foreground sm:text-right`,children:Z(e.endTime)})]},e.id),t[4]=i,t[5]=e),a=n.slice(0,10).map(e),t[1]=i,t[2]=n,t[3]=a}else a=t[3];let o;return t[6]===a?o=t[7]:(o=(0,Q.jsx)(`div`,{className:`divide-y divide-border/60`,children:a}),t[6]=a,t[7]=o),o}function ft(e){let t=(0,q.c)(9),{memorySeries:n,cpuSeries:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.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,Q.jsxs)(`div`,{className:`min-w-0 p-4`,children:[i,(0,Q.jsx)(at,{points:n,formatValue:J})]}),t[1]=n,t[2]=a);let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.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,Q.jsxs)(`div`,{className:`min-w-0 p-4`,children:[o,(0,Q.jsx)(at,{points:r,formatValue:pt})]}),t[4]=r,t[5]=s);let c;return t[6]!==a||t[7]!==s?(c=(0,Q.jsx)(H,{title:`Resource history`,children:(0,Q.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 pt(e){return`${e.toFixed(1)}%`}function mt(e){let t=(0,q.c)(26),{snapshot:n,showTraceId:r}=e,i=r!==void 0&&r,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(`div`,{className:`border-border/60 border-b px-4 py-2 text-[12px] font-semibold`,children:`Top span names`}),t[0]=a):a=t[0];let o;t[1]===n?.tracing.topSpanNames?o=t[2]:(o=n?.tracing.topSpanNames??[],t[1]=n?.tracing.topSpanNames,t[2]=o);let s;t[3]===o?s=t[4]:(s=me(o),t[3]=o,t[4]=s);let c;t[5]===s?c=t[6]:(c=(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[a,(0,Q.jsx)(st,{points:s})]}),t[5]=s,t[6]=c);let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Q.jsx)(`div`,{className:`border-border/60 border-b px-4 py-2 text-[12px] font-semibold`,children:`Duration buckets`}),t[7]=l):l=t[7];let u;t[8]===n?.tracing.durationBuckets?u=t[9]:(u=n?.tracing.durationBuckets??[],t[8]=n?.tracing.durationBuckets,t[9]=u);let d;t[10]===u?d=t[11]:(d=pe(u),t[10]=u,t[11]=d);let f;t[12]===d?f=t[13]:(f=(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[l,(0,Q.jsx)(st,{points:d})]}),t[12]=d,t[13]=f);let p;t[14]!==c||t[15]!==f?(p=(0,Q.jsxs)(`div`,{className:`grid gap-0 divide-y divide-border/60 lg:grid-cols-2 lg:divide-x lg:divide-y-0`,children:[c,f]}),t[14]=c,t[15]=f,t[16]=p):p=t[16];let m;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Q.jsx)(`div`,{className:`border-border/60 border-b px-4 py-2 text-[12px] font-semibold`,children:`Slowest spans`}),t[17]=m):m=t[17];let h;t[18]===n?.tracing.slowestSpans?h=t[19]:(h=n?.tracing.slowestSpans??[],t[18]=n?.tracing.slowestSpans,t[19]=h);let g;t[20]!==i||t[21]!==h?(g=(0,Q.jsxs)(`div`,{className:`border-border/60 border-t`,children:[m,(0,Q.jsx)(dt,{spans:h,showTraceId:i})]}),t[20]=i,t[21]=h,t[22]=g):g=t[22];let _;return t[23]!==p||t[24]!==g?(_=(0,Q.jsxs)(H,{title:`Tracing diagnostics`,children:[p,g]}),t[23]=p,t[24]=g,t[25]=_):_=t[25],_}function ht(e){let t=(0,q.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,Q.jsxs)(`div`,{className:`grid gap-2 px-4 py-3 sm:grid-cols-[minmax(0,1fr)_6rem]`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Q.jsx)(P,{size:`sm`,variant:`error`,children:e.category}),(0,Q.jsx)(`span`,{className:`truncate text-[13px] font-medium`,children:e.message})]}),(0,Q.jsxs)(`div`,{className:`mt-1 truncate font-mono text-[11px] text-muted-foreground`,children:[e.source,` / `,e.signature]}),(0,Q.jsx)(`div`,{className:`mt-2`,children:(0,Q.jsx)(ut,{value:e.raw??e})})]}),(0,Q.jsx)(`div`,{className:`font-mono text-[11px] text-muted-foreground sm:text-right`,children:Z(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,Q.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,Q.jsx)(H,{title:`Failures`,children:(0,Q.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 gt(e){let t=(0,q.c)(27),{snapshot:n,slowRpcAcks:r,nowMs:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.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(vt),t[3]=o,t[4]=s);let c;t[5]===s?c=t[6]:(c=(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[a,(0,Q.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,Q.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(_t),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,Q.jsxs)(`div`,{className:`px-4 py-2.5`,children:[(0,Q.jsx)(`div`,{className:`truncate text-[13px] font-medium`,children:e.tag}),(0,Q.jsxs)(`div`,{className:`mt-1 font-mono text-[11px] text-muted-foreground`,children:[`slow ack / `,Z(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,Q.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,Q.jsxs)(`div`,{className:`min-w-0`,children:[l,(0,Q.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,Q.jsx)(H,{title:`Live activity`,children:(0,Q.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 _t(e){return(0,Q.jsxs)(`div`,{className:`px-4 py-2.5`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,Q.jsx)(`span`,{className:`truncate text-[13px] font-medium`,children:e.terminalId}),(0,Q.jsx)(P,{size:`sm`,variant:e.status===`error`?`error`:`outline`,children:e.status})]}),(0,Q.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 vt(e){return(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3 px-4 py-2.5`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`div`,{className:`truncate text-[13px] font-medium`,children:e.displayName??e.instanceId}),(0,Q.jsx)(`div`,{className:`truncate font-mono text-[11px] text-muted-foreground`,children:e.driver})]}),(0,Q.jsx)(P,{size:`sm`,variant:e.status===`error`?`error`:e.status===`warning`?`warning`:`outline`,children:e.status})]},e.instanceId)}function yt(e){let t=(0,q.c)(57),{snapshot:n,memorySeries:r,cpuSeries:i,slowRpcAcks:a,latestFailure:o,nowMs:s}=e,c;t[0]===n?c=t[1]:(c=n?Y(n.uptimeMs):`n/a`,t[0]=n,t[1]=c);let l;t[2]!==s||t[3]!==n?(l=n?`Started ${Z(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,Q.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?J(n.resources.current.memory.rssBytes):`n/a`,t[8]=n,t[9]=d);let f;t[10]===n?f=t[11]:(f=n?`${J(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,Q.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?X(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:`${Y(n.resources.current.eventLoopDelayMs)} event loop delay`,t[17]=n,t[18]=h);let g;t[19]!==m||t[20]!==h?(g=(0,Q.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(bt).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,Q.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,Q.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,Q.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,Q.jsx)(H,{title:`Overview`,children:(0,Q.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,Q.jsx)(ft,{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,Q.jsx)(mt,{snapshot:n}),t[42]=n,t[43]=D);let O;t[44]!==s||t[45]!==n?(O=(0,Q.jsx)(ht,{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,Q.jsx)(gt,{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,Q.jsxs)(Q.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 bt(e){return e.enabled}function xt(e){let t=(0,q.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,Q.jsx)(C,{}),t[0]=a):a=t[0];let o=r?`Diagnostics refresh failed`:`Diagnostics warnings`,s;t[1]===o?s=t[2]:(s=(0,Q.jsx)(B,{children:o}),t[1]=o,t[2]=s);let c;t[3]===r?c=t[4]:(c=r?(0,Q.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(St),t[5]=n?.warnings,t[6]=l);let u;t[7]!==c||t[8]!==l?(u=(0,Q.jsxs)(re,{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,Q.jsxs)(V,{variant:i,children:[a,s,u]}),t[10]=i,t[11]=s,t[12]=u,t[13]=d):d=t[13],d}function St(e){return(0,Q.jsxs)(`span`,{children:[e.message,e.count?` (${e.count})`:``]},`${e.code}:${e.source??``}`)}function Ct(e){let t=(0,q.c)(4),{presentation:n}=e,r=n===void 0?`performance`:n,i=m();if(g()===`client`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsxs)(U,{children:[(0,Q.jsx)(nt,{}),null]}),t[0]=e):e=t[0],e}let a=i?.environmentId??`local`,o;return t[1]!==r||t[2]!==a?(o=(0,Q.jsx)(wt,{presentation:r},a),t[1]=r,t[2]=a,t[3]=o):o=t[3],o}function wt({presentation:e}){let t=m(),n=g(),[i,a]=(0,K.useState)(null),[o,s]=(0,K.useState)(null),[c,l]=(0,K.useState)(!0),[u,f]=(0,K.useState)(!1),p=(0,K.useRef)(null),_=(0,K.useRef)(u);_.current=u;let y=d(),x=S(e=>e.byId),C=Date.now(),w=oe(r.serverGetDiagnosticsSnapshot),T=t?.environmentId,D=t?.nodeLabel,O=(0,K.useCallback)(async(e=!1)=>{await p.current?.()},[]);(0,K.useEffect)(()=>{if(a(null),s(null),l(!0),!w.allowed){s(w.reason),l(!1);return}let e=ce({fetch:async()=>{let e=T?E(T)?.server:b().server;if(!e)throw Error(`Diagnostics are unavailable on ${D??`this environment`}.`);return e.getDiagnosticsSnapshot()},onSuccess:e=>{a(e),s(null)},onError:e=>s(e instanceof Error?e.message:`Unable to refresh diagnostics.`),onLoading:l});p.current=e.refresh;let t=()=>{!_.current&&document.visibilityState===`visible`&&e.refresh()};t();let n=window.setInterval(t,it);return document.addEventListener(`visibilitychange`,t),()=>{e.dispose(),p.current=null,window.clearInterval(n),document.removeEventListener(`visibilitychange`,t)}},[T,D,w.allowed,w.reason]),(0,K.useEffect)(()=>{!u&&document.visibilityState===`visible`&&O()},[u,O]);let k=(0,K.useMemo)(()=>de(i?.resources.history??[]),[i]),A=(0,K.useMemo)(()=>fe(i?.resources.history??[]),[i]),j=i?he(i):`No snapshot`,M=i?.liveProcesses.providers.filter(e=>e.enabled).length??0,N=i?.liveProcesses.terminals.filter(e=>e.status===`starting`||e.status===`running`).length??0,P=Object.values(x),F=P.filter(e=>e.connectionState===`connected`).length,ee=P.filter(e=>e.connectionState===`connecting`).length,ne=P.length===0?`No tracked clients`:`${F} connected${ee>0?` · ${ee} connecting`:``}`,R=i?.tracing.slowestSpans.find(e=>e.source===`server`)??null,z=y[0]??null,B=i?.performance??null,re=B?.local.turnQuiescenceAvgMs??null,V=B?.local.checkpointDurationP95Ms??null,W=B?.local.latestThreadSnapshotDurationMs??null,G=B?.local.threadSnapshotDurationP95Ms??null;return(0,Q.jsxs)(U,{children:[(0,Q.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`h1`,{className:`text-base font-semibold`,children:`Diagnostics`}),(0,Q.jsx)(`p`,{className:`mt-1 text-muted-foreground text-xs`,children:i?`Updated ${Z(i.generatedAt,C)}`:`Waiting for snapshot`})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsxs)(h,{size:`xs`,variant:`outline`,onClick:()=>f(e=>!e),children:[u?(0,Q.jsx)(L,{className:`size-3.5`}):(0,Q.jsx)(I,{className:`size-3.5`}),u?`Resume`:`Pause`]}),(0,Q.jsxs)(h,{size:`xs`,variant:`outline`,onClick:()=>void O(!0),disabled:c,children:[(0,Q.jsx)(te,{className:v(`size-3.5`,c&&`animate-spin`)}),`Refresh`]})]})]}),(0,Q.jsx)(xt,{snapshot:i,error:o}),null,e===`phone-legacy`?(0,Q.jsx)(yt,{snapshot:i,memorySeries:k,cpuSeries:A,slowRpcAcks:y,latestFailure:j,nowMs:C}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(_e,{telemetry:i?.telemetry,paused:u,refresh:O},`telemetry:${T??`local`}`),(0,Q.jsx)(ve,{snapshot:i,refresh:O},T??`local`),(0,Q.jsx)(Ce,{snapshot:i,nowMs:C}),(0,Q.jsx)(mt,{snapshot:i,showTraceId:!0}),(0,Q.jsx)(ht,{snapshot:i,nowMs:C}),(0,Q.jsx)(gt,{snapshot:i,slowRpcAcks:y,nowMs:C}),(0,Q.jsx)(H,{title:`Performance now`,children:(0,Q.jsxs)(`div`,{className:`grid sm:grid-cols-2 lg:grid-cols-3`,children:[(0,Q.jsx)($,{label:`Backend CPU`,value:i?X(i.resources.current.cpu.utilizationPercent):`n/a`,detail:i?`Process uptime ${Y(i.uptimeMs)}`:void 0}),(0,Q.jsx)($,{label:`RSS / heap`,value:i?J(i.resources.current.memory.rssBytes):`n/a`,detail:i?`${J(i.resources.current.memory.heapUsedBytes)} heap used`:void 0}),(0,Q.jsx)($,{label:`Event-loop delay`,value:i?.resources.current.eventLoopDelayMs===void 0?`n/a`:Y(i.resources.current.eventLoopDelayMs),detail:`Measured once for this requested snapshot`}),(0,Q.jsx)($,{label:`Providers / terminals`,value:`${M} enabled providers`,detail:`${N} active terminals`}),(0,Q.jsx)($,{label:`Turn quiescence`,value:re===null?`No samples`:Y(re),detail:`Rolling average`}),(0,Q.jsx)($,{label:`Checkpoint duration`,value:V===null?`No samples`:Y(V),detail:`Rolling p95`}),(0,Q.jsx)($,{label:`WebSocket state`,value:ne,detail:`${B?.local.wsReconnectCount??0} reconnects in this server process`}),(0,Q.jsx)($,{label:`Thread snapshot`,value:W===null?`No samples`:Y(W),detail:G===null?`Latest successful subscription snapshot`:`${Y(G)} rolling p95`}),(0,Q.jsx)($,{label:`Latest failure`,value:j})]})}),(0,Q.jsxs)(H,{title:`Why was this slow?`,children:[(0,Q.jsx)(lt,{label:`Thread snapshot`,value:W===null?`No thread snapshot timing yet`:`${Y(W)} latest`,detail:G===null?`Replay duration and payload bytes are not collected because the current transport has no zero-copy attribution hook.`:`${Y(G)} rolling p95. Replay duration and payload bytes are not collected because the current transport has no zero-copy attribution hook.`}),(0,Q.jsx)(lt,{label:`Queue pressure`,value:B?`${B.queues.runtimeDepthTotal+B.queues.liveBufferDepthTotal} queued now`:`No snapshot`,detail:B?`Largest runtime high-water ${B.queues.runtimeHighWaterMax}; live-buffer high-water ${B.queues.liveBufferHighWaterMax}; ${B.queues.liveBufferOverflowCount} overflows; replay depth ${B.queues.replayDepthMax}; replay lag ${B.queues.replayLagMax}; ${B.queues.providerLogDroppedRecords} provider log records dropped.`:`Runtime and replay queue evidence will appear after the first snapshot.`}),(0,Q.jsx)(lt,{label:`Slowest server stage`,value:R?`${R.name} · ${Y(R.durationMs)}`:`No retained spans`,detail:R?`Server span completed ${Z(R.endTime,C)}.`:`Tracing has not retained a server stage yet.`}),(0,Q.jsx)(lt,{label:`Current slow client RPC`,value:z?.tag??`No slow RPC acknowledgement in progress`,detail:z?`Exceeded its ${Y(z.thresholdMs)} acknowledgement threshold; started ${Z(z.startedAt,C)}.`:`Only RPCs that cross the existing client acknowledgement threshold appear here.`}),(0,Q.jsx)(lt,{label:`Reconnect / resume`,value:ne,detail:`${B?.local.wsReconnectCount??0} server-side reconnects. Per-environment push gaps and recovery state are in the Environments section.`}),(0,Q.jsx)(lt,{label:`Recent failure`,value:i?.failures.latest[0]?.message??`No retained failures`,detail:i?.failures.latest[0]?`${i.failures.latest[0].source} · ${Z(i.failures.latest[0].occurredAt,C)}`:`No failure evidence is available for the current server process.`}),(0,Q.jsx)(lt,{label:`Trace persistence`,value:B?.traceSink?`${J(B.traceSink.bufferedBytes)} buffered`:`Health unavailable`,detail:B?.traceSink?`${J(B.traceSink.maxBufferedBytes)} cap; ${B.traceSink.droppedRecords} dropped records; ${B.traceSink.writeFailures} write failures; retry delay ${Y(B.traceSink.retryDelayMs)}.`:`This diagnostics service is not attached to the local trace-file sink.`})]}),(0,Q.jsx)(ft,{memorySeries:k,cpuSeries:A}),(0,Q.jsx)(Ue,{snapshot:i}),n===`all`&&(0,Q.jsx)(nt,{}),null]})]})}export{Ct as DiagnosticsSettings};
@@ -1 +0,0 @@
1
- import{hs as e,os as t}from"./runtime-BwHA1GUS.js";import{b as n}from"./NullStore-8d2s-Re3.js";import{r}from"./DialogViewport-B6w_ROOE.js";var i=class extends n{constructor(){super(r(),`Dialog`,!1)}open(e){this.openByTrigger(e)}openWithPayload(n){let r=this.attachedStore;r!==null&&(r.set(`payload`,n),r.setOpen(!0,t(e)))}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}};function a(){return new i}export{a as n,i as t};
@@ -1 +0,0 @@
1
- import{kl as e}from"./runtime-BwHA1GUS.js";import{n as t}from"./DialogViewport-B6w_ROOE.js";var n=e(function(e){return t(`dialog`,e)});export{n as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Xs as t,js as n,os as r,us as i}from"./runtime-BwHA1GUS.js";import{t as a}from"./react-CwJFpaho.js";import{s as o}from"./DialogViewport-B6w_ROOE.js";import{t as s}from"./useBaseUiId-DKOjzmu3.js";var c=e(a(),1),l=c.forwardRef(function(e,a){let{render:s,className:c,style:l,disabled:u=!1,nativeButton:d=!0,...f}=e,p=o(),m=p.useState(`open`),{getButtonProps:h,buttonRef:g}=n({disabled:u,native:d}),_={disabled:u};function v(e){m&&p.setOpen(!1,r(i,e.nativeEvent))}return t(`button`,e,{state:_,ref:[a,g],props:[{onClick:v},f,h]})}),u=c.forwardRef(function(e,n){let{render:r,className:i,style:a,id:c,...l}=e,u=o(),d=s(c);return u.useSyncedValueWithCleanup(`descriptionElementId`,d),t(`p`,e,{ref:n,props:[{id:d},l]})}),d=c.forwardRef(function(e,n){let{render:r,className:i,style:a,id:c,...l}=e,u=o(),d=s(c);return u.useSyncedValueWithCleanup(`titleElementId`,d),t(`h2`,e,{ref:n,props:[{id:d},l]})});export{u as n,l as r,d as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Al as t,Nl as n,Rc as r,Us as i,Xs as a,js as o}from"./runtime-BwHA1GUS.js";import{t as s}from"./react-CwJFpaho.js";import{g as c,n as l}from"./NullStore-8d2s-Re3.js";import{F as u,M as d}from"./badge-2AZ3HfVS.js";import{s as f}from"./DialogViewport-B6w_ROOE.js";import{t as p}from"./useBaseUiId-DKOjzmu3.js";var m=e(s(),1),h=t(function(e,t){let{render:s,className:h,style:g,disabled:_=!1,nativeButton:v=!0,id:y,payload:b,handle:x,...S}=e,C=f(!0),w=l(x)??C;if(!w)throw Error(n(79));let T=p(y),E=w.useState(`floatingRootContext`),D=w.useState(`isOpenedByTrigger`,T),O=w.useState(`triggerPopupId`,T),k=m.useRef(null),{registerTrigger:A,isMountedByThisTrigger:j}=c(T,k,w,{payload:b}),{getButtonProps:M,buttonRef:N}=o({disabled:_,native:v}),P=u(E),F=d(()=>w.select(`open`),e=>{w.set(`openMethod`,e)}),I={disabled:_,open:D},L=w.useState(`triggerProps`,j);return a(`button`,e,{state:I,ref:[N,t,A,k],props:[P.reference,L,F,{[i]:``,id:T,"aria-haspopup":`dialog`,"aria-expanded":D,"aria-controls":O},S,M],stateAttributesMapping:r})});export{h as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Ut as t}from"./primary-DZjgHvyf.js";import{$l as n,Bn as r,Jr as i,_a as a,ei as o,yn as s}from"./runtime-BwHA1GUS.js";import{t as c}from"./react-CwJFpaho.js";import{t as ee}from"./useNavigate-B8oXtF30.js";import{a as te,d as ne,f as re,i as l,l as ie,m as ae,n as oe,o as se,p as ce,r as le,t as ue,u as de}from"./ChatRightPanel-CygpcJiF.js";import{O as fe}from"./ContextHandoffEndpointLabel-CeGDLNA4.js";import{t as pe}from"./usePresentationTier-hxB7Yv_Q.js";import"./storeSelectors-CTDWheMy.js";import{o as u}from"./sidebar-Cc6ANbOP.js";import{t as me}from"./useAppSidebarCollapsed-CFy476E3.js";import{C as d,D as f,E as p,O as m,S as h,T as g,b as he,k as _,w as v,y as ge}from"./main-DAbEANjY.js";var y=e(c(),1),b=n();function x({rawDraftId:e,search:n}){let c=ee(),x=a.make(e),S=`draft:${x}`,_e=(0,y.useCallback)(e=>{c({to:`/draft/$draftId`,params:{draftId:x},replace:!0,search:e})},[x,c]),C=ne({threadKey:S,search:n,replaceSearch:_e}),w=ae(x),T=r((0,y.useMemo)(()=>s(w?.threadId??null),[w?.threadId])),ve=ie(T),E=(0,y.useMemo)(()=>w?.promotedTo?ve?w.promotedTo:null:T?{environmentId:T.environmentId,threadId:T.id}:null,[w?.promotedTo,T,ve]),D=C.diff===`1`,O=C.preview===`1`,k=ge(C),A=he(C),j=C.workspaceTab===`agent`&&C.workspaceAgentKey?C.workspaceAgentKey:null,ye=fe(de),M=pe(),N=E?`${E.environmentId}:${E.threadId}`:null,P=t(e=>N?e.pendingOpenByThreadKey[N]:void 0),F=t(e=>e.consumeOpenRequest),be=me(),{maximized:I,toggleMaximized:xe}=ce({threadKey:x,open:A,canMaximize:!ye&&M!==`phone`}),[L,R]=(0,y.useState)(()=>({draftId:x,hasOpenedDiff:D,hasOpenedPreview:O,hasOpenedTerminal:k===`terminal`,hasOpenedSimulator:k===`simulator`,hasOpenedBrowser:k===`browser`,hasOpenedAgents:k===`agents`,openedAgentKeys:j?[j]:[]}));(0,y.useEffect)(()=>{E&&P&&M!==`phone`&&(F(E.environmentId,E.threadId),c({to:`/draft/$draftId`,params:{draftId:x},search:e=>f(e)}))},[E,F,x,c,P,M]);let z=L.draftId===x?L.hasOpenedDiff:D,B=L.draftId===x?L.hasOpenedPreview:O,V=L.draftId===x?L.hasOpenedTerminal:k===`terminal`,H=L.draftId===x?L.hasOpenedSimulator:k===`simulator`,U=L.draftId===x?L.hasOpenedBrowser:k===`browser`,W=L.draftId===x?L.hasOpenedAgents:k===`agents`,G=(0,y.useMemo)(()=>{let e=L.draftId===x?L.openedAgentKeys:j?[j]:[];return j&&!e.includes(j)?[...e,j]:e},[j,x,L]),[K,Se]=(0,y.useState)(()=>k??`files`),q=(0,y.useMemo)(()=>{let e=[];return(B||k===`files`)&&e.push(`files`),(z||k===`review`)&&e.push(`review`),(V||k===`terminal`)&&e.push(`terminal`),(H||k===`simulator`)&&e.push(`simulator`),(U||k===`browser`)&&e.push(`browser`),(W||k===`agents`)&&e.push(`agents`),e},[W,z,B,H,U,V,k]),J=(0,y.useCallback)(e=>{Se(e),R(t=>{let n={draftId:x,hasOpenedDiff:(t.draftId===x?t.hasOpenedDiff:D)||e===`review`,hasOpenedPreview:(t.draftId===x?t.hasOpenedPreview:O)||e===`files`,hasOpenedTerminal:(t.draftId===x?t.hasOpenedTerminal:k===`terminal`)||e===`terminal`,hasOpenedSimulator:(t.draftId===x?t.hasOpenedSimulator:k===`simulator`)||e===`simulator`,hasOpenedBrowser:(t.draftId===x?t.hasOpenedBrowser:k===`browser`)||e===`browser`,hasOpenedAgents:(t.draftId===x?t.hasOpenedAgents:k===`agents`)||e===`agents`,openedAgentKeys:t.draftId===x?t.openedAgentKeys:G};return t.draftId===n.draftId&&t.hasOpenedDiff===n.hasOpenedDiff&&t.hasOpenedPreview===n.hasOpenedPreview&&t.hasOpenedTerminal===n.hasOpenedTerminal&&t.hasOpenedSimulator===n.hasOpenedSimulator&&t.hasOpenedBrowser===n.hasOpenedBrowser&&t.hasOpenedAgents===n.hasOpenedAgents&&t.openedAgentKeys===n.openedAgentKeys?t:n})},[D,x,G,O,k]),Y=(0,y.useCallback)(()=>{c({to:`/draft/$draftId`,params:{draftId:x},search:e=>le(e)})},[x,c]),X=(0,y.useCallback)(()=>{c({to:`/draft/$draftId`,params:{draftId:x},search:e=>{let t=G[G.length-1];return K===`agent`&&t?h(e,t):K===`files`&&B?g(e):K===`review`&&z?p(e):K===`terminal`&&V?m(e):K===`simulator`&&H?f(e):K===`browser`&&U?v(e):K===`agents`&&W?d(e):B?g(e):z?p(e):V?m(e):H?f(e):U?v(e):W?d(e):t?h(e,t):_(e)}})},[x,W,z,B,H,U,V,K,c,G]),Z=(0,y.useCallback)(()=>{if(A){Y();return}X()},[Y,X,A]),Q=(0,y.useCallback)(e=>{if(e.mode===`agent`){let t=G.filter(t=>t!==e.agentKey);R(e=>({draftId:x,hasOpenedDiff:e.draftId===x?e.hasOpenedDiff:z,hasOpenedPreview:e.draftId===x?e.hasOpenedPreview:B,hasOpenedTerminal:e.draftId===x?e.hasOpenedTerminal:V,hasOpenedSimulator:e.draftId===x?e.hasOpenedSimulator:H,hasOpenedBrowser:e.draftId===x?e.hasOpenedBrowser:U,hasOpenedAgents:e.draftId===x?e.hasOpenedAgents:W,openedAgentKeys:t})),k===`agent`&&j===e.agentKey&&c({to:`/draft/$draftId`,params:{draftId:x},search:e=>{let n=t[t.length-1];return n?h(e,n):B?g(e):z?p(e):V?m(e):H?f(e):U?v(e):W?d(e):_(e)}});return}let t=e.mode===`review`?!1:z||k===`review`,n=e.mode===`files`?!1:B||k===`files`,r=e.mode===`terminal`?!1:V||k===`terminal`,i=e.mode===`simulator`?!1:H||k===`simulator`,a=e.mode===`browser`?!1:U||k===`browser`,o=e.mode===`agents`?!1:W||k===`agents`;R(e=>{let s={draftId:x,hasOpenedDiff:t,hasOpenedPreview:n,hasOpenedTerminal:r,hasOpenedSimulator:i,hasOpenedBrowser:a,hasOpenedAgents:o,openedAgentKeys:e.draftId===x?e.openedAgentKeys:G};return e.draftId===s.draftId&&e.hasOpenedDiff===s.hasOpenedDiff&&e.hasOpenedPreview===s.hasOpenedPreview&&e.hasOpenedTerminal===s.hasOpenedTerminal&&e.hasOpenedSimulator===s.hasOpenedSimulator&&e.hasOpenedBrowser===s.hasOpenedBrowser&&e.hasOpenedAgents===s.hasOpenedAgents&&e.openedAgentKeys===s.openedAgentKeys?e:s}),k===e.mode&&c({to:`/draft/$draftId`,params:{draftId:x},search:s=>e.mode!==`files`&&n?g(s):e.mode!==`review`&&t?p(s):e.mode!==`terminal`&&r?m(s):e.mode!==`simulator`&&i?f(s):e.mode!==`browser`&&a?v(s):e.mode!==`agents`&&o?d(s):_(s)})},[j,x,W,z,B,H,U,V,c,G,k]);if((0,y.useEffect)(()=>{k!==null&&(Se(k),J(k))},[J,k]),(0,y.useEffect)(()=>{j&&R(e=>{let t=e.draftId===x?e.openedAgentKeys:[];return t.includes(j)?e.draftId===x?e:{draftId:x,hasOpenedDiff:z,hasOpenedPreview:B,hasOpenedTerminal:V,hasOpenedSimulator:H,hasOpenedBrowser:U,hasOpenedAgents:W,openedAgentKeys:t}:{draftId:x,hasOpenedDiff:e.draftId===x?e.hasOpenedDiff:D,hasOpenedPreview:e.draftId===x?e.hasOpenedPreview:O,hasOpenedTerminal:e.draftId===x?e.hasOpenedTerminal:k===`terminal`,hasOpenedSimulator:e.draftId===x?e.hasOpenedSimulator:k===`simulator`,hasOpenedBrowser:e.draftId===x?e.hasOpenedBrowser:k===`browser`,hasOpenedAgents:e.draftId===x?e.hasOpenedAgents:k===`agents`,openedAgentKeys:[...t,j]}})},[j,D,x,W,z,B,H,U,V,O,k]),(0,y.useEffect)(()=>{E&&(re(S,`${E.environmentId}:${E.threadId}`),c({to:`/$environmentId/$threadId`,params:i(E),replace:!0}))},[E,c,S]),(0,y.useEffect)(()=>{w||E||c({to:`/`,replace:!0})},[E,w,c]),E)return(0,b.jsx)(u,{className:`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,children:(0,b.jsx)(l,{environmentId:E.environmentId,threadId:E.threadId,routeKind:`server`})});if(!w)return null;let Ce=A||k===`review`||z||k===`files`||B||k===`terminal`||V||k===`simulator`||H||k===`browser`||U||k===`agents`||W||k===`agent`||G.length>0,we=A||k===`review`||z||k===`files`||B||k===`terminal`||V||k===`agent`||G.length>0,$=A?k:K;return M===`phone`?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(u,{className:`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,children:(0,b.jsx)(l,{draftId:x,environmentId:w.environmentId,threadId:w.threadId,onDiffPanelOpen:()=>J(`review`),onPreviewPanelOpen:()=>J(`files`),onTerminalPanelOpen:()=>J(`terminal`),onAgentPanelOpen:()=>J(`agent`),workspacePanelOpen:A,onToggleWorkspacePanel:Z,routeKind:`draft`})}),(0,b.jsx)(se,{label:`Workspace`,open:A,onClose:Y,children:we?(0,b.jsx)(ue,{mode:`phone`,panelMode:$,openedPanelModes:q,openedAgentKeys:G,onClosePanelTab:Q}):null})]}):ye?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(u,{className:`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,children:(0,b.jsx)(l,{draftId:x,environmentId:w.environmentId,threadId:w.threadId,onDiffPanelOpen:()=>J(`review`),onPreviewPanelOpen:()=>J(`files`),onTerminalPanelOpen:()=>J(`terminal`),onAgentPanelOpen:()=>J(`agent`),workspacePanelOpen:A,onToggleWorkspacePanel:Z,routeKind:`draft`})}),(0,b.jsx)(te,{open:A,onClose:Y,children:Ce?(0,b.jsx)(ue,{mode:`sheet`,panelMode:$,openedPanelModes:q,openedAgentKeys:G,onClosePanelTab:Q}):null})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(u,{className:o(`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,b.jsx)(l,{draftId:x,environmentId:w.environmentId,threadId:w.threadId,onDiffPanelOpen:()=>J(`review`),onPreviewPanelOpen:()=>J(`files`),onTerminalPanelOpen:()=>J(`terminal`),onAgentPanelOpen:()=>J(`agent`),workspacePanelOpen:A,onToggleWorkspacePanel:Z,routeKind:`draft`})}),(0,b.jsx)(oe,{open:A,panelMode:$,openedPanelModes:q,openedAgentKeys:G,onClosePanelTab:Q,onClose:Y,onOpen:X,renderContent:Ce,maximized:I,onToggleMaximized:xe,reserveChromeInset:I&&be})]})}export{x as DraftChatThreadRouteView};
@@ -1 +0,0 @@
1
- import{ei as e}from"./runtime-BwHA1GUS.js";import"./appearancePreferences-nFx4MHoI.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 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{q as t}from"./primary-DZjgHvyf.js";import{Si as n,_i as r}from"./src-C3Y_imaX.js";import{$ as i,$l as a,J as o,P as s,Qr as c,ao as l,ei as u,ho as d,lo as f,po as p}from"./runtime-BwHA1GUS.js";import{t as m}from"./react-CwJFpaho.js";import{t as h}from"./compiler-runtime-C4g8XhC5.js";import{_ as g,b as _,d as v,g as y,h as b,m as x,p as S,t as C,y as w}from"./hostedConnectionCoordinator-BuRWCvUG.js";import{t as T}from"./useNavigate-B8oXtF30.js";import{t as E}from"./download-DsYNYJeu.js";import{t as ee}from"./log-out-D5-aSBAz.js";import{t as te}from"./refresh-cw-CgDa2Ok_.js";import{t as D}from"./shield-check-CGD7sEeF.js";import{t as O}from"./shield-DPC4oHTi.js";import{t as k}from"./smartphone-DgVJfbv3.js";import{t as ne}from"./user-round-CLy1Qy1Y.js";import{o as A}from"./authorization-D8dOcEYq.js";import{t as j}from"./usePresentationTier-hxB7Yv_Q.js";import{a as re,i as M,n as N,o as P,s as F,t as ie}from"./MobileSheet-lT--mLEz.js";import{t as I}from"./GlassSurface-DDG4eTlj.js";import{i as ae,t as L}from"./hubRoutes-jcMPIFy3.js";import{a as oe,c as se,i as R,n as z,o as B,r as ce,s as le,t as ue}from"./HostedRelayTrustNotice-B9jp4SRh.js";var V={name:`badge-check`,size:24,node:[[`path`,{d:`M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z`,key:`3c2336`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`verified`]};V.node;var de=d(V),H={name:`layout-grid`,size:24,node:[[`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.node;var fe=d(H),U={name:`shield-off`,size:24,node:[[`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.node;var W=d(U),G={name:`wifi-off`,size:24,node:[[`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`}]]};G.node;var pe=d(G),me={name:`wifi`,size:24,node:[[`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`}]]};me.node;var he=d(me),K=a(),q=h(),J=e(m(),1),ge={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.`},_e=null,ve=new Set;function Y(e){if(_e!==e){_e=e;for(let e of Array.from(ve))e()}}function ye(e){return ve.add(e),()=>{ve.delete(e)}}function be(){return _e===null?null:ge[_e]}function xe(){return(0,J.useSyncExternalStore)(ye,be)}function Se(){return(0,J.useSyncExternalStore)(_,g)}var Ce=new Set([`node`,`draft`,`pair`,`diagnostics`,...L]);function we(e){let t=/^\/([^/]+)\/([^/]+)\/?$/.exec(e);if(!t)return null;let n=t[1]??``;if(Ce.has(n))return null;try{return decodeURIComponent(n)}catch{return n}}function Te(e){let t=/^\/([^/]+)\/([^/]+)\/?$/u.exec(e);if(!t||Ce.has(t[1]??``))return null;try{return{environmentId:r.make(decodeURIComponent(t[1]??``)),threadId:n.make(decodeURIComponent(t[2]??``))}}catch{return null}}function Ee(e){return e.startsWith(`/draft/`)}var X=null,Z=null,Q=null,De=!1,Oe=null,ke=0,Ae=!1,je=null,Me=null;function $(e){let t=e?JSON.stringify([e.environmentId,e.threadId]):null;t!==je&&(Me?.(),Me=null,je=t,e&&(Me=v(e.environmentId,e.threadId)))}function Ne(e){return e?JSON.stringify([e.environmentId,e.threadId]):null}function Pe(){Ae||(Ae=!0,queueMicrotask(()=>{Ae=!1,ke!==0&&Le()}))}function Fe(e){De=!0;try{e()}finally{De=!1}Pe()}function Ie(e,t){X=null,Z=null,Q=null,(e===`none`||e===`online`||e===`offline`)&&Y(t),x()}function Le(){if(De||!y())return;let e=g(),t=s.getState();if(e.malformed){Y(`invalid-link`),$(null),x();return}if(t.accountStatus!==`authenticated`){$(null),Oe===`authenticated`&&Y(null),Oe=t.accountStatus;return}Oe=t.accountStatus;let n=e.nodeId;if(n===null){if(Q=null,$(null),X=null,Z=null,t.selectedNode&&!C()){let e=t.selectionStatus===`revoked`||t.selectionStatus===`authorization-removed`||t.selectionStatus===`incompatible`;A.returnToDirectory(e?{preserveTerminalSelection:!0}:void 0);return}Re(e.logicalPathname,t);return}let r=Te(e.logicalPathname);Ne(r)!==je&&$(null);let i=t.nodes.find(e=>e.id===n)??null;if(i&&(i.capabilities?.nativeClientRequired===!0||r&&i.environmentId!==r.environmentId)){$(null),Ie(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,Fe(()=>{x(),A.returnToDirectory({preserveTerminalSelection:!0})});return}Z===n&&t.transportStatus===`terminal-failure`&&t.selectionStatus===`offline`&&t.errorMessage===`Ryco state could not be synchronized.`&&Fe(()=>{Ie(t.selectionStatus,`offline`),A.returnToDirectory()});return}if(t.directoryStatus===`stale`){Ie(t.selectionStatus,`unavailable`);return}if(t.directoryStatus!==`ready`||t.browserStatus!==`current`)return;let a=t.nodes.find(e=>e.id===n);if(!a){Ie(t.selectionStatus,`unavailable`);return}if(a.revokedAt!==null){Ie(t.selectionStatus,`revoked`);return}let o=Q===n;$(r);let c=r!==null&&!a.presence.online&&!o;r&&C()&&!c||X!==n&&(X=n,Z=o?null:n,Q=null,Y(null),A.selectNode(a.id).finally(()=>{X===n&&(X=null)}))}function Re(e,t){if(Ee(e)){x();return}let n=we(e);if(n===null)return;if(t.directoryStatus===`stale`){Y(`unavailable`),x();return}if(t.directoryStatus!==`ready`)return;let r=t.nodes.find(e=>e.environmentId===n&&e.revokedAt===null);if(!r){Y(`unavailable`),x();return}S(r.id)}function ze(e){return y()?(Q=e,Y(null),b(e)):!1}function Be(){if(!y())return!1;Q=null,Y(null);let e=g();return e.nodeId===null&&e.logicalPathname===`/nodes`||w()}function Ve(){ke+=1;let e=_(Pe),t=s.subscribe(Pe),n=y()?.subscribe(()=>Pe());Pe();let r=!1;return()=>{r||(r=!0,--ke,e(),t(),n?.())}}function He(){let e=(0,q.c)(1),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,J.useEffect)(Ue,t)}function Ue(){return Ve()}function We(e){let t=(0,q.c)(11),{label:n,status:r,icon:i,onClick:a,testId:o,className:s}=e,c;t[0]===s?c=t[1]:(c=u(I(`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]=c);let l;t[2]===r?l=t[3]:(l=(0,K.jsx)(`span`,{"data-slot":`mobile-status-chip-status`,className:`min-w-0 truncate`,children:r}),t[2]=r,t[3]=l);let d;return t[4]!==i||t[5]!==n||t[6]!==a||t[7]!==c||t[8]!==l||t[9]!==o?(d=(0,K.jsxs)(`button`,{type:`button`,"aria-label":n,"data-slot":`mobile-status-chip`,"data-testid":o,className:c,onClick:a,children:[i,l]}),t[4]=i,t[5]=n,t[6]=a,t[7]=c,t[8]=l,t[9]=o,t[10]=d):d=t[10],d}var Ge={legacy:{glyph:`legacy`,iconClassName:`text-amber-500`},web:{glyph:`browser-encrypted`,iconClassName:`text-sky-500`},account:{glyph:`account-trusted`,iconClassName:`text-indigo-500`},e2ee:{glyph:`native-verified`,iconClassName:`text-emerald-500`}};function Ke(e){return e.guarantee===`none`?e.connected?{glyph:`connected`,iconClassName:`text-emerald-500`}:{glyph:`disconnected`,iconClassName:`text-amber-500`}:Ge[e.guarantee]}function qe(){let e=(0,q.c)(19),n=oe(),r=B(),a=s(Xe),c=s(Ye),l=s(Je);if(n!==`web-unsigned`)return null;let u,d;e[0]!==r||e[1]!==c||e[2]!==a||e[3]!==l?(u=ce(i(`security`,{hosted:t(),role:o(a,c,l)})),d=R(r,u),e[0]=r,e[1]=c,e[2]=a,e[3]=l,e[4]=u,e[5]=d):(u=e[4],d=e[5]);let p=d;if(!p){let t;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsxs)(`section`,{"aria-label":`Session code`,"data-testid":`hosted-e2ee-verification`,"data-code":`absent`,className:`space-y-2`,children:[(0,K.jsx)(`p`,{className:`text-xs font-medium`,children:`Session code`}),(0,K.jsx)(`p`,{"data-testid":`hosted-e2ee-verification-unavailable`,className:`text-[11px] leading-relaxed text-muted-foreground`,children:z})]}),e[6]=t):t=e[6],t}let m;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,K.jsx)(`p`,{className:`text-xs font-medium`,children:`Session code`}),e[7]=m):m=e[7];let h;e[8]===p.display?h=e[9]:(h=(0,K.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:p.display}),e[8]=p.display,e[9]=h);let g;e[10]===p.display?g=e[11]:(g=()=>void navigator.clipboard.writeText(p.display),e[10]=p.display,e[11]=g);let _;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,K.jsx)(f,{"aria-hidden":!0,className:`size-3.5`}),e[12]=_):_=e[12];let v;e[13]===g?v=e[14]:(v=(0,K.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground`,onClick:g,children:[_,` Copy`]}),e[13]=g,e[14]=v);let y;return e[15]!==u||e[16]!==h||e[17]!==v?(y=(0,K.jsxs)(`section`,{"aria-label":`Session code`,"data-testid":`hosted-e2ee-verification`,"data-code":`present`,"data-form":u,className:`space-y-2`,children:[m,h,v]}),e[15]=u,e[16]=h,e[17]=v,e[18]=y):y=e[18],y}function Je(e){return e.transportStatus}function Ye(e){return e.directoryStatus}function Xe(e){return e.effectiveRole}var Ze=`ryco:pwa:activate:v1`,Qe=`Installation is temporarily unavailable.`,$e={errorMessage:null,installState:`hidden`,platform:`other`,registrationState:`disabled`,updateState:`idle`};function et(e){return e===``||e===`./`?`./`:e.endsWith(`/`)?e:`${e}/`}function tt(e){let t=e.navigator.userAgent;return/iPad|iPhone|iPod/.test(t)||/Macintosh/.test(t)&&e.navigator.maxTouchPoints>1}function nt(e){let t=e;return typeof t.prompt==`function`&&t.userChoice instanceof Promise}function rt(e){let t=$e,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=>{nt(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:Qe});return}u({registrationState:`registering`,errorMessage:null});try{let n=et(e.baseUrl);_(await t.register(`${n}service-worker.js`,{scope:n})),u({registrationState:`ready`,errorMessage:null})}catch{u({registrationState:`unavailable`,errorMessage:Qe})}};return{activateUpdate(){let e=i?.waiting;e&&t.updateState===`ready`&&(s=!0,u({updateState:`activating`}),e.postMessage({type:Ze}))},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:tt(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=$e,c.forEach(e=>e()))},subscribe(e){return c.add(e),()=>c.delete(e)}}}function it(){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 at=typeof window>`u`?null:rt(it());function ot(e){let t=(0,q.c)(3),{compact:n,lifecycle:r}=e,i=n!==void 0&&n,a=r===void 0?at:r,o;return t[0]!==i||t[1]!==a?(o=a?(0,K.jsx)(st,{compact:i,lifecycle:a}):null,t[0]=i,t[1]=a,t[2]=o):o=t[2],o}function st(e){let t=(0,q.c)(27),{compact:n,lifecycle:r}=e,i=(0,J.useSyncExternalStore)(r.subscribe,r.getSnapshot,r.getSnapshot),[a,o]=(0,J.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`,l;t[0]!==n||t[1]!==r||t[2]!==i.installState?(l=i.installState===`native-available`?(0,K.jsxs)(c,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,onClick:()=>void r.promptInstall(),children:[(0,K.jsx)(E,{"aria-hidden":!0}),` Install Ryco`]}):null,t[0]=n,t[1]=r,t[2]=i.installState,t[3]=l):l=t[3];let u;t[4]!==n||t[5]!==a||t[6]!==i.installState?(u=i.installState===`manual-available`?(0,K.jsxs)(c,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,"aria-expanded":a,onClick:()=>o(ct),children:[(0,K.jsx)(k,{"aria-hidden":!0}),` How to install`]}):null,t[4]=n,t[5]=a,t[6]=i.installState,t[7]=u):u=t[7];let d;t[8]!==n||t[9]!==r||t[10]!==i.updateState?(d=i.updateState===`idle`?null:(0,K.jsxs)(c,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,disabled:i.updateState===`activating`,onClick:()=>r.activateUpdate(),children:[(0,K.jsx)(te,{"aria-hidden":!0}),i.updateState===`activating`?`Updating…`:`Update ready`]}),t[8]=n,t[9]=r,t[10]=i.updateState,t[11]=d):d=t[11];let f;t[12]!==l||t[13]!==u||t[14]!==d?(f=(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[l,u,d]}),t[12]=l,t[13]=u,t[14]=d,t[15]=f):f=t[15];let p;t[16]!==a||t[17]!==i?(p=a?(0,K.jsx)(lt,{snapshot:i,onClose:()=>o(!1)}):null,t[16]=a,t[17]=i,t[18]=p):p=t[18];let m;t[19]!==i.errorMessage||t[20]!==i.registrationState?(m=i.registrationState===`unavailable`&&i.errorMessage?(0,K.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:i.errorMessage}):null,t[19]=i.errorMessage,t[20]=i.registrationState,t[21]=m):m=t[21];let h;return t[22]!==s||t[23]!==f||t[24]!==p||t[25]!==m?(h=(0,K.jsxs)(`section`,{className:s,"aria-label":`Ryco app installation`,children:[f,p,m]}),t[22]=s,t[23]=f,t[24]=p,t[25]=m,t[26]=h):h=t[26],h}function ct(e){return!e}function lt(e){let t=(0,q.c)(13),{snapshot:n,onClose:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,K.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,K.jsxs)(`div`,{children:[i,n.platform===`ios`?(0,K.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,K.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,K.jsx)(l,{"aria-hidden":!0}),t[3]=o):o=t[3];let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,K.jsx)(`span`,{className:`sr-only`,children:`Close install instructions`}),t[4]=s):s=t[4];let u;t[5]===r?u=t[6]:(u=(0,K.jsxs)(c,{className:`size-11 shrink-0`,size:`icon`,variant:`ghost`,onClick:r,children:[o,` `,s]}),t[5]=r,t[6]=u);let d;t[7]!==a||t[8]!==u?(d=(0,K.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[a,u]}),t[7]=a,t[8]=u,t[9]=d):d=t[9];let f;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,K.jsx)(`div`,{className:`mt-3 border-t border-border pt-3`,children:(0,K.jsx)(ue,{compact:!0})}),t[10]=f):f=t[10];let p;return t[11]===d?p=t[12]:(p=(0,K.jsxs)(`div`,{role:`region`,"aria-label":`Install Ryco instructions`,className:`rounded-lg border border-border bg-background p-3 text-sm`,children:[d,f]}),t[11]=d,t[12]=p),p}var ut={connected:he,disconnected:pe,legacy:W,"browser-encrypted":O,"account-trusted":de,"native-verified":D};function dt(e){let t=(0,q.c)(9),{indicator:n,className:r,testId:i}=e,a;t[0]===n?a=t[1]:(a=Ke(n),t[0]=n,t[1]=a);let{glyph:o,iconClassName:s}=a,c=ut[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,K.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 ft(e){let t=(0,q.c)(3),{node:n}=e;if(n.revokedAt){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,K.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,K.jsxs)(`span`,{className:`flex items-center gap-1 text-xs text-emerald-600 dark:text-emerald-400`,children:[(0,K.jsx)(he,{"aria-hidden":!0,className:`size-3.5`}),` Online`]}):(0,K.jsxs)(`span`,{className:`flex items-center gap-1 text-xs text-muted-foreground`,children:[(0,K.jsx)(pe,{"aria-hidden":!0,className:`size-3.5`}),` Offline`]}),t[1]=n.presence.online,t[2]=r),r}function pt(){let e=(0,q.c)(7),t=T(),n;e[0]===t?n=e[1]:(n=async e=>{ze(e.id)||(await t({to:`/`,replace:!0}),await A.selectNode(e.id))},e[0]=t,e[1]=n);let r=n,i;e[2]===t?i=e[3]:(i=async()=>{Be()||(await t({to:`/`,replace:!0}),await A.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 mt(){let e=(0,q.c)(5),t=s(_t),n=s(gt);if(t!==`delivery-unknown`)return null;let r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,K.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.`,o=n?`Acknowledge`:`Synchronizing…`,l;return e[1]!==i||e[2]!==a||e[3]!==o?(l=(0,K.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,K.jsx)(c,{className:`mt-2`,size:`sm`,variant:`outline`,disabled:i,title:a,onClick:ht,children:o})]}),e[1]=i,e[2]=a,e[3]=o,e[4]=l):l=e[4],l}function ht(){return A.acknowledgeDeliveryUnknown()}function gt(e){return e.sessionRecoveredAfterUnknown}function _t(e){return e.sessionStatus}function vt(){let e=(0,q.c)(62),t=s(kt),n=s(Ot),r=s(Dt),i=s(Et),a=s(Tt),o=s(wt),l=s(Ct),u=s(St),d=s(xt),f=oe(),{switchNode:m,returnToAllNodes:h}=pt(),g=(0,J.useRef)(null);if(!t)return null;let _,v;if(e[0]!==d||e[1]!==f||e[2]!==a||e[3]!==i||e[4]!==r){let t={browserStatus:d,sessionStatus:i,selectionStatus:a,transportStatus:r,e2eeStatus:f};_=se(t),v=le(t),e[0]=d,e[1]=f,e[2]=a,e[3]=i,e[4]=r,e[5]=_,e[6]=v}else _=e[5],v=e[6];let y=v,b;e[7]===y?b=e[8]:(b=(0,K.jsx)(dt,{indicator:y,className:`size-4`}),e[7]=y,e[8]=b);let x;e[9]===t.label?x=e[10]:(x=(0,K.jsx)(`span`,{className:`max-w-32 truncate font-medium`,children:t.label}),e[9]=t.label,e[10]=x);let S;e[11]===_?S=e[12]:(S=(0,K.jsx)(`span`,{className:`max-w-24 truncate text-xs text-muted-foreground`,children:_}),e[11]=_,e[12]=S);let C;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,K.jsx)(p,{"aria-hidden":!0,className:`size-3.5 transition-transform group-open:rotate-180`}),e[13]=C):C=e[13];let w;e[14]!==b||e[15]!==x||e[16]!==S?(w=(0,K.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:[b,x,S,C]}),e[14]=b,e[15]=x,e[16]=S,e[17]=w):w=e[17];let T;e[18]===t.label?T=e[19]:(T=(0,K.jsx)(`p`,{className:`font-medium`,children:t.label}),e[18]=t.label,e[19]=T);let E=l??`Role unavailable`,D;e[20]!==_||e[21]!==E?(D=(0,K.jsxs)(`p`,{className:`mt-0.5 text-xs capitalize text-muted-foreground`,children:[E,` · `,_]}),e[20]=_,e[21]=E,e[22]=D):D=e[22];let O;e[23]!==t.label||e[24]!==_?(O=(0,K.jsxs)(`p`,{className:`sr-only`,"aria-live":`polite`,children:[`Node `,t.label,`: `,_,`.`]}),e[23]=t.label,e[24]=_,e[25]=O):O=e[25];let k;e[26]===u?k=e[27]:(k=u?(0,K.jsx)(`p`,{role:`status`,className:`mt-2 text-xs text-muted-foreground`,children:u}):null,e[26]=u,e[27]=k);let A;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,K.jsx)(mt,{}),e[28]=A):A=e[28];let j;e[29]===h?j=e[30]:(j=()=>void h(),e[29]=h,e[30]=j);let re;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,K.jsx)(fe,{"aria-hidden":!0,className:`size-4`}),e[31]=re):re=e[31];let M;e[32]===j?M=e[33]:(M=(0,K.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]!==d||e[35]!==o||e[36]!==t.id||e[37]!==n||e[38]!==m){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]!==d||e[43]!==o||e[44]!==m?(i=e=>(0,K.jsxs)(`button`,{type:`button`,disabled:o!==`ready`||d!==`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 m(e),children:[(0,K.jsx)(`span`,{className:`truncate`,children:e.label}),(0,K.jsx)(ft,{node:e})]},e.id),e[42]=d,e[43]=o,e[44]=m,e[45]=i):i=e[45],N=n.filter(r).map(i),e[34]=d,e[35]=o,e[36]=t.id,e[37]=n,e[38]=m,e[39]=N}else N=e[39];let P;e[46]!==M||e[47]!==N?(P=(0,K.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,K.jsxs)(c,{size:`sm`,variant:`outline`,onClick:bt,children:[(0,K.jsx)(te,{"aria-hidden":!0}),` Refresh`]}),e[49]=F):F=e[49];let ie;e[50]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,K.jsxs)(c,{size:`sm`,variant:`ghost`,onClick:yt,children:[(0,K.jsx)(ee,{"aria-hidden":!0}),` Sign out`]}),e[50]=ie):ie=e[50];let I;e[51]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,K.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 border-t border-border pt-3`,children:[F,ie,(0,K.jsxs)(c,{size:`sm`,variant:`ghost`,onClick:()=>{g.current&&(g.current.open=!1),ae({kind:`account`,section:`security`})},children:[(0,K.jsx)(ne,{"aria-hidden":!0}),` Security details`]})]}),e[51]=I):I=e[51];let L;e[52]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,K.jsxs)(`div`,{className:`mt-3 space-y-3 border-t border-border pt-3`,children:[(0,K.jsx)(qe,{}),(0,K.jsx)(ot,{compact:!0})]}),e[52]=L):L=e[52];let R;e[53]!==k||e[54]!==P||e[55]!==T||e[56]!==D||e[57]!==O?(R=(0,K.jsxs)(`div`,{className:`absolute right-0 z-50 mt-2 w-72 rounded-xl border border-border bg-popover p-3 shadow-xl`,children:[T,D,O,k,A,P,I,L]}),e[53]=k,e[54]=P,e[55]=T,e[56]=D,e[57]=O,e[58]=R):R=e[58];let z;return e[59]!==R||e[60]!==w?(z=(0,K.jsx)(`div`,{className:`relative max-w-full`,children:(0,K.jsxs)(`details`,{ref:g,className:`group relative`,children:[w,R]})}),e[59]=R,e[60]=w,e[61]=z):z=e[61],z}function yt(){A.signOut()}function bt(){A.refreshDirectory()}function xt(e){return e.browserStatus}function St(e){return e.errorMessage}function Ct(e){return e.effectiveRole}function wt(e){return e.directoryStatus}function Tt(e){return e.selectionStatus}function Et(e){return e.sessionStatus}function Dt(e){return e.transportStatus}function Ot(e){return e.nodes}function kt(e){return e.selectedNode}function At(e){let t=(0,q.c)(66),{open:n,onOpenChange:r}=e,i=s(Vt),a=s(Bt),o=s(zt),l=s(Rt),u=s(Lt),d=s(It),f=s(Ft),p=s(Pt),m=s(Nt),h=oe(),{switchNode:g,returnToAllNodes:_}=pt();if(!i)return null;let v,y;if(t[0]!==m||t[1]!==h||t[2]!==u||t[3]!==l||t[4]!==o){let e={browserStatus:m,sessionStatus:l,selectionStatus:u,transportStatus:o,e2eeStatus:h};v=se(e),y=le(e),t[0]=m,t[1]=h,t[2]=u,t[3]=l,t[4]=o,t[5]=v,t[6]=y}else v=t[5],y=t[6];let b=y,x=d!==`ready`||m!==`current`,S;t[7]===b?S=t[8]:(S=(0,K.jsx)(dt,{indicator:b,className:`size-4`}),t[7]=b,t[8]=S);let C;t[9]===i.label?C=t[10]:(C=(0,K.jsx)(`span`,{className:`truncate`,children:i.label}),t[9]=i.label,t[10]=C);let w;t[11]!==S||t[12]!==C?(w=(0,K.jsxs)(P,{className:`flex items-center gap-2`,children:[S,C]}),t[11]=S,t[12]=C,t[13]=w):w=t[13];let T=f??`Role unavailable`,E;t[14]!==v||t[15]!==T?(E=(0,K.jsxs)(N,{className:`capitalize`,children:[T,` · `,v]}),t[14]=v,t[15]=T,t[16]=E):E=t[16];let D;t[17]!==i.label||t[18]!==v?(D=(0,K.jsxs)(`p`,{className:`sr-only`,"aria-live":`polite`,children:[`Node `,i.label,`: `,v,`.`]}),t[17]=i.label,t[18]=v,t[19]=D):D=t[19];let O;t[20]!==w||t[21]!==E||t[22]!==D?(O=(0,K.jsxs)(M,{children:[w,E,D]}),t[20]=w,t[21]=E,t[22]=D,t[23]=O):O=t[23];let k;t[24]===p?k=t[25]:(k=p?(0,K.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:p}):null,t[24]=p,t[25]=k);let A;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,K.jsx)(mt,{}),t[26]=A):A=t[26];let j;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,K.jsx)(ne,{"aria-hidden":!0,className:`size-4 shrink-0`}),t[27]=j):j=t[27];let I;t[28]===r?I=t[29]:(I=(0,K.jsx)(F,{label:`Security details`,icon:j,onClick:()=>{r(!1),ae({kind:`account`,section:`security`})}}),t[28]=r,t[29]=I);let L;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,K.jsx)(fe,{"aria-hidden":!0,className:`size-4 shrink-0`}),t[30]=L):L=t[30];let R;t[31]!==r||t[32]!==_?(R=(0,K.jsx)(F,{label:`All nodes`,icon:L,onClick:()=>{r(!1),_()}}),t[31]=r,t[32]=_,t[33]=R):R=t[33];let z;if(t[34]!==i.id||t[35]!==a||t[36]!==r||t[37]!==g||t[38]!==x){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]!==g||t[44]!==x?(n=e=>(0,K.jsx)(F,{label:e.label,disabled:x||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,K.jsx)(ft,{node:e}),onClick:()=>{r(!1),g(e)}},e.id),t[42]=r,t[43]=g,t[44]=x,t[45]=n):n=t[45],z=a.filter(e).map(n),t[34]=i.id,t[35]=a,t[36]=r,t[37]=g,t[38]=x,t[39]=z}else z=t[39];let B;t[46]!==I||t[47]!==R||t[48]!==z?(B=(0,K.jsxs)(`div`,{className:`mt-3 space-y-1 border-t border-border pt-3`,children:[I,R,z]}),t[46]=I,t[47]=R,t[48]=z,t[49]=B):B=t[49];let ce=d===`loading`,ue;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,K.jsx)(te,{"aria-hidden":!0}),t[50]=ue):ue=t[50];let V;t[51]===ce?V=t[52]:(V=(0,K.jsxs)(c,{size:`sm`,variant:`outline`,className:`min-h-11`,disabled:ce,onClick:Mt,children:[ue,` Refresh nodes`]}),t[51]=ce,t[52]=V);let de;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,K.jsxs)(c,{size:`sm`,variant:`ghost`,className:`min-h-11`,onClick:jt,children:[(0,K.jsx)(ee,{"aria-hidden":!0}),` Sign out`]}),t[53]=de):de=t[53];let H;t[54]===V?H=t[55]:(H=(0,K.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 border-t border-border pt-3`,children:[V,de]}),t[54]=V,t[55]=H);let U;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,K.jsx)(`div`,{className:`mt-3 space-y-3 border-t border-border pt-3`,children:(0,K.jsx)(ot,{compact:!0})}),t[56]=U):U=t[56];let W;t[57]!==B||t[58]!==H||t[59]!==k?(W=(0,K.jsxs)(re,{children:[k,A,B,H,U]}),t[57]=B,t[58]=H,t[59]=k,t[60]=W):W=t[60];let G;return t[61]!==r||t[62]!==n||t[63]!==W||t[64]!==O?(G=(0,K.jsxs)(ie,{open:n,onOpenChange:r,label:`Connection`,children:[O,W]}),t[61]=r,t[62]=n,t[63]=W,t[64]=O,t[65]=G):G=t[65],G}function jt(){A.signOut()}function Mt(){A.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(){let e=(0,q.c)(25),t=s(qt),n=s(Kt),r=s(Gt),i=s(Wt),a=s(Ut),o=oe(),[c,l]=(0,J.useState)(!1);if(!t)return null;let u,d;if(e[0]!==a||e[1]!==o||e[2]!==i||e[3]!==r||e[4]!==n){let t={browserStatus:a,sessionStatus:r,selectionStatus:i,transportStatus:n,e2eeStatus:o};u=se(t),d=le(t),e[0]=a,e[1]=o,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,K.jsxs)(K.Fragment,{children:[(0,K.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,K.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,K.jsx)(dt,{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,K.jsx)(We,{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,K.jsx)(At,{open:c,onOpenChange:l}),e[19]=c,e[20]=v);let y;return e[21]!==p||e[22]!==_||e[23]!==v?(y=(0,K.jsxs)(K.Fragment,{children:[p,_,v]}),e[21]=p,e[22]=_,e[23]=v,e[24]=y):y=e[24],y}function Ut(e){return e.browserStatus}function Wt(e){return e.selectionStatus}function Gt(e){return e.sessionStatus}function Kt(e){return e.transportStatus}function qt(e){return e.selectedNode}function Jt(){let e=(0,q.c)(2),t=j(),n;return e[0]===t?n=e[1]:(n=t===`phone`?(0,K.jsx)(Ht,{}):(0,K.jsx)(vt,{}),e[0]=t,e[1]=n),n}export{pt as a,Te as c,He as d,Se as f,ft as i,ze as l,Ht as n,ot as o,pe as p,vt as r,at as s,Jt as t,xe as u};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/main-BqSANuAs.css"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./index-BqZvnGNr.js";import"./src-C3Y_imaX.js";import{$l as n,Bn as r,F as i,I as a,In as o,N as s,P as c,Qr as l,Ur as u,Wr as d,Zr as f,ei as p,ho as m,lo as h,mo as g,oo as _,po as v,so as y,uo as b}from"./runtime-BwHA1GUS.js";import{t as x}from"./react-CwJFpaho.js";import{$n as S,Gt as C,Jt as w,Qt as T,Xt as E,Yt as D,Zt as O,l as k,pr as A,qt as j,xn as M}from"./switch-DnpJB2xv.js";import{t as N}from"./compiler-runtime-C4g8XhC5.js";import{n as P,o as F,s as I}from"./hostedConnectionCoordinator-BuRWCvUG.js";import{t as L}from"./useNavigate-B8oXtF30.js";import{t as R}from"./RootAppShell-T056pByH.js";import{t as z}from"./arrow-left-DUOpzEbP.js";import{a as B,c as V,d as H,f as ee,i as U,l as te,o as ne,t as re,u as ie}from"./HostedConnectionControls-CscV6hm1.js";import{t as ae}from"./chevron-right-Dsw16yGn.js";import{t as oe}from"./key-round-CETZqe3h.js";import{t as se}from"./log-out-D5-aSBAz.js";import{t as ce}from"./palette-92ylWqeC.js";import{t as le}from"./refresh-cw-CgDa2Ok_.js";import{t as W}from"./shield-check-CGD7sEeF.js";import{t as ue}from"./user-round-CLy1Qy1Y.js";import{_ as G,b as de,ht as K,o as q}from"./authorization-D8dOcEYq.js";import{t as fe}from"./usePresentationTier-hxB7Yv_Q.js";import{n as J,t as Y}from"./input-BDWSVClC.js";import{a as pe,i as me,n as he,o as ge,r as _e,s as ve,t as ye}from"./sheet-CGiaw8-i.js";import{t as be}from"./skeleton-rS3IgBob.js";import{i as xe,r as Se,t as Ce}from"./alert-DQEkrtUJ.js";import{a as we,i as Te,n as Ee,o as De,r as Oe,t as ke}from"./MobileSheet-lT--mLEz.js";import{a as Ae,i as je,n as Me,o as Ne,r as Pe,t as Fe}from"./empty-BbJHvskr.js";import{c as Ie,n as Le,r as Re,t as ze}from"./ExternalIdentityWeb.logic-BlKX8J9h.js";import{a as Be}from"./settingsLayout-DxsFwhF0.js";import{a as Ve,i as He,n as Ue,o as We,r as Ge}from"./hubRoutes-jcMPIFy3.js";import{t as Ke}from"./HostedRelayTrustNotice-B9jp4SRh.js";import{n as X,t as qe}from"./data-list-BJCq3CVP.js";import{t as Je}from"./HostedNodeRenameDialog-D1DSiTpx.js";import{P as Ye,c as Xe,l as Ze,s as Qe}from"./main-DAbEANjY.js";var $e={name:`life-buoy`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m4.93 4.93 4.24 4.24`,key:`1ymg45`}],[`path`,{d:`m14.83 9.17 4.24-4.24`,key:`1cb5xl`}],[`path`,{d:`m14.83 14.83 4.24 4.24`,key:`q42g0n`}],[`path`,{d:`m9.17 14.83-4.24 4.24`,key:`bqpfvv`}],[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}]]};$e.node;var et=m($e),tt={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};tt.node;var nt=m(tt),Z=e(x(),1),Q=N(),rt=/^[A-Za-z0-9_-]{43}$/u,it=/^signup_[A-Za-z0-9_-]{22,43}$/u;function at(e){if(e.pathname===`/public-signup/verify`){let t=new URLSearchParams(e.hash.startsWith(`#`)?e.hash.slice(1):e.hash),n=t.get(`attempt`),r=t.get(`attempt_secret`),i=t.get(`token`);return n!==null&&it.test(n)&&r!==null&&rt.test(r)&&i!==null&&rt.test(i)?{kind:`signup-verification`,attemptId:n,attemptSecret:r,token:i}:{kind:`invalid-signup-verification`}}if(e.pathname===`/password-reset`){let t=new URLSearchParams(e.hash.startsWith(`#`)?e.hash.slice(1):e.hash).get(`token`);return t!==null&&rt.test(t)?{kind:`password-reset`,token:t}:{kind:`invalid-password-reset`}}if(e.pathname===`/email-verification`){let t=new URLSearchParams(e.hash.startsWith(`#`)?e.hash.slice(1):e.hash).get(`token`);return t!==null&&rt.test(t)?{kind:`email-verification`,token:t}:{kind:`invalid-email-verification`}}return null}function ot(e){let t=new URL(e.href),n=at(t);return n===null?null:(e.replaceState(e.historyState,``,`${t.pathname}${t.search}`),n)}function st(){let e=(0,Q.c)(3),t=c(dt),n,r;e[0]===t?(n=e[1],r=e[2]):(n=()=>{if(t!==`authenticated`)return;let e=lt,n=()=>{document.visibilityState===`hidden`?(F(!0),q.suspendBrowser(`hidden`)):e()},r=ct,i=()=>e(),a=()=>e();return document.addEventListener(`visibilitychange`,n),window.addEventListener(`offline`,r),window.addEventListener(`online`,i),window.addEventListener(`pageshow`,a),navigator.onLine||r(),()=>{document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`offline`,r),window.removeEventListener(`online`,i),window.removeEventListener(`pageshow`,a)}},r=[t],e[0]=t,e[1]=n,e[2]=r),(0,Z.useEffect)(n,r)}function ct(){F(!0),q.suspendBrowser(`offline`)}function lt(){document.visibilityState===`visible`&&navigator.onLine&&q.resumeBrowser().then(ut)}function ut(){return F(!1)}function dt(e){return e.accountStatus}var ft=`owner_revoked`,pt=Object.freeze([Object.freeze({id:`access`,text:`Every Hub grant on this node stops working immediately, for everyone authorized through this Hub — not only for you — and any relay channel it has open right now closes.`}),Object.freeze({id:`direct`,text:`Clients paired directly with that machine are separate and keep working. Those are managed on the machine itself, with the ryco auth command.`}),Object.freeze({id:`directory`,text:`It leaves the directory for every account on this Hub, not only yours, and stays gone. There is no undo here and no state it can return to.`}),Object.freeze({id:`return`,text:`Putting that machine back starts on the machine itself: use “Leave this Hub” there, then enroll it again with a new device code and your approval. It is a new enrollment, not a reconnection.`}),Object.freeze({id:`reach`,text:`All of that is recorded here, on the Hub. A node that is offline, unreachable, or long gone is revoked in exactly the same way — which is the point of doing it from here.`})]),mt=`Check the identifier below against the machine you meant. Two nodes can carry the same name, and this is the only value that tells them apart.`;function ht(e){return{title:`Revoke ${e.label}?`,consequences:pt,subjectPrompt:mt,subjectId:e.id,confirmLabel:`Revoke this node`,pendingLabel:`Revoking…`,cancelLabel:`Cancel`,dismissLabel:`Back to the list`}}var gt=`Revoke`;function _t(e){return`${e} was revoked. It is gone from this Hub's directory for every account, and this cannot be undone.`}function vt(e){return e===null||e.outcome===`unchanged`}var yt=e=>Object.freeze(e),bt=Object.freeze([yt({id:`invalidResponse`,probe:Object.freeze({code:`invalid_response`,status:502}),selects:(e,t)=>t===`invalid_response`,failure:Object.freeze({message:`The Hub accepted the request and its answer could not be read, so whether this node was revoked is not known here. Refresh the list and check before trying again.`,outcome:`unknown`})}),yt({id:`transport`,probe:Object.freeze({code:`unavailable`,status:0}),selects:(e,t)=>e===0||t===`timeout`||t===`unavailable`,failure:Object.freeze({message:`The request left this browser and no answer came back, so whether this node was revoked is not known here. Check your connection, then refresh the list and look before trying again.`,outcome:`unknown`})}),yt({id:`csrf`,probe:Object.freeze({code:`csrf_rejected`,status:403}),selects:(e,t)=>t===`csrf_rejected`,failure:Object.freeze({message:`This request could not be verified, so nothing was changed. Refresh the page and try again.`,outcome:`unchanged`})}),yt({id:`unauthorized`,probe:Object.freeze({code:`session_invalid`,status:401}),selects:(e,t)=>e===401||t===`session_invalid`,failure:Object.freeze({message:`Your Hub session is no longer valid, so nothing was changed. Sign in and try again.`,outcome:`unchanged`})}),yt({id:`forbidden`,probe:Object.freeze({code:`forbidden`,status:403}),selects:e=>e===403,failure:Object.freeze({message:`Only an owner of this Hub can revoke a node. Nothing was changed.`,outcome:`unchanged`})}),yt({id:`notFound`,probe:Object.freeze({code:`not_found`,status:404}),selects:e=>e===404,failure:Object.freeze({message:`The Hub has no active node under this identifier: it was already revoked, or it is not this Hub's. Either way there is nothing here left to revoke.`,outcome:`already-gone`})}),yt({id:`conflict`,probe:Object.freeze({code:`conflict`,status:409}),selects:e=>e===409,failure:Object.freeze({message:`The Hub reported a conflicting change on this node, so nothing was changed. Refresh and look at it again before retrying.`,outcome:`unchanged`})}),yt({id:`rateLimited`,probe:Object.freeze({code:`node_rate_limited`,status:429}),selects:e=>e===429,failure:Object.freeze({message:`The Hub is refusing further owner changes for now, so nothing was changed. Wait a little and try again.`,outcome:`unchanged`})}),yt({id:`badRequest`,probe:Object.freeze({code:`invalid_request`,status:400}),selects:(e,t)=>e===400||t===`invalid_request`,failure:Object.freeze({message:`The Hub refused this request, so nothing was changed.`,outcome:`unchanged`})})]),xt=Object.freeze({message:`This node could not be revoked. Nothing was changed. Try again in a moment.`,outcome:`unchanged`});function St(e){let t=Ct(e),n=wt(e);for(let e of bt)if(e.selects(t,n))return e.failure;return xt}function Ct(e){if(typeof e!=`object`||!e)return null;let{status:t}=e;return typeof t==`number`&&Number.isFinite(t)?t:null}function wt(e){if(typeof e!=`object`||!e)return null;let{code:t}=e;return typeof t==`string`?t:null}var Tt=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function Et(e){return e===null||!Number.isFinite(e)?null:Tt.format(new Date(e))}function Dt(e){switch(e){case`darwin`:return`macOS`;case`linux`:return`Linux`;case`windows`:return`Windows`;case`unknown`:return`Unknown platform`}}function Ot(e){return e.length===0?e:e[0].toUpperCase()+e.slice(1)}function kt(e){return Ot(e)}function At(e,t){if(!Number.isFinite(e))return`unknown`;let n=t-e;if(n<0)return Et(e)??`unknown`;let r=Math.floor(n/6e4);if(r<2)return`just now`;if(r<60)return`${String(r)} min ago`;let i=Math.floor(r/60);return i<24?`${String(i)} h ago`:Et(e)??`unknown`}function jt(e,t){return e.presence.online?null:e.presence.lastHeartbeatAt===null?e.lastAuthenticatedAt===null?`No connection recorded`:`Last authenticated ${At(e.lastAuthenticatedAt,t)}`:`Last seen ${At(e.presence.lastHeartbeatAt,t)}`}function Mt(e){let t=`${Dt(e.platformOs)} · ${e.platformArch}`;return e.revokedAt===null?`${t} · ${kt(e.effectiveRole)}`:e.revocationReasonCode?`${t} · Access revoked — ${e.revocationReasonCode}`:`${t} · Access revoked`}function Nt(e){return e.toSorted((e,t)=>{let n=e.revokedAt===null?0:1,r=t.revokedAt===null?0:1;return n===r?e.label.localeCompare(t.label,void 0,{numeric:!0,sensitivity:`base`}):n-r})}function Pt(e){return e.filter(e=>e.revokedAt===null).length}function Ft(e){return e.filter(e=>e.revokedAt===null&&e.presence.online).length}function It(e){let t=Pt(e),n=Ft(e),r=e.length-t,i=`${String(t)} authorized · ${n===0?`none online`:`${String(n)} online`}`;return r===0?i:`${i} · ${String(r)} revoked`}function Lt(e){return e.directoryStatus!==`ready`||e.browserStatus!==`current`||e.node.revokedAt!==null||e.node.capabilities?.nativeClientRequired===!0}function Rt(e){return e.node.capabilities?.nativeClientRequired===!0?`Open this node in Desktop/Mobile.`:e.node.revokedAt===null?e.directoryStatus!==`ready`||e.browserStatus!==`current`?`Node switching is unavailable until the directory and this browser are current.`:null:`Access to this node was revoked.`}var $=n();function zt({node:e,open:t,onOpenChange:n,onRevoke:r}){let[i,a]=(0,Z.useState)(!1),[o,s]=(0,Z.useState)(null),c=ht(e),u=vt(o);(0,Z.useEffect)(()=>{t&&!i&&(a(!1),s(null))},[e.id,t]);let d=async()=>{if(!i){a(!0),s(null);try{await r(),n(!1)}catch(e){s(St(e)),a(!1)}}};return(0,$.jsx)(C,{open:t,onOpenChange:e=>{(e||!i)&&n(e)},disablePointerDismissal:i,children:(0,$.jsxs)(O,{className:`max-w-md`,showCloseButton:!i,children:[(0,$.jsxs)(D,{children:[(0,$.jsx)(T,{children:c.title}),(0,$.jsx)(j,{children:c.subjectPrompt})]}),(0,$.jsxs)(E,{className:`space-y-4`,children:[(0,$.jsxs)(qe,{children:[(0,$.jsx)(X,{term:`Node`,children:e.label}),(0,$.jsx)(X,{term:`Node ID`,mono:!0,children:c.subjectId}),(0,$.jsx)(X,{term:`Platform`,children:`${Dt(e.platformOs)} · ${e.platformArch}`})]}),(0,$.jsx)(`ul`,{className:`space-y-2 text-xs leading-relaxed text-muted-foreground`,children:c.consequences.map(e=>(0,$.jsx)(`li`,{children:e.text},e.id))}),o?(0,$.jsxs)(`p`,{role:`alert`,className:`flex items-start gap-2 text-xs leading-relaxed text-destructive`,children:[(0,$.jsx)(_,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0`}),o.message]}):null]}),(0,$.jsxs)(w,{children:[(0,$.jsx)(l,{variant:`outline`,disabled:i,onClick:()=>n(!1),children:u?c.cancelLabel:c.dismissLabel}),u?(0,$.jsx)(l,{variant:`destructive`,disabled:i,onClick:()=>void d(),children:i?c.pendingLabel:c.confirmLabel}):null]})]})})}function Bt(e){let t=(0,Q.c)(57),{node:n}=e,r=Be(6e4),{copyToClipboard:i,isCopied:a}=f(),o;t[0]===n.createdAt?o=t[1]:(o=Et(n.createdAt),t[0]=n.createdAt,t[1]=o);let s=o,c;t[2]===n.lastAuthenticatedAt?c=t[3]:(c=Et(n.lastAuthenticatedAt),t[2]=n.lastAuthenticatedAt,t[3]=c);let u=c,d;t[4]===n.revokedAt?d=t[5]:(d=Et(n.revokedAt),t[4]=n.revokedAt,t[5]=d);let p=d,m=n.grant.role!==n.effectiveRole,_;t[6]===n?_=t[7]:(_=(0,$.jsx)(X,{term:`Status`,children:(0,$.jsx)(U,{node:n})}),t[6]=n,t[7]=_);let v;t[8]!==n.presence.lastHeartbeatAt||t[9]!==r?(v=n.presence.lastHeartbeatAt===null?`Not reported`:(0,$.jsx)(`span`,{title:Et(n.presence.lastHeartbeatAt)??void 0,children:At(n.presence.lastHeartbeatAt,r)}),t[8]=n.presence.lastHeartbeatAt,t[9]=r,t[10]=v):v=t[10];let y;t[11]===v?y=t[12]:(y=(0,$.jsx)(X,{term:`Last heartbeat`,children:v}),t[11]=v,t[12]=y);let b=u??`Never`,x;t[13]===b?x=t[14]:(x=(0,$.jsx)(X,{term:`Last connected`,children:b}),t[13]=b,t[14]=x);let S;t[15]===n.platformOs?S=t[16]:(S=Dt(n.platformOs),t[15]=n.platformOs,t[16]=S);let C=`${S} · ${n.platformArch}`,w;t[17]===C?w=t[18]:(w=(0,$.jsx)(X,{term:`Platform`,children:C}),t[17]=C,t[18]=w);let T;t[19]===n.clientVersion?T=t[20]:(T=(0,$.jsx)(X,{term:`Client version`,mono:!0,children:n.clientVersion}),t[19]=n.clientVersion,t[20]=T);let E;t[21]===n.effectiveRole?E=t[22]:(E=kt(n.effectiveRole),t[21]=n.effectiveRole,t[22]=E);let D;t[23]===E?D=t[24]:(D=(0,$.jsx)(X,{term:`Your role`,children:E}),t[23]=E,t[24]=D);let O;t[25]!==m||t[26]!==n.grant.role?(O=m?(0,$.jsxs)(X,{term:`Granted role`,children:[kt(n.grant.role),(0,$.jsx)(`span`,{className:`mt-1 block text-muted-foreground`,children:`The role on your grant differs from the role in effect.`})]}):null,t[25]=m,t[26]=n.grant.role,t[27]=O):O=t[27];let k=s??`Not reported`,A;t[28]===k?A=t[29]:(A=(0,$.jsx)(X,{term:`Enrolled`,children:k}),t[28]=k,t[29]=A);let j;t[30]!==n.revocationReasonCode||t[31]!==n.revokedAt||t[32]!==p?(j=n.revokedAt===null?null:(0,$.jsx)(X,{term:`Revoked`,children:`${p??`Not reported`}${n.revocationReasonCode?` — ${n.revocationReasonCode}`:``}`}),t[30]=n.revocationReasonCode,t[31]=n.revokedAt,t[32]=p,t[33]=j):j=t[33];let M=a?`Copied`:`Copy node ID`,N;t[34]!==i||t[35]!==n.id?(N=()=>i(n.id,void 0),t[34]=i,t[35]=n.id,t[36]=N):N=t[36];let P;t[37]===a?P=t[38]:(P=a?(0,$.jsx)(g,{"aria-hidden":!0}):(0,$.jsx)(h,{"aria-hidden":!0}),t[37]=a,t[38]=P);let F;t[39]!==M||t[40]!==N||t[41]!==P?(F=(0,$.jsx)(l,{size:`icon-xs`,variant:`ghost`,"aria-label":M,onClick:N,children:P}),t[39]=M,t[40]=N,t[41]=P,t[42]=F):F=t[42];let I;t[43]!==n.id||t[44]!==F?(I=(0,$.jsx)(X,{term:`Node ID`,mono:!0,action:F,children:n.id}),t[43]=n.id,t[44]=F,t[45]=I):I=t[45];let L;return t[46]!==w||t[47]!==T||t[48]!==D||t[49]!==O||t[50]!==A||t[51]!==j||t[52]!==I||t[53]!==_||t[54]!==y||t[55]!==x?(L=(0,$.jsxs)(qe,{children:[_,y,x,w,T,D,O,A,j,I]}),t[46]=w,t[47]=T,t[48]=D,t[49]=O,t[50]=A,t[51]=j,t[52]=I,t[53]=_,t[54]=y,t[55]=x,t[56]=L):L=t[56],L}function Vt(e){let t=(0,Q.c)(93),{node:n,directoryStatus:r,browserStatus:i,canRename:a,canRevoke:o,onOpenChange:s,onConnect:c,onRename:u,onRevoke:d}=e,f=fe()===`phone`,[p,m]=(0,Z.useState)(null),[h,g]=(0,Z.useState)(null),_=n!==null;if(!n)return null;let v;t[0]!==i||t[1]!==r||t[2]!==n?(v=Lt({directoryStatus:r,browserStatus:i,node:n}),t[0]=i,t[1]=r,t[2]=n,t[3]=v):v=t[3];let y=v,b;t[4]!==i||t[5]!==r||t[6]!==n?(b=Rt({directoryStatus:r,browserStatus:i,node:n}),t[4]=i,t[5]=r,t[6]=n,t[7]=b):b=t[7];let x=b,S;t[8]!==n||t[9]!==c||t[10]!==s?(S=()=>{s(!1),c(n)},t[8]=n,t[9]=c,t[10]=s,t[11]=S):S=t[11];let C=S,w=y&&x?x:null;if(f){let e=`Node details: ${n.label}`,r;t[12]===n.label?r=t[13]:(r=(0,$.jsx)(De,{children:n.label}),t[12]=n.label,t[13]=r);let i;t[14]===n?i=t[15]:(i=Mt(n),t[14]=n,t[15]=i);let a;t[16]===i?a=t[17]:(a=(0,$.jsx)(Ee,{children:i}),t[16]=i,t[17]=a);let o;t[18]!==r||t[19]!==a?(o=(0,$.jsxs)(Te,{children:[r,a]}),t[18]=r,t[19]=a,t[20]=o):o=t[20];let c;t[21]===n?c=t[22]:(c=(0,$.jsx)(Bt,{node:n}),t[21]=n,t[22]=c);let u;t[23]===w?u=t[24]:(u=w?(0,$.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:w}):null,t[23]=w,t[24]=u);let d;t[25]!==u||t[26]!==c?(d=(0,$.jsxs)(we,{children:[c,u]}),t[25]=u,t[26]=c,t[27]=d):d=t[27];let f;t[28]!==y||t[29]!==C?(f=(0,$.jsx)(Oe,{children:(0,$.jsx)(l,{className:`min-h-11`,disabled:y,onClick:C,children:`Connect`})}),t[28]=y,t[29]=C,t[30]=f):f=t[30];let p;return t[31]!==s||t[32]!==_||t[33]!==d||t[34]!==f||t[35]!==e||t[36]!==o?(p=(0,$.jsxs)(ke,{open:_,onOpenChange:s,label:e,children:[o,d,f]}),t[31]=s,t[32]=_,t[33]=d,t[34]=f,t[35]=e,t[36]=o,t[37]=p):p=t[37],p}let T=o&&n.revokedAt===null,E;t[38]!==s||t[39]!==p||t[40]!==h?(E=e=>{(e||h===null&&p===null)&&(e||(m(null),g(null)),s(e))},t[38]=s,t[39]=p,t[40]=h,t[41]=E):E=t[41];let D;t[42]===n.label?D=t[43]:(D=(0,$.jsx)(ve,{className:`truncate`,children:n.label}),t[42]=n.label,t[43]=D);let O;t[44]===n?O=t[45]:(O=Mt(n),t[44]=n,t[45]=O);let k;t[46]===O?k=t[47]:(k=(0,$.jsx)(he,{children:O}),t[46]=O,t[47]=k);let A;t[48]!==D||t[49]!==k?(A=(0,$.jsxs)(me,{children:[D,k]}),t[48]=D,t[49]=k,t[50]=A):A=t[50];let j;t[51]===n?j=t[52]:(j=(0,$.jsx)(Bt,{node:n}),t[51]=n,t[52]=j);let M;t[53]===w?M=t[54]:(M=w?(0,$.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:w}):null,t[53]=w,t[54]=M);let N;t[55]!==M||t[56]!==j?(N=(0,$.jsxs)(pe,{children:[j,M]}),t[55]=M,t[56]=j,t[57]=N):N=t[57];let P;t[58]!==n.id||t[59]!==T?(P=T?(0,$.jsx)(l,{variant:`destructive-outline`,className:`sm:mr-auto`,onClick:()=>g(n.id),children:gt}):null,t[58]=n.id,t[59]=T,t[60]=P):P=t[60];let F;t[61]!==a||t[62]!==n.id?(F=a?(0,$.jsx)(l,{variant:`outline`,onClick:()=>m(n.id),children:`Rename`}):null,t[61]=a,t[62]=n.id,t[63]=F):F=t[63];let I;t[64]!==y||t[65]!==C?(I=(0,$.jsx)(l,{disabled:y,onClick:C,children:`Connect`}),t[64]=y,t[65]=C,t[66]=I):I=t[66];let L;t[67]!==P||t[68]!==F||t[69]!==I?(L=(0,$.jsxs)(_e,{children:[P,F,I]}),t[67]=P,t[68]=F,t[69]=I,t[70]=L):L=t[70];let R;t[71]!==N||t[72]!==L||t[73]!==A?(R=(0,$.jsxs)(ge,{side:`right`,className:`w-full sm:max-w-md`,children:[A,N,L]}),t[71]=N,t[72]=L,t[73]=A,t[74]=R):R=t[74];let z;t[75]!==_||t[76]!==R||t[77]!==E?(z=(0,$.jsx)(ye,{open:_,onOpenChange:E,children:R}),t[75]=_,t[76]=R,t[77]=E,t[78]=z):z=t[78];let B;t[79]!==a||t[80]!==n||t[81]!==u||t[82]!==p?(B=a?(0,$.jsx)(Je,{node:n,open:p===n.id,onOpenChange:e=>m(e?n.id:null),onRename:e=>u(n,e)}):null,t[79]=a,t[80]=n,t[81]=u,t[82]=p,t[83]=B):B=t[83];let V;t[84]!==n||t[85]!==d||t[86]!==T||t[87]!==h?(V=T?(0,$.jsx)(zt,{node:n,open:h===n.id,onOpenChange:e=>g(e?n.id:null),onRevoke:()=>d(n)}):null,t[84]=n,t[85]=d,t[86]=T,t[87]=h,t[88]=V):V=t[88];let H;return t[89]!==z||t[90]!==B||t[91]!==V?(H=(0,$.jsxs)($.Fragment,{children:[z,B,V]}),t[89]=z,t[90]=B,t[91]=V,t[92]=H):H=t[92],H}function Ht(e){let t=(0,Q.c)(18),{children:n,title:r,description:i,actions:a,titleRef:o}=e,s;t[0]!==r||t[1]!==o?(s=(0,$.jsx)(`h1`,{ref:o,tabIndex:-1,className:`font-semibold text-2xl tracking-tight outline-none`,children:r}),t[0]=r,t[1]=o,t[2]=s):s=t[2];let c;t[3]===i?c=t[4]:(c=i===void 0?null:(0,$.jsx)(`div`,{className:`mt-1.5 text-muted-foreground text-sm`,children:i}),t[3]=i,t[4]=c);let l;t[5]!==s||t[6]!==c?(l=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[s,c]}),t[5]=s,t[6]=c,t[7]=l):l=t[7];let u;t[8]===a?u=t[9]:(u=a===void 0?null:(0,$.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2`,children:a}),t[8]=a,t[9]=u);let d;t[10]!==l||t[11]!==u?(d=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-x-4 gap-y-3`,children:[l,u]}),t[10]=l,t[11]=u,t[12]=d):d=t[12];let f;t[13]===n?f=t[14]:(f=(0,$.jsx)(`div`,{className:`mt-8`,children:n}),t[13]=n,t[14]=f);let p;return t[15]!==d||t[16]!==f?(p=(0,$.jsxs)($.Fragment,{children:[d,f]}),t[15]=d,t[16]=f,t[17]=p):p=t[17],p}function Ut(e){let t=(0,Q.c)(12),{children:n,className:r,title:i,description:a,actions:o}=e,s;t[0]===r?s=t[1]:(s=p(`app-surface relative rounded-2xl border not-dark:bg-clip-padding shadow-lg/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-2xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]`,r),t[0]=r,t[1]=s);let c;t[2]!==o||t[3]!==a||t[4]!==i?(c=i===void 0&&o===void 0?null:(0,$.jsxs)(`header`,{className:`flex flex-wrap items-start justify-between gap-x-4 gap-y-2 border-border/60 border-b px-5 py-4`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[i===void 0?null:(0,$.jsx)(`h2`,{className:`font-medium text-base`,children:i}),a===void 0?null:(0,$.jsx)(`p`,{className:`mt-1 text-muted-foreground text-sm leading-relaxed`,children:a})]}),o===void 0?null:(0,$.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:o})]}),t[2]=o,t[3]=a,t[4]=i,t[5]=c):c=t[5];let l;t[6]===n?l=t[7]:(l=n===void 0?null:(0,$.jsx)(`div`,{className:`px-5 py-4`,children:n}),t[6]=n,t[7]=l);let u;return t[8]!==s||t[9]!==c||t[10]!==l?(u=(0,$.jsxs)(`section`,{className:s,children:[c,l]}),t[8]=s,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}function Wt(e){let t=(0,Q.c)(8),{className:n,size:r}=e,i=r===void 0?`default`:r,a=i===`lg`?`gap-2.5 text-lg`:`gap-2 text-sm`,o;t[0]!==n||t[1]!==a?(o=p(`inline-flex items-center font-semibold text-foreground`,a,n),t[0]=n,t[1]=a,t[2]=o):o=t[2];let s=i===`lg`?`h-6`:`h-4.5`,c;t[3]===s?c=t[4]:(c=(0,$.jsx)(Ye,{className:s}),t[3]=s,t[4]=c);let l;return t[5]!==o||t[6]!==c?(l=(0,$.jsxs)(`span`,{className:o,children:[c,Xe]}),t[5]=o,t[6]=c,t[7]=l):l=t[7],l}var Gt=`h-dvh overflow-x-hidden overflow-y-auto overscroll-contain text-foreground`,Kt=`px-4 sm:px-6 phone:px-[max(1rem,env(safe-area-inset-left),env(safe-area-inset-right))] phone:pt-[max(2.5rem,calc(env(safe-area-inset-top)+1rem))] phone:pb-[max(2.5rem,calc(env(safe-area-inset-bottom)+1rem))]`,qt=`flex min-h-full flex-col`,Jt={form:`max-w-[28rem]`,content:`max-w-3xl`,page:`max-w-5xl`};function Yt(e){let t=(0,Q.c)(13),{nav:n,trailing:r}=e,i,a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=p(`app-chrome-glass shrink-0 border-border/60 border-b`,`pt-[env(safe-area-inset-top)]`),a=p(`mx-auto flex h-14 w-full items-center gap-3 px-4 sm:px-6`,Jt.page),o=(0,$.jsx)(Wt,{}),t[0]=i,t[1]=a,t[2]=o):(i=t[0],a=t[1],o=t[2]);let s;t[3]===n?s=t[4]:(s=n===void 0?null:(0,$.jsx)(`nav`,{"aria-label":`Hub`,className:`min-w-0 flex-1`,children:n}),t[3]=n,t[4]=s);let c;t[5]===n?c=t[6]:(c=n===void 0?(0,$.jsx)(`div`,{className:`flex-1`}):null,t[5]=n,t[6]=c);let l;t[7]===r?l=t[8]:(l=r===void 0?null:(0,$.jsx)(`div`,{className:`flex shrink-0 items-center gap-1`,children:r}),t[7]=r,t[8]=l);let u;return t[9]!==s||t[10]!==c||t[11]!==l?(u=(0,$.jsx)(`header`,{className:i,children:(0,$.jsxs)(`div`,{className:a,children:[o,s,c,l]})}),t[9]=s,t[10]=c,t[11]=l,t[12]=u):u=t[12],u}function Xt(e){let t=(0,Q.c)(16),{children:n,nav:r,trailing:i,scrollRef:a,measure:o}=e,s=o===void 0?`page`:o,c=fe()===`phone`,l;t[0]!==c||t[1]!==r||t[2]!==i?(l=c?null:(0,$.jsx)(Yt,{nav:r,trailing:i}),t[0]=c,t[1]=r,t[2]=i,t[3]=l):l=t[3];let f=c?`min-h-full py-10`:`pt-8 pb-16`,m=Jt[s],h;t[4]!==f||t[5]!==m?(h=p(`mx-auto flex w-full flex-col`,f,Kt,m),t[4]=f,t[5]=m,t[6]=h):h=t[6];let g;t[7]!==n||t[8]!==h?(g=(0,$.jsx)(`section`,{className:h,children:n}),t[7]=n,t[8]=h,t[9]=g):g=t[9];let _;t[10]!==a||t[11]!==g?(_=(0,$.jsx)(`main`,{ref:a,className:`min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain`,children:g}),t[10]=a,t[11]=g,t[12]=_):_=t[12];let v;return t[13]!==l||t[14]!==_?(v=(0,$.jsx)(d,{children:(0,$.jsx)(u,{children:(0,$.jsxs)(`div`,{className:`hub-ambient flex h-dvh flex-col text-foreground`,children:[l,_]})})}),t[13]=l,t[14]=_,t[15]=v):v=t[15],v}var Zt=(0,Z.lazy)(()=>t(()=>import(`./AccountSettings-v6-r6gYl.js`).then(e=>({default:e.AccountSettingsPanel})),__vite__mapDeps([0]))),Qt=(0,Z.lazy)(()=>t(()=>import(`./AppearanceSettings-DRChsQnN.js`).then(e=>({default:e.AppearanceSettingsPanel})),__vite__mapDeps([0]))),$t=[{id:`overview`,label:`Overview`,icon:ue},{id:`security`,label:`Security`,icon:W},{id:`appearance`,label:`Appearance`,icon:ce}];function en(e){let t=(0,Q.c)(17),{section:n}=e,r=c(nn),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsxs)(l,{variant:`ghost`,onClick:tn,children:[(0,$.jsx)(z,{"aria-hidden":!0}),` Nodes`]}),t[0]=i):i=t[0];let a=n===`appearance`?`Browser appearance`:`Account`,o;t[1]!==r||t[2]!==n?(o=n===`appearance`?`Saved in this browser. Your other apps and devices keep their own appearance.`:r===null?void 0:`${r.displayName} · ${r.role.charAt(0).toUpperCase()}${r.role.slice(1)}`,t[1]=r,t[2]=n,t[3]=o):o=t[3];let s;t[4]===n?s=t[5]:(s=$t.map(e=>{let t=e.id===n;return(0,$.jsx)(`li`,{children:(0,$.jsxs)(l,{variant:t?`secondary`:`ghost`,"aria-current":t?`page`:void 0,className:`w-full justify-start`,onClick:()=>He({kind:`account`,section:e.id}),children:[(0,$.jsx)(e.icon,{"aria-hidden":!0}),e.label]})},e.id)}),t[4]=n,t[5]=s);let u;t[6]===s?u=t[7]:(u=(0,$.jsx)(`nav`,{"aria-label":`Account`,className:`shrink-0 sm:w-48`,children:(0,$.jsx)(`ul`,{className:`flex gap-1 overflow-x-auto sm:flex-col sm:overflow-visible`,children:s})}),t[6]=s,t[7]=u);let d;t[8]===n?d=t[9]:(d=(0,$.jsx)(`div`,{className:`min-w-0 flex-1`,children:n===`overview`?(0,$.jsx)(rn,{}):(0,$.jsx)(Z.Suspense,{fallback:(0,$.jsx)(be,{className:`h-64 w-full rounded-2xl`}),children:n===`security`?(0,$.jsx)(Zt,{}):(0,$.jsx)(Qt,{surface:`hub`})})}),t[8]=n,t[9]=d);let f;t[10]!==u||t[11]!==d?(f=(0,$.jsxs)(`div`,{className:`flex flex-col gap-6 sm:flex-row sm:gap-8`,children:[u,d]}),t[10]=u,t[11]=d,t[12]=f):f=t[12];let p;return t[13]!==a||t[14]!==o||t[15]!==f?(p=(0,$.jsx)(Xt,{measure:`page`,trailing:i,children:(0,$.jsx)(Ht,{title:a,description:o,children:f})}),t[13]=a,t[14]=o,t[15]=f,t[16]=p):p=t[16],p}function tn(){return He({kind:`nodes`})}function nn(e){return e.account}function rn(){let e=(0,Q.c)(11),t=c(an),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(`dt`,{className:`text-muted-foreground text-xs`,children:`Display name`}),e[0]=n):n=e[0];let r=t?.displayName??`—`,i;e[1]===r?i=e[2]:(i=(0,$.jsxs)(`div`,{children:[n,(0,$.jsx)(`dd`,{className:`mt-0.5 text-sm`,children:r})]}),e[1]=r,e[2]=i);let a;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(`dt`,{className:`text-muted-foreground text-xs`,children:`Role`}),e[3]=a):a=e[3];let o;e[4]===t?o=e[5]:(o=t===null?`—`:`${t.role.charAt(0).toUpperCase()}${t.role.slice(1)}`,e[4]=t,e[5]=o);let s;e[6]===o?s=e[7]:(s=(0,$.jsxs)(`div`,{children:[a,(0,$.jsx)(`dd`,{className:`mt-0.5 text-sm`,children:o})]}),e[6]=o,e[7]=s);let l;return e[8]!==i||e[9]!==s?(l=(0,$.jsx)(Ut,{title:`Your account`,description:`Identity this Hub knows you by.`,children:(0,$.jsxs)(`dl`,{className:`grid gap-x-6 gap-y-4 sm:grid-cols-2`,children:[i,s]})}),e[8]=i,e[9]=s,e[10]=l):l=e[10],l}function an(e){return e.account}function on(e){let t=(0,Q.c)(7),{links:n}=e,r;t[0]===n?r=t[1]:(r=n===void 0?[]:n,t[0]=n,t[1]=r);let i=r,a=typeof window>`u`?null:window.location.host,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=a===null?null:(0,$.jsxs)(`p`,{children:[`Signing in to `,(0,$.jsx)(`span`,{className:`font-medium text-foreground`,children:a})]}),t[2]=o):o=t[2];let s;t[3]===i?s=t[4]:(s=i.length===0?null:(0,$.jsx)(`ul`,{className:`flex flex-wrap items-center justify-center gap-x-4 gap-y-1`,children:i.map(sn)}),t[3]=i,t[4]=s);let c;return t[5]===s?c=t[6]:(c=(0,$.jsxs)(`footer`,{className:`mt-10 flex flex-col items-center gap-2 text-center text-muted-foreground text-xs`,children:[o,s]}),t[5]=s,t[6]=c),c}function sn(e){return(0,$.jsx)(`li`,{children:(0,$.jsx)(`a`,{className:`rounded-sm underline-offset-4 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring`,href:e.href,rel:`noreferrer`,target:`_blank`,children:e.label})},e.href)}function cn(e){let t=(0,Q.c)(25),{children:n,title:r,description:i,actions:a,trailing:o,scrollRef:s,titleRef:c,measure:l}=e,u=l===void 0?`form`:l,d,f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=p(Gt,`hub-ambient`),f=p(qt,Kt,`py-10`),t[0]=d,t[1]=f):(d=t[0],f=t[1]);let m=Jt[u],h;t[2]===m?h=t[3]:(h=p(`my-auto w-full self-center phone:my-0 phone:flex phone:max-w-none phone:flex-1 phone:flex-col`,m),t[2]=m,t[3]=h);let g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(`div`,{className:`mb-8 flex justify-center phone:mb-6 phone:justify-start`,children:(0,$.jsx)(Wt,{size:`lg`})}),t[4]=g):g=t[4];let _;t[5]!==r||t[6]!==c?(_=(0,$.jsx)(`h1`,{ref:c,tabIndex:-1,className:`font-semibold text-2xl tracking-tight outline-none`,children:r}),t[5]=r,t[6]=c,t[7]=_):_=t[7];let v;t[8]===i?v=t[9]:(v=i===void 0?null:(0,$.jsx)(`p`,{className:`mt-2 text-muted-foreground text-sm leading-relaxed`,children:i}),t[8]=i,t[9]=v);let y;t[10]===n?y=t[11]:(y=(0,$.jsx)(`div`,{className:`mt-6 phone:flex phone:flex-1 phone:flex-col`,children:n}),t[10]=n,t[11]=y);let b;t[12]!==a||t[13]!==_||t[14]!==v||t[15]!==y||t[16]!==o?(b=(0,$.jsxs)(`section`,{className:`hub-gateway-panel app-surface relative rounded-2xl border p-6 not-dark:bg-clip-padding shadow-lg/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-2xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] sm:p-8 phone:flex phone:flex-1 phone:flex-col phone:rounded-none phone:border-0 phone:p-0 phone:shadow-none phone:before:hidden dark:before:shadow-[0_-1px_--theme(--color-white/6%)]`,children:[_,v,y,a,o]}),t[12]=a,t[13]=_,t[14]=v,t[15]=y,t[16]=o,t[17]=b):b=t[17];let x;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(on,{}),t[18]=x):x=t[18];let S;t[19]!==b||t[20]!==h?(S=(0,$.jsx)(`div`,{className:f,children:(0,$.jsxs)(`div`,{className:h,children:[g,b,x]})}),t[19]=b,t[20]=h,t[21]=S):S=t[21];let C;return t[22]!==s||t[23]!==S?(C=(0,$.jsx)(`main`,{ref:s,className:d,children:S}),t[22]=s,t[23]=S,t[24]=C):C=t[24],C}function ln({onClose:e}){let[t,n]=(0,Z.useState)(``),[r,i]=(0,Z.useState)(null),[o,s]=(0,Z.useState)(`input`),[c,u]=(0,Z.useState)(!1),[d,f]=(0,Z.useState)(null),p=(0,Z.useRef)(``),m=(0,Z.useRef)(null);(0,Z.useEffect)(()=>()=>{m.current?.abort(),m.current=null,p.current=``},[]);let h=()=>{m.current?.abort();let e=new AbortController;return m.current=e,u(!0),f(null),e},g=e=>{m.current===e&&(m.current=null,u(!1))},v=async(e,t)=>{if(!(e instanceof DOMException&&e.name===`AbortError`)){if(e instanceof G&&e.status===401){p.current=``,n(``),i(null),await q.expireSession();return}f(t??(e instanceof G?e.message:`Hub is temporarily unavailable.`))}},y=async e=>{e.preventDefault();let r=t.trim();n(``),p.current=``;let o=h();try{let e=await a.lookupNodeEnrollment(r,o.signal);if(o.signal.aborted)return;p.current=r,i(e),s(`review`)}catch(e){await v(e)}finally{g(o)}},x=async()=>{let e=p.current;if(!e||!r)return;let t=h();try{if(await a.approveNodeEnrollment(e,t.signal),t.signal.aborted)return;p.current=``,i(null),s(`approved`),await q.refreshDirectory()}catch(e){p.current=``,i(null),s(`input`),await v(e,`The approval result is unknown. Enter the device code again to verify its current state.`)}finally{g(t)}},S=async()=>{let e=p.current;if(!e||!r)return;let t=h();try{if(await a.denyNodeEnrollment(e,t.signal),t.signal.aborted)return;p.current=``,i(null),s(`denied`)}catch(e){await v(e)}finally{g(t)}},C=()=>{m.current?.abort(),p.current=``,n(``),i(null),e()};return o===`approved`||o===`denied`?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(b,{"aria-hidden":!0,className:`size-8 text-primary`}),(0,$.jsx)(`h1`,{className:`mt-4 text-2xl font-semibold`,children:o===`approved`?`Node approved`:`Enrollment denied`}),(0,$.jsx)(`p`,{role:`status`,className:`mt-2 text-sm text-muted-foreground`,children:o===`approved`?`The node can now finish enrollment and connect. Online presence may take a few seconds.`:`This ceremony cannot be reused. Start a new enrollment on the node if needed.`}),(0,$.jsx)(l,{className:`mt-5`,onClick:C,children:`Back to nodes`})]}):r?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(A,{"aria-hidden":!0,className:`size-8 text-primary`}),(0,$.jsx)(`h1`,{className:`mt-4 text-2xl font-semibold`,children:`Review node enrollment`}),(0,$.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Compare every field, especially the fingerprint, with the node or a trusted operator channel before approving.`}),(0,$.jsxs)(qe,{className:`mt-5 rounded-xl border border-border bg-background p-4`,children:[(0,$.jsx)(X,{term:`Label`,children:(0,$.jsx)(`span`,{className:`font-medium break-words`,children:r.label})}),(0,$.jsx)(X,{term:`Platform`,children:`${r.platformOs} · ${r.platformArch}`}),(0,$.jsx)(X,{term:`Version`,mono:!0,children:r.clientVersion}),(0,$.jsx)(X,{term:`Algorithm`,children:r.algorithm}),(0,$.jsx)(X,{term:`Fingerprint`,mono:!0,children:r.fingerprint}),(0,$.jsx)(X,{term:`Expires`,children:new Date(r.expiresAt).toLocaleString()})]}),d?(0,$.jsx)(`p`,{role:`alert`,className:`mt-4 text-sm text-destructive`,children:d}):null,o===`confirm-denial`?(0,$.jsxs)(`div`,{className:`mt-4 rounded-lg border border-destructive/30 bg-destructive/5 p-3`,children:[(0,$.jsxs)(`p`,{className:`flex gap-2 text-sm`,children:[(0,$.jsx)(_,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0`}),` Denial is permanent for this device code.`]}),(0,$.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,$.jsx)(l,{variant:`destructive`,disabled:c,onClick:()=>void S(),children:`Confirm denial`}),(0,$.jsx)(l,{variant:`outline`,disabled:c,onClick:()=>s(`review`),children:`Keep reviewing`})]})]}):(0,$.jsxs)(`div`,{className:`mt-5 flex flex-wrap gap-2`,children:[(0,$.jsx)(l,{disabled:c,onClick:()=>void x(),children:c?`Approving…`:`Approve node`}),(0,$.jsx)(l,{variant:`outline`,disabled:c,onClick:()=>s(`confirm-denial`),children:`Deny`}),(0,$.jsx)(l,{variant:`ghost`,disabled:c,onClick:C,children:`Cancel`})]})]}):(0,$.jsxs)(`div`,{children:[(0,$.jsx)(A,{"aria-hidden":!0,className:`size-8 text-primary`}),(0,$.jsx)(`h1`,{className:`mt-4 text-2xl font-semibold`,children:`Enroll a Ryco node`}),(0,$.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Start enrollment on the node, then enter the short device code shown there. Codes expire after ten minutes.`}),d?(0,$.jsx)(`p`,{role:`alert`,className:`mt-4 text-sm text-destructive`,children:d}):null,(0,$.jsxs)(`form`,{className:`mt-5 space-y-4`,autoComplete:`off`,onSubmit:e=>void y(e),children:[(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-node-device-code`,children:`Device code`}),(0,$.jsx)(Y,{id:`hub-node-device-code`,required:!0,autoFocus:!0,maxLength:16,value:t,className:`font-mono uppercase ${J}`,onChange:e=>n(e.currentTarget.value)})]}),(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,$.jsx)(l,{type:`submit`,disabled:c,children:c?`Looking up…`:`Review node`}),(0,$.jsx)(l,{type:`button`,variant:`outline`,onClick:C,children:`Cancel`})]})]})]})}function un(e){let t=(0,Q.c)(14),{step:n,total:r,label:i}=e,a=Math.min(Math.max(n,1),r),o;t[0]===i?o=t[1]:(o=i===void 0?null:(0,$.jsxs)(`span`,{className:`sr-only`,children:[`: `,i]}),t[0]=i,t[1]=o);let s;t[2]!==a||t[3]!==o||t[4]!==r?(s=(0,$.jsxs)(`p`,{className:`font-medium text-muted-foreground text-xs`,children:[`Step `,a,` of `,r,o]}),t[2]=a,t[3]=o,t[4]=r,t[5]=s):s=t[5];let c;if(t[6]!==a||t[7]!==r){let e;t[9]===a?e=t[10]:(e=(e,t)=>(0,$.jsx)(`span`,{className:`h-1 flex-1 rounded-full transition-colors ${t<a?`bg-primary`:`bg-border`}`},t),t[9]=a,t[10]=e),c=(0,$.jsx)(`div`,{"aria-hidden":!0,className:`flex flex-1 items-center gap-1.5`,children:Array.from({length:r},e)}),t[6]=a,t[7]=r,t[8]=c}else c=t[8];let l;return t[11]!==s||t[12]!==c?(l=(0,$.jsxs)(`div`,{className:`mb-6 flex items-center gap-3`,children:[s,c]}),t[11]=s,t[12]=c,t[13]=l):l=t[13],l}var dn=`https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit`,fn=null;function pn(){return window.turnstile?Promise.resolve(window.turnstile):fn||(fn=new Promise((e,t)=>{let n=document.querySelector(`script[src="${dn}"]`),r=n??document.createElement(`script`);r.addEventListener(`load`,()=>{window.turnstile?e(window.turnstile):t(Error(`Turnstile did not initialize`))},{once:!0}),r.addEventListener(`error`,()=>t(Error(`Turnstile could not be loaded`)),{once:!0}),n||(r.src=dn,r.async=!0,r.defer=!0,document.head.append(r))}).catch(e=>{throw fn=null,e}),fn)}function mn(e){let t=(0,Q.c)(10),{siteKey:n,action:r,onToken:i}=e,a=(0,Z.useRef)(null),[o,s]=(0,Z.useState)(!1),c,l;t[0]!==r||t[1]!==i||t[2]!==n?(c=()=>{let e=!1,t=null;return i(null),s(!1),pn().then(o=>{e||a.current===null||(t={api:o,id:o.render(a.current,{sitekey:n,action:r,theme:document.documentElement.classList.contains(`dark`)?`dark`:`light`,callback:t=>{e||i(t)},"expired-callback":()=>{e||i(null)},"error-callback":()=>{e||(i(null),s(!0))}})})}).catch(()=>{e||s(!0)}),()=>{e=!0,i(null),t&&t.api.remove(t.id)}},l=[r,i,n],t[0]=r,t[1]=i,t[2]=n,t[3]=c,t[4]=l):(c=t[3],l=t[4]),(0,Z.useEffect)(c,l);let u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(`div`,{ref:a,"aria-label":`Anti-bot verification`,className:`min-h-[65px]`}),t[5]=u):u=t[5];let d;t[6]===o?d=t[7]:(d=o?(0,$.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:`Verification could not load. Check your connection and try again.`}):null,t[6]=o,t[7]=d);let f;return t[8]===d?f=t[9]:(f=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[u,d]}),t[8]=d,t[9]=f),f}function hn(e,t){return e instanceof G?e.message:t}function gn(){let e=new Uint8Array(32);return crypto.getRandomValues(e),K(e)}function _n(){let e=(0,Q.c)(5),[t,n]=(0,Z.useState)(null),[r,i]=(0,Z.useState)(!0),o,s;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{let e=new AbortController;return a.getPublicSignupConfiguration(e.signal).then(n).catch(()=>n({status:`disabled`})).finally(()=>{e.signal.aborted||i(!1)}),()=>e.abort()},s=[],e[0]=o,e[1]=s):(o=e[0],s=e[1]),(0,Z.useEffect)(o,s);let c;return e[2]!==t||e[3]!==r?(c={config:t,loading:r},e[2]=t,e[3]=r,e[4]=c):c=e[4],c}function vn(e){return e!==null&&`activationSecret`in e}function yn({config:e,initialLink:t,onConsumeLink:n,onCancel:r}){let[i,o]=(0,Z.useState)(t?.kind===`signup-verification`||t?.kind===`invalid-signup-verification`?`verifying`:`details`),[s,c]=(0,Z.useState)(``),[u,d]=(0,Z.useState)(``),[f,p]=(0,Z.useState)(``),[m,h]=(0,Z.useState)(``),[g,_]=(0,Z.useState)(``),[v,b]=(0,Z.useState)(null),[x,S]=(0,Z.useState)(!1),[C,w]=(0,Z.useState)(null),T=(0,Z.useRef)(null),E=(0,Z.useRef)(!1);(0,Z.useEffect)(()=>{if(E.current||t===null)return;if(E.current=!0,t.kind!==`signup-verification`){t.kind===`invalid-signup-verification`&&(w(`This verification link is incomplete or expired. Start signup again.`),o(`details`));return}let e=new AbortController;return S(!0),a.verifyPublicSignup({attemptId:t.attemptId,attemptSecret:t.attemptSecret,proof:{kind:`link_token`,token:t.token}},e.signal).then(e=>{T.current=e,o(`credential`)}).catch(e=>w(hn(e,`This verification link could not be confirmed.`))).finally(()=>{n(),e.signal.aborted||S(!1)}),()=>e.abort()},[t,n]);let D=async t=>{if(t.preventDefault(),x||e===null)return;let n=e.antiBot.provider===`bypass`?`development`:v??``;if(!n){w(`Complete the anti-bot check before continuing.`);return}S(!0),w(null);try{let e=await a.startPublicSignup({username:s.trim().toLowerCase(),email:u.trim().toLowerCase(),antiBotAssertion:n});T.current=e,o(`check-email`)}catch(e){w(hn(e,`Account creation is temporarily unavailable.`))}finally{S(!1)}},O=async e=>{e.preventDefault();let t=T.current;if(!x&&t!==null&&`attemptSecret`in t){S(!0),w(null);try{let e=await a.verifyPublicSignup({attemptId:t.attemptId,attemptSecret:t.attemptSecret,proof:{kind:`email_code`,code:f.trim()}});p(``),T.current=e,o(`credential`)}catch(e){w(hn(e,`That email code could not be verified.`))}finally{S(!1)}}},A=async e=>{let t=T.current;if(x||!vn(t))return;if(e===`password`&&m!==g){w(`The passwords do not match.`);return}S(!0),w(null);let n=m;h(``),_(``);try{let r=e===`passkey`?await a.finishPublicSignupWithPasskey({attemptId:t.attemptId,activationSecret:t.activationSecret,idempotencyKey:gn()}):await a.finishPublicSignupWithPassword({attemptId:t.attemptId,activationSecret:t.activationSecret,password:n,idempotencyKey:gn()});T.current=null,await q.adoptPublicBrowserIdentity(r.identity,r.recoveryCodes)}catch(e){w(hn(e,`Account creation did not complete.`))}finally{S(!1)}},j=i===`details`?1:i===`check-email`||i===`verifying`?2:3;return(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col`,children:[(0,$.jsx)(un,{step:j,total:3,label:j===1?`Your details`:j===2?`Verify your email`:`Choose how you sign in`}),i===`details`?(0,$.jsxs)(`form`,{className:`space-y-4`,onSubmit:e=>void D(e),children:[(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-signup-username`,children:`Username`}),(0,$.jsx)(Y,{id:`hub-signup-username`,autoCapitalize:`none`,autoComplete:`username`,maxLength:32,pattern:`[A-Za-z0-9_]+`,required:!0,value:s,className:J,onChange:e=>c(e.currentTarget.value.toLowerCase())}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Lowercase letters, numbers, and underscores.`})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-signup-email`,children:`Email`}),(0,$.jsx)(Y,{id:`hub-signup-email`,type:`email`,autoCapitalize:`none`,autoComplete:`email`,maxLength:254,required:!0,value:u,className:J,onChange:e=>d(e.currentTarget.value)})]}),e?.antiBot.provider===`turnstile`?(0,$.jsx)(mn,{siteKey:e.antiBot.siteKey,action:`public_signup`,onToken:b}):null,(0,$.jsx)(wn,{value:C}),(0,$.jsx)(Tn,{onCancel:r,pending:x,submitLabel:`Send verification email`,submitDisabled:e===null})]}):i===`check-email`?(0,$.jsxs)(`form`,{className:`space-y-4`,onSubmit:e=>void O(e),children:[(0,$.jsxs)(`div`,{className:`rounded-xl border border-border bg-background/60 p-4`,children:[(0,$.jsx)(nt,{"aria-hidden":!0,className:`size-5 text-primary`}),(0,$.jsx)(`p`,{className:`mt-2 text-sm font-medium`,children:`Check your email`}),(0,$.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Enter the six-digit code, or open the verification link on this device.`})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-signup-code`,children:`Verification code`}),(0,$.jsx)(Y,{id:`hub-signup-code`,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:6,pattern:`[0-9]{6}`,required:!0,value:f,className:J,onChange:e=>p(e.currentTarget.value)})]}),(0,$.jsx)(wn,{value:C}),(0,$.jsx)(Tn,{onCancel:r,pending:x,submitLabel:`Verify email`})]}):i===`password`?(0,$.jsxs)(`form`,{className:`space-y-4`,onSubmit:e=>{e.preventDefault(),A(`password`)},children:[(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-signup-password`,children:`Password`}),(0,$.jsx)(Y,{id:`hub-signup-password`,type:`password`,autoComplete:`new-password`,minLength:12,maxLength:256,required:!0,value:m,className:J,onChange:e=>h(e.currentTarget.value)})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-signup-password-confirmation`,children:`Repeat password`}),(0,$.jsx)(Y,{id:`hub-signup-password-confirmation`,type:`password`,autoComplete:`new-password`,minLength:12,maxLength:256,required:!0,value:g,className:J,onChange:e=>_(e.currentTarget.value)})]}),(0,$.jsxs)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:[`At least `,12,` characters. Password sign-in always asks for an email or authenticator code too.`]}),(0,$.jsx)(wn,{value:C}),(0,$.jsx)(Tn,{onCancel:()=>o(`credential`),pending:x,submitLabel:`Create account`})]}):(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(`div`,{className:`rounded-xl border border-border bg-background/60 p-4`,children:[(0,$.jsx)(W,{"aria-hidden":!0,className:`size-5 text-primary`}),(0,$.jsx)(`p`,{className:`mt-2 text-sm font-medium`,children:i===`verifying`?`Verifying your email…`:`Choose how you sign in`}),(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-muted-foreground`,children:`A passkey is the strongest and easiest option. A password always requires a second factor on future sign-ins.`})]}),(0,$.jsx)(wn,{value:C}),(0,$.jsxs)(`div`,{className:`space-y-3 phone:mt-auto ${Qe}`,children:[(0,$.jsxs)(l,{type:`button`,size:`lg`,className:`min-h-11 w-full`,disabled:x||i===`verifying`,onClick:()=>void A(`passkey`),children:[x?(0,$.jsx)(y,{"aria-hidden":!0,className:`animate-spin`}):(0,$.jsx)(oe,{"aria-hidden":!0}),x?`Creating passkey…`:`Create a passkey`]}),(0,$.jsx)(l,{type:`button`,variant:`outline`,className:`min-h-11 w-full`,disabled:x||i===`verifying`,onClick:()=>o(`password`),children:`Use a password instead`}),(0,$.jsx)(l,{type:`button`,variant:`ghost`,className:`min-h-11 w-full`,onClick:r,children:`Cancel`})]})]})]})}function bn({pendingSignup:e,config:t,onCancel:n}){let[r,i]=(0,Z.useState)(e.suggestedUsername??``),[o,s]=(0,Z.useState)(null),[c,l]=(0,Z.useState)(!1),[u,d]=(0,Z.useState)(null),f=async e=>{if(e.preventDefault(),c||t===null)return;let n=t.antiBot.provider===`bypass`?`development`:o??``;if(!n){d(`Complete the anti-bot check before continuing.`);return}l(!0),d(null);try{let e=await a.finishExternalIdentitySignup({provider:`github`,username:r.trim().toLowerCase(),antiBotAssertion:n,idempotencyKey:gn()});await q.adoptPublicBrowserIdentity(e.identity,e.recoveryCodes)}catch(e){d(hn(e,`GitHub signup did not complete.`))}finally{l(!1)}};return(0,$.jsxs)(`form`,{className:`flex flex-1 flex-col space-y-4`,onSubmit:e=>void f(e),children:[(0,$.jsx)(un,{step:1,total:1,label:`Confirm your Ryco username`}),(0,$.jsxs)(`div`,{className:`rounded-xl border border-border bg-background/60 p-4`,children:[(0,$.jsx)(W,{"aria-hidden":!0,className:`size-5 text-primary`}),(0,$.jsx)(`p`,{className:`mt-2 text-sm font-medium`,children:`GitHub verified`}),(0,$.jsxs)(`p`,{className:`mt-1 text-sm leading-relaxed text-muted-foreground`,children:[e.displayName?`${e.displayName} authorized Ryco through GitHub. `:`GitHub authorized this account. `,`Choose the public username Ryco should use. Nothing is created until you confirm.`]})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-external-signup-username`,children:`Username`}),(0,$.jsx)(Y,{id:`hub-external-signup-username`,autoCapitalize:`none`,autoComplete:`username`,maxLength:32,pattern:`[A-Za-z0-9_]+`,required:!0,value:r,className:J,onChange:e=>i(e.currentTarget.value.toLowerCase())}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`GitHub suggested this name. You can change it before creating the account.`})]}),t?.antiBot.provider===`turnstile`?(0,$.jsx)(mn,{siteKey:t.antiBot.siteKey,action:`external_signup`,onToken:s}):null,(0,$.jsx)(wn,{value:u}),(0,$.jsx)(Tn,{onCancel:n,pending:c,submitLabel:`Create account with GitHub`,submitDisabled:t===null})]})}function xn({onCancel:e,onUseRecoveryCode:t,onResetPassword:n}){let[r,i]=(0,Z.useState)(``),[o,s]=(0,Z.useState)(``),[c,u]=(0,Z.useState)(``),[d,f]=(0,Z.useState)(null),[p,m]=(0,Z.useState)(!1),[h,g]=(0,Z.useState)(null),_=async e=>{if(e.preventDefault(),!p){m(!0),g(null);try{if(d===null){let e=await a.startPasswordLogin({identifier:r.trim().toLowerCase(),password:o});s(``),f(e)}else{let e=await a.finishPasswordLogin({attemptId:d.attemptId,attemptSecret:d.attemptSecret,factor:d.factor,code:c.trim()});u(``),await q.adoptPublicBrowserIdentity(e)}}catch(e){g(hn(e,`Password sign-in did not complete.`))}finally{m(!1)}}};return(0,$.jsxs)(`form`,{className:`mt-6 flex flex-1 flex-col space-y-4`,onSubmit:e=>void _(e),children:[d===null?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-login-identifier`,children:`Username or verified email`}),(0,$.jsx)(Y,{id:`hub-login-identifier`,autoCapitalize:`none`,autoComplete:`username`,required:!0,value:r,className:J,onChange:e=>i(e.currentTarget.value)})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-login-password`,children:`Password`}),(0,$.jsx)(Y,{id:`hub-login-password`,type:`password`,autoComplete:`current-password`,required:!0,maxLength:256,value:o,className:J,onChange:e=>s(e.currentTarget.value)})]})]}):(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-login-second-factor`,children:d.factor===`totp`?`Authenticator code`:`Email code`}),(0,$.jsx)(Y,{id:`hub-login-second-factor`,inputMode:`numeric`,autoComplete:`one-time-code`,pattern:`[0-9]{6}`,maxLength:6,required:!0,value:c,className:J,onChange:e=>u(e.currentTarget.value)}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:d.factor===`totp`?`Enter the current code from your authenticator app.`:`We sent a six-digit code to your verified email address.`})]}),(0,$.jsx)(wn,{value:h}),d===null?(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,$.jsx)(l,{type:`button`,variant:`ghost`,size:`sm`,onClick:t,children:`Use recovery code`}),(0,$.jsx)(l,{type:`button`,variant:`ghost`,size:`sm`,onClick:n,children:`Forgot password?`})]}):null,(0,$.jsx)(Tn,{onCancel:d===null?e:()=>f(null),pending:p,submitLabel:d===null?`Continue`:`Sign in`})]})}function Sn({initialLink:e,onConsumeLink:t,onCancel:n}){let[r,i]=(0,Z.useState)(e?.kind===`password-reset`||e?.kind===`invalid-password-reset`?`verifying`:`request`),[o,s]=(0,Z.useState)(``),[c,u]=(0,Z.useState)(``),[d,f]=(0,Z.useState)(``),[p,m]=(0,Z.useState)(``),[h,g]=(0,Z.useState)(``),[_,v]=(0,Z.useState)(!1),[y,b]=(0,Z.useState)(null),x=(0,Z.useRef)(null),S=(0,Z.useRef)(!1),C=async(e,t)=>{let n=await a.verifyPasswordReset({token:e},t);x.current=n,u(``),i(`password`)};(0,Z.useEffect)(()=>{if(S.current||e===null)return;if(S.current=!0,e.kind!==`password-reset`){e.kind===`invalid-password-reset`&&(b(`This reset link is incomplete or expired. Request a new one.`),i(`request`));return}let n=new AbortController;return v(!0),C(e.token,n.signal).catch(e=>b(hn(e,`This reset link could not be verified.`))).finally(()=>{t(),n.signal.aborted||v(!1)}),()=>n.abort()},[e,t]);let w=async e=>{if(e.preventDefault(),!_){v(!0),b(null);try{if(r===`request`)await a.requestPasswordReset({identifier:o.trim().toLowerCase()}),i(`check-email`);else if(r===`check-email`)await C(c.trim());else if(r===`password`){let e=x.current;if(e===null)return;if(d!==p){b(`The passwords do not match.`);return}let t=d;f(``),m(``),await a.finishPasswordReset({attemptId:e.attemptId,attemptSecret:e.attemptSecret,password:t,factor:e.requiresTotp?{kind:`totp`,code:h.trim()}:{kind:`none`}}),g(``),x.current=null,i(`complete`)}}catch(e){b(hn(e,`Password reset did not complete.`))}finally{v(!1)}}},T=r===`request`?1:r===`check-email`||r===`verifying`?2:3;return(0,$.jsxs)(`form`,{className:`flex flex-1 flex-col space-y-4`,onSubmit:e=>void w(e),children:[r===`complete`?null:(0,$.jsx)(un,{step:T,total:3,label:T===1?`Find your account`:T===2?`Check your email`:`Set a new password`}),r===`request`?(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-reset-identifier`,children:`Username or verified email`}),(0,$.jsx)(Y,{id:`hub-reset-identifier`,autoCapitalize:`none`,autoComplete:`username`,required:!0,value:o,className:J,onChange:e=>s(e.currentTarget.value)}),(0,$.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:`If the account is eligible, its verified address receives a single-use reset link.`})]}):r===`check-email`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`rounded-xl border border-border bg-background/60 p-4`,children:[(0,$.jsx)(nt,{"aria-hidden":!0,className:`size-5 text-primary`}),(0,$.jsx)(`p`,{className:`mt-2 text-sm font-medium`,children:`Check your email`}),(0,$.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Open the reset link, or paste its token below.`})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-reset-token`,children:`Reset token`}),(0,$.jsx)(Y,{id:`hub-reset-token`,type:`password`,autoComplete:`one-time-code`,maxLength:64,required:!0,value:c,className:J,onChange:e=>u(e.currentTarget.value)})]})]}):r===`password`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-reset-password`,children:`New password`}),(0,$.jsx)(Y,{id:`hub-reset-password`,type:`password`,autoComplete:`new-password`,minLength:12,maxLength:256,required:!0,value:d,className:J,onChange:e=>f(e.currentTarget.value)})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-reset-password-confirmation`,children:`Repeat password`}),(0,$.jsx)(Y,{id:`hub-reset-password-confirmation`,type:`password`,autoComplete:`new-password`,minLength:12,maxLength:256,required:!0,value:p,className:J,onChange:e=>m(e.currentTarget.value)})]}),x.current?.requiresTotp?(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-reset-totp`,children:`Authenticator code`}),(0,$.jsx)(Y,{id:`hub-reset-totp`,inputMode:`numeric`,autoComplete:`one-time-code`,pattern:`[0-9]{6}`,maxLength:6,required:!0,value:h,className:J,onChange:e=>g(e.currentTarget.value)})]}):null]}):r===`complete`?(0,$.jsxs)(`div`,{className:`rounded-xl border border-border bg-background/60 p-4`,children:[(0,$.jsx)(W,{"aria-hidden":!0,className:`size-5 text-primary`}),(0,$.jsx)(`p`,{className:`mt-2 text-sm font-medium`,children:`Password changed`}),(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-muted-foreground`,children:`Every previous session was revoked. Sign in again with the new password and its normal second factor.`})]}):(0,$.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:`Verifying your reset link…`}),(0,$.jsx)(wn,{value:y}),r===`complete`?(0,$.jsx)(`div`,{className:`phone:mt-auto ${Qe}`,children:(0,$.jsx)(l,{type:`button`,className:`min-h-11 w-full`,onClick:n,children:`Back to sign in`})}):(0,$.jsx)(Tn,{onCancel:n,pending:_,submitLabel:r===`request`?`Send reset email`:r===`check-email`?`Verify reset token`:r===`password`?`Change password`:`Verifying…`,submitDisabled:r===`verifying`})]})}function Cn({onCancel:e}){let[t,n]=(0,Z.useState)(``),[r,i]=(0,Z.useState)(!1),[o,s]=(0,Z.useState)(null),c=async e=>{if(e.preventDefault(),r)return;i(!0),s(null);let o=t;n(``);try{await a.signInWithRecoveryCode(o),await q.bootstrap()}catch(e){s(hn(e,`That recovery code could not be used.`))}finally{i(!1)}};return(0,$.jsxs)(`form`,{className:`mt-6 flex flex-1 flex-col space-y-4`,onSubmit:e=>void c(e),children:[(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(k,{htmlFor:`hub-login-recovery-code`,children:`Recovery code`}),(0,$.jsx)(Y,{id:`hub-login-recovery-code`,type:`password`,autoComplete:`one-time-code`,required:!0,maxLength:128,value:t,className:J,onChange:e=>n(e.currentTarget.value)})]}),(0,$.jsx)(wn,{value:o}),(0,$.jsx)(Tn,{onCancel:e,pending:r,submitLabel:`Use recovery code`})]})}function wn(e){let t=(0,Q.c)(2),{value:n}=e,r;return t[0]===n?r=t[1]:(r=n?(0,$.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:n}):null,t[0]=n,t[1]=r),r}function Tn(e){let t=(0,Q.c)(12),{onCancel:n,pending:r,submitLabel:i,submitDisabled:a}=e,o=r||a!==void 0&&a,s;t[0]===r?s=t[1]:(s=r?(0,$.jsx)(y,{"aria-hidden":!0,className:`animate-spin motion-reduce:animate-none`}):null,t[0]=r,t[1]=s);let c=r?`Working…`:i,u;t[2]!==o||t[3]!==s||t[4]!==c?(u=(0,$.jsxs)(l,{type:`submit`,size:`lg`,className:`min-h-11 w-full`,disabled:o,children:[s,c]}),t[2]=o,t[3]=s,t[4]=c,t[5]=u):u=t[5];let d;t[6]!==n||t[7]!==r?(d=(0,$.jsx)(l,{type:`button`,variant:`ghost`,className:`min-h-11 w-full`,disabled:r,onClick:n,children:`Back`}),t[6]=n,t[7]=r,t[8]=d):d=t[8];let f;return t[9]!==u||t[10]!==d?(f=(0,$.jsxs)(`div`,{className:`space-y-3 phone:mt-auto ${Qe}`,children:[u,d]}),t[9]=u,t[10]=d,t[11]=f):f=t[11],f}var En;function Dn(){if(window.location.pathname!==`/email-verification`)return null;if(En!==void 0)return En;let e=ot({href:window.location.href,historyState:window.history.state,replaceState:(e,t,n)=>window.history.replaceState(e,t,n)});return En=e?.kind===`email-verification`||e?.kind===`invalid-email-verification`?e:null,En}function On(){let e=(0,Q.c)(3),t=We(),n,r;e[0]===t?(n=e[1],r=e[2]):(n=()=>{document.title=Ze(t===null?void 0:Ge(t))},r=[t],e[0]=t,e[1]=n,e[2]=r),(0,Z.useEffect)(n,r)}function kn(){let e=(0,Q.c)(30),[t,n]=(0,Z.useState)(Dn),a=c(Ln),s=c(In),l=c(Fn),u=c(Pn),d=c(Nn),f=c(Mn),p=i(jn),m=ee(),h;e[0]===m.logicalPathname?h=e[1]:(h=V(m.logicalPathname),e[0]=m.logicalPathname,e[1]=h);let g=h,_;e[2]===g?_=e[3]:(_=e=>o(e,g),e[2]=g,e[3]=_);let v=r(_),y=ie();H();let b;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(b=[],e[4]=b):b=e[4],(0,Z.useEffect)(An,b),st(),On();let x=We(),S;e[5]!==a||e[6]!==x?.kind?(S=()=>{a===`authenticated`&&x?.kind===`sign-up`&&Ve(`/`,{replace:!0})},e[5]=a,e[6]=x?.kind,e[7]=S):S=e[7];let C;if(e[8]!==a||e[9]!==x?(C=[a,x],e[8]=a,e[9]=x,e[10]=C):C=e[10],(0,Z.useEffect)(S,C),t?.kind===`email-verification`||t?.kind===`invalid-email-verification`){let r;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{window.history.replaceState(window.history.state,``,`/`),n(null)},e[11]=r):r=e[11];let i;return e[12]===t?i=e[13]:(i=(0,$.jsx)(Rn,{link:t,onContinue:r}),e[12]=t,e[13]=i),i}if(a!==`authenticated`){let t;return e[14]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Jn,{}),e[14]=t):t=e[14],t}if(l.length>0&&!p){let t;return e[15]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Zn,{}),e[15]=t):t=e[15],t}if(x?.kind===`account`){let t;return e[16]===x.section?t=e[17]:(t=(0,$.jsx)(en,{section:x.section}),e[16]=x.section,e[17]=t),t}if(x?.kind===`nodes`||x?.kind===`nodes-enroll`){let t;return e[18]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(nr,{}),e[18]=t):t=e[18],t}if(m.nodeId===null){if(y||m.malformed){let t;return e[19]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(nr,{}),e[19]=t):t=e[19],t}if(s&&d){let t;return e[20]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(R,{authGateState:{status:`hosted-hub`}}),e[20]=t):t=e[20],t}let t;return e[21]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(R,{authGateState:{status:`hosted-cached`}}),e[21]=t):t=e[21],t}if(!s||s.id!==m.nodeId){let t;return e[22]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Wn,{}),e[22]=t):t=e[22],t}if(u===`terminal-failure`){let t;return e[23]!==f||e[24]!==s?(t=(0,$.jsx)(Vn,{node:s,message:f}),e[23]=f,e[24]=s,e[25]=t):t=e[25],t}if(!d){if(v){let t;return e[26]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(R,{authGateState:{status:`hosted-cached`}}),e[26]=t):t=e[26],t}let t;return e[27]===s?t=e[28]:(t=(0,$.jsx)(Gn,{node:s}),e[27]=s,e[28]=t),t}let w;return e[29]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(R,{authGateState:{status:`hosted-hub`}}),e[29]=w):w=e[29],w}function An(){return I()}function jn(e){return e.leased}function Mn(e){return e.errorMessage}function Nn(e){return e.sessionEstablished}function Pn(e){return e.transportStatus}function Fn(e){return e.recoveryCodes}function In(e){return e.selectedNode}function Ln(e){return e.accountStatus}function Rn(e){let t=(0,Q.c)(15),{link:n,onContinue:r}=e,[i,o]=(0,Z.useState)(n.kind===`email-verification`?`verifying`:`invalid`),s;t[0]!==n.kind||t[1]!==n.token?(s=()=>{if(n.kind!==`email-verification`)return;let e=new AbortController;return a.confirmEmailVerification(n.token,e.signal).then(()=>o(`verified`)).catch(()=>{e.signal.aborted||o(`invalid`)}).finally(zn),()=>e.abort()},t[0]=n.kind,t[1]=n.token,t[2]=s):s=t[2];let c;t[3]===n?c=t[4]:(c=[n],t[3]=n,t[4]=c),(0,Z.useEffect)(s,c);let u=i===`verifying`?`Verifying your email`:i===`verified`?`Email verified`:`This verification link is unavailable`,d=i===`verifying`?`This will only take a moment.`:i===`verified`?`Your address is now available for account recovery.`:`The link is incomplete, expired, or has already been used. Request a new one from Account settings.`,f;t[5]!==r||t[6]!==i?(f=i===`verifying`?void 0:(0,$.jsx)(l,{size:`cta`,className:`mt-6 w-full`,onClick:r,children:`Continue`}),t[5]=r,t[6]=i,t[7]=f):f=t[7];let p;t[8]===i?p=t[9]:(p=i===`verifying`?(0,$.jsxs)(`p`,{role:`status`,"aria-live":`polite`,className:`text-muted-foreground text-sm`,children:[(0,$.jsx)(Bn,{}),`Confirming the link…`]}):null,t[8]=i,t[9]=p);let m;return t[10]!==u||t[11]!==d||t[12]!==f||t[13]!==p?(m=(0,$.jsx)(cn,{title:u,description:d,actions:f,children:p}),t[10]=u,t[11]=d,t[12]=f,t[13]=p,t[14]=m):m=t[14],m}function zn(){En=void 0}function Bn(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(y,{"aria-hidden":!0,className:`mr-2 inline size-4 animate-spin align-[-0.15em] motion-reduce:animate-none`}),e[0]=t):t=e[0],t}function Vn(e){let t=(0,Q.c)(10),{node:n,message:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(re,{}),t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(_,{"aria-hidden":!0,className:`size-8 text-destructive`}),t[1]=a):a=t[1];let o=`Unable to connect to ${n.label}`,s=r??`The relay session could not be established. Choose another node or retry.`,c;t[2]===s?c=t[3]:(c=(0,$.jsx)(`p`,{role:`alert`,className:`text-muted-foreground text-sm`,children:s}),t[2]=s,t[3]=c);let u;t[4]===r?u=t[5]:(u=r===`Ryco state could not be synchronized.`?(0,$.jsxs)(l,{className:`mt-5`,onClick:Hn,children:[(0,$.jsx)(le,{"aria-hidden":!0}),` Retry`]}):null,t[4]=r,t[5]=u);let d;return t[6]!==o||t[7]!==c||t[8]!==u?(d=(0,$.jsx)(Xt,{measure:`content`,trailing:i,children:(0,$.jsxs)(Un,{tone:`destructive`,icon:a,title:o,children:[c,u]})}),t[6]=o,t[7]=c,t[8]=u,t[9]=d):d=t[9],d}function Hn(){q.retrySelectedNode()}function Un(e){let t=(0,Q.c)(9),{children:n,icon:r,title:i,tone:a}=e,o=`mt-4 font-semibold text-2xl tracking-tight ${(a===void 0?`default`:a)===`destructive`?`text-foreground`:``}`,s;t[0]!==o||t[1]!==i?(s=(0,$.jsx)(`h1`,{className:o,children:i}),t[0]=o,t[1]=i,t[2]=s):s=t[2];let c;t[3]===n?c=t[4]:(c=(0,$.jsx)(`div`,{className:`mt-2`,children:n}),t[3]=n,t[4]=c);let l;return t[5]!==r||t[6]!==s||t[7]!==c?(l=(0,$.jsxs)(`div`,{className:`mx-auto flex max-w-lg flex-col items-center pt-10 text-center`,children:[r,s,c]}),t[5]=r,t[6]=s,t[7]=c,t[8]=l):l=t[8],l}function Wn(){let e=(0,Q.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(A,{"aria-hidden":!0,className:`size-8 text-primary`}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(Xt,{measure:`content`,children:(0,$.jsx)(Un,{icon:t,title:`Restoring your node`,children:(0,$.jsxs)(`p`,{role:`status`,"aria-live":`polite`,className:`text-muted-foreground text-sm`,children:[(0,$.jsx)(Bn,{}),`Checking your access before reconnecting…`]})})}),e[1]=n):n=e[1],n}function Gn(e){let t=(0,Q.c)(7),{node:n}=e,{returnToAllNodes:r}=B(),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(A,{"aria-hidden":!0,className:`size-8 text-primary`}),t[0]=i):i=t[0];let a=`Connecting to ${n.label}`,o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsxs)(`p`,{role:`status`,"aria-live":`polite`,className:`text-muted-foreground text-sm`,children:[(0,$.jsx)(Bn,{}),`Preparing a private relay session and synchronizing Ryco state…`]}),t[1]=o):o=t[1];let s;t[2]===r?s=t[3]:(s=(0,$.jsx)(l,{variant:`outline`,className:`mt-5 phone:min-h-11`,onClick:()=>void r(),children:`Back to nodes`}),t[2]=r,t[3]=s);let c;return t[4]!==a||t[5]!==s?(c=(0,$.jsx)(Xt,{measure:`content`,children:(0,$.jsxs)(Un,{icon:i,title:a,children:[o,s]})}),t[4]=a,t[5]=s,t[6]=c):c=t[6],c}function Kn(e){let t=(0,Q.c)(15),{bootstrapAvailable:n,publicSignupEnabled:r}=e,[i,a]=(0,Z.useState)(!1),o=(0,Z.useId)(),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>a(qn),t[0]=s):s=t[0];let c=`transition-transform ${i?`rotate-180`:``}`,u;t[1]===c?u=t[2]:(u=(0,$.jsx)(v,{"aria-hidden":!0,className:c}),t[1]=c,t[2]=u);let d;t[3]!==i||t[4]!==o||t[5]!==u?(d=(0,$.jsxs)(l,{variant:`ghost`,size:`sm`,"aria-expanded":i,"aria-controls":o,className:`-mx-2 h-auto min-h-8 max-w-full whitespace-normal py-1.5 text-left phone:min-h-11`,onClick:s,children:[`New to this Hub?`,u]}),t[3]=i,t[4]=o,t[5]=u,t[6]=d):d=t[6];let f;t[7]!==n||t[8]!==i||t[9]!==o||t[10]!==r?(f=i?(0,$.jsxs)(`div`,{id:o,className:`mt-2 space-y-2 text-xs leading-relaxed text-muted-foreground`,children:[(0,$.jsxs)(`p`,{children:[(0,$.jsx)(`span`,{className:`font-medium text-foreground`,children:`Getting access.`}),` Accounts are`,r?` open to signup on this Hub. Verify your email, then choose a passkey or password.`:` created by invitation. An owner sends you an invitation code; redeem it below to create your account.`]}),(0,$.jsxs)(`p`,{children:[(0,$.jsx)(`span`,{className:`font-medium text-foreground`,children:`What a passkey is here.`}),` The passkey is created by your browser or password manager and never leaves it. It is the only credential this Hub treats as strong.`]}),n?(0,$.jsxs)(`p`,{children:[(0,$.jsx)(`span`,{className:`font-medium text-foreground`,children:`If this Hub is brand new.`}),` No owner exists yet. “Set up first owner” claims this Hub with a bootstrap credential from whoever deployed it.`]}):null]}):null,t[7]=n,t[8]=i,t[9]=o,t[10]=r,t[11]=f):f=t[11];let p;return t[12]!==d||t[13]!==f?(p=(0,$.jsxs)(`div`,{className:`mt-4`,children:[d,f]}),t[12]=d,t[13]=f,t[14]=p):p=t[14],p}function qn(e){return!e}function Jn({context:e=`hub`,autoExternalProvider:t=null}={}){let n=c(e=>e.accountStatus),r=c(e=>e.errorMessage),i=c(e=>e.errorReason??null),o=c(e=>e.bootstrapAvailable),[u,d]=(0,Z.useState)(()=>ot({href:window.location.href,historyState:window.history.state,replaceState:(e,t,n)=>window.history.replaceState(e,t,n)})),f=(0,Z.useCallback)(()=>d(null),[]),{config:p}=_n(),m=s(e=>e.externalIdentityConfiguration),h=Re(m),[g,v]=(0,Z.useState)(!1),[b,x]=(0,Z.useState)(null),S=(0,Z.useRef)(!1),[C,w]=(0,Z.useState)(void 0),T=We(),E=T?.kind===`sign-up`||T?.kind===`sign-up-verify`?`public`:T?.kind===`invitation`?`invitation`:T?.kind===`setup`?`bootstrap`:null,D=T?.kind===`sign-in-password`?`password`:T?.kind===`sign-in-recovery-code`?`recovery-code`:T?.kind===`reset-password`?`password-reset`:null,O=e=>{He(e===`public`?{kind:`sign-up`}:e===`invitation`?{kind:`invitation`}:e===`bootstrap`?{kind:`setup`}:{kind:`sign-in`})},k=e=>{He(e===`password`?{kind:`sign-in-password`}:e===`recovery-code`?{kind:`sign-in-recovery-code`}:e===`password-reset`?{kind:`reset-password`}:{kind:`sign-in`})},A=(0,Z.useRef)(null),j=(0,Z.useRef)(null),N=(0,Z.useRef)(null);(0,Z.useEffect)(()=>{q.refreshExternalIdentityConfiguration()},[]),(0,Z.useEffect)(()=>{if(E!==`public`&&e!==`native-authorization`){w(void 0);return}let t=new AbortController;return w(void 0),a.getPendingExternalIdentity(t.signal).then(e=>{t.signal.aborted||w(e)}).catch(()=>{t.signal.aborted||w({status:`none`})}),()=>t.abort()},[e,E]);let P=(0,Z.useCallback)(async()=>{if(!g){v(!0),x(null);try{await ze({intent:`authenticate`,returnTo:e===`native-authorization`?window.location.pathname:Ue({kind:`sign-up`}),start:e=>a.startExternalIdentityAuthorization(e),navigate:e=>window.location.assign(e)})}catch(e){x(e instanceof G?e.message:`GitHub sign-in is temporarily unavailable.`),v(!1)}}},[e,g]);(0,Z.useEffect)(()=>{e!==`native-authorization`||t!==`github`||n!==`signed-out`||h?.login!==!0||C?.status!==`none`||S.current||(S.current=!0,P())},[t,e,C?.status,h?.login,P,n]),(0,Z.useEffect)(()=>{E===`invitation`||E===`bootstrap`?j.current?.focus({preventScroll:!0}):A.current?.focus({preventScroll:!0})},[D,E]),(0,Z.useEffect)(()=>{N.current?.scrollTo({top:0,left:0})},[D,E]);let F=E===`invitation`||E===`bootstrap`?(0,$.jsxs)(`div`,{className:`mt-6 flex flex-wrap gap-2 phone:mt-auto ${Qe}`,children:[(0,$.jsx)(l,{type:`submit`,form:Yn,className:`phone:min-h-11`,disabled:n===`authenticating`,children:E===`invitation`?`Create account and passkey`:`Create owner and passkey`}),(0,$.jsx)(l,{type:`button`,variant:`outline`,className:`phone:min-h-11`,onClick:n===`authenticating`?()=>q.cancelAuthentication():()=>O(null),children:n===`authenticating`?`Cancel`:`Back`})]}):null,I=E||D?null:(0,$.jsx)(`div`,{className:`phone:mt-auto ${Qe}`,children:(0,$.jsxs)(`div`,{className:`mt-6 flex flex-col gap-3`,children:[h?.login?(0,$.jsxs)(l,{size:`lg`,className:`phone:min-h-11`,disabled:g||n===`authenticating`||n===`signing-out`,onClick:()=>void P(),children:[g?(0,$.jsx)(y,{"aria-hidden":!0,className:`animate-spin`}):(0,$.jsx)(M,{"aria-hidden":!0}),g?`Opening GitHub…`:`Continue with GitHub`]}):null,(0,$.jsxs)(l,{size:`lg`,className:`phone:min-h-11`,disabled:n===`authenticating`||n===`signing-out`,onClick:()=>void q.signIn(),children:[(0,$.jsx)(oe,{"aria-hidden":!0}),n===`authenticating`?`Waiting for passkey…`:`Sign in with passkey`]}),n===`authenticating`?(0,$.jsx)(l,{variant:`outline`,size:`lg`,className:`phone:min-h-11`,onClick:()=>q.cancelAuthentication(),children:`Cancel`}):(0,$.jsxs)($.Fragment,{children:[p?.status===`enabled`?(0,$.jsx)(l,{variant:`outline`,size:`lg`,className:`phone:min-h-11`,onClick:()=>O(`public`),children:`Create account`}):null,(0,$.jsx)(l,{variant:`ghost`,size:`lg`,className:`phone:min-h-11`,onClick:()=>O(`invitation`),children:`Redeem invitation`}),o?(0,$.jsx)(l,{variant:`ghost`,size:`lg`,className:`phone:min-h-11`,onClick:()=>O(`bootstrap`),children:`Set up first owner`}):null]})]})}),L=(0,$.jsxs)($.Fragment,{children:[n===`unavailable`?(0,$.jsxs)(l,{className:`mt-3 phone:min-h-11`,variant:`ghost`,onClick:()=>void q.bootstrap(),children:[(0,$.jsx)(le,{"aria-hidden":!0}),` Retry Hub`]}):null,(0,$.jsx)(`p`,{className:`sr-only`,"aria-live":`polite`,children:n===`authenticating`?`Passkey authentication is in progress.`:``})]}),R=i?de(i):null,z=b??r??R?.message,B=b===null&&R!==null?R.title:`Sign-in did not complete`,V=z?(0,$.jsx)(`div`,{className:`mt-4`,children:(0,$.jsxs)(Ce,{variant:`error`,children:[(0,$.jsx)(_,{"aria-hidden":!0}),(0,$.jsx)(xe,{children:B}),(0,$.jsx)(Se,{children:z})]})}):null,H=C?.status===`signup`?C:null,ee=C?.status===`error`?C:null,U=e===`native-authorization`&&E!==`public`;if(E===`public`||U&&(H!==null||ee!==null)){let e=()=>{U?w({status:`none`}):O(null)};return(0,$.jsxs)(cn,{title:`Create your account`,description:U?`Choose your Ryco username, then return to approving this device.`:`Pick a username and confirm your email. You choose a passkey or a password at the end.`,trailing:L,scrollRef:N,titleRef:A,children:[V,C===void 0?(0,$.jsx)(be,{className:`h-64 w-full rounded-2xl`}):H?(0,$.jsx)(bn,{pendingSignup:H,config:p?.status===`enabled`?p:null,onCancel:e}):ee?(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(Ce,{variant:`warning`,children:[(0,$.jsx)(_,{"aria-hidden":!0}),(0,$.jsx)(xe,{children:`GitHub signup did not continue`}),(0,$.jsx)(Se,{children:Le(ee.code)})]}),(0,$.jsx)(l,{variant:`outline`,onClick:e,children:`Back to sign in`})]}):(0,$.jsx)(yn,{config:p?.status===`enabled`?p:null,initialLink:u,onConsumeLink:f,onCancel:()=>{f(),O(null)}})]})}if(E===`invitation`||E===`bootstrap`)return(0,$.jsxs)(cn,{title:E===`invitation`?`Redeem your invitation`:`Claim this Hub`,description:E===`invitation`?`Enter the invitation code an owner sent you. Your browser creates a passkey at the same time.`:`No owner exists yet. The bootstrap credential from whoever deployed this Hub makes you its first owner.`,actions:F,trailing:L,scrollRef:N,titleRef:A,children:[V,(0,$.jsx)(Xn,{mode:E,credentialRef:j})]});if(D!==null){let e={password:{title:`Sign in with a password`,description:`Password sign-in always asks for a second factor — an authenticator code, or a code sent to your verified email.`},"recovery-code":{title:`Use a recovery code`,description:`One of the single-use codes you saved when your account was created. Each code works once.`},"password-reset":{title:`Reset your password`,description:`We email a single-use link. Setting a new password signs out every device, including this one.`}}[D];return(0,$.jsxs)(cn,{title:e.title,description:e.description,trailing:L,scrollRef:N,titleRef:A,children:[V,D===`password`?(0,$.jsx)(xn,{onCancel:()=>k(null),onUseRecoveryCode:()=>k(`recovery-code`),onResetPassword:()=>k(`password-reset`)}):D===`recovery-code`?(0,$.jsx)(Cn,{onCancel:()=>k(null)}):(0,$.jsx)(Sn,{initialLink:u,onConsumeLink:f,onCancel:()=>{f(),k(null)}})]})}return(0,$.jsxs)(cn,{title:e===`native-authorization`?`Sign in to continue on your device`:n===`session-expired`?`Your session expired`:`Connect to your Ryco nodes`,description:e===`native-authorization`?`Authenticate in this browser first. Ryco will ask again before it authorizes the mobile app.`:`Ryco Hub reaches the developer machines an owner has authorized for your account. Your session lives in an HttpOnly cookie — nothing about it is readable by this page.`,actions:I,trailing:L,scrollRef:N,titleRef:A,children:[(0,$.jsx)(Ke,{}),(0,$.jsx)(Kn,{bootstrapAvailable:o,publicSignupEnabled:p?.status===`enabled`}),n===`authenticating`?null:(0,$.jsxs)(l,{variant:`ghost`,size:`sm`,className:`-ml-2 mt-2 h-auto min-h-8 whitespace-normal phone:min-h-11`,onClick:()=>k(`password`),children:[(0,$.jsx)(et,{"aria-hidden":!0}),`Password, recovery code, or reset`]}),(0,$.jsx)(ne,{}),V]})}var Yn=`hub-registration-form`;function Xn(e){let t=(0,Q.c)(29),{mode:n,credentialRef:r}=e,[i,a]=(0,Z.useState)(``),[o,s]=(0,Z.useState)(``),[c,l]=(0,Z.useState)(``),u;t[0]!==i||t[1]!==o||t[2]!==n||t[3]!==c?(u=async e=>{e.preventDefault();let t=i;a(``);let r={displayName:o.trim(),passkeyLabel:c.trim()||null};n===`invitation`?await q.redeemInvitation({secret:t,...r}):await q.bootstrapOwner({credential:t,...r})},t[0]=i,t[1]=o,t[2]=n,t[3]=c,t[4]=u):u=t[4];let d=u,f;t[5]===d?f=t[6]:(f=e=>void d(e),t[5]=d,t[6]=f);let p=n===`invitation`?`Invitation code`:`Bootstrap credential`,m;t[7]===p?m=t[8]:(m=(0,$.jsx)(k,{htmlFor:`hub-registration-credential`,children:p}),t[7]=p,t[8]=m);let h;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>a(e.currentTarget.value),t[9]=h):h=t[9];let g;t[10]!==i||t[11]!==r?(g=(0,$.jsx)(Y,{ref:r,id:`hub-registration-credential`,type:`password`,required:!0,maxLength:128,value:i,className:J,onChange:h}),t[10]=i,t[11]=r,t[12]=g):g=t[12];let _;t[13]!==m||t[14]!==g?(_=(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[m,g]}),t[13]=m,t[14]=g,t[15]=_):_=t[15];let v;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(k,{htmlFor:`hub-display-name`,children:`Display name`}),t[16]=v):v=t[16];let y;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>s(e.currentTarget.value),t[17]=y):y=t[17];let b;t[18]===o?b=t[19]:(b=(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[v,(0,$.jsx)(Y,{id:`hub-display-name`,required:!0,maxLength:200,value:o,className:J,onChange:y})]}),t[18]=o,t[19]=b);let x;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsxs)(k,{htmlFor:`hub-passkey-label`,children:[`Passkey label `,(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:`(optional)`})]}),t[20]=x):x=t[20];let S;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>l(e.currentTarget.value),t[21]=S):S=t[21];let C;t[22]===c?C=t[23]:(C=(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[x,(0,$.jsx)(Y,{id:`hub-passkey-label`,maxLength:100,value:c,className:J,onChange:S})]}),t[22]=c,t[23]=C);let w;return t[24]!==b||t[25]!==C||t[26]!==f||t[27]!==_?(w=(0,$.jsxs)(`form`,{id:Yn,className:`mt-6 space-y-4`,onSubmit:f,autoComplete:`off`,children:[_,b,C]}),t[24]=b,t[25]=C,t[26]=f,t[27]=_,t[28]=w):w=t[28],w}function Zn(){let e=(0,Q.c)(20),t=c(er),{copyToClipboard:n,isCopied:r}=f(),i=`Save all ${String(t.length)} codes — they are shown once and cannot be retrieved later. Ryco does not save them in browser storage.`,a;e[0]!==n||e[1]!==t?(a=()=>n(Ie(t),void 0),e[0]=n,e[1]=t,e[2]=a):a=e[2];let o;e[3]===r?o=e[4]:(o=r?(0,$.jsx)(g,{"aria-hidden":!0}):(0,$.jsx)(h,{"aria-hidden":!0}),e[3]=r,e[4]=o);let s=r?`Copied`:`Copy codes`,u;e[5]!==a||e[6]!==o||e[7]!==s?(u=(0,$.jsxs)(l,{variant:`outline`,className:`mt-5 w-full phone:min-h-11`,onClick:a,children:[o,s]}),e[5]=a,e[6]=o,e[7]=s,e[8]=u):u=e[8];let d;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(l,{size:`cta`,className:`mt-3 w-full`,onClick:$n,children:`I saved the codes`}),e[9]=d):d=e[9];let p;e[10]===u?p=e[11]:(p=(0,$.jsxs)(`div`,{className:`phone:mt-auto ${Qe}`,children:[u,d]}),e[10]=u,e[11]=p);let m;e[12]===t?m=e[13]:(m=t.map(Qn),e[12]=t,e[13]=m);let _;e[14]===m?_=e[15]:(_=(0,$.jsx)(`ul`,{"aria-label":`Recovery codes`,className:`grid gap-2 rounded-xl border border-border bg-background p-4 font-mono text-sm break-all sm:grid-cols-2`,children:m}),e[14]=m,e[15]=_);let v;return e[16]!==i||e[17]!==p||e[18]!==_?(v=(0,$.jsx)(cn,{title:`Save your recovery codes`,description:i,actions:p,children:_}),e[16]=i,e[17]=p,e[18]=_,e[19]=v):v=e[19],v}function Qn(e){return(0,$.jsx)(`li`,{children:e},e)}function $n(){return q.dismissRecoveryCodes()}function er(e){return e.recoveryCodes}function tr(e){let t=(0,Q.c)(42),{node:n,nowMs:r,disabled:i,onConnect:a,onOpenDetail:o}=e,s;t[0]!==n||t[1]!==r?(s=jt(n,r),t[0]=n,t[1]=r,t[2]=s):s=t[2];let c=s,l;t[3]===n?l=t[4]:(l=P(n),t[3]=n,t[4]=l);let u=l,d=i||u,f;t[5]!==n.environmentId||t[6]!==n.label||t[7]!==n.platformOs?(f=(0,$.jsx)(`span`,{className:`flex size-[36px] shrink-0 items-center justify-center rounded-lg bg-muted`,children:(0,$.jsx)(S,{environmentId:n.environmentId,label:n.label,platformOs:n.platformOs,className:`size-4`})}),t[5]=n.environmentId,t[6]=n.label,t[7]=n.platformOs,t[8]=f):f=t[8];let p;t[9]===n.label?p=t[10]:(p=(0,$.jsx)(`span`,{className:`block truncate font-medium`,children:n.label}),t[9]=n.label,t[10]=p);let m;t[11]===n?m=t[12]:(m=Mt(n),t[11]=n,t[12]=m);let h;t[13]===m?h=t[14]:(h=(0,$.jsx)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:m}),t[13]=m,t[14]=h);let g;t[15]===u?g=t[16]:(g=u?(0,$.jsx)(`span`,{className:`block truncate text-xs font-medium text-muted-foreground`,children:`Open in Desktop/Mobile`}):null,t[15]=u,t[16]=g);let _;t[17]!==p||t[18]!==h||t[19]!==g?(_=(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[p,h,g]}),t[17]=p,t[18]=h,t[19]=g,t[20]=_):_=t[20];let v;t[21]===n?v=t[22]:(v=(0,$.jsx)(U,{node:n}),t[21]=n,t[22]=v);let y;t[23]===c?y=t[24]:(y=c?(0,$.jsx)(`span`,{className:`whitespace-nowrap text-[11px] text-muted-foreground max-sm:hidden phone:hidden`,children:c}):null,t[23]=c,t[24]=y);let b;t[25]!==v||t[26]!==y?(b=(0,$.jsxs)(`span`,{className:`flex shrink-0 flex-col items-end gap-0.5`,children:[v,y]}),t[25]=v,t[26]=y,t[27]=b):b=t[27];let x;t[28]!==a||t[29]!==b||t[30]!==d||t[31]!==f||t[32]!==_?(x=(0,$.jsxs)(`button`,{type:`button`,disabled:d,onClick:a,className:`flex min-h-16 min-w-0 flex-1 flex-wrap items-center gap-3 px-4 py-3 text-left outline-none hover:bg-accent/50 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset disabled:opacity-60 disabled:hover:bg-transparent phone:min-h-18`,children:[f,_,b]}),t[28]=a,t[29]=b,t[30]=d,t[31]=f,t[32]=_,t[33]=x):x=t[33];let C;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(`span`,{"aria-hidden":!0,className:`w-px shrink-0 bg-border/60`}),t[34]=C):C=t[34];let w=`Node details: ${n.label}`,T;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(ae,{"aria-hidden":!0,className:`size-4`}),t[35]=T):T=t[35];let E;t[36]!==o||t[37]!==w?(E=(0,$.jsx)(`button`,{type:`button`,"aria-label":w,onClick:o,className:`flex w-[44px] shrink-0 items-center justify-center text-muted-foreground outline-none hover:bg-accent/50 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,children:T}),t[36]=o,t[37]=w,t[38]=E):E=t[38];let D;return t[39]!==x||t[40]!==E?(D=(0,$.jsxs)(`li`,{className:`flex items-stretch overflow-hidden rounded-xl border border-border bg-background`,children:[x,C,E]}),t[39]=x,t[40]=E,t[41]=D):D=t[41],D}function nr(){let e=(0,Q.c)(110),t=c(gr),n=c(hr),r=c(mr),i=c(pr),o=c(fr),s=c(dr),u=ie(),d=L(),f=fe()===`phone`,p=We()?.kind===`nodes-enroll`,m=ur,[h,g]=(0,Z.useState)(null),[v,b]=(0,Z.useState)(null),x=(0,Z.useRef)(null),S=Be(6e4),C,w;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>{x.current?.focus({preventScroll:!0})},w=[],e[0]=C,e[1]=w):(C=e[0],w=e[1]),(0,Z.useEffect)(C,w);let T;e[2]===d?T=e[3]:(T=async e=>{te(e.id)||(await d({to:`/`,replace:!0}),await q.selectNode(e.id))},e[2]=d,e[3]=T);let E=T;if(p){let t;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Xt,{measure:`content`,children:(0,$.jsx)(ln,{onClose:()=>m(!1)})}),e[4]=t):t=e[4],t}let D,O,k,j,M,N,P,F,I,R,z,B,V,H,ee,U,re,ae;if(e[5]!==o||e[6]!==r||e[7]!==h||e[8]!==i||e[9]!==f||e[10]!==t||e[11]!==S||e[12]!==v||e[13]!==u||e[14]!==E||e[15]!==s||e[16]!==n){let a=Nt(t),c;e[35]!==h||e[36]!==t?(c=h===null?null:t.find(e=>e.id===h)??null,e[35]=h,e[36]=t,e[37]=c):c=e[37],j=c,P=o?.role===`owner`;let d=n===`ready`&&t.length===0;N=P&&!d;let p;e[38]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsxs)(l,{variant:`ghost`,className:`min-h-11 flex-1`,onClick:lr,children:[(0,$.jsx)(ue,{"aria-hidden":!0}),` Account`]}),e[38]=p):p=e[38],k=p;let b;e[39]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsxs)(l,{variant:`ghost`,className:`min-h-11 flex-1`,onClick:cr,children:[(0,$.jsx)(se,{"aria-hidden":!0}),` Sign out`]}),e[39]=b):b=e[39],I=b;let C=f?`mt-3 phone:min-h-11 phone:w-full`:void 0,w,T;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>m(!0),T=(0,$.jsx)(A,{"aria-hidden":!0}),e[40]=w,e[41]=T):(w=e[40],T=e[41]);let L;e[42]===C?L=e[43]:(L=(0,$.jsxs)(l,{className:C,onClick:w,children:[T,` Enroll node`]}),e[42]=C,e[43]=L),M=L;let te=f?`mt-3 phone:min-h-11 phone:w-full`:void 0,ne=n===`loading`,ie;e[44]===n?ie=e[45]:(ie=n===`loading`?(0,$.jsx)(y,{"aria-hidden":!0,className:`animate-spin motion-reduce:animate-none`}):(0,$.jsx)(le,{"aria-hidden":!0}),e[44]=n,e[45]=ie);let oe;e[46]!==te||e[47]!==ne||e[48]!==ie?(oe=(0,$.jsxs)(l,{className:te,variant:`outline`,disabled:ne,onClick:sr,children:[ie,`Refresh nodes`]}),e[46]=te,e[47]=ne,e[48]=ie,e[49]=oe):oe=e[49],F=oe,O=Xt;let ce;e[50]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,$.jsx)(l,{size:`icon`,variant:`ghost`,"aria-label":`Account settings`,onClick:or,children:(0,$.jsx)(ue,{"aria-hidden":!0})}),e[50]=ce):ce=e[50],e[51]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsxs)($.Fragment,{children:[ce,(0,$.jsx)(l,{size:`icon`,variant:`ghost`,"aria-label":`Sign out`,onClick:ar,children:(0,$.jsx)(se,{"aria-hidden":!0})})]}),e[51]=z):z=e[51],D=Ht,B=x,V=t.length===1?`Your node`:`Your nodes`;let W=o?.displayName??`Hub account`,G;e[52]===o?G=e[53]:(G=o?` · ${o.role.charAt(0).toUpperCase()}${o.role.slice(1)}`:``,e[52]=o,e[53]=G);let de;e[54]!==W||e[55]!==G?(de=(0,$.jsxs)(`p`,{className:`truncate`,children:[`Signed in as `,W,G]}),e[54]=W,e[55]=G,e[56]=de):de=e[56];let K;e[57]===t?K=e[58]:(K=t.length>1?(0,$.jsx)(`p`,{className:`mt-0.5 truncate text-xs`,children:It(t)}):null,e[57]=t,e[58]=K),e[59]!==de||e[60]!==K?(H=(0,$.jsxs)($.Fragment,{children:[de,K]}),e[59]=de,e[60]=K,e[61]=H):H=e[61],e[62]!==M||e[63]!==N||e[64]!==f||e[65]!==F?(ee=f?void 0:(0,$.jsxs)($.Fragment,{children:[F,N?M:null]}),e[62]=M,e[63]=N,e[64]=f,e[65]=F,e[66]=ee):ee=e[66],e[67]===n?U=e[68]:(U=n===`stale`?(0,$.jsx)(`div`,{className:`mt-4`,children:(0,$.jsxs)(Ce,{variant:`warning`,role:`status`,children:[(0,$.jsx)(_,{"aria-hidden":!0}),(0,$.jsx)(Se,{children:`Directory data is stale. Connecting is unavailable until it refreshes.`})]})}):null,e[67]=n,e[68]=U),e[69]===v?re=e[70]:(re=v?(0,$.jsx)(`div`,{className:`mt-4`,children:(0,$.jsxs)(Ce,{variant:`warning`,role:`status`,children:[(0,$.jsx)(_,{"aria-hidden":!0}),(0,$.jsx)(Se,{children:v})]})}):null,e[69]=v,e[70]=re);let q=n===`stale`?null:i;e[71]!==u||e[72]!==s||e[73]!==q?(ae=(0,$.jsx)(_r,{selection:s,routeNotice:u,error:q}),e[71]=u,e[72]=s,e[73]=q,e[74]=ae):ae=e[74],R=d?(0,$.jsx)(vr,{isOwner:P,onEnroll:()=>m(!0)}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`ul`,{role:`list`,className:`mt-5 space-y-2`,"aria-busy":n===`loading`,children:[a.map(e=>(0,$.jsx)(tr,{node:e,nowMs:S,disabled:Lt({directoryStatus:n,browserStatus:r,node:e}),onConnect:()=>void E(e),onOpenDetail:()=>g(e.id)},`${e.id}:${e.environmentId}`)),n===`loading`&&t.length===0?(0,$.jsx)($.Fragment,{children:[0,1,2].map(ir)}):null]}),n===`loading`&&t.length===0?(0,$.jsx)(`p`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:`Loading authorized nodes…`}):null,t.length>0?(0,$.jsx)(`p`,{className:`mt-2 px-1 text-[11px] text-muted-foreground`,children:`Presence refreshes about every 20 seconds.`}):null]}),e[5]=o,e[6]=r,e[7]=h,e[8]=i,e[9]=f,e[10]=t,e[11]=S,e[12]=v,e[13]=u,e[14]=E,e[15]=s,e[16]=n,e[17]=D,e[18]=O,e[19]=k,e[20]=j,e[21]=M,e[22]=N,e[23]=P,e[24]=F,e[25]=I,e[26]=R,e[27]=z,e[28]=B,e[29]=V,e[30]=H,e[31]=ee,e[32]=U,e[33]=re,e[34]=ae}else D=e[17],O=e[18],k=e[19],j=e[20],M=e[21],N=e[22],P=e[23],F=e[24],I=e[25],R=e[26],z=e[27],B=e[28],V=e[29],H=e[30],ee=e[31],U=e[32],re=e[33],ae=e[34];let oe,ce;e[75]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,$.jsx)(`div`,{className:`mt-5`,children:(0,$.jsx)(Ke,{})}),ce=(0,$.jsx)(ne,{}),e[75]=oe,e[76]=ce):(oe=e[75],ce=e[76]);let W;e[77]===Symbol.for(`react.memo_cache_sentinel`)?(W=e=>{e||g(null)},e[77]=W):W=e[77];let G;e[78]===E?G=e[79]:(G=e=>void E(e),e[78]=E,e[79]=G);let de;e[80]===Symbol.for(`react.memo_cache_sentinel`)?(de=async e=>{await a.revokeNode(e.id,ft),b(_t(e.label)),await q.refreshDirectory(),g(null)},e[80]=de):de=e[80];let K;e[81]!==r||e[82]!==j||e[83]!==P||e[84]!==n||e[85]!==G?(K=(0,$.jsx)(Vt,{node:j,directoryStatus:n,browserStatus:r,canRename:P,canRevoke:P,onOpenChange:W,onConnect:G,onRename:rr,onRevoke:de}),e[81]=r,e[82]=j,e[83]=P,e[84]=n,e[85]=G,e[86]=K):K=e[86];let J;e[87]!==D||e[88]!==R||e[89]!==K||e[90]!==B||e[91]!==V||e[92]!==H||e[93]!==ee||e[94]!==U||e[95]!==re||e[96]!==ae?(J=(0,$.jsxs)(D,{titleRef:B,title:V,description:H,actions:ee,children:[U,re,ae,R,oe,ce,K]}),e[87]=D,e[88]=R,e[89]=K,e[90]=B,e[91]=V,e[92]=H,e[93]=ee,e[94]=U,e[95]=re,e[96]=ae,e[97]=J):J=e[97];let Y;e[98]!==k||e[99]!==M||e[100]!==N||e[101]!==f||e[102]!==F||e[103]!==I?(Y=f?(0,$.jsxs)(`div`,{className:`mt-auto ${Qe}`,children:[(0,$.jsxs)(`div`,{className:`mt-5 flex flex-wrap gap-2`,children:[k,I]}),N?M:null,F]}):null,e[98]=k,e[99]=M,e[100]=N,e[101]=f,e[102]=F,e[103]=I,e[104]=Y):Y=e[104];let pe;return e[105]!==O||e[106]!==z||e[107]!==J||e[108]!==Y?(pe=(0,$.jsxs)(O,{trailing:z,children:[J,Y]}),e[105]=O,e[106]=z,e[107]=J,e[108]=Y,e[109]=pe):pe=e[109],pe}async function rr(e,t){await a.renameNode(e.id,t),await q.refreshDirectory()}function ir(e){return(0,$.jsx)(`li`,{children:(0,$.jsx)(be,{className:`h-16 w-full rounded-xl`})},e)}function ar(){q.signOut()}function or(){He({kind:`account`,section:`security`})}function sr(){q.refreshDirectory()}function cr(){q.signOut()}function lr(){He({kind:`account`,section:`security`})}function ur(e){return He(e?{kind:`nodes-enroll`}:{kind:`nodes`})}function dr(e){return e.selectionStatus}function fr(e){return e.account}function pr(e){return e.errorMessage}function mr(e){return e.browserStatus}function hr(e){return e.directoryStatus}function gr(e){return e.nodes}function _r(e){let t=(0,Q.c)(3),{selection:n,routeNotice:r,error:i}=e,a=(n===`authorization-removed`?`Authorization for the previous node was removed.`:n===`revoked`?`The previous node or grant was revoked.`:n===`incompatible`?`The previous node uses an incompatible relay version.`:null)??r??i;if(!a)return null;let o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(_,{"aria-hidden":!0}),t[0]=o):o=t[0];let s;return t[1]===a?s=t[2]:(s=(0,$.jsx)(`div`,{className:`mt-4`,children:(0,$.jsxs)(Ce,{variant:`error`,children:[o,(0,$.jsx)(Se,{children:a})]})}),t[1]=a,t[2]=s),s}function vr(e){let t=(0,Q.c)(14),{isOwner:n,onEnroll:r}=e,i;t[0]===n?i=t[1]:(i=(0,$.jsx)(Ae,{variant:`icon`,children:n?(0,$.jsx)(A,{"aria-hidden":!0}):(0,$.jsx)(W,{"aria-hidden":!0})}),t[0]=n,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(Ne,{children:`No nodes yet`}),t[2]=a):a=t[2];let o=n?`A node appears here once the Ryco client on that machine has been enrolled. Start enrollment on the node, then enter the short device code it shows — codes expire after ten minutes.`:`A node appears here once an owner of this Hub authorizes your account for it.`,s;t[3]===o?s=t[4]:(s=(0,$.jsx)(Pe,{children:o}),t[3]=o,t[4]=s);let c;t[5]!==i||t[6]!==s?(c=(0,$.jsxs)(je,{children:[i,a,s]}),t[5]=i,t[6]=s,t[7]=c):c=t[7];let u;t[8]!==n||t[9]!==r?(u=n?(0,$.jsx)(Me,{children:(0,$.jsxs)(l,{className:`phone:min-h-11`,onClick:r,children:[(0,$.jsx)(A,{"aria-hidden":!0}),` Enroll node`]})}):null,t[8]=n,t[9]=r,t[10]=u):u=t[10];let d;return t[11]!==c||t[12]!==u?(d=(0,$.jsxs)(Fe,{className:`min-h-64`,children:[c,u]}),t[11]=c,t[12]=u,t[13]=d):d=t[13],d}export{Jn as HostedAuthenticationSurface,kn as HostedHubRoot};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$l as t,Qr as n}from"./runtime-BwHA1GUS.js";import{t as r}from"./react-CwJFpaho.js";import{Gt as i,Jt as a,Qt as o,Xt as s,Yt as c,Zt as l,qt as u}from"./switch-DnpJB2xv.js";import{t as d}from"./compiler-runtime-C4g8XhC5.js";import{t as f}from"./input-BDWSVClC.js";var p=d(),m=e(r(),1),h=t(),g=100;function _(e){let t=(0,p.c)(55),{node:r,open:d,onOpenChange:_,onRename:v}=e,[y,b]=(0,m.useState)(r.label),[x,S]=(0,m.useState)(!1),[C,w]=(0,m.useState)(null),T,E;t[0]!==r.label||t[1]!==d?(T=()=>{d&&(b(r.label),S(!1),w(null))},E=[r.label,d],t[0]=r.label,t[1]=d,t[2]=T,t[3]=E):(T=t[2],E=t[3]),(0,m.useEffect)(T,E);let D;t[4]===y?D=t[5]:(D=y.trim(),t[4]=y,t[5]=D);let O=D,k=O.length===0?`Enter a device name.`:O.length>g?`Use 100 characters or fewer.`:null,A=k===null&&O!==r.label&&!x,j;t[6]!==A||t[7]!==O||t[8]!==_||t[9]!==v?(j=async()=>{if(A){S(!0),w(null);try{await v(O),_(!1)}catch(e){let t=e;w(t instanceof Error?t.message:`Unable to rename this device.`),S(!1)}}},t[6]=A,t[7]=O,t[8]=_,t[9]=v,t[10]=j):j=t[10];let M=j,N;t[11]!==_||t[12]!==x?(N=e=>{x||_(e)},t[11]=_,t[12]=x,t[13]=N):N=t[13];let P=!x,F;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,h.jsxs)(c,{children:[(0,h.jsx)(o,{children:`Rename device`}),(0,h.jsx)(u,{children:`This is the canonical name shown to everyone authorized to use this device.`})]}),t[14]=F):F=t[14];let I;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,h.jsx)(`label`,{htmlFor:`hosted-node-name`,className:`text-sm font-medium`,children:`Device name`}),t[15]=I):I=t[15];let L=k!==null||C!==null,R;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>{b(e.currentTarget.value),w(null)},t[16]=R):R=t[16];let z;t[17]!==A||t[18]!==M?(z=e=>{e.key===`Enter`&&A&&M()},t[17]=A,t[18]=M,t[19]=z):z=t[19];let B;t[20]!==y||t[21]!==x||t[22]!==z||t[23]!==L?(B=(0,h.jsx)(f,{id:`hosted-node-name`,value:y,autoFocus:!0,disabled:x,"aria-invalid":L,onChange:R,onKeyDown:z}),t[20]=y,t[21]=x,t[22]=z,t[23]=L,t[24]=B):B=t[24];let V;t[25]===k?V=t[26]:(V=k?(0,h.jsx)(`p`,{className:`text-xs text-destructive`,children:k}):null,t[25]=k,t[26]=V);let H;t[27]===C?H=t[28]:(H=C?(0,h.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:C}):null,t[27]=C,t[28]=H);let U;t[29]!==B||t[30]!==V||t[31]!==H?(U=(0,h.jsxs)(s,{className:`space-y-2`,children:[I,B,V,H]}),t[29]=B,t[30]=V,t[31]=H,t[32]=U):U=t[32];let W;t[33]===_?W=t[34]:(W=()=>_(!1),t[33]=_,t[34]=W);let G;t[35]!==x||t[36]!==W?(G=(0,h.jsx)(n,{variant:`outline`,disabled:x,onClick:W,children:`Cancel`}),t[35]=x,t[36]=W,t[37]=G):G=t[37];let K=!A,q;t[38]===M?q=t[39]:(q=()=>void M(),t[38]=M,t[39]=q);let J=x?`Saving…`:`Save`,Y;t[40]!==K||t[41]!==q||t[42]!==J?(Y=(0,h.jsx)(n,{disabled:K,onClick:q,children:J}),t[40]=K,t[41]=q,t[42]=J,t[43]=Y):Y=t[43];let X;t[44]!==G||t[45]!==Y?(X=(0,h.jsxs)(a,{children:[G,Y]}),t[44]=G,t[45]=Y,t[46]=X):X=t[46];let Z;t[47]!==U||t[48]!==X||t[49]!==P?(Z=(0,h.jsxs)(l,{className:`max-w-md`,showCloseButton:P,children:[F,U,X]}),t[47]=U,t[48]=X,t[49]=P,t[50]=Z):Z=t[50];let Q;return t[51]!==d||t[52]!==Z||t[53]!==N?(Q=(0,h.jsx)(i,{open:d,onOpenChange:N,children:Z}),t[51]=d,t[52]=Z,t[53]=N,t[54]=Q):Q=t[54],Q}export{_ as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$l as t,Et as n,Tt as r}from"./runtime-BwHA1GUS.js";import{t as i}from"./react-CwJFpaho.js";import{t as a}from"./compiler-runtime-C4g8XhC5.js";import{t as o}from"./shield-alert-CwH36qZb.js";import{t as s}from"./shield-DPC4oHTi.js";import{Q as c,n as l,r as u,tt as d}from"./authorization-D8dOcEYq.js";function f(e){return u(e)}function p(e){return l(e)}var m=a(),h=e(i(),1),g=()=>n().status;function _(){return(0,h.useSyncExternalStore)(r,g,g)}var v=()=>n().verificationCode;function y(){return(0,h.useSyncExternalStore)(r,v,v)}function b(e){let t=e.split(d.separator);if(t.length!==d.groups)return[];for(let e of t){if(e.length!==d.charsPerGroup)return[];for(let t of e)if(!`0123456789ABCDEFGHJKMNPQRSTVWXYZ`.includes(t))return[]}return t}d.chars*Math.log2(c.length);var x=`Compare this code with the one your node's CLI shows for this session. A match catches accidental wrong-node routing and some network interposition while the loaded code is honest; it cannot protect against the Hub operator, who serves this page, and it does not rule out someone sitting in the middle.`,S=`Settings → Connections → Node security explains what else this tab cannot check.`,C=`Compare this code with the one your node's CLI shows for this session. A match catches accidental wrong-node routing and some network interposition while the loaded code is honest. This tab pins no node identity, so that comparison is the only thing that speaks to whether the far end is your machine or the Hub standing in for it — and it cannot protect against the Hub operator, who serves this page and could serve code that completes the same handshake and displays this same code anyway. A match does not rule out someone sitting in the middle.`,w="Run `ryco e2ee sessions` on the machine running the node to read its end of the comparison.",T=`No session code is available for this channel, so there is nothing here to compare against your node's CLI.`;function E(e){return e?`inline`:`settings`}var D={inline:{advisory:x,more:S},settings:{advisory:C,more:w}};Object.keys(D);function O(e,t){if(e===null)return null;let n=b(e);if(n.length===0)return null;let{advisory:r,more:i}=D[t];return{groups:n,display:n.join(d.separator),advisory:r,more:i}}var k={unavailable:{tone:`caution`,body:`Hosted connections reach your nodes through the Ryco Hub over WSS. No node channel is open in this tab, so the Hub still forwards what you send in a form it can read, and it is expected not to log or keep it.`},negotiating:{tone:`caution`,body:`This tab is still agreeing a channel with your node and has released nothing to it yet. Until that settles, treat this connection as one the Hub can read.`},"web-unsigned":{tone:`advisory`,body:`This tab and the node it was routed to agreed a browser channel, so while the code this page is running is honest the Hub relays ciphertext instead of readable payload. It is weaker than the channel the Ryco mobile app gets, in two ways this tab cannot close. This tab pins no node identity, so it cannot tell whether the far end of that channel is your machine or the Hub standing in for it. And it cannot protect against the Hub operator, who serves every byte of this page's JavaScript and could serve code that completes the same handshake and copies your data anyway. Its downgrade check is held in memory only — empty again in every new tab and after every reload, and worth nothing against that operator. Only your node can close the plaintext path for browsers.`},legacy:{tone:`caution`,body:`This channel fell back to legacy plaintext. This tab cannot tell whether your node offered no encrypted channel or something on the path removed the offer, so treat everything sent over it as readable by the Hub, which is expected not to log or keep it. Only your node can refuse plaintext for browsers.`}};function A(e){return k[e]}Object.keys(k);var j=t();function M(e){let t=(0,m.c)(13),{compact:n}=e,r=n!==void 0&&n,i=_(),a;t[0]===i?a=t[1]:(a=A(i),t[0]=i,t[1]=a);let{tone:c,body:l}=a,u=c===`advisory`?s:o,d=c===`advisory`?`text-sky-600`:`text-amber-600`,f=r?`flex gap-2 text-xs leading-relaxed text-muted-foreground`:`flex gap-2 rounded-lg border px-3 py-2.5 text-xs leading-relaxed text-muted-foreground ${c===`advisory`?`border-sky-500/25 bg-sky-500/5`:`border-amber-500/25 bg-amber-500/5`}`,p=`mt-0.5 size-4 shrink-0 ${d}`,h;t[2]!==u||t[3]!==p?(h=(0,j.jsx)(u,{"aria-hidden":!0,className:p}),t[2]=u,t[3]=p,t[4]=h):h=t[4];let g;t[5]===l?g=t[6]:(g=(0,j.jsx)(`p`,{children:l}),t[5]=l,t[6]=g);let v;return t[7]!==i||t[8]!==f||t[9]!==h||t[10]!==g||t[11]!==c?(v=(0,j.jsxs)(`div`,{className:f,"data-hosted-relay-trust-notice":`true`,"data-e2ee-status":i,"data-tone":c,children:[h,g]}),t[7]=i,t[8]=f,t[9]=h,t[10]=g,t[11]=c,t[12]=v):v=t[12],v}export{_ as a,f as c,O as i,T as n,y as o,E as r,p as s,M as t};