ryco-cli 0.1.13 → 0.1.15
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-Be1KGJfF.cjs → AcpNativeLogging-OhEq3XNp.cjs} +1 -1
- package/dist/{AcpNativeLogging-Ba9Nn9Re.mjs → AcpNativeLogging-qZgtIa5K.mjs} +2 -2
- package/dist/{AzureDevOpsSourceControlProvider-CGlK6M0b.mjs → AzureDevOpsSourceControlProvider-B0YsaJyI.mjs} +3 -3
- package/dist/{AzureDevOpsSourceControlProvider-CVj-F-pW.cjs → AzureDevOpsSourceControlProvider-Dyu8KQ_S.cjs} +2 -2
- package/dist/{BitbucketSourceControlProvider-CEZEd4PX.cjs → BitbucketSourceControlProvider-3VHGKSl1.cjs} +2 -2
- package/dist/{BitbucketSourceControlProvider-BV6iRDi7.mjs → BitbucketSourceControlProvider-B8IPx2Ad.mjs} +3 -3
- package/dist/{ClaudeDriver-lBU7EyUX.cjs → ClaudeDriver-CBCy0_WX.cjs} +176 -11
- package/dist/{ClaudeDriver-rooMNrJz.mjs → ClaudeDriver-DsW8yDj9.mjs} +177 -12
- package/dist/{CodexDriver-CZCIJSLV.cjs → CodexDriver-3TZPgrGk.cjs} +3 -3
- package/dist/{CodexDriver-DBz2rPXb.mjs → CodexDriver-DLwPz5sk.mjs} +4 -4
- package/dist/{CodexTextGeneration-BeG7ymPC.mjs → CodexTextGeneration-D1vV8grr.mjs} +2 -2
- package/dist/{CodexTextGeneration-BvIcyD1P.cjs → CodexTextGeneration-DLHSW4Mz.cjs} +1 -1
- package/dist/{CopilotDriver-CX5zhEdZ.cjs → CopilotDriver-C7a8IhyK.cjs} +20 -16
- package/dist/{CopilotDriver-D36vbGbn.mjs → CopilotDriver-DXvGBv-s.mjs} +21 -17
- package/dist/{CursorDriver-DWuuOSkJ.mjs → CursorDriver-CeB_vMKJ.mjs} +4 -4
- package/dist/{CursorDriver-CPBVeesr.cjs → CursorDriver-uNsDetA3.cjs} +3 -3
- package/dist/{ForgejoSourceControlProvider-CzmmcAZO.cjs → ForgejoSourceControlProvider-CJLksvL_.cjs} +2 -2
- package/dist/{ForgejoSourceControlProvider-CeN7Snfr.mjs → ForgejoSourceControlProvider-Ds0rU_PN.mjs} +3 -3
- package/dist/{GitHubSourceControlProvider-Dmz1LJct.mjs → GitHubSourceControlProvider-C7CJAslU.mjs} +3 -3
- package/dist/{GitHubSourceControlProvider-DfFR9O2o.cjs → GitHubSourceControlProvider-CrYNFu8S.cjs} +2 -2
- package/dist/{GitLabSourceControlProvider-DGoelNmL.cjs → GitLabSourceControlProvider-jbX5M34A.cjs} +2 -2
- package/dist/{GitLabSourceControlProvider-C21lwphV.mjs → GitLabSourceControlProvider-u-Y-e8PV.mjs} +3 -3
- package/dist/{GrokDriver-CIXj_4ry.cjs → GrokDriver-BJ00ZiYg.cjs} +3 -3
- package/dist/{GrokDriver-qKX1a63G.mjs → GrokDriver-CFgjwnvE.mjs} +4 -4
- package/dist/{OpenCodeDriver-DDEuwtXl.cjs → OpenCodeDriver-BTxd2Q3Q.cjs} +487 -207
- package/dist/{OpenCodeDriver-CbdswhqU.mjs → OpenCodeDriver-DNApoGdu.mjs} +487 -207
- package/dist/{SourceControlProviderDiscoveryCatalog-DJWDCoup.cjs → SourceControlProviderDiscoveryCatalog-CPO3a9_U.cjs} +1 -1
- package/dist/{SourceControlProviderDiscoveryCatalog-4_4yahsa.mjs → SourceControlProviderDiscoveryCatalog-hXWNwRMn.mjs} +1 -1
- package/dist/bin.cjs +1324 -340
- package/dist/bin.mjs +1324 -343
- package/dist/client/assets/{AccountSettings-Be5_48k0.js → AccountSettings-Cey-16wq.js} +1 -1
- package/dist/client/assets/{AiFocusSettings-DIpQXLW2.js → AiFocusSettings-CaHQXDaQ.js} +1 -1
- package/dist/client/assets/{AnimatedHeight-BIsV_Z3J.js → AnimatedHeight-BC-qaTJY.js} +1 -1
- package/dist/client/assets/AppearanceSettings-B6UaU-_a.js +1 -0
- package/dist/client/assets/{BranchToolbar.logic-D7slG_zJ.js → BranchToolbar.logic-DILAA3Cz.js} +1 -1
- package/dist/client/assets/ChatRightPanel-D-AL07IU.js +27 -0
- package/dist/client/assets/{ChatThreadRouteView-CocRstME.js → ChatThreadRouteView-tEo-zoCf.js} +1 -1
- package/dist/client/assets/CommandPaletteDialog-s7yf5Y2S.js +1 -0
- package/dist/client/assets/{CompositeItem-F3NGn6aG.js → CompositeItem-97y1QiiT.js} +1 -1
- package/dist/client/assets/{CompositeRoot-CmJGfRtc.js → CompositeRoot-C7Mz4Y_2.js} +1 -1
- package/dist/client/assets/{ConnectionsSettings-CXabxSaH.js → ConnectionsSettings-B0-Hkwof.js} +2 -2
- package/dist/client/assets/{DiagnosticsSettings-CZ3vY43G.js → DiagnosticsSettings-DX5LH9Bt.js} +1 -1
- package/dist/client/assets/{DialogHandle-C4uSr9wX.js → DialogHandle-Cl9dQBJp.js} +1 -1
- package/dist/client/assets/{DialogPopup-Dck8r8Hn.js → DialogPopup-a1M74u16.js} +1 -1
- package/dist/client/assets/DialogRoot-C_DO1gtO.js +1 -0
- package/dist/client/assets/{DialogTitle-CCedPAjV.js → DialogTitle-Bk-w3xLJ.js} +1 -1
- package/dist/client/assets/{DialogTrigger-CYJ7_YcV.js → DialogTrigger-D9nkMFu2.js} +1 -1
- package/dist/client/assets/{DialogViewport-D-CrTM-P.js → DialogViewport-tgJz2Lwn.js} +1 -1
- package/dist/client/assets/{DraftChatThreadRouteView-D8Bt3Qnq.js → DraftChatThreadRouteView-BU2IGTR6.js} +1 -1
- package/dist/client/assets/{ExternalIdentityWeb.logic-D64j70NH.js → ExternalIdentityWeb.logic-Bn1HigS9.js} +1 -1
- package/dist/client/assets/GlassSurface-CDok2tTN.js +1 -0
- package/dist/client/assets/{HostedConnectionControls-DxAXv0Hd.js → HostedConnectionControls-Cux_sRCM.js} +1 -1
- package/dist/client/assets/HostedHubRoot-CyySCdJV.js +1 -0
- package/dist/client/assets/{HostedNativeAuthorizationRoute-CTQe7Vjt.js → HostedNativeAuthorizationRoute-490iDXmk.js} +1 -1
- package/dist/client/assets/{HostedRelayTrustNotice-BldMySVi.js → HostedRelayTrustNotice-CcDOAwgS.js} +1 -1
- package/dist/client/assets/{Icons-CT3nd2MA.js → Icons-BEtED8P8.js} +1 -1
- package/dist/client/assets/{IntegrationsSettingsPanel-D6f3KoqM.js → IntegrationsSettingsPanel-BFTAvxtn.js} +1 -1
- package/dist/client/assets/KeybindingsSettings-VYgbhiZF.js +7 -0
- package/dist/client/assets/{McpServersSettings-B7YqVvV4.js → McpServersSettings-DSDCjoTn.js} +1 -1
- package/dist/client/assets/{MobileSheet-CkeG6_SP.js → MobileSheet-BDvnUC5W.js} +1 -1
- package/dist/client/assets/{NewWorktreeDialog-CKr2ioue.js → NewWorktreeDialog-C65Aifeb.js} +1 -1
- package/dist/client/assets/{NoActiveThreadState-BD-eNmfn.js → NoActiveThreadState-DehHNgAp.js} +1 -1
- package/dist/client/assets/{NodeSecuritySettings-FWM_SeDi.js → NodeSecuritySettings-DW9GJ-kU.js} +1 -1
- package/dist/client/assets/{OpinionatedPluginsSettings-BtZQF4Ze.js → OpinionatedPluginsSettings-DbxPOokL.js} +1 -1
- package/dist/client/assets/{PhoneGetAppInterstitial-CooQgpSw.js → PhoneGetAppInterstitial-CbyVrtDn.js} +1 -1
- package/dist/client/assets/{PhoneGetAppInterstitialBackdrop-B8vfJdZd.js → PhoneGetAppInterstitialBackdrop-BA4R225F.js} +1 -1
- package/dist/client/assets/PhoneHome-c0j_TBEC.js +1 -0
- package/dist/client/assets/PhoneSettingsSurface-5LFRIx_5.js +1 -0
- package/dist/client/assets/{ProjectFavicon-qZGdjYCM.js → ProjectFavicon-CeVJCQCy.js} +1 -1
- package/dist/client/assets/{ProviderModelPicker-D0w23uWo.js → ProviderModelPicker-MFRYAv_3.js} +1 -1
- package/dist/client/assets/{ProviderUpdateLaunchNotification.logic-BkoRegCn.js → ProviderUpdateLaunchNotification.logic-CywRitn3.js} +1 -1
- package/dist/client/assets/ProvidersSettingsPanel-FYBEqSr_.js +1 -0
- package/dist/client/assets/{RedactedSensitiveText-CxtaUiKH.js → RedactedSensitiveText-BuWSWty8.js} +1 -1
- package/dist/client/assets/RootAppShell-5HrP6N8H.js +6 -0
- package/dist/client/assets/{RycoLetterMark-Bk0kvGJ_.js → RycoLetterMark-CZYntY8t.js} +1 -1
- package/dist/client/assets/SettingsDialog-CpwoqGS8.js +1 -0
- package/dist/client/assets/{SettingsPanels-Dr4f2y9l.js → SettingsPanels-COWRB29-.js} +3 -3
- package/dist/client/assets/{SettingsPanels.editor-B2x4U4rW.js → SettingsPanels.editor-lbLEbllb.js} +1 -1
- package/dist/client/assets/SourceControlSettings-DvBNelcO.js +1 -0
- package/dist/client/assets/{StatisticsPage-Bjouapmf.js → StatisticsPage-DxAKqvVX.js} +1 -1
- package/dist/client/assets/{StatisticsPanel-D_khPph6.js → StatisticsPanel-C0xGLlMA.js} +1 -1
- package/dist/client/assets/{StatisticsSettingsLink-Cx43bOeo.js → StatisticsSettingsLink-B7SZerf3.js} +1 -1
- package/dist/client/assets/ThreadStatusIndicators-CIOM98q2.js +0 -0
- package/dist/client/assets/{ThreadTerminalDrawer-DDHEuRGB.js → ThreadTerminalDrawer-DRelLlEP.js} +1 -1
- package/dist/client/assets/{ThreadWorkspacePanel-QF3KwbGm.js → ThreadWorkspacePanel-CktVSliZ.js} +3 -3
- package/dist/client/assets/{ToolbarRootContext-BgqqXVly.js → ToolbarRootContext-B1g8IP6k.js} +1 -1
- package/dist/client/assets/{WorkItemsTab-AOVwVvb7.js → WorkItemsTab-CahU_t_S.js} +12 -12
- package/dist/client/assets/{alert-LqMhbdE9.js → alert-DomE7dAt.js} +1 -1
- package/dist/client/assets/{alert-dialog-DxoA6ky8.js → alert-dialog-9Jyh0e8u.js} +1 -1
- package/dist/client/assets/appearancePreferences-BhNRCg6W.js +1 -0
- package/dist/client/assets/authorization-D8lJzXTE.js +1 -0
- package/dist/client/assets/{badge-CXw6fWrB.js → badge-w43sx8eF.js} +1 -1
- package/dist/client/assets/{branding-BDfN6Spd.js → branding-B7DcCXjn.js} +1 -1
- package/dist/client/assets/{button-BAbJxRzt.js → button-DG8WqjNn.js} +1 -1
- package/dist/client/assets/{capabilities-3zgirmmI.js → capabilities-B1FHGoov.js} +1 -1
- package/dist/client/assets/{chatThreadActions-DQ8aOQ1g.js → chatThreadActions-BZvyhfKr.js} +1 -1
- package/dist/client/assets/{collapsible-dxy6kc2k.js → collapsible-EhAEe5S9.js} +1 -1
- package/dist/client/assets/{command-CGNKG_Oe.js → command-Cyn6yIEa.js} +1 -1
- package/dist/client/assets/composerDraftStore-TYv9j3vY.js +11 -0
- package/dist/client/assets/{data-list-CYKBxN62.js → data-list-DTdqWMGN.js} +1 -1
- package/dist/client/assets/{desktopUpdateAtoms-CyfPW2jg.js → desktopUpdateAtoms-CPlZiFRm.js} +1 -1
- package/dist/client/assets/{desktopWorkspace-DHUZEpfy.js → desktopWorkspace-DEZ30LlY.js} +1 -1
- package/dist/client/assets/device-CHdXzvhB.js +168 -0
- package/dist/client/assets/{dialog-DQsYchqu.js → dialog-BNmFD6Nh.js} +1 -1
- package/dist/client/assets/{draft-input-CkzOk8BY.js → draft-input-dP7F8odz.js} +1 -1
- package/dist/client/assets/editorPreferences-B4GvqMiF.js +1 -0
- package/dist/client/assets/{empty-DwzqNgCP.js → empty-Ccxhyvdf.js} +1 -1
- package/dist/client/assets/{env-B4arEvJg.js → env-Bcq9YR3B.js} +1 -1
- package/dist/client/assets/{getPseudoElementBounds-X62ElHN8.js → getPseudoElementBounds-CO5HJT7x.js} +1 -1
- package/dist/client/assets/{group-D9ER9giz.js → group-CzdKmc45.js} +1 -1
- package/dist/client/assets/{index-CQmEMMQH.js → index-Gre6bNC8.js} +2 -2
- package/dist/client/assets/{input-CHEwW3oH.js → input-BZz4eLRl.js} +1 -1
- package/dist/client/assets/{kbd-DCGQZk18.js → kbd-DbvN3zTb.js} +1 -1
- package/dist/client/assets/{keybindings-CWJ7E9ZI.js → keybindings-BPE3eEAM.js} +1 -1
- package/dist/client/assets/{label-CVFHsLFO.js → label-DZf4lbNF.js} +1 -1
- package/dist/client/assets/{lib-qiiNMGgU.js → lib-DgOYoged.js} +1 -1
- package/dist/client/assets/{liquidGlass-CPsvmaF0.js → liquidGlass-yFkZrRk5.js} +1 -1
- package/dist/client/assets/{logging-M8H3z7rQ.js → logging-81iP6Hps.js} +1 -1
- package/dist/client/assets/main-DlGNPwsH.css +2 -0
- package/dist/client/assets/main-Dz0zookE.js +9 -0
- package/dist/client/assets/{menu-Dvxh8sD5.js → menu-B6UEFcn0.js} +1 -1
- package/dist/client/assets/{popover-CuH9Yrj3.js → popover-BuYzXGwl.js} +1 -1
- package/dist/client/assets/primary-CiDY2oUi.js +2 -0
- package/dist/client/assets/projectPaths-D6fHIU1b.js +1 -0
- package/dist/client/assets/{providerDriverMeta-I0TSo-QI.js → providerDriverMeta-sBwZhQoN.js} +1 -1
- package/dist/client/assets/{providerIconUtils-X0Z3EK-Q.js → providerIconUtils-DiDJeNtT.js} +1 -1
- package/dist/client/assets/providerInstances-vd2eZtHx.js +1 -0
- package/dist/client/assets/providerModels-vd2eZtHx.js +1 -0
- package/dist/client/assets/{qr-code-Bddq6K7S.js → qr-code-Ie92aZvE.js} +1 -1
- package/dist/client/assets/{radio-group-CBZFr4C8.js → radio-group-BuuTEtdC.js} +1 -1
- package/dist/client/assets/{resolveAriaLabelledBy-CD_ugzhJ.js → resolveAriaLabelledBy-0FA0k4xp.js} +1 -1
- package/dist/client/assets/{rightPanelRouteSearch-DB5gQGHK.js → rightPanelRouteSearch-BS8CkNS6.js} +1 -1
- package/dist/client/assets/runtime-CPM0EUhb.js +1 -0
- package/dist/client/assets/{scroll-area-Drsa8bNB.js → scroll-area-C0yF015F.js} +1 -1
- package/dist/client/assets/{scrollEdges-B-cqxY4l.js → scrollEdges-DI5Y3mtR.js} +1 -1
- package/dist/client/assets/{select-BYbVr-yg.js → select-CZukJlTn.js} +1 -1
- package/dist/client/assets/{separator-CdS5bi4Z.js → separator-D4ckGtPe.js} +1 -1
- package/dist/client/assets/session-logic-BalPN1Sc.js +4 -0
- package/dist/client/assets/{settingsDialogStore-ygYoScKe.js → settingsDialogStore-LxRFC5hh.js} +1 -1
- package/dist/client/assets/{settingsLayout-D8glO7f1.js → settingsLayout-CHJT5wtl.js} +1 -1
- package/dist/client/assets/{sheet-BO78gIKZ.js → sheet-BNfImQ-7.js} +1 -1
- package/dist/client/assets/{sidebar-Dm6l2GA6.js → sidebar-CFGg5Tkr.js} +1 -1
- package/dist/client/assets/sidebarProjectFolders-bhNsO9Z_.js +4 -0
- package/dist/client/assets/{sidebarStatusText-D0HT0fek.js → sidebarStatusText-C8QBhZhZ.js} +1 -1
- package/dist/client/assets/{skeleton-CvQSeJbw.js → skeleton-DOgQaVXv.js} +1 -1
- package/dist/client/assets/{spinner-ClF0jOcX.js → spinner-ClQu8SdC.js} +1 -1
- package/dist/client/assets/{src-Vf4LVnMX.js → src-DmPIm3ie.js} +1 -1
- package/dist/client/assets/storeSelectors-Cf2WDMfx.js +1 -0
- package/dist/client/assets/{switch-BTGo9Yip.js → switch-BZjA7VT9.js} +1 -1
- package/dist/client/assets/{terminal-links-CZ3c9AbA.js → terminal-links-CzJomeox.js} +1 -1
- package/dist/client/assets/{textarea-RFPODxWW.js → textarea-DHdmRD1r.js} +1 -1
- package/dist/client/assets/threadPinning-BLqwZebi.js +1 -0
- package/dist/client/assets/{threadPriorityRefreshRuntime-Ct5pnIbX.js → threadPriorityRefreshRuntime-BoNAlBXK.js} +1 -1
- package/dist/client/assets/{toast-CcSCAm4B.js → toast-C-0Ft2jD.js} +1 -1
- package/dist/client/assets/{toggle-I6h33Cu5.js → toggle-DsnOFDbJ.js} +1 -1
- package/dist/client/assets/{toggle-group-mLIkiJtU.js → toggle-group-Chxh9G6t.js} +1 -1
- package/dist/client/assets/{tooltip-C8sAONBj.js → tooltip-C_-9XEfA.js} +1 -1
- package/dist/client/assets/types-Cf2WDMfx.js +1 -0
- package/dist/client/assets/{uiStateStore-B6pjzSjj.js → uiStateStore-DzUrk2GS.js} +1 -1
- package/dist/client/assets/useAtlassian-CoHKzu-e.js +0 -0
- package/dist/client/assets/{useButton-D__1LqCF.js → useButton-BmvYhoMC.js} +1 -1
- package/dist/client/assets/{useCompositeListItem-Cmr_nuuG.js → useCompositeListItem-D0PvH4nv.js} +1 -1
- package/dist/client/assets/{useDebouncedValue-DHjoudTq.js → useDebouncedValue-s0BC8Yyp.js} +1 -1
- package/dist/client/assets/{useFloatingRootContext-D5EZmrCa.js → useFloatingRootContext-CLCaQEJk.js} +1 -1
- package/dist/client/assets/{useHandleNewThread-DX2FtXcP.js → useHandleNewThread-Bw460iXT.js} +1 -1
- package/dist/client/assets/{useLabelableId-DnQJ7amm.js → useLabelableId-CB_9OReR.js} +1 -1
- package/dist/client/assets/{useLocation-CDeYzWW6.js → useLocation-DGJMt6gP.js} +1 -1
- package/dist/client/assets/{useOpenInteractionType-CjtpACKR.js → useOpenInteractionType-BSSI2GzS.js} +1 -1
- package/dist/client/assets/{usePhoneThreadActions-BEa3VzGG.js → usePhoneThreadActions-BIDUSWSI.js} +1 -1
- package/dist/client/assets/{usePopupViewport-BuhsNdVy.js → usePopupViewport-8F-J1h5f.js} +1 -1
- package/dist/client/assets/{useScrollLock-D3tMGsRk.js → useScrollLock-CBz-5_MX.js} +1 -1
- package/dist/client/assets/{useStatistics-CtunoTE-.js → useStatistics-B91973jb.js} +2 -2
- package/dist/client/assets/{useSwipeDismiss-CbgDJvw1.js → useSwipeDismiss-D22_vuiH.js} +1 -1
- package/dist/client/assets/{useTheme-DiC-5xCb.js → useTheme-By1kfyiU.js} +1 -1
- package/dist/client/assets/{useThreadActions-fN-Al13y.js → useThreadActions-BCH01d6u.js} +1 -1
- package/dist/client/assets/{useTriggerFocusGuards-CrugmkhX.js → useTriggerFocusGuards-f7afwACm.js} +1 -1
- package/dist/client/assets/{useValueChanged-MQtIzPIU.js → useValueChanged-EkWF0C3k.js} +1 -1
- package/dist/client/assets/{utils-BofFIn5Y.js → utils-CV2fJJxC.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/{collectUint8StreamText-Bb52hlpd.cjs → collectUint8StreamText-Dsbmrw73.cjs} +48 -10
- package/dist/{collectUint8StreamText-EDg4F0TU.mjs → collectUint8StreamText-oFvWyN3_.mjs} +37 -11
- package/dist/{makeManagedServerProvider-itynW7xv.cjs → makeManagedServerProvider-CANTNAsz.cjs} +9 -2
- package/dist/{makeManagedServerProvider-Cf8bNWwc.mjs → makeManagedServerProvider-PLtJj7EV.mjs} +10 -3
- package/package.json +1 -1
- package/dist/client/assets/AppearanceSettings-CYbSApl4.js +0 -1
- package/dist/client/assets/ChatRightPanel-BIS1DPGa.js +0 -27
- package/dist/client/assets/CommandPaletteDialog-C5xAo65V.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-Cc8GYcK6.js +0 -1
- package/dist/client/assets/KeybindingsSettings-D2bNQPI-.js +0 -7
- package/dist/client/assets/PhoneHome-BtPE7bQn.js +0 -1
- package/dist/client/assets/PhoneSettingsSurface-tcFCccEL.js +0 -1
- package/dist/client/assets/ProvidersSettingsPanel-B3aBKY--.js +0 -1
- package/dist/client/assets/RootAppShell-C-0ChFVJ.js +0 -6
- package/dist/client/assets/SettingsDialog-Bbuoh793.js +0 -1
- package/dist/client/assets/SourceControlSettings-CkiYR4lR.js +0 -1
- package/dist/client/assets/ThreadStatusIndicators-ZImeLExQ.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/device-B_qvyvtW.js +0 -168
- package/dist/client/assets/editorPreferences-DHIJntKF.js +0 -1
- package/dist/client/assets/main-BKS5Nf2_.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-BzLEg2w1.js +0 -2
- package/dist/client/assets/projectPaths-BAd6NFcE.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-CXut_g4p.js +0 -1
- package/dist/client/assets/session-logic-GZix7S2I.js +0 -4
- package/dist/client/assets/sidebarProjectFolders-cnmz3B_-.js +0 -4
- package/dist/client/assets/storeSelectors-DYekgeHu.js +0 -1
- package/dist/client/assets/types-DYekgeHu.js +0 -1
- package/dist/client/assets/useAppearancePreference-BlLlxQl7.js +0 -1
- package/dist/client/assets/useAtlassian-9-hy2f8z.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{F as r,M as i,N as a}from"./runtime-CXut_g4p.js";import{It as o}from"./composerDraftStore-CdJJZe42.js";import{_ as s,o as c}from"./authorization-mIJKV2yp.js";import{n as l}from"./loader-circle-CrtHFAvM.js";import{t as u}from"./copy-UQjKGt7t.js";import{t as d}from"./key-round-CacMputS.js";import{t as f}from"./refresh-cw-DopCMrtR.js";import{t as p}from"./shield-check-dQ-4cMKk.js";import{t as m}from"./trash-2-CM1zXPGb.js";import{t as h}from"./triangle-alert-RL_T3KLo.js";import{t as g}from"./user-round-Cpzx8pSw.js";import{n as _,t as v}from"./input-CHEwW3oH.js";import{u as y}from"./Icons-CT3nd2MA.js";import{t as b}from"./button-BAbJxRzt.js";import{t as x}from"./useCopyToClipboard-BTpWxumf.js";import{i as S,n as C,r as w,t as T}from"./alert-LqMhbdE9.js";import{a as E,c as D,i as ee,o as O,r as te,s as ne,t as k}from"./dialog-DQsYchqu.js";import{t as A}from"./spinner-ClF0jOcX.js";import{a as j,i as M,n as N,o as re,r as ie,s as ae,t as oe}from"./alert-dialog-DxoA6ky8.js";import{t as P}from"./badge-CXw6fWrB.js";import{t as se}from"./label-CVFHsLFO.js";import{C as F,S as I,_ as L,a as R,b as z,c as ce,d as le,f as B,g as V,h as H,i as U,l as W,m as G,n as K,o as q,p as ue,r as de,s as J,t as fe,u as pe,v as Y,x as X,y as me}from"./ExternalIdentityWeb.logic-D64j70NH.js";import{i as he,n as ge,r as _e}from"./settingsLayout-D8glO7f1.js";import{t as ve}from"./qr-code-Bddq6K7S.js";var ye=n(),Z=e(t(),1),Q=o(),be=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function xe(e){return e===null||!Number.isFinite(e)?null:be.format(new Date(e))}function Se(){let e=(0,ye.c)(15),[t,n]=(0,Z.useState)(null),[r,i]=(0,Z.useState)(0),[a,o]=(0,Z.useState)(``),[s,l]=(0,Z.useState)(!1),u=(0,Z.useRef)(0),d;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{n(null),i(0),o(``)},e[0]=d):d=e[0];let f=d,p;e[1]===t?.options?p=e[2]:(p=()=>{u.current+=1,c.cancelAccountAction(),t?.options?.onAbandoned?.(),l(!1),f()},e[1]=t?.options,e[2]=p);let m=p,h;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=async(e,t,r)=>{let a=u.current+=1;l(!1);let s=await t({});if(u.current===a){if(B(s)){o(``),i(0),n({action:e,run:t,options:r,inferred:s.inferredErrorCode===!0});return}s.status===`committed`&&r?.onCommitted?.()}},e[3]=h):h=e[3];let g=h,_;e[4]!==t||e[5]!==a||e[6]!==r?(_=async()=>{if(!t)return;let e=H(a);if(e.length===0)return;let n=u.current+=1,s=await t.run({totpCode:e});if(u.current===n){if(B(s)){let e=r+1;if(z(s,e)){i(e),o(``);return}l(!0),t.options?.onAbandoned?.(),f();return}s.status===`committed`&&t.options?.onCommitted?.(),f()}},e[4]=t,e[5]=a,e[6]=r,e[7]=_):_=e[7];let v=_,y;return e[8]!==m||e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==s||e[13]!==v?(y={run:g,cancel:m,stepUp:t,stepUpAttempts:r,stepUpCode:a,stepUpUnresolved:s,setStepUpCode:o,submitStepUp:v},e[8]=m,e[9]=t,e[10]=a,e[11]=r,e[12]=s,e[13]=v,e[14]=y):y=e[14],y}function Ce(){let e=(0,ye.c)(1),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,Z.useEffect)(we,t)}function we(){return c.leaseRecoveryCodeDisplay()}function $(e){let t=(0,ye.c)(3),{busy:n,children:r}=e,i;return t[0]!==n||t[1]!==r?(i=n?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(A,{className:`size-3.5`}),r]}):(0,Q.jsx)(Q.Fragment,{children:r}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function Te(){let e=(0,ye.c)(99),t=a(We),n=a(Ue),[o,c]=(0,Z.useState)(!1),l=i(He),u=i(Ve),d=i(Be),f=i(ze),m=i(Re),_=i(Le),v=i(Ie),y=i(Fe),x=a(Pe),E=a(Ne),[D,ee]=(0,Z.useState)(!1),[O,te]=(0,Z.useState)(null),ne=(0,Z.useRef)(!1),k=Se(),A=k.run;Ce();let j=_!==`idle`,M;e[0]===m?M=e[1]:(M=de(m),e[0]=m,e[1]=M);let N=M,re;e[2]===d?.externalIdentities?re=e[3]:(re=d?.externalIdentities.find(Me)??null,e[2]=d?.externalIdentities,e[3]=re);let ie=re,ae;e[4]===D?ae=e[5]:(ae=async()=>{if(!D){ee(!0),te(null);try{await fe({intent:`link`,returnTo:`/account/security`,start:je,navigate:Ae})}catch(e){let t=e;te(t instanceof s?t.message:`GitHub connection is temporarily unavailable.`),ee(!1)}}},e[4]=D,e[5]=ae);let oe=ae,P;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(P=[],e[6]=P):P=e[6],(0,Z.useEffect)(ke,P);let se,F;if(e[7]!==t||e[8]!==A?(se=()=>{if(t!==`authenticated`||ne.current)return;ne.current=!0;let e=new AbortController;return r.getPendingExternalIdentity(e.signal).then(e=>{if(e.status===`link`)return A(`connect-github`,Oe);e.status===`error`&&te(K(e.code))}).catch(De),()=>e.abort()},F=[t,A],e[7]=t,e[8]=A,e[9]=se,e[10]=F):(se=e[9],F=e[10]),(0,Z.useEffect)(se,F),t!==`authenticated`){let t;return e[11]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsx)(ge,{children:(0,Q.jsxs)(T,{variant:`warning`,children:[(0,Q.jsx)(h,{"aria-hidden":!0}),(0,Q.jsx)(S,{children:`Not signed in`}),(0,Q.jsx)(w,{children:`Sign in to the Hub to manage passkeys, two-factor authentication, and recovery codes.`})]})}),e[11]=t):t=e[11],t}let I;e[12]!==k.stepUp||e[13]!==k.stepUpUnresolved||e[14]!==y||e[15]!==v?(I=k.stepUpUnresolved?U:W(v,y,k.stepUp!==null),e[12]=k.stepUp,e[13]=k.stepUpUnresolved,e[14]=y,e[15]=v,e[16]=I):I=e[16];let L=I,z;e[17]!==k.stepUpUnresolved||e[18]!==y?(z=!k.stepUpUnresolved&&le(y),e[17]=k.stepUpUnresolved,e[18]=y,e[19]=z):z=e[19];let ce=z,B;e[20]!==l||e[21]!==u?(B=R(l,u),e[20]=l,e[21]=u,e[22]=B):B=e[22];let V=B,H;e[23]!==L||e[24]!==ce?(H=L?(0,Q.jsxs)(T,{variant:ce?`info`:`error`,"aria-live":`polite`,children:[(0,Q.jsx)(h,{"aria-hidden":!0}),(0,Q.jsx)(S,{children:ce?`Passkey needed`:`That did not work`}),(0,Q.jsx)(w,{children:L})]}):null,e[23]=L,e[24]=ce,e[25]=H):H=e[25];let G;e[26]===O?G=e[27]:(G=O?(0,Q.jsxs)(T,{variant:`warning`,"aria-live":`polite`,children:[(0,Q.jsx)(h,{"aria-hidden":!0}),(0,Q.jsx)(S,{children:`GitHub connection did not complete`}),(0,Q.jsx)(w,{children:O})]}):null,e[26]=O,e[27]=G);let q;e[28]!==d||e[29]!==f?(q=d===null&&f!==`stale`?(0,Q.jsxs)(T,{variant:`info`,"aria-live":`polite`,children:[(0,Q.jsx)(p,{"aria-hidden":!0}),(0,Q.jsx)(S,{children:`Checking account security`}),(0,Q.jsx)(w,{children:`Reading which fallback sign-in methods are configured on this Hub.`})]}):null,e[28]=d,e[29]=f,e[30]=q):q=e[30];let ue;e[31]!==j||e[32]!==d||e[33]!==f?(ue=f===`stale`?(0,Q.jsxs)(T,{variant:`warning`,"aria-live":`polite`,children:[(0,Q.jsx)(h,{"aria-hidden":!0}),(0,Q.jsx)(S,{children:d===null?`Account security unavailable`:`Account security may be outdated`}),(0,Q.jsx)(w,{children:d===null?`Ryco could not read the current password, authenticator, and email state.`:`These controls use the last state Ryco successfully read from the Hub.`}),(0,Q.jsx)(C,{children:(0,Q.jsx)(b,{size:`xs`,variant:`outline`,disabled:j,onClick:Ee,children:`Retry`})})]}):null,e[31]=j,e[32]=d,e[33]=f,e[34]=ue):ue=e[34];let J;e[35]!==j||e[36]!==V?(J=V?(0,Q.jsxs)(T,{variant:V.variant,"aria-live":`polite`,children:[(0,Q.jsx)(h,{"aria-hidden":!0}),(0,Q.jsx)(S,{children:V.title}),(0,Q.jsx)(w,{children:V.description}),(0,Q.jsx)(C,{children:(0,Q.jsx)(b,{size:`xs`,variant:`outline`,disabled:j,onClick:()=>c(!0),children:V.actionLabel})})]}):null,e[35]=j,e[36]=V,e[37]=J):J=e[37];let pe;e[38]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Q.jsx)(g,{"aria-hidden":!0,className:`size-3.5`}),e[38]=pe):pe=e[38];let Y=n?.displayName??`Signed in`,X;e[39]===n?X=e[40]:(X=n?`${n.role} · joined ${xe(n.createdAt)??`unknown`}`:null,e[39]=n,e[40]=X);let me;e[41]!==Y||e[42]!==X?(me=(0,Q.jsx)(he,{title:`Account`,icon:pe,children:(0,Q.jsx)(_e,{title:Y,description:`The Hub account these credentials belong to.`,status:X})}),e[41]=Y,e[42]=X,e[43]=me):me=e[43];let ve;e[44]!==_||e[45]!==j||e[46]!==D||e[47]!==ie||e[48]!==N?.link||e[49]!==A||e[50]!==oe?(ve=ie||N?.link?(0,Q.jsx)(Ge,{identity:ie,actionsAvailable:N?.link===!0,busy:j||D,actionStatus:_,onConnect:()=>void oe(),run:A}):null,e[44]=_,e[45]=j,e[46]=D,e[47]=ie,e[48]=N?.link,e[49]=A,e[50]=oe,e[51]=ve):ve=e[51];let be=u===`loading`,we=u===`stale`,$;e[52]!==k.cancel||e[53]!==k.run||e[54]!==_||e[55]!==o||e[56]!==j||e[57]!==l||e[58]!==be||e[59]!==we?($=(0,Q.jsx)(qe,{passkeys:l,loading:be,stale:we,busy:j,actionStatus:_,addOpen:o,setAddOpen:c,run:k.run,cancel:k.cancel}),e[52]=k.cancel,e[53]=k.run,e[54]=_,e[55]=o,e[56]=j,e[57]=l,e[58]=be,e[59]=we,e[60]=$):$=e[60];let Te=d?.totpEnrolled??null,Ke;e[61]!==k.run||e[62]!==_||e[63]!==j||e[64]!==Te||e[65]!==E?(Ke=(0,Q.jsx)(Je,{busy:j,actionStatus:_,enrollment:E,enrolled:Te,run:k.run}),e[61]=k.run,e[62]=_,e[63]=j,e[64]=Te,e[65]=E,e[66]=Ke):Ke=e[66];let Ye;e[67]!==k.run||e[68]!==_||e[69]!==j||e[70]!==x?(Ye=(0,Q.jsx)(et,{busy:j,actionStatus:_,recoveryCodes:x,run:k.run}),e[67]=k.run,e[68]=_,e[69]=j,e[70]=x,e[71]=Ye):Ye=e[71];let Xe;e[72]!==k.cancel||e[73]!==k.run||e[74]!==_||e[75]!==j||e[76]!==d?(Xe=(0,Q.jsx)(Ze,{busy:j,actionStatus:_,security:d,run:k.run,cancel:k.cancel}),e[72]=k.cancel,e[73]=k.run,e[74]=_,e[75]=j,e[76]=d,e[77]=Xe):Xe=e[77];let Qe;e[78]!==k.cancel||e[79]!==k.setStepUpCode||e[80]!==k.stepUp||e[81]!==k.stepUpAttempts||e[82]!==k.stepUpCode||e[83]!==k.submitStepUp||e[84]!==j?(Qe=(0,Q.jsx)(at,{pending:k.stepUp,attempts:k.stepUpAttempts,code:k.stepUpCode,onCodeChange:k.setStepUpCode,onSubmit:k.submitStepUp,onCancel:k.cancel,busy:j}),e[78]=k.cancel,e[79]=k.setStepUpCode,e[80]=k.stepUp,e[81]=k.stepUpAttempts,e[82]=k.stepUpCode,e[83]=k.submitStepUp,e[84]=j,e[85]=Qe):Qe=e[85];let $e;return e[86]!==G||e[87]!==q||e[88]!==ue||e[89]!==J||e[90]!==me||e[91]!==ve||e[92]!==$||e[93]!==Ke||e[94]!==Ye||e[95]!==Xe||e[96]!==Qe||e[97]!==H?($e=(0,Q.jsxs)(ge,{children:[H,G,q,ue,J,me,ve,$,Ke,Ye,Xe,Qe]}),e[86]=G,e[87]=q,e[88]=ue,e[89]=J,e[90]=me,e[91]=ve,e[92]=$,e[93]=Ke,e[94]=Ye,e[95]=Xe,e[96]=Qe,e[97]=H,e[98]=$e):$e=e[98],$e}function Ee(){c.refreshAccountSecurity({force:!0})}function De(){}function Oe(e){return c.finishBrowserExternalIdentityConnection(`github`,e)}function ke(){c.refreshPasskeys(),c.refreshAccountSecurity(),c.refreshExternalIdentityConfiguration()}function Ae(e){return window.location.assign(e)}function je(e){return r.startExternalIdentityAuthorization(e)}function Me(e){return e.provider===`github`}function Ne(e){return e.totpEnrollment??null}function Pe(e){return e.recoveryCodes}function Fe(e){return e.errorCode??null}function Ie(e){return e.errorMessage}function Le(e){return e.actionStatus}function Re(e){return e.externalIdentityConfiguration}function ze(e){return e.securityStatus}function Be(e){return e.security}function Ve(e){return e.passkeysStatus}function He(e){return e.passkeys}function Ue(e){return e.account}function We(e){return e.accountStatus}function Ge(e){let t=(0,ye.c)(33),{identity:n,actionsAvailable:r,busy:i,actionStatus:a,onConnect:o,run:s}=e,[c,l]=(0,Z.useState)(!1),u=a===`connecting-external-identity`,d=a===`disconnecting-external-identity`,f;t[0]===s?f=t[1]:(f=async()=>{await s(`disconnect-github`,Ke,{onCommitted:()=>l(!1)})},t[0]=s,t[1]=f);let p=f,m;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Q.jsx)(y,{"aria-hidden":!0,className:`size-3.5`}),t[2]=m):m=t[2];let h=n?`GitHub · @${n.login}`:`GitHub`,g=n?`Use this GitHub identity to sign in to Ryco. Repository access remains separate.`:`Connect GitHub as another way to sign in. Ryco requests no repository access.`,_;t[3]===n?_=t[4]:(_=n?`Connected ${xe(n.connectedAt)??`at an unknown time`}${n.lastUsedAt===null?``:` · last used ${xe(n.lastUsedAt)??`at an unknown time`}`}`:null,t[3]=n,t[4]=_);let v;t[5]!==r||t[6]!==i||t[7]!==u||t[8]!==d||t[9]!==n||t[10]!==o?(v=r?n?(0,Q.jsx)(b,{size:`sm`,variant:`outline`,disabled:i,onClick:()=>l(!0),children:(0,Q.jsx)($,{busy:d,children:`Disconnect`})}):(0,Q.jsx)(b,{size:`sm`,variant:`outline`,disabled:i,onClick:o,children:(0,Q.jsx)($,{busy:u,children:`Connect GitHub`})}):null,t[5]=r,t[6]=i,t[7]=u,t[8]=d,t[9]=n,t[10]=o,t[11]=v):v=t[11];let x;t[12]!==h||t[13]!==g||t[14]!==_||t[15]!==v?(x=(0,Q.jsx)(_e,{title:h,description:g,status:_,control:v}),t[12]=h,t[13]=g,t[14]=_,t[15]=v,t[16]=x):x=t[16];let S;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Q.jsxs)(j,{children:[(0,Q.jsx)(ae,{children:`Disconnect GitHub?`}),(0,Q.jsx)(ie,{children:`You will no longer be able to sign in with GitHub. Ryco refuses this change if GitHub is your only remaining sign-in method.`})]}),t[17]=S):S=t[17];let C;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(N,{render:(0,Q.jsx)(b,{variant:`outline`}),children:`Cancel`}),t[18]=C):C=t[18];let w;t[19]===p?w=t[20]:(w=()=>void p(),t[19]=p,t[20]=w);let T;t[21]===d?T=t[22]:(T=(0,Q.jsx)($,{busy:d,children:`Disconnect GitHub`}),t[21]=d,t[22]=T);let E;t[23]!==i||t[24]!==w||t[25]!==T?(E=(0,Q.jsxs)(re,{children:[S,(0,Q.jsxs)(M,{children:[C,(0,Q.jsx)(b,{disabled:i,onClick:w,children:T})]})]}),t[23]=i,t[24]=w,t[25]=T,t[26]=E):E=t[26];let D;t[27]!==c||t[28]!==E?(D=(0,Q.jsx)(oe,{open:c,onOpenChange:l,children:E}),t[27]=c,t[28]=E,t[29]=D):D=t[29];let ee;return t[30]!==D||t[31]!==x?(ee=(0,Q.jsxs)(he,{title:`Connected accounts`,icon:m,children:[x,D]}),t[30]=D,t[31]=x,t[32]=ee):ee=t[32],ee}function Ke(e){return c.disconnectExternalIdentity(`github`,e)}function qe({passkeys:e,loading:t,stale:n,busy:r,actionStatus:i,addOpen:a,setAddOpen:o,run:s,cancel:l}){let[u,f]=(0,Z.useState)(``),[p,h]=(0,Z.useState)(null),[g,y]=(0,Z.useState)(null),x=i===`adding-passkey`,S=i===`revoking-passkey`,C=q(e),w=F(e),T=V(e),A=(0,Z.useCallback)(()=>{f(``),o(!1)},[o]),I=async e=>{e.preventDefault();let t=G(u);await s(`add-passkey`,e=>c.addPasskey({passkeyLabel:t,...e}),{onCommitted:A,onAbandoned:A})},R=async()=>{let e=p;if(e){h(null),y(e.id);try{await c.revokePasskey(e.id)}finally{y(null)}}};return(0,Q.jsxs)(he,{title:`Passkeys`,icon:(0,Q.jsx)(d,{"aria-hidden":!0,className:`size-3.5`}),headerAction:(0,Q.jsx)(b,{size:`xs`,variant:`outline`,disabled:r,onClick:()=>o(!0),children:`Add passkey`}),children:[(0,Q.jsx)(_e,{title:`Passkeys on this account`,description:`A passkey is the strongest way in. Add one for every device you sign in from, and keep at least two so losing a device does not lock you out.`,status:n?`This list could not be refreshed and may be out of date.`:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{children:`${String(C.length)} usable ${C.length===1?`passkey`:`passkeys`}`}),w>0?(0,Q.jsx)(`span`,{children:` · ${String(w)} synced to a password manager`}):null]})}),t&&e.length===0?(0,Q.jsx)(_e,{title:`Loading passkeys…`,description:`Reading the credentials on file.`}):null,!t&&e.length===0?(0,Q.jsx)(_e,{title:`No passkeys yet`,description:`Add one now — without a passkey you can only get back in through a fallback credential.`}):null,T.map(e=>{let t=pe(e),n=L(e),i=xe(e.createdAt),a=xe(e.lastUsedAt);return(0,Q.jsx)(_e,{title:(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[Y(e),t?(0,Q.jsx)(P,{variant:`error`,size:`sm`,children:`Revoked`}):null]}),description:t?`Revoked${e.revocationReasonCode?` — ${e.revocationReasonCode}`:``}. This credential can no longer sign in.`:n??`The Hub did not report whether this credential is backed up.`,status:[i?`Added ${i}`:null,a?`Last used ${a}`:`Never used`].filter(e=>e!==null).join(` · `),control:t?null:(0,Q.jsx)(b,{size:`xs`,variant:`destructive-outline`,"aria-label":`Revoke ${Y(e)}`,disabled:r,onClick:()=>h(e),children:(0,Q.jsxs)($,{busy:S&&g===e.id,children:[(0,Q.jsx)(m,{"aria-hidden":!0}),`Revoke`]})})},e.id)}),(0,Q.jsx)(k,{open:a,onOpenChange:e=>{if(e){o(!0);return}r||A()},children:(0,Q.jsx)(ne,{className:`max-w-md`,children:(0,Q.jsxs)(`form`,{onSubmit:e=>void I(e),children:[(0,Q.jsxs)(E,{children:[(0,Q.jsx)(D,{children:`Add a passkey`}),(0,Q.jsx)(te,{children:`Your browser will ask you to create a passkey for this account. Adding one replaces the current Hub session with a fresh one.`})]}),(0,Q.jsxs)(O,{className:`space-y-3`,children:[(0,Q.jsx)(se,{htmlFor:`account-passkey-label`,children:`Name (optional)`}),(0,Q.jsx)(v,{id:`account-passkey-label`,value:u,autoComplete:`off`,placeholder:`Work laptop`,disabled:x,className:_,onChange:e=>f(e.target.value)})]}),(0,Q.jsxs)(ee,{children:[(0,Q.jsx)(b,{variant:`outline`,onClick:()=>{l(),A()},children:`Cancel`}),(0,Q.jsx)(b,{type:`submit`,disabled:r,children:(0,Q.jsx)($,{busy:x,children:`Create passkey`})})]})]})})}),(0,Q.jsx)(oe,{open:p!==null,onOpenChange:e=>{r||e||h(null)},children:(0,Q.jsxs)(re,{children:[(0,Q.jsxs)(j,{children:[(0,Q.jsx)(ae,{children:`Revoke this passkey?`}),(0,Q.jsxs)(ie,{children:[C.length===1?`This is the only usable passkey on this account. `:``,p?Y(p):``,` will stop working immediately, on every device it is stored on. This cannot be undone — you would have to enrol the device again.`]})]}),(0,Q.jsxs)(M,{children:[(0,Q.jsx)(N,{render:(0,Q.jsx)(b,{variant:`outline`}),children:`Keep it`}),(0,Q.jsx)(b,{variant:`destructive`,disabled:r,onClick:()=>void R(),children:`Revoke passkey`})]})]})})]})}function Je(e){let t=(0,ye.c)(61),{busy:n,actionStatus:r,enrollment:i,enrolled:a,run:o}=e,[s,l]=(0,Z.useState)(``),[u,d]=(0,Z.useState)(!1),f=r===`enrolling-totp`,m=r===`confirming-totp`,h=r===`revoking-totp`,g;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{l(``),c.dismissTotpEnrollment()},t[0]=g):g=t[0];let y=g,x;t[1]===s?x=t[2]:(x=async e=>{e.preventDefault();let t=H(s);t.length!==0&&(await c.confirmTotpEnrollment({code:t}),l(``))},t[1]=s,t[2]=x);let S=x,C;t[3]===o?C=t[4]:(C=async()=>{d(!1),await o(`revoke-totp`,Xe)},t[3]=o,t[4]=C);let w=C,T;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Q.jsx)(p,{"aria-hidden":!0,className:`size-3.5`}),t[5]=T):T=t[5];let A=a===null?`Checking current state…`:a?`On`:`Off`,P;t[6]!==n||t[7]!==a||t[8]!==f||t[9]!==h?(P=a===null?null:a?(0,Q.jsx)(b,{size:`xs`,variant:`destructive-outline`,"aria-label":`Turn off two-factor authentication`,disabled:n,onClick:()=>d(!0),children:(0,Q.jsx)($,{busy:h,children:`Turn off`})}):(0,Q.jsx)(b,{size:`xs`,variant:`outline`,disabled:n,onClick:Ye,children:(0,Q.jsx)($,{busy:f,children:`Set up`})}),t[6]=n,t[7]=a,t[8]=f,t[9]=h,t[10]=P):P=t[10];let F;t[11]!==A||t[12]!==P?(F=(0,Q.jsx)(_e,{title:`Authenticator app`,description:`A six-digit code from an authenticator app, required whenever you change credentials from a session that was not started with a passkey. Signing in with a passkey never asks for one.`,status:A,control:P}),t[11]=A,t[12]=P,t[13]=F):F=t[13];let I=i!==null,L;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>{e||y()},t[14]=L):L=t[14];let R;t[15]===S?R=t[16]:(R=e=>void S(e),t[15]=S,t[16]=R);let z;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,Q.jsxs)(E,{children:[(0,Q.jsx)(D,{children:`Set up two-factor authentication`}),(0,Q.jsx)(te,{children:`Scan this with your authenticator app, then enter the code it shows. This is the only time the key is displayed.`})]}),t[17]=z):z=t[17];let ce;t[18]===i?ce=t[19]:(ce=i?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{className:`flex justify-center rounded-xl border border-border bg-white p-4`,children:(0,Q.jsx)(ve,{value:i.provisioningUri,size:168,level:`M`,marginSize:1,title:`Two-factor setup code`})}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Can't scan? Enter this key manually:`}),(0,Q.jsx)(`p`,{"aria-label":`Two-factor setup key`,className:`rounded-lg border border-border bg-background px-3 py-2 font-mono text-sm break-all`,children:i.secretBase32})]})]}):null,t[18]=i,t[19]=ce);let le;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,Q.jsx)(se,{htmlFor:`account-totp-confirm`,children:`Code from your app`}),t[20]=le):le=t[20];let B;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(B=e=>l(H(e.target.value)),t[21]=B):B=t[21];let V;t[22]!==s||t[23]!==m?(V=(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[le,(0,Q.jsx)(v,{id:`account-totp-confirm`,value:s,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:16,disabled:m,className:_,onChange:B})]}),t[22]=s,t[23]=m,t[24]=V):V=t[24];let U;t[25]!==ce||t[26]!==V?(U=(0,Q.jsxs)(O,{className:`space-y-4`,children:[ce,V]}),t[25]=ce,t[26]=V,t[27]=U):U=t[27];let W;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,Q.jsx)(b,{variant:`outline`,onClick:y,children:`Cancel`}),t[28]=W):W=t[28];let G;t[29]!==n||t[30]!==s?(G=n||!ue(s),t[29]=n,t[30]=s,t[31]=G):G=t[31];let K;t[32]===m?K=t[33]:(K=(0,Q.jsx)($,{busy:m,children:`Turn on`}),t[32]=m,t[33]=K);let q;t[34]!==G||t[35]!==K?(q=(0,Q.jsxs)(ee,{children:[W,(0,Q.jsx)(b,{type:`submit`,disabled:G,children:K})]}),t[34]=G,t[35]=K,t[36]=q):q=t[36];let de;t[37]!==R||t[38]!==U||t[39]!==q?(de=(0,Q.jsx)(ne,{className:`max-w-md`,children:(0,Q.jsxs)(`form`,{onSubmit:R,children:[z,U,q]})}),t[37]=R,t[38]=U,t[39]=q,t[40]=de):de=t[40];let J;t[41]!==de||t[42]!==I?(J=(0,Q.jsx)(k,{open:I,onOpenChange:L,children:de}),t[41]=de,t[42]=I,t[43]=J):J=t[43];let fe;t[44]===n?fe=t[45]:(fe=e=>{n||d(e)},t[44]=n,t[45]=fe);let pe;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Q.jsxs)(j,{children:[(0,Q.jsx)(ae,{children:`Remove two-factor authentication?`}),(0,Q.jsx)(ie,{children:`Password, recovery-code, and emailed-link sign-ins will no longer need a code from your authenticator app. You can set it up again at any time.`})]}),t[46]=pe):pe=t[46];let Y;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,Q.jsx)(N,{render:(0,Q.jsx)(b,{variant:`outline`}),children:`Keep it on`}),t[47]=Y):Y=t[47];let X;t[48]===w?X=t[49]:(X=()=>void w(),t[48]=w,t[49]=X);let me;t[50]!==n||t[51]!==X?(me=(0,Q.jsxs)(re,{children:[pe,(0,Q.jsxs)(M,{children:[Y,(0,Q.jsx)(b,{variant:`destructive`,disabled:n,onClick:X,children:`Remove two-factor`})]})]}),t[50]=n,t[51]=X,t[52]=me):me=t[52];let ge;t[53]!==u||t[54]!==fe||t[55]!==me?(ge=(0,Q.jsx)(oe,{open:u,onOpenChange:fe,children:me}),t[53]=u,t[54]=fe,t[55]=me,t[56]=ge):ge=t[56];let be;return t[57]!==J||t[58]!==ge||t[59]!==F?(be=(0,Q.jsxs)(he,{title:`Two-factor authentication`,icon:T,children:[F,J,ge]}),t[57]=J,t[58]=ge,t[59]=F,t[60]=be):be=t[60],be}function Ye(){c.beginTotpEnrollment()}function Xe(e){return c.revokeTotp(e)}function Ze(e){let t=(0,ye.c)(86),{busy:n,actionStatus:r,security:i,run:a,cancel:o}=e,[s,l]=(0,Z.useState)(!1),[u,f]=(0,Z.useState)(``),[p,m]=(0,Z.useState)(``),[h,g]=(0,Z.useState)(!1),[y,x]=(0,Z.useState)(!1),S=r===`setting-password`,C=r===`removing-password`,w;t[0]!==p||t[1]!==u?(w=me(u,p),t[0]=p,t[1]=u,t[2]=w):w=t[2];let T=w,A;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>{f(``),m(``),g(!1)},t[3]=A):A=t[3];let P=A,F;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(F=()=>{P(),l(!1)},t[4]=F):F=t[4];let I=F,L;t[5]===o?L=t[6]:(L=()=>{o(),I()},t[5]=o,t[6]=L);let R=L,z;t[7]!==T||t[8]!==u||t[9]!==a?(z=async e=>{e.preventDefault(),g(!0),!T&&await a(`set-password`,e=>c.setPassword({password:u,...e}),{onCommitted:I,onAbandoned:I})},t[7]=T,t[8]=u,t[9]=a,t[10]=z):z=t[10];let ce=z,le;t[11]===a?le=t[12]:(le=async()=>{x(!1),await a(`remove-password`,Qe)},t[11]=a,t[12]=le);let B=le,V;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,Q.jsx)(d,{"aria-hidden":!0,className:`size-3.5`}),t[13]=V):V=t[13];let H=i===null?`Checking current state…`:i.passwordConfigured?`Set`:`Not set`,U;t[14]!==n||t[15]!==C||t[16]!==i||t[17]!==S?(U=i===null?null:(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Q.jsx)(b,{size:`xs`,variant:`outline`,disabled:n,onClick:()=>l(!0),children:(0,Q.jsx)($,{busy:S,children:i.passwordConfigured?`Change`:`Set password`})}),i.passwordConfigured?(0,Q.jsx)(b,{size:`xs`,variant:`destructive-outline`,"aria-label":`Delete the fallback password`,disabled:n,onClick:()=>x(!0),children:(0,Q.jsx)($,{busy:C,children:`Remove`})}):null]}),t[14]=n,t[15]=C,t[16]=i,t[17]=S,t[18]=U):U=t[18];let W;t[19]!==H||t[20]!==U?(W=(0,Q.jsx)(_e,{title:`Fallback password`,description:`A password is a fallback, not an equal of a passkey: it can be phished and reused, and a session started with one has to prove itself again before changing credentials. Keep a passkey as your normal way in.`,status:H,control:U}),t[19]=H,t[20]=U,t[21]=W):W=t[21];let G=i===null?void 0:i.email,K=i?.emailDeliveryConfigured,q;t[22]!==r||t[23]!==n||t[24]!==a||t[25]!==G||t[26]!==K?(q=(0,Q.jsx)($e,{busy:n,actionStatus:r,email:G,deliveryConfigured:K,run:a}),t[22]=r,t[23]=n,t[24]=a,t[25]=G,t[26]=K,t[27]=q):q=t[27];let ue;t[28]===R?ue=t[29]:(ue=e=>{if(e){l(!0);return}R()},t[28]=R,t[29]=ue);let de;t[30]===ce?de=t[31]:(de=e=>void ce(e),t[30]=ce,t[31]=de);let J;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,Q.jsxs)(E,{children:[(0,Q.jsx)(D,{children:`Set a fallback password`}),(0,Q.jsx)(te,{children:`This replaces any password already on the account. The Hub rejects passwords that have appeared in a known breach.`})]}),t[32]=J):J=t[32];let fe;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(fe=(0,Q.jsx)(se,{htmlFor:`account-password`,children:`New password`}),t[33]=fe):fe=t[33];let pe;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(pe=e=>f(e.target.value),t[34]=pe):pe=t[34];let Y;t[35]!==u||t[36]!==S?(Y=(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[fe,(0,Q.jsx)(v,{id:`account-password`,type:`password`,value:u,autoComplete:`new-password`,maxLength:256,disabled:S,className:_,onChange:pe})]}),t[35]=u,t[36]=S,t[37]=Y):Y=t[37];let X;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,Q.jsx)(se,{htmlFor:`account-password-confirm`,children:`Confirm password`}),t[38]=X):X=t[38];let ge;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(ge=e=>m(e.target.value),t[39]=ge):ge=t[39];let ve;t[40]!==p||t[41]!==S?(ve=(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[X,(0,Q.jsx)(v,{id:`account-password-confirm`,type:`password`,value:p,autoComplete:`new-password`,maxLength:256,disabled:S,className:_,onChange:ge})]}),t[40]=p,t[41]=S,t[42]=ve):ve=t[42];let be;t[43]!==T||t[44]!==h?(be=h&&T?(0,Q.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive-foreground`,children:T}):null,t[43]=T,t[44]=h,t[45]=be):be=t[45];let xe;t[46]!==Y||t[47]!==ve||t[48]!==be?(xe=(0,Q.jsxs)(O,{className:`space-y-3`,children:[Y,ve,be]}),t[46]=Y,t[47]=ve,t[48]=be,t[49]=xe):xe=t[49];let Se;t[50]===R?Se=t[51]:(Se=(0,Q.jsx)(b,{variant:`outline`,onClick:R,children:`Cancel`}),t[50]=R,t[51]=Se);let Ce;t[52]===S?Ce=t[53]:(Ce=(0,Q.jsx)($,{busy:S,children:`Save password`}),t[52]=S,t[53]=Ce);let we;t[54]!==n||t[55]!==Ce?(we=(0,Q.jsx)(b,{type:`submit`,disabled:n,children:Ce}),t[54]=n,t[55]=Ce,t[56]=we):we=t[56];let Te;t[57]!==Se||t[58]!==we?(Te=(0,Q.jsxs)(ee,{children:[Se,we]}),t[57]=Se,t[58]=we,t[59]=Te):Te=t[59];let Ee;t[60]!==de||t[61]!==xe||t[62]!==Te?(Ee=(0,Q.jsx)(ne,{className:`max-w-md`,children:(0,Q.jsxs)(`form`,{onSubmit:de,children:[J,xe,Te]})}),t[60]=de,t[61]=xe,t[62]=Te,t[63]=Ee):Ee=t[63];let De;t[64]!==s||t[65]!==ue||t[66]!==Ee?(De=(0,Q.jsx)(k,{open:s,onOpenChange:ue,children:Ee}),t[64]=s,t[65]=ue,t[66]=Ee,t[67]=De):De=t[67];let Oe;t[68]===n?Oe=t[69]:(Oe=e=>{n||x(e)},t[68]=n,t[69]=Oe);let ke;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,Q.jsxs)(j,{children:[(0,Q.jsx)(ae,{children:`Remove the password?`}),(0,Q.jsx)(ie,{children:`You will no longer be able to sign in with a password. Make sure you still have a passkey, or recovery codes you have saved.`})]}),t[70]=ke):ke=t[70];let Ae;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,Q.jsx)(N,{render:(0,Q.jsx)(b,{variant:`outline`}),children:`Keep it`}),t[71]=Ae):Ae=t[71];let je;t[72]===B?je=t[73]:(je=()=>void B(),t[72]=B,t[73]=je);let Me;t[74]!==n||t[75]!==je?(Me=(0,Q.jsxs)(re,{children:[ke,(0,Q.jsxs)(M,{children:[Ae,(0,Q.jsx)(b,{variant:`destructive`,disabled:n,onClick:je,children:`Remove password`})]})]}),t[74]=n,t[75]=je,t[76]=Me):Me=t[76];let Ne;t[77]!==y||t[78]!==Oe||t[79]!==Me?(Ne=(0,Q.jsx)(oe,{open:y,onOpenChange:Oe,children:Me}),t[77]=y,t[78]=Oe,t[79]=Me,t[80]=Ne):Ne=t[80];let Pe;return t[81]!==W||t[82]!==q||t[83]!==De||t[84]!==Ne?(Pe=(0,Q.jsxs)(he,{title:`Fallback sign-in`,icon:V,children:[W,q,De,Ne]}),t[81]=W,t[82]=q,t[83]=De,t[84]=Ne,t[85]=Pe):Pe=t[85],Pe}function Qe(e){return c.removePassword(e)}function $e(e){let t=(0,ye.c)(25),{busy:n,actionStatus:r,email:i,deliveryConfigured:a,run:o}=e,[s,l]=(0,Z.useState)(``),[u,d]=(0,Z.useState)(!1),[f,p]=(0,Z.useState)(!1),m=r===`requesting-email-verification`,g;t[0]===s?g=t[1]:(g=J(s),t[0]=s,t[1]=g);let y=g,x;t[2]!==s||t[3]!==y||t[4]!==o?(x=async e=>{e.preventDefault(),d(!0),p(!1),!y&&await o(`request-email-verification`,e=>c.requestEmailVerification({email:s.trim(),...e}),{onCommitted:()=>{p(!0),l(``),d(!1)}})},t[2]=s,t[3]=y,t[4]=o,t[5]=x):x=t[5];let C=x,E;t[6]===a?E=t[7]:(E=a===!1?(0,Q.jsx)(`div`,{className:`border-t border-border/60 px-4 pt-3.5 sm:px-5`,children:(0,Q.jsxs)(T,{variant:`warning`,children:[(0,Q.jsx)(h,{"aria-hidden":!0}),(0,Q.jsx)(S,{children:`No mail will arrive yet`}),(0,Q.jsx)(w,{children:`This Hub has no mail transport configured, so verification messages are generated and discarded. The request below will be accepted and nothing will be delivered until an operator wires one up. Do not rely on email as your way back into the account.`})]})}):null,t[6]=a,t[7]=E);let D=a?`Used for account recovery after verification. The Hub answers the same way whether or not the address is already known, so this never confirms who owns it.`:`Used for account recovery once mail delivery is switched on. The Hub answers the same way whether or not the address is already known, so this never confirms who owns it.`,ee=i===void 0?`Checking current state…`:i===null?`Not set`:`${i.verified?`Verified`:`Verification pending`} · ${i.address}`,O;t[8]!==f||t[9]!==n||t[10]!==i||t[11]!==a||t[12]!==s||t[13]!==y||t[14]!==m||t[15]!==C||t[16]!==u?(O=i===void 0?null:(0,Q.jsxs)(`form`,{className:`pt-3 pb-3.5`,onSubmit:e=>void C(e),children:[(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row`,children:[(0,Q.jsx)(v,{"aria-label":`Email address`,type:`email`,value:s,autoComplete:`email`,placeholder:`you@example.com`,maxLength:254,disabled:m,className:_,onChange:e=>{l(e.target.value),p(!1)}}),(0,Q.jsx)(b,{type:`submit`,size:`sm`,variant:`outline`,disabled:n,className:`shrink-0`,children:(0,Q.jsx)($,{busy:m,children:i===null?`Send verification`:i.verified?`Change email`:`Resend or change`})})]}),u&&y?(0,Q.jsx)(`p`,{role:`alert`,className:`pt-2 text-xs text-destructive-foreground`,children:y}):null,f?(0,Q.jsx)(`p`,{role:`status`,className:`pt-2 text-xs text-muted-foreground`,children:a?`Verification email requested. Check your inbox and spam folder; delivery may take a moment.`:`Request accepted by the Hub. No message will be delivered until a mail transport is configured.`}):null]}),t[8]=f,t[9]=n,t[10]=i,t[11]=a,t[12]=s,t[13]=y,t[14]=m,t[15]=C,t[16]=u,t[17]=O):O=t[17];let te;t[18]!==D||t[19]!==ee||t[20]!==O?(te=(0,Q.jsx)(_e,{title:`Recovery email`,description:D,status:ee,children:O}),t[18]=D,t[19]=ee,t[20]=O,t[21]=te):te=t[21];let ne;return t[22]!==E||t[23]!==te?(ne=(0,Q.jsxs)(Q.Fragment,{children:[E,te]}),t[22]=E,t[23]=te,t[24]=ne):ne=t[24],ne}function et(e){let t=(0,ye.c)(52),{busy:n,actionStatus:r,recoveryCodes:i,run:a}=e,[o,s]=(0,Z.useState)(!1),c=r===`regenerating-recovery-codes`,{copyToClipboard:d,isCopied:p}=x(),m;t[0]===a?m=t[1]:(m=async()=>{s(!1),await a(`regenerate-recovery-codes`,it)},t[0]=a,t[1]=m);let h=m,g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Q.jsx)(f,{"aria-hidden":!0,className:`size-3.5`}),t[2]=g):g=t[2];let _;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>s(!0),t[3]=_):_=t[3];let v;t[4]===c?v=t[5]:(v=(0,Q.jsx)($,{busy:c,children:`Generate new codes`}),t[4]=c,t[5]=v);let y;t[6]!==n||t[7]!==v?(y=(0,Q.jsx)(_e,{title:`One-time recovery codes`,description:`Single-use codes that get you back in when you have lost every passkey. They are a last resort, not a substitute for one — anyone holding a code can sign in as you.`,status:`Ryco shows them once and never writes them to browser storage.`,control:(0,Q.jsx)(b,{size:`xs`,variant:`destructive-outline`,disabled:n,onClick:_,children:v})}),t[6]=n,t[7]=v,t[8]=y):y=t[8];let S;t[9]===n?S=t[10]:(S=e=>{n||s(e)},t[9]=n,t[10]=S);let C;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsxs)(j,{children:[(0,Q.jsx)(ae,{children:`Replace your recovery codes?`}),(0,Q.jsx)(ie,{children:`Every code you have already saved stops working immediately. You will get a new set, shown once — if you lose them you will have to generate another set from a session you can still sign in to.`})]}),t[11]=C):C=t[11];let w;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Q.jsx)(N,{render:(0,Q.jsx)(b,{variant:`outline`}),children:`Cancel`}),t[12]=w):w=t[12];let T;t[13]===h?T=t[14]:(T=()=>void h(),t[13]=h,t[14]=T);let A;t[15]!==n||t[16]!==T?(A=(0,Q.jsxs)(re,{children:[C,(0,Q.jsxs)(M,{children:[w,(0,Q.jsx)(b,{variant:`destructive`,disabled:n,onClick:T,children:`Replace codes`})]})]}),t[15]=n,t[16]=T,t[17]=A):A=t[17];let P;t[18]!==o||t[19]!==A||t[20]!==S?(P=(0,Q.jsx)(oe,{open:o,onOpenChange:S,children:A}),t[18]=o,t[19]=A,t[20]=S,t[21]=P):P=t[21];let se=i.length>0,F;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsx)(D,{children:`Save your recovery codes`}),t[22]=F):F=t[22];let I=String(i.length),L;t[23]===I?L=t[24]:(L=(0,Q.jsxs)(E,{children:[F,(0,Q.jsxs)(te,{children:[`Save all `,I,` codes — they are shown once and cannot be retrieved later. Store them somewhere only you can reach — a password manager, or paper somewhere safe.`]})]}),t[23]=I,t[24]=L);let R;t[25]===i?R=t[26]:(R=i.map(nt),t[25]=i,t[26]=R);let z;t[27]===R?z=t[28]:(z=(0,Q.jsx)(O,{children:(0,Q.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:R})}),t[27]=R,t[28]=z);let le;t[29]!==d||t[30]!==i?(le=()=>d(ce(i),void 0),t[29]=d,t[30]=i,t[31]=le):le=t[31];let B;t[32]===p?B=t[33]:(B=p?(0,Q.jsx)(l,{"aria-hidden":!0}):(0,Q.jsx)(u,{"aria-hidden":!0}),t[32]=p,t[33]=B);let V=p?`Copied`:`Copy codes`,H;t[34]!==le||t[35]!==B||t[36]!==V?(H=(0,Q.jsxs)(b,{variant:`outline`,onClick:le,children:[B,V]}),t[34]=le,t[35]=B,t[36]=V,t[37]=H):H=t[37];let U;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Q.jsx)(b,{onClick:tt,children:`I saved the codes`}),t[38]=U):U=t[38];let W;t[39]===H?W=t[40]:(W=(0,Q.jsxs)(ee,{children:[H,U]}),t[39]=H,t[40]=W);let G;t[41]!==L||t[42]!==z||t[43]!==W?(G=(0,Q.jsxs)(ne,{className:`max-w-md`,showCloseButton:!1,children:[L,z,W]}),t[41]=L,t[42]=z,t[43]=W,t[44]=G):G=t[44];let K;t[45]!==se||t[46]!==G?(K=(0,Q.jsx)(k,{open:se,disablePointerDismissal:!0,onOpenChange:rt,children:G}),t[45]=se,t[46]=G,t[47]=K):K=t[47];let q;return t[48]!==P||t[49]!==K||t[50]!==y?(q=(0,Q.jsxs)(he,{title:`Recovery codes`,icon:g,children:[y,P,K]}),t[48]=P,t[49]=K,t[50]=y,t[51]=q):q=t[51],q}function tt(){return c.dismissRecoveryCodes()}function nt(e){return(0,Q.jsx)(`li`,{children:e},e)}function rt(e,t){e||t.cancel()}function it(e){return c.regenerateRecoveryCodes(e)}function at(e){let t=(0,ye.c)(45),{pending:n,attempts:r,code:i,onCodeChange:a,onSubmit:o,onCancel:s,busy:c}=e,l=n!==null,u;t[0]===s?u=t[1]:(u=e=>{e||s()},t[0]=s,t[1]=u);let d;t[2]===o?d=t[3]:(d=e=>{e.preventDefault(),o()},t[2]=o,t[3]=d);let f;t[4]===n?f=t[5]:(f=n?I(n.action):``,t[4]=n,t[5]=f);let p;t[6]===f?p=t[7]:(p=(0,Q.jsx)(D,{children:f}),t[6]=f,t[7]=p);let m=n?.inferred??!1,h;t[8]!==r||t[9]!==m?(h=X(r,m),t[8]=r,t[9]=m,t[10]=h):h=t[10];let g;t[11]===h?g=t[12]:(g=(0,Q.jsx)(te,{children:h}),t[11]=h,t[12]=g);let y;t[13]!==p||t[14]!==g?(y=(0,Q.jsxs)(E,{children:[p,g]}),t[13]=p,t[14]=g,t[15]=y):y=t[15];let x;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Q.jsx)(se,{htmlFor:`account-step-up-code`,children:`Authenticator code`}),t[16]=x):x=t[16];let S;t[17]===a?S=t[18]:(S=e=>a(H(e.target.value)),t[17]=a,t[18]=S);let C;t[19]!==c||t[20]!==i||t[21]!==S?(C=(0,Q.jsxs)(O,{className:`space-y-2`,children:[x,(0,Q.jsx)(v,{id:`account-step-up-code`,value:i,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:16,disabled:c,className:_,onChange:S})]}),t[19]=c,t[20]=i,t[21]=S,t[22]=C):C=t[22];let w;t[23]===s?w=t[24]:(w=(0,Q.jsx)(b,{variant:`outline`,onClick:s,children:`Cancel`}),t[23]=s,t[24]=w);let T;t[25]!==c||t[26]!==i?(T=c||!ue(i),t[25]=c,t[26]=i,t[27]=T):T=t[27];let A;t[28]===c?A=t[29]:(A=(0,Q.jsx)($,{busy:c,children:`Confirm code`}),t[28]=c,t[29]=A);let j;t[30]!==T||t[31]!==A?(j=(0,Q.jsx)(b,{type:`submit`,disabled:T,children:A}),t[30]=T,t[31]=A,t[32]=j):j=t[32];let M;t[33]!==w||t[34]!==j?(M=(0,Q.jsxs)(ee,{children:[w,j]}),t[33]=w,t[34]=j,t[35]=M):M=t[35];let N;t[36]!==C||t[37]!==M||t[38]!==d||t[39]!==y?(N=(0,Q.jsx)(ne,{className:`max-w-sm`,children:(0,Q.jsxs)(`form`,{onSubmit:d,children:[y,C,M]})}),t[36]=C,t[37]=M,t[38]=d,t[39]=y,t[40]=N):N=t[40];let re;return t[41]!==l||t[42]!==N||t[43]!==u?(re=(0,Q.jsx)(k,{open:l,onOpenChange:u,children:N}),t[41]=l,t[42]=N,t[43]=u,t[44]=re):re=t[44],re}export{Te as AccountSettingsPanel};
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{F as r,M as i,N as a}from"./runtime-CPM0EUhb.js";import{It as o}from"./composerDraftStore-TYv9j3vY.js";import{_ as s,o as c}from"./authorization-D8lJzXTE.js";import{n as l}from"./loader-circle-CrtHFAvM.js";import{t as u}from"./copy-UQjKGt7t.js";import{t as d}from"./key-round-CacMputS.js";import{t as f}from"./refresh-cw-DopCMrtR.js";import{t as p}from"./shield-check-dQ-4cMKk.js";import{t as m}from"./trash-2-CM1zXPGb.js";import{t as h}from"./triangle-alert-RL_T3KLo.js";import{t as g}from"./user-round-Cpzx8pSw.js";import{n as _,t as v}from"./input-BZz4eLRl.js";import{u as y}from"./Icons-BEtED8P8.js";import{t as b}from"./button-DG8WqjNn.js";import{t as x}from"./useCopyToClipboard-BTpWxumf.js";import{i as S,n as C,r as w,t as T}from"./alert-DomE7dAt.js";import{a as E,c as D,i as ee,o as O,r as te,s as ne,t as k}from"./dialog-BNmFD6Nh.js";import{t as A}from"./spinner-ClQu8SdC.js";import{a as j,i as M,n as N,o as re,r as ie,s as ae,t as oe}from"./alert-dialog-9Jyh0e8u.js";import{t as P}from"./badge-w43sx8eF.js";import{t as se}from"./label-DZf4lbNF.js";import{C as F,S as I,_ as L,a as R,b as z,c as ce,d as le,f as B,g as V,h as H,i as U,l as W,m as G,n as K,o as q,p as ue,r as de,s as J,t as fe,u as pe,v as Y,x as X,y as me}from"./ExternalIdentityWeb.logic-Bn1HigS9.js";import{i as he,n as ge,r as _e}from"./settingsLayout-CHJT5wtl.js";import{t as ve}from"./qr-code-Ie92aZvE.js";var ye=n(),Z=e(t(),1),Q=o(),be=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function xe(e){return e===null||!Number.isFinite(e)?null:be.format(new Date(e))}function Se(){let e=(0,ye.c)(15),[t,n]=(0,Z.useState)(null),[r,i]=(0,Z.useState)(0),[a,o]=(0,Z.useState)(``),[s,l]=(0,Z.useState)(!1),u=(0,Z.useRef)(0),d;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{n(null),i(0),o(``)},e[0]=d):d=e[0];let f=d,p;e[1]===t?.options?p=e[2]:(p=()=>{u.current+=1,c.cancelAccountAction(),t?.options?.onAbandoned?.(),l(!1),f()},e[1]=t?.options,e[2]=p);let m=p,h;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=async(e,t,r)=>{let a=u.current+=1;l(!1);let s=await t({});if(u.current===a){if(B(s)){o(``),i(0),n({action:e,run:t,options:r,inferred:s.inferredErrorCode===!0});return}s.status===`committed`&&r?.onCommitted?.()}},e[3]=h):h=e[3];let g=h,_;e[4]!==t||e[5]!==a||e[6]!==r?(_=async()=>{if(!t)return;let e=H(a);if(e.length===0)return;let n=u.current+=1,s=await t.run({totpCode:e});if(u.current===n){if(B(s)){let e=r+1;if(z(s,e)){i(e),o(``);return}l(!0),t.options?.onAbandoned?.(),f();return}s.status===`committed`&&t.options?.onCommitted?.(),f()}},e[4]=t,e[5]=a,e[6]=r,e[7]=_):_=e[7];let v=_,y;return e[8]!==m||e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==s||e[13]!==v?(y={run:g,cancel:m,stepUp:t,stepUpAttempts:r,stepUpCode:a,stepUpUnresolved:s,setStepUpCode:o,submitStepUp:v},e[8]=m,e[9]=t,e[10]=a,e[11]=r,e[12]=s,e[13]=v,e[14]=y):y=e[14],y}function Ce(){let e=(0,ye.c)(1),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,Z.useEffect)(we,t)}function we(){return c.leaseRecoveryCodeDisplay()}function $(e){let t=(0,ye.c)(3),{busy:n,children:r}=e,i;return t[0]!==n||t[1]!==r?(i=n?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(A,{className:`size-3.5`}),r]}):(0,Q.jsx)(Q.Fragment,{children:r}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function Te(){let e=(0,ye.c)(99),t=a(We),n=a(Ue),[o,c]=(0,Z.useState)(!1),l=i(He),u=i(Ve),d=i(Be),f=i(ze),m=i(Re),_=i(Le),v=i(Ie),y=i(Fe),x=a(Pe),E=a(Ne),[D,ee]=(0,Z.useState)(!1),[O,te]=(0,Z.useState)(null),ne=(0,Z.useRef)(!1),k=Se(),A=k.run;Ce();let j=_!==`idle`,M;e[0]===m?M=e[1]:(M=de(m),e[0]=m,e[1]=M);let N=M,re;e[2]===d?.externalIdentities?re=e[3]:(re=d?.externalIdentities.find(Me)??null,e[2]=d?.externalIdentities,e[3]=re);let ie=re,ae;e[4]===D?ae=e[5]:(ae=async()=>{if(!D){ee(!0),te(null);try{await fe({intent:`link`,returnTo:`/account/security`,start:je,navigate:Ae})}catch(e){let t=e;te(t instanceof s?t.message:`GitHub connection is temporarily unavailable.`),ee(!1)}}},e[4]=D,e[5]=ae);let oe=ae,P;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(P=[],e[6]=P):P=e[6],(0,Z.useEffect)(ke,P);let se,F;if(e[7]!==t||e[8]!==A?(se=()=>{if(t!==`authenticated`||ne.current)return;ne.current=!0;let e=new AbortController;return r.getPendingExternalIdentity(e.signal).then(e=>{if(e.status===`link`)return A(`connect-github`,Oe);e.status===`error`&&te(K(e.code))}).catch(De),()=>e.abort()},F=[t,A],e[7]=t,e[8]=A,e[9]=se,e[10]=F):(se=e[9],F=e[10]),(0,Z.useEffect)(se,F),t!==`authenticated`){let t;return e[11]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsx)(ge,{children:(0,Q.jsxs)(T,{variant:`warning`,children:[(0,Q.jsx)(h,{"aria-hidden":!0}),(0,Q.jsx)(S,{children:`Not signed in`}),(0,Q.jsx)(w,{children:`Sign in to the Hub to manage passkeys, two-factor authentication, and recovery codes.`})]})}),e[11]=t):t=e[11],t}let I;e[12]!==k.stepUp||e[13]!==k.stepUpUnresolved||e[14]!==y||e[15]!==v?(I=k.stepUpUnresolved?U:W(v,y,k.stepUp!==null),e[12]=k.stepUp,e[13]=k.stepUpUnresolved,e[14]=y,e[15]=v,e[16]=I):I=e[16];let L=I,z;e[17]!==k.stepUpUnresolved||e[18]!==y?(z=!k.stepUpUnresolved&&le(y),e[17]=k.stepUpUnresolved,e[18]=y,e[19]=z):z=e[19];let ce=z,B;e[20]!==l||e[21]!==u?(B=R(l,u),e[20]=l,e[21]=u,e[22]=B):B=e[22];let V=B,H;e[23]!==L||e[24]!==ce?(H=L?(0,Q.jsxs)(T,{variant:ce?`info`:`error`,"aria-live":`polite`,children:[(0,Q.jsx)(h,{"aria-hidden":!0}),(0,Q.jsx)(S,{children:ce?`Passkey needed`:`That did not work`}),(0,Q.jsx)(w,{children:L})]}):null,e[23]=L,e[24]=ce,e[25]=H):H=e[25];let G;e[26]===O?G=e[27]:(G=O?(0,Q.jsxs)(T,{variant:`warning`,"aria-live":`polite`,children:[(0,Q.jsx)(h,{"aria-hidden":!0}),(0,Q.jsx)(S,{children:`GitHub connection did not complete`}),(0,Q.jsx)(w,{children:O})]}):null,e[26]=O,e[27]=G);let q;e[28]!==d||e[29]!==f?(q=d===null&&f!==`stale`?(0,Q.jsxs)(T,{variant:`info`,"aria-live":`polite`,children:[(0,Q.jsx)(p,{"aria-hidden":!0}),(0,Q.jsx)(S,{children:`Checking account security`}),(0,Q.jsx)(w,{children:`Reading which fallback sign-in methods are configured on this Hub.`})]}):null,e[28]=d,e[29]=f,e[30]=q):q=e[30];let ue;e[31]!==j||e[32]!==d||e[33]!==f?(ue=f===`stale`?(0,Q.jsxs)(T,{variant:`warning`,"aria-live":`polite`,children:[(0,Q.jsx)(h,{"aria-hidden":!0}),(0,Q.jsx)(S,{children:d===null?`Account security unavailable`:`Account security may be outdated`}),(0,Q.jsx)(w,{children:d===null?`Ryco could not read the current password, authenticator, and email state.`:`These controls use the last state Ryco successfully read from the Hub.`}),(0,Q.jsx)(C,{children:(0,Q.jsx)(b,{size:`xs`,variant:`outline`,disabled:j,onClick:Ee,children:`Retry`})})]}):null,e[31]=j,e[32]=d,e[33]=f,e[34]=ue):ue=e[34];let J;e[35]!==j||e[36]!==V?(J=V?(0,Q.jsxs)(T,{variant:V.variant,"aria-live":`polite`,children:[(0,Q.jsx)(h,{"aria-hidden":!0}),(0,Q.jsx)(S,{children:V.title}),(0,Q.jsx)(w,{children:V.description}),(0,Q.jsx)(C,{children:(0,Q.jsx)(b,{size:`xs`,variant:`outline`,disabled:j,onClick:()=>c(!0),children:V.actionLabel})})]}):null,e[35]=j,e[36]=V,e[37]=J):J=e[37];let pe;e[38]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Q.jsx)(g,{"aria-hidden":!0,className:`size-3.5`}),e[38]=pe):pe=e[38];let Y=n?.displayName??`Signed in`,X;e[39]===n?X=e[40]:(X=n?`${n.role} · joined ${xe(n.createdAt)??`unknown`}`:null,e[39]=n,e[40]=X);let me;e[41]!==Y||e[42]!==X?(me=(0,Q.jsx)(he,{title:`Account`,icon:pe,children:(0,Q.jsx)(_e,{title:Y,description:`The Hub account these credentials belong to.`,status:X})}),e[41]=Y,e[42]=X,e[43]=me):me=e[43];let ve;e[44]!==_||e[45]!==j||e[46]!==D||e[47]!==ie||e[48]!==N?.link||e[49]!==A||e[50]!==oe?(ve=ie||N?.link?(0,Q.jsx)(Ge,{identity:ie,actionsAvailable:N?.link===!0,busy:j||D,actionStatus:_,onConnect:()=>void oe(),run:A}):null,e[44]=_,e[45]=j,e[46]=D,e[47]=ie,e[48]=N?.link,e[49]=A,e[50]=oe,e[51]=ve):ve=e[51];let be=u===`loading`,we=u===`stale`,$;e[52]!==k.cancel||e[53]!==k.run||e[54]!==_||e[55]!==o||e[56]!==j||e[57]!==l||e[58]!==be||e[59]!==we?($=(0,Q.jsx)(qe,{passkeys:l,loading:be,stale:we,busy:j,actionStatus:_,addOpen:o,setAddOpen:c,run:k.run,cancel:k.cancel}),e[52]=k.cancel,e[53]=k.run,e[54]=_,e[55]=o,e[56]=j,e[57]=l,e[58]=be,e[59]=we,e[60]=$):$=e[60];let Te=d?.totpEnrolled??null,Ke;e[61]!==k.run||e[62]!==_||e[63]!==j||e[64]!==Te||e[65]!==E?(Ke=(0,Q.jsx)(Je,{busy:j,actionStatus:_,enrollment:E,enrolled:Te,run:k.run}),e[61]=k.run,e[62]=_,e[63]=j,e[64]=Te,e[65]=E,e[66]=Ke):Ke=e[66];let Ye;e[67]!==k.run||e[68]!==_||e[69]!==j||e[70]!==x?(Ye=(0,Q.jsx)(et,{busy:j,actionStatus:_,recoveryCodes:x,run:k.run}),e[67]=k.run,e[68]=_,e[69]=j,e[70]=x,e[71]=Ye):Ye=e[71];let Xe;e[72]!==k.cancel||e[73]!==k.run||e[74]!==_||e[75]!==j||e[76]!==d?(Xe=(0,Q.jsx)(Ze,{busy:j,actionStatus:_,security:d,run:k.run,cancel:k.cancel}),e[72]=k.cancel,e[73]=k.run,e[74]=_,e[75]=j,e[76]=d,e[77]=Xe):Xe=e[77];let Qe;e[78]!==k.cancel||e[79]!==k.setStepUpCode||e[80]!==k.stepUp||e[81]!==k.stepUpAttempts||e[82]!==k.stepUpCode||e[83]!==k.submitStepUp||e[84]!==j?(Qe=(0,Q.jsx)(at,{pending:k.stepUp,attempts:k.stepUpAttempts,code:k.stepUpCode,onCodeChange:k.setStepUpCode,onSubmit:k.submitStepUp,onCancel:k.cancel,busy:j}),e[78]=k.cancel,e[79]=k.setStepUpCode,e[80]=k.stepUp,e[81]=k.stepUpAttempts,e[82]=k.stepUpCode,e[83]=k.submitStepUp,e[84]=j,e[85]=Qe):Qe=e[85];let $e;return e[86]!==G||e[87]!==q||e[88]!==ue||e[89]!==J||e[90]!==me||e[91]!==ve||e[92]!==$||e[93]!==Ke||e[94]!==Ye||e[95]!==Xe||e[96]!==Qe||e[97]!==H?($e=(0,Q.jsxs)(ge,{children:[H,G,q,ue,J,me,ve,$,Ke,Ye,Xe,Qe]}),e[86]=G,e[87]=q,e[88]=ue,e[89]=J,e[90]=me,e[91]=ve,e[92]=$,e[93]=Ke,e[94]=Ye,e[95]=Xe,e[96]=Qe,e[97]=H,e[98]=$e):$e=e[98],$e}function Ee(){c.refreshAccountSecurity({force:!0})}function De(){}function Oe(e){return c.finishBrowserExternalIdentityConnection(`github`,e)}function ke(){c.refreshPasskeys(),c.refreshAccountSecurity(),c.refreshExternalIdentityConfiguration()}function Ae(e){return window.location.assign(e)}function je(e){return r.startExternalIdentityAuthorization(e)}function Me(e){return e.provider===`github`}function Ne(e){return e.totpEnrollment??null}function Pe(e){return e.recoveryCodes}function Fe(e){return e.errorCode??null}function Ie(e){return e.errorMessage}function Le(e){return e.actionStatus}function Re(e){return e.externalIdentityConfiguration}function ze(e){return e.securityStatus}function Be(e){return e.security}function Ve(e){return e.passkeysStatus}function He(e){return e.passkeys}function Ue(e){return e.account}function We(e){return e.accountStatus}function Ge(e){let t=(0,ye.c)(33),{identity:n,actionsAvailable:r,busy:i,actionStatus:a,onConnect:o,run:s}=e,[c,l]=(0,Z.useState)(!1),u=a===`connecting-external-identity`,d=a===`disconnecting-external-identity`,f;t[0]===s?f=t[1]:(f=async()=>{await s(`disconnect-github`,Ke,{onCommitted:()=>l(!1)})},t[0]=s,t[1]=f);let p=f,m;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Q.jsx)(y,{"aria-hidden":!0,className:`size-3.5`}),t[2]=m):m=t[2];let h=n?`GitHub · @${n.login}`:`GitHub`,g=n?`Use this GitHub identity to sign in to Ryco. Repository access remains separate.`:`Connect GitHub as another way to sign in. Ryco requests no repository access.`,_;t[3]===n?_=t[4]:(_=n?`Connected ${xe(n.connectedAt)??`at an unknown time`}${n.lastUsedAt===null?``:` · last used ${xe(n.lastUsedAt)??`at an unknown time`}`}`:null,t[3]=n,t[4]=_);let v;t[5]!==r||t[6]!==i||t[7]!==u||t[8]!==d||t[9]!==n||t[10]!==o?(v=r?n?(0,Q.jsx)(b,{size:`sm`,variant:`outline`,disabled:i,onClick:()=>l(!0),children:(0,Q.jsx)($,{busy:d,children:`Disconnect`})}):(0,Q.jsx)(b,{size:`sm`,variant:`outline`,disabled:i,onClick:o,children:(0,Q.jsx)($,{busy:u,children:`Connect GitHub`})}):null,t[5]=r,t[6]=i,t[7]=u,t[8]=d,t[9]=n,t[10]=o,t[11]=v):v=t[11];let x;t[12]!==h||t[13]!==g||t[14]!==_||t[15]!==v?(x=(0,Q.jsx)(_e,{title:h,description:g,status:_,control:v}),t[12]=h,t[13]=g,t[14]=_,t[15]=v,t[16]=x):x=t[16];let S;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Q.jsxs)(j,{children:[(0,Q.jsx)(ae,{children:`Disconnect GitHub?`}),(0,Q.jsx)(ie,{children:`You will no longer be able to sign in with GitHub. Ryco refuses this change if GitHub is your only remaining sign-in method.`})]}),t[17]=S):S=t[17];let C;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(N,{render:(0,Q.jsx)(b,{variant:`outline`}),children:`Cancel`}),t[18]=C):C=t[18];let w;t[19]===p?w=t[20]:(w=()=>void p(),t[19]=p,t[20]=w);let T;t[21]===d?T=t[22]:(T=(0,Q.jsx)($,{busy:d,children:`Disconnect GitHub`}),t[21]=d,t[22]=T);let E;t[23]!==i||t[24]!==w||t[25]!==T?(E=(0,Q.jsxs)(re,{children:[S,(0,Q.jsxs)(M,{children:[C,(0,Q.jsx)(b,{disabled:i,onClick:w,children:T})]})]}),t[23]=i,t[24]=w,t[25]=T,t[26]=E):E=t[26];let D;t[27]!==c||t[28]!==E?(D=(0,Q.jsx)(oe,{open:c,onOpenChange:l,children:E}),t[27]=c,t[28]=E,t[29]=D):D=t[29];let ee;return t[30]!==D||t[31]!==x?(ee=(0,Q.jsxs)(he,{title:`Connected accounts`,icon:m,children:[x,D]}),t[30]=D,t[31]=x,t[32]=ee):ee=t[32],ee}function Ke(e){return c.disconnectExternalIdentity(`github`,e)}function qe({passkeys:e,loading:t,stale:n,busy:r,actionStatus:i,addOpen:a,setAddOpen:o,run:s,cancel:l}){let[u,f]=(0,Z.useState)(``),[p,h]=(0,Z.useState)(null),[g,y]=(0,Z.useState)(null),x=i===`adding-passkey`,S=i===`revoking-passkey`,C=q(e),w=F(e),T=V(e),A=(0,Z.useCallback)(()=>{f(``),o(!1)},[o]),I=async e=>{e.preventDefault();let t=G(u);await s(`add-passkey`,e=>c.addPasskey({passkeyLabel:t,...e}),{onCommitted:A,onAbandoned:A})},R=async()=>{let e=p;if(e){h(null),y(e.id);try{await c.revokePasskey(e.id)}finally{y(null)}}};return(0,Q.jsxs)(he,{title:`Passkeys`,icon:(0,Q.jsx)(d,{"aria-hidden":!0,className:`size-3.5`}),headerAction:(0,Q.jsx)(b,{size:`xs`,variant:`outline`,disabled:r,onClick:()=>o(!0),children:`Add passkey`}),children:[(0,Q.jsx)(_e,{title:`Passkeys on this account`,description:`A passkey is the strongest way in. Add one for every device you sign in from, and keep at least two so losing a device does not lock you out.`,status:n?`This list could not be refreshed and may be out of date.`:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{children:`${String(C.length)} usable ${C.length===1?`passkey`:`passkeys`}`}),w>0?(0,Q.jsx)(`span`,{children:` · ${String(w)} synced to a password manager`}):null]})}),t&&e.length===0?(0,Q.jsx)(_e,{title:`Loading passkeys…`,description:`Reading the credentials on file.`}):null,!t&&e.length===0?(0,Q.jsx)(_e,{title:`No passkeys yet`,description:`Add one now — without a passkey you can only get back in through a fallback credential.`}):null,T.map(e=>{let t=pe(e),n=L(e),i=xe(e.createdAt),a=xe(e.lastUsedAt);return(0,Q.jsx)(_e,{title:(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[Y(e),t?(0,Q.jsx)(P,{variant:`error`,size:`sm`,children:`Revoked`}):null]}),description:t?`Revoked${e.revocationReasonCode?` — ${e.revocationReasonCode}`:``}. This credential can no longer sign in.`:n??`The Hub did not report whether this credential is backed up.`,status:[i?`Added ${i}`:null,a?`Last used ${a}`:`Never used`].filter(e=>e!==null).join(` · `),control:t?null:(0,Q.jsx)(b,{size:`xs`,variant:`destructive-outline`,"aria-label":`Revoke ${Y(e)}`,disabled:r,onClick:()=>h(e),children:(0,Q.jsxs)($,{busy:S&&g===e.id,children:[(0,Q.jsx)(m,{"aria-hidden":!0}),`Revoke`]})})},e.id)}),(0,Q.jsx)(k,{open:a,onOpenChange:e=>{if(e){o(!0);return}r||A()},children:(0,Q.jsx)(ne,{className:`max-w-md`,children:(0,Q.jsxs)(`form`,{onSubmit:e=>void I(e),children:[(0,Q.jsxs)(E,{children:[(0,Q.jsx)(D,{children:`Add a passkey`}),(0,Q.jsx)(te,{children:`Your browser will ask you to create a passkey for this account. Adding one replaces the current Hub session with a fresh one.`})]}),(0,Q.jsxs)(O,{className:`space-y-3`,children:[(0,Q.jsx)(se,{htmlFor:`account-passkey-label`,children:`Name (optional)`}),(0,Q.jsx)(v,{id:`account-passkey-label`,value:u,autoComplete:`off`,placeholder:`Work laptop`,disabled:x,className:_,onChange:e=>f(e.target.value)})]}),(0,Q.jsxs)(ee,{children:[(0,Q.jsx)(b,{variant:`outline`,onClick:()=>{l(),A()},children:`Cancel`}),(0,Q.jsx)(b,{type:`submit`,disabled:r,children:(0,Q.jsx)($,{busy:x,children:`Create passkey`})})]})]})})}),(0,Q.jsx)(oe,{open:p!==null,onOpenChange:e=>{r||e||h(null)},children:(0,Q.jsxs)(re,{children:[(0,Q.jsxs)(j,{children:[(0,Q.jsx)(ae,{children:`Revoke this passkey?`}),(0,Q.jsxs)(ie,{children:[C.length===1?`This is the only usable passkey on this account. `:``,p?Y(p):``,` will stop working immediately, on every device it is stored on. This cannot be undone — you would have to enrol the device again.`]})]}),(0,Q.jsxs)(M,{children:[(0,Q.jsx)(N,{render:(0,Q.jsx)(b,{variant:`outline`}),children:`Keep it`}),(0,Q.jsx)(b,{variant:`destructive`,disabled:r,onClick:()=>void R(),children:`Revoke passkey`})]})]})})]})}function Je(e){let t=(0,ye.c)(61),{busy:n,actionStatus:r,enrollment:i,enrolled:a,run:o}=e,[s,l]=(0,Z.useState)(``),[u,d]=(0,Z.useState)(!1),f=r===`enrolling-totp`,m=r===`confirming-totp`,h=r===`revoking-totp`,g;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{l(``),c.dismissTotpEnrollment()},t[0]=g):g=t[0];let y=g,x;t[1]===s?x=t[2]:(x=async e=>{e.preventDefault();let t=H(s);t.length!==0&&(await c.confirmTotpEnrollment({code:t}),l(``))},t[1]=s,t[2]=x);let S=x,C;t[3]===o?C=t[4]:(C=async()=>{d(!1),await o(`revoke-totp`,Xe)},t[3]=o,t[4]=C);let w=C,T;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Q.jsx)(p,{"aria-hidden":!0,className:`size-3.5`}),t[5]=T):T=t[5];let A=a===null?`Checking current state…`:a?`On`:`Off`,P;t[6]!==n||t[7]!==a||t[8]!==f||t[9]!==h?(P=a===null?null:a?(0,Q.jsx)(b,{size:`xs`,variant:`destructive-outline`,"aria-label":`Turn off two-factor authentication`,disabled:n,onClick:()=>d(!0),children:(0,Q.jsx)($,{busy:h,children:`Turn off`})}):(0,Q.jsx)(b,{size:`xs`,variant:`outline`,disabled:n,onClick:Ye,children:(0,Q.jsx)($,{busy:f,children:`Set up`})}),t[6]=n,t[7]=a,t[8]=f,t[9]=h,t[10]=P):P=t[10];let F;t[11]!==A||t[12]!==P?(F=(0,Q.jsx)(_e,{title:`Authenticator app`,description:`A six-digit code from an authenticator app, required whenever you change credentials from a session that was not started with a passkey. Signing in with a passkey never asks for one.`,status:A,control:P}),t[11]=A,t[12]=P,t[13]=F):F=t[13];let I=i!==null,L;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>{e||y()},t[14]=L):L=t[14];let R;t[15]===S?R=t[16]:(R=e=>void S(e),t[15]=S,t[16]=R);let z;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,Q.jsxs)(E,{children:[(0,Q.jsx)(D,{children:`Set up two-factor authentication`}),(0,Q.jsx)(te,{children:`Scan this with your authenticator app, then enter the code it shows. This is the only time the key is displayed.`})]}),t[17]=z):z=t[17];let ce;t[18]===i?ce=t[19]:(ce=i?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{className:`flex justify-center rounded-xl border border-border bg-white p-4`,children:(0,Q.jsx)(ve,{value:i.provisioningUri,size:168,level:`M`,marginSize:1,title:`Two-factor setup code`})}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Can't scan? Enter this key manually:`}),(0,Q.jsx)(`p`,{"aria-label":`Two-factor setup key`,className:`rounded-lg border border-border bg-background px-3 py-2 font-mono text-sm break-all`,children:i.secretBase32})]})]}):null,t[18]=i,t[19]=ce);let le;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,Q.jsx)(se,{htmlFor:`account-totp-confirm`,children:`Code from your app`}),t[20]=le):le=t[20];let B;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(B=e=>l(H(e.target.value)),t[21]=B):B=t[21];let V;t[22]!==s||t[23]!==m?(V=(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[le,(0,Q.jsx)(v,{id:`account-totp-confirm`,value:s,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:16,disabled:m,className:_,onChange:B})]}),t[22]=s,t[23]=m,t[24]=V):V=t[24];let U;t[25]!==ce||t[26]!==V?(U=(0,Q.jsxs)(O,{className:`space-y-4`,children:[ce,V]}),t[25]=ce,t[26]=V,t[27]=U):U=t[27];let W;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,Q.jsx)(b,{variant:`outline`,onClick:y,children:`Cancel`}),t[28]=W):W=t[28];let G;t[29]!==n||t[30]!==s?(G=n||!ue(s),t[29]=n,t[30]=s,t[31]=G):G=t[31];let K;t[32]===m?K=t[33]:(K=(0,Q.jsx)($,{busy:m,children:`Turn on`}),t[32]=m,t[33]=K);let q;t[34]!==G||t[35]!==K?(q=(0,Q.jsxs)(ee,{children:[W,(0,Q.jsx)(b,{type:`submit`,disabled:G,children:K})]}),t[34]=G,t[35]=K,t[36]=q):q=t[36];let de;t[37]!==R||t[38]!==U||t[39]!==q?(de=(0,Q.jsx)(ne,{className:`max-w-md`,children:(0,Q.jsxs)(`form`,{onSubmit:R,children:[z,U,q]})}),t[37]=R,t[38]=U,t[39]=q,t[40]=de):de=t[40];let J;t[41]!==de||t[42]!==I?(J=(0,Q.jsx)(k,{open:I,onOpenChange:L,children:de}),t[41]=de,t[42]=I,t[43]=J):J=t[43];let fe;t[44]===n?fe=t[45]:(fe=e=>{n||d(e)},t[44]=n,t[45]=fe);let pe;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Q.jsxs)(j,{children:[(0,Q.jsx)(ae,{children:`Remove two-factor authentication?`}),(0,Q.jsx)(ie,{children:`Password, recovery-code, and emailed-link sign-ins will no longer need a code from your authenticator app. You can set it up again at any time.`})]}),t[46]=pe):pe=t[46];let Y;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,Q.jsx)(N,{render:(0,Q.jsx)(b,{variant:`outline`}),children:`Keep it on`}),t[47]=Y):Y=t[47];let X;t[48]===w?X=t[49]:(X=()=>void w(),t[48]=w,t[49]=X);let me;t[50]!==n||t[51]!==X?(me=(0,Q.jsxs)(re,{children:[pe,(0,Q.jsxs)(M,{children:[Y,(0,Q.jsx)(b,{variant:`destructive`,disabled:n,onClick:X,children:`Remove two-factor`})]})]}),t[50]=n,t[51]=X,t[52]=me):me=t[52];let ge;t[53]!==u||t[54]!==fe||t[55]!==me?(ge=(0,Q.jsx)(oe,{open:u,onOpenChange:fe,children:me}),t[53]=u,t[54]=fe,t[55]=me,t[56]=ge):ge=t[56];let be;return t[57]!==J||t[58]!==ge||t[59]!==F?(be=(0,Q.jsxs)(he,{title:`Two-factor authentication`,icon:T,children:[F,J,ge]}),t[57]=J,t[58]=ge,t[59]=F,t[60]=be):be=t[60],be}function Ye(){c.beginTotpEnrollment()}function Xe(e){return c.revokeTotp(e)}function Ze(e){let t=(0,ye.c)(86),{busy:n,actionStatus:r,security:i,run:a,cancel:o}=e,[s,l]=(0,Z.useState)(!1),[u,f]=(0,Z.useState)(``),[p,m]=(0,Z.useState)(``),[h,g]=(0,Z.useState)(!1),[y,x]=(0,Z.useState)(!1),S=r===`setting-password`,C=r===`removing-password`,w;t[0]!==p||t[1]!==u?(w=me(u,p),t[0]=p,t[1]=u,t[2]=w):w=t[2];let T=w,A;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>{f(``),m(``),g(!1)},t[3]=A):A=t[3];let P=A,F;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(F=()=>{P(),l(!1)},t[4]=F):F=t[4];let I=F,L;t[5]===o?L=t[6]:(L=()=>{o(),I()},t[5]=o,t[6]=L);let R=L,z;t[7]!==T||t[8]!==u||t[9]!==a?(z=async e=>{e.preventDefault(),g(!0),!T&&await a(`set-password`,e=>c.setPassword({password:u,...e}),{onCommitted:I,onAbandoned:I})},t[7]=T,t[8]=u,t[9]=a,t[10]=z):z=t[10];let ce=z,le;t[11]===a?le=t[12]:(le=async()=>{x(!1),await a(`remove-password`,Qe)},t[11]=a,t[12]=le);let B=le,V;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,Q.jsx)(d,{"aria-hidden":!0,className:`size-3.5`}),t[13]=V):V=t[13];let H=i===null?`Checking current state…`:i.passwordConfigured?`Set`:`Not set`,U;t[14]!==n||t[15]!==C||t[16]!==i||t[17]!==S?(U=i===null?null:(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Q.jsx)(b,{size:`xs`,variant:`outline`,disabled:n,onClick:()=>l(!0),children:(0,Q.jsx)($,{busy:S,children:i.passwordConfigured?`Change`:`Set password`})}),i.passwordConfigured?(0,Q.jsx)(b,{size:`xs`,variant:`destructive-outline`,"aria-label":`Delete the fallback password`,disabled:n,onClick:()=>x(!0),children:(0,Q.jsx)($,{busy:C,children:`Remove`})}):null]}),t[14]=n,t[15]=C,t[16]=i,t[17]=S,t[18]=U):U=t[18];let W;t[19]!==H||t[20]!==U?(W=(0,Q.jsx)(_e,{title:`Fallback password`,description:`A password is a fallback, not an equal of a passkey: it can be phished and reused, and a session started with one has to prove itself again before changing credentials. Keep a passkey as your normal way in.`,status:H,control:U}),t[19]=H,t[20]=U,t[21]=W):W=t[21];let G=i===null?void 0:i.email,K=i?.emailDeliveryConfigured,q;t[22]!==r||t[23]!==n||t[24]!==a||t[25]!==G||t[26]!==K?(q=(0,Q.jsx)($e,{busy:n,actionStatus:r,email:G,deliveryConfigured:K,run:a}),t[22]=r,t[23]=n,t[24]=a,t[25]=G,t[26]=K,t[27]=q):q=t[27];let ue;t[28]===R?ue=t[29]:(ue=e=>{if(e){l(!0);return}R()},t[28]=R,t[29]=ue);let de;t[30]===ce?de=t[31]:(de=e=>void ce(e),t[30]=ce,t[31]=de);let J;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,Q.jsxs)(E,{children:[(0,Q.jsx)(D,{children:`Set a fallback password`}),(0,Q.jsx)(te,{children:`This replaces any password already on the account. The Hub rejects passwords that have appeared in a known breach.`})]}),t[32]=J):J=t[32];let fe;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(fe=(0,Q.jsx)(se,{htmlFor:`account-password`,children:`New password`}),t[33]=fe):fe=t[33];let pe;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(pe=e=>f(e.target.value),t[34]=pe):pe=t[34];let Y;t[35]!==u||t[36]!==S?(Y=(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[fe,(0,Q.jsx)(v,{id:`account-password`,type:`password`,value:u,autoComplete:`new-password`,maxLength:256,disabled:S,className:_,onChange:pe})]}),t[35]=u,t[36]=S,t[37]=Y):Y=t[37];let X;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,Q.jsx)(se,{htmlFor:`account-password-confirm`,children:`Confirm password`}),t[38]=X):X=t[38];let ge;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(ge=e=>m(e.target.value),t[39]=ge):ge=t[39];let ve;t[40]!==p||t[41]!==S?(ve=(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[X,(0,Q.jsx)(v,{id:`account-password-confirm`,type:`password`,value:p,autoComplete:`new-password`,maxLength:256,disabled:S,className:_,onChange:ge})]}),t[40]=p,t[41]=S,t[42]=ve):ve=t[42];let be;t[43]!==T||t[44]!==h?(be=h&&T?(0,Q.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive-foreground`,children:T}):null,t[43]=T,t[44]=h,t[45]=be):be=t[45];let xe;t[46]!==Y||t[47]!==ve||t[48]!==be?(xe=(0,Q.jsxs)(O,{className:`space-y-3`,children:[Y,ve,be]}),t[46]=Y,t[47]=ve,t[48]=be,t[49]=xe):xe=t[49];let Se;t[50]===R?Se=t[51]:(Se=(0,Q.jsx)(b,{variant:`outline`,onClick:R,children:`Cancel`}),t[50]=R,t[51]=Se);let Ce;t[52]===S?Ce=t[53]:(Ce=(0,Q.jsx)($,{busy:S,children:`Save password`}),t[52]=S,t[53]=Ce);let we;t[54]!==n||t[55]!==Ce?(we=(0,Q.jsx)(b,{type:`submit`,disabled:n,children:Ce}),t[54]=n,t[55]=Ce,t[56]=we):we=t[56];let Te;t[57]!==Se||t[58]!==we?(Te=(0,Q.jsxs)(ee,{children:[Se,we]}),t[57]=Se,t[58]=we,t[59]=Te):Te=t[59];let Ee;t[60]!==de||t[61]!==xe||t[62]!==Te?(Ee=(0,Q.jsx)(ne,{className:`max-w-md`,children:(0,Q.jsxs)(`form`,{onSubmit:de,children:[J,xe,Te]})}),t[60]=de,t[61]=xe,t[62]=Te,t[63]=Ee):Ee=t[63];let De;t[64]!==s||t[65]!==ue||t[66]!==Ee?(De=(0,Q.jsx)(k,{open:s,onOpenChange:ue,children:Ee}),t[64]=s,t[65]=ue,t[66]=Ee,t[67]=De):De=t[67];let Oe;t[68]===n?Oe=t[69]:(Oe=e=>{n||x(e)},t[68]=n,t[69]=Oe);let ke;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,Q.jsxs)(j,{children:[(0,Q.jsx)(ae,{children:`Remove the password?`}),(0,Q.jsx)(ie,{children:`You will no longer be able to sign in with a password. Make sure you still have a passkey, or recovery codes you have saved.`})]}),t[70]=ke):ke=t[70];let Ae;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,Q.jsx)(N,{render:(0,Q.jsx)(b,{variant:`outline`}),children:`Keep it`}),t[71]=Ae):Ae=t[71];let je;t[72]===B?je=t[73]:(je=()=>void B(),t[72]=B,t[73]=je);let Me;t[74]!==n||t[75]!==je?(Me=(0,Q.jsxs)(re,{children:[ke,(0,Q.jsxs)(M,{children:[Ae,(0,Q.jsx)(b,{variant:`destructive`,disabled:n,onClick:je,children:`Remove password`})]})]}),t[74]=n,t[75]=je,t[76]=Me):Me=t[76];let Ne;t[77]!==y||t[78]!==Oe||t[79]!==Me?(Ne=(0,Q.jsx)(oe,{open:y,onOpenChange:Oe,children:Me}),t[77]=y,t[78]=Oe,t[79]=Me,t[80]=Ne):Ne=t[80];let Pe;return t[81]!==W||t[82]!==q||t[83]!==De||t[84]!==Ne?(Pe=(0,Q.jsxs)(he,{title:`Fallback sign-in`,icon:V,children:[W,q,De,Ne]}),t[81]=W,t[82]=q,t[83]=De,t[84]=Ne,t[85]=Pe):Pe=t[85],Pe}function Qe(e){return c.removePassword(e)}function $e(e){let t=(0,ye.c)(25),{busy:n,actionStatus:r,email:i,deliveryConfigured:a,run:o}=e,[s,l]=(0,Z.useState)(``),[u,d]=(0,Z.useState)(!1),[f,p]=(0,Z.useState)(!1),m=r===`requesting-email-verification`,g;t[0]===s?g=t[1]:(g=J(s),t[0]=s,t[1]=g);let y=g,x;t[2]!==s||t[3]!==y||t[4]!==o?(x=async e=>{e.preventDefault(),d(!0),p(!1),!y&&await o(`request-email-verification`,e=>c.requestEmailVerification({email:s.trim(),...e}),{onCommitted:()=>{p(!0),l(``),d(!1)}})},t[2]=s,t[3]=y,t[4]=o,t[5]=x):x=t[5];let C=x,E;t[6]===a?E=t[7]:(E=a===!1?(0,Q.jsx)(`div`,{className:`border-t border-border/60 px-4 pt-3.5 sm:px-5`,children:(0,Q.jsxs)(T,{variant:`warning`,children:[(0,Q.jsx)(h,{"aria-hidden":!0}),(0,Q.jsx)(S,{children:`No mail will arrive yet`}),(0,Q.jsx)(w,{children:`This Hub has no mail transport configured, so verification messages are generated and discarded. The request below will be accepted and nothing will be delivered until an operator wires one up. Do not rely on email as your way back into the account.`})]})}):null,t[6]=a,t[7]=E);let D=a?`Used for account recovery after verification. The Hub answers the same way whether or not the address is already known, so this never confirms who owns it.`:`Used for account recovery once mail delivery is switched on. The Hub answers the same way whether or not the address is already known, so this never confirms who owns it.`,ee=i===void 0?`Checking current state…`:i===null?`Not set`:`${i.verified?`Verified`:`Verification pending`} · ${i.address}`,O;t[8]!==f||t[9]!==n||t[10]!==i||t[11]!==a||t[12]!==s||t[13]!==y||t[14]!==m||t[15]!==C||t[16]!==u?(O=i===void 0?null:(0,Q.jsxs)(`form`,{className:`pt-3 pb-3.5`,onSubmit:e=>void C(e),children:[(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row`,children:[(0,Q.jsx)(v,{"aria-label":`Email address`,type:`email`,value:s,autoComplete:`email`,placeholder:`you@example.com`,maxLength:254,disabled:m,className:_,onChange:e=>{l(e.target.value),p(!1)}}),(0,Q.jsx)(b,{type:`submit`,size:`sm`,variant:`outline`,disabled:n,className:`shrink-0`,children:(0,Q.jsx)($,{busy:m,children:i===null?`Send verification`:i.verified?`Change email`:`Resend or change`})})]}),u&&y?(0,Q.jsx)(`p`,{role:`alert`,className:`pt-2 text-xs text-destructive-foreground`,children:y}):null,f?(0,Q.jsx)(`p`,{role:`status`,className:`pt-2 text-xs text-muted-foreground`,children:a?`Verification email requested. Check your inbox and spam folder; delivery may take a moment.`:`Request accepted by the Hub. No message will be delivered until a mail transport is configured.`}):null]}),t[8]=f,t[9]=n,t[10]=i,t[11]=a,t[12]=s,t[13]=y,t[14]=m,t[15]=C,t[16]=u,t[17]=O):O=t[17];let te;t[18]!==D||t[19]!==ee||t[20]!==O?(te=(0,Q.jsx)(_e,{title:`Recovery email`,description:D,status:ee,children:O}),t[18]=D,t[19]=ee,t[20]=O,t[21]=te):te=t[21];let ne;return t[22]!==E||t[23]!==te?(ne=(0,Q.jsxs)(Q.Fragment,{children:[E,te]}),t[22]=E,t[23]=te,t[24]=ne):ne=t[24],ne}function et(e){let t=(0,ye.c)(52),{busy:n,actionStatus:r,recoveryCodes:i,run:a}=e,[o,s]=(0,Z.useState)(!1),c=r===`regenerating-recovery-codes`,{copyToClipboard:d,isCopied:p}=x(),m;t[0]===a?m=t[1]:(m=async()=>{s(!1),await a(`regenerate-recovery-codes`,it)},t[0]=a,t[1]=m);let h=m,g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Q.jsx)(f,{"aria-hidden":!0,className:`size-3.5`}),t[2]=g):g=t[2];let _;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>s(!0),t[3]=_):_=t[3];let v;t[4]===c?v=t[5]:(v=(0,Q.jsx)($,{busy:c,children:`Generate new codes`}),t[4]=c,t[5]=v);let y;t[6]!==n||t[7]!==v?(y=(0,Q.jsx)(_e,{title:`One-time recovery codes`,description:`Single-use codes that get you back in when you have lost every passkey. They are a last resort, not a substitute for one — anyone holding a code can sign in as you.`,status:`Ryco shows them once and never writes them to browser storage.`,control:(0,Q.jsx)(b,{size:`xs`,variant:`destructive-outline`,disabled:n,onClick:_,children:v})}),t[6]=n,t[7]=v,t[8]=y):y=t[8];let S;t[9]===n?S=t[10]:(S=e=>{n||s(e)},t[9]=n,t[10]=S);let C;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsxs)(j,{children:[(0,Q.jsx)(ae,{children:`Replace your recovery codes?`}),(0,Q.jsx)(ie,{children:`Every code you have already saved stops working immediately. You will get a new set, shown once — if you lose them you will have to generate another set from a session you can still sign in to.`})]}),t[11]=C):C=t[11];let w;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Q.jsx)(N,{render:(0,Q.jsx)(b,{variant:`outline`}),children:`Cancel`}),t[12]=w):w=t[12];let T;t[13]===h?T=t[14]:(T=()=>void h(),t[13]=h,t[14]=T);let A;t[15]!==n||t[16]!==T?(A=(0,Q.jsxs)(re,{children:[C,(0,Q.jsxs)(M,{children:[w,(0,Q.jsx)(b,{variant:`destructive`,disabled:n,onClick:T,children:`Replace codes`})]})]}),t[15]=n,t[16]=T,t[17]=A):A=t[17];let P;t[18]!==o||t[19]!==A||t[20]!==S?(P=(0,Q.jsx)(oe,{open:o,onOpenChange:S,children:A}),t[18]=o,t[19]=A,t[20]=S,t[21]=P):P=t[21];let se=i.length>0,F;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsx)(D,{children:`Save your recovery codes`}),t[22]=F):F=t[22];let I=String(i.length),L;t[23]===I?L=t[24]:(L=(0,Q.jsxs)(E,{children:[F,(0,Q.jsxs)(te,{children:[`Save all `,I,` codes — they are shown once and cannot be retrieved later. Store them somewhere only you can reach — a password manager, or paper somewhere safe.`]})]}),t[23]=I,t[24]=L);let R;t[25]===i?R=t[26]:(R=i.map(nt),t[25]=i,t[26]=R);let z;t[27]===R?z=t[28]:(z=(0,Q.jsx)(O,{children:(0,Q.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:R})}),t[27]=R,t[28]=z);let le;t[29]!==d||t[30]!==i?(le=()=>d(ce(i),void 0),t[29]=d,t[30]=i,t[31]=le):le=t[31];let B;t[32]===p?B=t[33]:(B=p?(0,Q.jsx)(l,{"aria-hidden":!0}):(0,Q.jsx)(u,{"aria-hidden":!0}),t[32]=p,t[33]=B);let V=p?`Copied`:`Copy codes`,H;t[34]!==le||t[35]!==B||t[36]!==V?(H=(0,Q.jsxs)(b,{variant:`outline`,onClick:le,children:[B,V]}),t[34]=le,t[35]=B,t[36]=V,t[37]=H):H=t[37];let U;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Q.jsx)(b,{onClick:tt,children:`I saved the codes`}),t[38]=U):U=t[38];let W;t[39]===H?W=t[40]:(W=(0,Q.jsxs)(ee,{children:[H,U]}),t[39]=H,t[40]=W);let G;t[41]!==L||t[42]!==z||t[43]!==W?(G=(0,Q.jsxs)(ne,{className:`max-w-md`,showCloseButton:!1,children:[L,z,W]}),t[41]=L,t[42]=z,t[43]=W,t[44]=G):G=t[44];let K;t[45]!==se||t[46]!==G?(K=(0,Q.jsx)(k,{open:se,disablePointerDismissal:!0,onOpenChange:rt,children:G}),t[45]=se,t[46]=G,t[47]=K):K=t[47];let q;return t[48]!==P||t[49]!==K||t[50]!==y?(q=(0,Q.jsxs)(he,{title:`Recovery codes`,icon:g,children:[y,P,K]}),t[48]=P,t[49]=K,t[50]=y,t[51]=q):q=t[51],q}function tt(){return c.dismissRecoveryCodes()}function nt(e){return(0,Q.jsx)(`li`,{children:e},e)}function rt(e,t){e||t.cancel()}function it(e){return c.regenerateRecoveryCodes(e)}function at(e){let t=(0,ye.c)(45),{pending:n,attempts:r,code:i,onCodeChange:a,onSubmit:o,onCancel:s,busy:c}=e,l=n!==null,u;t[0]===s?u=t[1]:(u=e=>{e||s()},t[0]=s,t[1]=u);let d;t[2]===o?d=t[3]:(d=e=>{e.preventDefault(),o()},t[2]=o,t[3]=d);let f;t[4]===n?f=t[5]:(f=n?I(n.action):``,t[4]=n,t[5]=f);let p;t[6]===f?p=t[7]:(p=(0,Q.jsx)(D,{children:f}),t[6]=f,t[7]=p);let m=n?.inferred??!1,h;t[8]!==r||t[9]!==m?(h=X(r,m),t[8]=r,t[9]=m,t[10]=h):h=t[10];let g;t[11]===h?g=t[12]:(g=(0,Q.jsx)(te,{children:h}),t[11]=h,t[12]=g);let y;t[13]!==p||t[14]!==g?(y=(0,Q.jsxs)(E,{children:[p,g]}),t[13]=p,t[14]=g,t[15]=y):y=t[15];let x;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Q.jsx)(se,{htmlFor:`account-step-up-code`,children:`Authenticator code`}),t[16]=x):x=t[16];let S;t[17]===a?S=t[18]:(S=e=>a(H(e.target.value)),t[17]=a,t[18]=S);let C;t[19]!==c||t[20]!==i||t[21]!==S?(C=(0,Q.jsxs)(O,{className:`space-y-2`,children:[x,(0,Q.jsx)(v,{id:`account-step-up-code`,value:i,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:16,disabled:c,className:_,onChange:S})]}),t[19]=c,t[20]=i,t[21]=S,t[22]=C):C=t[22];let w;t[23]===s?w=t[24]:(w=(0,Q.jsx)(b,{variant:`outline`,onClick:s,children:`Cancel`}),t[23]=s,t[24]=w);let T;t[25]!==c||t[26]!==i?(T=c||!ue(i),t[25]=c,t[26]=i,t[27]=T):T=t[27];let A;t[28]===c?A=t[29]:(A=(0,Q.jsx)($,{busy:c,children:`Confirm code`}),t[28]=c,t[29]=A);let j;t[30]!==T||t[31]!==A?(j=(0,Q.jsx)(b,{type:`submit`,disabled:T,children:A}),t[30]=T,t[31]=A,t[32]=j):j=t[32];let M;t[33]!==w||t[34]!==j?(M=(0,Q.jsxs)(ee,{children:[w,j]}),t[33]=w,t[34]=j,t[35]=M):M=t[35];let N;t[36]!==C||t[37]!==M||t[38]!==d||t[39]!==y?(N=(0,Q.jsx)(ne,{className:`max-w-sm`,children:(0,Q.jsxs)(`form`,{onSubmit:d,children:[y,C,M]})}),t[36]=C,t[37]=M,t[38]=d,t[39]=y,t[40]=N):N=t[40];let re;return t[41]!==l||t[42]!==N||t[43]!==u?(re=(0,Q.jsx)(k,{open:l,onOpenChange:u,children:N}),t[41]=l,t[42]=N,t[43]=u,t[44]=re):re=t[44],re}export{Te as AccountSettingsPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{C as r,
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{C as r,Fr as i}from"./src-DmPIm3ie.js";import{Rn as a,Vn as o,bn as s,f as c,l,v as u,y as d,zn as f}from"./runtime-CPM0EUhb.js";import{kt as p,n as ee}from"./primary-CiDY2oUi.js";import{Ct as m,It as h,U as g,V as _,X as v,q as y}from"./composerDraftStore-TYv9j3vY.js";import{i as te}from"./threadPriorityRefreshRuntime-BoNAlBXK.js";import{a as ne,i as b}from"./toast-C-0Ft2jD.js";import{t as x}from"./refresh-cw-DopCMrtR.js";import{t as S}from"./sparkles-CAf3oJ5S.js";import{t as C}from"./ProviderModelPicker-MFRYAv_3.js";import{t as re}from"./switch-BZjA7VT9.js";import{t as w}from"./button-DG8WqjNn.js";import{t as T}from"./toastHelpers-CSQRKo4F.js";import{a as ie,i as E,o as ae,s as oe,t as se}from"./select-CZukJlTn.js";import"./providerInstances-vd2eZtHx.js";import{i as D,n as ce,r as O}from"./settingsLayout-CHJT5wtl.js";var le=[`Thread titles`,`Project or repository names`,`Branch names`,`Bucketed creation and activity age`,`Running, approval, input, queue, failure, and delivery state`,`Pull request or linked issue title and state`,`Up to 600 characters from the latest user request`],k=[{value:0,label:`Manual only`},{value:3e5,label:`Every 5 minutes`},{value:6e5,label:`Every 10 minutes`},{value:18e5,label:`Every 30 minutes`},{value:36e5,label:`Every hour`},{value:216e5,label:`Every 6 hours`},{value:864e5,label:`Every 24 hours`}];function A(e){return{...e.enabled===void 0?{}:{aiFocusEnabled:e.enabled},...e.refreshIntervalMs===void 0?{}:{aiFocusRefreshIntervalMs:e.refreshIntervalMs}}}function j(e){return e.map(e=>{let t=e.serverConfig,n=t?.environment.capabilities.threadPriorityRanking===!0,r=t?.settings.inboxPriorityModelSelection??null,i=t?r??t.settings.textGenerationModelSelection:null,a=i===null?null:t?.providers.find(e=>e.instanceId===i.instanceId)??null;return{...e,supported:n,inherited:r===null,effectiveModelSelection:i,effectiveProvider:a}})}function M(e,t){let n=e.find(e=>e.instanceId===t);return!!(n&&n.enabled&&n.installed&&n.availability!==`unavailable`&&n.status!==`disabled`&&n.status!==`error`)}function N(e){if(e.selection!==null&&!M(e.serverConfig.providers,e.selection.instanceId))throw Error(`That provider instance is not available on this environment.`);return{inboxPriorityModelSelection:e.selection}}var P=n(),F=e(t(),1),I=h();function L(e){return e instanceof Error?e.message:`An unexpected error occurred.`}function ue(){let e=(0,P.c)(2),[t,n]=(0,F.useState)(R),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>u(()=>{n(l())}),i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,F.useEffect)(r,i),t}function R(){return l()}function z({row:e}){let[t,n]=(0,F.useState)(!1),i=e.serverConfig;if(!i||!e.effectiveModelSelection)return null;let a={...i.settings,...r},o=e.effectiveModelSelection,s=v(y(i.providers)),c=_(a,i.providers,o.instanceId,o.model),l=async t=>{n(!0);try{let n=N({serverConfig:i,selection:t});await d(e.environmentId,n)}catch(t){b.add(T({type:`error`,title:`Could not update ${e.label}`,description:L(t)}))}finally{n(!1)}};return(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[(0,I.jsx)(C,{activeInstanceId:o.instanceId,model:o.model,lockedProvider:null,instanceEntries:s,modelOptionsByInstance:c,compact:!0,disabled:t||!e.connected,...e.connected?{}:{disabledReason:`Connect this environment to change its model.`},onInstanceModelChange:(e,t)=>{l(g({...a,textGenerationModelSelection:m(e,t)},i.providers))}}),e.inherited?null:(0,I.jsx)(w,{size:`xs`,variant:`ghost`,disabled:t||!e.connected,onClick:()=>void l(null),children:`Use text model`})]})}function B(e){let t=(0,P.c)(6),{row:n}=e,r=n.effectiveProvider?.displayName??n.effectiveProvider?.driver??null,i=n.connected?n.supported?n.inherited?`Inherits the text-generation model${r?` (${r})`:``}.`:`Uses a separate model for Inbox ranking.`:`This node version does not support AI Focus ranking. Other supported nodes still work.`:`Offline — ranking waits for an existing connection.`,a;t[0]===n?a=t[1]:(a=n.supported?(0,I.jsx)(z,{row:n}):void 0,t[0]=n,t[1]=a);let o;return t[2]!==n.label||t[3]!==i||t[4]!==a?(o=(0,I.jsx)(O,{title:n.label,description:i,control:a}),t[2]=n.label,t[3]=i,t[4]=a,t[5]=o):o=t[5],o}function V(){let e=(0,P.c)(48),t=a(),{updateSettings:n}=f(),r=o(),c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=ee(),e[0]=c):c=e[0];let l=c,u=s(he),d=ue(),[p,m]=(0,F.useState)(!1);l?.environmentId,l?.label;let h;if(e[1]!==d||e[2]!==r||e[3]!==u){let t=new Map;l?.environmentId&&t.set(l.environmentId,{label:l.label,config:r});for(let e of d){if(t.has(e.environmentId))continue;let n=u[e.environmentId];t.set(e.environmentId,{label:n?.descriptor?.label??e.knownEnvironment.label,config:n?.serverConfig??null})}for(let[e,n]of Object.entries(u)){let r=i.make(e);t.has(r)||t.set(r,{label:n.descriptor?.label??`Saved environment`,config:n.serverConfig})}h=j([...t].map(me)),e[1]=d,e[2]=r,e[3]=u,e[4]=h}else h=e[4];let g=h,_;e[5]===g?_=e[6]:(_=async()=>{m(!0);let e=await te(),t=e.failures;t.length>0?b.add(T({type:`error`,title:`AI Focus refresh failed`,description:t.map(e=>{let{environmentId:t,error:n}=e;return`${g.find(e=>e.environmentId===t)?.label??`Environment`}: ${L(n)}`}).join(` · `)})):b.add(T({type:`success`,title:e.attempted.length>0?`AI Focus refreshed`:`No connected supported nodes`,description:e.attempted.length>0?`Updated ${e.succeeded.length} environment${e.succeeded.length===1?``:`s`}.`:`Connect a supported node to rank its Inbox.`})),m(!1)},e[5]=g,e[6]=_);let v=_,y;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,I.jsx)(S,{className:`size-3.5`}),e[7]=y):y=e[7];let C;e[8]===n?C=e[9]:(C=e=>n(A({enabled:e})),e[8]=n,e[9]=C);let E;e[10]!==t.aiFocusEnabled||e[11]!==C?(E=(0,I.jsx)(O,{title:`Prioritize the Inbox`,description:`Create a Focus section from pinned, actionable, and model-ranked threads. Focused threads are removed from Active, never duplicated.`,control:(0,I.jsx)(re,{"aria-label":`Enable AI Focus`,checked:t.aiFocusEnabled,onCheckedChange:C})}),e[10]=t.aiFocusEnabled,e[11]=C,e[12]=E):E=e[12];let M=String(t.aiFocusRefreshIntervalMs),N;e[13]===n?N=e[14]:(N=e=>{let t=Number(e);n(A({refreshIntervalMs:t}))},e[13]=n,e[14]=N);let R;e[15]===t.aiFocusRefreshIntervalMs?R=e[16]:(R=k.find(e=>e.value===t.aiFocusRefreshIntervalMs)?.label??`Every 10 minutes`,e[15]=t.aiFocusRefreshIntervalMs,e[16]=R);let z;e[17]===R?z=e[18]:(z=(0,I.jsx)(ae,{className:`w-48`,"aria-label":`AI Focus refresh interval`,children:(0,I.jsx)(oe,{children:R})}),e[17]=R,e[18]=z);let B;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,I.jsx)(ie,{align:`end`,alignItemWithTrigger:!1,children:k.map(pe)}),e[19]=B):B=e[19];let V;e[20]!==M||e[21]!==N||e[22]!==z?(V=(0,I.jsxs)(se,{value:M,onValueChange:N,children:[z,B]}),e[20]=M,e[21]=N,e[22]=z,e[23]=V):V=e[23];let H;e[24]===v?H=e[25]:(H=()=>void v(),e[24]=v,e[25]=H);let U=p?`size-4 animate-spin`:`size-4`,W;e[26]===U?W=e[27]:(W=(0,I.jsx)(x,{className:U}),e[26]=U,e[27]=W);let G;e[28]!==p||e[29]!==H||e[30]!==W?(G=(0,I.jsx)(w,{size:`icon-sm`,variant:`outline`,"aria-label":`Refresh AI Focus now`,disabled:p,onClick:H,children:W}),e[28]=p,e[29]=H,e[30]=W,e[31]=G):G=e[31];let K;e[32]!==V||e[33]!==G?(K=(0,I.jsx)(O,{title:`Refresh rankings`,description:`Automatic checks use only nodes that are already connected. Manual-only never starts a connection.`,control:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[V,G]})}),e[32]=V,e[33]=G,e[34]=K):K=e[34];let q;e[35]!==K||e[36]!==E?(q=(0,I.jsxs)(D,{title:`AI Focus`,icon:y,children:[E,K]}),e[35]=K,e[36]=E,e[37]=q):q=e[37];let J;e[38]===g?J=e[39]:(J=g.length>0?g.map(fe):(0,I.jsx)(O,{title:`No environments available`,description:`Connect a node to configure its Inbox ranking model.`}),e[38]=g,e[39]=J);let Y;e[40]===J?Y=e[41]:(Y=(0,I.jsx)(D,{title:`Models`,children:J}),e[40]=J,e[41]=Y);let X;e[42]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,I.jsx)(ne,{className:`size-3.5`}),e[42]=X):X=e[42];let Z;e[43]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,I.jsx)(`p`,{className:`mb-3 text-xs text-muted-foreground`,children:`Ranking sends only this bounded metadata from each environment. It does not send full chat history, file contents, or message responses.`}),e[43]=Z):Z=e[43];let Q;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,I.jsx)(D,{title:`Data sent to the selected model`,icon:X,children:(0,I.jsxs)(`div`,{className:`px-5 py-4`,children:[Z,(0,I.jsx)(`ul`,{className:`grid gap-1.5 text-xs text-foreground/80 sm:grid-cols-2`,children:le.map(de)})]})}),e[44]=Q):Q=e[44];let $;return e[45]!==q||e[46]!==Y?($=(0,I.jsxs)(ce,{children:[q,Y,Q]}),e[45]=q,e[46]=Y,e[47]=$):$=e[47],$}function de(e){return(0,I.jsxs)(`li`,{className:`flex gap-2`,children:[(0,I.jsx)(`span`,{"aria-hidden":!0,className:`text-muted-foreground`,children:`•`}),(0,I.jsx)(`span`,{children:e})]},e)}function fe(e){return(0,I.jsx)(B,{row:e},e.environmentId)}function pe(e){return(0,I.jsx)(E,{hideIndicator:!0,value:String(e.value),children:e.label},e.value)}function me(e){let[t,n]=e;return{environmentId:t,label:n.label,connected:c(t)!==null&&p(t).phase===`connected`,serverConfig:n.config}}function he(e){return e.byId}export{V as AiFocusSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{It as r}from"./composerDraftStore-
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{It as r}from"./composerDraftStore-TYv9j3vY.js";var i=n(),a=e(t(),1),o=r(),s=250;function c(e){let t=(0,i.c)(17),{children:n}=e,r=(0,a.useRef)(null),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={height:null,isClipping:!1},t[0]=c):c=t[0];let[d,f]=(0,a.useState)(c),p;t[1]===d.isClipping?p=t[2]:(p=()=>{if(!d.isClipping)return;let e=window.setTimeout(()=>{f(u)},s);return()=>window.clearTimeout(e)},t[1]=d.isClipping,t[2]=p);let m;t[3]!==d.height||t[4]!==d.isClipping?(m=[d.height,d.isClipping],t[3]=d.height,t[4]=d.isClipping,t[5]=m):m=t[5],(0,a.useEffect)(p,m);let h,g;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>{let e=r.current;if(!e)return;let t=null,n=null,i=()=>{let t=Math.ceil(e.scrollHeight||e.getBoundingClientRect().height);f(e=>e.height===t?e:{height:t,isClipping:e.height!==null})},a=()=>{t!==null&&(window.cancelAnimationFrame(t),t=null),n!==null&&(window.cancelAnimationFrame(n),n=null)},o=()=>{a(),i(),t=window.requestAnimationFrame(()=>{t=null,i(),n=window.requestAnimationFrame(()=>{n=null,i()})})};o();let s=new ResizeObserver(o);return s.observe(e),()=>{s.disconnect(),a()}},g=[],t[6]=h,t[7]=g):(h=t[6],g=t[7]),(0,a.useLayoutEffect)(h,g);let _;t[8]!==d.height||t[9]!==d.isClipping?(_=d.height===null?void 0:{height:d.height,overflow:d.isClipping?`hidden`:`visible`},t[8]=d.height,t[9]=d.isClipping,t[10]=_):_=t[10];let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>{e.target===e.currentTarget&&e.propertyName===`height`&&f(l)},t[11]=v):v=t[11];let y;t[12]===n?y=t[13]:(y=(0,o.jsx)(`div`,{ref:r,children:n}),t[12]=n,t[13]=y);let b;return t[14]!==_||t[15]!==y?(b=(0,o.jsx)(`div`,{"data-slot":`animated-height`,className:`transition-[height] duration-200 ease-out motion-reduce:transition-none`,style:_,onTransitionEnd:v,children:y}),t[14]=_,t[15]=y,t[16]=b):b=t[16],b}function l(e){return e.isClipping?{...e,isClipping:!1}:e}function u(e){return e.isClipping?{...e,isClipping:!1}:e}export{c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{It as r}from"./composerDraftStore-TYv9j3vY.js";import{i}from"./uiStateStore-DzUrk2GS.js";import{f as a}from"./useRenderElement-DchFnsR8.js";import{i as o}from"./toast-C-0Ft2jD.js";import{t as s}from"./clipboard-copy-C4VV20QR.js";import{t as c}from"./copy-UQjKGt7t.js";import{t as l}from"./download-CQZ-m4zW.js";import{t as u}from"./palette-BSD_aJZg.js";import{t as d}from"./pencil-B69ERoVM.js";import{t as f}from"./plus-B2h-VEqh.js";import{t as p}from"./trash-2-CM1zXPGb.js";import{t as m}from"./x-C1Cemsov.js";import{t as h}from"./utils-CV2fJJxC.js";import{t as g}from"./switch-BZjA7VT9.js";import{t as _}from"./input-BZz4eLRl.js";import{t as v}from"./button-DG8WqjNn.js";import{t as y}from"./textarea-DHdmRD1r.js";import{a as b,i as x,n as S,o as C,r as w,s as T,t as E}from"./alert-dialog-9Jyh0e8u.js";import{a as D,i as O,o as k,s as A,t as j}from"./select-CZukJlTn.js";import{n as M,r as N,t as P}from"./popover-BuYzXGwl.js";import{t as F}from"./badge-w43sx8eF.js";import{_ as I,a as L,b as ee,f as te,i as ne,l as R,m as z,o as re,p as ie,u as ae,y as oe}from"./appearancePreferences-BhNRCg6W.js";import{_ as se,a as ce,b as le,c as ue,d as de,f as B,g as fe,h as pe,i as me,l as he,m as V,o as ge,p as _e,r as H,s as U,t as ve,u as W,v as ye,x as be,y as G}from"./useTheme-By1kfyiU.js";import{n as xe,t as K}from"./toggle-group-Chxh9G6t.js";import{i as Se,n as Ce,r as q,t as J}from"./settingsLayout-CHJT5wtl.js";var we=a(`baseline`,[[`path`,{d:`M4 20h16`,key:`14thso`}],[`path`,{d:`m6 16 6-12 6 12`,key:`1b4byz`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}]]),Te=a(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),Ee=a(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),De=a(`radius`,[[`path`,{d:`M20.34 17.52a10 10 0 1 0-2.82 2.82`,key:`fydyku`}],[`circle`,{cx:`19`,cy:`19`,r:`2`,key:`17f5cg`}],[`path`,{d:`m13.41 13.41 4.18 4.18`,key:`1gqbwc`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Oe=a(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),ke=a(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),Y=e(t(),1),X=n(),Z=`.rycotheme.json`,Ae=/[^a-z0-9-_]+/gi;function je(e){let t=(e.name||e.id).trim().replace(Ae,`-`).replace(/^-+|-+$/g,``);return`${t.length>0?t:e.id||`theme`}${Z}`}function Me(e){let t={id:e.id,name:e.name};return e.description&&(t.description=e.description),e.light&&(t.light={...e.light}),e.dark&&(t.dark={...e.dark}),JSON.stringify(t,null,2)}function Ne(e){let t;try{t=JSON.parse(e)}catch(e){throw Error(`Could not parse theme JSON: ${e instanceof Error?e.message:`invalid JSON`}`,{cause:e})}if(!_e(t))throw Error(`Theme JSON does not match the schema (need string id/name and string-only light/dark tokens).`);let n={id:t.id,name:t.name,builtIn:!1};return t.description&&(n.description=t.description),t.light&&(n.light={...t.light}),t.dark&&(n.dark={...t.dark}),n}function Pe(e,t=`rename`){let n=Ne(e);if(!W().find(e=>e.id===n.id))return me(n),{theme:n,action:`added`};if(de(n.id)||t===`rename`){let e={...n,id:he(n.id)};return me(e),{theme:e,action:`renamed`}}return ye(n.id,n),{theme:n,action:`replaced`}}typeof TextEncoder>`u`||new TextEncoder,typeof TextDecoder>`u`||new TextDecoder;async function Fe(e){let t=Me(e);if(typeof navigator>`u`||!navigator.clipboard)throw Error(`Clipboard API not available in this environment.`);await navigator.clipboard.writeText(t)}function Ie(e){if(typeof document>`u`||typeof URL>`u`||typeof Blob>`u`)throw Error(`Download not supported in this environment.`);let t=new Blob([Me(e)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=je(e),r.rel=`noopener`,document.body.append(r),r.click(),r.remove(),URL.revokeObjectURL(n)}async function Le(e,t={}){let n=Pe(await e.text(),t.collision??`rename`);return t.activate&&(se(n.theme.id),ce(n.theme)),n}var Q=r();function Re(e,t,n){return e<t?t:e>n?n:e}function ze(e){let t=e.trim().replace(/^#/,``),n;if(t.length===3)n=t.split(``).map(e=>`${e}${e}`).join(``);else if(t.length===6)n=t;else return null;return/^[0-9a-fA-F]{6}$/.test(n)?{r:Number.parseInt(n.slice(0,2),16),g:Number.parseInt(n.slice(2,4),16),b:Number.parseInt(n.slice(4,6),16)}:null}function Be({r:e,g:t,b:n}){let r=e=>Re(Math.round(e),0,255).toString(16).padStart(2,`0`);return`#${r(e)}${r(t)}${r(n)}`}function Ve({r:e,g:t,b:n}){let r=e/255,i=t/255,a=n/255,o=Math.max(r,i,a),s=o-Math.min(r,i,a),c=0;s!==0&&(c=o===r?60*((i-a)/s%6):o===i?60*((a-r)/s+2):60*((r-i)/s+4)),c<0&&(c+=360);let l=o===0?0:s/o;return{h:c,s:l,v:o}}function He({h:e,s:t,v:n}){let r=n*t,i=(e%360+360)%360/60,a=r*(1-Math.abs(i%2-1)),o=0,s=0,c=0;i<1?[o,s,c]=[r,a,0]:i<2?[o,s,c]=[a,r,0]:i<3?[o,s,c]=[0,r,a]:i<4?[o,s,c]=[0,a,r]:i<5?[o,s,c]=[a,0,r]:[o,s,c]=[r,0,a];let l=n-r;return{r:(o+l)*255,g:(s+l)*255,b:(c+l)*255}}function Ue(e){let t=(0,X.c)(71),{value:n,onChange:r,children:i,side:a,align:o,ariaLabel:s,triggerClassName:c}=e,l=a===void 0?`bottom`:a,u=o===void 0?`start`:o,d;t[0]===n?d=t[1]:(d=()=>{let e=ze(n);return e?Ve(e):{h:0,s:0,v:0}},t[0]=n,t[1]=d);let[f,p]=(0,Y.useState)(d),[m,g]=(0,Y.useState)(n),[v,y]=(0,Y.useState)(!1),b=(0,Y.useRef)(null),x=(0,Y.useRef)(null),S=(0,Y.useRef)(r),C=(0,Y.useRef)(f.h),w;t[2]===r?w=t[3]:(w=()=>{S.current=r},t[2]=r,t[3]=w),(0,Y.useEffect)(w);let T,E;t[4]===f.h?(T=t[5],E=t[6]):(T=()=>{C.current=f.h},E=[f.h],t[4]=f.h,t[5]=T,t[6]=E),(0,Y.useEffect)(T,E);let D;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(D=()=>{if(b.current=null,x.current===null)return;let e=x.current;x.current=null,S.current(e)},t[7]=D):D=t[7];let O=D,k;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(k=e=>{x.current=e,b.current===null&&(b.current=requestAnimationFrame(O))},t[8]=k):k=t[8];let A=k,j,F;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(F=()=>()=>{if(b.current!==null&&(cancelAnimationFrame(b.current),b.current=null),x.current!==null){let e=x.current;x.current=null,S.current(e)}},j=[],t[9]=j,t[10]=F):(j=t[9],F=t[10]),(0,Y.useEffect)(F,j);let I;t[11]===f?I=t[12]:(I=Be(He(f)),t[11]=f,t[12]=I);let L=I,ee,te;t[13]!==L||t[14]!==n?(ee=()=>{if(n.toLowerCase()===L.toLowerCase())return;let e=ze(n);if(!e)return;let t=Ve(e);p(e=>({h:t.s===0?e.h:t.h,s:t.s,v:t.v})),g(n)},te=[n,L],t[13]=L,t[14]=n,t[15]=ee,t[16]=te):(ee=t[15],te=t[16]),(0,Y.useEffect)(ee,te);let ne=(0,Y.useRef)(null),R;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>{let t=ne.current;if(!t)return;let n=t.getBoundingClientRect(),r=Re(e.clientX-n.left,0,n.width),i=Re(e.clientY-n.top,0,n.height),a=n.width===0?0:r/n.width,o=n.height===0?0:1-i/n.height;p(e=>{let t={h:e.h,s:a,v:o},n=Be(He(t));return g(n),x.current=n,b.current===null&&(b.current=requestAnimationFrame(O)),t})},t[17]=R):R=t[17];let z=R,re;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(re=e=>{e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),z(e)},t[18]=re):re=t[18];let ie=re,ae;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(ae=e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&z(e)},t[19]=ae):ae=t[19];let oe=ae,se=(0,Y.useRef)(null),ce;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(ce=e=>{let t=se.current;if(!t)return;let n=t.getBoundingClientRect(),r=Re(e.clientX-n.left,0,n.width),i=n.width===0?0:r/n.width*360;p(e=>{let t={h:i,s:e.s,v:e.v},n=Be(He(t));return g(n),x.current=n,b.current===null&&(b.current=requestAnimationFrame(O)),t})},t[20]=ce):ce=t[20];let le=ce,ue;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(ue=e=>{e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),le(e)},t[21]=ue):ue=t[21];let de=ue,B;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(B=e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&le(e)},t[22]=B):B=t[22];let fe=B,pe;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(pe=e=>{g(e);let t=ze(e.startsWith(`#`)?e:`#${e}`);if(!t)return;let n=Ve(t),r={h:n.s===0?C.current:n.h,s:n.s,v:n.v};p(r),A(Be(t))},t[23]=pe):pe=t[23];let me=pe,he=`${f.h/360*100}%`,V=`${f.s*100}%`,ge=`${(1-f.v)*100}%`,_e=`hsl(${f.h} 100% 50%)`,H;t[24]===c?H=t[25]:(H=h(`relative size-5 shrink-0 cursor-pointer overflow-hidden rounded-sm border border-border/80 outline-none transition-shadow focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`,c),t[24]=c,t[25]=H);let U;t[26]!==s||t[27]!==i||t[28]!==H?(U=(0,Q.jsx)(N,{"aria-label":s,className:H,children:i}),t[26]=s,t[27]=i,t[28]=H,t[29]=U):U=t[29];let ve;t[30]===f.s?ve=t[31]:(ve=Math.round(f.s*100),t[30]=f.s,t[31]=ve);let W;t[32]===_e?W=t[33]:(W={backgroundColor:_e},t[32]=_e,t[33]=W);let ye;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,Q.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0`,style:{background:`linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0))`}}),t[34]=ye):ye=t[34];let be;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,Q.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0`,style:{background:`linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0))`}}),t[35]=be):be=t[35];let G;t[36]!==V||t[37]!==ge?(G=(0,Q.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(0,0,0,0.4)]`,style:{left:V,top:ge}}),t[36]=V,t[37]=ge,t[38]=G):G=t[38];let xe;t[39]!==ve||t[40]!==W||t[41]!==G?(xe=(0,Q.jsxs)(`div`,{ref:ne,role:`slider`,"aria-label":`Saturation and value`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":ve,tabIndex:0,className:`relative h-36 w-full cursor-crosshair touch-none select-none overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/40`,style:W,onPointerDown:ie,onPointerMove:oe,children:[ye,be,G]}),t[39]=ve,t[40]=W,t[41]=G,t[42]=xe):xe=t[42];let K;t[43]===f.h?K=t[44]:(K=Math.round(f.h),t[43]=f.h,t[44]=K);let Se;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(Se={background:`linear-gradient(to right, hsl(0 100% 50%), hsl(60 100% 50%), hsl(120 100% 50%), hsl(180 100% 50%), hsl(240 100% 50%), hsl(300 100% 50%), hsl(360 100% 50%))`},t[45]=Se):Se=t[45];let Ce;t[46]===he?Ce=t[47]:(Ce=(0,Q.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute top-1/2 size-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(0,0,0,0.4)]`,style:{left:he}}),t[46]=he,t[47]=Ce);let q;t[48]!==K||t[49]!==Ce?(q=(0,Q.jsx)(`div`,{ref:se,role:`slider`,"aria-label":`Hue`,"aria-valuemin":0,"aria-valuemax":360,"aria-valuenow":K,tabIndex:0,className:`relative h-3 w-full cursor-ew-resize touch-none select-none overflow-hidden rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring/40`,style:Se,onPointerDown:de,onPointerMove:fe,children:Ce}),t[48]=K,t[49]=Ce,t[50]=q):q=t[50];let J;t[51]===L?J=t[52]:(J=(0,Q.jsx)(`span`,{"aria-hidden":!0,className:`size-7 shrink-0 rounded-md border border-border/60`,style:{backgroundColor:L}}),t[51]=L,t[52]=J);let we;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(we=e=>me(e.currentTarget.value),t[53]=we):we=t[53];let Te;t[54]===m?Te=t[55]:(Te=(0,Q.jsx)(_,{value:m,size:`sm`,nativeInput:!0,onChange:we,spellCheck:!1,className:`font-mono text-xs`,"aria-label":`Hex value`}),t[54]=m,t[55]=Te);let Ee;t[56]!==J||t[57]!==Te?(Ee=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[J,Te]}),t[56]=J,t[57]=Te,t[58]=Ee):Ee=t[58];let De;t[59]!==xe||t[60]!==q||t[61]!==Ee?(De=(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[xe,q,Ee]}),t[59]=xe,t[60]=q,t[61]=Ee,t[62]=De):De=t[62];let Oe;t[63]!==u||t[64]!==l||t[65]!==De?(Oe=(0,Q.jsx)(M,{side:l,align:u,className:`w-64`,children:De}),t[63]=u,t[64]=l,t[65]=De,t[66]=Oe):Oe=t[66];let ke;return t[67]!==v||t[68]!==U||t[69]!==Oe?(ke=(0,Q.jsxs)(P,{open:v,onOpenChange:y,children:[U,Oe]}),t[67]=v,t[68]=U,t[69]=Oe,t[70]=ke):ke=t[70],ke}var We=[{title:`Surfaces`,tokens:[`background`,`app-chrome-background`,`foreground`,`card`,`card-foreground`,`popover`,`popover-foreground`]},{title:`Brand & focus`,tokens:[`primary`,`primary-foreground`,`ring`]},{title:`Neutrals`,tokens:[`secondary`,`secondary-foreground`,`muted`,`muted-foreground`,`accent`,`accent-foreground`]},{title:`Status`,tokens:[`destructive`,`destructive-foreground`,`info`,`info-foreground`,`success`,`success-foreground`,`warning`,`warning-foreground`]},{title:`Borders & inputs`,tokens:[`border`,`input`]},{title:`Scrollbars`,tokens:[`scrollbar-thumb`,`scrollbar-thumb-hover`,`scrollbar-thumb-thin`,`scrollbar-thumb-thin-hover`]}],Ge=new Set(G),$=null,Ke=null;function qe(e){if(typeof document>`u`||document.body===void 0||!e)return`#000000`;$||($=document.createElement(`div`),$.style.position=`absolute`,$.style.visibility=`hidden`,$.style.pointerEvents=`none`,document.body.append($)),$.style.color=``,$.style.color=e;let t=getComputedStyle($).color;Ke||=document.createElement(`canvas`),Ke.width=1,Ke.height=1;let n=Ke.getContext(`2d`,{willReadFrequently:!0});if(!n)return`#000000`;n.clearRect(0,0,1,1);try{n.fillStyle=t}catch{return`#000000`}n.fillRect(0,0,1,1);let r=n.getImageData(0,0,1,1).data;return`#${[r[0],r[1],r[2]].map(e=>(e??0).toString(16).padStart(2,`0`)).join(``)}`}function Je(e,t,n,r){let i={...e[t]};return r.length===0?delete i[n]:i[n]=r,t===`light`?{...e,light:i}:{...e,dark:i}}function Ye(e,t){return{...e,name:t}}function Xe(e,t){let n={...e};return t.length===0?delete n.description:n.description=t,n}function Ze(e){return H.includes(e)}function Qe(e){let t=(0,X.c)(124),{source:n,draft:r,onDraftChange:i,onSave:a,onCancel:o,resolvedVariant:s}=e,[c,l]=(0,Y.useState)(`form`),[u,d]=(0,Y.useState)(s),f;t[0]===r?f=t[1]:(f=()=>JSON.stringify(r,null,2),t[0]=r,t[1]=f);let[p,m]=(0,Y.useState)(f),[h,g]=(0,Y.useState)(null),[D,O]=(0,Y.useState)(!1),k;t[2]===n?k=t[3]:(k=JSON.stringify(n),t[2]=n,t[3]=k);let A;t[4]===r?A=t[5]:(A=JSON.stringify(r),t[4]=r,t[5]=A);let j=k!==A,M;t[6]===r?M=t[7]:(M=()=>{ce(r)},t[6]=r,t[7]=M);let N;t[8]!==r||t[9]!==s?(N=[r,s],t[8]=r,t[9]=s,t[10]=N):N=t[10],(0,Y.useEffect)(M,N);let P,F;t[11]!==r||t[12]!==c?(P=()=>{c===`form`&&m(JSON.stringify(r,null,2))},F=[r,c],t[11]=r,t[12]=c,t[13]=P,t[14]=F):(P=t[13],F=t[14]),(0,Y.useEffect)(P,F);let I;t[15]!==r||t[16]!==i?(I=e=>{i(Ye(r,e))},t[15]=r,t[16]=i,t[17]=I):I=t[17];let L=I,ee;t[18]!==r||t[19]!==i?(ee=e=>{i(Xe(r,e))},t[18]=r,t[19]=i,t[20]=ee):ee=t[20];let te=ee,ne;t[21]!==r||t[22]!==i||t[23]!==u?(ne=(e,t)=>{i(Je(r,u,e,t))},t[21]=r,t[22]=i,t[23]=u,t[24]=ne):ne=t[24];let R=ne,z;t[25]===i?z=t[26]:(z=e=>{m(e);let t;try{t=JSON.parse(e)}catch(e){let t=e;g(t instanceof Error?t.message:`Invalid JSON`);return}if(!_e(t)){g(`Invalid theme schema. Need string id/name and string-only light/dark tokens.`);return}g(null),i(t)},t[25]=i,t[26]=z);let re=z,ie;t[27]!==j||t[28]!==o?(ie=()=>{if(j){O(!0);return}o()},t[27]=j,t[28]=o,t[29]=ie):ie=t[29];let ae=ie,oe,se,ue;if(t[30]!==r.dark||t[31]!==r.light||t[32]!==u){ue=(u===`dark`?r.dark:r.light)??{};let e;t[36]===u?e=t[37]:(e=(u===`dark`?be.dark:be.light)??{},t[36]=u,t[37]=e),oe=e,se=Object.entries(ue).filter(tt),t[30]=r.dark,t[31]=r.light,t[32]=u,t[33]=oe,t[34]=se,t[35]=ue}else oe=t[33],se=t[34],ue=t[35];let de=se,B=$e,fe=B(r.light)||B(r.dark),pe;t[38]!==r.name||t[39]!==fe||t[40]!==h?(pe=h!==null||r.name.trim().length===0||fe,t[38]=r.name,t[39]=fe,t[40]=h,t[41]=pe):pe=t[41];let me=pe,he;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,Q.jsx)(`span`,{className:`text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Editing`}),t[42]=he):he=t[42];let V=r.name||`Untitled`,ge;t[43]!==r.name||t[44]!==V?(ge=(0,Q.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,title:r.name,children:V}),t[43]=r.name,t[44]=V,t[45]=ge):ge=t[45];let H;t[46]===j?H=t[47]:(H=j?(0,Q.jsx)(`span`,{className:`rounded-sm bg-warning/16 px-1.5 py-0.5 text-[10px] font-medium text-warning-foreground`,children:`Unsaved`}):null,t[46]=j,t[47]=H);let U;t[48]===ae?U=t[49]:(U=(0,Q.jsx)(v,{size:`sm`,variant:`outline`,onClick:ae,children:`Cancel`}),t[48]=ae,t[49]=U);let ve;t[50]!==a||t[51]!==me?(ve=(0,Q.jsx)(v,{size:`sm`,onClick:a,disabled:me,children:`Save`}),t[50]=a,t[51]=me,t[52]=ve):ve=t[52];let W;t[53]!==U||t[54]!==ve?(W=(0,Q.jsxs)(`div`,{className:`ms-auto flex items-center gap-2`,children:[U,ve]}),t[53]=U,t[54]=ve,t[55]=W):W=t[55];let ye;t[56]!==ge||t[57]!==H||t[58]!==W?(ye=(0,Q.jsxs)(`div`,{className:`sticky top-0 z-10 flex flex-wrap items-center gap-2 border-b border-border/60 bg-muted/72 px-4 py-2 backdrop-blur-sm sm:px-5`,children:[he,ge,H,W]}),t[56]=ge,t[57]=H,t[58]=W,t[59]=ye):ye=t[59];let G;t[60]===c?G=t[61]:(G=[c],t[60]=c,t[61]=G);let Se,Ce,q;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Se=e=>{let t=e[0];(t===`form`||t===`json`)&&l(t)},Ce=(0,Q.jsx)(K,{value:`form`,"aria-label":`Form editor`,className:`px-3 sm:px-3`,children:`Form`}),q=(0,Q.jsx)(K,{value:`json`,"aria-label":`JSON editor`,className:`px-3 sm:px-3`,children:`JSON`}),t[62]=Se,t[63]=Ce,t[64]=q):(Se=t[62],Ce=t[63],q=t[64]);let J;t[65]===G?J=t[66]:(J=(0,Q.jsxs)(xe,{value:G,variant:`outline`,size:`sm`,onValueChange:Se,children:[Ce,q]}),t[65]=G,t[66]=J);let we;t[67]===u?we=t[68]:(we=[u],t[67]=u,t[68]=we);let Te,Ee,De;t[69]===Symbol.for(`react.memo_cache_sentinel`)?(Te=e=>{let t=e[0];(t===`light`||t===`dark`)&&d(t)},Ee=(0,Q.jsx)(K,{value:`light`,"aria-label":`Light variant`,className:`px-3 sm:px-3`,children:`Light`}),De=(0,Q.jsx)(K,{value:`dark`,"aria-label":`Dark variant`,className:`px-3 sm:px-3`,children:`Dark`}),t[69]=Te,t[70]=Ee,t[71]=De):(Te=t[69],Ee=t[70],De=t[71]);let Oe;t[72]===we?Oe=t[73]:(Oe=(0,Q.jsxs)(xe,{value:we,variant:`outline`,size:`sm`,onValueChange:Te,children:[Ee,De]}),t[72]=we,t[73]=Oe);let ke;t[74]!==J||t[75]!==Oe?(ke=(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[J,Oe]}),t[74]=J,t[75]=Oe,t[76]=ke):ke=t[76];let Z;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,Q.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:`Name`}),t[77]=Z):Z=t[77];let Ae;t[78]===L?Ae=t[79]:(Ae=e=>L(e.currentTarget.value),t[78]=L,t[79]=Ae);let je;t[80]===r.name?je=t[81]:(je=r.name.trim().length===0||void 0,t[80]=r.name,t[81]=je);let Me;t[82]!==r.name||t[83]!==Ae||t[84]!==je?(Me=(0,Q.jsxs)(`label`,{className:`space-y-1.5`,children:[Z,(0,Q.jsx)(_,{value:r.name,nativeInput:!0,onChange:Ae,"aria-invalid":je})]}),t[82]=r.name,t[83]=Ae,t[84]=je,t[85]=Me):Me=t[85];let Ne;t[86]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,Q.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:`Description`}),t[86]=Ne):Ne=t[86];let Pe=r.description??``,Fe;t[87]===te?Fe=t[88]:(Fe=e=>te(e.currentTarget.value),t[87]=te,t[88]=Fe);let Ie;t[89]!==Pe||t[90]!==Fe?(Ie=(0,Q.jsxs)(`label`,{className:`space-y-1.5`,children:[Ne,(0,Q.jsx)(_,{value:Pe,nativeInput:!0,onChange:Fe,placeholder:`Optional, shown under the picker.`})]}),t[89]=Pe,t[90]=Fe,t[91]=Ie):Ie=t[91];let Le;t[92]!==Me||t[93]!==Ie?(Le=(0,Q.jsxs)(`div`,{className:`mt-4 grid gap-3 sm:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]`,children:[Me,Ie]}),t[92]=Me,t[93]=Ie,t[94]=Le):Le=t[94];let Re;t[95]!==re||t[96]!==R||t[97]!==oe||t[98]!==h||t[99]!==p||t[100]!==c||t[101]!==de||t[102]!==ue?(Re=c===`form`?(0,Q.jsxs)(`div`,{className:`mt-5 space-y-5`,children:[We.map(e=>(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(`h4`,{className:`text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:e.title}),(0,Q.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:e.tokens.map(e=>{let t=ue[e]??``,n=oe[e]??``,r=le(e);return r?(0,Q.jsx)(nt,{token:e,kind:r,value:t,inherited:n,onChange:t=>R(e,t)},e):null})})]},e.title)),de.length>0?(0,Q.jsxs)(`p`,{className:`text-xs text-warning-foreground`,children:[de.length,` token`,de.length===1?``:`s`,` not in the allow-list will be ignored on save.`]}):null]}):(0,Q.jsxs)(`div`,{className:`mt-5 space-y-2`,children:[(0,Q.jsx)(y,{value:p,size:`sm`,className:`font-mono text-xs`,spellCheck:!1,rows:18,onChange:e=>re(e.currentTarget.value),"aria-invalid":h!==null||void 0}),h?(0,Q.jsx)(`p`,{className:`text-xs text-destructive-foreground`,children:h}):(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground/80`,children:`Edit the JSON directly. Save is disabled while the schema is invalid.`})]}),t[95]=re,t[96]=R,t[97]=oe,t[98]=h,t[99]=p,t[100]=c,t[101]=de,t[102]=ue,t[103]=Re):Re=t[103];let ze;t[104]!==ke||t[105]!==Le||t[106]!==Re?(ze=(0,Q.jsxs)(`div`,{className:`px-4 py-4 sm:px-5`,children:[ke,Le,Re]}),t[104]=ke,t[105]=Le,t[106]=Re,t[107]=ze):ze=t[107];let Be;t[108]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,Q.jsx)(T,{children:`Discard your changes?`}),t[108]=Be):Be=t[108];let Ve;t[109]===n.name?Ve=t[110]:(Ve=(0,Q.jsxs)(b,{children:[Be,(0,Q.jsxs)(w,{children:[`You have unsaved edits to `,n.name,`. Discarding will revert any token changes you made.`]})]}),t[109]=n.name,t[110]=Ve);let He;t[111]===Symbol.for(`react.memo_cache_sentinel`)?(He=(0,Q.jsx)(S,{render:(0,Q.jsx)(v,{variant:`outline`}),children:`Keep editing`}),t[111]=He):He=t[111];let Ue;t[112]===o?Ue=t[113]:(Ue=(0,Q.jsxs)(x,{children:[He,(0,Q.jsx)(v,{variant:`destructive`,onClick:()=>{O(!1),o()},children:`Discard changes`})]}),t[112]=o,t[113]=Ue);let Ge;t[114]!==Ve||t[115]!==Ue?(Ge=(0,Q.jsxs)(C,{children:[Ve,Ue]}),t[114]=Ve,t[115]=Ue,t[116]=Ge):Ge=t[116];let $;t[117]!==D||t[118]!==Ge?($=(0,Q.jsx)(E,{open:D,onOpenChange:O,children:Ge}),t[117]=D,t[118]=Ge,t[119]=$):$=t[119];let Ke;return t[120]!==ye||t[121]!==ze||t[122]!==$?(Ke=(0,Q.jsxs)(`div`,{className:`border-t border-border/60 bg-muted/24`,children:[ye,ze,$]}),t[120]=ye,t[121]=ze,t[122]=$,t[123]=Ke):Ke=t[123],Ke}function $e(e){return Object.entries(e??{}).some(et)}function et(e){let[t,n]=e;if(typeof n!=`string`||n.length===0)return!1;let r=le(t);return r?!V(r,n):!1}function tt(e){let[t]=e;return!Ge.has(t)}function nt(e){let t=(0,X.c)(12),{token:n,kind:r,value:i,inherited:a,onChange:o}=e,s=i.length>0,c=r===`font-family`&&`sm:col-span-2`,l;t[0]===c?l=t[1]:(l=h(`rounded-md border border-border/60 bg-background px-2 py-1.5`,c),t[0]=c,t[1]=l);let u;t[2]!==a||t[3]!==r||t[4]!==o||t[5]!==s||t[6]!==n||t[7]!==i?(u=r===`color`?(0,Q.jsx)(at,{token:n,value:i,inherited:a,overridden:s,onChange:o}):r===`opacity`?(0,Q.jsx)(ot,{token:n,value:i,inherited:a,overridden:s,onChange:o}):r===`length`?(0,Q.jsx)(st,{token:n,value:i,inherited:a,overridden:s,onChange:o}):(0,Q.jsx)(lt,{token:n,value:i,inherited:a,overridden:s,onChange:o}),t[2]=a,t[3]=r,t[4]=o,t[5]=s,t[6]=n,t[7]=i,t[8]=u):u=t[8];let d;return t[9]!==l||t[10]!==u?(d=(0,Q.jsx)(`div`,{className:l,children:u}),t[9]=l,t[10]=u,t[11]=d):d=t[11],d}function rt(e){let t=(0,X.c)(6),{token:n,onChange:r}=e,i=`Reset --${n}`,a;t[0]===r?a=t[1]:(a=()=>r(``),t[0]=r,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(m,{className:`size-3.5`,"aria-hidden":!0}),t[2]=o):o=t[2];let s;return t[3]!==i||t[4]!==a?(s=(0,Q.jsx)(v,{size:`icon-xs`,variant:`ghost`,"aria-label":i,onClick:a,className:`text-muted-foreground`,children:o}),t[3]=i,t[4]=a,t[5]=s):s=t[5],s}function it(e){let t=(0,X.c)(6),{token:n,overridden:r}=e,i=r?`text-foreground`:`text-muted-foreground/70`,a;t[0]===i?a=t[1]:(a=h(`truncate font-mono text-[11px]`,i),t[0]=i,t[1]=a);let o=`--${n}`,s;return t[2]!==a||t[3]!==o||t[4]!==n?(s=(0,Q.jsxs)(`span`,{className:a,title:o,children:[`--`,n]}),t[2]=a,t[3]=o,t[4]=n,t[5]=s):s=t[5],s}function at(e){let t=(0,X.c)(41),{token:n,value:r,inherited:i,overridden:a,onChange:o}=e,s=r||i,c,l,u,d,f;if(t[0]!==s||t[1]!==r){u=pe(s);let e;t[7]===r?e=t[8]:(e=r.length>0&&!B(r),t[7]=r,t[8]=e),l=e,f=`flex items-center gap-2`,c=Ue,d=qe(u),t[0]=s,t[1]=r,t[2]=c,t[3]=l,t[4]=u,t[5]=d,t[6]=f}else c=t[2],l=t[3],u=t[4],d=t[5],f=t[6];let p;t[9]===o?p=t[10]:(p=e=>o(e),t[9]=o,t[10]=p);let m=`Pick a color for --${n}`,h=l?`transparent`:u||`transparent`,g;t[11]===h?g=t[12]:(g=(0,Q.jsx)(`span`,{className:`pointer-events-none absolute inset-0`,style:{backgroundColor:h},"aria-hidden":!0}),t[11]=h,t[12]=g);let v;t[13]!==c||t[14]!==d||t[15]!==p||t[16]!==m||t[17]!==g?(v=(0,Q.jsx)(c,{value:d,onChange:p,ariaLabel:m,children:g}),t[13]=c,t[14]=d,t[15]=p,t[16]=m,t[17]=g,t[18]=v):v=t[18];let y;t[19]!==a||t[20]!==n?(y=(0,Q.jsx)(it,{token:n,overridden:a}),t[19]=a,t[20]=n,t[21]=y):y=t[21];let b=i||`inherit default`,x=l||void 0,S;t[22]===o?S=t[23]:(S=e=>o(e.currentTarget.value),t[22]=o,t[23]=S);let C;t[24]!==x||t[25]!==S||t[26]!==b||t[27]!==r?(C=(0,Q.jsx)(_,{value:r,nativeInput:!0,unstyled:!0,size:`sm`,className:`border-0 bg-transparent p-0 shadow-none focus-within:shadow-none`,placeholder:b,"aria-invalid":x,onChange:S}),t[24]=x,t[25]=S,t[26]=b,t[27]=r,t[28]=C):C=t[28];let w;t[29]!==C||t[30]!==y?(w=(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[y,C]}),t[29]=C,t[30]=y,t[31]=w):w=t[31];let T;t[32]!==o||t[33]!==a||t[34]!==n?(T=a?(0,Q.jsx)(rt,{token:n,onChange:o}):null,t[32]=o,t[33]=a,t[34]=n,t[35]=T):T=t[35];let E;return t[36]!==w||t[37]!==T||t[38]!==f||t[39]!==v?(E=(0,Q.jsxs)(`div`,{className:f,children:[v,w,T]}),t[36]=w,t[37]=T,t[38]=f,t[39]=v,t[40]=E):E=t[40],E}function ot(e){let t=(0,X.c)(31),{token:n,value:r,inherited:i,overridden:a,onChange:o}=e,s=Number(r||i),c;t[0]===s?c=t[1]:(c=Number.isFinite(s)?Math.min(1,Math.max(0,s)):0,t[0]=s,t[1]=c);let l=c,u;t[2]===r?u=t[3]:(u=r.length>0&&!V(`opacity`,r),t[2]=r,t[3]=u);let d=u,f;t[4]!==a||t[5]!==n?(f=(0,Q.jsx)(it,{token:n,overridden:a}),t[4]=a,t[5]=n,t[6]=f):f=t[6];let p;t[7]===o?p=t[8]:(p=e=>o(e.currentTarget.value),t[7]=o,t[8]=p);let m=`--${n} value`,h;t[9]!==l||t[10]!==p||t[11]!==m?(h=(0,Q.jsx)(`input`,{type:`range`,min:0,max:1,step:.005,value:l,onChange:p,"aria-label":m,className:`h-7.5 flex-1 accent-primary cursor-pointer`}),t[9]=l,t[10]=p,t[11]=m,t[12]=h):h=t[12];let g=i||`0`,v=d||void 0,y;t[13]===o?y=t[14]:(y=e=>o(e.currentTarget.value),t[13]=o,t[14]=y);let b;t[15]!==g||t[16]!==v||t[17]!==y||t[18]!==r?(b=(0,Q.jsx)(`div`,{className:`w-20 shrink-0`,children:(0,Q.jsx)(_,{value:r,nativeInput:!0,type:`number`,min:0,max:1,step:.005,size:`sm`,placeholder:g,"aria-invalid":v,onChange:y})}),t[15]=g,t[16]=v,t[17]=y,t[18]=r,t[19]=b):b=t[19];let x;t[20]!==o||t[21]!==a||t[22]!==n?(x=a?(0,Q.jsx)(rt,{token:n,onChange:o}):null,t[20]=o,t[21]=a,t[22]=n,t[23]=x):x=t[23];let S;t[24]!==b||t[25]!==x||t[26]!==h?(S=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[h,b,x]}),t[24]=b,t[25]=x,t[26]=h,t[27]=S):S=t[27];let C;return t[28]!==S||t[29]!==f?(C=(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[f,S]}),t[28]=S,t[29]=f,t[30]=C):C=t[30],C}function st(e){let t=(0,X.c)(67),{token:n,value:r,inherited:i,overridden:a,onChange:o}=e,s,c,l,u,d;if(t[0]!==i||t[1]!==o||t[2]!==a||t[3]!==n||t[4]!==r){d=Symbol.for(`react.early_return_sentinel`);bb0:{l=fe(r),c=fe(i);let e=c?Ze(c.unit):!1,f=l?Ze(l.unit):!1;if(r.length>0&&!f||r.length===0&&i.length>0&&!e){let e;t[10]===r?e=t[11]:(e=r.length>0&&!V(`length`,r),t[10]=r,t[11]=e);let s=e,c;t[12]!==a||t[13]!==n?(c=(0,Q.jsx)(it,{token:n,overridden:a}),t[12]=a,t[13]=n,t[14]=c):c=t[14];let l=i||`e.g. 1rem`,u=s||void 0,f;t[15]===o?f=t[16]:(f=e=>o(e.currentTarget.value),t[15]=o,t[16]=f);let p;t[17]!==l||t[18]!==u||t[19]!==f||t[20]!==r?(p=(0,Q.jsx)(_,{value:r,nativeInput:!0,size:`sm`,placeholder:l,"aria-invalid":u,onChange:f}),t[17]=l,t[18]=u,t[19]=f,t[20]=r,t[21]=p):p=t[21];let m;t[22]!==o||t[23]!==a||t[24]!==n?(m=a?(0,Q.jsx)(rt,{token:n,onChange:o}):null,t[22]=o,t[23]=a,t[24]=n,t[25]=m):m=t[25];let h;t[26]!==p||t[27]!==m?(h=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p,m]}),t[26]=p,t[27]=m,t[28]=h):h=t[28];let g;t[29]!==h||t[30]!==c?(g=(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[c,h]}),t[29]=h,t[30]=c,t[31]=g):g=t[31],d=g;break bb0}s=l?String(l.number):``,u=l&&Ze(l.unit)?l.unit:c&&Ze(c.unit)?c.unit:`rem`}t[0]=i,t[1]=o,t[2]=a,t[3]=n,t[4]=r,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d}else s=t[5],c=t[6],l=t[7],u=t[8],d=t[9];if(d!==Symbol.for(`react.early_return_sentinel`))return d;let f=u,p=c?String(c.number):``,m;t[32]!==o||t[33]!==f?(m=e=>{let t=e.trim();if(t.length===0){o(``);return}let n=Number(t);Number.isFinite(n)&&o(`${n}${f}`)},t[32]=o,t[33]=f,t[34]=m):m=t[34];let h=m,g;t[35]!==o||t[36]!==c||t[37]!==l?(g=e=>{if(l){o(`${l.number}${e}`);return}c&&o(`${c.number}${e}`)},t[35]=o,t[36]=c,t[37]=l,t[38]=g):g=t[38];let v=g,y;t[39]!==a||t[40]!==n?(y=(0,Q.jsx)(it,{token:n,overridden:a}),t[39]=a,t[40]=n,t[41]=y):y=t[41];let b=n===`font-size-base`?1:.05,x;t[42]===h?x=t[43]:(x=e=>h(e.currentTarget.value),t[42]=h,t[43]=x);let S;t[44]!==p||t[45]!==s||t[46]!==b||t[47]!==x?(S=(0,Q.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,Q.jsx)(_,{value:s,nativeInput:!0,type:`number`,step:b,size:`sm`,placeholder:p,onChange:x})}),t[44]=p,t[45]=s,t[46]=b,t[47]=x,t[48]=S):S=t[48];let C;t[49]===v?C=t[50]:(C=e=>v(e.currentTarget.value),t[49]=v,t[50]=C);let w=`--${n} unit`,T;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(T=H.map(ct),t[51]=T):T=t[51];let E;t[52]!==w||t[53]!==C||t[54]!==f?(E=(0,Q.jsx)(`select`,{value:f,onChange:C,"aria-label":w,className:`h-7.5 rounded-md border border-input bg-background px-2 text-sm outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/24 sm:h-6.5 sm:text-xs`,children:T}),t[52]=w,t[53]=C,t[54]=f,t[55]=E):E=t[55];let D;t[56]!==o||t[57]!==a||t[58]!==n?(D=a?(0,Q.jsx)(rt,{token:n,onChange:o}):null,t[56]=o,t[57]=a,t[58]=n,t[59]=D):D=t[59];let O;t[60]!==E||t[61]!==D||t[62]!==S?(O=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[S,E,D]}),t[60]=E,t[61]=D,t[62]=S,t[63]=O):O=t[63];let k;return t[64]!==O||t[65]!==y?(k=(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[y,O]}),t[64]=O,t[65]=y,t[66]=k):k=t[66],k}function ct(e){return(0,Q.jsx)(`option`,{value:e,children:e},e)}function lt(e){let t=(0,X.c)(25),{token:n,value:r,inherited:i,overridden:a,onChange:o}=e,s=r||i,c;t[0]===r?c=t[1]:(c=r.length>0&&!V(`font-family`,r),t[0]=r,t[1]=c);let l=c,u;t[2]!==a||t[3]!==n?(u=(0,Q.jsx)(it,{token:n,overridden:a}),t[2]=a,t[3]=n,t[4]=u):u=t[4];let d=i||`system-ui, sans-serif`,f=s||void 0,p;t[5]===f?p=t[6]:(p={fontFamily:f},t[5]=f,t[6]=p);let m=l||void 0,h;t[7]===o?h=t[8]:(h=e=>o(e.currentTarget.value),t[7]=o,t[8]=h);let g;t[9]!==d||t[10]!==p||t[11]!==m||t[12]!==h||t[13]!==r?(g=(0,Q.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,Q.jsx)(_,{value:r,nativeInput:!0,size:`sm`,placeholder:d,style:p,"aria-invalid":m,onChange:h})}),t[9]=d,t[10]=p,t[11]=m,t[12]=h,t[13]=r,t[14]=g):g=t[14];let v;t[15]!==o||t[16]!==a||t[17]!==n?(v=a?(0,Q.jsx)(rt,{token:n,onChange:o}):null,t[15]=o,t[16]=a,t[17]=n,t[18]=v):v=t[18];let y;t[19]!==g||t[20]!==v?(y=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[g,v]}),t[19]=g,t[20]=v,t[21]=y):y=t[21];let b;return t[22]!==y||t[23]!==u?(b=(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[u,y]}),t[22]=y,t[23]=u,t[24]=b):b=t[24],b}var ut=[{value:`system`,label:`System`},{value:`light`,label:`Light`},{value:`dark`,label:`Dark`}],dt={default:1,light:.92,medium:.84,high:.78,glass:.72};function ft({surface:e=`node`}={}){let t=e===`hub`,{theme:n,setTheme:r,resolvedTheme:a,activeThemeId:u,setActiveTheme:m}=ve(),_=i(e=>e.wideComposerControlsAutoCollapse),y=i(e=>e.setWideComposerControlsAutoCollapse),M=i(e=>e.alwaysUseBuildMode),N=i(e=>e.setAlwaysUseBuildMode),[P,R]=(0,Y.useState)(null),[le,B]=(0,Y.useState)(null),[fe,pe]=(0,Y.useState)(null),[V,_e]=(0,Y.useState)(()=>z()),[H,be]=(0,Y.useState)(0),G=(0,Y.useRef)(null),xe=W(),K=(0,Y.useMemo)(()=>P!==null&&le!==null?{source:ue(P),draft:le}:null,[le,P,H]),X=fe?ue(fe):null,Z=(0,Y.useCallback)(()=>be(e=>e+1),[]);(0,Y.useEffect)(()=>{if(typeof window>`u`)return;let e=e=>{e.key===`ryco:appearance-preferences`&&_e(z())};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]);let Ae=(0,Y.useCallback)((e,t)=>{ee(e,t),ie(),_e(z())},[]),je=(0,Y.useCallback)(e=>{oe(e),ie(),_e(z())},[]),Me=(0,Y.useCallback)(()=>{oe(`primaryColorMode`),oe(`primaryColor`),ie(),_e(z())},[]),Ne=(0,Y.useCallback)(e=>{ee(`primaryColorMode`,e?`custom`:`theme`),ie(),_e(z())},[]),Pe=(0,Y.useCallback)(e=>{ee(`primaryColor`,e),ee(`primaryColorMode`,`custom`),ie(),_e(z())},[]),Re=(0,Y.useCallback)(e=>{if(de(e.id)){let t=U(e);me(t),se(t.id),m(t.id),R(t.id),B(t),Z();return}m(e.id),R(e.id),B(e)},[Z,m]),ze=(0,Y.useCallback)(e=>{let t=U(e);me(t),m(t.id),R(t.id),B(t),Z()},[Z,m]),Be=(0,Y.useCallback)(()=>{let e={id:he(`new`),name:`New theme`,builtIn:!1};me(e),m(e.id),R(e.id),B(e),Z()},[Z,m]),Ve=(0,Y.useCallback)(()=>{K&&(ye(K.source.id,K.draft),K.source.id===K.draft.id?ce(K.draft):m(K.draft.id),R(null),B(null),Z())},[K,Z,m]),He=(0,Y.useCallback)(()=>{K&&ce(K.source),R(null),B(null)},[K]),Ue=(0,Y.useCallback)(()=>{fe&&(P===fe&&(R(null),B(null)),ge(fe),pe(null),Z())},[P,fe,Z]),We=(0,Y.useCallback)(e=>{try{Ie(e)}catch(e){o.add({type:`error`,title:`Could not export theme`,description:e instanceof Error?e.message:`Download failed.`})}},[]),Ge=(0,Y.useCallback)(async e=>{try{await Fe(e),o.add({type:`success`,title:`Copied theme JSON`,description:`${e.name} is ready to paste.`})}catch(e){o.add({type:`error`,title:`Could not copy theme`,description:e instanceof Error?e.message:`Clipboard write failed.`})}},[]),$=(0,Y.useCallback)(()=>{G.current?.click()},[]),Ke=(0,Y.useCallback)(async e=>{let t=e.target.files?.[0];if(e.target.value=``,t)try{let e=await Le(t,{collision:`rename`,activate:!0});m(e.theme.id),Z(),o.add({type:`success`,title:`Imported "${e.theme.name}"`,description:e.action===`renamed`?`An existing theme used the same id, so it was imported as "${e.theme.id}".`:`Theme imported and activated.`})}catch(e){o.add({type:`error`,title:`Could not import theme`,description:e instanceof Error?e.message:`Invalid theme file.`})}},[Z,m]);return(0,Q.jsxs)(Ce,{children:[(0,Q.jsxs)(Se,{title:`Interface controls`,children:[(0,Q.jsx)(q,{title:`Interface font`,description:`Normal app text, navigation, dialogs, and controls.`,resetAction:I(`fontFamilySans`)?(0,Q.jsx)(J,{label:`interface font`,onClick:()=>je(`fontFamilySans`)}):null,control:(0,Q.jsx)(pt,{ariaLabel:`Interface font`,icon:(0,Q.jsx)(Oe,{className:`size-3.5`}),options:L,value:V.fontFamilySans,sample:`The quick brown fox`,onChange:e=>Ae(`fontFamilySans`,e)})}),t?null:(0,Q.jsx)(q,{title:`Code font`,description:`Code blocks, diffs, file paths, and terminal surfaces.`,resetAction:I(`fontFamilyMono`)?(0,Q.jsx)(J,{label:`code font`,onClick:()=>je(`fontFamilyMono`)}):null,control:(0,Q.jsx)(pt,{ariaLabel:`Code font`,icon:(0,Q.jsx)(Te,{className:`size-3.5`}),options:ne,value:V.fontFamilyMono,sample:`const answer = 42`,onChange:e=>Ae(`fontFamilyMono`,e)})}),(0,Q.jsx)(q,{title:`Text size`,description:`Scale the interface independently from the active theme.`,resetAction:I(`fontSizeBase`)?(0,Q.jsx)(J,{label:`text size`,onClick:()=>je(`fontSizeBase`)}):null,control:(0,Q.jsx)(ht,{ariaLabel:`Text size`,icon:(0,Q.jsx)(we,{className:`size-3.5`}),options:re,value:V.fontSizeBase,onChange:e=>Ae(`fontSizeBase`,e),preview:(0,Q.jsx)(`span`,{className:`flex h-9 min-w-14 items-center justify-center rounded-md border border-border/70 bg-background px-2 font-semibold text-foreground shadow-xs/5`,children:(0,Q.jsx)(`span`,{style:{fontSize:V.fontSizeBase},children:`Aa`})})})}),t?null:(0,Q.jsx)(q,{title:`Corner radius`,description:`Adjust rounding for panels, buttons, inputs, and menus globally.`,resetAction:I(`radius`)?(0,Q.jsx)(J,{label:`corner radius`,onClick:()=>je(`radius`)}):null,control:(0,Q.jsx)(ht,{ariaLabel:`Corner radius`,icon:(0,Q.jsx)(De,{className:`size-3.5`}),options:ae,value:V.radius,onChange:e=>Ae(`radius`,e),preview:(0,Q.jsxs)(`span`,{className:`grid h-9 min-w-14 grid-cols-2 gap-1 rounded-md border border-border/70 bg-background p-1.5 shadow-xs/5`,children:[(0,Q.jsx)(`span`,{className:`border border-primary/55 bg-primary/15`,style:{borderRadius:V.radius}}),(0,Q.jsx)(`span`,{className:`border border-muted-foreground/30 bg-muted`,style:{borderRadius:V.radius}})]})})}),(0,Q.jsx)(q,{title:`Primary color`,description:`Theme palettes control buttons by default; enable a custom color to pin one app accent.`,resetAction:I(`primaryColorMode`)||I(`primaryColor`)?(0,Q.jsx)(J,{label:`primary color`,onClick:Me}):null,control:(0,Q.jsx)(mt,{mode:V.primaryColorMode,value:V.primaryColor,onModeChange:Ne,onColorChange:Pe})}),(0,Q.jsx)(q,{title:`Transparency`,description:`Adjust glass and floating surfaces like dialogs, menus, popups, and toasts.`,resetAction:I(`surfaceTransparency`)?(0,Q.jsx)(J,{label:`transparency`,onClick:()=>je(`surfaceTransparency`)}):null,control:(0,Q.jsx)(ht,{ariaLabel:`Transparency`,icon:(0,Q.jsx)(Ee,{className:`size-3.5`}),options:te,value:V.surfaceTransparency,onChange:e=>Ae(`surfaceTransparency`,e),preview:(0,Q.jsx)(`span`,{className:`relative h-9 min-w-14 overflow-hidden rounded-md border border-border/70 bg-[linear-gradient(135deg,var(--color-sky-500)_0_20%,var(--color-emerald-500)_20%_40%,var(--color-amber-500)_40%_60%,var(--color-fuchsia-500)_60%_80%,var(--color-slate-500)_80%_100%)] p-1.5 shadow-xs/5`,children:(0,Q.jsx)(`span`,{className:`block h-full rounded border border-border/70 bg-popover`,style:{opacity:dt[V.surfaceTransparency]??dt.default}})})})})]}),(0,Q.jsx)(Se,{title:`Theme palette`,headerAction:(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Q.jsx)(`input`,{ref:G,type:`file`,accept:`.json,application/json`,className:`sr-only`,onChange:Ke,"aria-hidden":!0,tabIndex:-1}),(0,Q.jsxs)(v,{size:`xs`,variant:`ghost`,onClick:Be,"aria-label":`Create a new theme`,title:`Create a new theme`,className:`text-muted-foreground`,children:[(0,Q.jsx)(f,{className:`size-3.5`}),`New`]}),(0,Q.jsxs)(v,{size:`xs`,variant:`ghost`,onClick:$,"aria-label":`Import a theme from file`,title:`Import a theme from disk`,className:`text-muted-foreground`,children:[(0,Q.jsx)(ke,{className:`size-3.5`}),`Import`]})]}),children:(0,Q.jsx)(`div`,{role:`radiogroup`,"aria-label":`Theme palette`,children:xe.map((e,t)=>{let n=e.id===u,r=P===e.id;return(0,Q.jsxs)(Y.Fragment,{children:[(0,Q.jsxs)(`div`,{role:`radio`,"aria-checked":n,tabIndex:n?0:-1,onClick:()=>m(e.id),onKeyDown:t=>{(t.key===` `||t.key===`Enter`)&&(t.preventDefault(),m(e.id))},className:h(`flex cursor-pointer flex-wrap items-center gap-3 px-4 py-3 outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset sm:px-5`,t>0?`border-t border-border/60`:``,n?`bg-muted/40`:`hover:bg-muted/24`),children:[(0,Q.jsx)(`span`,{"aria-hidden":!0,className:h(`relative flex size-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors`,n?`border-primary`:`border-muted-foreground/40`),children:n?(0,Q.jsx)(`span`,{className:`size-2 rounded-full bg-primary`,"aria-hidden":!0}):null}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,title:e.name,children:e.name}),(0,Q.jsx)(F,{variant:`outline`,size:`sm`,children:e.builtIn?`Built-in`:`Custom`})]}),e.description?(0,Q.jsx)(`span`,{className:`truncate text-xs text-muted-foreground/80`,title:e.description,children:e.description}):null]}),(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[e.builtIn?null:(0,Q.jsx)(v,{size:`icon-xs`,variant:`ghost`,"aria-label":`Edit ${e.name}`,title:`Edit`,onClick:()=>Re(e),className:`text-muted-foreground`,children:(0,Q.jsx)(d,{className:`size-3.5`})}),(0,Q.jsx)(v,{size:`icon-xs`,variant:`ghost`,"aria-label":`Duplicate ${e.name}`,title:`Duplicate`,onClick:()=>ze(e),className:`text-muted-foreground`,children:(0,Q.jsx)(c,{className:`size-3.5`})}),(0,Q.jsx)(v,{size:`icon-xs`,variant:`ghost`,"aria-label":`Export ${e.name}`,title:`Export`,onClick:()=>We(e),className:`text-muted-foreground`,children:(0,Q.jsx)(l,{className:`size-3.5`})}),(0,Q.jsx)(v,{size:`icon-xs`,variant:`ghost`,"aria-label":`Copy ${e.name} JSON`,title:`Copy JSON`,onClick:()=>void Ge(e),className:`text-muted-foreground`,children:(0,Q.jsx)(s,{className:`size-3.5`})}),e.builtIn?null:(0,Q.jsx)(v,{size:`icon-xs`,variant:`ghost`,"aria-label":`Delete ${e.name}`,title:`Delete`,onClick:()=>pe(e.id),className:`text-destructive-foreground`,children:(0,Q.jsx)(p,{className:`size-3.5`})})]})]}),r&&K?(0,Q.jsx)(Qe,{source:K.source,draft:K.draft,onDraftChange:e=>B(e),onSave:Ve,onCancel:He,resolvedVariant:a}):null]},e.id)})})}),t?null:(0,Q.jsxs)(Se,{title:`Composer controls`,children:[(0,Q.jsx)(q,{title:`Auto-collapse wide composer labels`,description:`Show long composer mode labels only on hover or focus.`,resetAction:_?null:(0,Q.jsx)(J,{label:`wide composer labels`,onClick:()=>y(!0)}),control:(0,Q.jsx)(g,{checked:_,onCheckedChange:e=>y(!!e),"aria-label":`Auto-collapse wide composer labels`})}),(0,Q.jsx)(q,{title:`Always use Build mode`,description:`Hide the mode selector in the composer and send every turn in Build mode.`,resetAction:M?(0,Q.jsx)(J,{label:`always use Build mode`,onClick:()=>N(!1)}):null,control:(0,Q.jsx)(g,{checked:M,onCheckedChange:e=>N(!!e),"aria-label":`Always use Build mode`})})]}),(0,Q.jsx)(Se,{title:`Color mode`,children:(0,Q.jsx)(q,{title:`Theme variant`,description:`Choose between light, dark, or following the system preference.`,resetAction:n===`system`?null:(0,Q.jsx)(J,{label:`color mode`,onClick:()=>r(`system`)}),control:(0,Q.jsxs)(j,{value:n,onValueChange:e=>{(e===`system`||e===`light`||e===`dark`)&&r(e)},children:[(0,Q.jsx)(k,{className:`w-full sm:w-40`,"aria-label":`Color mode`,children:(0,Q.jsx)(A,{children:ut.find(e=>e.value===n)?.label??`System`})}),(0,Q.jsx)(D,{align:`end`,alignItemWithTrigger:!1,children:ut.map(e=>(0,Q.jsx)(O,{hideIndicator:!0,value:e.value,children:e.label},e.value))})]})})}),(0,Q.jsx)(E,{open:fe!==null,onOpenChange:e=>{e||pe(null)},children:(0,Q.jsxs)(C,{children:[(0,Q.jsxs)(b,{children:[(0,Q.jsx)(T,{children:`Delete custom theme?`}),(0,Q.jsx)(w,{children:X?`"${X.name}" will be removed permanently. This action cannot be undone.`:`This action cannot be undone.`})]}),(0,Q.jsxs)(x,{children:[(0,Q.jsx)(S,{render:(0,Q.jsx)(v,{variant:`outline`}),children:`Cancel`}),(0,Q.jsx)(v,{variant:`destructive`,onClick:Ue,children:`Delete theme`})]})]})})]})}function pt(e){let t=(0,X.c)(43),{ariaLabel:n,icon:r,options:i,value:a,sample:o,onChange:s}=e,c;if(t[0]!==i||t[1]!==a){let e;t[3]===a?e=t[4]:(e=e=>e.value===a,t[3]=a,t[4]=e),c=i.findIndex(e),t[0]=i,t[1]=a,t[2]=c}else c=t[2];let l=Math.max(0,c),u=i[l]??i[0],d;t[5]===r?d=t[6]:(d=(0,Q.jsx)(`span`,{className:`inline-flex size-7 shrink-0 items-center justify-center rounded-md border border-border/70 bg-muted/60 text-muted-foreground`,children:r}),t[5]=r,t[6]=d);let f=u?.value??a,p;t[7]===f?p=t[8]:(p={fontFamily:f},t[7]=f,t[8]=p);let m=u?.label??a,g;t[9]!==p||t[10]!==m?(g=(0,Q.jsx)(`span`,{className:`block truncate text-sm font-semibold text-foreground`,style:p,children:m}),t[9]=p,t[10]=m,t[11]=g):g=t[11];let _=u?.description??`Custom`,v;t[12]===_?v=t[13]:(v=(0,Q.jsx)(`span`,{className:`block truncate text-[11px] text-muted-foreground`,children:_}),t[12]=_,t[13]=v);let y;t[14]!==g||t[15]!==v?(y=(0,Q.jsxs)(`span`,{className:`min-w-0`,children:[g,v]}),t[14]=g,t[15]=v,t[16]=y):y=t[16];let b;t[17]!==d||t[18]!==y?(b=(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[d,y]}),t[17]=d,t[18]=y,t[19]=b):b=t[19];let x=u?.value??a,S;t[20]===x?S=t[21]:(S={fontFamily:x},t[20]=x,t[21]=S);let C;t[22]!==o||t[23]!==S?(C=(0,Q.jsx)(`span`,{className:`flex h-9 min-w-30 max-w-44 items-center justify-start truncate rounded-md border border-border/70 bg-background px-2 text-xs text-foreground shadow-xs/5`,style:S,title:o,children:o}),t[22]=o,t[23]=S,t[24]=C):C=t[24];let w;t[25]!==b||t[26]!==C?(w=(0,Q.jsxs)(`div`,{className:`mb-2 flex min-h-9 items-center justify-between gap-3`,children:[b,C]}),t[25]=b,t[26]=C,t[27]=w):w=t[27];let T;if(t[28]!==n||t[29]!==s||t[30]!==i||t[31]!==l){let e;t[33]!==n||t[34]!==s||t[35]!==l?(e=(e,t)=>{let r=t===l;return(0,Q.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,"aria-label":`Use ${e.label} for ${n.toLowerCase()}`,title:`${e.label} (${e.description})`,onClick:()=>s(e.value),className:h(`min-h-12 min-w-0 rounded-md border px-2 py-1.5 text-left outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring`,r?`border-primary bg-primary/8 text-foreground ring-1 ring-primary/35`:`border-border/70 text-muted-foreground hover:border-foreground/25 hover:bg-muted/45`),children:[(0,Q.jsx)(`span`,{className:`block truncate text-[12px] font-semibold leading-4`,style:{fontFamily:e.value},children:e.label}),(0,Q.jsx)(`span`,{className:`block truncate text-[10px] leading-3 opacity-75`,children:e.description})]},e.value)},t[33]=n,t[34]=s,t[35]=l,t[36]=e):e=t[36],T=i.map(e),t[28]=n,t[29]=s,t[30]=i,t[31]=l,t[32]=T}else T=t[32];let E;t[37]!==n||t[38]!==T?(E=(0,Q.jsx)(`div`,{role:`radiogroup`,"aria-label":n,className:`grid grid-cols-2 gap-1.5 sm:grid-cols-3`,children:T}),t[37]=n,t[38]=T,t[39]=E):E=t[39];let D;return t[40]!==w||t[41]!==E?(D=(0,Q.jsxs)(`div`,{className:`w-full sm:w-96`,children:[w,E]}),t[40]=w,t[41]=E,t[42]=D):D=t[42],D}function mt(e){let t=(0,X.c)(48),{mode:n,value:r,onModeChange:i,onColorChange:a}=e,o=n===`custom`,s;t[0]===r?s=t[1]:(s=/^#[0-9a-f]{6}$/i.test(r)?r.toLowerCase():R[0].value,t[0]=r,t[1]=s);let c=s,l;t[2]===c?l=t[3]:(l=R.find(e=>e.value===c),t[2]=c,t[3]=l);let d=l,f=o&&!d?`border-primary bg-primary/8 text-foreground ring-1 ring-primary/35`:`border-border/70 text-muted-foreground hover:border-foreground/25 hover:bg-muted/45`,p=!o&&`cursor-not-allowed opacity-55 hover:border-border/70 hover:bg-transparent`,m;t[4]!==f||t[5]!==p?(m=h(`h-12 w-full rounded-md border px-2 py-1.5 text-left shadow-none`,f,p),t[4]=f,t[5]=p,t[6]=m):m=t[6];let _=m,v;t[7]===c?v=t[8]:(v=(0,Q.jsx)(`span`,{"aria-hidden":!0,className:`size-5 shrink-0 rounded-full border border-black/10 shadow-xs dark:border-white/20`,style:{backgroundColor:c}}),t[7]=c,t[8]=v);let y;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Q.jsx)(`span`,{className:`block truncate text-[12px] font-semibold leading-4`,children:`Custom`}),t[9]=y):y=t[9];let b;t[10]===c?b=t[11]:(b=(0,Q.jsxs)(`span`,{className:`min-w-0`,children:[y,(0,Q.jsx)(`span`,{className:`block truncate font-mono text-[10px] leading-3 opacity-75`,children:c})]}),t[10]=c,t[11]=b);let x;t[12]!==v||t[13]!==b?(x=(0,Q.jsxs)(`span`,{className:`flex size-full min-w-0 items-center gap-2`,children:[v,b]}),t[12]=v,t[13]=b,t[14]=x):x=t[14];let S=x,C;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(`span`,{className:`inline-flex size-7 shrink-0 items-center justify-center rounded-md border border-border/70 bg-muted/60 text-muted-foreground`,children:(0,Q.jsx)(u,{className:`size-3.5`})}),t[15]=C):C=t[15];let w=o?d?.label??`Custom`:`Theme color`,T;t[16]===w?T=t[17]:(T=(0,Q.jsx)(`span`,{className:`block truncate text-sm font-semibold text-foreground`,children:w}),t[16]=w,t[17]=T);let E=o?c:`Active palette`,D;t[18]===E?D=t[19]:(D=(0,Q.jsx)(`span`,{className:`block truncate text-[11px] text-muted-foreground`,children:E}),t[18]=E,t[19]=D);let O;t[20]!==T||t[21]!==D?(O=(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[C,(0,Q.jsxs)(`span`,{className:`min-w-0`,children:[T,D]})]}),t[20]=T,t[21]=D,t[22]=O):O=t[22];let k;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,Q.jsx)(`span`,{children:`Use theme`}),t[23]=k):k=t[23];let A=!o,j;t[24]===i?j=t[25]:(j=e=>i(!e),t[24]=i,t[25]=j);let M;t[26]!==A||t[27]!==j?(M=(0,Q.jsxs)(`label`,{className:`flex h-9 shrink-0 items-center gap-2 rounded-md border border-border/70 bg-background px-2 text-xs text-muted-foreground shadow-xs/5`,children:[k,(0,Q.jsx)(g,{checked:A,onCheckedChange:j,"aria-label":`Use theme primary color`})]}),t[26]=A,t[27]=j,t[28]=M):M=t[28];let N;t[29]!==O||t[30]!==M?(N=(0,Q.jsxs)(`div`,{className:`mb-2 flex min-h-9 items-center justify-between gap-3`,children:[O,M]}),t[29]=O,t[30]=M,t[31]=N):N=t[31];let P;t[32]!==o||t[33]!==c||t[34]!==a?(P=R.map(e=>{let t=c===e.value;return(0,Q.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":o&&t,"aria-label":`Use ${e.label} as primary color`,title:`${e.label} (${e.value})`,onClick:()=>a(e.value),disabled:!o,className:h(`flex min-h-12 min-w-0 items-center gap-2 rounded-md border px-2 py-1.5 text-left outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring`,o&&t?`border-primary bg-primary/8 text-foreground ring-1 ring-primary/35`:`border-border/70 text-muted-foreground hover:border-foreground/25 hover:bg-muted/45`,!o&&`cursor-not-allowed opacity-55 hover:border-border/70 hover:bg-transparent`),children:[(0,Q.jsx)(`span`,{"aria-hidden":!0,className:`size-5 shrink-0 rounded-full border border-black/10 shadow-xs dark:border-white/20`,style:{backgroundColor:e.value}}),(0,Q.jsxs)(`span`,{className:`min-w-0`,children:[(0,Q.jsx)(`span`,{className:`block truncate text-[12px] font-semibold leading-4`,children:e.label}),(0,Q.jsx)(`span`,{className:`block truncate text-[10px] leading-3 opacity-75`,children:e.description})]})]},e.value)}),t[32]=o,t[33]=c,t[34]=a,t[35]=P):P=t[35];let F;t[36]!==o||t[37]!==_||t[38]!==S||t[39]!==c||t[40]!==a?(F=o?(0,Q.jsx)(Ue,{value:c,onChange:a,ariaLabel:`Pick custom primary color`,triggerClassName:_,children:S}):(0,Q.jsx)(`button`,{type:`button`,disabled:!0,"aria-label":`Pick custom primary color`,className:_,children:S}),t[36]=o,t[37]=_,t[38]=S,t[39]=c,t[40]=a,t[41]=F):F=t[41];let I;t[42]!==P||t[43]!==F?(I=(0,Q.jsxs)(`div`,{role:`radiogroup`,"aria-label":`Primary color`,className:`grid grid-cols-2 gap-1.5 sm:grid-cols-4`,children:[P,F]}),t[42]=P,t[43]=F,t[44]=I):I=t[44];let L;return t[45]!==N||t[46]!==I?(L=(0,Q.jsxs)(`div`,{className:`w-full sm:w-96`,children:[N,I]}),t[45]=N,t[46]=I,t[47]=L):L=t[47],L}function ht(e){let t=(0,X.c)(50),{ariaLabel:n,icon:r,options:i,value:a,onChange:o,preview:s}=e,c;if(t[0]!==i||t[1]!==a){let e;t[3]===a?e=t[4]:(e=e=>e.value===a,t[3]=a,t[4]=e),c=i.findIndex(e),t[0]=i,t[1]=a,t[2]=c}else c=t[2];let l=Math.max(0,c),u=i[l]??i[0],d=i.length>1?l/(i.length-1)*100:0,f;t[5]===r?f=t[6]:(f=(0,Q.jsx)(`span`,{className:`inline-flex size-7 shrink-0 items-center justify-center rounded-md border border-border/70 bg-muted/60 text-muted-foreground`,children:r}),t[5]=r,t[6]=f);let p=u?.label??a,m;t[7]===p?m=t[8]:(m=(0,Q.jsx)(`span`,{className:`block truncate text-sm font-semibold text-foreground`,children:p}),t[7]=p,t[8]=m);let g=u?.description??a,_;t[9]===g?_=t[10]:(_=(0,Q.jsx)(`span`,{className:`block truncate text-[11px] text-muted-foreground`,children:g}),t[9]=g,t[10]=_);let v;t[11]!==m||t[12]!==_?(v=(0,Q.jsxs)(`span`,{className:`min-w-0`,children:[m,_]}),t[11]=m,t[12]=_,t[13]=v):v=t[13];let y;t[14]!==f||t[15]!==v?(y=(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[f,v]}),t[14]=f,t[15]=v,t[16]=y):y=t[16];let b;t[17]!==s||t[18]!==y?(b=(0,Q.jsxs)(`div`,{className:`mb-2 flex min-h-9 items-center justify-between gap-3`,children:[y,s]}),t[17]=s,t[18]=y,t[19]=b):b=t[19];let x;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(x=h(`h-5 w-full cursor-pointer appearance-none bg-transparent outline-none`,`[&::-webkit-slider-runnable-track]:h-1.5 [&::-webkit-slider-runnable-track]:rounded-full`,`[&::-webkit-slider-thumb]:mt-[-5px] [&::-webkit-slider-thumb]:size-4 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-background [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:shadow-sm`,`[&::-moz-range-track]:h-1.5 [&::-moz-range-track]:rounded-full [&::-moz-range-track]:border-0`,`[&::-moz-range-thumb]:size-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-background [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:shadow-sm`,`focus-visible:[&::-webkit-slider-thumb]:ring-2 focus-visible:[&::-webkit-slider-thumb]:ring-ring focus-visible:[&::-moz-range-thumb]:ring-2 focus-visible:[&::-moz-range-thumb]:ring-ring`),t[20]=x):x=t[20];let S=Math.max(0,i.length-1),C=`linear-gradient(to right, var(--color-primary) 0%, var(--color-primary) ${d}%, color-mix(in srgb, var(--color-muted-foreground) 18%, transparent) ${d}%, color-mix(in srgb, var(--color-muted-foreground) 18%, transparent) 100%)`,w;t[21]===C?w=t[22]:(w={background:C,borderRadius:`999px`},t[21]=C,t[22]=w);let T;t[23]!==o||t[24]!==i?(T=e=>{let t=i[Number(e.currentTarget.value)];t&&o(t.value)},t[23]=o,t[24]=i,t[25]=T):T=t[25];let E;t[26]!==n||t[27]!==l||t[28]!==S||t[29]!==w||t[30]!==T?(E=(0,Q.jsx)(`input`,{"aria-label":n,className:x,max:S,min:0,step:1,type:`range`,value:l,style:w,onChange:T}),t[26]=n,t[27]=l,t[28]=S,t[29]=w,t[30]=T,t[31]=E):E=t[31];let D=`repeat(${i.length}, minmax(0, 1fr))`,O;t[32]===D?O=t[33]:(O={gridTemplateColumns:D},t[32]=D,t[33]=O);let k;if(t[34]!==n||t[35]!==o||t[36]!==i||t[37]!==l){let e;t[39]!==n||t[40]!==o||t[41]!==l?(e=(e,t)=>{let r=t===l;return(0,Q.jsxs)(`button`,{type:`button`,"aria-label":`Set ${n.toLowerCase()} to ${e.label}`,title:`${e.label} (${e.description})`,onClick:()=>o(e.value),className:h(`flex min-h-7 min-w-0 flex-col items-center justify-start gap-1 rounded-md px-1 py-1 text-center outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring`,r?`text-foreground`:`text-muted-foreground hover:bg-muted/50`),children:[(0,Q.jsx)(`span`,{className:h(`size-1.5 rounded-full`,r?`bg-primary`:`bg-muted-foreground/35`),"aria-hidden":!0}),(0,Q.jsx)(`span`,{className:`max-w-full truncate text-[10px] leading-none`,children:e.label})]},e.value)},t[39]=n,t[40]=o,t[41]=l,t[42]=e):e=t[42],k=i.map(e),t[34]=n,t[35]=o,t[36]=i,t[37]=l,t[38]=k}else k=t[38];let A;t[43]!==O||t[44]!==k?(A=(0,Q.jsx)(`div`,{className:`mt-1.5 grid gap-1`,style:O,children:k}),t[43]=O,t[44]=k,t[45]=A):A=t[45];let j;return t[46]!==E||t[47]!==A||t[48]!==b?(j=(0,Q.jsxs)(`div`,{className:`w-full sm:w-96`,children:[b,E,A]}),t[46]=E,t[47]=A,t[48]=b,t[49]=j):j=t[49],j}export{ft as AppearanceSettingsPanel};
|
package/dist/client/assets/{BranchToolbar.logic-D7slG_zJ.js → BranchToolbar.logic-DILAA3Cz.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import"./env-
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import"./env-Bcq9YR3B.js";import{li as r}from"./src-DmPIm3ie.js";import{Zn as i,an as a,cn as o,dn as s,f as c,fn as l,gn as u,in as d,ln as f,on as p,pn as m,rn as h,un as g,v as _}from"./runtime-CPM0EUhb.js";import{d as v,f as y}from"./ThreadStatusIndicators-CIOM98q2.js";var b=n(),x=e(t(),1);function S(e){let t=(0,b.c)(13),n=s(e),{environmentId:r,cwd:a,query:c,enabled:u,limit:m,staleTime:h}=e,g,_;t[0]!==a||t[1]!==r||t[2]!==m?(g=()=>{if(r===null||a===null)return;let e={environmentId:r,cwd:a,...m===void 0?{}:{limit:m}};return l(e),()=>o(e)},_=[r,a,m],t[0]=a,t[1]=r,t[2]=m,t[3]=g,t[4]=_):(g=t[3],_=t[4]),(0,x.useEffect)(g,_);let v,y;t[5]!==a||t[6]!==u||t[7]!==r||t[8]!==m||t[9]!==c||t[10]!==h?(v=()=>{f({environmentId:r,cwd:a,query:c,...u===void 0?{}:{enabled:u},...m===void 0?{}:{limit:m},...h===void 0?{}:{staleTime:h}})},y=[r,a,c,u,m,h],t[5]=a,t[6]=u,t[7]=r,t[8]=m,t[9]=c,t[10]=h,t[11]=v,t[12]=y):(v=t[11],y=t[12]),(0,x.useEffect)(v,y);let S=i(p(n));return n===null?d:S}function C(e){let t=g(e),n=(0,x.useSyncExternalStore)(_,()=>e.environmentId===null?null:c(e.environmentId),()=>null),r=(0,x.useRef)(e);r.current=e,(0,x.useEffect)(()=>{let e=r.current,t=e.environmentId===null?void 0:u(e.environmentId,n?.client??null);return m(e,t??null)},[t,n]);let o=i(a(t));return t===null?h:o}function w(e){let t=e.trim().replace(/\.git$/i,``).replace(/\/+$/,``);if(!t||/^[a-z]:[\\/]/i.test(t)||t.startsWith(`\\\\`))return null;if(!t.includes(`://`)){let e=/^(?:[^@/]+@)?([^:/]+):(.+)$/.exec(t);return e?.[1]&&e[2]?`https://${e[1]}/${e[2].replace(/^\/+/,``)}`:null}try{let e=new URL(t.replace(/^(ssh|git|http):\/\//i,`https://`).replace(/^ssh:/i,`https:`));return!e.hostname||e.pathname===`/`||e.pathname===``?null:`https://${e.hostname}${e.pathname}`}catch{return null}}function T(e){if(!e)return null;let t=[e.locator?.remoteUrl,...(e.remotes??[]).map(e=>e.url)];for(let e of t){if(!e)continue;let t=w(e);if(t)return t}return null}r([`local`,`worktree`]);function E(e){let t=y(e.runtimeLabel),n=y(e.savedLabel);return e.isPrimary?[t,n].find(e=>e?!v(e):!1)??`This device`:t??n??e.environmentId}function D(e){let{activeWorktreePath:t,hasServerThread:n,draftThreadEnvMode:r}=e;return n?t?`worktree`:`local`:t?`local`:r===`worktree`?`worktree`:`local`}function O(e){let{nextWorktreePath:t,currentWorktreePath:n,effectiveEnvMode:r}=e;return t||r===`worktree`&&!n?`worktree`:`local`}function k(e){let{envMode:t,activeWorktreePath:n,activeThreadBranch:r,currentGitBranch:i}=e;return t===`worktree`&&!n?r??i:i??r}function A(e){let{activeProjectCwd:t,activeWorktreePath:n,refName:r}=e;if(r.worktreePath)return{checkoutCwd:r.worktreePath,nextWorktreePath:r.worktreePath===t?null:r.worktreePath,reuseExistingWorktree:!0};let i=n!==null&&r.isDefault?null:n;return{checkoutCwd:i??t,nextWorktreePath:i,reuseExistingWorktree:!1}}function j(e){let{itemValue:t,normalizedQuery:n,createBranchItemValue:r,checkoutPullRequestItemValue:i}=e;if(n.length===0||r&&t===r||i&&t===i)return!0;let a=e.searchTextByItemValue?.get(t);return a===void 0?t.toLowerCase().includes(n):a.toLowerCase().includes(n)}export{D as a,C as c,O as i,S as l,A as n,E as o,k as r,j as s,T as t};
|