ryco-cli 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AcpNativeLogging-Ba9Nn9Re.mjs → AcpNativeLogging-D3fe64a6.mjs} +1 -1
- package/dist/{AcpNativeLogging-Be1KGJfF.cjs → AcpNativeLogging-vLtnq5f1.cjs} +1 -1
- package/dist/{AzureDevOpsSourceControlProvider-CVj-F-pW.cjs → AzureDevOpsSourceControlProvider-BtezW57t.cjs} +2 -2
- package/dist/{AzureDevOpsSourceControlProvider-CGlK6M0b.mjs → AzureDevOpsSourceControlProvider-WNUDtsur.mjs} +2 -2
- package/dist/{BitbucketSourceControlProvider-CEZEd4PX.cjs → BitbucketSourceControlProvider-BWzNM0jW.cjs} +2 -2
- package/dist/{BitbucketSourceControlProvider-BV6iRDi7.mjs → BitbucketSourceControlProvider-tbbUFKz3.mjs} +2 -2
- package/dist/{ClaudeDriver-lBU7EyUX.cjs → ClaudeDriver-BTvdJvam.cjs} +170 -7
- package/dist/{ClaudeDriver-rooMNrJz.mjs → ClaudeDriver-CG5ngU5z.mjs} +171 -8
- package/dist/{CodexDriver-DBz2rPXb.mjs → CodexDriver-49o7TA-C.mjs} +4 -4
- package/dist/{CodexDriver-CZCIJSLV.cjs → CodexDriver-CFxwJNXx.cjs} +3 -3
- package/dist/{CodexTextGeneration-BeG7ymPC.mjs → CodexTextGeneration-C0t4xcPO.mjs} +2 -2
- package/dist/{CodexTextGeneration-BvIcyD1P.cjs → CodexTextGeneration-CedcXf9a.cjs} +1 -1
- package/dist/{CopilotDriver-CX5zhEdZ.cjs → CopilotDriver-B8J_ovCX.cjs} +20 -16
- package/dist/{CopilotDriver-D36vbGbn.mjs → CopilotDriver-Cu1B1skB.mjs} +21 -17
- package/dist/{CursorDriver-DWuuOSkJ.mjs → CursorDriver-P_A8uQki.mjs} +4 -4
- package/dist/{CursorDriver-CPBVeesr.cjs → CursorDriver-zlKHPy1_.cjs} +3 -3
- package/dist/{ForgejoSourceControlProvider-CeN7Snfr.mjs → ForgejoSourceControlProvider-DLhJZtq9.mjs} +2 -2
- package/dist/{ForgejoSourceControlProvider-CzmmcAZO.cjs → ForgejoSourceControlProvider-szJ-dvsD.cjs} +2 -2
- package/dist/{GitHubSourceControlProvider-DfFR9O2o.cjs → GitHubSourceControlProvider-3ofb6HsF.cjs} +2 -2
- package/dist/{GitHubSourceControlProvider-Dmz1LJct.mjs → GitHubSourceControlProvider-D5MQQPCJ.mjs} +2 -2
- package/dist/{GitLabSourceControlProvider-C21lwphV.mjs → GitLabSourceControlProvider-DLkxeob5.mjs} +2 -2
- package/dist/{GitLabSourceControlProvider-DGoelNmL.cjs → GitLabSourceControlProvider-DkupZH5G.cjs} +2 -2
- package/dist/{GrokDriver-CIXj_4ry.cjs → GrokDriver-CTUNclwp.cjs} +3 -3
- package/dist/{GrokDriver-qKX1a63G.mjs → GrokDriver-D8KoMY76.mjs} +4 -4
- package/dist/{OpenCodeDriver-CbdswhqU.mjs → OpenCodeDriver-B7htxutj.mjs} +92 -27
- package/dist/{OpenCodeDriver-DDEuwtXl.cjs → OpenCodeDriver-pXM8bSct.cjs} +91 -26
- package/dist/{SourceControlProviderDiscoveryCatalog-DJWDCoup.cjs → SourceControlProviderDiscoveryCatalog-Bj_sZfmB.cjs} +1 -1
- package/dist/{SourceControlProviderDiscoveryCatalog-4_4yahsa.mjs → SourceControlProviderDiscoveryCatalog-C6Fn7rZE.mjs} +1 -1
- package/dist/bin.cjs +1113 -312
- package/dist/bin.mjs +1115 -315
- package/dist/client/assets/{AccountSettings-C3v2klAG.js → AccountSettings-CinnQaX-.js} +1 -1
- package/dist/client/assets/{AiFocusSettings-BquKjnWf.js → AiFocusSettings-UbXOywZg.js} +1 -1
- package/dist/client/assets/{AnimatedHeight-BIsV_Z3J.js → AnimatedHeight-DCad8EQ2.js} +1 -1
- package/dist/client/assets/AppearanceSettings-CTh8Z8nz.js +1 -0
- package/dist/client/assets/{BranchToolbar.logic-CmvD76Cw.js → BranchToolbar.logic-37EnknDD.js} +1 -1
- package/dist/client/assets/ChatRightPanel-DUwLYKbp.js +27 -0
- package/dist/client/assets/{ChatThreadRouteView-DlgAAOCp.js → ChatThreadRouteView-C43W0PEz.js} +1 -1
- package/dist/client/assets/CommandPaletteDialog-IHOe0hOG.js +1 -0
- package/dist/client/assets/{CompositeItem-F3NGn6aG.js → CompositeItem-ClLCuzeJ.js} +1 -1
- package/dist/client/assets/{CompositeRoot-CmJGfRtc.js → CompositeRoot-Bdsr9eHn.js} +1 -1
- package/dist/client/assets/{ConnectionsSettings-Ccn8q4fG.js → ConnectionsSettings-tmBjGOPj.js} +2 -2
- package/dist/client/assets/{DiagnosticsSettings-QXpjXOrH.js → DiagnosticsSettings-CbCEgaau.js} +1 -1
- package/dist/client/assets/{DialogHandle-C4uSr9wX.js → DialogHandle-CitVLvYq.js} +1 -1
- package/dist/client/assets/{DialogPopup-Dck8r8Hn.js → DialogPopup-CfaEr9jv.js} +1 -1
- package/dist/client/assets/DialogRoot-CyEOjgGH.js +1 -0
- package/dist/client/assets/{DialogTitle-CCedPAjV.js → DialogTitle-BUkU0qXf.js} +1 -1
- package/dist/client/assets/{DialogTrigger-CYJ7_YcV.js → DialogTrigger-CEjWue7M.js} +1 -1
- package/dist/client/assets/{DialogViewport-D-CrTM-P.js → DialogViewport-Cyc_ye5w.js} +1 -1
- package/dist/client/assets/{DraftChatThreadRouteView-DFMY6O91.js → DraftChatThreadRouteView-BSA67nKa.js} +1 -1
- package/dist/client/assets/{ExternalIdentityWeb.logic-D64j70NH.js → ExternalIdentityWeb.logic-BqdBjAua.js} +1 -1
- package/dist/client/assets/GlassSurface-B3cq28tB.js +1 -0
- package/dist/client/assets/{HostedConnectionControls-BC4kVWTa.js → HostedConnectionControls-S2Wr9fiZ.js} +1 -1
- package/dist/client/assets/HostedHubRoot-DK9zP4tJ.js +1 -0
- package/dist/client/assets/{HostedNativeAuthorizationRoute-Df0oSrLR.js → HostedNativeAuthorizationRoute-CKnLbCOH.js} +1 -1
- package/dist/client/assets/{HostedRelayTrustNotice-ffS_O2AX.js → HostedRelayTrustNotice-CbF_SOpf.js} +1 -1
- package/dist/client/assets/{Icons-CT3nd2MA.js → Icons-DZpTOLIb.js} +1 -1
- package/dist/client/assets/{IntegrationsSettingsPanel-BHyy-VM0.js → IntegrationsSettingsPanel-BdBEGIyL.js} +1 -1
- package/dist/client/assets/KeybindingsSettings-Bye1H9Sx.js +7 -0
- package/dist/client/assets/{McpServersSettings-UthT1T80.js → McpServersSettings-D0U0g2q7.js} +1 -1
- package/dist/client/assets/{MobileSheet-CkeG6_SP.js → MobileSheet-BPvuTPR6.js} +1 -1
- package/dist/client/assets/{NewWorktreeDialog-DTZnArOC.js → NewWorktreeDialog-C_xJCZWF.js} +1 -1
- package/dist/client/assets/{NoActiveThreadState-jcEAWu7N.js → NoActiveThreadState-Cfn_Wwnf.js} +1 -1
- package/dist/client/assets/{NodeSecuritySettings-DPqjRphc.js → NodeSecuritySettings-DUQNZJqJ.js} +1 -1
- package/dist/client/assets/{OpinionatedPluginsSettings-BSy3F4v6.js → OpinionatedPluginsSettings-D44efcv7.js} +1 -1
- package/dist/client/assets/{PhoneGetAppInterstitial-B2mrJtgM.js → PhoneGetAppInterstitial-CzduFI4-.js} +1 -1
- package/dist/client/assets/{PhoneGetAppInterstitialBackdrop-B8vfJdZd.js → PhoneGetAppInterstitialBackdrop-CJ44QRCp.js} +1 -1
- package/dist/client/assets/PhoneHome-BLEJm5TG.js +1 -0
- package/dist/client/assets/PhoneSettingsSurface-CqetLTIm.js +1 -0
- package/dist/client/assets/{ProjectFavicon-BhQnkxbx.js → ProjectFavicon-DrBXI2cH.js} +1 -1
- package/dist/client/assets/{ProviderModelPicker-COg6CGM4.js → ProviderModelPicker-CyID3P1C.js} +1 -1
- package/dist/client/assets/{ProviderUpdateLaunchNotification.logic-BkoRegCn.js → ProviderUpdateLaunchNotification.logic-C6VoLD-w.js} +1 -1
- package/dist/client/assets/ProvidersSettingsPanel-BHmpXUIM.js +1 -0
- package/dist/client/assets/{RedactedSensitiveText-CxtaUiKH.js → RedactedSensitiveText-CZwFEoNn.js} +1 -1
- package/dist/client/assets/RootAppShell-BVXRShhe.js +6 -0
- package/dist/client/assets/{RycoLetterMark-Bk0kvGJ_.js → RycoLetterMark-C-fvI9UB.js} +1 -1
- package/dist/client/assets/SettingsDialog-CnETTu23.js +1 -0
- package/dist/client/assets/{SettingsPanels-D8Xy3pPC.js → SettingsPanels-C3HDrmQq.js} +3 -3
- package/dist/client/assets/{SettingsPanels.editor-B2x4U4rW.js → SettingsPanels.editor-DI8Z5rsl.js} +1 -1
- package/dist/client/assets/SourceControlSettings-BG4tsvql.js +1 -0
- package/dist/client/assets/{StatisticsPage-C38pI2_b.js → StatisticsPage-dy_aYqvS.js} +1 -1
- package/dist/client/assets/{StatisticsPanel-6sINT28-.js → StatisticsPanel-CeRJBu65.js} +1 -1
- package/dist/client/assets/{StatisticsSettingsLink-Cx43bOeo.js → StatisticsSettingsLink-ChlwCDG0.js} +1 -1
- package/dist/client/assets/ThreadStatusIndicators-D-ioX09X.js +0 -0
- package/dist/client/assets/{ThreadTerminalDrawer-C4NJu8Qs.js → ThreadTerminalDrawer-BvGaRxBP.js} +1 -1
- package/dist/client/assets/{ThreadWorkspacePanel-D9qlHXCA.js → ThreadWorkspacePanel-BAWm7mGl.js} +2 -2
- package/dist/client/assets/{ToolbarRootContext-BgqqXVly.js → ToolbarRootContext-k-_m5nCN.js} +1 -1
- package/dist/client/assets/{WorkItemsTab-BDAeQe4D.js → WorkItemsTab-Q2V2EuvK.js} +12 -12
- package/dist/client/assets/{alert-LqMhbdE9.js → alert-BymbRVPf.js} +1 -1
- package/dist/client/assets/{alert-dialog-DxoA6ky8.js → alert-dialog-Gym8_p4Q.js} +1 -1
- package/dist/client/assets/appearancePreferences-BhNRCg6W.js +1 -0
- package/dist/client/assets/authorization-BwQZHweJ.js +1 -0
- package/dist/client/assets/{badge-CXw6fWrB.js → badge-BQI7J3Sg.js} +1 -1
- package/dist/client/assets/{branding-DeKsIp6g.js → branding-DqHDcyzW.js} +1 -1
- package/dist/client/assets/{button-BAbJxRzt.js → button-Wf_1nfeu.js} +1 -1
- package/dist/client/assets/{capabilities-BkVqeGLQ.js → capabilities-BrllgEYz.js} +1 -1
- package/dist/client/assets/{chatThreadActions-DQ8aOQ1g.js → chatThreadActions-BGkJmj6T.js} +1 -1
- package/dist/client/assets/{collapsible-dxy6kc2k.js → collapsible-GOpRckDq.js} +1 -1
- package/dist/client/assets/{command-CGNKG_Oe.js → command-Dx5YM54H.js} +1 -1
- package/dist/client/assets/composerDraftStore-DC2r8dcu.js +11 -0
- package/dist/client/assets/{data-list-CYKBxN62.js → data-list-BSiCZBKn.js} +1 -1
- package/dist/client/assets/{desktopUpdateAtoms-B9iJXSdW.js → desktopUpdateAtoms-DkmoIGr0.js} +1 -1
- package/dist/client/assets/{desktopWorkspace-B-cSBe8H.js → desktopWorkspace-Ddm531g5.js} +1 -1
- package/dist/client/assets/{device-DfIh5pQV.js → device-B0aqBYM1.js} +1 -1
- package/dist/client/assets/{dialog-DQsYchqu.js → dialog-CUxw5AxI.js} +1 -1
- package/dist/client/assets/{draft-input-CkzOk8BY.js → draft-input-CpfrGQ1h.js} +1 -1
- package/dist/client/assets/editorPreferences-SOMXdQpi.js +1 -0
- package/dist/client/assets/{empty-DwzqNgCP.js → empty-D420OZA9.js} +1 -1
- package/dist/client/assets/{env-B4arEvJg.js → env-Bf33qXdb.js} +1 -1
- package/dist/client/assets/{getPseudoElementBounds-X62ElHN8.js → getPseudoElementBounds-nDGTWECG.js} +1 -1
- package/dist/client/assets/{group-D9ER9giz.js → group-Cq4Llttm.js} +1 -1
- package/dist/client/assets/{index-Bntnmu6O.js → index-BL8_ra0g.js} +2 -2
- package/dist/client/assets/{input-CHEwW3oH.js → input-Dl4N9ZfE.js} +1 -1
- package/dist/client/assets/{kbd-DCGQZk18.js → kbd-CqoZVQfv.js} +1 -1
- package/dist/client/assets/{keybindings-CWJ7E9ZI.js → keybindings-DQzcPjMv.js} +1 -1
- package/dist/client/assets/{label-CVFHsLFO.js → label-x5DgpBI_.js} +1 -1
- package/dist/client/assets/{lib-qiiNMGgU.js → lib-BXIqHSZx.js} +1 -1
- package/dist/client/assets/{liquidGlass-CPsvmaF0.js → liquidGlass-yFkZrRk5.js} +1 -1
- package/dist/client/assets/{logging-M8H3z7rQ.js → logging-CZlHfeu2.js} +1 -1
- package/dist/client/assets/main-B7T7on1T.css +2 -0
- package/dist/client/assets/main-J4YlUJad.js +9 -0
- package/dist/client/assets/{menu-Dvxh8sD5.js → menu-BuDpxm_Q.js} +1 -1
- package/dist/client/assets/{popover-CuH9Yrj3.js → popover-DuprDUaB.js} +1 -1
- package/dist/client/assets/primary-CJx2nSkc.js +2 -0
- package/dist/client/assets/projectPaths-DrelgodZ.js +1 -0
- package/dist/client/assets/{providerDriverMeta-I0TSo-QI.js → providerDriverMeta-D27Koh7Q.js} +1 -1
- package/dist/client/assets/{providerIconUtils-CzSa_16f.js → providerIconUtils-CtOHwjWL.js} +1 -1
- package/dist/client/assets/providerInstances-BPwEwwpF.js +1 -0
- package/dist/client/assets/providerModels-BPwEwwpF.js +1 -0
- package/dist/client/assets/{qr-code-Bddq6K7S.js → qr-code-BVfzPOP3.js} +1 -1
- package/dist/client/assets/{radio-group-CBZFr4C8.js → radio-group-rgmJqPI7.js} +1 -1
- package/dist/client/assets/{resolveAriaLabelledBy-CD_ugzhJ.js → resolveAriaLabelledBy-l4SuqStl.js} +1 -1
- package/dist/client/assets/{rightPanelRouteSearch-DB5gQGHK.js → rightPanelRouteSearch-DmpObL1z.js} +1 -1
- package/dist/client/assets/runtime-DYzjhL5M.js +1 -0
- package/dist/client/assets/{scroll-area-Drsa8bNB.js → scroll-area-DMs8l4bb.js} +1 -1
- package/dist/client/assets/{scrollEdges-B-cqxY4l.js → scrollEdges-DWTOweRb.js} +1 -1
- package/dist/client/assets/{select-BYbVr-yg.js → select-Djwp8HDm.js} +1 -1
- package/dist/client/assets/{separator-CdS5bi4Z.js → separator-rjtf5Q3V.js} +1 -1
- package/dist/client/assets/{session-logic-wxhvMgEN.js → session-logic-DLEAZb3K.js} +2 -2
- package/dist/client/assets/{settingsDialogStore-ygYoScKe.js → settingsDialogStore-Dbykwvfs.js} +1 -1
- package/dist/client/assets/{settingsLayout-D8glO7f1.js → settingsLayout-C7bl9Xi4.js} +1 -1
- package/dist/client/assets/{sheet-BO78gIKZ.js → sheet-CQIQYfOM.js} +1 -1
- package/dist/client/assets/{sidebar-Dm6l2GA6.js → sidebar-BdDOvXe8.js} +1 -1
- package/dist/client/assets/sidebarProjectFolders-D_Me0oJ8.js +4 -0
- package/dist/client/assets/{sidebarStatusText-D0HT0fek.js → sidebarStatusText-BF6odB03.js} +1 -1
- package/dist/client/assets/{skeleton-CvQSeJbw.js → skeleton-Mgh4Gx9x.js} +1 -1
- package/dist/client/assets/{spinner-ClF0jOcX.js → spinner-CzzUdFeE.js} +1 -1
- package/dist/client/assets/{src-Vf4LVnMX.js → src-Ca7Gag3m.js} +1 -1
- package/dist/client/assets/storeSelectors-D7HbqO4E.js +1 -0
- package/dist/client/assets/{switch-BTGo9Yip.js → switch-CntUxI1A.js} +1 -1
- package/dist/client/assets/{terminal-links-CZ3c9AbA.js → terminal-links-CUFISn8U.js} +1 -1
- package/dist/client/assets/{textarea-RFPODxWW.js → textarea-C8QxddDb.js} +1 -1
- package/dist/client/assets/threadPinning-BIV4KXZU.js +1 -0
- package/dist/client/assets/{threadPriorityRefreshRuntime-tRDgvBzr.js → threadPriorityRefreshRuntime-B-pVYK_y.js} +1 -1
- package/dist/client/assets/{toast-CcSCAm4B.js → toast-Cw7bXJzg.js} +1 -1
- package/dist/client/assets/{toggle-I6h33Cu5.js → toggle-Bi9uP4Hb.js} +1 -1
- package/dist/client/assets/{toggle-group-mLIkiJtU.js → toggle-group-LcgyMgj5.js} +1 -1
- package/dist/client/assets/{tooltip-C8sAONBj.js → tooltip-t3Nrleyq.js} +1 -1
- package/dist/client/assets/types-D7HbqO4E.js +1 -0
- package/dist/client/assets/{uiStateStore-B6pjzSjj.js → uiStateStore-BW2WnK4k.js} +1 -1
- package/dist/client/assets/useAtlassian-a-MaAd0k.js +0 -0
- package/dist/client/assets/{useButton-D__1LqCF.js → useButton-DUuWgIMw.js} +1 -1
- package/dist/client/assets/{useCompositeListItem-Cmr_nuuG.js → useCompositeListItem-CL5mJqCb.js} +1 -1
- package/dist/client/assets/{useDebouncedValue-DHjoudTq.js → useDebouncedValue-jDDWNjgt.js} +1 -1
- package/dist/client/assets/{useFloatingRootContext-D5EZmrCa.js → useFloatingRootContext-C4I8IxtL.js} +1 -1
- package/dist/client/assets/{useHandleNewThread-Bvz-DKgn.js → useHandleNewThread-820pBJCC.js} +1 -1
- package/dist/client/assets/{useLabelableId-DnQJ7amm.js → useLabelableId-KX33mhBC.js} +1 -1
- package/dist/client/assets/{useLocation-CDeYzWW6.js → useLocation-B4QlXdMt.js} +1 -1
- package/dist/client/assets/{useOpenInteractionType-CjtpACKR.js → useOpenInteractionType-DjM9MBY7.js} +1 -1
- package/dist/client/assets/{usePhoneThreadActions-CAgIq9aZ.js → usePhoneThreadActions-DxxWMYgC.js} +1 -1
- package/dist/client/assets/{usePopupViewport-BuhsNdVy.js → usePopupViewport-CAMlnyaP.js} +1 -1
- package/dist/client/assets/{useScrollLock-D3tMGsRk.js → useScrollLock-CAPfesBT.js} +1 -1
- package/dist/client/assets/{useStatistics-CiLROMJP.js → useStatistics-CWasDzsV.js} +2 -2
- package/dist/client/assets/{useSwipeDismiss-CbgDJvw1.js → useSwipeDismiss-BZsYSBgq.js} +1 -1
- package/dist/client/assets/{useTheme-DiC-5xCb.js → useTheme-By1kfyiU.js} +1 -1
- package/dist/client/assets/{useThreadActions-Vew3ScxG.js → useThreadActions-MOjDrEnS.js} +1 -1
- package/dist/client/assets/{useTriggerFocusGuards-CrugmkhX.js → useTriggerFocusGuards-D5z439rn.js} +1 -1
- package/dist/client/assets/{useValueChanged-MQtIzPIU.js → useValueChanged-D0CHQQwP.js} +1 -1
- package/dist/client/assets/{utils-BofFIn5Y.js → utils-B76_2Yk7.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/{collectUint8StreamText-Bb52hlpd.cjs → collectUint8StreamText-B9B7bGv9.cjs} +46 -10
- package/dist/{collectUint8StreamText-EDg4F0TU.mjs → collectUint8StreamText-RzKEq2NY.mjs} +35 -11
- package/dist/{makeManagedServerProvider-itynW7xv.cjs → makeManagedServerProvider-BF1eBatf.cjs} +1 -1
- package/dist/{makeManagedServerProvider-Cf8bNWwc.mjs → makeManagedServerProvider-BuG2fLP8.mjs} +1 -1
- package/package.json +1 -1
- package/dist/client/assets/AppearanceSettings-CYbSApl4.js +0 -1
- package/dist/client/assets/ChatRightPanel-DVxRdZWT.js +0 -27
- package/dist/client/assets/CommandPaletteDialog-BnJURcy7.js +0 -1
- package/dist/client/assets/DialogRoot-BpIvUdm7.js +0 -1
- package/dist/client/assets/GlassSurface-C3IIWMu9.js +0 -1
- package/dist/client/assets/HostedHubRoot-pBGVub10.js +0 -1
- package/dist/client/assets/KeybindingsSettings-BfkONqmZ.js +0 -7
- package/dist/client/assets/PhoneHome-C-ttaKuE.js +0 -1
- package/dist/client/assets/PhoneSettingsSurface-CJddundi.js +0 -1
- package/dist/client/assets/ProvidersSettingsPanel-C3aPyCrN.js +0 -1
- package/dist/client/assets/RootAppShell-3T2sBtpP.js +0 -6
- package/dist/client/assets/SettingsDialog-krsStFrf.js +0 -1
- package/dist/client/assets/SourceControlSettings-KIx9EfEZ.js +0 -1
- package/dist/client/assets/ThreadStatusIndicators-CL0KGLlj.js +0 -0
- package/dist/client/assets/appearancePreferences-COvj0WMT.js +0 -1
- package/dist/client/assets/authorization-mIJKV2yp.js +0 -1
- package/dist/client/assets/composerDraftStore-CdJJZe42.js +0 -11
- package/dist/client/assets/editorPreferences-0DWMgcci.js +0 -1
- package/dist/client/assets/main-BjVnVob0.js +0 -9
- package/dist/client/assets/main-DaYHZt-J.css +0 -2
- package/dist/client/assets/panel-right-BodNpkM9.js +0 -1
- package/dist/client/assets/primary-OskAInOO.js +0 -2
- package/dist/client/assets/projectPaths-SSsIvt0g.js +0 -1
- package/dist/client/assets/providerInstances-BJcfB_9E.js +0 -1
- package/dist/client/assets/providerModels-BJcfB_9E.js +0 -1
- package/dist/client/assets/runtime-DfGHeCnR.js +0 -1
- package/dist/client/assets/sidebarProjectFolders-CGVDJ0ZT.js +0 -4
- package/dist/client/assets/storeSelectors-Bpr2pdhU.js +0 -1
- package/dist/client/assets/types-Bpr2pdhU.js +0 -1
- package/dist/client/assets/useAppearancePreference-BlLlxQl7.js +0 -1
- package/dist/client/assets/useAtlassian-DC0XOw4u.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{It as n}from"./composerDraftStore-
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{It as n}from"./composerDraftStore-DC2r8dcu.js";import{Bt as r,D as i,E as a,Gn as o,I as s,Mn as c,O as l,T as u,U as d,Xn as f,Z as p,_ as m,b as h,c as g,g as _,h as v,hn as y,k as b,l as x,on as S,v as C,w,zt as T}from"./usePopupViewport-CAMlnyaP.js";import{d as E,t as D}from"./useRenderElement-DchFnsR8.js";import{n as O,t as k}from"./useScrollLock-CAPfesBT.js";var A=e(t(),1),j=A.createContext(void 0);function M(e){let t=A.useContext(j);if(!e&&t===void 0)throw Error(E(27));return t}var N=A.createContext(void 0);function P(){let e=A.useContext(N);if(e===void 0)throw Error(E(26));return e}var F=n(),I={...o,...f,nestedDialogOpen(e){return e?{"data-nested-dialog-open":``}:null}},L=A.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=M(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,F.jsx)(N.Provider,{value:n,children:(0,F.jsxs)(p,{ref:t,...r,children:[a&&o===!0&&(0,F.jsx)(O,{ref:i.context.internalBackdropRef,inert:x(!s)}),e.children]})}):null});function R({store:e,parentContext:t,isDrawer:n}){let a=e.useState(`open`),o=e.useState(`disablePointerDismissal`),s=e.useState(`modal`),l=e.useState(`popupElement`),u=e.useState(`floatingRootContext`),[f,p]=A.useState(0),[m,h]=A.useState(0),g=f===0,_=d(u,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:s===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=r(t);if(g&&!o){if(s){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||T(n,l)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:g});return k(a&&s===!0,l),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{p(e),h(t)}),c(()=>(t?.onNestedDialogOpen&&(a?t.onNestedDialogOpen(f+1,m+ +!!n):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&a&&t.onNestedDialogOpen(0,0)}),[n,a,f,m,t]),i(e,{activeTriggerProps:_.reference,inactiveTriggerProps:_.trigger,popupProps:_.floating,nestedOpenDialogCount:f,nestedOpenDrawerCount:m}),null}var z={...m,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},B=class extends s{constructor(e,t,n){let r=new C,i=H(e,r,t,n);super(i,U(r),z)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};w(n,e,t.trigger),this.update(n)}};function V(){let e=new C;return new g(Object.freeze(H(void 0,e)),Object.freeze(U(e)),z)}function H(e,t,n,r=!1){let i={...v(),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e};return i.floatingRootContext=_(t,n,r),i}function U(e){return{popupRef:A.createRef(),backdropRef:A.createRef(),internalBackdropRef:A.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function W(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:o,onOpenChangeComplete:s,disablePointerDismissal:c=!1,modal:d=!0,actionsRef:f,handle:p,triggerId:m,defaultTriggerId:g=null}=t,_=e===`drawer`,v=e===`alert-dialog`,x=v?!0:d,C=v||c,w=v?`alertdialog`:`dialog`,T=M(!0),E={modal:x,disablePointerDismissal:C,nested:T!=null,role:w},D=l((e,t)=>new B({open:i,openProp:r,activeTriggerId:g,triggerIdProp:m,...E},e,t),!0);D.useControlledProp(`openProp`,r),D.useControlledProp(`triggerIdProp`,m),D.useSyncedValues(E),D.useContextCallback(`onOpenChange`,o),D.useContextCallback(`onOpenChangeComplete`,s);let O=D.useState(`open`),k=D.useState(`mounted`),N=D.useState(`payload`);b(D,O),u(D);let{forceUnmount:P}=a(O,D);A.useImperativeHandle(f,()=>({unmount:P,close:()=>D.setOpen(!1,S(y))}),[P,D]);let I=O||k;return(0,F.jsxs)(j.Provider,{value:D,children:[p&&(0,F.jsx)(h,{handle:p,store:D}),I&&(0,F.jsx)(R,{store:D,parentContext:T?.context,isDrawer:_}),typeof n==`function`?n({payload:N}):n]})}var G=A.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=P(),c=M(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`transitionStatus`),f=c.useState(`nestedOpenDialogCount`),p=c.useState(`mounted`),m=c.useStateSetter(`viewportElement`);return D(`div`,e,{enabled:s||p,state:{open:l,nested:u,transitionStatus:d,nestedDialogOpen:f>0},ref:[t,m],stateAttributesMapping:I,props:[{role:`presentation`,hidden:!p,style:{pointerEvents:l?void 0:`none`},children:a},o]})});export{I as a,L as i,W as n,P as o,V as r,M as s,G as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{Dt as n,Jt as r}from"./runtime-
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{Dt as n,Jt as r}from"./runtime-DYzjhL5M.js";import{Dt as i}from"./primary-CJx2nSkc.js";import{It as a,P as o}from"./composerDraftStore-DC2r8dcu.js";import{c as ee}from"./useSwipeDismiss-BZsYSBgq.js";import{a as s,c,i as l,l as u,n as te,o as d,s as f,t as ne,u as p}from"./rightPanelRouteSearch-DmpObL1z.js";import{t as re}from"./useNavigate-2tVq4iZ2.js";import{a as ie,c as ae,d as oe,f as se,i as m,l as ce,n as le,o as ue,p as de,r as fe,t as h,u as pe}from"./ChatRightPanel-DUwLYKbp.js";import{s as me}from"./tabSwitchInstrumentation-CLDM7g1_.js";import"./device-B0aqBYM1.js";import{t as he}from"./utils-B76_2Yk7.js";import"./storeSelectors-D7HbqO4E.js";import{t as ge}from"./usePresentationTier-B_SCFvN7.js";import{o as g}from"./sidebar-BdDOvXe8.js";import{n as _e}from"./NoActiveThreadState-Cfn_Wwnf.js";var _=e(t(),1),v=a();function y({rawDraftId:e,search:t}){let a=re(),y=o.make(e),b=`draft:${y}`,ve=(0,_.useCallback)(e=>{a({to:`/draft/$draftId`,params:{draftId:y},replace:!0,search:e})},[y,a]),x=pe({threadKey:b,search:t,replaceSearch:ve}),S=de(y),C=r((0,_.useMemo)(()=>n(S?.threadId??null),[S?.threadId])),w=ae(C),T=(0,_.useMemo)(()=>S?.promotedTo?w?S.promotedTo:null:C?{environmentId:C.environmentId,threadId:C.id}:null,[S?.promotedTo,C,w]),E=x.diff===`1`,D=x.preview===`1`,O=ne(x),k=te(x),A=x.workspaceTab===`agent`&&x.workspaceAgentKey?x.workspaceAgentKey:null,j=me(ce),M=ge(),N=T?`${T.environmentId}:${T.threadId}`:null,P=i(e=>N?e.pendingOpenByThreadKey[N]:void 0),F=i(e=>e.consumeOpenRequest),ye=_e(),{maximized:I,toggleMaximized:be}=se({threadKey:y,open:k,canMaximize:!j&&M!==`phone`}),[L,R]=(0,_.useState)(()=>({draftId:y,hasOpenedDiff:E,hasOpenedPreview:D,hasOpenedTerminal:O===`terminal`,hasOpenedSimulator:O===`simulator`,hasOpenedAgents:O===`agents`,openedAgentKeys:A?[A]:[]}));(0,_.useEffect)(()=>{!T||!P||M===`phone`||(F(T.environmentId,T.threadId),a({to:`/draft/$draftId`,params:{draftId:y},search:e=>c(e)}))},[T,F,y,a,P,M]);let z=L.draftId===y?L.hasOpenedDiff:E,B=L.draftId===y?L.hasOpenedPreview:D,V=L.draftId===y?L.hasOpenedTerminal:O===`terminal`,H=L.draftId===y?L.hasOpenedSimulator:O===`simulator`,U=L.draftId===y?L.hasOpenedAgents:O===`agents`,W=(0,_.useMemo)(()=>{let e=L.draftId===y?L.openedAgentKeys:A?[A]:[];return A&&!e.includes(A)?[...e,A]:e},[A,y,L]),[G,K]=(0,_.useState)(()=>O??`files`),q=(0,_.useMemo)(()=>{let e=[];return(B||O===`files`)&&e.push(`files`),(z||O===`review`)&&e.push(`review`),(V||O===`terminal`)&&e.push(`terminal`),(H||O===`simulator`)&&e.push(`simulator`),(U||O===`agents`)&&e.push(`agents`),e},[U,z,B,H,V,O]),J=(0,_.useCallback)(e=>{K(e),R(t=>{let n={draftId:y,hasOpenedDiff:(t.draftId===y?t.hasOpenedDiff:E)||e===`review`,hasOpenedPreview:(t.draftId===y?t.hasOpenedPreview:D)||e===`files`,hasOpenedTerminal:(t.draftId===y?t.hasOpenedTerminal:O===`terminal`)||e===`terminal`,hasOpenedSimulator:(t.draftId===y?t.hasOpenedSimulator:O===`simulator`)||e===`simulator`,hasOpenedAgents:(t.draftId===y?t.hasOpenedAgents:O===`agents`)||e===`agents`,openedAgentKeys:t.draftId===y?t.openedAgentKeys:W};return t.draftId===n.draftId&&t.hasOpenedDiff===n.hasOpenedDiff&&t.hasOpenedPreview===n.hasOpenedPreview&&t.hasOpenedTerminal===n.hasOpenedTerminal&&t.hasOpenedSimulator===n.hasOpenedSimulator&&t.hasOpenedAgents===n.hasOpenedAgents&&t.openedAgentKeys===n.openedAgentKeys?t:n})},[E,y,W,D,O]),Y=(0,_.useCallback)(()=>{a({to:`/draft/$draftId`,params:{draftId:y},search:e=>fe(e)})},[y,a]),X=(0,_.useCallback)(()=>{a({to:`/draft/$draftId`,params:{draftId:y},search:e=>{let t=W[W.length-1];return G===`agent`&&t?l(e,t):G===`files`&&B?d(e):G===`review`&&z?f(e):G===`terminal`&&V?u(e):G===`simulator`&&H?c(e):G===`agents`&&U?s(e):B?d(e):z?f(e):V?u(e):H?c(e):U?s(e):t?l(e,t):p(e)}})},[y,U,z,B,H,V,G,a,W]),Z=(0,_.useCallback)(()=>{if(k){Y();return}X()},[Y,X,k]),Q=(0,_.useCallback)(e=>{if(e.mode===`agent`){let t=W.filter(t=>t!==e.agentKey);R(e=>({draftId:y,hasOpenedDiff:e.draftId===y?e.hasOpenedDiff:z,hasOpenedPreview:e.draftId===y?e.hasOpenedPreview:B,hasOpenedTerminal:e.draftId===y?e.hasOpenedTerminal:V,hasOpenedSimulator:e.draftId===y?e.hasOpenedSimulator:H,hasOpenedAgents:e.draftId===y?e.hasOpenedAgents:U,openedAgentKeys:t})),O===`agent`&&A===e.agentKey&&a({to:`/draft/$draftId`,params:{draftId:y},search:e=>{let n=t[t.length-1];return n?l(e,n):B?d(e):z?f(e):V?u(e):H?c(e):U?s(e):p(e)}});return}let t=e.mode===`review`?!1:z||O===`review`,n=e.mode===`files`?!1:B||O===`files`,r=e.mode===`terminal`?!1:V||O===`terminal`,i=e.mode===`simulator`?!1:H||O===`simulator`,o=e.mode===`agents`?!1:U||O===`agents`;R(e=>{let a={draftId:y,hasOpenedDiff:t,hasOpenedPreview:n,hasOpenedTerminal:r,hasOpenedSimulator:i,hasOpenedAgents:o,openedAgentKeys:e.draftId===y?e.openedAgentKeys:W};return e.draftId===a.draftId&&e.hasOpenedDiff===a.hasOpenedDiff&&e.hasOpenedPreview===a.hasOpenedPreview&&e.hasOpenedTerminal===a.hasOpenedTerminal&&e.hasOpenedSimulator===a.hasOpenedSimulator&&e.hasOpenedAgents===a.hasOpenedAgents&&e.openedAgentKeys===a.openedAgentKeys?e:a}),O===e.mode&&a({to:`/draft/$draftId`,params:{draftId:y},search:a=>e.mode!==`files`&&n?d(a):e.mode!==`review`&&t?f(a):e.mode!==`terminal`&&r?u(a):e.mode!==`simulator`&&i?c(a):e.mode!==`agents`&&o?s(a):p(a)})},[A,y,U,z,B,H,V,a,W,O]);if((0,_.useEffect)(()=>{O!==null&&(K(O),J(O))},[J,O]),(0,_.useEffect)(()=>{A&&R(e=>{let t=e.draftId===y?e.openedAgentKeys:[];return t.includes(A)?e.draftId===y?e:{draftId:y,hasOpenedDiff:z,hasOpenedPreview:B,hasOpenedTerminal:V,hasOpenedSimulator:H,hasOpenedAgents:U,openedAgentKeys:t}:{draftId:y,hasOpenedDiff:e.draftId===y?e.hasOpenedDiff:E,hasOpenedPreview:e.draftId===y?e.hasOpenedPreview:D,hasOpenedTerminal:e.draftId===y?e.hasOpenedTerminal:O===`terminal`,hasOpenedSimulator:e.draftId===y?e.hasOpenedSimulator:O===`simulator`,hasOpenedAgents:e.draftId===y?e.hasOpenedAgents:O===`agents`,openedAgentKeys:[...t,A]}})},[A,E,y,U,z,B,H,V,D,O]),(0,_.useEffect)(()=>{T&&(oe(b,`${T.environmentId}:${T.threadId}`),a({to:`/$environmentId/$threadId`,params:ee(T),replace:!0}))},[T,a,b]),(0,_.useEffect)(()=>{S||T||a({to:`/`,replace:!0})},[T,S,a]),T)return(0,v.jsx)(g,{className:`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,children:(0,v.jsx)(m,{environmentId:T.environmentId,threadId:T.threadId,routeKind:`server`})});if(!S)return null;let xe=k||O===`review`||z||O===`files`||B||O===`terminal`||V||O===`simulator`||H||O===`agents`||U||O===`agent`||W.length>0,Se=k||O===`review`||z||O===`files`||B||O===`terminal`||V||O===`agent`||W.length>0,$=k?O:G;return M===`phone`?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(g,{className:`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,children:(0,v.jsx)(m,{draftId:y,environmentId:S.environmentId,threadId:S.threadId,onDiffPanelOpen:()=>J(`review`),onPreviewPanelOpen:()=>J(`files`),onTerminalPanelOpen:()=>J(`terminal`),onAgentPanelOpen:()=>J(`agent`),workspacePanelOpen:k,onToggleWorkspacePanel:Z,routeKind:`draft`})}),(0,v.jsx)(ue,{label:`Workspace`,open:k,onClose:Y,children:Se?(0,v.jsx)(h,{mode:`phone`,panelMode:$,openedPanelModes:q,openedAgentKeys:W,onClosePanelTab:Q}):null})]}):j?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(g,{className:`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,children:(0,v.jsx)(m,{draftId:y,environmentId:S.environmentId,threadId:S.threadId,onDiffPanelOpen:()=>J(`review`),onPreviewPanelOpen:()=>J(`files`),onTerminalPanelOpen:()=>J(`terminal`),onAgentPanelOpen:()=>J(`agent`),workspacePanelOpen:k,onToggleWorkspacePanel:Z,routeKind:`draft`})}),(0,v.jsx)(ie,{open:k,onClose:Y,children:xe?(0,v.jsx)(h,{mode:`sheet`,panelMode:$,openedPanelModes:q,openedAgentKeys:W,onClosePanelTab:Q}):null})]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(g,{className:he(`h-svh min-h-0 overflow-hidden overscroll-y-none bg-background text-foreground md:h-dvh`,I&&`w-0 flex-none`),inert:I?!0:void 0,children:(0,v.jsx)(m,{draftId:y,environmentId:S.environmentId,threadId:S.threadId,onDiffPanelOpen:()=>J(`review`),onPreviewPanelOpen:()=>J(`files`),onTerminalPanelOpen:()=>J(`terminal`),onAgentPanelOpen:()=>J(`agent`),workspacePanelOpen:k,onToggleWorkspacePanel:Z,routeKind:`draft`})}),(0,v.jsx)(le,{open:k,panelMode:$,openedPanelModes:q,openedAgentKeys:W,onClosePanelTab:Q,onClose:Y,onOpen:X,renderContent:xe,maximized:I,onToggleMaximized:be,reserveChromeInset:I&&ye})]})}export{y as DraftChatThreadRouteView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{v as e}from"./authorization-
|
|
1
|
+
import{v as e}from"./authorization-BwQZHweJ.js";function t(e){return e.status===`refused`&&e.errorCode===`step_up_required`}function n(t){return t===e}function r(e,t){return!e.inferredErrorCode||t<3}var i=`The Hub refused this change every time. It answers a missing authenticator code and other refusals identically, so if the codes you entered were current then something else is blocking this — sign in again with a passkey, or try again later.`;function a(e,t,n){return!e||n&&t===`step_up_required`?null:e}function o(e){return e.revokedAt!==null}function s(e){return e.filter(e=>!o(e))}function c(e){return e.toSorted((e,t)=>!!o(e)-+!!o(t))}function l(e){return s(e).filter(e=>e.backupState===!0).length}function u(e,t){if(t!==`ready`)return null;let n=s(e).length;return n===0?{variant:`error`,title:`No usable passkey on this account`,description:`Without one you can only get back in through a fallback credential. Adding a passkey is the only action on this page that makes the account stronger.`,actionLabel:`Add your first passkey`}:n===1?{variant:`warning`,title:`One passkey on this account`,description:`If you lose this device you fall back to a password or a recovery code. Add a second passkey on another device.`,actionLabel:`Add another passkey`}:null}function d(e){return e.label?.trim()||`Unnamed passkey (${e.id.slice(0,12)}…)`}function f(e){return e.backupState===!0?`Synced to your password manager`:e.backupEligible===!0?`Can be synced, not yet backed up`:e.backupEligible===!1?`Tied to this device only`:null}function p(e){let t=e.trim();return t.length===0?null:t}function m(e){return e.replace(/\D/gu,``).slice(0,16)}function h(e){return m(e).length>=6}function g(e,t){return e.length===0?`Enter a password.`:e.length>256?`Use 256 characters or fewer.`:t.length===0?`Re-enter the password to confirm it.`:e===t?null:`The two passwords do not match.`}function _(e){let t=e.trim();return t.length===0?`Enter an email address.`:t.length>254?`Use 254 characters or fewer.`:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u.test(t)?null:`Enter a valid email address.`}function v(e){return e.join(`
|
|
2
2
|
`)}var y={"set-password":`Confirm the password change`,"remove-password":`Confirm removing the password`,"revoke-totp":`Confirm removing two-factor authentication`,"request-email-verification":`Confirm the email change`,"add-passkey":`Confirm adding a passkey`,"regenerate-recovery-codes":`Confirm new recovery codes`,"connect-github":`Confirm connecting GitHub`,"disconnect-github":`Confirm disconnecting GitHub`};function b(e){return y[e]}function x(e,t){return e===0?t?`The Hub refused this change without saying why. The usual reason is that it wants a code from your authenticator app.`:`The Hub asked for a code from your authenticator app before making this change.`:t?`That did not work. The Hub answers a wrong code and other refusals identically, so this may not be about the code at all. You can try the code showing now.`:`That code was not accepted. Codes change every 30 seconds — enter the one showing now.`}function S(e){return e?.providers.find(e=>e.provider===`github`)??null}var C={external_provider_unavailable:`GitHub sign-in is temporarily unavailable. Try again later.`,external_authorization_cancelled:`GitHub authorization was cancelled.`,external_authorization_expired:`GitHub authorization expired. Start again.`,external_authorization_rejected:`GitHub could not authorize this request. Try again.`,external_identity_email_conflict:`An account already uses that verified email. Sign in another way, then connect GitHub from account settings.`,external_identity_verified_email_required:`GitHub needs a verified primary email before it can create a Ryco account.`,signup_disabled:`New account signup is closed. Linked GitHub accounts can still sign in.`,username_unavailable:`That username is unavailable. Choose another one and try again.`};function w(e){return C[e]}async function T(e){let t=await e.start({provider:`github`,intent:e.intent,returnTo:e.returnTo});e.navigate(t.authorizationUrl)}export{l as C,b as S,f as _,u as a,r as b,v as c,n as d,t as f,c as g,m as h,i,a as l,p as m,w as n,s as o,h as p,S as r,_ as s,T as t,o as u,d as v,x,g as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./utils-B76_2Yk7.js";import"./appearancePreferences-BhNRCg6W.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 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{n as r}from"./env-B4arEvJg.js";import{Ir as i,Nr as a}from"./src-Vf4LVnMX.js";import{N as o}from"./runtime-DfGHeCnR.js";import{It as s}from"./composerDraftStore-CdJJZe42.js";import{_ as c,d as l,f as u,h as d,l as f,m as p,p as m,r as h,v as g}from"./useHandleNewThread-Bvz-DKgn.js";import{t as _}from"./useNavigate-2tVq4iZ2.js";import{o as v}from"./authorization-mIJKV2yp.js";import{f as y}from"./useRenderElement-DchFnsR8.js";import{t as b}from"./chevron-down-B7C6FKzM.js";import{t as x}from"./copy-UQjKGt7t.js";import{t as S}from"./download-CQZ-m4zW.js";import{t as ee}from"./log-out-tMJm0Gk6.js";import{t as te}from"./refresh-cw-DopCMrtR.js";import{t as C}from"./shield-check-dQ-4cMKk.js";import{t as w}from"./shield-IZEIJ8r7.js";import{t as T}from"./smartphone-gNe1ynB8.js";import{t as ne}from"./user-round-Cpzx8pSw.js";import{t as E}from"./x-C1Cemsov.js";import{t as D}from"./utils-BofFIn5Y.js";import{t as O}from"./button-BAbJxRzt.js";import{t as k}from"./usePresentationTier-B_SCFvN7.js";import{a as A,i as j,n as re,o as M,s as N,t as P}from"./MobileSheet-CkeG6_SP.js";import{t as F}from"./GlassSurface-C3IIWMu9.js";import{a as ie,c as ae,i as I,n as L,o as R,r as z,s as oe,t as B}from"./HostedRelayTrustNotice-ffS_O2AX.js";import{n as V,o as se}from"./settingsSections.logic-F8RXVmAq.js";var ce=y(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),H=y(`shield-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),U=y(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),W=y(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),G=n(),K=e(t(),1),le=Object.freeze({"":`overview`,security:`security`,appearance:`appearance`}),q=Object.freeze({"sign-in":`/sign-in`,"sign-in-password":`/sign-in/password`,"sign-in-recovery-code":`/sign-in/recovery-code`,"sign-up":`/sign-up`,"sign-up-verify":`/public-signup/verify`,"reset-password":`/password-reset`,invitation:`/invitation`,setup:`/setup`,"email-verification":`/email-verification`,nodes:`/nodes`,"nodes-enroll":`/nodes/enroll`}),ue=Object.freeze([`sign-in`,`sign-up`,`public-signup`,`password-reset`,`invitation`,`setup`,`email-verification`,`nodes`,`account`]);function de(e){return e.length>1&&e.endsWith(`/`)?e.slice(0,-1):e===``?`/`:e}function fe(e){let t=de(e);if(t.startsWith(`/account`))return{kind:`account`,section:le[t.slice(8).replace(/^\//,``)]??`overview`};for(let[e,n]of Object.entries(q))if(t===n)return{kind:e};return null}function pe(e){return e.kind===`account`?e.section===`overview`?`/account`:`/account/${e.section}`:q[e.kind]}function me(e){switch(e.kind){case`sign-in`:return`Sign in`;case`sign-in-password`:return`Sign in with a password`;case`sign-in-recovery-code`:return`Use a recovery code`;case`sign-up`:return`Create your account`;case`sign-up-verify`:return`Verify your email`;case`reset-password`:return`Reset your password`;case`invitation`:return`Redeem your invitation`;case`setup`:return`Claim this Hub`;case`email-verification`:return`Email verification`;case`nodes`:return`Your nodes`;case`nodes-enroll`:return`Enroll a node`;case`account`:return e.section===`overview`?`Account`:e.section===`security`?`Security`:`Appearance`}}var he=typeof window>`u`?`/`:de(window.location.pathname),ge=new Set;function _e(){for(let e of Array.from(ge))e()}function ve(e){let t=de(e);t!==he&&(he=t,_e())}var ye=!1;function be(){ye||(ye=!0,g(()=>{ve(d().logicalPathname)}))}function xe(){return p()===null?typeof window>`u`?he:de(window.location.pathname):he}var Se=!1;function Ce(){Se||typeof window>`u`||(Se=!0,window.addEventListener(`popstate`,()=>{p()===null&&_e()}))}function we(e){return be(),Ce(),ge.add(e),()=>{ge.delete(e)}}function Te(e,t){Ee(pe(e),t)}function Ee(e,t){let n=de(e),r=p();if(r){t?.replace===!0?r.replace(n):r.push(n),ve(n);return}typeof window<`u`&&(t?.replace===!0?window.history.replaceState(window.history.state,``,n):window.history.pushState(window.history.state,``,n)),he=n,_e()}function De(){let e=(0,G.c)(2),t=(0,K.useSyncExternalStore)(we,xe),n;return e[0]===t?n=e[1]:(n=fe(t),e[0]=t,e[1]=n),n}var J=s(),Oe={unavailable:`The node from this link is not in your authorized node directory. Choose a node to continue.`,revoked:`Access to the node from this link was revoked. Choose a node to continue.`,offline:`The node from this link is offline. Choose a node to continue.`,"invalid-link":`This node link is not valid. Choose a node to continue.`},ke=null,Ae=new Set;function Y(e){if(ke!==e){ke=e;for(let e of Array.from(Ae))e()}}function je(e){return Ae.add(e),()=>{Ae.delete(e)}}function Me(){return ke===null?null:Oe[ke]}function Ne(){return(0,K.useSyncExternalStore)(je,Me)}function Pe(){return(0,K.useSyncExternalStore)(g,d)}var Fe=new Set([`node`,`draft`,`pair`,`diagnostics`,...ue]);function Ie(e){let t=/^\/([^/]+)\/([^/]+)\/?$/.exec(e);if(!t)return null;let n=t[1]??``;if(Fe.has(n))return null;try{return decodeURIComponent(n)}catch{return n}}function Le(e){let t=/^\/([^/]+)\/([^/]+)\/?$/u.exec(e);if(!t||Fe.has(t[1]??``))return null;try{return{environmentId:a.make(decodeURIComponent(t[1]??``)),threadId:i.make(decodeURIComponent(t[2]??``))}}catch{return null}}function Re(e){return e.startsWith(`/draft/`)}var X=null,Z=null,Q=null,ze=!1,Be=null,Ve=0,He=!1,Ue=null,We=null;function $(e){let t=e?JSON.stringify([e.environmentId,e.threadId]):null;t!==Ue&&(We?.(),We=null,Ue=t,e&&(We=f(e.environmentId,e.threadId)))}function Ge(e){return e?JSON.stringify([e.environmentId,e.threadId]):null}function Ke(){He||(He=!0,queueMicrotask(()=>{He=!1,Ve!==0&&Ye()}))}function qe(e){ze=!0;try{e()}finally{ze=!1}Ke()}function Je(e,t){X=null,Z=null,Q=null,(e===`none`||e===`online`||e===`offline`)&&Y(t),u()}function Ye(){if(ze||!p())return;let e=d(),t=o.getState();if(e.malformed){Y(`invalid-link`),$(null),u();return}if(t.accountStatus!==`authenticated`){$(null),Be===`authenticated`&&Y(null),Be=t.accountStatus;return}Be=t.accountStatus;let n=e.nodeId;if(n===null){if(Q=null,$(null),X=null,Z=null,t.selectedNode&&!h()){let e=t.selectionStatus===`revoked`||t.selectionStatus===`authorization-removed`||t.selectionStatus===`incompatible`;v.returnToDirectory(e?{preserveTerminalSelection:!0}:void 0);return}Xe(e.logicalPathname,t);return}let r=Le(e.logicalPathname);Ge(r)!==Ue&&$(null);let i=t.nodes.find(e=>e.id===n)??null;if(i&&(i.capabilities?.nativeClientRequired===!0||r&&i.environmentId!==r.environmentId)){$(null),Je(t.selectionStatus,`unavailable`);return}if(t.selectedNode?.id===n){if($(r),X=null,Q=null,t.sessionEstablished){Z=null,Y(null);return}if(Z===n&&t.transportStatus===`terminal-failure`&&(t.selectionStatus===`revoked`||t.selectionStatus===`authorization-removed`||t.selectionStatus===`incompatible`)){Z=null,qe(()=>{u(),v.returnToDirectory({preserveTerminalSelection:!0})});return}Z===n&&t.transportStatus===`terminal-failure`&&t.selectionStatus===`offline`&&t.errorMessage===`Ryco state could not be synchronized.`&&qe(()=>{Je(t.selectionStatus,`offline`),v.returnToDirectory()});return}if(t.directoryStatus===`stale`){Je(t.selectionStatus,`unavailable`);return}if(t.directoryStatus!==`ready`||t.browserStatus!==`current`)return;let a=t.nodes.find(e=>e.id===n);if(!a){Je(t.selectionStatus,`unavailable`);return}if(a.revokedAt!==null){Je(t.selectionStatus,`revoked`);return}let s=Q===n;$(r);let c=r!==null&&!a.presence.online&&!s;r&&h()&&!c||X!==n&&(X=n,Z=s?null:n,Q=null,Y(null),v.selectNode(a.id).finally(()=>{X===n&&(X=null)}))}function Xe(e,t){if(Re(e)){u();return}let n=Ie(e);if(n===null)return;if(t.directoryStatus===`stale`){Y(`unavailable`),u();return}if(t.directoryStatus!==`ready`)return;let r=t.nodes.find(e=>e.environmentId===n&&e.revokedAt===null);if(!r){Y(`unavailable`),u();return}l(r.id)}function Ze(e){return p()?(Q=e,Y(null),m(e)):!1}function Qe(){if(!p())return!1;Q=null,Y(null);let e=d();return e.nodeId===null&&e.logicalPathname===`/nodes`||c()}function $e(){Ve+=1;let e=g(Ke),t=o.subscribe(Ke),n=p()?.subscribe(()=>Ke());Ke();let r=!1;return()=>{r||(r=!0,--Ve,e(),t(),n?.())}}function et(){let e=(0,G.c)(1),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,K.useEffect)(tt,t)}function tt(){return $e()}function nt(e){let t=(0,G.c)(11),{label:n,status:r,icon:i,onClick:a,testId:o,className:s}=e,c;t[0]===s?c=t[1]:(c=D(F(`chip`),`flex min-h-11 min-w-11 max-w-[136px] shrink items-center justify-center gap-1.5 rounded-full border border-border px-2.5 text-xs font-medium outline-none focus-visible:ring-2 focus-visible:ring-ring`,s),t[0]=s,t[1]=c);let l;t[2]===r?l=t[3]:(l=(0,J.jsx)(`span`,{"data-slot":`mobile-status-chip-status`,className:`min-w-0 truncate`,children:r}),t[2]=r,t[3]=l);let u;return t[4]!==i||t[5]!==n||t[6]!==a||t[7]!==c||t[8]!==l||t[9]!==o?(u=(0,J.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]=u):u=t[10],u}var rt={legacy:{glyph:`legacy`,iconClassName:`text-amber-500`},web:{glyph:`browser-encrypted`,iconClassName:`text-sky-500`},e2ee:{glyph:`native-verified`,iconClassName:`text-emerald-500`}};function it(e){return e.guarantee===`none`?e.connected?{glyph:`connected`,iconClassName:`text-emerald-500`}:{glyph:`disconnected`,iconClassName:`text-amber-500`}:rt[e.guarantee]}function at(){let e=(0,G.c)(19),t=ie(),n=R(),i=o(ct),a=o(st),s=o(ot);if(t!==`web-unsigned`)return null;let c,l;e[0]!==n||e[1]!==a||e[2]!==i||e[3]!==s?(c=z(se(`security`,{hosted:r(),role:V(i,a,s)})),l=I(n,c),e[0]=n,e[1]=a,e[2]=i,e[3]=s,e[4]=c,e[5]=l):(c=e[4],l=e[5]);let u=l;if(!u){let t;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsxs)(`section`,{"aria-label":`Session code`,"data-testid":`hosted-e2ee-verification`,"data-code":`absent`,className:`space-y-2`,children:[(0,J.jsx)(`p`,{className:`text-xs font-medium`,children:`Session code`}),(0,J.jsx)(`p`,{"data-testid":`hosted-e2ee-verification-unavailable`,className:`text-[11px] leading-relaxed text-muted-foreground`,children:L})]}),e[6]=t):t=e[6],t}let d;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,J.jsx)(`p`,{className:`text-xs font-medium`,children:`Session code`}),e[7]=d):d=e[7];let f;e[8]===u.display?f=e[9]:(f=(0,J.jsx)(`p`,{"data-testid":`hosted-e2ee-verification-code`,className:`font-mono text-base leading-none font-semibold tracking-[0.2em] whitespace-nowrap select-all`,children:u.display}),e[8]=u.display,e[9]=f);let p;e[10]===u.display?p=e[11]:(p=()=>void navigator.clipboard.writeText(u.display),e[10]=u.display,e[11]=p);let m;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,J.jsx)(x,{"aria-hidden":!0,className:`size-3.5`}),e[12]=m):m=e[12];let h;e[13]===p?h=e[14]:(h=(0,J.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground`,onClick:p,children:[m,` Copy`]}),e[13]=p,e[14]=h);let g;return e[15]!==c||e[16]!==f||e[17]!==h?(g=(0,J.jsxs)(`section`,{"aria-label":`Session code`,"data-testid":`hosted-e2ee-verification`,"data-code":`present`,"data-form":c,className:`space-y-2`,children:[d,f,h]}),e[15]=c,e[16]=f,e[17]=h,e[18]=g):g=e[18],g}function ot(e){return e.transportStatus}function st(e){return e.directoryStatus}function ct(e){return e.effectiveRole}var lt=`ryco:pwa:activate:v1`,ut=`Installation is temporarily unavailable.`,dt={errorMessage:null,installState:`hidden`,platform:`other`,registrationState:`disabled`,updateState:`idle`};function ft(e){return e===``||e===`./`?`./`:e.endsWith(`/`)?e:`${e}/`}function pt(e){let t=e.navigator.userAgent;return/iPad|iPhone|iPod/.test(t)||/Macintosh/.test(t)&&e.navigator.maxTouchPoints>1}function mt(e){let t=e;return typeof t.prompt==`function`&&t.userChoice instanceof Promise}function ht(e){let t=dt,n=!1,r=null,i=null,a=!!e.navigator.serviceWorker?.controller,o=!1,s=!1,c=new Set,l=e.window.matchMedia(`(display-mode: standalone)`),u=e=>{let n={...t,...e};Object.entries(n).every(([e,n])=>t[e]===n)||(t=n,c.forEach(e=>e()))},d=()=>l.matches||e.navigator.standalone===!0,f=()=>d()?`installed`:`manual-available`,p=e=>{!mt(e)||d()||(e.preventDefault(),r=e,u({installState:`native-available`}))},m=()=>{r=null,u({installState:`installed`})},h=()=>{d()?(r=null,u({installState:`installed`})):u({installState:r?`native-available`:`manual-available`})},g=()=>{let t=a;a=!!e.navigator.serviceWorker?.controller,!(o||!s&&!t)&&(s=!1,o=!0,e.window.reload())},_=t=>{i=t,t.waiting&&u({updateState:`ready`}),t.addEventListener(`updatefound`,()=>{let n=t.installing;n&&n.addEventListener(`statechange`,()=>{n.state===`installed`&&e.navigator.serviceWorker?.controller&&u({updateState:`ready`})})})},v=async()=>{let t=e.navigator.serviceWorker;if(!t){u({registrationState:`unavailable`,errorMessage:ut});return}u({registrationState:`registering`,errorMessage:null});try{let n=ft(e.baseUrl);_(await t.register(`${n}service-worker.js`,{scope:n})),u({registrationState:`ready`,errorMessage:null})}catch{u({registrationState:`unavailable`,errorMessage:ut})}};return{activateUpdate(){let e=i?.waiting;!e||t.updateState!==`ready`||(s=!0,u({updateState:`activating`}),e.postMessage({type:lt}))},dismissInstall(){r=null,u({installState:d()?`installed`:`hidden`})},getSnapshot(){return t},async promptInstall(){let e=r;e&&(r=null,u({installState:`hidden`}),await e.prompt(),(await e.userChoice).outcome===`dismissed`&&!d()&&u({installState:`manual-available`}))},async start(t){n||(n=!0,t.enabled&&(a=!!e.navigator.serviceWorker?.controller,o=!1,u({installState:f(),platform:pt(e)?`ios`:`other`}),e.window.addEventListener(`beforeinstallprompt`,p),e.window.addEventListener(`appinstalled`,m),l.addEventListener(`change`,h),e.navigator.serviceWorker?.addEventListener(`controllerchange`,g),e.document.readyState===`complete`?await v():e.window.addEventListener(`load`,()=>void v(),{once:!0})))},stop(){n&&(n=!1,r=null,i=null,a=!1,o=!1,s=!1,e.window.removeEventListener(`beforeinstallprompt`,p),e.window.removeEventListener(`appinstalled`,m),l.removeEventListener(`change`,h),e.navigator.serviceWorker?.removeEventListener(`controllerchange`,g),t=dt,c.forEach(e=>e()))},subscribe(e){return c.add(e),()=>c.delete(e)}}}function gt(){let e=navigator;return{baseUrl:`/`,document,navigator:{maxTouchPoints:e.maxTouchPoints,userAgent:e.userAgent,...e.serviceWorker?{serviceWorker:e.serviceWorker}:{},...typeof e.standalone==`boolean`?{standalone:e.standalone}:{}},window:{addEventListener:window.addEventListener.bind(window),removeEventListener:window.removeEventListener.bind(window),matchMedia:window.matchMedia.bind(window),reload:()=>window.location.reload()}}}var _t=typeof window>`u`?null:ht(gt());function vt(e){let t=(0,G.c)(3),{compact:n,lifecycle:r}=e,i=n!==void 0&&n,a=r===void 0?_t:r,o;return t[0]!==i||t[1]!==a?(o=a?(0,J.jsx)(yt,{compact:i,lifecycle:a}):null,t[0]=i,t[1]=a,t[2]=o):o=t[2],o}function yt(e){let t=(0,G.c)(27),{compact:n,lifecycle:r}=e,i=(0,K.useSyncExternalStore)(r.subscribe,r.getSnapshot,r.getSnapshot),[a,o]=(0,K.useState)(!1);if(i.installState!==`native-available`&&i.installState!==`manual-available`&&i.updateState===`idle`&&i.registrationState!==`unavailable`)return null;let s=n?`space-y-2`:`mt-4 space-y-3`,c;t[0]!==n||t[1]!==r||t[2]!==i.installState?(c=i.installState===`native-available`?(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,onClick:()=>void r.promptInstall(),children:[(0,J.jsx)(S,{"aria-hidden":!0}),` Install Ryco`]}):null,t[0]=n,t[1]=r,t[2]=i.installState,t[3]=c):c=t[3];let l;t[4]!==n||t[5]!==a||t[6]!==i.installState?(l=i.installState===`manual-available`?(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,"aria-expanded":a,onClick:()=>o(bt),children:[(0,J.jsx)(T,{"aria-hidden":!0}),` How to install`]}):null,t[4]=n,t[5]=a,t[6]=i.installState,t[7]=l):l=t[7];let u;t[8]!==n||t[9]!==r||t[10]!==i.updateState?(u=i.updateState===`idle`?null:(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,disabled:i.updateState===`activating`,onClick:()=>r.activateUpdate(),children:[(0,J.jsx)(te,{"aria-hidden":!0}),i.updateState===`activating`?`Updating…`:`Update ready`]}),t[8]=n,t[9]=r,t[10]=i.updateState,t[11]=u):u=t[11];let d;t[12]!==c||t[13]!==l||t[14]!==u?(d=(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[c,l,u]}),t[12]=c,t[13]=l,t[14]=u,t[15]=d):d=t[15];let f;t[16]!==a||t[17]!==i?(f=a?(0,J.jsx)(xt,{snapshot:i,onClose:()=>o(!1)}):null,t[16]=a,t[17]=i,t[18]=f):f=t[18];let p;t[19]!==i.errorMessage||t[20]!==i.registrationState?(p=i.registrationState===`unavailable`&&i.errorMessage?(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:i.errorMessage}):null,t[19]=i.errorMessage,t[20]=i.registrationState,t[21]=p):p=t[21];let m;return t[22]!==s||t[23]!==d||t[24]!==f||t[25]!==p?(m=(0,J.jsxs)(`section`,{className:s,"aria-label":`Ryco app installation`,children:[d,f,p]}),t[22]=s,t[23]=d,t[24]=f,t[25]=p,t[26]=m):m=t[26],m}function bt(e){return!e}function xt(e){let t=(0,G.c)(13),{snapshot:n,onClose:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsx)(`p`,{className:`font-medium`,children:`Install Ryco on this device`}),t[0]=i):i=t[0];let a;t[1]===n.platform?a=t[2]:(a=(0,J.jsxs)(`div`,{children:[i,n.platform===`ios`?(0,J.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:`In Safari, open the Share or browser menu, choose Add to Home Screen, enable Open as Web App when offered, then tap Add.`}):(0,J.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:`Open the browser menu, choose Add to home screen or Install app, then confirm Install.`})]}),t[1]=n.platform,t[2]=a);let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsx)(E,{"aria-hidden":!0}),t[3]=o):o=t[3];let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsx)(`span`,{className:`sr-only`,children:`Close install instructions`}),t[4]=s):s=t[4];let c;t[5]===r?c=t[6]:(c=(0,J.jsxs)(O,{className:`size-11 shrink-0`,size:`icon`,variant:`ghost`,onClick:r,children:[o,` `,s]}),t[5]=r,t[6]=c);let l;t[7]!==a||t[8]!==c?(l=(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[a,c]}),t[7]=a,t[8]=c,t[9]=l):l=t[9];let u;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,J.jsx)(`div`,{className:`mt-3 border-t border-border pt-3`,children:(0,J.jsx)(B,{compact:!0})}),t[10]=u):u=t[10];let d;return t[11]===l?d=t[12]:(d=(0,J.jsxs)(`div`,{role:`region`,"aria-label":`Install Ryco instructions`,className:`rounded-lg border border-border bg-background p-3 text-sm`,children:[l,u]}),t[11]=l,t[12]=d),d}var St={connected:W,disconnected:U,legacy:H,"browser-encrypted":w,"native-verified":C};function Ct(e){let t=(0,G.c)(9),{indicator:n,className:r,testId:i}=e,a;t[0]===n?a=t[1]:(a=it(n),t[0]=n,t[1]=a);let{glyph:o,iconClassName:s}=a,c=St[o],l=String(n.connected),u=`${r} ${s}`,d;return t[2]!==c||t[3]!==o||t[4]!==n.guarantee||t[5]!==l||t[6]!==u||t[7]!==i?(d=(0,J.jsx)(c,{"aria-hidden":!0,"data-testid":i,"data-connected":l,"data-guarantee":n.guarantee,"data-glyph":o,className:u}),t[2]=c,t[3]=o,t[4]=n.guarantee,t[5]=l,t[6]=u,t[7]=i,t[8]=d):d=t[8],d}function wt(e){let t=(0,G.c)(3),{node:n}=e;if(n.revokedAt){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(`span`,{className:`text-xs text-destructive`,children:`Revoked`}),t[0]=e):e=t[0],e}let r;return t[1]===n.presence.online?r=t[2]:(r=n.presence.online?(0,J.jsxs)(`span`,{className:`flex items-center gap-1 text-xs text-emerald-600 dark:text-emerald-400`,children:[(0,J.jsx)(W,{"aria-hidden":!0,className:`size-3.5`}),` Online`]}):(0,J.jsxs)(`span`,{className:`flex items-center gap-1 text-xs text-muted-foreground`,children:[(0,J.jsx)(U,{"aria-hidden":!0,className:`size-3.5`}),` Offline`]}),t[1]=n.presence.online,t[2]=r),r}function Tt(){let e=(0,G.c)(7),t=_(),n;e[0]===t?n=e[1]:(n=async e=>{Ze(e.id)||(await t({to:`/`,replace:!0}),await v.selectNode(e.id))},e[0]=t,e[1]=n);let r=n,i;e[2]===t?i=e[3]:(i=async()=>{Qe()||(await t({to:`/`,replace:!0}),await v.returnToDirectory())},e[2]=t,e[3]=i);let a=i,o;return e[4]!==a||e[5]!==r?(o={switchNode:r,returnToAllNodes:a},e[4]=a,e[5]=r,e[6]=o):o=e[6],o}function Et(){let e=(0,G.c)(5),t=o(kt),n=o(Ot);if(t!==`delivery-unknown`)return null;let r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(`p`,{children:`A request may or may not have reached the node. Ryco did not resend it automatically.`}),e[0]=r):r=e[0];let i=!n,a=n?void 0:`Wait for session replay to finish before acknowledging this warning.`,s=n?`Acknowledge`:`Synchronizing…`,c;return e[1]!==i||e[2]!==a||e[3]!==s?(c=(0,J.jsxs)(`div`,{role:`alert`,className:`mt-2 rounded-md border border-amber-500/30 bg-amber-500/5 p-2 text-xs`,children:[r,(0,J.jsx)(O,{className:`mt-2`,size:`sm`,variant:`outline`,disabled:i,title:a,onClick:Dt,children:s})]}),e[1]=i,e[2]=a,e[3]=s,e[4]=c):c=e[4],c}function Dt(){return v.acknowledgeDeliveryUnknown()}function Ot(e){return e.sessionRecoveredAfterUnknown}function kt(e){return e.sessionStatus}function At(){let e=(0,G.c)(62),t=o(Vt),n=o(Bt),r=o(zt),i=o(Rt),a=o(Lt),s=o(It),c=o(Ft),l=o(Pt),u=o(Nt),d=ie(),{switchNode:f,returnToAllNodes:p}=Tt(),m=(0,K.useRef)(null);if(!t)return null;let h,g;if(e[0]!==u||e[1]!==d||e[2]!==a||e[3]!==i||e[4]!==r){let t={browserStatus:u,sessionStatus:i,selectionStatus:a,transportStatus:r,e2eeStatus:d};h=ae(t),g=oe(t),e[0]=u,e[1]=d,e[2]=a,e[3]=i,e[4]=r,e[5]=h,e[6]=g}else h=e[5],g=e[6];let _=g,v;e[7]===_?v=e[8]:(v=(0,J.jsx)(Ct,{indicator:_,className:`size-4`}),e[7]=_,e[8]=v);let y;e[9]===t.label?y=e[10]:(y=(0,J.jsx)(`span`,{className:`max-w-32 truncate font-medium`,children:t.label}),e[9]=t.label,e[10]=y);let x;e[11]===h?x=e[12]:(x=(0,J.jsx)(`span`,{className:`max-w-24 truncate text-xs text-muted-foreground`,children:h}),e[11]=h,e[12]=x);let S;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,J.jsx)(b,{"aria-hidden":!0,className:`size-3.5 transition-transform group-open:rotate-180`}),e[13]=S):S=e[13];let C;e[14]!==v||e[15]!==y||e[16]!==x?(C=(0,J.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center gap-2 rounded-lg border border-border bg-card/95 px-3 py-2 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[v,y,x,S]}),e[14]=v,e[15]=y,e[16]=x,e[17]=C):C=e[17];let w;e[18]===t.label?w=e[19]:(w=(0,J.jsx)(`p`,{className:`font-medium`,children:t.label}),e[18]=t.label,e[19]=w);let T=c??`Role unavailable`,E;e[20]!==h||e[21]!==T?(E=(0,J.jsxs)(`p`,{className:`mt-0.5 text-xs capitalize text-muted-foreground`,children:[T,` · `,h]}),e[20]=h,e[21]=T,e[22]=E):E=e[22];let D;e[23]!==t.label||e[24]!==h?(D=(0,J.jsxs)(`p`,{className:`sr-only`,"aria-live":`polite`,children:[`Node `,t.label,`: `,h,`.`]}),e[23]=t.label,e[24]=h,e[25]=D):D=e[25];let k;e[26]===l?k=e[27]:(k=l?(0,J.jsx)(`p`,{role:`status`,className:`mt-2 text-xs text-muted-foreground`,children:l}):null,e[26]=l,e[27]=k);let A;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,J.jsx)(Et,{}),e[28]=A):A=e[28];let j;e[29]===p?j=e[30]:(j=()=>void p(),e[29]=p,e[30]=j);let re;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,J.jsx)(ce,{"aria-hidden":!0,className:`size-4`}),e[31]=re):re=e[31];let M;e[32]===j?M=e[33]:(M=(0,J.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:j,children:[re,` All nodes`]}),e[32]=j,e[33]=M);let N;if(e[34]!==u||e[35]!==s||e[36]!==t.id||e[37]!==n||e[38]!==f){let r;e[40]===t.id?r=e[41]:(r=e=>e.id!==t.id,e[40]=t.id,e[41]=r);let i;e[42]!==u||e[43]!==s||e[44]!==f?(i=e=>(0,J.jsxs)(`button`,{type:`button`,disabled:s!==`ready`||u!==`current`||e.revokedAt!==null||e.capabilities?.nativeClientRequired===!0,title:e.capabilities?.nativeClientRequired===!0?`Open in Desktop/Mobile`:void 0,className:`flex w-full items-center justify-between rounded-md px-2 py-2 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50`,onClick:()=>void f(e),children:[(0,J.jsx)(`span`,{className:`truncate`,children:e.label}),(0,J.jsx)(wt,{node:e})]},e.id),e[42]=u,e[43]=s,e[44]=f,e[45]=i):i=e[45],N=n.filter(r).map(i),e[34]=u,e[35]=s,e[36]=t.id,e[37]=n,e[38]=f,e[39]=N}else N=e[39];let P;e[46]!==M||e[47]!==N?(P=(0,J.jsxs)(`div`,{className:`mt-3 max-h-48 space-y-1 overflow-auto border-t border-border pt-3`,children:[M,N]}),e[46]=M,e[47]=N,e[48]=P):P=e[48];let F;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,J.jsxs)(O,{size:`sm`,variant:`outline`,onClick:Mt,children:[(0,J.jsx)(te,{"aria-hidden":!0}),` Refresh`]}),e[49]=F):F=e[49];let I;e[50]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,onClick:jt,children:[(0,J.jsx)(ee,{"aria-hidden":!0}),` Sign out`]}),e[50]=I):I=e[50];let L;e[51]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,J.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 border-t border-border pt-3`,children:[F,I,(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,onClick:()=>{m.current&&(m.current.open=!1),Te({kind:`account`,section:`security`})},children:[(0,J.jsx)(ne,{"aria-hidden":!0}),` Security details`]})]}),e[51]=L):L=e[51];let R;e[52]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,J.jsxs)(`div`,{className:`mt-3 space-y-3 border-t border-border pt-3`,children:[(0,J.jsx)(at,{}),(0,J.jsx)(vt,{compact:!0})]}),e[52]=R):R=e[52];let z;e[53]!==k||e[54]!==P||e[55]!==w||e[56]!==E||e[57]!==D?(z=(0,J.jsxs)(`div`,{className:`absolute right-0 z-50 mt-2 w-72 rounded-xl border border-border bg-popover p-3 shadow-xl`,children:[w,E,D,k,A,P,L,R]}),e[53]=k,e[54]=P,e[55]=w,e[56]=E,e[57]=D,e[58]=z):z=e[58];let B;return e[59]!==z||e[60]!==C?(B=(0,J.jsx)(`div`,{className:`relative max-w-full`,children:(0,J.jsxs)(`details`,{ref:m,className:`group relative`,children:[C,z]})}),e[59]=z,e[60]=C,e[61]=B):B=e[61],B}function jt(){v.signOut()}function Mt(){v.refreshDirectory()}function Nt(e){return e.browserStatus}function Pt(e){return e.errorMessage}function Ft(e){return e.effectiveRole}function It(e){return e.directoryStatus}function Lt(e){return e.selectionStatus}function Rt(e){return e.sessionStatus}function zt(e){return e.transportStatus}function Bt(e){return e.nodes}function Vt(e){return e.selectedNode}function Ht(e){let t=(0,G.c)(66),{open:n,onOpenChange:r}=e,i=o($t),a=o(Qt),s=o(Zt),c=o(Xt),l=o(Yt),u=o(Jt),d=o(qt),f=o(Kt),p=o(Gt),m=ie(),{switchNode:h,returnToAllNodes:g}=Tt();if(!i)return null;let _,v;if(t[0]!==p||t[1]!==m||t[2]!==l||t[3]!==c||t[4]!==s){let e={browserStatus:p,sessionStatus:c,selectionStatus:l,transportStatus:s,e2eeStatus:m};_=ae(e),v=oe(e),t[0]=p,t[1]=m,t[2]=l,t[3]=c,t[4]=s,t[5]=_,t[6]=v}else _=t[5],v=t[6];let y=v,b=u!==`ready`||p!==`current`,x;t[7]===y?x=t[8]:(x=(0,J.jsx)(Ct,{indicator:y,className:`size-4`}),t[7]=y,t[8]=x);let S;t[9]===i.label?S=t[10]:(S=(0,J.jsx)(`span`,{className:`truncate`,children:i.label}),t[9]=i.label,t[10]=S);let C;t[11]!==x||t[12]!==S?(C=(0,J.jsxs)(M,{className:`flex items-center gap-2`,children:[x,S]}),t[11]=x,t[12]=S,t[13]=C):C=t[13];let w=d??`Role unavailable`,T;t[14]!==_||t[15]!==w?(T=(0,J.jsxs)(re,{className:`capitalize`,children:[w,` · `,_]}),t[14]=_,t[15]=w,t[16]=T):T=t[16];let E;t[17]!==i.label||t[18]!==_?(E=(0,J.jsxs)(`p`,{className:`sr-only`,"aria-live":`polite`,children:[`Node `,i.label,`: `,_,`.`]}),t[17]=i.label,t[18]=_,t[19]=E):E=t[19];let D;t[20]!==C||t[21]!==T||t[22]!==E?(D=(0,J.jsxs)(j,{children:[C,T,E]}),t[20]=C,t[21]=T,t[22]=E,t[23]=D):D=t[23];let k;t[24]===f?k=t[25]:(k=f?(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:f}):null,t[24]=f,t[25]=k);let F;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,J.jsx)(Et,{}),t[26]=F):F=t[26];let I;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,J.jsx)(ne,{"aria-hidden":!0,className:`size-4 shrink-0`}),t[27]=I):I=t[27];let L;t[28]===r?L=t[29]:(L=(0,J.jsx)(N,{label:`Security details`,icon:I,onClick:()=>{r(!1),Te({kind:`account`,section:`security`})}}),t[28]=r,t[29]=L);let R;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,J.jsx)(ce,{"aria-hidden":!0,className:`size-4 shrink-0`}),t[30]=R):R=t[30];let z;t[31]!==r||t[32]!==g?(z=(0,J.jsx)(N,{label:`All nodes`,icon:R,onClick:()=>{r(!1),g()}}),t[31]=r,t[32]=g,t[33]=z):z=t[33];let B;if(t[34]!==i.id||t[35]!==a||t[36]!==r||t[37]!==h||t[38]!==b){let e;t[40]===i.id?e=t[41]:(e=e=>e.id!==i.id,t[40]=i.id,t[41]=e);let n;t[42]!==r||t[43]!==h||t[44]!==b?(n=e=>(0,J.jsx)(N,{label:e.label,disabled:b||e.revokedAt!==null||e.capabilities?.nativeClientRequired===!0,disabledReason:e.capabilities?.nativeClientRequired===!0?`Open in Desktop/Mobile`:e.revokedAt===null?`Node switching is unavailable until the directory and this browser are current.`:`Access to this node was revoked.`,trailing:(0,J.jsx)(wt,{node:e}),onClick:()=>{r(!1),h(e)}},e.id),t[42]=r,t[43]=h,t[44]=b,t[45]=n):n=t[45],B=a.filter(e).map(n),t[34]=i.id,t[35]=a,t[36]=r,t[37]=h,t[38]=b,t[39]=B}else B=t[39];let V;t[46]!==L||t[47]!==z||t[48]!==B?(V=(0,J.jsxs)(`div`,{className:`mt-3 space-y-1 border-t border-border pt-3`,children:[L,z,B]}),t[46]=L,t[47]=z,t[48]=B,t[49]=V):V=t[49];let se=u===`loading`,H;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,J.jsx)(te,{"aria-hidden":!0}),t[50]=H):H=t[50];let U;t[51]===se?U=t[52]:(U=(0,J.jsxs)(O,{size:`sm`,variant:`outline`,className:`min-h-11`,disabled:se,onClick:Wt,children:[H,` Refresh nodes`]}),t[51]=se,t[52]=U);let W;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,className:`min-h-11`,onClick:Ut,children:[(0,J.jsx)(ee,{"aria-hidden":!0}),` Sign out`]}),t[53]=W):W=t[53];let K;t[54]===U?K=t[55]:(K=(0,J.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 border-t border-border pt-3`,children:[U,W]}),t[54]=U,t[55]=K);let le;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,J.jsx)(`div`,{className:`mt-3 space-y-3 border-t border-border pt-3`,children:(0,J.jsx)(vt,{compact:!0})}),t[56]=le):le=t[56];let q;t[57]!==V||t[58]!==K||t[59]!==k?(q=(0,J.jsxs)(A,{children:[k,F,V,K,le]}),t[57]=V,t[58]=K,t[59]=k,t[60]=q):q=t[60];let ue;return t[61]!==r||t[62]!==n||t[63]!==q||t[64]!==D?(ue=(0,J.jsxs)(P,{open:n,onOpenChange:r,label:`Connection`,children:[D,q]}),t[61]=r,t[62]=n,t[63]=q,t[64]=D,t[65]=ue):ue=t[65],ue}function Ut(){v.signOut()}function Wt(){v.refreshDirectory()}function Gt(e){return e.browserStatus}function Kt(e){return e.errorMessage}function qt(e){return e.effectiveRole}function Jt(e){return e.directoryStatus}function Yt(e){return e.selectionStatus}function Xt(e){return e.sessionStatus}function Zt(e){return e.transportStatus}function Qt(e){return e.nodes}function $t(e){return e.selectedNode}function en(){let e=(0,G.c)(25),t=o(on),n=o(an),r=o(rn),i=o(nn),a=o(tn),s=ie(),[c,l]=(0,K.useState)(!1);if(!t)return null;let u,d;if(e[0]!==a||e[1]!==s||e[2]!==i||e[3]!==r||e[4]!==n){let t={browserStatus:a,sessionStatus:r,selectionStatus:i,transportStatus:n,e2eeStatus:s};u=ae(t),d=oe(t),e[0]=a,e[1]=s,e[2]=i,e[3]=r,e[4]=n,e[5]=u,e[6]=d}else u=e[5],d=e[6];let f=d,p;e[7]!==t.label||e[8]!==c||e[9]!==r||e[10]!==u?(p=c?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`span`,{role:`status`,"aria-live":`polite`,"data-testid":`hosted-connection-status-announcer`,className:`sr-only`,children:[`Node `,t.label,`: `,u,`.`]}),r===`delivery-unknown`?(0,J.jsx)(`span`,{role:`alert`,className:`sr-only`,children:`Delivery unknown: a request may or may not have reached the node. Open the connection controls to acknowledge.`}):null]}),e[7]=t.label,e[8]=c,e[9]=r,e[10]=u,e[11]=p):p=e[11];let m=`Connection: ${t.label}, ${u}`,h;e[12]===f?h=e[13]:(h=(0,J.jsx)(Ct,{indicator:f,testId:`hosted-connection-icon`,className:`size-3.5 shrink-0`}),e[12]=f,e[13]=h);let g;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>l(!0),e[14]=g):g=e[14];let _;e[15]!==f.shortLabel||e[16]!==m||e[17]!==h?(_=(0,J.jsx)(nt,{testId:`hosted-connection-pill`,label:m,status:f.shortLabel,icon:h,onClick:g}),e[15]=f.shortLabel,e[16]=m,e[17]=h,e[18]=_):_=e[18];let v;e[19]===c?v=e[20]:(v=(0,J.jsx)(Ht,{open:c,onOpenChange:l}),e[19]=c,e[20]=v);let y;return e[21]!==p||e[22]!==_||e[23]!==v?(y=(0,J.jsxs)(J.Fragment,{children:[p,_,v]}),e[21]=p,e[22]=_,e[23]=v,e[24]=y):y=e[24],y}function tn(e){return e.browserStatus}function nn(e){return e.selectionStatus}function rn(e){return e.sessionStatus}function an(e){return e.transportStatus}function on(e){return e.selectedNode}function sn(){let e=(0,G.c)(2),t=k(),n;return e[0]===t?n=e[1]:(n=t===`phone`?(0,J.jsx)(en,{}):(0,J.jsx)(At,{}),e[0]=t,e[1]=n),n}export{De as _,Tt as a,Le as c,et as d,Pe as f,Ee as g,Te as h,wt as i,Ze as l,me as m,en as n,vt as o,pe as p,At as r,_t as s,sn as t,Ne as u,U as v};
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{n as r}from"./env-Bf33qXdb.js";import{Fr as i,Rr as a}from"./src-Ca7Gag3m.js";import{N as o}from"./runtime-DYzjhL5M.js";import{It as s}from"./composerDraftStore-DC2r8dcu.js";import{_ as c,d as l,f as u,h as d,l as f,m as p,p as m,r as h,v as g}from"./useHandleNewThread-820pBJCC.js";import{t as _}from"./useNavigate-2tVq4iZ2.js";import{o as v}from"./authorization-BwQZHweJ.js";import{f as y}from"./useRenderElement-DchFnsR8.js";import{t as b}from"./chevron-down-B7C6FKzM.js";import{t as x}from"./copy-UQjKGt7t.js";import{t as S}from"./download-CQZ-m4zW.js";import{t as ee}from"./log-out-tMJm0Gk6.js";import{t as te}from"./refresh-cw-DopCMrtR.js";import{t as C}from"./shield-check-dQ-4cMKk.js";import{t as w}from"./shield-IZEIJ8r7.js";import{t as T}from"./smartphone-gNe1ynB8.js";import{t as ne}from"./user-round-Cpzx8pSw.js";import{t as E}from"./x-C1Cemsov.js";import{t as D}from"./utils-B76_2Yk7.js";import{t as O}from"./button-Wf_1nfeu.js";import{t as k}from"./usePresentationTier-B_SCFvN7.js";import{a as A,i as j,n as re,o as M,s as N,t as P}from"./MobileSheet-BPvuTPR6.js";import{t as F}from"./GlassSurface-B3cq28tB.js";import{a as ie,c as ae,i as I,n as L,o as R,r as z,s as oe,t as B}from"./HostedRelayTrustNotice-CbF_SOpf.js";import{n as V,o as se}from"./settingsSections.logic-F8RXVmAq.js";var ce=y(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),H=y(`shield-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),U=y(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),W=y(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),G=n(),K=e(t(),1),le=Object.freeze({"":`overview`,security:`security`,appearance:`appearance`}),q=Object.freeze({"sign-in":`/sign-in`,"sign-in-password":`/sign-in/password`,"sign-in-recovery-code":`/sign-in/recovery-code`,"sign-up":`/sign-up`,"sign-up-verify":`/public-signup/verify`,"reset-password":`/password-reset`,invitation:`/invitation`,setup:`/setup`,"email-verification":`/email-verification`,nodes:`/nodes`,"nodes-enroll":`/nodes/enroll`}),ue=Object.freeze([`sign-in`,`sign-up`,`public-signup`,`password-reset`,`invitation`,`setup`,`email-verification`,`nodes`,`account`]);function de(e){return e.length>1&&e.endsWith(`/`)?e.slice(0,-1):e===``?`/`:e}function fe(e){let t=de(e);if(t.startsWith(`/account`))return{kind:`account`,section:le[t.slice(8).replace(/^\//,``)]??`overview`};for(let[e,n]of Object.entries(q))if(t===n)return{kind:e};return null}function pe(e){return e.kind===`account`?e.section===`overview`?`/account`:`/account/${e.section}`:q[e.kind]}function me(e){switch(e.kind){case`sign-in`:return`Sign in`;case`sign-in-password`:return`Sign in with a password`;case`sign-in-recovery-code`:return`Use a recovery code`;case`sign-up`:return`Create your account`;case`sign-up-verify`:return`Verify your email`;case`reset-password`:return`Reset your password`;case`invitation`:return`Redeem your invitation`;case`setup`:return`Claim this Hub`;case`email-verification`:return`Email verification`;case`nodes`:return`Your nodes`;case`nodes-enroll`:return`Enroll a node`;case`account`:return e.section===`overview`?`Account`:e.section===`security`?`Security`:`Appearance`}}var he=typeof window>`u`?`/`:de(window.location.pathname),ge=new Set;function _e(){for(let e of Array.from(ge))e()}function ve(e){let t=de(e);t!==he&&(he=t,_e())}var ye=!1;function be(){ye||(ye=!0,g(()=>{ve(d().logicalPathname)}))}function xe(){return p()===null?typeof window>`u`?he:de(window.location.pathname):he}var Se=!1;function Ce(){Se||typeof window>`u`||(Se=!0,window.addEventListener(`popstate`,()=>{p()===null&&_e()}))}function we(e){return be(),Ce(),ge.add(e),()=>{ge.delete(e)}}function Te(e,t){Ee(pe(e),t)}function Ee(e,t){let n=de(e),r=p();if(r){t?.replace===!0?r.replace(n):r.push(n),ve(n);return}typeof window<`u`&&(t?.replace===!0?window.history.replaceState(window.history.state,``,n):window.history.pushState(window.history.state,``,n)),he=n,_e()}function De(){let e=(0,G.c)(2),t=(0,K.useSyncExternalStore)(we,xe),n;return e[0]===t?n=e[1]:(n=fe(t),e[0]=t,e[1]=n),n}var J=s(),Oe={unavailable:`The node from this link is not in your authorized node directory. Choose a node to continue.`,revoked:`Access to the node from this link was revoked. Choose a node to continue.`,offline:`The node from this link is offline. Choose a node to continue.`,"invalid-link":`This node link is not valid. Choose a node to continue.`},ke=null,Ae=new Set;function Y(e){if(ke!==e){ke=e;for(let e of Array.from(Ae))e()}}function je(e){return Ae.add(e),()=>{Ae.delete(e)}}function Me(){return ke===null?null:Oe[ke]}function Ne(){return(0,K.useSyncExternalStore)(je,Me)}function Pe(){return(0,K.useSyncExternalStore)(g,d)}var Fe=new Set([`node`,`draft`,`pair`,`diagnostics`,...ue]);function Ie(e){let t=/^\/([^/]+)\/([^/]+)\/?$/.exec(e);if(!t)return null;let n=t[1]??``;if(Fe.has(n))return null;try{return decodeURIComponent(n)}catch{return n}}function Le(e){let t=/^\/([^/]+)\/([^/]+)\/?$/u.exec(e);if(!t||Fe.has(t[1]??``))return null;try{return{environmentId:i.make(decodeURIComponent(t[1]??``)),threadId:a.make(decodeURIComponent(t[2]??``))}}catch{return null}}function Re(e){return e.startsWith(`/draft/`)}var X=null,Z=null,Q=null,ze=!1,Be=null,Ve=0,He=!1,Ue=null,We=null;function $(e){let t=e?JSON.stringify([e.environmentId,e.threadId]):null;t!==Ue&&(We?.(),We=null,Ue=t,e&&(We=f(e.environmentId,e.threadId)))}function Ge(e){return e?JSON.stringify([e.environmentId,e.threadId]):null}function Ke(){He||(He=!0,queueMicrotask(()=>{He=!1,Ve!==0&&Ye()}))}function qe(e){ze=!0;try{e()}finally{ze=!1}Ke()}function Je(e,t){X=null,Z=null,Q=null,(e===`none`||e===`online`||e===`offline`)&&Y(t),u()}function Ye(){if(ze||!p())return;let e=d(),t=o.getState();if(e.malformed){Y(`invalid-link`),$(null),u();return}if(t.accountStatus!==`authenticated`){$(null),Be===`authenticated`&&Y(null),Be=t.accountStatus;return}Be=t.accountStatus;let n=e.nodeId;if(n===null){if(Q=null,$(null),X=null,Z=null,t.selectedNode&&!h()){let e=t.selectionStatus===`revoked`||t.selectionStatus===`authorization-removed`||t.selectionStatus===`incompatible`;v.returnToDirectory(e?{preserveTerminalSelection:!0}:void 0);return}Xe(e.logicalPathname,t);return}let r=Le(e.logicalPathname);Ge(r)!==Ue&&$(null);let i=t.nodes.find(e=>e.id===n)??null;if(i&&(i.capabilities?.nativeClientRequired===!0||r&&i.environmentId!==r.environmentId)){$(null),Je(t.selectionStatus,`unavailable`);return}if(t.selectedNode?.id===n){if($(r),X=null,Q=null,t.sessionEstablished){Z=null,Y(null);return}if(Z===n&&t.transportStatus===`terminal-failure`&&(t.selectionStatus===`revoked`||t.selectionStatus===`authorization-removed`||t.selectionStatus===`incompatible`)){Z=null,qe(()=>{u(),v.returnToDirectory({preserveTerminalSelection:!0})});return}Z===n&&t.transportStatus===`terminal-failure`&&t.selectionStatus===`offline`&&t.errorMessage===`Ryco state could not be synchronized.`&&qe(()=>{Je(t.selectionStatus,`offline`),v.returnToDirectory()});return}if(t.directoryStatus===`stale`){Je(t.selectionStatus,`unavailable`);return}if(t.directoryStatus!==`ready`||t.browserStatus!==`current`)return;let a=t.nodes.find(e=>e.id===n);if(!a){Je(t.selectionStatus,`unavailable`);return}if(a.revokedAt!==null){Je(t.selectionStatus,`revoked`);return}let s=Q===n;$(r);let c=r!==null&&!a.presence.online&&!s;r&&h()&&!c||X!==n&&(X=n,Z=s?null:n,Q=null,Y(null),v.selectNode(a.id).finally(()=>{X===n&&(X=null)}))}function Xe(e,t){if(Re(e)){u();return}let n=Ie(e);if(n===null)return;if(t.directoryStatus===`stale`){Y(`unavailable`),u();return}if(t.directoryStatus!==`ready`)return;let r=t.nodes.find(e=>e.environmentId===n&&e.revokedAt===null);if(!r){Y(`unavailable`),u();return}l(r.id)}function Ze(e){return p()?(Q=e,Y(null),m(e)):!1}function Qe(){if(!p())return!1;Q=null,Y(null);let e=d();return e.nodeId===null&&e.logicalPathname===`/nodes`||c()}function $e(){Ve+=1;let e=g(Ke),t=o.subscribe(Ke),n=p()?.subscribe(()=>Ke());Ke();let r=!1;return()=>{r||(r=!0,--Ve,e(),t(),n?.())}}function et(){let e=(0,G.c)(1),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,K.useEffect)(tt,t)}function tt(){return $e()}function nt(e){let t=(0,G.c)(11),{label:n,status:r,icon:i,onClick:a,testId:o,className:s}=e,c;t[0]===s?c=t[1]:(c=D(F(`chip`),`flex min-h-11 min-w-11 max-w-[136px] shrink items-center justify-center gap-1.5 rounded-full border border-border px-2.5 text-xs font-medium outline-none focus-visible:ring-2 focus-visible:ring-ring`,s),t[0]=s,t[1]=c);let l;t[2]===r?l=t[3]:(l=(0,J.jsx)(`span`,{"data-slot":`mobile-status-chip-status`,className:`min-w-0 truncate`,children:r}),t[2]=r,t[3]=l);let u;return t[4]!==i||t[5]!==n||t[6]!==a||t[7]!==c||t[8]!==l||t[9]!==o?(u=(0,J.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]=u):u=t[10],u}var rt={legacy:{glyph:`legacy`,iconClassName:`text-amber-500`},web:{glyph:`browser-encrypted`,iconClassName:`text-sky-500`},e2ee:{glyph:`native-verified`,iconClassName:`text-emerald-500`}};function it(e){return e.guarantee===`none`?e.connected?{glyph:`connected`,iconClassName:`text-emerald-500`}:{glyph:`disconnected`,iconClassName:`text-amber-500`}:rt[e.guarantee]}function at(){let e=(0,G.c)(19),t=ie(),n=R(),i=o(ct),a=o(st),s=o(ot);if(t!==`web-unsigned`)return null;let c,l;e[0]!==n||e[1]!==a||e[2]!==i||e[3]!==s?(c=z(se(`security`,{hosted:r(),role:V(i,a,s)})),l=I(n,c),e[0]=n,e[1]=a,e[2]=i,e[3]=s,e[4]=c,e[5]=l):(c=e[4],l=e[5]);let u=l;if(!u){let t;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsxs)(`section`,{"aria-label":`Session code`,"data-testid":`hosted-e2ee-verification`,"data-code":`absent`,className:`space-y-2`,children:[(0,J.jsx)(`p`,{className:`text-xs font-medium`,children:`Session code`}),(0,J.jsx)(`p`,{"data-testid":`hosted-e2ee-verification-unavailable`,className:`text-[11px] leading-relaxed text-muted-foreground`,children:L})]}),e[6]=t):t=e[6],t}let d;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,J.jsx)(`p`,{className:`text-xs font-medium`,children:`Session code`}),e[7]=d):d=e[7];let f;e[8]===u.display?f=e[9]:(f=(0,J.jsx)(`p`,{"data-testid":`hosted-e2ee-verification-code`,className:`font-mono text-base leading-none font-semibold tracking-[0.2em] whitespace-nowrap select-all`,children:u.display}),e[8]=u.display,e[9]=f);let p;e[10]===u.display?p=e[11]:(p=()=>void navigator.clipboard.writeText(u.display),e[10]=u.display,e[11]=p);let m;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,J.jsx)(x,{"aria-hidden":!0,className:`size-3.5`}),e[12]=m):m=e[12];let h;e[13]===p?h=e[14]:(h=(0,J.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground`,onClick:p,children:[m,` Copy`]}),e[13]=p,e[14]=h);let g;return e[15]!==c||e[16]!==f||e[17]!==h?(g=(0,J.jsxs)(`section`,{"aria-label":`Session code`,"data-testid":`hosted-e2ee-verification`,"data-code":`present`,"data-form":c,className:`space-y-2`,children:[d,f,h]}),e[15]=c,e[16]=f,e[17]=h,e[18]=g):g=e[18],g}function ot(e){return e.transportStatus}function st(e){return e.directoryStatus}function ct(e){return e.effectiveRole}var lt=`ryco:pwa:activate:v1`,ut=`Installation is temporarily unavailable.`,dt={errorMessage:null,installState:`hidden`,platform:`other`,registrationState:`disabled`,updateState:`idle`};function ft(e){return e===``||e===`./`?`./`:e.endsWith(`/`)?e:`${e}/`}function pt(e){let t=e.navigator.userAgent;return/iPad|iPhone|iPod/.test(t)||/Macintosh/.test(t)&&e.navigator.maxTouchPoints>1}function mt(e){let t=e;return typeof t.prompt==`function`&&t.userChoice instanceof Promise}function ht(e){let t=dt,n=!1,r=null,i=null,a=!!e.navigator.serviceWorker?.controller,o=!1,s=!1,c=new Set,l=e.window.matchMedia(`(display-mode: standalone)`),u=e=>{let n={...t,...e};Object.entries(n).every(([e,n])=>t[e]===n)||(t=n,c.forEach(e=>e()))},d=()=>l.matches||e.navigator.standalone===!0,f=()=>d()?`installed`:`manual-available`,p=e=>{!mt(e)||d()||(e.preventDefault(),r=e,u({installState:`native-available`}))},m=()=>{r=null,u({installState:`installed`})},h=()=>{d()?(r=null,u({installState:`installed`})):u({installState:r?`native-available`:`manual-available`})},g=()=>{let t=a;a=!!e.navigator.serviceWorker?.controller,!(o||!s&&!t)&&(s=!1,o=!0,e.window.reload())},_=t=>{i=t,t.waiting&&u({updateState:`ready`}),t.addEventListener(`updatefound`,()=>{let n=t.installing;n&&n.addEventListener(`statechange`,()=>{n.state===`installed`&&e.navigator.serviceWorker?.controller&&u({updateState:`ready`})})})},v=async()=>{let t=e.navigator.serviceWorker;if(!t){u({registrationState:`unavailable`,errorMessage:ut});return}u({registrationState:`registering`,errorMessage:null});try{let n=ft(e.baseUrl);_(await t.register(`${n}service-worker.js`,{scope:n})),u({registrationState:`ready`,errorMessage:null})}catch{u({registrationState:`unavailable`,errorMessage:ut})}};return{activateUpdate(){let e=i?.waiting;!e||t.updateState!==`ready`||(s=!0,u({updateState:`activating`}),e.postMessage({type:lt}))},dismissInstall(){r=null,u({installState:d()?`installed`:`hidden`})},getSnapshot(){return t},async promptInstall(){let e=r;e&&(r=null,u({installState:`hidden`}),await e.prompt(),(await e.userChoice).outcome===`dismissed`&&!d()&&u({installState:`manual-available`}))},async start(t){n||(n=!0,t.enabled&&(a=!!e.navigator.serviceWorker?.controller,o=!1,u({installState:f(),platform:pt(e)?`ios`:`other`}),e.window.addEventListener(`beforeinstallprompt`,p),e.window.addEventListener(`appinstalled`,m),l.addEventListener(`change`,h),e.navigator.serviceWorker?.addEventListener(`controllerchange`,g),e.document.readyState===`complete`?await v():e.window.addEventListener(`load`,()=>void v(),{once:!0})))},stop(){n&&(n=!1,r=null,i=null,a=!1,o=!1,s=!1,e.window.removeEventListener(`beforeinstallprompt`,p),e.window.removeEventListener(`appinstalled`,m),l.removeEventListener(`change`,h),e.navigator.serviceWorker?.removeEventListener(`controllerchange`,g),t=dt,c.forEach(e=>e()))},subscribe(e){return c.add(e),()=>c.delete(e)}}}function gt(){let e=navigator;return{baseUrl:`/`,document,navigator:{maxTouchPoints:e.maxTouchPoints,userAgent:e.userAgent,...e.serviceWorker?{serviceWorker:e.serviceWorker}:{},...typeof e.standalone==`boolean`?{standalone:e.standalone}:{}},window:{addEventListener:window.addEventListener.bind(window),removeEventListener:window.removeEventListener.bind(window),matchMedia:window.matchMedia.bind(window),reload:()=>window.location.reload()}}}var _t=typeof window>`u`?null:ht(gt());function vt(e){let t=(0,G.c)(3),{compact:n,lifecycle:r}=e,i=n!==void 0&&n,a=r===void 0?_t:r,o;return t[0]!==i||t[1]!==a?(o=a?(0,J.jsx)(yt,{compact:i,lifecycle:a}):null,t[0]=i,t[1]=a,t[2]=o):o=t[2],o}function yt(e){let t=(0,G.c)(27),{compact:n,lifecycle:r}=e,i=(0,K.useSyncExternalStore)(r.subscribe,r.getSnapshot,r.getSnapshot),[a,o]=(0,K.useState)(!1);if(i.installState!==`native-available`&&i.installState!==`manual-available`&&i.updateState===`idle`&&i.registrationState!==`unavailable`)return null;let s=n?`space-y-2`:`mt-4 space-y-3`,c;t[0]!==n||t[1]!==r||t[2]!==i.installState?(c=i.installState===`native-available`?(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,onClick:()=>void r.promptInstall(),children:[(0,J.jsx)(S,{"aria-hidden":!0}),` Install Ryco`]}):null,t[0]=n,t[1]=r,t[2]=i.installState,t[3]=c):c=t[3];let l;t[4]!==n||t[5]!==a||t[6]!==i.installState?(l=i.installState===`manual-available`?(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,"aria-expanded":a,onClick:()=>o(bt),children:[(0,J.jsx)(T,{"aria-hidden":!0}),` How to install`]}):null,t[4]=n,t[5]=a,t[6]=i.installState,t[7]=l):l=t[7];let u;t[8]!==n||t[9]!==r||t[10]!==i.updateState?(u=i.updateState===`idle`?null:(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,disabled:i.updateState===`activating`,onClick:()=>r.activateUpdate(),children:[(0,J.jsx)(te,{"aria-hidden":!0}),i.updateState===`activating`?`Updating…`:`Update ready`]}),t[8]=n,t[9]=r,t[10]=i.updateState,t[11]=u):u=t[11];let d;t[12]!==c||t[13]!==l||t[14]!==u?(d=(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[c,l,u]}),t[12]=c,t[13]=l,t[14]=u,t[15]=d):d=t[15];let f;t[16]!==a||t[17]!==i?(f=a?(0,J.jsx)(xt,{snapshot:i,onClose:()=>o(!1)}):null,t[16]=a,t[17]=i,t[18]=f):f=t[18];let p;t[19]!==i.errorMessage||t[20]!==i.registrationState?(p=i.registrationState===`unavailable`&&i.errorMessage?(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:i.errorMessage}):null,t[19]=i.errorMessage,t[20]=i.registrationState,t[21]=p):p=t[21];let m;return t[22]!==s||t[23]!==d||t[24]!==f||t[25]!==p?(m=(0,J.jsxs)(`section`,{className:s,"aria-label":`Ryco app installation`,children:[d,f,p]}),t[22]=s,t[23]=d,t[24]=f,t[25]=p,t[26]=m):m=t[26],m}function bt(e){return!e}function xt(e){let t=(0,G.c)(13),{snapshot:n,onClose:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsx)(`p`,{className:`font-medium`,children:`Install Ryco on this device`}),t[0]=i):i=t[0];let a;t[1]===n.platform?a=t[2]:(a=(0,J.jsxs)(`div`,{children:[i,n.platform===`ios`?(0,J.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:`In Safari, open the Share or browser menu, choose Add to Home Screen, enable Open as Web App when offered, then tap Add.`}):(0,J.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:`Open the browser menu, choose Add to home screen or Install app, then confirm Install.`})]}),t[1]=n.platform,t[2]=a);let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsx)(E,{"aria-hidden":!0}),t[3]=o):o=t[3];let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsx)(`span`,{className:`sr-only`,children:`Close install instructions`}),t[4]=s):s=t[4];let c;t[5]===r?c=t[6]:(c=(0,J.jsxs)(O,{className:`size-11 shrink-0`,size:`icon`,variant:`ghost`,onClick:r,children:[o,` `,s]}),t[5]=r,t[6]=c);let l;t[7]!==a||t[8]!==c?(l=(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[a,c]}),t[7]=a,t[8]=c,t[9]=l):l=t[9];let u;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,J.jsx)(`div`,{className:`mt-3 border-t border-border pt-3`,children:(0,J.jsx)(B,{compact:!0})}),t[10]=u):u=t[10];let d;return t[11]===l?d=t[12]:(d=(0,J.jsxs)(`div`,{role:`region`,"aria-label":`Install Ryco instructions`,className:`rounded-lg border border-border bg-background p-3 text-sm`,children:[l,u]}),t[11]=l,t[12]=d),d}var St={connected:W,disconnected:U,legacy:H,"browser-encrypted":w,"native-verified":C};function Ct(e){let t=(0,G.c)(9),{indicator:n,className:r,testId:i}=e,a;t[0]===n?a=t[1]:(a=it(n),t[0]=n,t[1]=a);let{glyph:o,iconClassName:s}=a,c=St[o],l=String(n.connected),u=`${r} ${s}`,d;return t[2]!==c||t[3]!==o||t[4]!==n.guarantee||t[5]!==l||t[6]!==u||t[7]!==i?(d=(0,J.jsx)(c,{"aria-hidden":!0,"data-testid":i,"data-connected":l,"data-guarantee":n.guarantee,"data-glyph":o,className:u}),t[2]=c,t[3]=o,t[4]=n.guarantee,t[5]=l,t[6]=u,t[7]=i,t[8]=d):d=t[8],d}function wt(e){let t=(0,G.c)(3),{node:n}=e;if(n.revokedAt){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(`span`,{className:`text-xs text-destructive`,children:`Revoked`}),t[0]=e):e=t[0],e}let r;return t[1]===n.presence.online?r=t[2]:(r=n.presence.online?(0,J.jsxs)(`span`,{className:`flex items-center gap-1 text-xs text-emerald-600 dark:text-emerald-400`,children:[(0,J.jsx)(W,{"aria-hidden":!0,className:`size-3.5`}),` Online`]}):(0,J.jsxs)(`span`,{className:`flex items-center gap-1 text-xs text-muted-foreground`,children:[(0,J.jsx)(U,{"aria-hidden":!0,className:`size-3.5`}),` Offline`]}),t[1]=n.presence.online,t[2]=r),r}function Tt(){let e=(0,G.c)(7),t=_(),n;e[0]===t?n=e[1]:(n=async e=>{Ze(e.id)||(await t({to:`/`,replace:!0}),await v.selectNode(e.id))},e[0]=t,e[1]=n);let r=n,i;e[2]===t?i=e[3]:(i=async()=>{Qe()||(await t({to:`/`,replace:!0}),await v.returnToDirectory())},e[2]=t,e[3]=i);let a=i,o;return e[4]!==a||e[5]!==r?(o={switchNode:r,returnToAllNodes:a},e[4]=a,e[5]=r,e[6]=o):o=e[6],o}function Et(){let e=(0,G.c)(5),t=o(kt),n=o(Ot);if(t!==`delivery-unknown`)return null;let r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(`p`,{children:`A request may or may not have reached the node. Ryco did not resend it automatically.`}),e[0]=r):r=e[0];let i=!n,a=n?void 0:`Wait for session replay to finish before acknowledging this warning.`,s=n?`Acknowledge`:`Synchronizing…`,c;return e[1]!==i||e[2]!==a||e[3]!==s?(c=(0,J.jsxs)(`div`,{role:`alert`,className:`mt-2 rounded-md border border-amber-500/30 bg-amber-500/5 p-2 text-xs`,children:[r,(0,J.jsx)(O,{className:`mt-2`,size:`sm`,variant:`outline`,disabled:i,title:a,onClick:Dt,children:s})]}),e[1]=i,e[2]=a,e[3]=s,e[4]=c):c=e[4],c}function Dt(){return v.acknowledgeDeliveryUnknown()}function Ot(e){return e.sessionRecoveredAfterUnknown}function kt(e){return e.sessionStatus}function At(){let e=(0,G.c)(62),t=o(Vt),n=o(Bt),r=o(zt),i=o(Rt),a=o(Lt),s=o(It),c=o(Ft),l=o(Pt),u=o(Nt),d=ie(),{switchNode:f,returnToAllNodes:p}=Tt(),m=(0,K.useRef)(null);if(!t)return null;let h,g;if(e[0]!==u||e[1]!==d||e[2]!==a||e[3]!==i||e[4]!==r){let t={browserStatus:u,sessionStatus:i,selectionStatus:a,transportStatus:r,e2eeStatus:d};h=ae(t),g=oe(t),e[0]=u,e[1]=d,e[2]=a,e[3]=i,e[4]=r,e[5]=h,e[6]=g}else h=e[5],g=e[6];let _=g,v;e[7]===_?v=e[8]:(v=(0,J.jsx)(Ct,{indicator:_,className:`size-4`}),e[7]=_,e[8]=v);let y;e[9]===t.label?y=e[10]:(y=(0,J.jsx)(`span`,{className:`max-w-32 truncate font-medium`,children:t.label}),e[9]=t.label,e[10]=y);let x;e[11]===h?x=e[12]:(x=(0,J.jsx)(`span`,{className:`max-w-24 truncate text-xs text-muted-foreground`,children:h}),e[11]=h,e[12]=x);let S;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,J.jsx)(b,{"aria-hidden":!0,className:`size-3.5 transition-transform group-open:rotate-180`}),e[13]=S):S=e[13];let C;e[14]!==v||e[15]!==y||e[16]!==x?(C=(0,J.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center gap-2 rounded-lg border border-border bg-card/95 px-3 py-2 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[v,y,x,S]}),e[14]=v,e[15]=y,e[16]=x,e[17]=C):C=e[17];let w;e[18]===t.label?w=e[19]:(w=(0,J.jsx)(`p`,{className:`font-medium`,children:t.label}),e[18]=t.label,e[19]=w);let T=c??`Role unavailable`,E;e[20]!==h||e[21]!==T?(E=(0,J.jsxs)(`p`,{className:`mt-0.5 text-xs capitalize text-muted-foreground`,children:[T,` · `,h]}),e[20]=h,e[21]=T,e[22]=E):E=e[22];let D;e[23]!==t.label||e[24]!==h?(D=(0,J.jsxs)(`p`,{className:`sr-only`,"aria-live":`polite`,children:[`Node `,t.label,`: `,h,`.`]}),e[23]=t.label,e[24]=h,e[25]=D):D=e[25];let k;e[26]===l?k=e[27]:(k=l?(0,J.jsx)(`p`,{role:`status`,className:`mt-2 text-xs text-muted-foreground`,children:l}):null,e[26]=l,e[27]=k);let A;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,J.jsx)(Et,{}),e[28]=A):A=e[28];let j;e[29]===p?j=e[30]:(j=()=>void p(),e[29]=p,e[30]=j);let re;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,J.jsx)(ce,{"aria-hidden":!0,className:`size-4`}),e[31]=re):re=e[31];let M;e[32]===j?M=e[33]:(M=(0,J.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:j,children:[re,` All nodes`]}),e[32]=j,e[33]=M);let N;if(e[34]!==u||e[35]!==s||e[36]!==t.id||e[37]!==n||e[38]!==f){let r;e[40]===t.id?r=e[41]:(r=e=>e.id!==t.id,e[40]=t.id,e[41]=r);let i;e[42]!==u||e[43]!==s||e[44]!==f?(i=e=>(0,J.jsxs)(`button`,{type:`button`,disabled:s!==`ready`||u!==`current`||e.revokedAt!==null||e.capabilities?.nativeClientRequired===!0,title:e.capabilities?.nativeClientRequired===!0?`Open in Desktop/Mobile`:void 0,className:`flex w-full items-center justify-between rounded-md px-2 py-2 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50`,onClick:()=>void f(e),children:[(0,J.jsx)(`span`,{className:`truncate`,children:e.label}),(0,J.jsx)(wt,{node:e})]},e.id),e[42]=u,e[43]=s,e[44]=f,e[45]=i):i=e[45],N=n.filter(r).map(i),e[34]=u,e[35]=s,e[36]=t.id,e[37]=n,e[38]=f,e[39]=N}else N=e[39];let P;e[46]!==M||e[47]!==N?(P=(0,J.jsxs)(`div`,{className:`mt-3 max-h-48 space-y-1 overflow-auto border-t border-border pt-3`,children:[M,N]}),e[46]=M,e[47]=N,e[48]=P):P=e[48];let F;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,J.jsxs)(O,{size:`sm`,variant:`outline`,onClick:Mt,children:[(0,J.jsx)(te,{"aria-hidden":!0}),` Refresh`]}),e[49]=F):F=e[49];let I;e[50]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,onClick:jt,children:[(0,J.jsx)(ee,{"aria-hidden":!0}),` Sign out`]}),e[50]=I):I=e[50];let L;e[51]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,J.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 border-t border-border pt-3`,children:[F,I,(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,onClick:()=>{m.current&&(m.current.open=!1),Te({kind:`account`,section:`security`})},children:[(0,J.jsx)(ne,{"aria-hidden":!0}),` Security details`]})]}),e[51]=L):L=e[51];let R;e[52]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,J.jsxs)(`div`,{className:`mt-3 space-y-3 border-t border-border pt-3`,children:[(0,J.jsx)(at,{}),(0,J.jsx)(vt,{compact:!0})]}),e[52]=R):R=e[52];let z;e[53]!==k||e[54]!==P||e[55]!==w||e[56]!==E||e[57]!==D?(z=(0,J.jsxs)(`div`,{className:`absolute right-0 z-50 mt-2 w-72 rounded-xl border border-border bg-popover p-3 shadow-xl`,children:[w,E,D,k,A,P,L,R]}),e[53]=k,e[54]=P,e[55]=w,e[56]=E,e[57]=D,e[58]=z):z=e[58];let B;return e[59]!==z||e[60]!==C?(B=(0,J.jsx)(`div`,{className:`relative max-w-full`,children:(0,J.jsxs)(`details`,{ref:m,className:`group relative`,children:[C,z]})}),e[59]=z,e[60]=C,e[61]=B):B=e[61],B}function jt(){v.signOut()}function Mt(){v.refreshDirectory()}function Nt(e){return e.browserStatus}function Pt(e){return e.errorMessage}function Ft(e){return e.effectiveRole}function It(e){return e.directoryStatus}function Lt(e){return e.selectionStatus}function Rt(e){return e.sessionStatus}function zt(e){return e.transportStatus}function Bt(e){return e.nodes}function Vt(e){return e.selectedNode}function Ht(e){let t=(0,G.c)(66),{open:n,onOpenChange:r}=e,i=o($t),a=o(Qt),s=o(Zt),c=o(Xt),l=o(Yt),u=o(Jt),d=o(qt),f=o(Kt),p=o(Gt),m=ie(),{switchNode:h,returnToAllNodes:g}=Tt();if(!i)return null;let _,v;if(t[0]!==p||t[1]!==m||t[2]!==l||t[3]!==c||t[4]!==s){let e={browserStatus:p,sessionStatus:c,selectionStatus:l,transportStatus:s,e2eeStatus:m};_=ae(e),v=oe(e),t[0]=p,t[1]=m,t[2]=l,t[3]=c,t[4]=s,t[5]=_,t[6]=v}else _=t[5],v=t[6];let y=v,b=u!==`ready`||p!==`current`,x;t[7]===y?x=t[8]:(x=(0,J.jsx)(Ct,{indicator:y,className:`size-4`}),t[7]=y,t[8]=x);let S;t[9]===i.label?S=t[10]:(S=(0,J.jsx)(`span`,{className:`truncate`,children:i.label}),t[9]=i.label,t[10]=S);let C;t[11]!==x||t[12]!==S?(C=(0,J.jsxs)(M,{className:`flex items-center gap-2`,children:[x,S]}),t[11]=x,t[12]=S,t[13]=C):C=t[13];let w=d??`Role unavailable`,T;t[14]!==_||t[15]!==w?(T=(0,J.jsxs)(re,{className:`capitalize`,children:[w,` · `,_]}),t[14]=_,t[15]=w,t[16]=T):T=t[16];let E;t[17]!==i.label||t[18]!==_?(E=(0,J.jsxs)(`p`,{className:`sr-only`,"aria-live":`polite`,children:[`Node `,i.label,`: `,_,`.`]}),t[17]=i.label,t[18]=_,t[19]=E):E=t[19];let D;t[20]!==C||t[21]!==T||t[22]!==E?(D=(0,J.jsxs)(j,{children:[C,T,E]}),t[20]=C,t[21]=T,t[22]=E,t[23]=D):D=t[23];let k;t[24]===f?k=t[25]:(k=f?(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:f}):null,t[24]=f,t[25]=k);let F;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,J.jsx)(Et,{}),t[26]=F):F=t[26];let I;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,J.jsx)(ne,{"aria-hidden":!0,className:`size-4 shrink-0`}),t[27]=I):I=t[27];let L;t[28]===r?L=t[29]:(L=(0,J.jsx)(N,{label:`Security details`,icon:I,onClick:()=>{r(!1),Te({kind:`account`,section:`security`})}}),t[28]=r,t[29]=L);let R;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,J.jsx)(ce,{"aria-hidden":!0,className:`size-4 shrink-0`}),t[30]=R):R=t[30];let z;t[31]!==r||t[32]!==g?(z=(0,J.jsx)(N,{label:`All nodes`,icon:R,onClick:()=>{r(!1),g()}}),t[31]=r,t[32]=g,t[33]=z):z=t[33];let B;if(t[34]!==i.id||t[35]!==a||t[36]!==r||t[37]!==h||t[38]!==b){let e;t[40]===i.id?e=t[41]:(e=e=>e.id!==i.id,t[40]=i.id,t[41]=e);let n;t[42]!==r||t[43]!==h||t[44]!==b?(n=e=>(0,J.jsx)(N,{label:e.label,disabled:b||e.revokedAt!==null||e.capabilities?.nativeClientRequired===!0,disabledReason:e.capabilities?.nativeClientRequired===!0?`Open in Desktop/Mobile`:e.revokedAt===null?`Node switching is unavailable until the directory and this browser are current.`:`Access to this node was revoked.`,trailing:(0,J.jsx)(wt,{node:e}),onClick:()=>{r(!1),h(e)}},e.id),t[42]=r,t[43]=h,t[44]=b,t[45]=n):n=t[45],B=a.filter(e).map(n),t[34]=i.id,t[35]=a,t[36]=r,t[37]=h,t[38]=b,t[39]=B}else B=t[39];let V;t[46]!==L||t[47]!==z||t[48]!==B?(V=(0,J.jsxs)(`div`,{className:`mt-3 space-y-1 border-t border-border pt-3`,children:[L,z,B]}),t[46]=L,t[47]=z,t[48]=B,t[49]=V):V=t[49];let se=u===`loading`,H;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,J.jsx)(te,{"aria-hidden":!0}),t[50]=H):H=t[50];let U;t[51]===se?U=t[52]:(U=(0,J.jsxs)(O,{size:`sm`,variant:`outline`,className:`min-h-11`,disabled:se,onClick:Wt,children:[H,` Refresh nodes`]}),t[51]=se,t[52]=U);let W;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,className:`min-h-11`,onClick:Ut,children:[(0,J.jsx)(ee,{"aria-hidden":!0}),` Sign out`]}),t[53]=W):W=t[53];let K;t[54]===U?K=t[55]:(K=(0,J.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 border-t border-border pt-3`,children:[U,W]}),t[54]=U,t[55]=K);let le;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,J.jsx)(`div`,{className:`mt-3 space-y-3 border-t border-border pt-3`,children:(0,J.jsx)(vt,{compact:!0})}),t[56]=le):le=t[56];let q;t[57]!==V||t[58]!==K||t[59]!==k?(q=(0,J.jsxs)(A,{children:[k,F,V,K,le]}),t[57]=V,t[58]=K,t[59]=k,t[60]=q):q=t[60];let ue;return t[61]!==r||t[62]!==n||t[63]!==q||t[64]!==D?(ue=(0,J.jsxs)(P,{open:n,onOpenChange:r,label:`Connection`,children:[D,q]}),t[61]=r,t[62]=n,t[63]=q,t[64]=D,t[65]=ue):ue=t[65],ue}function Ut(){v.signOut()}function Wt(){v.refreshDirectory()}function Gt(e){return e.browserStatus}function Kt(e){return e.errorMessage}function qt(e){return e.effectiveRole}function Jt(e){return e.directoryStatus}function Yt(e){return e.selectionStatus}function Xt(e){return e.sessionStatus}function Zt(e){return e.transportStatus}function Qt(e){return e.nodes}function $t(e){return e.selectedNode}function en(){let e=(0,G.c)(25),t=o(on),n=o(an),r=o(rn),i=o(nn),a=o(tn),s=ie(),[c,l]=(0,K.useState)(!1);if(!t)return null;let u,d;if(e[0]!==a||e[1]!==s||e[2]!==i||e[3]!==r||e[4]!==n){let t={browserStatus:a,sessionStatus:r,selectionStatus:i,transportStatus:n,e2eeStatus:s};u=ae(t),d=oe(t),e[0]=a,e[1]=s,e[2]=i,e[3]=r,e[4]=n,e[5]=u,e[6]=d}else u=e[5],d=e[6];let f=d,p;e[7]!==t.label||e[8]!==c||e[9]!==r||e[10]!==u?(p=c?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`span`,{role:`status`,"aria-live":`polite`,"data-testid":`hosted-connection-status-announcer`,className:`sr-only`,children:[`Node `,t.label,`: `,u,`.`]}),r===`delivery-unknown`?(0,J.jsx)(`span`,{role:`alert`,className:`sr-only`,children:`Delivery unknown: a request may or may not have reached the node. Open the connection controls to acknowledge.`}):null]}),e[7]=t.label,e[8]=c,e[9]=r,e[10]=u,e[11]=p):p=e[11];let m=`Connection: ${t.label}, ${u}`,h;e[12]===f?h=e[13]:(h=(0,J.jsx)(Ct,{indicator:f,testId:`hosted-connection-icon`,className:`size-3.5 shrink-0`}),e[12]=f,e[13]=h);let g;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>l(!0),e[14]=g):g=e[14];let _;e[15]!==f.shortLabel||e[16]!==m||e[17]!==h?(_=(0,J.jsx)(nt,{testId:`hosted-connection-pill`,label:m,status:f.shortLabel,icon:h,onClick:g}),e[15]=f.shortLabel,e[16]=m,e[17]=h,e[18]=_):_=e[18];let v;e[19]===c?v=e[20]:(v=(0,J.jsx)(Ht,{open:c,onOpenChange:l}),e[19]=c,e[20]=v);let y;return e[21]!==p||e[22]!==_||e[23]!==v?(y=(0,J.jsxs)(J.Fragment,{children:[p,_,v]}),e[21]=p,e[22]=_,e[23]=v,e[24]=y):y=e[24],y}function tn(e){return e.browserStatus}function nn(e){return e.selectionStatus}function rn(e){return e.sessionStatus}function an(e){return e.transportStatus}function on(e){return e.selectedNode}function sn(){let e=(0,G.c)(2),t=k(),n;return e[0]===t?n=e[1]:(n=t===`phone`?(0,J.jsx)(en,{}):(0,J.jsx)(At,{}),e[0]=t,e[1]=n),n}export{De as _,Tt as a,Le as c,et as d,Pe as f,Ee as g,Te as h,wt as i,Ze as l,me as m,en as n,vt as o,pe as p,At as r,_t as s,sn as t,Ne as u,U as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./index-BL8_ra0g.js";import{t as r}from"./compiler-runtime-qmuS0Svy.js";import"./src-Ca7Gag3m.js";import{F as i,Jt as a,M as o,N as s,P as c,Wt as l}from"./runtime-DYzjhL5M.js";import{It as u}from"./composerDraftStore-DC2r8dcu.js";import{a as d,i as f,o as p}from"./useHandleNewThread-820pBJCC.js";import{t as m}from"./useNavigate-2tVq4iZ2.js";import{Kt as h,_ as g,b as _,o as v}from"./authorization-BwQZHweJ.js";import{t as y}from"./RootAppShell-BVXRShhe.js";import{f as b}from"./useRenderElement-DchFnsR8.js";import{t as x}from"./arrow-left-Dtj9PfsA.js";import{n as S,t as C}from"./loader-circle-CrtHFAvM.js";import{t as w}from"./chevron-down-B7C6FKzM.js";import{t as T}from"./chevron-right-BWYGybX9.js";import{n as E,o as D,t as O}from"./toast-Cw7bXJzg.js";import{t as k}from"./copy-UQjKGt7t.js";import{t as A}from"./key-round-CacMputS.js";import{_ as j,a as M,c as N,d as P,f as F,g as I,h as L,i as R,l as z,m as B,o as ee,p as te,t as ne,u as re}from"./HostedConnectionControls-S2Wr9fiZ.js";import{t as ie}from"./log-out-tMJm0Gk6.js";import{t as V}from"./palette-BSD_aJZg.js";import{t as ae}from"./refresh-cw-DopCMrtR.js";import{t as oe}from"./server-JApJpgLa.js";import{t as H}from"./shield-check-dQ-4cMKk.js";import{t as se}from"./triangle-alert-RL_T3KLo.js";import{t as ce}from"./user-round-Cpzx8pSw.js";import{t as U}from"./utils-B76_2Yk7.js";import{n as W,t as G}from"./input-Dl4N9ZfE.js";import{u as le}from"./Icons-DZpTOLIb.js";import{t as K}from"./button-Wf_1nfeu.js";import{t as q}from"./useCopyToClipboard-BTpWxumf.js";import{a as J,i as ue,n as de,o as fe,r as pe,s as me,t as he}from"./sheet-CQIQYfOM.js";import{t as ge}from"./skeleton-Mgh4Gx9x.js";import{t as _e}from"./usePresentationTier-B_SCFvN7.js";import{i as ve,r as ye,t as be}from"./alert-BymbRVPf.js";import{a as xe,c as Se,i as Ce,o as we,r as Te,s as Ee,t as De}from"./dialog-CUxw5AxI.js";import{t as Y}from"./label-x5DgpBI_.js";import{t as Oe}from"./RycoLetterMark-C-fvI9UB.js";import{a as ke,i as Ae,n as je,o as Me,r as Ne,t as Pe}from"./MobileSheet-BPvuTPR6.js";import{a as Fe,i as Ie,n as Le,o as Re,r as ze,t as Be}from"./empty-D420OZA9.js";import{c as Ve,n as He,r as Ue,t as We}from"./ExternalIdentityWeb.logic-BqdBjAua.js";import{a as Ge}from"./settingsLayout-C7bl9Xi4.js";import{n as Ke,r as qe,t as Je}from"./phoneAnchoredActions-CtpkI3yG.js";import{t as Ye}from"./HostedRelayTrustNotice-CbF_SOpf.js";import{n as X,t as Xe}from"./data-list-BSiCZBKn.js";var Ze=b(`life-buoy`,[[`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`}]]),Qe=b(`mail`,[[`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`}]]),Z=e(t(),1),Q=r(),$e=/^[A-Za-z0-9_-]{43}$/u,et=/^signup_[A-Za-z0-9_-]{22,43}$/u;function tt(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&&et.test(n)&&r!==null&&$e.test(r)&&i!==null&&$e.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&&$e.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&&$e.test(t)?{kind:`email-verification`,token:t}:{kind:`invalid-email-verification`}}return null}function nt(e){let t=new URL(e.href),n=tt(t);return n===null?null:(e.replaceState(e.historyState,``,`${t.pathname}${t.search}`),n)}function rt(){let e=(0,Q.c)(3),t=s(st),n,r;e[0]===t?(n=e[1],r=e[2]):(n=()=>{if(t!==`authenticated`)return;let e=at,n=()=>{document.visibilityState===`hidden`?(d(!0),v.suspendBrowser(`hidden`)):e()},r=it,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 it(){d(!0),v.suspendBrowser(`offline`)}function at(){document.visibilityState===`visible`&&navigator.onLine&&v.resumeBrowser().then(ot)}function ot(){return d(!1)}function st(e){return e.accountStatus}var $=u(),ct=100;function lt(e){let t=(0,Q.c)(52),{node:n,open:r,onOpenChange:i,onRename:a}=e,[o,s]=(0,Z.useState)(n.label),[c,l]=(0,Z.useState)(!1),[u,d]=(0,Z.useState)(null),f,p;t[0]!==n.label||t[1]!==r?(f=()=>{r&&(s(n.label),l(!1),d(null))},p=[n.label,r],t[0]=n.label,t[1]=r,t[2]=f,t[3]=p):(f=t[2],p=t[3]),(0,Z.useEffect)(f,p);let m;t[4]===o?m=t[5]:(m=o.trim(),t[4]=o,t[5]=m);let h=m,g=h.length===0?`Enter a node name.`:h.length>ct?`Use 100 characters or fewer.`:null,_=g===null&&h!==n.label&&!c,v;t[6]!==_||t[7]!==h||t[8]!==i||t[9]!==a?(v=async()=>{if(_){l(!0),d(null);try{await a(h),i(!1)}catch(e){let t=e;d(t instanceof Error?t.message:`Unable to rename this node.`),l(!1)}}},t[6]=_,t[7]=h,t[8]=i,t[9]=a,t[10]=v):v=t[10];let y=v,b=!c,x;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsxs)(xe,{children:[(0,$.jsx)(Se,{children:`Rename node`}),(0,$.jsx)(Te,{children:`This is the canonical name shown to everyone authorized to use this node.`})]}),t[11]=x):x=t[11];let S;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(`label`,{htmlFor:`hosted-node-name`,className:`text-sm font-medium`,children:`Node name`}),t[12]=S):S=t[12];let C=g!==null||u!==null,w;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>{s(e.currentTarget.value),d(null)},t[13]=w):w=t[13];let T;t[14]!==_||t[15]!==y?(T=e=>{e.key===`Enter`&&_&&y()},t[14]=_,t[15]=y,t[16]=T):T=t[16];let E;t[17]!==o||t[18]!==c||t[19]!==T||t[20]!==C?(E=(0,$.jsx)(G,{id:`hosted-node-name`,value:o,autoFocus:!0,disabled:c,"aria-invalid":C,onChange:w,onKeyDown:T}),t[17]=o,t[18]=c,t[19]=T,t[20]=C,t[21]=E):E=t[21];let D;t[22]===g?D=t[23]:(D=g?(0,$.jsx)(`p`,{className:`text-xs text-destructive`,children:g}):null,t[22]=g,t[23]=D);let O;t[24]===u?O=t[25]:(O=u?(0,$.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:u}):null,t[24]=u,t[25]=O);let k;t[26]!==E||t[27]!==D||t[28]!==O?(k=(0,$.jsxs)(we,{className:`space-y-2`,children:[S,E,D,O]}),t[26]=E,t[27]=D,t[28]=O,t[29]=k):k=t[29];let A;t[30]===i?A=t[31]:(A=()=>i(!1),t[30]=i,t[31]=A);let j;t[32]!==c||t[33]!==A?(j=(0,$.jsx)(K,{variant:`outline`,disabled:c,onClick:A,children:`Cancel`}),t[32]=c,t[33]=A,t[34]=j):j=t[34];let M=!_,N;t[35]===y?N=t[36]:(N=()=>void y(),t[35]=y,t[36]=N);let P=c?`Saving…`:`Save`,F;t[37]!==M||t[38]!==N||t[39]!==P?(F=(0,$.jsx)(K,{disabled:M,onClick:N,children:P}),t[37]=M,t[38]=N,t[39]=P,t[40]=F):F=t[40];let I;t[41]!==j||t[42]!==F?(I=(0,$.jsxs)(Ce,{children:[j,F]}),t[41]=j,t[42]=F,t[43]=I):I=t[43];let L;t[44]!==k||t[45]!==I||t[46]!==b?(L=(0,$.jsxs)(Ee,{className:`max-w-md`,showCloseButton:b,children:[x,k,I]}),t[44]=k,t[45]=I,t[46]=b,t[47]=L):L=t[47];let R;return t[48]!==i||t[49]!==r||t[50]!==L?(R=(0,$.jsx)(De,{open:r,onOpenChange:i,children:L}),t[48]=i,t[49]=r,t[50]=L,t[51]=R):R=t[51],R}var ut=`owner_revoked`,dt=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.`})]),ft=`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 pt(e){return{title:`Revoke ${e.label}?`,consequences:dt,subjectPrompt:ft,subjectId:e.id,confirmLabel:`Revoke this node`,pendingLabel:`Revoking…`,cancelLabel:`Cancel`,dismissLabel:`Back to the list`}}var mt=`Revoke`;function ht(e){return`${e} was revoked. It is gone from this Hub's directory for every account, and this cannot be undone.`}function gt(e){return e===null||e.outcome===`unchanged`}var _t=e=>Object.freeze(e),vt=Object.freeze([_t({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`})}),_t({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`})}),_t({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`})}),_t({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`})}),_t({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`})}),_t({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`})}),_t({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`})}),_t({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`})}),_t({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`})})]),yt=Object.freeze({message:`This node could not be revoked. Nothing was changed. Try again in a moment.`,outcome:`unchanged`});function bt(e){let t=xt(e),n=St(e);for(let e of vt)if(e.selects(t,n))return e.failure;return yt}function xt(e){if(typeof e!=`object`||!e)return null;let{status:t}=e;return typeof t==`number`&&Number.isFinite(t)?t:null}function St(e){if(typeof e!=`object`||!e)return null;let{code:t}=e;return typeof t==`string`?t:null}var Ct=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function wt(e){return e===null||!Number.isFinite(e)?null:Ct.format(new Date(e))}function Tt(e){switch(e){case`darwin`:return`macOS`;case`linux`:return`Linux`;case`windows`:return`Windows`;case`unknown`:return`Unknown platform`}}function Et(e){return e.length===0?e:e[0].toUpperCase()+e.slice(1)}function Dt(e){return Et(e)}function Ot(e,t){if(!Number.isFinite(e))return`unknown`;let n=t-e;if(n<0)return wt(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`:wt(e)??`unknown`}function kt(e,t){return e.presence.online?null:e.presence.lastHeartbeatAt===null?e.lastAuthenticatedAt===null?`No connection recorded`:`Last authenticated ${Ot(e.lastAuthenticatedAt,t)}`:`Last seen ${Ot(e.presence.lastHeartbeatAt,t)}`}function At(e){let t=`${Tt(e.platformOs)} · ${e.platformArch}`;return e.revokedAt===null?`${t} · ${Dt(e.effectiveRole)}`:e.revocationReasonCode?`${t} · Access revoked — ${e.revocationReasonCode}`:`${t} · Access revoked`}function jt(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 Mt(e){return e.filter(e=>e.revokedAt===null).length}function Nt(e){return e.filter(e=>e.revokedAt===null&&e.presence.online).length}function Pt(e){let t=Mt(e),n=Nt(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 Ft(e){return e.directoryStatus!==`ready`||e.browserStatus!==`current`||e.node.revokedAt!==null||e.node.capabilities?.nativeClientRequired===!0}function It(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.`}function Lt({node:e,open:t,onOpenChange:n,onRevoke:r}){let[i,a]=(0,Z.useState)(!1),[o,s]=(0,Z.useState)(null),c=pt(e),l=gt(o);(0,Z.useEffect)(()=>{!t||i||(a(!1),s(null))},[e.id,t]);let u=async()=>{if(!i){a(!0),s(null);try{await r(),n(!1)}catch(e){s(bt(e)),a(!1)}}};return(0,$.jsx)(De,{open:t,onOpenChange:e=>{!e&&i||n(e)},disablePointerDismissal:i,children:(0,$.jsxs)(Ee,{className:`max-w-md`,showCloseButton:!i,children:[(0,$.jsxs)(xe,{children:[(0,$.jsx)(Se,{children:c.title}),(0,$.jsx)(Te,{children:c.subjectPrompt})]}),(0,$.jsxs)(we,{className:`space-y-4`,children:[(0,$.jsxs)(Xe,{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:`${Tt(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)(se,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0`}),o.message]}):null]}),(0,$.jsxs)(Ce,{children:[(0,$.jsx)(K,{variant:`outline`,disabled:i,onClick:()=>n(!1),children:l?c.cancelLabel:c.dismissLabel}),l?(0,$.jsx)(K,{variant:`destructive`,disabled:i,onClick:()=>void u(),children:i?c.pendingLabel:c.confirmLabel}):null]})]})})}function Rt(e){let t=(0,Q.c)(57),{node:n}=e,r=Ge(6e4),{copyToClipboard:i,isCopied:a}=q(),o;t[0]===n.createdAt?o=t[1]:(o=wt(n.createdAt),t[0]=n.createdAt,t[1]=o);let s=o,c;t[2]===n.lastAuthenticatedAt?c=t[3]:(c=wt(n.lastAuthenticatedAt),t[2]=n.lastAuthenticatedAt,t[3]=c);let l=c,u;t[4]===n.revokedAt?u=t[5]:(u=wt(n.revokedAt),t[4]=n.revokedAt,t[5]=u);let d=u,f=n.grant.role!==n.effectiveRole,p;t[6]===n?p=t[7]:(p=(0,$.jsx)(X,{term:`Status`,children:(0,$.jsx)(R,{node:n})}),t[6]=n,t[7]=p);let m;t[8]!==n.presence.lastHeartbeatAt||t[9]!==r?(m=n.presence.lastHeartbeatAt===null?`Not reported`:(0,$.jsx)(`span`,{title:wt(n.presence.lastHeartbeatAt)??void 0,children:Ot(n.presence.lastHeartbeatAt,r)}),t[8]=n.presence.lastHeartbeatAt,t[9]=r,t[10]=m):m=t[10];let h;t[11]===m?h=t[12]:(h=(0,$.jsx)(X,{term:`Last heartbeat`,children:m}),t[11]=m,t[12]=h);let g=l??`Never`,_;t[13]===g?_=t[14]:(_=(0,$.jsx)(X,{term:`Last connected`,children:g}),t[13]=g,t[14]=_);let v;t[15]===n.platformOs?v=t[16]:(v=Tt(n.platformOs),t[15]=n.platformOs,t[16]=v);let y=`${v} · ${n.platformArch}`,b;t[17]===y?b=t[18]:(b=(0,$.jsx)(X,{term:`Platform`,children:y}),t[17]=y,t[18]=b);let x;t[19]===n.clientVersion?x=t[20]:(x=(0,$.jsx)(X,{term:`Client version`,mono:!0,children:n.clientVersion}),t[19]=n.clientVersion,t[20]=x);let C;t[21]===n.effectiveRole?C=t[22]:(C=Dt(n.effectiveRole),t[21]=n.effectiveRole,t[22]=C);let w;t[23]===C?w=t[24]:(w=(0,$.jsx)(X,{term:`Your role`,children:C}),t[23]=C,t[24]=w);let T;t[25]!==f||t[26]!==n.grant.role?(T=f?(0,$.jsxs)(X,{term:`Granted role`,children:[Dt(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]=f,t[26]=n.grant.role,t[27]=T):T=t[27];let E=s??`Not reported`,D;t[28]===E?D=t[29]:(D=(0,$.jsx)(X,{term:`Enrolled`,children:E}),t[28]=E,t[29]=D);let O;t[30]!==n.revocationReasonCode||t[31]!==n.revokedAt||t[32]!==d?(O=n.revokedAt===null?null:(0,$.jsx)(X,{term:`Revoked`,children:`${d??`Not reported`}${n.revocationReasonCode?` — ${n.revocationReasonCode}`:``}`}),t[30]=n.revocationReasonCode,t[31]=n.revokedAt,t[32]=d,t[33]=O):O=t[33];let A=a?`Copied`:`Copy node ID`,j;t[34]!==i||t[35]!==n.id?(j=()=>i(n.id,void 0),t[34]=i,t[35]=n.id,t[36]=j):j=t[36];let M;t[37]===a?M=t[38]:(M=a?(0,$.jsx)(S,{"aria-hidden":!0}):(0,$.jsx)(k,{"aria-hidden":!0}),t[37]=a,t[38]=M);let N;t[39]!==A||t[40]!==j||t[41]!==M?(N=(0,$.jsx)(K,{size:`icon-xs`,variant:`ghost`,"aria-label":A,onClick:j,children:M}),t[39]=A,t[40]=j,t[41]=M,t[42]=N):N=t[42];let P;t[43]!==n.id||t[44]!==N?(P=(0,$.jsx)(X,{term:`Node ID`,mono:!0,action:N,children:n.id}),t[43]=n.id,t[44]=N,t[45]=P):P=t[45];let F;return t[46]!==b||t[47]!==x||t[48]!==w||t[49]!==T||t[50]!==D||t[51]!==O||t[52]!==P||t[53]!==p||t[54]!==h||t[55]!==_?(F=(0,$.jsxs)(Xe,{children:[p,h,_,b,x,w,T,D,O,P]}),t[46]=b,t[47]=x,t[48]=w,t[49]=T,t[50]=D,t[51]=O,t[52]=P,t[53]=p,t[54]=h,t[55]=_,t[56]=F):F=t[56],F}function zt(e){let t=(0,Q.c)(93),{node:n,directoryStatus:r,browserStatus:i,canRename:a,canRevoke:o,onOpenChange:s,onConnect:c,onRename:l,onRevoke:u}=e,d=_e()===`phone`,[f,p]=(0,Z.useState)(null),[m,h]=(0,Z.useState)(null),g=n!==null;if(!n)return null;let _;t[0]!==i||t[1]!==r||t[2]!==n?(_=Ft({directoryStatus:r,browserStatus:i,node:n}),t[0]=i,t[1]=r,t[2]=n,t[3]=_):_=t[3];let v=_,y;t[4]!==i||t[5]!==r||t[6]!==n?(y=It({directoryStatus:r,browserStatus:i,node:n}),t[4]=i,t[5]=r,t[6]=n,t[7]=y):y=t[7];let b=y,x;t[8]!==n||t[9]!==c||t[10]!==s?(x=()=>{s(!1),c(n)},t[8]=n,t[9]=c,t[10]=s,t[11]=x):x=t[11];let S=x,C=v&&b?b:null;if(d){let e=`Node details: ${n.label}`,r;t[12]===n.label?r=t[13]:(r=(0,$.jsx)(Me,{children:n.label}),t[12]=n.label,t[13]=r);let i;t[14]===n?i=t[15]:(i=At(n),t[14]=n,t[15]=i);let a;t[16]===i?a=t[17]:(a=(0,$.jsx)(je,{children:i}),t[16]=i,t[17]=a);let o;t[18]!==r||t[19]!==a?(o=(0,$.jsxs)(Ae,{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)(Rt,{node:n}),t[21]=n,t[22]=c);let l;t[23]===C?l=t[24]:(l=C?(0,$.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:C}):null,t[23]=C,t[24]=l);let u;t[25]!==l||t[26]!==c?(u=(0,$.jsxs)(ke,{children:[c,l]}),t[25]=l,t[26]=c,t[27]=u):u=t[27];let d;t[28]!==v||t[29]!==S?(d=(0,$.jsx)(Ne,{children:(0,$.jsx)(K,{className:`min-h-11`,disabled:v,onClick:S,children:`Connect`})}),t[28]=v,t[29]=S,t[30]=d):d=t[30];let f;return t[31]!==s||t[32]!==g||t[33]!==u||t[34]!==d||t[35]!==e||t[36]!==o?(f=(0,$.jsxs)(Pe,{open:g,onOpenChange:s,label:e,children:[o,u,d]}),t[31]=s,t[32]=g,t[33]=u,t[34]=d,t[35]=e,t[36]=o,t[37]=f):f=t[37],f}let w=o&&n.revokedAt===null,T;t[38]!==s||t[39]!==f||t[40]!==m?(T=e=>{!e&&(m!==null||f!==null)||(e||(p(null),h(null)),s(e))},t[38]=s,t[39]=f,t[40]=m,t[41]=T):T=t[41];let E;t[42]===n.label?E=t[43]:(E=(0,$.jsx)(me,{className:`truncate`,children:n.label}),t[42]=n.label,t[43]=E);let D;t[44]===n?D=t[45]:(D=At(n),t[44]=n,t[45]=D);let O;t[46]===D?O=t[47]:(O=(0,$.jsx)(de,{children:D}),t[46]=D,t[47]=O);let k;t[48]!==E||t[49]!==O?(k=(0,$.jsxs)(ue,{children:[E,O]}),t[48]=E,t[49]=O,t[50]=k):k=t[50];let A;t[51]===n?A=t[52]:(A=(0,$.jsx)(Rt,{node:n}),t[51]=n,t[52]=A);let j;t[53]===C?j=t[54]:(j=C?(0,$.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:C}):null,t[53]=C,t[54]=j);let M;t[55]!==j||t[56]!==A?(M=(0,$.jsxs)(J,{children:[A,j]}),t[55]=j,t[56]=A,t[57]=M):M=t[57];let N;t[58]!==n.id||t[59]!==w?(N=w?(0,$.jsx)(K,{variant:`destructive-outline`,className:`sm:mr-auto`,onClick:()=>h(n.id),children:mt}):null,t[58]=n.id,t[59]=w,t[60]=N):N=t[60];let P;t[61]!==a||t[62]!==n.id?(P=a?(0,$.jsx)(K,{variant:`outline`,onClick:()=>p(n.id),children:`Rename`}):null,t[61]=a,t[62]=n.id,t[63]=P):P=t[63];let F;t[64]!==v||t[65]!==S?(F=(0,$.jsx)(K,{disabled:v,onClick:S,children:`Connect`}),t[64]=v,t[65]=S,t[66]=F):F=t[66];let I;t[67]!==N||t[68]!==P||t[69]!==F?(I=(0,$.jsxs)(pe,{children:[N,P,F]}),t[67]=N,t[68]=P,t[69]=F,t[70]=I):I=t[70];let L;t[71]!==M||t[72]!==I||t[73]!==k?(L=(0,$.jsxs)(fe,{side:`right`,className:`w-full sm:max-w-md`,children:[k,M,I]}),t[71]=M,t[72]=I,t[73]=k,t[74]=L):L=t[74];let R;t[75]!==g||t[76]!==L||t[77]!==T?(R=(0,$.jsx)(he,{open:g,onOpenChange:T,children:L}),t[75]=g,t[76]=L,t[77]=T,t[78]=R):R=t[78];let z;t[79]!==a||t[80]!==n||t[81]!==l||t[82]!==f?(z=a?(0,$.jsx)(lt,{node:n,open:f===n.id,onOpenChange:e=>p(e?n.id:null),onRename:e=>l(n,e)}):null,t[79]=a,t[80]=n,t[81]=l,t[82]=f,t[83]=z):z=t[83];let B;t[84]!==n||t[85]!==u||t[86]!==w||t[87]!==m?(B=w?(0,$.jsx)(Lt,{node:n,open:m===n.id,onOpenChange:e=>h(e?n.id:null),onRevoke:()=>u(n)}):null,t[84]=n,t[85]=u,t[86]=w,t[87]=m,t[88]=B):B=t[88];let ee;return t[89]!==R||t[90]!==z||t[91]!==B?(ee=(0,$.jsxs)($.Fragment,{children:[R,z,B]}),t[89]=R,t[90]=z,t[91]=B,t[92]=ee):ee=t[92],ee}function Bt(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 Vt(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=U(`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 Ht(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=U(`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)(Oe,{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,Ke]}),t[5]=o,t[6]=c,t[7]=l):l=t[7],l}var Ut=`h-dvh overflow-x-hidden overflow-y-auto overscroll-contain text-foreground`,Wt=`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))]`,Gt=`flex min-h-full flex-col`,Kt={form:`max-w-[28rem]`,content:`max-w-3xl`,page:`max-w-5xl`};function qt(e){let t=(0,Q.c)(13),{nav:n,trailing:r}=e,i,a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=U(`app-chrome-glass shrink-0 border-border/60 border-b`,`pt-[env(safe-area-inset-top)]`),a=U(`mx-auto flex h-14 w-full items-center gap-3 px-4 sm:px-6`,Kt.page),o=(0,$.jsx)(Ht,{}),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 Jt(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=_e()===`phone`,l;t[0]!==c||t[1]!==r||t[2]!==i?(l=c?null:(0,$.jsx)(qt,{nav:r,trailing:i}),t[0]=c,t[1]=r,t[2]=i,t[3]=l):l=t[3];let u=c?`min-h-full py-10`:`pt-8 pb-16`,d=Kt[s],f;t[4]!==u||t[5]!==d?(f=U(`mx-auto flex w-full flex-col`,u,Wt,d),t[4]=u,t[5]=d,t[6]=f):f=t[6];let p;t[7]!==n||t[8]!==f?(p=(0,$.jsx)(`section`,{className:f,children:n}),t[7]=n,t[8]=f,t[9]=p):p=t[9];let m;t[10]!==a||t[11]!==p?(m=(0,$.jsx)(`main`,{ref:a,className:`min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain`,children:p}),t[10]=a,t[11]=p,t[12]=m):m=t[12];let h;return t[13]!==l||t[14]!==m?(h=(0,$.jsx)(E,{children:(0,$.jsx)(O,{children:(0,$.jsxs)(`div`,{className:`hub-ambient flex h-dvh flex-col text-foreground`,children:[l,m]})})}),t[13]=l,t[14]=m,t[15]=h):h=t[15],h}var Yt=(0,Z.lazy)(()=>n(()=>import(`./AccountSettings-CinnQaX-.js`).then(e=>({default:e.AccountSettingsPanel})),[])),Xt=(0,Z.lazy)(()=>n(()=>import(`./AppearanceSettings-CTh8Z8nz.js`).then(e=>({default:e.AppearanceSettingsPanel})),[])),Zt=[{id:`overview`,label:`Overview`,icon:ce},{id:`security`,label:`Security`,icon:H},{id:`appearance`,label:`Appearance`,icon:V}];function Qt(e){let t=(0,Q.c)(15),{section:n}=e,r=s(en),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsxs)(K,{variant:`ghost`,onClick:$t,children:[(0,$.jsx)(x,{"aria-hidden":!0}),` Nodes`]}),t[0]=i):i=t[0];let a;t[1]===r?a=t[2]:(a=r===null?void 0:`${r.displayName} · ${r.role.charAt(0).toUpperCase()}${r.role.slice(1)}`,t[1]=r,t[2]=a);let o;t[3]===n?o=t[4]:(o=Zt.map(e=>{let t=e.id===n;return(0,$.jsx)(`li`,{children:(0,$.jsxs)(K,{variant:t?`secondary`:`ghost`,"aria-current":t?`page`:void 0,className:`w-full justify-start`,onClick:()=>L({kind:`account`,section:e.id}),children:[(0,$.jsx)(e.icon,{"aria-hidden":!0}),e.label]})},e.id)}),t[3]=n,t[4]=o);let c;t[5]===o?c=t[6]:(c=(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:o})}),t[5]=o,t[6]=c);let l;t[7]===n?l=t[8]:(l=(0,$.jsx)(`div`,{className:`min-w-0 flex-1`,children:n===`overview`?(0,$.jsx)(tn,{}):(0,$.jsx)(Z.Suspense,{fallback:(0,$.jsx)(ge,{className:`h-64 w-full rounded-2xl`}),children:n===`security`?(0,$.jsx)(Yt,{}):(0,$.jsx)(Xt,{surface:`hub`})})}),t[7]=n,t[8]=l);let u;t[9]!==c||t[10]!==l?(u=(0,$.jsxs)(`div`,{className:`flex flex-col gap-6 sm:flex-row sm:gap-8`,children:[c,l]}),t[9]=c,t[10]=l,t[11]=u):u=t[11];let d;return t[12]!==a||t[13]!==u?(d=(0,$.jsx)(Jt,{measure:`page`,trailing:i,children:(0,$.jsx)(Bt,{title:`Account`,description:a,children:u})}),t[12]=a,t[13]=u,t[14]=d):d=t[14],d}function $t(){return L({kind:`nodes`})}function en(e){return e.account}function tn(){let e=(0,Q.c)(11),t=s(nn),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 c;e[6]===o?c=e[7]:(c=(0,$.jsxs)(`div`,{children:[a,(0,$.jsx)(`dd`,{className:`mt-0.5 text-sm`,children:o})]}),e[6]=o,e[7]=c);let l;return e[8]!==i||e[9]!==c?(l=(0,$.jsx)(Vt,{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,c]})}),e[8]=i,e[9]=c,e[10]=l):l=e[10],l}function nn(e){return e.account}function rn(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(an)}),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 an(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 on(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=U(Ut,`hub-ambient`),f=U(Gt,Wt,`py-10`),t[0]=d,t[1]=f):(d=t[0],f=t[1]);let p=Kt[u],m;t[2]===p?m=t[3]:(m=U(`my-auto w-full self-center phone:my-0 phone:flex phone:max-w-none phone:flex-1 phone:flex-col`,p),t[2]=p,t[3]=m);let h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`div`,{className:`mb-8 flex justify-center phone:mb-6 phone:justify-start`,children:(0,$.jsx)(Ht,{size:`lg`})}),t[4]=h):h=t[4];let g;t[5]!==r||t[6]!==c?(g=(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]=g):g=t[7];let _;t[8]===i?_=t[9]:(_=i===void 0?null:(0,$.jsx)(`p`,{className:`mt-2 text-muted-foreground text-sm leading-relaxed`,children:i}),t[8]=i,t[9]=_);let v;t[10]===n?v=t[11]:(v=(0,$.jsx)(`div`,{className:`mt-6 phone:flex phone:flex-1 phone:flex-col`,children:n}),t[10]=n,t[11]=v);let y;t[12]!==a||t[13]!==g||t[14]!==_||t[15]!==v||t[16]!==o?(y=(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:[g,_,v,a,o]}),t[12]=a,t[13]=g,t[14]=_,t[15]=v,t[16]=o,t[17]=y):y=t[17];let b;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(rn,{}),t[18]=b):b=t[18];let x;t[19]!==y||t[20]!==m?(x=(0,$.jsx)(`div`,{className:f,children:(0,$.jsxs)(`div`,{className:m,children:[h,y,b]})}),t[19]=y,t[20]=m,t[21]=x):x=t[21];let S;return t[22]!==s||t[23]!==x?(S=(0,$.jsx)(`main`,{ref:s,className:d,children:x}),t[22]=s,t[23]=x,t[24]=S):S=t[24],S}function sn({onClose:e}){let[t,n]=(0,Z.useState)(``),[r,a]=(0,Z.useState)(null),[o,s]=(0,Z.useState)(`input`),[c,l]=(0,Z.useState)(!1),[u,d]=(0,Z.useState)(null),f=(0,Z.useRef)(``),p=(0,Z.useRef)(null);(0,Z.useEffect)(()=>()=>{p.current?.abort(),p.current=null,f.current=``},[]);let m=()=>{p.current?.abort();let e=new AbortController;return p.current=e,l(!0),d(null),e},h=e=>{p.current===e&&(p.current=null,l(!1))},_=async(e,t)=>{if(!(e instanceof DOMException&&e.name===`AbortError`)){if(e instanceof g&&e.status===401){f.current=``,n(``),a(null),await v.expireSession();return}d(t??(e instanceof g?e.message:`Hub is temporarily unavailable.`))}},y=async e=>{e.preventDefault();let r=t.trim();n(``),f.current=``;let o=m();try{let e=await i.lookupNodeEnrollment(r,o.signal);if(o.signal.aborted)return;f.current=r,a(e),s(`review`)}catch(e){await _(e)}finally{h(o)}},b=async()=>{let e=f.current;if(!e||!r)return;let t=m();try{if(await i.approveNodeEnrollment(e,t.signal),t.signal.aborted)return;f.current=``,a(null),s(`approved`),await v.refreshDirectory()}catch(e){f.current=``,a(null),s(`input`),await _(e,`The approval result is unknown. Enter the device code again to verify its current state.`)}finally{h(t)}},x=async()=>{let e=f.current;if(!e||!r)return;let t=m();try{if(await i.denyNodeEnrollment(e,t.signal),t.signal.aborted)return;f.current=``,a(null),s(`denied`)}catch(e){await _(e)}finally{h(t)}},S=()=>{p.current?.abort(),f.current=``,n(``),a(null),e()};return o===`approved`||o===`denied`?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(D,{"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)(K,{className:`mt-5`,onClick:S,children:`Back to nodes`})]}):r?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(oe,{"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)(Xe,{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()})]}),u?(0,$.jsx)(`p`,{role:`alert`,className:`mt-4 text-sm text-destructive`,children:u}):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)(se,{"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)(K,{variant:`destructive`,disabled:c,onClick:()=>void x(),children:`Confirm denial`}),(0,$.jsx)(K,{variant:`outline`,disabled:c,onClick:()=>s(`review`),children:`Keep reviewing`})]})]}):(0,$.jsxs)(`div`,{className:`mt-5 flex flex-wrap gap-2`,children:[(0,$.jsx)(K,{disabled:c,onClick:()=>void b(),children:c?`Approving…`:`Approve node`}),(0,$.jsx)(K,{variant:`outline`,disabled:c,onClick:()=>s(`confirm-denial`),children:`Deny`}),(0,$.jsx)(K,{variant:`ghost`,disabled:c,onClick:S,children:`Cancel`})]})]}):(0,$.jsxs)(`div`,{children:[(0,$.jsx)(oe,{"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.`}),u?(0,$.jsx)(`p`,{role:`alert`,className:`mt-4 text-sm text-destructive`,children:u}):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)(Y,{htmlFor:`hub-node-device-code`,children:`Device code`}),(0,$.jsx)(G,{id:`hub-node-device-code`,required:!0,autoFocus:!0,maxLength:16,value:t,className:`font-mono uppercase ${W}`,onChange:e=>n(e.currentTarget.value)})]}),(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,$.jsx)(K,{type:`submit`,disabled:c,children:c?`Looking up…`:`Review node`}),(0,$.jsx)(K,{type:`button`,variant:`outline`,onClick:S,children:`Cancel`})]})]})]})}function cn(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 ln=`https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit`,un=null;function dn(){return window.turnstile?Promise.resolve(window.turnstile):un||(un=new Promise((e,t)=>{let n=document.querySelector(`script[src="${ln}"]`),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=ln,r.async=!0,r.defer=!0,document.head.append(r))}).catch(e=>{throw un=null,e}),un)}function fn(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),dn().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 pn(e,t){return e instanceof g?e.message:t}function mn(){let e=new Uint8Array(32);return crypto.getRandomValues(e),h(e)}function hn(){let e=(0,Q.c)(5),[t,n]=(0,Z.useState)(null),[r,a]=(0,Z.useState)(!0),o,s;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{let e=new AbortController;return i.getPublicSignupConfiguration(e.signal).then(n).catch(()=>n({status:`disabled`})).finally(()=>{e.signal.aborted||a(!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 gn(e){return e!==null&&`activationSecret`in e}function _n({config:e,initialLink:t,onConsumeLink:n,onCancel:r}){let[a,o]=(0,Z.useState)(t?.kind===`signup-verification`||t?.kind===`invalid-signup-verification`?`verifying`:`details`),[s,c]=(0,Z.useState)(``),[l,u]=(0,Z.useState)(``),[d,f]=(0,Z.useState)(``),[p,m]=(0,Z.useState)(``),[h,g]=(0,Z.useState)(``),[_,y]=(0,Z.useState)(null),[b,x]=(0,Z.useState)(!1),[S,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 x(!0),i.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(pn(e,`This verification link could not be confirmed.`))).finally(()=>{n(),e.signal.aborted||x(!1)}),()=>e.abort()},[t,n]);let D=async t=>{if(t.preventDefault(),b||e===null)return;let n=e.antiBot.provider===`bypass`?`development`:_??``;if(!n){w(`Complete the anti-bot check before continuing.`);return}x(!0),w(null);try{let e=await i.startPublicSignup({username:s.trim().toLowerCase(),email:l.trim().toLowerCase(),antiBotAssertion:n});T.current=e,o(`check-email`)}catch(e){w(pn(e,`Account creation is temporarily unavailable.`))}finally{x(!1)}},O=async e=>{e.preventDefault();let t=T.current;if(!(b||t===null||!(`attemptSecret`in t))){x(!0),w(null);try{let e=await i.verifyPublicSignup({attemptId:t.attemptId,attemptSecret:t.attemptSecret,proof:{kind:`email_code`,code:d.trim()}});f(``),T.current=e,o(`credential`)}catch(e){w(pn(e,`That email code could not be verified.`))}finally{x(!1)}}},k=async e=>{let t=T.current;if(b||!gn(t))return;if(e===`password`&&p!==h){w(`The passwords do not match.`);return}x(!0),w(null);let n=p;m(``),g(``);try{let r=e===`passkey`?await i.finishPublicSignupWithPasskey({attemptId:t.attemptId,activationSecret:t.activationSecret,idempotencyKey:mn()}):await i.finishPublicSignupWithPassword({attemptId:t.attemptId,activationSecret:t.activationSecret,password:n,idempotencyKey:mn()});T.current=null,await v.adoptPublicBrowserIdentity(r.identity,r.recoveryCodes)}catch(e){w(pn(e,`Account creation did not complete.`))}finally{x(!1)}},j=a===`details`?1:a===`check-email`||a===`verifying`?2:3;return(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col`,children:[(0,$.jsx)(cn,{step:j,total:3,label:j===1?`Your details`:j===2?`Verify your email`:`Choose how you sign in`}),a===`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)(Y,{htmlFor:`hub-signup-username`,children:`Username`}),(0,$.jsx)(G,{id:`hub-signup-username`,autoCapitalize:`none`,autoComplete:`username`,maxLength:32,pattern:`[A-Za-z0-9_]+`,required:!0,value:s,className:W,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)(Y,{htmlFor:`hub-signup-email`,children:`Email`}),(0,$.jsx)(G,{id:`hub-signup-email`,type:`email`,autoCapitalize:`none`,autoComplete:`email`,maxLength:254,required:!0,value:l,className:W,onChange:e=>u(e.currentTarget.value)})]}),e?.antiBot.provider===`turnstile`?(0,$.jsx)(fn,{siteKey:e.antiBot.siteKey,action:`public_signup`,onToken:y}):null,(0,$.jsx)(Sn,{value:S}),(0,$.jsx)(Cn,{onCancel:r,pending:b,submitLabel:`Send verification email`,submitDisabled:e===null})]}):a===`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)(Qe,{"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)(Y,{htmlFor:`hub-signup-code`,children:`Verification code`}),(0,$.jsx)(G,{id:`hub-signup-code`,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:6,pattern:`[0-9]{6}`,required:!0,value:d,className:W,onChange:e=>f(e.currentTarget.value)})]}),(0,$.jsx)(Sn,{value:S}),(0,$.jsx)(Cn,{onCancel:r,pending:b,submitLabel:`Verify email`})]}):a===`password`?(0,$.jsxs)(`form`,{className:`space-y-4`,onSubmit:e=>{e.preventDefault(),k(`password`)},children:[(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(Y,{htmlFor:`hub-signup-password`,children:`Password`}),(0,$.jsx)(G,{id:`hub-signup-password`,type:`password`,autoComplete:`new-password`,minLength:12,maxLength:256,required:!0,value:p,className:W,onChange:e=>m(e.currentTarget.value)})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(Y,{htmlFor:`hub-signup-password-confirmation`,children:`Repeat password`}),(0,$.jsx)(G,{id:`hub-signup-password-confirmation`,type:`password`,autoComplete:`new-password`,minLength:12,maxLength:256,required:!0,value:h,className:W,onChange:e=>g(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)(Sn,{value:S}),(0,$.jsx)(Cn,{onCancel:()=>o(`credential`),pending:b,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)(H,{"aria-hidden":!0,className:`size-5 text-primary`}),(0,$.jsx)(`p`,{className:`mt-2 text-sm font-medium`,children:a===`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)(Sn,{value:S}),(0,$.jsxs)(`div`,{className:`space-y-3 phone:mt-auto ${Je}`,children:[(0,$.jsxs)(K,{type:`button`,size:`lg`,className:`min-h-11 w-full`,disabled:b||a===`verifying`,onClick:()=>void k(`passkey`),children:[b?(0,$.jsx)(C,{"aria-hidden":!0,className:`animate-spin`}):(0,$.jsx)(A,{"aria-hidden":!0}),b?`Creating passkey…`:`Create a passkey`]}),(0,$.jsx)(K,{type:`button`,variant:`outline`,className:`min-h-11 w-full`,disabled:b||a===`verifying`,onClick:()=>o(`password`),children:`Use a password instead`}),(0,$.jsx)(K,{type:`button`,variant:`ghost`,className:`min-h-11 w-full`,onClick:r,children:`Cancel`})]})]})]})}function vn({pendingSignup:e,config:t,onCancel:n}){let[r,a]=(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 i.finishExternalIdentitySignup({provider:`github`,username:r.trim().toLowerCase(),antiBotAssertion:n,idempotencyKey:mn()});await v.adoptPublicBrowserIdentity(e.identity,e.recoveryCodes)}catch(e){d(pn(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)(cn,{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)(H,{"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)(Y,{htmlFor:`hub-external-signup-username`,children:`Username`}),(0,$.jsx)(G,{id:`hub-external-signup-username`,autoCapitalize:`none`,autoComplete:`username`,maxLength:32,pattern:`[A-Za-z0-9_]+`,required:!0,value:r,className:W,onChange:e=>a(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)(fn,{siteKey:t.antiBot.siteKey,action:`external_signup`,onToken:s}):null,(0,$.jsx)(Sn,{value:u}),(0,$.jsx)(Cn,{onCancel:n,pending:c,submitLabel:`Create account with GitHub`,submitDisabled:t===null})]})}function yn({onCancel:e,onUseRecoveryCode:t,onResetPassword:n}){let[r,a]=(0,Z.useState)(``),[o,s]=(0,Z.useState)(``),[c,l]=(0,Z.useState)(``),[u,d]=(0,Z.useState)(null),[f,p]=(0,Z.useState)(!1),[m,h]=(0,Z.useState)(null),g=async e=>{if(e.preventDefault(),!f){p(!0),h(null);try{if(u===null){let e=await i.startPasswordLogin({identifier:r.trim().toLowerCase(),password:o});s(``),d(e)}else{let e=await i.finishPasswordLogin({attemptId:u.attemptId,attemptSecret:u.attemptSecret,factor:u.factor,code:c.trim()});l(``),await v.adoptPublicBrowserIdentity(e)}}catch(e){h(pn(e,`Password sign-in did not complete.`))}finally{p(!1)}}};return(0,$.jsxs)(`form`,{className:`mt-6 flex flex-1 flex-col space-y-4`,onSubmit:e=>void g(e),children:[u===null?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(Y,{htmlFor:`hub-login-identifier`,children:`Username or verified email`}),(0,$.jsx)(G,{id:`hub-login-identifier`,autoCapitalize:`none`,autoComplete:`username`,required:!0,value:r,className:W,onChange:e=>a(e.currentTarget.value)})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(Y,{htmlFor:`hub-login-password`,children:`Password`}),(0,$.jsx)(G,{id:`hub-login-password`,type:`password`,autoComplete:`current-password`,required:!0,maxLength:256,value:o,className:W,onChange:e=>s(e.currentTarget.value)})]})]}):(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(Y,{htmlFor:`hub-login-second-factor`,children:u.factor===`totp`?`Authenticator code`:`Email code`}),(0,$.jsx)(G,{id:`hub-login-second-factor`,inputMode:`numeric`,autoComplete:`one-time-code`,pattern:`[0-9]{6}`,maxLength:6,required:!0,value:c,className:W,onChange:e=>l(e.currentTarget.value)}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:u.factor===`totp`?`Enter the current code from your authenticator app.`:`We sent a six-digit code to your verified email address.`})]}),(0,$.jsx)(Sn,{value:m}),u===null?(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,$.jsx)(K,{type:`button`,variant:`ghost`,size:`sm`,onClick:t,children:`Use recovery code`}),(0,$.jsx)(K,{type:`button`,variant:`ghost`,size:`sm`,onClick:n,children:`Forgot password?`})]}):null,(0,$.jsx)(Cn,{onCancel:u===null?e:()=>d(null),pending:f,submitLabel:u===null?`Continue`:`Sign in`})]})}function bn({initialLink:e,onConsumeLink:t,onCancel:n}){let[r,a]=(0,Z.useState)(e?.kind===`password-reset`||e?.kind===`invalid-password-reset`?`verifying`:`request`),[o,s]=(0,Z.useState)(``),[c,l]=(0,Z.useState)(``),[u,d]=(0,Z.useState)(``),[f,p]=(0,Z.useState)(``),[m,h]=(0,Z.useState)(``),[g,_]=(0,Z.useState)(!1),[v,y]=(0,Z.useState)(null),b=(0,Z.useRef)(null),x=(0,Z.useRef)(!1),S=async(e,t)=>{let n=await i.verifyPasswordReset({token:e},t);b.current=n,l(``),a(`password`)};(0,Z.useEffect)(()=>{if(x.current||e===null)return;if(x.current=!0,e.kind!==`password-reset`){e.kind===`invalid-password-reset`&&(y(`This reset link is incomplete or expired. Request a new one.`),a(`request`));return}let n=new AbortController;return _(!0),S(e.token,n.signal).catch(e=>y(pn(e,`This reset link could not be verified.`))).finally(()=>{t(),n.signal.aborted||_(!1)}),()=>n.abort()},[e,t]);let C=async e=>{if(e.preventDefault(),!g){_(!0),y(null);try{if(r===`request`)await i.requestPasswordReset({identifier:o.trim().toLowerCase()}),a(`check-email`);else if(r===`check-email`)await S(c.trim());else if(r===`password`){let e=b.current;if(e===null)return;if(u!==f){y(`The passwords do not match.`);return}let t=u;d(``),p(``),await i.finishPasswordReset({attemptId:e.attemptId,attemptSecret:e.attemptSecret,password:t,factor:e.requiresTotp?{kind:`totp`,code:m.trim()}:{kind:`none`}}),h(``),b.current=null,a(`complete`)}}catch(e){y(pn(e,`Password reset did not complete.`))}finally{_(!1)}}},w=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 C(e),children:[r===`complete`?null:(0,$.jsx)(cn,{step:w,total:3,label:w===1?`Find your account`:w===2?`Check your email`:`Set a new password`}),r===`request`?(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(Y,{htmlFor:`hub-reset-identifier`,children:`Username or verified email`}),(0,$.jsx)(G,{id:`hub-reset-identifier`,autoCapitalize:`none`,autoComplete:`username`,required:!0,value:o,className:W,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)(Qe,{"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)(Y,{htmlFor:`hub-reset-token`,children:`Reset token`}),(0,$.jsx)(G,{id:`hub-reset-token`,type:`password`,autoComplete:`one-time-code`,maxLength:64,required:!0,value:c,className:W,onChange:e=>l(e.currentTarget.value)})]})]}):r===`password`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(Y,{htmlFor:`hub-reset-password`,children:`New password`}),(0,$.jsx)(G,{id:`hub-reset-password`,type:`password`,autoComplete:`new-password`,minLength:12,maxLength:256,required:!0,value:u,className:W,onChange:e=>d(e.currentTarget.value)})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(Y,{htmlFor:`hub-reset-password-confirmation`,children:`Repeat password`}),(0,$.jsx)(G,{id:`hub-reset-password-confirmation`,type:`password`,autoComplete:`new-password`,minLength:12,maxLength:256,required:!0,value:f,className:W,onChange:e=>p(e.currentTarget.value)})]}),b.current?.requiresTotp?(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsx)(Y,{htmlFor:`hub-reset-totp`,children:`Authenticator code`}),(0,$.jsx)(G,{id:`hub-reset-totp`,inputMode:`numeric`,autoComplete:`one-time-code`,pattern:`[0-9]{6}`,maxLength:6,required:!0,value:m,className:W,onChange:e=>h(e.currentTarget.value)})]}):null]}):r===`complete`?(0,$.jsxs)(`div`,{className:`rounded-xl border border-border bg-background/60 p-4`,children:[(0,$.jsx)(H,{"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)(Sn,{value:v}),r===`complete`?(0,$.jsx)(`div`,{className:`phone:mt-auto ${Je}`,children:(0,$.jsx)(K,{type:`button`,className:`min-h-11 w-full`,onClick:n,children:`Back to sign in`})}):(0,$.jsx)(Cn,{onCancel:n,pending:g,submitLabel:r===`request`?`Send reset email`:r===`check-email`?`Verify reset token`:r===`password`?`Change password`:`Verifying…`,submitDisabled:r===`verifying`})]})}function xn({onCancel:e}){let[t,n]=(0,Z.useState)(``),[r,a]=(0,Z.useState)(!1),[o,s]=(0,Z.useState)(null),c=async e=>{if(e.preventDefault(),r)return;a(!0),s(null);let o=t;n(``);try{await i.signInWithRecoveryCode(o),await v.bootstrap()}catch(e){s(pn(e,`That recovery code could not be used.`))}finally{a(!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)(Y,{htmlFor:`hub-login-recovery-code`,children:`Recovery code`}),(0,$.jsx)(G,{id:`hub-login-recovery-code`,type:`password`,autoComplete:`one-time-code`,required:!0,maxLength:128,value:t,className:W,onChange:e=>n(e.currentTarget.value)})]}),(0,$.jsx)(Sn,{value:o}),(0,$.jsx)(Cn,{onCancel:e,pending:r,submitLabel:`Use recovery code`})]})}function Sn(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 Cn(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)(C,{"aria-hidden":!0,className:`animate-spin motion-reduce:animate-none`}):null,t[0]=r,t[1]=s);let c=r?`Working…`:i,l;t[2]!==o||t[3]!==s||t[4]!==c?(l=(0,$.jsxs)(K,{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]=l):l=t[5];let u;t[6]!==n||t[7]!==r?(u=(0,$.jsx)(K,{type:`button`,variant:`ghost`,className:`min-h-11 w-full`,disabled:r,onClick:n,children:`Back`}),t[6]=n,t[7]=r,t[8]=u):u=t[8];let d;return t[9]!==l||t[10]!==u?(d=(0,$.jsxs)(`div`,{className:`space-y-3 phone:mt-auto ${Je}`,children:[l,u]}),t[9]=l,t[10]=u,t[11]=d):d=t[11],d}var wn;function Tn(){if(window.location.pathname!==`/email-verification`)return null;if(wn!==void 0)return wn;let e=nt({href:window.location.href,historyState:window.history.state,replaceState:(e,t,n)=>window.history.replaceState(e,t,n)});return wn=e?.kind===`email-verification`||e?.kind===`invalid-email-verification`?e:null,wn}function En(){let e=(0,Q.c)(3),t=j(),n,r;e[0]===t?(n=e[1],r=e[2]):(n=()=>{document.title=qe(t===null?void 0:B(t))},r=[t],e[0]=t,e[1]=n,e[2]=r),(0,Z.useEffect)(n,r)}function Dn(){let e=(0,Q.c)(30),[t,n]=(0,Z.useState)(Tn),r=s(Fn),i=s(Pn),o=s(Nn),u=s(Mn),d=s(jn),f=s(An),p=c(kn),m=F(),h;e[0]===m.logicalPathname?h=e[1]:(h=N(m.logicalPathname),e[0]=m.logicalPathname,e[1]=h);let g=h,_;e[2]===g?_=e[3]:(_=e=>l(e,g),e[2]=g,e[3]=_);let v=a(_),b=re();P();let x;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(x=[],e[4]=x):x=e[4],(0,Z.useEffect)(On,x),rt(),En();let S=j(),C;e[5]!==r||e[6]!==S?.kind?(C=()=>{r===`authenticated`&&S?.kind===`sign-up`&&I(`/`,{replace:!0})},e[5]=r,e[6]=S?.kind,e[7]=C):C=e[7];let w;if(e[8]!==r||e[9]!==S?(w=[r,S],e[8]=r,e[9]=S,e[10]=w):w=e[10],(0,Z.useEffect)(C,w),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)(In,{link:t,onContinue:r}),e[12]=t,e[13]=i),i}if(r!==`authenticated`){let t;return e[14]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Kn,{}),e[14]=t):t=e[14],t}if(o.length>0&&!p){let t;return e[15]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Yn,{}),e[15]=t):t=e[15],t}if(S?.kind===`account`){let t;return e[16]===S.section?t=e[17]:(t=(0,$.jsx)(Qt,{section:S.section}),e[16]=S.section,e[17]=t),t}if(S?.kind===`nodes`||S?.kind===`nodes-enroll`){let t;return e[18]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(er,{}),e[18]=t):t=e[18],t}if(m.nodeId===null){if(b||m.malformed){let t;return e[19]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(er,{}),e[19]=t):t=e[19],t}if(i&&d){let t;return e[20]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(y,{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)(y,{authGateState:{status:`hosted-cached`}}),e[21]=t):t=e[21],t}if(!i||i.id!==m.nodeId){let t;return e[22]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Hn,{}),e[22]=t):t=e[22],t}if(u===`terminal-failure`){let t;return e[23]!==f||e[24]!==i?(t=(0,$.jsx)(zn,{node:i,message:f}),e[23]=f,e[24]=i,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)(y,{authGateState:{status:`hosted-cached`}}),e[26]=t):t=e[26],t}let t;return e[27]===i?t=e[28]:(t=(0,$.jsx)(Un,{node:i}),e[27]=i,e[28]=t),t}let T;return e[29]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(y,{authGateState:{status:`hosted-hub`}}),e[29]=T):T=e[29],T}function On(){return p()}function kn(e){return e.leased}function An(e){return e.errorMessage}function jn(e){return e.sessionEstablished}function Mn(e){return e.transportStatus}function Nn(e){return e.recoveryCodes}function Pn(e){return e.selectedNode}function Fn(e){return e.accountStatus}function In(e){let t=(0,Q.c)(15),{link:n,onContinue:r}=e,[a,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 i.confirmEmailVerification(n.token,e.signal).then(()=>o(`verified`)).catch(()=>{e.signal.aborted||o(`invalid`)}).finally(Ln),()=>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 l=a===`verifying`?`Verifying your email`:a===`verified`?`Email verified`:`This verification link is unavailable`,u=a===`verifying`?`This will only take a moment.`:a===`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.`,d;t[5]!==r||t[6]!==a?(d=a===`verifying`?void 0:(0,$.jsx)(K,{size:`cta`,className:`mt-6 w-full`,onClick:r,children:`Continue`}),t[5]=r,t[6]=a,t[7]=d):d=t[7];let f;t[8]===a?f=t[9]:(f=a===`verifying`?(0,$.jsxs)(`p`,{role:`status`,"aria-live":`polite`,className:`text-muted-foreground text-sm`,children:[(0,$.jsx)(Rn,{}),`Confirming the link…`]}):null,t[8]=a,t[9]=f);let p;return t[10]!==l||t[11]!==u||t[12]!==d||t[13]!==f?(p=(0,$.jsx)(on,{title:l,description:u,actions:d,children:f}),t[10]=l,t[11]=u,t[12]=d,t[13]=f,t[14]=p):p=t[14],p}function Ln(){wn=void 0}function Rn(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(C,{"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 zn(e){let t=(0,Q.c)(10),{node:n,message:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(ne,{}),t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(se,{"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 l;t[4]===r?l=t[5]:(l=r===`Ryco state could not be synchronized.`?(0,$.jsxs)(K,{className:`mt-5`,onClick:Bn,children:[(0,$.jsx)(ae,{"aria-hidden":!0}),` Retry`]}):null,t[4]=r,t[5]=l);let u;return t[6]!==o||t[7]!==c||t[8]!==l?(u=(0,$.jsx)(Jt,{measure:`content`,trailing:i,children:(0,$.jsxs)(Vn,{tone:`destructive`,icon:a,title:o,children:[c,l]})}),t[6]=o,t[7]=c,t[8]=l,t[9]=u):u=t[9],u}function Bn(){v.retrySelectedNode()}function Vn(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 Hn(){let e=(0,Q.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(oe,{"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)(Jt,{measure:`content`,children:(0,$.jsx)(Vn,{icon:t,title:`Restoring your node`,children:(0,$.jsxs)(`p`,{role:`status`,"aria-live":`polite`,className:`text-muted-foreground text-sm`,children:[(0,$.jsx)(Rn,{}),`Checking your access before reconnecting…`]})})}),e[1]=n):n=e[1],n}function Un(e){let t=(0,Q.c)(7),{node:n}=e,{returnToAllNodes:r}=M(),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(oe,{"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)(Rn,{}),`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)(K,{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)(Jt,{measure:`content`,children:(0,$.jsxs)(Vn,{icon:i,title:a,children:[o,s]})}),t[4]=a,t[5]=s,t[6]=c):c=t[6],c}function Wn(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(Gn),t[0]=s):s=t[0];let c=`transition-transform ${i?`rotate-180`:``}`,l;t[1]===c?l=t[2]:(l=(0,$.jsx)(w,{"aria-hidden":!0,className:c}),t[1]=c,t[2]=l);let u;t[3]!==i||t[4]!==o||t[5]!==l?(u=(0,$.jsxs)(K,{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?`,l]}),t[3]=i,t[4]=o,t[5]=l,t[6]=u):u=t[6];let d;t[7]!==n||t[8]!==i||t[9]!==o||t[10]!==r?(d=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]=d):d=t[11];let f;return t[12]!==u||t[13]!==d?(f=(0,$.jsxs)(`div`,{className:`mt-4`,children:[u,d]}),t[12]=u,t[13]=d,t[14]=f):f=t[14],f}function Gn(e){return!e}function Kn({context:e=`hub`,autoExternalProvider:t=null}={}){let n=s(e=>e.accountStatus),r=s(e=>e.errorMessage),a=s(e=>e.errorReason??null),c=s(e=>e.bootstrapAvailable),[l,u]=(0,Z.useState)(()=>nt({href:window.location.href,historyState:window.history.state,replaceState:(e,t,n)=>window.history.replaceState(e,t,n)})),d=(0,Z.useCallback)(()=>u(null),[]),{config:f}=hn(),p=o(e=>e.externalIdentityConfiguration),m=Ue(p),[h,y]=(0,Z.useState)(!1),[b,x]=(0,Z.useState)(null),S=(0,Z.useRef)(!1),[w,T]=(0,Z.useState)(void 0),E=j(),D=E?.kind===`sign-up`||E?.kind===`sign-up-verify`?`public`:E?.kind===`invitation`?`invitation`:E?.kind===`setup`?`bootstrap`:null,O=E?.kind===`sign-in-password`?`password`:E?.kind===`sign-in-recovery-code`?`recovery-code`:E?.kind===`reset-password`?`password-reset`:null,k=e=>{L(e===`public`?{kind:`sign-up`}:e===`invitation`?{kind:`invitation`}:e===`bootstrap`?{kind:`setup`}:{kind:`sign-in`})},M=e=>{L(e===`password`?{kind:`sign-in-password`}:e===`recovery-code`?{kind:`sign-in-recovery-code`}:e===`password-reset`?{kind:`reset-password`}:{kind:`sign-in`})},N=(0,Z.useRef)(null),P=(0,Z.useRef)(null),F=(0,Z.useRef)(null);(0,Z.useEffect)(()=>{v.refreshExternalIdentityConfiguration()},[]),(0,Z.useEffect)(()=>{if(D!==`public`&&e!==`native-authorization`){T(void 0);return}let t=new AbortController;return T(void 0),i.getPendingExternalIdentity(t.signal).then(e=>{t.signal.aborted||T(e)}).catch(()=>{t.signal.aborted||T({status:`none`})}),()=>t.abort()},[e,D]);let I=(0,Z.useCallback)(async()=>{if(!h){y(!0),x(null);try{await We({intent:`authenticate`,returnTo:e===`native-authorization`?window.location.pathname:te({kind:`sign-up`}),start:e=>i.startExternalIdentityAuthorization(e),navigate:e=>window.location.assign(e)})}catch(e){x(e instanceof g?e.message:`GitHub sign-in is temporarily unavailable.`),y(!1)}}},[e,h]);(0,Z.useEffect)(()=>{e!==`native-authorization`||t!==`github`||n!==`signed-out`||m?.login!==!0||w?.status!==`none`||S.current||(S.current=!0,I())},[t,e,w?.status,m?.login,I,n]),(0,Z.useEffect)(()=>{D===`invitation`||D===`bootstrap`?P.current?.focus({preventScroll:!0}):N.current?.focus({preventScroll:!0})},[O,D]),(0,Z.useEffect)(()=>{F.current?.scrollTo({top:0,left:0})},[O,D]);let R=D===`invitation`||D===`bootstrap`?(0,$.jsxs)(`div`,{className:`mt-6 flex flex-wrap gap-2 phone:mt-auto ${Je}`,children:[(0,$.jsx)(K,{type:`submit`,form:qn,className:`phone:min-h-11`,disabled:n===`authenticating`,children:D===`invitation`?`Create account and passkey`:`Create owner and passkey`}),(0,$.jsx)(K,{type:`button`,variant:`outline`,className:`phone:min-h-11`,onClick:n===`authenticating`?()=>v.cancelAuthentication():()=>k(null),children:n===`authenticating`?`Cancel`:`Back`})]}):null,z=D||O?null:(0,$.jsx)(`div`,{className:`phone:mt-auto ${Je}`,children:(0,$.jsxs)(`div`,{className:`mt-6 flex flex-col gap-3`,children:[m?.login?(0,$.jsxs)(K,{size:`lg`,className:`phone:min-h-11`,disabled:h||n===`authenticating`||n===`signing-out`,onClick:()=>void I(),children:[h?(0,$.jsx)(C,{"aria-hidden":!0,className:`animate-spin`}):(0,$.jsx)(le,{"aria-hidden":!0}),h?`Opening GitHub…`:`Continue with GitHub`]}):null,(0,$.jsxs)(K,{size:`lg`,className:`phone:min-h-11`,disabled:n===`authenticating`||n===`signing-out`,onClick:()=>void v.signIn(),children:[(0,$.jsx)(A,{"aria-hidden":!0}),n===`authenticating`?`Waiting for passkey…`:`Sign in with passkey`]}),n===`authenticating`?(0,$.jsx)(K,{variant:`outline`,size:`lg`,className:`phone:min-h-11`,onClick:()=>v.cancelAuthentication(),children:`Cancel`}):(0,$.jsxs)($.Fragment,{children:[f?.status===`enabled`?(0,$.jsx)(K,{variant:`outline`,size:`lg`,className:`phone:min-h-11`,onClick:()=>k(`public`),children:`Create account`}):null,(0,$.jsx)(K,{variant:`ghost`,size:`lg`,className:`phone:min-h-11`,onClick:()=>k(`invitation`),children:`Redeem invitation`}),c?(0,$.jsx)(K,{variant:`ghost`,size:`lg`,className:`phone:min-h-11`,onClick:()=>k(`bootstrap`),children:`Set up first owner`}):null]})]})}),B=(0,$.jsxs)($.Fragment,{children:[n===`unavailable`?(0,$.jsxs)(K,{className:`mt-3 phone:min-h-11`,variant:`ghost`,onClick:()=>void v.bootstrap(),children:[(0,$.jsx)(ae,{"aria-hidden":!0}),` Retry Hub`]}):null,(0,$.jsx)(`p`,{className:`sr-only`,"aria-live":`polite`,children:n===`authenticating`?`Passkey authentication is in progress.`:``})]}),ne=a?_(a):null,re=b??r??ne?.message,ie=b===null&&ne!==null?ne.title:`Sign-in did not complete`,V=re?(0,$.jsx)(`div`,{className:`mt-4`,children:(0,$.jsxs)(be,{variant:`error`,children:[(0,$.jsx)(se,{"aria-hidden":!0}),(0,$.jsx)(ve,{children:ie}),(0,$.jsx)(ye,{children:re})]})}):null,oe=w?.status===`signup`?w:null,H=w?.status===`error`?w:null,ce=e===`native-authorization`&&D!==`public`;if(D===`public`||ce&&(oe!==null||H!==null)){let e=()=>{ce?T({status:`none`}):k(null)};return(0,$.jsxs)(on,{title:`Create your account`,description:ce?`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:B,scrollRef:F,titleRef:N,children:[V,w===void 0?(0,$.jsx)(ge,{className:`h-64 w-full rounded-2xl`}):oe?(0,$.jsx)(vn,{pendingSignup:oe,config:f?.status===`enabled`?f:null,onCancel:e}):H?(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(be,{variant:`warning`,children:[(0,$.jsx)(se,{"aria-hidden":!0}),(0,$.jsx)(ve,{children:`GitHub signup did not continue`}),(0,$.jsx)(ye,{children:He(H.code)})]}),(0,$.jsx)(K,{variant:`outline`,onClick:e,children:`Back to sign in`})]}):(0,$.jsx)(_n,{config:f?.status===`enabled`?f:null,initialLink:l,onConsumeLink:d,onCancel:()=>{d(),k(null)}})]})}if(D===`invitation`||D===`bootstrap`)return(0,$.jsxs)(on,{title:D===`invitation`?`Redeem your invitation`:`Claim this Hub`,description:D===`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:R,trailing:B,scrollRef:F,titleRef:N,children:[V,(0,$.jsx)(Jn,{mode:D,credentialRef:P})]});if(O!==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.`}}[O];return(0,$.jsxs)(on,{title:e.title,description:e.description,trailing:B,scrollRef:F,titleRef:N,children:[V,O===`password`?(0,$.jsx)(yn,{onCancel:()=>M(null),onUseRecoveryCode:()=>M(`recovery-code`),onResetPassword:()=>M(`password-reset`)}):O===`recovery-code`?(0,$.jsx)(xn,{onCancel:()=>M(null)}):(0,$.jsx)(bn,{initialLink:l,onConsumeLink:d,onCancel:()=>{d(),M(null)}})]})}return(0,$.jsxs)(on,{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:z,trailing:B,scrollRef:F,titleRef:N,children:[(0,$.jsx)(Ye,{}),(0,$.jsx)(Wn,{bootstrapAvailable:c,publicSignupEnabled:f?.status===`enabled`}),n===`authenticating`?null:(0,$.jsxs)(K,{variant:`ghost`,size:`sm`,className:`-ml-2 mt-2 h-auto min-h-8 whitespace-normal phone:min-h-11`,onClick:()=>M(`password`),children:[(0,$.jsx)(Ze,{"aria-hidden":!0}),`Password, recovery code, or reset`]}),(0,$.jsx)(ee,{}),V]})}var qn=`hub-registration-form`;function Jn(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 v.redeemInvitation({secret:t,...r}):await v.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)(Y,{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)(G,{ref:r,id:`hub-registration-credential`,type:`password`,required:!0,maxLength:128,value:i,className:W,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 y;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(Y,{htmlFor:`hub-display-name`,children:`Display name`}),t[16]=y):y=t[16];let b;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>s(e.currentTarget.value),t[17]=b):b=t[17];let x;t[18]===o?x=t[19]:(x=(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[y,(0,$.jsx)(G,{id:`hub-display-name`,required:!0,maxLength:200,value:o,className:W,onChange:b})]}),t[18]=o,t[19]=x);let S;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsxs)(Y,{htmlFor:`hub-passkey-label`,children:[`Passkey label `,(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:`(optional)`})]}),t[20]=S):S=t[20];let C;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(C=e=>l(e.currentTarget.value),t[21]=C):C=t[21];let w;t[22]===c?w=t[23]:(w=(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[S,(0,$.jsx)(G,{id:`hub-passkey-label`,maxLength:100,value:c,className:W,onChange:C})]}),t[22]=c,t[23]=w);let T;return t[24]!==x||t[25]!==w||t[26]!==f||t[27]!==_?(T=(0,$.jsxs)(`form`,{id:qn,className:`mt-6 space-y-4`,onSubmit:f,autoComplete:`off`,children:[_,x,w]}),t[24]=x,t[25]=w,t[26]=f,t[27]=_,t[28]=T):T=t[28],T}function Yn(){let e=(0,Q.c)(20),t=s(Qn),{copyToClipboard:n,isCopied:r}=q(),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(Ve(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)(S,{"aria-hidden":!0}):(0,$.jsx)(k,{"aria-hidden":!0}),e[3]=r,e[4]=o);let c=r?`Copied`:`Copy codes`,l;e[5]!==a||e[6]!==o||e[7]!==c?(l=(0,$.jsxs)(K,{variant:`outline`,className:`mt-5 w-full phone:min-h-11`,onClick:a,children:[o,c]}),e[5]=a,e[6]=o,e[7]=c,e[8]=l):l=e[8];let u;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(K,{size:`cta`,className:`mt-3 w-full`,onClick:Zn,children:`I saved the codes`}),e[9]=u):u=e[9];let d;e[10]===l?d=e[11]:(d=(0,$.jsxs)(`div`,{className:`phone:mt-auto ${Je}`,children:[l,u]}),e[10]=l,e[11]=d);let f;e[12]===t?f=e[13]:(f=t.map(Xn),e[12]=t,e[13]=f);let p;e[14]===f?p=e[15]:(p=(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:f}),e[14]=f,e[15]=p);let m;return e[16]!==i||e[17]!==d||e[18]!==p?(m=(0,$.jsx)(on,{title:`Save your recovery codes`,description:i,actions:d,children:p}),e[16]=i,e[17]=d,e[18]=p,e[19]=m):m=e[19],m}function Xn(e){return(0,$.jsx)(`li`,{children:e},e)}function Zn(){return v.dismissRecoveryCodes()}function Qn(e){return e.recoveryCodes}function $n(e){let t=(0,Q.c)(38),{node:n,nowMs:r,disabled:i,onConnect:a,onOpenDetail:o}=e,s;t[0]!==n||t[1]!==r?(s=kt(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=f(n),t[3]=n,t[4]=l);let u=l,d=i||u,p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`flex size-[36px] shrink-0 items-center justify-center rounded-lg bg-muted`,children:(0,$.jsx)(oe,{"aria-hidden":!0,className:`size-4`})}),t[5]=p):p=t[5];let m;t[6]===n.label?m=t[7]:(m=(0,$.jsx)(`span`,{className:`block truncate font-medium`,children:n.label}),t[6]=n.label,t[7]=m);let h;t[8]===n?h=t[9]:(h=At(n),t[8]=n,t[9]=h);let g;t[10]===h?g=t[11]:(g=(0,$.jsx)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:h}),t[10]=h,t[11]=g);let _;t[12]===u?_=t[13]:(_=u?(0,$.jsx)(`span`,{className:`block truncate text-xs font-medium text-muted-foreground`,children:`Open in Desktop/Mobile`}):null,t[12]=u,t[13]=_);let v;t[14]!==m||t[15]!==g||t[16]!==_?(v=(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[m,g,_]}),t[14]=m,t[15]=g,t[16]=_,t[17]=v):v=t[17];let y;t[18]===n?y=t[19]:(y=(0,$.jsx)(R,{node:n}),t[18]=n,t[19]=y);let b;t[20]===c?b=t[21]:(b=c?(0,$.jsx)(`span`,{className:`whitespace-nowrap text-[11px] text-muted-foreground max-sm:hidden phone:hidden`,children:c}):null,t[20]=c,t[21]=b);let x;t[22]!==y||t[23]!==b?(x=(0,$.jsxs)(`span`,{className:`flex shrink-0 flex-col items-end gap-0.5`,children:[y,b]}),t[22]=y,t[23]=b,t[24]=x):x=t[24];let S;t[25]!==a||t[26]!==x||t[27]!==d||t[28]!==v?(S=(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:[p,v,x]}),t[25]=a,t[26]=x,t[27]=d,t[28]=v,t[29]=S):S=t[29];let C;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(`span`,{"aria-hidden":!0,className:`w-px shrink-0 bg-border/60`}),t[30]=C):C=t[30];let w=`Node details: ${n.label}`,E;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(T,{"aria-hidden":!0,className:`size-4`}),t[31]=E):E=t[31];let D;t[32]!==o||t[33]!==w?(D=(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:E}),t[32]=o,t[33]=w,t[34]=D):D=t[34];let O;return t[35]!==S||t[36]!==D?(O=(0,$.jsxs)(`li`,{className:`flex items-stretch overflow-hidden rounded-xl border border-border bg-background`,children:[S,C,D]}),t[35]=S,t[36]=D,t[37]=O):O=t[37],O}function er(){let e=(0,Q.c)(110),t=s(mr),n=s(pr),r=s(fr),a=s(dr),o=s(ur),c=s(lr),l=re(),u=m(),d=_e()===`phone`,f=j()?.kind===`nodes-enroll`,p=cr,[h,g]=(0,Z.useState)(null),[_,y]=(0,Z.useState)(null),b=(0,Z.useRef)(null),x=Ge(6e4),S,w;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>{b.current?.focus({preventScroll:!0})},w=[],e[0]=S,e[1]=w):(S=e[0],w=e[1]),(0,Z.useEffect)(S,w);let T;e[2]===u?T=e[3]:(T=async e=>{z(e.id)||(await u({to:`/`,replace:!0}),await v.selectNode(e.id))},e[2]=u,e[3]=T);let E=T;if(f){let t;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(Jt,{measure:`content`,children:(0,$.jsx)(sn,{onClose:()=>p(!1)})}),e[4]=t):t=e[4],t}let D,O,k,A,M,N,P,F,I,L,R,B,te,ne,V,H,U,W;if(e[5]!==o||e[6]!==r||e[7]!==h||e[8]!==a||e[9]!==d||e[10]!==t||e[11]!==x||e[12]!==_||e[13]!==l||e[14]!==E||e[15]!==c||e[16]!==n){let i=jt(t),s;e[35]!==h||e[36]!==t?(s=h===null?null:t.find(e=>e.id===h)??null,e[35]=h,e[36]=t,e[37]=s):s=e[37],A=s,P=o?.role===`owner`;let u=n===`ready`&&t.length===0;N=P&&!u;let f;e[38]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsxs)(K,{variant:`ghost`,className:`min-h-11 flex-1`,onClick:sr,children:[(0,$.jsx)(ce,{"aria-hidden":!0}),` Account`]}),e[38]=f):f=e[38],k=f;let m;e[39]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsxs)(K,{variant:`ghost`,className:`min-h-11 flex-1`,onClick:or,children:[(0,$.jsx)(ie,{"aria-hidden":!0}),` Sign out`]}),e[39]=m):m=e[39],I=m;let v=d?`mt-3 phone:min-h-11 phone:w-full`:void 0,y,S;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>p(!0),S=(0,$.jsx)(oe,{"aria-hidden":!0}),e[40]=y,e[41]=S):(y=e[40],S=e[41]);let w;e[42]===v?w=e[43]:(w=(0,$.jsxs)(K,{className:v,onClick:y,children:[S,` Enroll node`]}),e[42]=v,e[43]=w),M=w;let T=d?`mt-3 phone:min-h-11 phone:w-full`:void 0,j=n===`loading`,z;e[44]===n?z=e[45]:(z=n===`loading`?(0,$.jsx)(C,{"aria-hidden":!0,className:`animate-spin motion-reduce:animate-none`}):(0,$.jsx)(ae,{"aria-hidden":!0}),e[44]=n,e[45]=z);let ee;e[46]!==T||e[47]!==j||e[48]!==z?(ee=(0,$.jsxs)(K,{className:T,variant:`outline`,disabled:j,onClick:ar,children:[z,`Refresh nodes`]}),e[46]=T,e[47]=j,e[48]=z,e[49]=ee):ee=e[49],F=ee,O=Jt;let re;e[50]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,$.jsx)(K,{size:`icon`,variant:`ghost`,"aria-label":`Account settings`,onClick:ir,children:(0,$.jsx)(ce,{"aria-hidden":!0})}),e[50]=re):re=e[50],e[51]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,$.jsxs)($.Fragment,{children:[re,(0,$.jsx)(K,{size:`icon`,variant:`ghost`,"aria-label":`Sign out`,onClick:rr,children:(0,$.jsx)(ie,{"aria-hidden":!0})})]}),e[51]=R):R=e[51],D=Bt,B=b,te=t.length===1?`Your node`:`Your nodes`;let G=o?.displayName??`Hub account`,le;e[52]===o?le=e[53]:(le=o?` · ${o.role.charAt(0).toUpperCase()}${o.role.slice(1)}`:``,e[52]=o,e[53]=le);let q;e[54]!==G||e[55]!==le?(q=(0,$.jsxs)(`p`,{className:`truncate`,children:[`Signed in as `,G,le]}),e[54]=G,e[55]=le,e[56]=q):q=e[56];let J;e[57]===t?J=e[58]:(J=t.length>1?(0,$.jsx)(`p`,{className:`mt-0.5 truncate text-xs`,children:Pt(t)}):null,e[57]=t,e[58]=J),e[59]!==q||e[60]!==J?(ne=(0,$.jsxs)($.Fragment,{children:[q,J]}),e[59]=q,e[60]=J,e[61]=ne):ne=e[61],e[62]!==M||e[63]!==N||e[64]!==d||e[65]!==F?(V=d?void 0:(0,$.jsxs)($.Fragment,{children:[F,N?M:null]}),e[62]=M,e[63]=N,e[64]=d,e[65]=F,e[66]=V):V=e[66],e[67]===n?H=e[68]:(H=n===`stale`?(0,$.jsx)(`div`,{className:`mt-4`,children:(0,$.jsxs)(be,{variant:`warning`,role:`status`,children:[(0,$.jsx)(se,{"aria-hidden":!0}),(0,$.jsx)(ye,{children:`Directory data is stale. Connecting is unavailable until it refreshes.`})]})}):null,e[67]=n,e[68]=H),e[69]===_?U=e[70]:(U=_?(0,$.jsx)(`div`,{className:`mt-4`,children:(0,$.jsxs)(be,{variant:`warning`,role:`status`,children:[(0,$.jsx)(se,{"aria-hidden":!0}),(0,$.jsx)(ye,{children:_})]})}):null,e[69]=_,e[70]=U);let ue=n===`stale`?null:a;e[71]!==l||e[72]!==c||e[73]!==ue?(W=(0,$.jsx)(hr,{selection:c,routeNotice:l,error:ue}),e[71]=l,e[72]=c,e[73]=ue,e[74]=W):W=e[74],L=u?(0,$.jsx)(gr,{isOwner:P,onEnroll:()=>p(!0)}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`ul`,{role:`list`,className:`mt-5 space-y-2`,"aria-busy":n===`loading`,children:[i.map(e=>(0,$.jsx)($n,{node:e,nowMs:x,disabled:Ft({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(nr)}):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]=a,e[9]=d,e[10]=t,e[11]=x,e[12]=_,e[13]=l,e[14]=E,e[15]=c,e[16]=n,e[17]=D,e[18]=O,e[19]=k,e[20]=A,e[21]=M,e[22]=N,e[23]=P,e[24]=F,e[25]=I,e[26]=L,e[27]=R,e[28]=B,e[29]=te,e[30]=ne,e[31]=V,e[32]=H,e[33]=U,e[34]=W}else D=e[17],O=e[18],k=e[19],A=e[20],M=e[21],N=e[22],P=e[23],F=e[24],I=e[25],L=e[26],R=e[27],B=e[28],te=e[29],ne=e[30],V=e[31],H=e[32],U=e[33],W=e[34];let G,le;e[75]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,$.jsx)(`div`,{className:`mt-5`,children:(0,$.jsx)(Ye,{})}),le=(0,$.jsx)(ee,{}),e[75]=G,e[76]=le):(G=e[75],le=e[76]);let q;e[77]===Symbol.for(`react.memo_cache_sentinel`)?(q=e=>{e||g(null)},e[77]=q):q=e[77];let J;e[78]===E?J=e[79]:(J=e=>void E(e),e[78]=E,e[79]=J);let ue;e[80]===Symbol.for(`react.memo_cache_sentinel`)?(ue=async e=>{await i.revokeNode(e.id,ut),y(ht(e.label)),await v.refreshDirectory(),g(null)},e[80]=ue):ue=e[80];let de;e[81]!==r||e[82]!==A||e[83]!==P||e[84]!==n||e[85]!==J?(de=(0,$.jsx)(zt,{node:A,directoryStatus:n,browserStatus:r,canRename:P,canRevoke:P,onOpenChange:q,onConnect:J,onRename:tr,onRevoke:ue}),e[81]=r,e[82]=A,e[83]=P,e[84]=n,e[85]=J,e[86]=de):de=e[86];let fe;e[87]!==D||e[88]!==L||e[89]!==de||e[90]!==B||e[91]!==te||e[92]!==ne||e[93]!==V||e[94]!==H||e[95]!==U||e[96]!==W?(fe=(0,$.jsxs)(D,{titleRef:B,title:te,description:ne,actions:V,children:[H,U,W,L,G,le,de]}),e[87]=D,e[88]=L,e[89]=de,e[90]=B,e[91]=te,e[92]=ne,e[93]=V,e[94]=H,e[95]=U,e[96]=W,e[97]=fe):fe=e[97];let pe;e[98]!==k||e[99]!==M||e[100]!==N||e[101]!==d||e[102]!==F||e[103]!==I?(pe=d?(0,$.jsxs)(`div`,{className:`mt-auto ${Je}`,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]=d,e[102]=F,e[103]=I,e[104]=pe):pe=e[104];let me;return e[105]!==O||e[106]!==R||e[107]!==fe||e[108]!==pe?(me=(0,$.jsxs)(O,{trailing:R,children:[fe,pe]}),e[105]=O,e[106]=R,e[107]=fe,e[108]=pe,e[109]=me):me=e[109],me}async function tr(e,t){await i.renameNode(e.id,t),await v.refreshDirectory()}function nr(e){return(0,$.jsx)(`li`,{children:(0,$.jsx)(ge,{className:`h-16 w-full rounded-xl`})},e)}function rr(){v.signOut()}function ir(){L({kind:`account`,section:`security`})}function ar(){v.refreshDirectory()}function or(){v.signOut()}function sr(){L({kind:`account`,section:`security`})}function cr(e){return L(e?{kind:`nodes-enroll`}:{kind:`nodes`})}function lr(e){return e.selectionStatus}function ur(e){return e.account}function dr(e){return e.errorMessage}function fr(e){return e.browserStatus}function pr(e){return e.directoryStatus}function mr(e){return e.nodes}function hr(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)(se,{"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)(be,{variant:`error`,children:[o,(0,$.jsx)(ye,{children:a})]})}),t[1]=a,t[2]=s),s}function gr(e){let t=(0,Q.c)(14),{isOwner:n,onEnroll:r}=e,i;t[0]===n?i=t[1]:(i=(0,$.jsx)(Fe,{variant:`icon`,children:n?(0,$.jsx)(oe,{"aria-hidden":!0}):(0,$.jsx)(H,{"aria-hidden":!0})}),t[0]=n,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(Re,{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)(ze,{children:o}),t[3]=o,t[4]=s);let c;t[5]!==i||t[6]!==s?(c=(0,$.jsxs)(Ie,{children:[i,a,s]}),t[5]=i,t[6]=s,t[7]=c):c=t[7];let l;t[8]!==n||t[9]!==r?(l=n?(0,$.jsx)(Le,{children:(0,$.jsxs)(K,{className:`phone:min-h-11`,onClick:r,children:[(0,$.jsx)(oe,{"aria-hidden":!0}),` Enroll node`]})}):null,t[8]=n,t[9]=r,t[10]=l):l=t[10];let u;return t[11]!==c||t[12]!==l?(u=(0,$.jsxs)(Be,{className:`min-h-64`,children:[c,l]}),t[11]=c,t[12]=l,t[13]=u):u=t[13],u}export{Kn as HostedAuthenticationSurface,Dn as HostedHubRoot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./index-
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./index-BL8_ra0g.js";import{F as r,N as i}from"./runtime-DYzjhL5M.js";import{It as a}from"./composerDraftStore-DC2r8dcu.js";import{n as o}from"./branding-DqHDcyzW.js";import{_ as s,o as c}from"./authorization-BwQZHweJ.js";import{n as l,t as u}from"./loader-circle-CrtHFAvM.js";import{t as d}from"./log-out-tMJm0Gk6.js";import{t as f}from"./shield-check-dQ-4cMKk.js";import{t as p}from"./smartphone-gNe1ynB8.js";import{t as m}from"./triangle-alert-RL_T3KLo.js";import{t as h}from"./x-C1Cemsov.js";import{t as g}from"./button-Wf_1nfeu.js";import{i as _,r as v,t as y}from"./alert-BymbRVPf.js";var b=e(t(),1),x=a(),S=(0,b.lazy)(()=>n(()=>import(`./HostedHubRoot-DK9zP4tJ.js`).then(e=>({default:e.HostedAuthenticationSurface})),[]));function C(e){window.location.assign(e)}function w({handoffId:e,navigate:t=C}){let n=i(e=>e.accountStatus),a=i(e=>e.account),[w,T]=(0,b.useState)(null),[E,D]=(0,b.useState)(!0),[O,k]=(0,b.useState)(null),[A,j]=(0,b.useState)(null),[M,N]=(0,b.useState)(null),P=(0,b.useRef)(null);if((0,b.useEffect)(()=>{let t=new AbortController;return D(!0),N(null),r.getNativeHandoffPresentation(e,t.signal).then(e=>T(e)).catch(e=>{t.signal.aborted||N(e instanceof s?e.message:`This device authorization is unavailable or has expired.`)}).finally(()=>{t.signal.aborted||D(!1)}),()=>t.abort()},[e]),(0,b.useEffect)(()=>{!E&&n===`authenticated`&&P.current?.focus({preventScroll:!0})},[n,E]),n!==`authenticated`||!a)return(0,x.jsx)(b.Suspense,{fallback:null,children:(0,x.jsx)(S,{context:`native-authorization`,autoExternalProvider:w?.providerHint??null})});let F=async n=>{if(O===null){k(n),N(null);try{if(n===`switch-account`){await c.signOut();return}let i=n===`approve`?await r.approveNativeHandoff(e):await r.cancelNativeHandoff(e);n===`approve`&&(j({redirectUri:i.redirectUri,deviceLabel:w?.deviceLabel??`your device`}),await new Promise(e=>requestAnimationFrame(()=>e()))),t(i.redirectUri)}catch(e){n===`approve`&&j(null),N(e instanceof s?e.message:`The device authorization could not be completed.`)}finally{k(null)}}};return A===null?(0,x.jsx)(`main`,{className:`flex min-h-dvh items-center justify-center overflow-x-hidden bg-background px-4 py-10 text-foreground sm:px-6`,children:(0,x.jsxs)(`section`,{className:`w-full max-w-md rounded-[1.5rem] border border-border bg-card p-5 shadow-2xl shadow-black/10 sm:p-7`,children:[(0,x.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,x.jsx)(`div`,{className:`flex size-11 shrink-0 items-center justify-center rounded-xl border border-border bg-background text-primary`,children:(0,x.jsx)(f,{"aria-hidden":!0,className:`size-5`})}),(0,x.jsxs)(`p`,{className:`pt-1 text-[11px] font-semibold tracking-[0.16em] text-muted-foreground uppercase`,children:[o,` Hub`]})]}),(0,x.jsx)(`h1`,{ref:P,tabIndex:-1,className:`mt-6 text-2xl font-semibold tracking-tight outline-none`,children:`Continue on this device?`}),(0,x.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-muted-foreground`,children:`Only continue if you started this connection from the Ryco app. The app receives a one-time code, never this browser session.`}),(0,x.jsxs)(`div`,{className:`mt-6 overflow-hidden rounded-2xl border border-border bg-background/65`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-border px-4 py-3.5`,children:[(0,x.jsx)(p,{"aria-hidden":!0,className:`size-5 text-muted-foreground`}),(0,x.jsxs)(`div`,{className:`min-w-0`,children:[(0,x.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Requesting device`}),(0,x.jsx)(`p`,{className:`truncate text-sm font-medium`,children:E?`Checking request…`:w?.deviceLabel??`Unknown device`})]})]}),(0,x.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3.5`,children:[(0,x.jsx)(`div`,{"aria-hidden":!0,className:`flex size-8 shrink-0 items-center justify-center rounded-full bg-primary/12 text-xs font-semibold text-primary`,children:a.displayName.trim().slice(0,1).toLocaleUpperCase()||`R`}),(0,x.jsxs)(`div`,{className:`min-w-0`,children:[(0,x.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Signed in as`}),(0,x.jsx)(`p`,{className:`truncate text-sm font-medium`,children:a.displayName})]})]})]}),M?(0,x.jsxs)(y,{variant:`error`,className:`mt-4`,children:[(0,x.jsx)(m,{"aria-hidden":!0}),(0,x.jsx)(_,{children:`Authorization did not complete`}),(0,x.jsx)(v,{children:M})]}):null,(0,x.jsxs)(`div`,{className:`mt-6 space-y-2.5`,children:[(0,x.jsxs)(g,{size:`lg`,className:`min-h-11 w-full`,disabled:E||!w||O!==null,onClick:()=>void F(`approve`),children:[O===`approve`?(0,x.jsx)(u,{"aria-hidden":!0,className:`animate-spin motion-reduce:animate-none`}):(0,x.jsx)(l,{"aria-hidden":!0}),`Continue as `,a.displayName]}),(0,x.jsxs)(g,{size:`lg`,variant:`outline`,className:`min-h-11 w-full`,disabled:O!==null,onClick:()=>void F(`switch-account`),children:[O===`switch-account`?(0,x.jsx)(u,{"aria-hidden":!0,className:`animate-spin motion-reduce:animate-none`}):(0,x.jsx)(d,{"aria-hidden":!0}),`Use another account`]}),(0,x.jsxs)(g,{size:`lg`,variant:`ghost`,className:`min-h-11 w-full`,disabled:E||!w||O!==null,onClick:()=>void F(`cancel`),children:[O===`cancel`?(0,x.jsx)(u,{"aria-hidden":!0,className:`animate-spin motion-reduce:animate-none`}):(0,x.jsx)(h,{"aria-hidden":!0}),`Cancel`]})]}),(0,x.jsx)(`p`,{className:`mt-5 text-center text-xs leading-relaxed text-muted-foreground`,children:`Access remains limited to the nodes and permissions assigned to this Hub account.`})]})}):(0,x.jsx)(`main`,{className:`flex min-h-dvh items-center justify-center overflow-hidden bg-background px-4 py-10 text-foreground sm:px-6`,children:(0,x.jsxs)(`section`,{role:`status`,"aria-live":`polite`,className:`w-full max-w-md rounded-[1.5rem] border border-border bg-card p-6 text-center shadow-2xl shadow-black/10 sm:p-8`,children:[(0,x.jsxs)(`div`,{className:`relative mx-auto flex size-24 items-center justify-center`,children:[(0,x.jsx)(`span`,{"aria-hidden":!0,className:`absolute inset-2 rounded-full bg-success/20 motion-safe:animate-ping`}),(0,x.jsx)(`span`,{"aria-hidden":!0,className:`absolute inset-0 rounded-full border border-success/25 motion-safe:animate-pulse`}),(0,x.jsx)(`span`,{className:`relative flex size-16 items-center justify-center rounded-full bg-success text-success-foreground shadow-lg shadow-success/20`,children:(0,x.jsx)(l,{"aria-hidden":!0,className:`size-8`,strokeWidth:2.5})})]}),(0,x.jsx)(`p`,{className:`mt-7 text-[11px] font-semibold tracking-[0.16em] text-success uppercase`,children:`Sign-in approved`}),(0,x.jsx)(`h1`,{className:`mt-2 text-2xl font-semibold tracking-tight`,children:`Ryco is opening`}),(0,x.jsxs)(`p`,{className:`mt-3 text-sm leading-relaxed text-muted-foreground`,children:[`Ryco is securely finishing account and node setup on `,A.deviceLabel,`. This tab can be closed when the app shows setup complete.`]}),(0,x.jsx)(`div`,{className:`mt-7 rounded-2xl border border-border bg-background/65 p-4`,children:(0,x.jsxs)(`div`,{className:`flex items-center justify-center gap-2 text-sm font-medium`,children:[(0,x.jsx)(p,{"aria-hidden":!0,className:`size-4 text-primary`}),`Waiting for the Ryco app`,(0,x.jsxs)(`span`,{className:`flex gap-1`,"aria-hidden":!0,children:[(0,x.jsx)(`span`,{className:`size-1 rounded-full bg-primary motion-safe:animate-pulse`}),(0,x.jsx)(`span`,{className:`size-1 rounded-full bg-primary motion-safe:animate-pulse [animation-delay:150ms]`}),(0,x.jsx)(`span`,{className:`size-1 rounded-full bg-primary motion-safe:animate-pulse [animation-delay:300ms]`})]})]})}),(0,x.jsx)(g,{size:`lg`,variant:`outline`,className:`mt-5 min-h-11 w-full`,onClick:()=>t(A.redirectUri),children:`Open Ryco again`})]})})}export{w as HostedNativeAuthorizationRoute};
|
package/dist/client/assets/{HostedRelayTrustNotice-ffS_O2AX.js → HostedRelayTrustNotice-CbF_SOpf.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{dt as r,ut as i}from"./runtime-DYzjhL5M.js";import{It as a}from"./composerDraftStore-DC2r8dcu.js";import{Mt as o,Tt as s,n as c,r as l}from"./authorization-BwQZHweJ.js";import{t as u}from"./shield-alert-DY9uVP5G.js";import{t as d}from"./shield-IZEIJ8r7.js";function f(e){return l(e)}function p(e){return c(e)}var m=n(),h=e(t(),1),g=()=>r().status;function _(){return(0,h.useSyncExternalStore)(i,g,g)}var v=()=>r().verificationCode;function y(){return(0,h.useSyncExternalStore)(i,v,v)}function b(e){let t=e.split(o.separator);if(t.length!==o.groups)return[];for(let e of t){if(e.length!==o.charsPerGroup)return[];for(let t of e)if(!`0123456789ABCDEFGHJKMNPQRSTVWXYZ`.includes(t))return[]}return t}o.chars*Math.log2(s.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 → 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(o.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=a();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:o,body:s}=a,c=o===`advisory`?d:u,l=o===`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 ${o===`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 ${l}`,h;t[2]!==c||t[3]!==p?(h=(0,j.jsx)(c,{"aria-hidden":!0,className:p}),t[2]=c,t[3]=p,t[4]=h):h=t[4];let g;t[5]===s?g=t[6]:(g=(0,j.jsx)(`p`,{children:s}),t[5]=s,t[6]=g);let v;return t[7]!==i||t[8]!==f||t[9]!==h||t[10]!==g||t[11]!==o?(v=(0,j.jsxs)(`div`,{className:f,"data-hosted-relay-trust-notice":`true`,"data-e2ee-status":i,"data-tone":o,children:[h,g]}),t[7]=i,t[8]=f,t[9]=h,t[10]=g,t[11]=o,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};
|