ryco-cli 0.1.16 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/dist/{AcpNativeLogging-OhEq3XNp.cjs → AcpNativeLogging-CUpW8y6E.cjs} +1 -1
  2. package/dist/{AcpNativeLogging-qZgtIa5K.mjs → AcpNativeLogging-hu4rXzHU.mjs} +1 -1
  3. package/dist/{AzureDevOpsSourceControlProvider-B0YsaJyI.mjs → AzureDevOpsSourceControlProvider-C7Ff-COJ.mjs} +2 -2
  4. package/dist/{AzureDevOpsSourceControlProvider-Dyu8KQ_S.cjs → AzureDevOpsSourceControlProvider-DAdboLpu.cjs} +2 -2
  5. package/dist/{BitbucketSourceControlProvider-3VHGKSl1.cjs → BitbucketSourceControlProvider-Bg6lSYm8.cjs} +2 -2
  6. package/dist/{BitbucketSourceControlProvider-B8IPx2Ad.mjs → BitbucketSourceControlProvider-CMPQXie7.mjs} +2 -2
  7. package/dist/{ClaudeDriver-CBCy0_WX.cjs → ClaudeDriver-CILJj4bi.cjs} +2 -2
  8. package/dist/{ClaudeDriver-DsW8yDj9.mjs → ClaudeDriver-Nc7gDoUZ.mjs} +2 -2
  9. package/dist/{CodexDriver-3TZPgrGk.cjs → CodexDriver-CdE1fyKF.cjs} +3 -3
  10. package/dist/{CodexDriver-DLwPz5sk.mjs → CodexDriver-OeWoP24r.mjs} +3 -3
  11. package/dist/{CodexTextGeneration-DLHSW4Mz.cjs → CodexTextGeneration-BJvCqVzm.cjs} +1 -1
  12. package/dist/{CodexTextGeneration-D1vV8grr.mjs → CodexTextGeneration-CKacDpkR.mjs} +1 -1
  13. package/dist/{CopilotDriver-C7a8IhyK.cjs → CopilotDriver-5toln6vu.cjs} +3 -3
  14. package/dist/{CopilotDriver-DXvGBv-s.mjs → CopilotDriver-C6IkwOg5.mjs} +3 -3
  15. package/dist/{CursorDriver-CeB_vMKJ.mjs → CursorDriver-BPyhSbOl.mjs} +3 -3
  16. package/dist/{CursorDriver-uNsDetA3.cjs → CursorDriver-otlL4axb.cjs} +3 -3
  17. package/dist/{ForgejoSourceControlProvider-Ds0rU_PN.mjs → ForgejoSourceControlProvider-Df0EwCPV.mjs} +2 -2
  18. package/dist/{ForgejoSourceControlProvider-CJLksvL_.cjs → ForgejoSourceControlProvider-SZj0DxRM.cjs} +2 -2
  19. package/dist/{GitHubSourceControlProvider-CrYNFu8S.cjs → GitHubSourceControlProvider-D9v0HrDd.cjs} +2 -2
  20. package/dist/{GitHubSourceControlProvider-C7CJAslU.mjs → GitHubSourceControlProvider-G07yjZJS.mjs} +2 -2
  21. package/dist/{GitLabSourceControlProvider-jbX5M34A.cjs → GitLabSourceControlProvider-BTXml3Wh.cjs} +2 -2
  22. package/dist/{GitLabSourceControlProvider-u-Y-e8PV.mjs → GitLabSourceControlProvider-D7NhCVP9.mjs} +2 -2
  23. package/dist/{GrokDriver-BJ00ZiYg.cjs → GrokDriver-BkU6D5ZE.cjs} +3 -3
  24. package/dist/{GrokDriver-CFgjwnvE.mjs → GrokDriver-VxcAlypB.mjs} +3 -3
  25. package/dist/{OpenCodeDriver-BTxd2Q3Q.cjs → OpenCodeDriver-CXvTVYvY.cjs} +2 -2
  26. package/dist/{OpenCodeDriver-DNApoGdu.mjs → OpenCodeDriver-fQlgTeuI.mjs} +2 -2
  27. package/dist/{SourceControlProviderDiscoveryCatalog-CPO3a9_U.cjs → SourceControlProviderDiscoveryCatalog-CR-cmnC-.cjs} +1 -1
  28. package/dist/{SourceControlProviderDiscoveryCatalog-hXWNwRMn.mjs → SourceControlProviderDiscoveryCatalog-dqetZQiC.mjs} +1 -1
  29. package/dist/bin.cjs +16 -14
  30. package/dist/bin.mjs +16 -14
  31. package/dist/client/assets/{AccountSettings-CkFq28pN.js → AccountSettings-C3YGn5s7.js} +1 -1
  32. package/dist/client/assets/AiFocusSettings-CNucfJ5Y.js +1 -0
  33. package/dist/client/assets/{AnimatedHeight-BC-qaTJY.js → AnimatedHeight-B8ZeY3LL.js} +1 -1
  34. package/dist/client/assets/{AppearanceSettings-B6UaU-_a.js → AppearanceSettings-D1MyfaES.js} +1 -1
  35. package/dist/client/assets/{BranchToolbar.logic-6LRTxcuo.js → BranchToolbar.logic-CN2-yLTE.js} +1 -1
  36. package/dist/client/assets/{ChatRightPanel-BSNsAFtv.js → ChatRightPanel-DhZiZCcx.js} +6 -6
  37. package/dist/client/assets/{ChatThreadRouteView-Daox0F74.js → ChatThreadRouteView-CR8HQgm3.js} +1 -1
  38. package/dist/client/assets/CommandPaletteDialog-ChB99Jee.js +1 -0
  39. package/dist/client/assets/{CompositeItem-97y1QiiT.js → CompositeItem-CxRCTsWt.js} +1 -1
  40. package/dist/client/assets/{CompositeRoot-C7Mz4Y_2.js → CompositeRoot-CDscEk_b.js} +1 -1
  41. package/dist/client/assets/{ConnectionsSettings-DFBNmvfL.js → ConnectionsSettings-Dsewo1mI.js} +2 -2
  42. package/dist/client/assets/{DiagnosticsSettings-DhuLK993.js → DiagnosticsSettings-ClUk2Ycp.js} +1 -1
  43. package/dist/client/assets/{DialogHandle-Cl9dQBJp.js → DialogHandle-BGW2rJq8.js} +1 -1
  44. package/dist/client/assets/{DialogPopup-a1M74u16.js → DialogPopup-9zEMlOyz.js} +1 -1
  45. package/dist/client/assets/DialogRoot-Z8JWsDCS.js +1 -0
  46. package/dist/client/assets/{DialogTitle-Bk-w3xLJ.js → DialogTitle-7dK2BQ85.js} +1 -1
  47. package/dist/client/assets/{DialogTrigger-D9nkMFu2.js → DialogTrigger-B7jdDPNa.js} +1 -1
  48. package/dist/client/assets/{DialogViewport-tgJz2Lwn.js → DialogViewport-BrRcGV_l.js} +1 -1
  49. package/dist/client/assets/{DraftChatThreadRouteView-BmVyawpM.js → DraftChatThreadRouteView-C7HNQzJO.js} +1 -1
  50. package/dist/client/assets/{ExternalIdentityWeb.logic-Bn1HigS9.js → ExternalIdentityWeb.logic-DS77EplU.js} +1 -1
  51. package/dist/client/assets/{GlassSurface-CDok2tTN.js → GlassSurface--5lIEJCy.js} +1 -1
  52. package/dist/client/assets/{HostedConnectionControls-BvHq5iCa.js → HostedConnectionControls-5f2EOB5t.js} +1 -1
  53. package/dist/client/assets/{HostedHubRoot-CB5TRXg5.js → HostedHubRoot-tRaAruhb.js} +1 -1
  54. package/dist/client/assets/{HostedNativeAuthorizationRoute-Cb5WJuEG.js → HostedNativeAuthorizationRoute-B4SBCUZq.js} +1 -1
  55. package/dist/client/assets/{HostedRelayTrustNotice-DFcgMZlL.js → HostedRelayTrustNotice-D7TIN2KZ.js} +1 -1
  56. package/dist/client/assets/{Icons-BEtED8P8.js → Icons-CqMTQkuR.js} +1 -1
  57. package/dist/client/assets/{IntegrationsSettingsPanel-BIy-rKDv.js → IntegrationsSettingsPanel-Be0RMI3X.js} +1 -1
  58. package/dist/client/assets/{KeybindingsSettings-u3yB7Cob.js → KeybindingsSettings-BxoOXbJf.js} +1 -1
  59. package/dist/client/assets/{McpServersSettings-V32mLD4v.js → McpServersSettings-D6wFULhe.js} +1 -1
  60. package/dist/client/assets/{MobileSheet-BDvnUC5W.js → MobileSheet-fqwVmSQY.js} +1 -1
  61. package/dist/client/assets/{NewWorktreeDialog-B64WGjQj.js → NewWorktreeDialog-DljDMikm.js} +1 -1
  62. package/dist/client/assets/{NoActiveThreadState-C0MwHtMx.js → NoActiveThreadState-DvLgUR0A.js} +1 -1
  63. package/dist/client/assets/{NodeSecuritySettings-CWlThhfV.js → NodeSecuritySettings-BYX0uV1b.js} +1 -1
  64. package/dist/client/assets/{OpinionatedPluginsSettings-CVzfv5nP.js → OpinionatedPluginsSettings-ZOQ0n5GP.js} +1 -1
  65. package/dist/client/assets/{PhoneGetAppInterstitial-CylfsDBD.js → PhoneGetAppInterstitial-DzlPIIW0.js} +1 -1
  66. package/dist/client/assets/{PhoneGetAppInterstitialBackdrop-BA4R225F.js → PhoneGetAppInterstitialBackdrop-C_j-OVwR.js} +1 -1
  67. package/dist/client/assets/{PhoneHome-DBwwEeaI.js → PhoneHome-BIYOn5P7.js} +1 -1
  68. package/dist/client/assets/PhoneSettingsSurface-CL26SDJP.js +1 -0
  69. package/dist/client/assets/{ProjectFavicon-BjXJxNbQ.js → ProjectFavicon-BLFEmLYd.js} +1 -1
  70. package/dist/client/assets/{ProviderModelPicker-BTFj53Qv.js → ProviderModelPicker-CWALhPw5.js} +1 -1
  71. package/dist/client/assets/{ProviderUpdateLaunchNotification.logic-CywRitn3.js → ProviderUpdateLaunchNotification.logic-DcLWligu.js} +1 -1
  72. package/dist/client/assets/{ProvidersSettingsPanel-IhzMeM1F.js → ProvidersSettingsPanel-tIQSB1Ni.js} +1 -1
  73. package/dist/client/assets/{RedactedSensitiveText-BuWSWty8.js → RedactedSensitiveText-DnYWrxD2.js} +1 -1
  74. package/dist/client/assets/RootAppShell-BVqIVDWT.js +6 -0
  75. package/dist/client/assets/{RycoLetterMark-CZYntY8t.js → RycoLetterMark-C1QHVbKN.js} +1 -1
  76. package/dist/client/assets/SettingsDialog-TY6l7DuD.js +1 -0
  77. package/dist/client/assets/SettingsPanels-_-BazuGl.js +3 -0
  78. package/dist/client/assets/{SettingsPanels.editor-lbLEbllb.js → SettingsPanels.editor-Bl_mOgB-.js} +1 -1
  79. package/dist/client/assets/{SourceControlSettings-5w4N9XII.js → SourceControlSettings-CwRuv7T6.js} +1 -1
  80. package/dist/client/assets/{StatisticsPage-jRyjIh52.js → StatisticsPage-DAvOIX_d.js} +1 -1
  81. package/dist/client/assets/{StatisticsPanel-CV5eFeO_.js → StatisticsPanel-BfmqkZgK.js} +1 -1
  82. package/dist/client/assets/{StatisticsSettingsLink-B7SZerf3.js → StatisticsSettingsLink-J-iBGP5I.js} +1 -1
  83. package/dist/client/assets/{ThreadStatusIndicators-C40TYVEC.js → ThreadStatusIndicators-BzpZG_IZ.js} +0 -0
  84. package/dist/client/assets/{ThreadTerminalDrawer-flv5ZDel.js → ThreadTerminalDrawer-DZy0S10m.js} +1 -1
  85. package/dist/client/assets/{ThreadWorkspacePanel-B-cBAWFz.js → ThreadWorkspacePanel-PRfBFuHE.js} +1 -1
  86. package/dist/client/assets/{ToolbarRootContext-B1g8IP6k.js → ToolbarRootContext-C48gkU4j.js} +1 -1
  87. package/dist/client/assets/{WorkItemsTab-0DE4S4n0.js → WorkItemsTab-EO7aDVI8.js} +4 -4
  88. package/dist/client/assets/{alert-DomE7dAt.js → alert-C24pxxYz.js} +1 -1
  89. package/dist/client/assets/{alert-dialog-9Jyh0e8u.js → alert-dialog-iYnjheVe.js} +1 -1
  90. package/dist/client/assets/archive-BL1hojl3.js +1 -0
  91. package/dist/client/assets/authorization-BNZY2k8w.js +1 -0
  92. package/dist/client/assets/{badge-w43sx8eF.js → badge-tHmsB3yQ.js} +1 -1
  93. package/dist/client/assets/{branding-Ck4g7yv3.js → branding-hWmEaQ8d.js} +1 -1
  94. package/dist/client/assets/{button-DG8WqjNn.js → button-WR80VgkK.js} +1 -1
  95. package/dist/client/assets/{capabilities-xa5Ll0KT.js → capabilities-CXhsftU9.js} +1 -1
  96. package/dist/client/assets/{chatThreadActions-BZvyhfKr.js → chatThreadActions-C6tNI5Qi.js} +1 -1
  97. package/dist/client/assets/{collapsible-EhAEe5S9.js → collapsible-BUn1kona.js} +1 -1
  98. package/dist/client/assets/{command-Cyn6yIEa.js → command-CfaBUmS3.js} +1 -1
  99. package/dist/client/assets/composerDraftStore-DXTD6mKH.js +11 -0
  100. package/dist/client/assets/{data-list-DTdqWMGN.js → data-list-jNXWZwx3.js} +1 -1
  101. package/dist/client/assets/desktopUpdateAtoms-C6z0AhGE.js +1 -0
  102. package/dist/client/assets/{desktopWorkspace-hOxsGVFz.js → desktopWorkspace-BFTBEpzF.js} +1 -1
  103. package/dist/client/assets/{device-DIfzlguu.js → device-DB8v-PV8.js} +1 -1
  104. package/dist/client/assets/{dialog-BNmFD6Nh.js → dialog-CwRtKu2U.js} +1 -1
  105. package/dist/client/assets/{draft-input-dP7F8odz.js → draft-input-BHjWDHqU.js} +1 -1
  106. package/dist/client/assets/editorPreferences-BqfWlBPx.js +1 -0
  107. package/dist/client/assets/{empty-Ccxhyvdf.js → empty-CITbdlFs.js} +1 -1
  108. package/dist/client/assets/{env-Bcq9YR3B.js → env-Bcy-9P3V.js} +1 -1
  109. package/dist/client/assets/{getPseudoElementBounds-CO5HJT7x.js → getPseudoElementBounds-BPmVta2g.js} +1 -1
  110. package/dist/client/assets/{group-CzdKmc45.js → group-BpXcg5Ba.js} +1 -1
  111. package/dist/client/assets/{index-Dp3JRlOK.js → index-CnRziuz2.js} +2 -2
  112. package/dist/client/assets/{input-BZz4eLRl.js → input-Ba4jS4Ks.js} +1 -1
  113. package/dist/client/assets/{kbd-DbvN3zTb.js → kbd-BvgpGZEI.js} +1 -1
  114. package/dist/client/assets/{keybindings-BPE3eEAM.js → keybindings-QVMzXI5S.js} +1 -1
  115. package/dist/client/assets/{label-DZf4lbNF.js → label-2jpS7gCY.js} +1 -1
  116. package/dist/client/assets/{lib-DgOYoged.js → lib-CuR3OHWo.js} +1 -1
  117. package/dist/client/assets/{logging-81iP6Hps.js → logging-CTOc5ONT.js} +1 -1
  118. package/dist/client/assets/{main-B6n7O_N3.js → main-C5za36qj.js} +2 -2
  119. package/dist/client/assets/main-CgLLEwXi.css +2 -0
  120. package/dist/client/assets/{menu-B6UEFcn0.js → menu-CsEBcjDz.js} +1 -1
  121. package/dist/client/assets/{popover-BuYzXGwl.js → popover-BpnQc7ji.js} +1 -1
  122. package/dist/client/assets/primary-DiL6nRV-.js +2 -0
  123. package/dist/client/assets/{projectPaths-D8b4yLOe.js → projectPaths-DDcwkag5.js} +1 -1
  124. package/dist/client/assets/{providerDriverMeta-sBwZhQoN.js → providerDriverMeta-DrgHrvO3.js} +1 -1
  125. package/dist/client/assets/{providerIconUtils-Cq0fezxt.js → providerIconUtils-VIm6bh4U.js} +1 -1
  126. package/dist/client/assets/providerInstances-pNPE7SuA.js +1 -0
  127. package/dist/client/assets/providerModels-pNPE7SuA.js +1 -0
  128. package/dist/client/assets/{qr-code-Ie92aZvE.js → qr-code-CXu67ChC.js} +1 -1
  129. package/dist/client/assets/{radio-group-BuuTEtdC.js → radio-group-B7kMeg_h.js} +1 -1
  130. package/dist/client/assets/{resolveAriaLabelledBy-0FA0k4xp.js → resolveAriaLabelledBy-DoGkVnyF.js} +1 -1
  131. package/dist/client/assets/{rightPanelRouteSearch-BS8CkNS6.js → rightPanelRouteSearch-YV6CEBkv.js} +1 -1
  132. package/dist/client/assets/runtime-Cy36EhFa.js +1 -0
  133. package/dist/client/assets/{scroll-area-C0yF015F.js → scroll-area-BZayohht.js} +1 -1
  134. package/dist/client/assets/{scrollEdges-DI5Y3mtR.js → scrollEdges-BObY5qgX.js} +1 -1
  135. package/dist/client/assets/{select-CZukJlTn.js → select-DQIoKiCF.js} +1 -1
  136. package/dist/client/assets/{separator-D4ckGtPe.js → separator-DgV5UvWO.js} +1 -1
  137. package/dist/client/assets/{session-logic-BuGYhZKZ.js → session-logic-yjrYZ67x.js} +2 -2
  138. package/dist/client/assets/{settingsDialogStore-LxRFC5hh.js → settingsDialogStore-CzH3-ZEg.js} +1 -1
  139. package/dist/client/assets/{settingsLayout-CHJT5wtl.js → settingsLayout-BPKHc7wz.js} +1 -1
  140. package/dist/client/assets/{sheet-BNfImQ-7.js → sheet-BxlpAnIJ.js} +1 -1
  141. package/dist/client/assets/{sidebar-CFGg5Tkr.js → sidebar-CuxI1O8j.js} +1 -1
  142. package/dist/client/assets/{sidebarProjectFolders-Dlo6McCj.js → sidebarProjectFolders-Bi8I6mH5.js} +1 -1
  143. package/dist/client/assets/{sidebarStatusText-C8QBhZhZ.js → sidebarStatusText-DTXq8x3L.js} +1 -1
  144. package/dist/client/assets/{skeleton-DOgQaVXv.js → skeleton-C8KnJ1KQ.js} +1 -1
  145. package/dist/client/assets/{spinner-ClQu8SdC.js → spinner-D9HJGQ01.js} +1 -1
  146. package/dist/client/assets/{src-DmPIm3ie.js → src-CtanPQei.js} +1 -1
  147. package/dist/client/assets/storeSelectors-DMs36CMz.js +1 -0
  148. package/dist/client/assets/{switch-BZjA7VT9.js → switch-B50w01tf.js} +1 -1
  149. package/dist/client/assets/{terminal-links-CzJomeox.js → terminal-links-C5NsgIQU.js} +1 -1
  150. package/dist/client/assets/{textarea-DHdmRD1r.js → textarea-CJ8Vux-T.js} +1 -1
  151. package/dist/client/assets/{threadPinning-D2e9MEDr.js → threadPinning-B5WtT-P_.js} +1 -1
  152. package/dist/client/assets/{threadPriorityRefreshRuntime-DbEFchoL.js → threadPriorityRefreshRuntime-BnDDqCxq.js} +1 -1
  153. package/dist/client/assets/{toast-C-0Ft2jD.js → toast-CV5dwFOH.js} +1 -1
  154. package/dist/client/assets/{toggle-DsnOFDbJ.js → toggle-DRqyFTHJ.js} +1 -1
  155. package/dist/client/assets/{toggle-group-Chxh9G6t.js → toggle-group-mhVkQLP2.js} +1 -1
  156. package/dist/client/assets/{tooltip-C_-9XEfA.js → tooltip-DZhBSkif.js} +1 -1
  157. package/dist/client/assets/types-DMs36CMz.js +1 -0
  158. package/dist/client/assets/{uiStateStore-DzUrk2GS.js → uiStateStore-OqZLiCwV.js} +1 -1
  159. package/dist/client/assets/{useAtlassian-Zb2Kkt0_.js → useAtlassian-zbqx4xW1.js} +0 -0
  160. package/dist/client/assets/{useButton-BmvYhoMC.js → useButton-DXIv8wCn.js} +1 -1
  161. package/dist/client/assets/{useCompositeListItem-D0PvH4nv.js → useCompositeListItem-rrdFaxXB.js} +1 -1
  162. package/dist/client/assets/{useDebouncedValue-s0BC8Yyp.js → useDebouncedValue-Dz3pyT5q.js} +1 -1
  163. package/dist/client/assets/{useFloatingRootContext-CLCaQEJk.js → useFloatingRootContext-CIRRjmkd.js} +1 -1
  164. package/dist/client/assets/{useHandleNewThread-ByVfL71G.js → useHandleNewThread-DRoY_cL7.js} +1 -1
  165. package/dist/client/assets/{useLabelableId-CB_9OReR.js → useLabelableId-nlk2LM0q.js} +1 -1
  166. package/dist/client/assets/{useLocation-DGJMt6gP.js → useLocation-TExTri5H.js} +1 -1
  167. package/dist/client/assets/{useOpenInteractionType-BSSI2GzS.js → useOpenInteractionType-Co4_pLo_.js} +1 -1
  168. package/dist/client/assets/{usePhoneThreadActions-BhTVcLtf.js → usePhoneThreadActions-CTmdPjGg.js} +1 -1
  169. package/dist/client/assets/{usePopupViewport-8F-J1h5f.js → usePopupViewport-SxCh7dCg.js} +1 -1
  170. package/dist/client/assets/{useScrollLock-CBz-5_MX.js → useScrollLock-cFFkQSYy.js} +1 -1
  171. package/dist/client/assets/{useStatistics-Dbp94K5j.js → useStatistics-D8hzpDv4.js} +2 -2
  172. package/dist/client/assets/{useSwipeDismiss-D22_vuiH.js → useSwipeDismiss-ALyKckxx.js} +1 -1
  173. package/dist/client/assets/{useThreadActions-CPL4dO-X.js → useThreadActions-5hLAJAJB.js} +1 -1
  174. package/dist/client/assets/{useTriggerFocusGuards-f7afwACm.js → useTriggerFocusGuards-lOK7sLv0.js} +1 -1
  175. package/dist/client/assets/{useValueChanged-EkWF0C3k.js → useValueChanged-BQLjL43O.js} +1 -1
  176. package/dist/client/assets/{utils-CV2fJJxC.js → utils-Ct58OPtz.js} +1 -1
  177. package/dist/client/index.html +1 -1
  178. package/dist/{collectUint8StreamText-oFvWyN3_.mjs → collectUint8StreamText-Bwltp7kn.mjs} +10 -0
  179. package/dist/{collectUint8StreamText-Dsbmrw73.cjs → collectUint8StreamText-D0THfPrP.cjs} +10 -0
  180. package/dist/{makeManagedServerProvider-CANTNAsz.cjs → makeManagedServerProvider-B7rRjRgd.cjs} +1 -1
  181. package/dist/{makeManagedServerProvider-PLtJj7EV.mjs → makeManagedServerProvider-BMSV4Aim.mjs} +1 -1
  182. package/package.json +1 -1
  183. package/dist/client/assets/AiFocusSettings-BI9AgQUi.js +0 -1
  184. package/dist/client/assets/CommandPaletteDialog-CIZnwgK9.js +0 -1
  185. package/dist/client/assets/DialogRoot-C_DO1gtO.js +0 -1
  186. package/dist/client/assets/PhoneSettingsSurface-sDCNEVkR.js +0 -1
  187. package/dist/client/assets/RootAppShell-CG06ruyc.js +0 -6
  188. package/dist/client/assets/SettingsDialog-ByR9PwEc.js +0 -1
  189. package/dist/client/assets/SettingsPanels-CwsCgdds.js +0 -3
  190. package/dist/client/assets/authorization-D8lJzXTE.js +0 -1
  191. package/dist/client/assets/composerDraftStore-TYv9j3vY.js +0 -11
  192. package/dist/client/assets/desktopUpdateAtoms-hP0oc_If.js +0 -1
  193. package/dist/client/assets/editorPreferences-B54y5_sx.js +0 -1
  194. package/dist/client/assets/main-DlGNPwsH.css +0 -2
  195. package/dist/client/assets/primary-CiDY2oUi.js +0 -2
  196. package/dist/client/assets/providerInstances-vd2eZtHx.js +0 -1
  197. package/dist/client/assets/providerModels-vd2eZtHx.js +0 -1
  198. package/dist/client/assets/runtime-QZPKtH2P.js +0 -1
  199. package/dist/client/assets/storeSelectors-_h41wnN2.js +0 -1
  200. package/dist/client/assets/types-_h41wnN2.js +0 -1
@@ -1,4 +1,4 @@
1
- import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{Gn as r,Hn as i,It as a,Sn as o,Vn as s,Yt as c,Zn as l,gn as u}from"./runtime-QZPKtH2P.js";import{dt as d}from"./primary-CiDY2oUi.js";import{It as f}from"./composerDraftStore-TYv9j3vY.js";import{i as p}from"./toast-C-0Ft2jD.js";import{t as m}from"./keyboard-BqeRMHfL.js";import{t as h}from"./plus-B2h-VEqh.js";import{t as g}from"./search-BGQsenCM.js";import{t as _}from"./triangle-alert-RL_T3KLo.js";import{t as v}from"./undo-2-x37tfI3V.js";import{t as y}from"./x-C1Cemsov.js";import{t as b}from"./shallow-DWZCFNun.js";import{n as x,t as S}from"./utils-CV2fJJxC.js";import{i as C,n as w,t as T}from"./tooltip-C_-9XEfA.js";import{t as E}from"./input-BZz4eLRl.js";import{t as D}from"./button-DG8WqjNn.js";import{t as O}from"./toastHelpers-CSQRKo4F.js";import{c as k,i as A,p as j,s as M}from"./menu-B6UEFcn0.js";import{r as N}from"./editorPreferences-B54y5_sx.js";import{i as P,n as F,r as I}from"./settingsLayout-CHJT5wtl.js";var L=e(t(),1),R=n(),z={terminal:{id:`terminal`,label:`Terminal`,sortWeight:10},workspace:{id:`workspace`,label:`Workspace`,sortWeight:20},diff:{id:`diff`,label:`Diff`,sortWeight:30},commandPalette:{id:`commandPalette`,label:`Command palette`,sortWeight:40},sidebar:{id:`sidebar`,label:`Sidebar`,sortWeight:50},chat:{id:`chat`,label:`Chat`,sortWeight:60},composer:{id:`composer`,label:`Composer`,sortWeight:70},editor:{id:`editor`,label:`Editor`,sortWeight:80},modelPicker:{id:`modelPicker`,label:`Model picker`,sortWeight:90},thread:{id:`thread`,label:`Threads`,sortWeight:100},script:{id:`script`,label:`Project scripts`,sortWeight:110}},B={"terminal.toggle":{title:`Toggle terminal drawer`,sortWeight:1},"terminal.split":{title:`Split terminal`,sortWeight:2},"terminal.new":{title:`New terminal`,sortWeight:3},"terminal.close":{title:`Close terminal`,sortWeight:4},"workspace.files":{title:`Open workspace files`,sortWeight:1},"workspace.review":{title:`Open workspace review`,sortWeight:2},"workspace.terminal":{title:`Open workspace terminal`,sortWeight:3},"workspace.simulator":{title:`Open iOS Simulator workspace`,sortWeight:4},"diff.toggle":{title:`Toggle diff view`,sortWeight:1},"commandPalette.toggle":{title:`Open command palette`,sortWeight:1},"sidebar.showInbox":{title:`Show Inbox sidebar`,sortWeight:1},"sidebar.showProjects":{title:`Show Projects sidebar`,sortWeight:2},"chat.new":{title:`New chat`,sortWeight:1},"chat.newLocal":{title:`New chat (local environment)`,sortWeight:2},"composer.stash":{title:`Stash prompt or open stash`,sortWeight:1},"editor.openFavorite":{title:`Open in preferred editor`,sortWeight:1},"modelPicker.toggle":{title:`Toggle model picker`,sortWeight:1},"modelPicker.jump.1":{title:`Pick model 1`,sortWeight:2},"modelPicker.jump.2":{title:`Pick model 2`,sortWeight:3},"modelPicker.jump.3":{title:`Pick model 3`,sortWeight:4},"modelPicker.jump.4":{title:`Pick model 4`,sortWeight:5},"modelPicker.jump.5":{title:`Pick model 5`,sortWeight:6},"modelPicker.jump.6":{title:`Pick model 6`,sortWeight:7},"modelPicker.jump.7":{title:`Pick model 7`,sortWeight:8},"modelPicker.jump.8":{title:`Pick model 8`,sortWeight:9},"modelPicker.jump.9":{title:`Pick model 9`,sortWeight:10},"thread.find":{title:`Find in current thread`,sortWeight:1},"thread.pinToggle":{title:`Pin or unpin current thread`,sortWeight:2},"thread.previous":{title:`Previous thread`,sortWeight:3},"thread.next":{title:`Next thread`,sortWeight:4},"thread.jump.1":{title:`Jump to thread 1`,sortWeight:5},"thread.jump.2":{title:`Jump to thread 2`,sortWeight:6},"thread.jump.3":{title:`Jump to thread 3`,sortWeight:7},"thread.jump.4":{title:`Jump to thread 4`,sortWeight:8},"thread.jump.5":{title:`Jump to thread 5`,sortWeight:9},"thread.jump.6":{title:`Jump to thread 6`,sortWeight:10},"thread.jump.7":{title:`Jump to thread 7`,sortWeight:11},"thread.jump.8":{title:`Jump to thread 8`,sortWeight:12},"thread.jump.9":{title:`Jump to thread 9`,sortWeight:13}};function V(e){let t=e.indexOf(`.`),n=t===-1?e:e.slice(0,t);return n===`script`?z.script:z[n]??z.script}function H(e,t){let n=V(e),r=B[e];if(r)return{category:n,title:r.title,sortWeight:r.sortWeight};let i=e.match(/^script\.([a-z0-9][a-z0-9-]*)\.run$/)?.[1]??e;return{category:n,title:t??`Run: ${i}`,sortWeight:100}}var U=[{id:`always`,label:`Always`,value:void 0},{id:`terminalFocus`,label:`Terminal focused`,value:`terminalFocus`},{id:`notTerminalFocus`,label:`Not in terminal`,value:`!terminalFocus`},{id:`terminalOpen`,label:`Terminal open`,value:`terminalOpen`},{id:`notTerminalOpen`,label:`Terminal not open`,value:`!terminalOpen`},{id:`modelPickerOpen`,label:`Model picker open`,value:`modelPickerOpen`},{id:`commandPaletteOpen`,label:`Command palette open`,value:`commandPaletteOpen`},{id:`composerFocus`,label:`Composer focused`,value:`composerFocus`},{id:`notComposerFocus`,label:`Not in composer`,value:`!composerFocus`}],W=new Map(U.map(e=>[e.value,e])),G=new Map(U.map(e=>[e.value===void 0?void 0:e.value.replace(/\s+/g,``),e]));function K(e){return e===void 0?W.get(void 0):W.get(e)||G.get(e.replace(/\s+/g,``))}function q(e){let t=K(e);return t?t.label:e??`Always`}function J(e){if(e)switch(e.type){case`identifier`:return e.name;case`not`:return`!${J(e.node)}`;case`and`:return`(${J(e.left)} && ${J(e.right)})`;case`or`:return`(${J(e.left)} || ${J(e.right)})`}}function ee(e,t){return(e===void 0?``:e.replace(/\s+/g,``))===(t===void 0?``:t.replace(/\s+/g,``))}function te(e,t){let n=e[t];if(!n)return[];let r=[];return e.forEach((e,i)=>{i!==t&&e.command!==n.command&&e.key===n.key&&ee(e.when,n.when)&&r.push({key:n.key,otherCommand:e.command,otherWhen:e.when})}),r}function ne(e){let t=new Map;return e.forEach((n,r)=>{let i=te(e,r);if(i.length===0)return;let a=e[r].command,o=t.get(a)??[];o.push(...i),t.set(a,o)}),t}function Y(e){return/mac|iphone|ipad|ipod/i.test(e)}var re=new Set([`control`,`shift`,`alt`,`altgraph`,`meta`,`os`,`hyper`,`super`,`fn`,`capslock`,`numlock`,`scrolllock`]),ie=new Set([`escape`,`tab`,`enter`]);function ae(e,t){let n=e.toLowerCase();if(n===` `||n===`spacebar`)return`space`;if(n===`esc`)return`escape`;if(n===`arrowup`)return`up`;if(n===`arrowdown`)return`down`;if(n===`arrowleft`)return`left`;if(n===`arrowright`)return`right`;if(t){let e=t.match(/^Digit(\d)$/);if(e)return e[1];if(t===`BracketLeft`)return`[`;if(t===`BracketRight`)return`]`}return n}function oe(e,t){let n=e.key.toLowerCase();if(re.has(n))return null;let r=Y(t?.platform??(typeof navigator<`u`?navigator.platform:``)),i=r?e.metaKey:e.ctrlKey;if(!(i||e.shiftKey||e.altKey||(r?e.ctrlKey:e.metaKey))&&ie.has(n))return null;let a=ae(e.key,e.code);return a.length===0?null:{key:a,modKey:i,metaKey:!r&&e.metaKey,ctrlKey:r&&e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey}}var se={mod:`⌘`,meta:`⌘`,cmd:`⌘`,ctrl:`⌃`,control:`⌃`,shift:`⇧`,alt:`⌥`,option:`⌥`},ce={mod:`Ctrl`,meta:`Meta`,cmd:`Meta`,ctrl:`Ctrl`,control:`Ctrl`,shift:`Shift`,alt:`Alt`,option:`Alt`},X={space:`Space`,enter:`Enter`,escape:`Esc`,up:`↑`,down:`↓`,left:`←`,right:`→`,tab:`Tab`,backspace:`⌫`,delete:`Del`};function le(e,t){let n=Y(t?.platform??(typeof navigator<`u`?navigator.platform:``))?se:ce,r=[];e.modKey&&r.push(n.mod),e.metaKey&&r.push(n.meta),e.ctrlKey&&r.push(n.ctrl),e.altKey&&r.push(n.alt),e.shiftKey&&r.push(n.shift);let i=X[e.key]??(e.key.length===1?e.key.toUpperCase():e.key);return r.push(i),r}function ue(e){let t=[];e.modKey&&t.push(`mod`),e.metaKey&&t.push(`meta`),e.ctrlKey&&t.push(`ctrl`),e.altKey&&t.push(`alt`),e.shiftKey&&t.push(`shift`);let n=e.key===` `?`space`:e.key;return t.push(n),t.join(`+`)}var Z=f(),de=[],fe=(()=>{let e=new Map;for(let t of d){let n=`${t.key}|${t.when??``}`,r=e.get(t.command)??new Set;r.add(n),e.set(t.command,r)}return e})(),Q=new Set(d.map(e=>e.command));function pe(e,t){return`${e.command}|${e.key}|${e.when??``}|${t}`}function me(e){return{key:ue(e.shortcut),command:e.command,when:J(e.whenAst)}}function $(e){return e.map((e,t)=>({...me(e),__id:pe(e,t)}))}function he(e){return e.map(({__id:e,...t})=>t)}function ge(e){return d.filter(t=>t.command===e).map(e=>Object.assign({},e))}function _e(e,t){if(!Q.has(e))return`custom`;let n=fe.get(e);if(!n)return`custom`;if(t.length!==n.size)return`modified`;for(let e of t){let t=`${e.key}|${e.when??``}`;if(!n.has(t))return`modified`}return`default`}function ve(e,t,n){return!n||[t.toLowerCase(),e.command.toLowerCase(),e.key.toLowerCase(),q(e.when).toLowerCase()].some(e=>e.includes(n))}function ye(){return Math.random().toString(36).slice(2)}function be(){let e=l(),t=i(),n=r(),d=s(),f=typeof navigator<`u`?navigator.platform:``,h=x(f),[y,S]=(0,L.useState)(!1),[C,w]=(0,L.useState)(null),T=!e||e.primary,k=e?u(e.environmentId)?.keybindings:o().keybindings,A=(0,L.useCallback)(()=>{if(!n)return;if(!T){w(`This file lives on ${e?.nodeLabel??`the selected node`} and cannot be opened in a local editor.`);return}w(null),S(!0);let t=N(d??[]);if(!t){w(`No available editors found.`),S(!1);return}o().shell.openInEditor(n,t).catch(e=>{w(e instanceof Error?e.message:`Unable to open keybindings file.`)}).finally(()=>{S(!1)})},[d,T,n,e?.nodeLabel]),j=c(b(a)),M=(0,L.useMemo)(()=>{let e=new Set,t=new Map;for(let n of j)for(let r of n.scripts){let n=`script.${r.id}.run`;e.add(n),t.has(n)||t.set(n,`Run: ${r.name}`)}return{commandList:Array.from(e),titles:t}},[j]),R=t?.keybindings??de,[B,V]=(0,L.useState)(()=>$(R)),[U,W]=(0,L.useState)(()=>JSON.stringify(he($(R)))),G=(0,L.useRef)(!1);(0,L.useEffect)(()=>{let e=JSON.stringify(he($(R)));e!==U&&(W(e),G.current||V($(R)))},[R,U]);let K=(0,L.useCallback)(async e=>{G.current=!0;try{if(!k)throw Error(`Keybinding settings are unavailable on this node.`);await k.replaceCustom({rules:he(e)})}catch(e){p.add(O({type:`error`,title:`Could not save keybindings`,description:e instanceof Error?e.message:`An unknown error occurred.`})),V($(R))}finally{G.current=!1}},[k,R]),q=(0,L.useCallback)((e,t)=>{V(n=>{let r=n.slice(),i=r[e];if(!i)return n;let a=ue(t);return a===i.key?n:(r[e]={...i,key:a,__id:i.__id},K(r),r)})},[K]),J=(0,L.useCallback)(e=>{V(t=>{let n={command:e,key:``,when:void 0,__id:`placeholder-${ye()}`},r=(()=>{let n=-1;return t.forEach((t,r)=>{t.command===e&&(n=r)}),n})();return r===-1?[...t,n]:[...t.slice(0,r+1),n,...t.slice(r+1)]})},[]),ee=(0,L.useCallback)(e=>{V(t=>{let n=t.slice();return n.splice(e,1),K(n),n})},[K]),te=(0,L.useCallback)((e,t)=>{V(n=>{let r=n.slice(),i=r[e];return!i||(i.when??void 0)===t?n:(r[e]={...i,when:t,__id:i.__id},K(r),r)})},[K]),Y=(0,L.useCallback)(e=>{V(t=>{let n=t[e];if(!n)return t;let r=n.command;if(!Q.has(r)){let n=t.slice();return n.splice(e,1),K(n),n}let i=ge(r),a=t.filter(e=>e.command!==r);for(let e of i)a.push({...e,__id:`default-${r}-${ye()}`});return K(a),a})},[K]),re=(0,L.useCallback)(e=>{V(t=>{let n=t.filter(t=>t.command!==e);if(Q.has(e))for(let t of ge(e))n.push({...t,__id:`default-${e}-${ye()}`});return K(n),n})},[K]),ie=(0,L.useCallback)(async()=>{V([]);try{if(!k)throw Error(`Keybinding settings are unavailable on this node.`);await k.replaceCustom({rules:[]})}catch(e){p.add(O({type:`error`,title:`Could not restore default keybindings`,description:e instanceof Error?e.message:`An unknown error occurred.`})),V($(R))}},[k,R]),ae=(0,L.useRef)(new Map),oe=(0,L.useCallback)(e=>{let t=ae.current.get(e);t&&(t.scrollIntoView({behavior:`smooth`,block:`center`}),t.dataset.flash=`true`,window.setTimeout(()=>{delete t.dataset.flash},1100))},[]),[se,ce]=(0,L.useState)(``),X=(0,L.useDeferredValue)(se.trim().toLowerCase()),le=(0,L.useMemo)(()=>ne(B),[B]),fe=(0,L.useMemo)(()=>{let e=new Map;B.forEach((t,n)=>{let r=e.get(t.command);r?r.push(n):e.set(t.command,[n])});let t=new Set([...e.keys(),...Q,...M.commandList]),n=new Map;for(let r of t){let t=e.get(r)??[],i=t.map(e=>B[e]).filter(Boolean),a=H(r,M.titles.get(r)),o=_e(r,i),s={key:``,command:r,when:void 0};if(!(X.length===0||ve(s,a.title,X)||i.some(e=>ve(e,a.title,X))))continue;let c={command:r,title:a.title,indicesInDraft:t,status:o},l=n.get(a.category.id);l?l.push(c):n.set(a.category.id,[c])}let r=[];for(let e of Object.values(z).toSorted((e,t)=>e.sortWeight-t.sortWeight)){let t=n.get(e.id);!t||t.length===0||(t.sort((e,t)=>{let n=H(e.command,M.titles.get(e.command)),r=H(t.command,M.titles.get(t.command));return n.sortWeight-r.sortWeight}),r.push({category:e,rows:t}))}return r},[B,X,M]),pe=fe.reduce((e,t)=>e+t.rows.length,0),me=(0,L.useMemo)(()=>({platform:f,draft:B,conflictsByCommand:le,onRebind:q,onAddBinding:J,onRemoveBinding:ee,onChangeWhen:te,onResetBinding:Y,onResetCommand:re,scrollToCommand:oe,rowRefs:ae}),[f,B,le,q,J,ee,te,Y,re,oe]),be=t?.issues.filter(e=>e.kind.startsWith(`keybindings.`))??[],Se=(d??[]).length>0;return(0,Z.jsxs)(F,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`span`,{className:`grid size-9 place-items-center rounded-lg bg-accent text-foreground/70`,children:(0,Z.jsx)(m,{className:`size-4`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight`,children:`Keybindings`}),(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Click any shortcut and press a new combination to rebind. Press Esc to cancel, Backspace to clear.`})]})]}),(0,Z.jsxs)(D,{variant:`outline`,size:`xs`,onClick:()=>void ie(),disabled:B.length===0,children:[(0,Z.jsx)(v,{className:`size-3.5`}),`Restore defaults`]})]}),(0,Z.jsx)(P,{title:`Configuration file`,children:(0,Z.jsx)(I,{title:`Keybindings file`,description:"Open the persisted `keybindings.json` file to edit advanced bindings directly.",status:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`block break-all font-mono text-[11px] text-foreground`,children:n??`Resolving keybindings path...`}),C?(0,Z.jsx)(`span`,{className:`mt-1 block text-destructive`,children:C}):(0,Z.jsx)(`span`,{className:`mt-1 block`,children:T?Se?`Opens in your preferred editor.`:`No available editors found.`:`Stored on ${e?.nodeLabel??`the selected node`}; use an editor on that machine.`})]}),control:(0,Z.jsx)(D,{size:`xs`,variant:`outline`,disabled:!T||!n||!Se||y,onClick:A,children:y?`Opening...`:`Open file`})})}),be.length>0?(0,Z.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs text-amber-200`,children:[(0,Z.jsx)(_,{className:`mt-0.5 size-4 shrink-0`}),(0,Z.jsxs)(`div`,{className:`flex-1 space-y-0.5`,children:[be.map(e=>(0,Z.jsx)(`p`,{children:e.message},`${e.kind}-${e.message}`)),n?(0,Z.jsxs)(`p`,{className:`opacity-70`,children:[`Edit `,(0,Z.jsx)(`code`,{className:`rounded bg-amber-500/20 px-1`,children:n}),` `,`to resolve.`]}):null]})]}):null,(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(g,{className:`absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground/60`}),(0,Z.jsx)(E,{type:`search`,placeholder:`Search by command, shortcut, or when…`,className:`pl-9`,value:se,onChange:e=>ce(e.target.value)})]}),pe===0?(0,Z.jsx)(`div`,{className:`rounded-lg border border-dashed border-border/60 px-6 py-12 text-center text-sm text-muted-foreground`,children:`No commands match your search.`}):fe.map(e=>(0,Z.jsx)(P,{title:e.category.label,children:e.rows.map(e=>(0,Z.jsx)(xe,{row:e,context:me,isMac:h,scriptTitle:M.titles.get(e.command)},e.command))},e.category.id))]})}var xe=(0,L.memo)(function(e){let t=(0,R.c)(42),{row:n,context:r,isMac:i}=e,a;if(t[0]!==r||t[1]!==i||t[2]!==n.command||t[3]!==n.indicesInDraft||t[4]!==n.status||t[5]!==n.title){let e;t[7]===r.draft?e=t[8]:(e=e=>({index:e,rule:r.draft[e]}),t[7]=r.draft,t[8]=e);let o=n.indicesInDraft.map(e),s=r.conflictsByCommand.get(n.command)??[],c=s.slice(0,3),l=n.command,u;t[9]!==r.rowRefs.current||t[10]!==n.command?(u=e=>{r.rowRefs.current.set(n.command,e)},t[9]=r.rowRefs.current,t[10]=n.command,t[11]=u):u=t[11];let d;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(d=S(`group flex flex-col gap-2 border-t border-border/60 px-4 py-3 first:border-t-0 transition-colors data-[flash=true]:bg-amber-500/10 sm:px-5`),t[12]=d):d=t[12];let f;t[13]===n.title?f=t[14]:(f=(0,Z.jsx)(`span`,{className:`truncate text-[13px] font-medium tracking-tight text-foreground`,children:n.title}),t[13]=n.title,t[14]=f);let p;t[15]===n.status?p=t[16]:(p=(0,Z.jsx)(Se,{status:n.status}),t[15]=n.status,t[16]=p);let m;t[17]!==f||t[18]!==p?(m=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[f,p]}),t[17]=f,t[18]=p,t[19]=m):m=t[19];let g;t[20]===n.command?g=t[21]:(g=(0,Z.jsx)(`code`,{className:`block truncate text-[10px] text-muted-foreground/60`,children:n.command}),t[20]=n.command,t[21]=g);let _;t[22]!==m||t[23]!==g?(_=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[m,g]}),t[22]=m,t[23]=g,t[24]=_):_=t[24];let y=o.length===0?(0,Z.jsx)(we,{draftIndex:-1,rule:{command:n.command,key:``,when:void 0},context:r,isMac:i,isPrimary:!0,isPlaceholder:!0,onAddPlaceholder:()=>r.onAddBinding(n.command)},`placeholder`):o.map((e,t)=>{let{index:n,rule:a}=e;return(0,Z.jsx)(we,{draftIndex:n,rule:a,context:r,isMac:i,isPrimary:t===0,isPlaceholder:a.key.length===0},`${n}-${a.__id}`)}),b;t[25]!==r||t[26]!==n.command||t[27]!==n.title||t[28]!==o?(b=o.length>0?(0,Z.jsxs)(T,{children:[(0,Z.jsx)(C,{render:(0,Z.jsx)(`button`,{type:`button`,onClick:()=>r.onAddBinding(n.command),className:`inline-flex size-6 items-center justify-center rounded-md border border-dashed border-border/60 text-muted-foreground/60 transition-colors hover:border-border hover:text-foreground`,"aria-label":`Add another shortcut for ${n.title}`,children:(0,Z.jsx)(h,{className:`size-3.5`})})}),(0,Z.jsx)(w,{side:`top`,children:`Add another shortcut`})]}):null,t[25]=r,t[26]=n.command,t[27]=n.title,t[28]=o,t[29]=b):b=t[29];let x;t[30]!==r||t[31]!==n.command||t[32]!==n.status||t[33]!==n.title?(x=n.status!=="default"&&Q.has(n.command)?(0,Z.jsxs)(T,{children:[(0,Z.jsx)(C,{render:(0,Z.jsx)(`button`,{type:`button`,onClick:()=>r.onResetCommand(n.command),className:`inline-flex size-6 items-center justify-center rounded-md text-muted-foreground/50 transition-colors hover:text-foreground`,"aria-label":`Reset ${n.title} to default`,children:(0,Z.jsx)(v,{className:`size-3.5`})})}),(0,Z.jsx)(w,{side:`top`,children:`Reset to default`})]}):null,t[30]=r,t[31]=n.command,t[32]=n.status,t[33]=n.title,t[34]=x):x=t[34];let E;t[35]!==y||t[36]!==b||t[37]!==x?(E=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1.5`,children:[y,b,x]}),t[35]=y,t[36]=b,t[37]=x,t[38]=E):E=t[38];let D;t[39]!==_||t[40]!==E?(D=(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[_,E]}),t[39]=_,t[40]=E,t[41]=D):D=t[41],a=(0,Z.jsxs)(`div`,{"data-keybinding-command":l,ref:u,className:d,children:[D,c.length>0?(0,Z.jsxs)(`div`,{className:`animate-in fade-in slide-in-from-top-1 flex flex-col gap-1 rounded-md border border-destructive/30 bg-destructive/10 px-2.5 py-1.5 text-[11px] text-destructive-foreground/90`,children:[c.map(e=>(0,Z.jsx)(Ce,{conflict:e,isMac:i,platform:r.platform,onSelect:()=>r.scrollToCommand(e.otherCommand)},`${e.key}-${e.otherCommand}`)),s.length>c.length?(0,Z.jsxs)(`span`,{className:`opacity-70`,children:[`+ `,s.length-c.length,` more`]}):null]}):null]}),t[0]=r,t[1]=i,t[2]=n.command,t[3]=n.indicesInDraft,t[4]=n.status,t[5]=n.title,t[6]=a}else a=t[6];return a});function Se(e){let t=(0,R.c)(5),{status:n}=e;if(n==="default")return null;let r=n===`modified`?`bg-amber-500/15 text-amber-300`:`bg-indigo-500/15 text-indigo-300`,i;t[0]===r?i=t[1]:(i=S(`rounded px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.06em]`,r),t[0]=r,t[1]=i);let a=n===`modified`?`Modified`:`Custom`,o;return t[2]!==i||t[3]!==a?(o=(0,Z.jsx)(`span`,{className:i,children:a}),t[2]=i,t[3]=a,t[4]=o):o=t[4],o}function Ce(e){let t=(0,R.c)(27),{conflict:n,platform:r,isMac:i,onSelect:a}=e,o;t[0]===n.otherCommand?o=t[1]:(o=H(n.otherCommand),t[0]=n.otherCommand,t[1]=o);let s=o,c,l,u,d;if(t[2]!==n.key||t[3]!==i||t[4]!==r){let e=je(n.key),a=e?le(e,{platform:r}):[n.key];u=`flex flex-wrap items-center gap-1.5`,t[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(_,{className:`size-3 shrink-0 text-destructive`}),t[9]=d):d=t[9],c=`inline-flex items-center gap-0.5 font-mono`;let o;t[10]===i?o=t[11]:(o=e=>(0,Z.jsx)(De,{token:e,isMac:i},e),t[10]=i,t[11]=o),l=a.map(o),t[2]=n.key,t[3]=i,t[4]=r,t[5]=c,t[6]=l,t[7]=u,t[8]=d}else c=t[5],l=t[6],u=t[7],d=t[8];let f;t[12]!==c||t[13]!==l?(f=(0,Z.jsx)(`span`,{className:c,children:l}),t[12]=c,t[13]=l,t[14]=f):f=t[14];let p;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(`span`,{children:`also bound to`}),t[15]=p):p=t[15];let m;t[16]!==s.title||t[17]!==a?(m=(0,Z.jsx)(`button`,{type:`button`,onClick:a,className:`rounded bg-destructive/20 px-1.5 py-0.5 font-medium text-destructive-foreground hover:bg-destructive/30`,children:s.title}),t[16]=s.title,t[17]=a,t[18]=m):m=t[18];let h;t[19]===n.otherWhen?h=t[20]:(h=n.otherWhen===void 0?null:(0,Z.jsxs)(`span`,{className:`opacity-70`,children:[`when `,(0,Z.jsx)(`code`,{className:`font-mono`,children:q(n.otherWhen)})]}),t[19]=n.otherWhen,t[20]=h);let g;return t[21]!==u||t[22]!==d||t[23]!==f||t[24]!==m||t[25]!==h?(g=(0,Z.jsxs)(`div`,{className:u,children:[d,f,p,m,h]}),t[21]=u,t[22]=d,t[23]=f,t[24]=m,t[25]=h,t[26]=g):g=t[26],g}function we(e){let t=(0,R.c)(59),{draftIndex:n,rule:r,context:i,isMac:a,isPlaceholder:o,onAddPlaceholder:s}=e,[c,l]=(0,L.useState)(!1),[u,d]=(0,L.useState)(!1),f=(0,L.useRef)(null),p;bb0:{if(r.key.length===0){p=null;break bb0}let e;t[0]===r.key?e=t[1]:(e=je(r.key),t[0]=r.key,t[1]=e),p=e}let m=p,g=m?le(m,{platform:i.platform}):[],_;t[2]!==n||t[3]!==o||t[4]!==s?(_=()=>{if(o&&n===-1&&s){s(),setTimeout(Te,50);return}l(!0)},t[2]=n,t[3]=o,t[4]=s,t[5]=_):_=t[5];let v=_,b,x;t[6]!==i||t[7]!==n||t[8]!==c?(b=()=>{if(!c)return;let e=e=>{if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`&&!Ae(e)){l(!1);return}if(e.key===`Tab`&&!Ae(e)){l(!1);return}if(e.key===`Backspace`&&!Ae(e)){n>=0&&i.onRemoveBinding(n),l(!1);return}let t=oe(e,{platform:i.platform});t&&(n>=0&&i.onRebind(n,t),d(!0),l(!1),setTimeout(()=>d(!1),220))};return window.addEventListener(`keydown`,e,{capture:!0}),()=>window.removeEventListener(`keydown`,e,{capture:!0})},x=[c,n,i],t[6]=i,t[7]=n,t[8]=c,t[9]=b,t[10]=x):(b=t[9],x=t[10]),(0,L.useEffect)(b,x);let C,w;t[11]===c?(C=t[12],w=t[13]):(C=()=>{c&&f.current?.focus()},w=[c],t[11]=c,t[12]=C,t[13]=w),(0,L.useEffect)(C,w);let T;t[14]!==c||t[15]!==v?(T=e=>{c||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v())},t[14]=c,t[15]=v,t[16]=T):T=t[16];let E=T,D;t[17]!==i||t[18]!==n?(D=()=>{n>=0&&i.onRemoveBinding(n)},t[17]=i,t[18]=n,t[19]=D):D=t[19];let O=D;if(o&&n===-1&&g.length===0){let e;t[20]===s?e=t[21]:(e=()=>s?.(),t[20]=s,t[21]=e);let n;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(h,{className:`size-3`}),t[22]=n):n=t[22];let r;return t[23]!==E||t[24]!==e?(r=(0,Z.jsxs)(`button`,{ref:f,type:`button`,onClick:e,onKeyDown:E,className:`inline-flex h-6 items-center gap-1 rounded-md border border-dashed border-border/60 bg-transparent px-2 text-[11px] text-muted-foreground/70 transition-colors hover:border-border hover:text-foreground`,children:[n,` No shortcut — click to set`]}),t[23]=E,t[24]=e,t[25]=r):r=t[25],r}let k=`Edit shortcut for ${r.command}`,A=g.length===0&&n>=0?`true`:void 0,j=c?`kb-chip-recording border-indigo-500/60 bg-indigo-500/15 text-indigo-100 shadow-[0_0_0_4px_rgba(99,102,241,0.18)]`:u?`border-emerald-500/50 bg-emerald-500/15 text-emerald-100`:`border-border bg-muted/60 text-foreground hover:bg-muted`,M;t[26]===j?M=t[27]:(M=S(`inline-flex h-6 items-center gap-1 rounded-md border px-2 font-mono text-[11px] transition-all duration-150`,j),t[26]=j,t[27]=M);let N;t[28]===c?N=t[29]:(N=c?{animation:`keybindings-pulse 1.4s ease-in-out infinite`}:{},t[28]=c,t[29]=N);let P=c?(0,Z.jsx)(`span`,{className:`text-[11px] tracking-[0.04em]`,children:`Press shortcut…`}):g.length===0?(0,Z.jsx)(`span`,{className:`text-muted-foreground/60`,children:`Click to set`}):g.map(e=>(0,Z.jsx)(De,{token:e,isMac:a},e)),F;t[30]!==c||t[31]!==r.when?(F=!c&&r.when!==void 0?(0,Z.jsx)(`span`,{className:`ml-1 hidden sm:inline`,children:`·`}):null,t[30]=c,t[31]=r.when,t[32]=F):F=t[32];let I;t[33]!==c||t[34]!==E||t[35]!==v||t[36]!==k||t[37]!==A||t[38]!==M||t[39]!==N||t[40]!==P||t[41]!==F?(I=(0,Z.jsxs)(`button`,{ref:f,type:`button`,"aria-pressed":c,"aria-label":k,"data-chip-pending-record":A,onClick:v,onKeyDown:E,className:M,style:N,children:[P,F]}),t[33]=c,t[34]=E,t[35]=v,t[36]=k,t[37]=A,t[38]=M,t[39]=N,t[40]=P,t[41]=F,t[42]=I):I=t[42];let z;t[43]!==i||t[44]!==n?(z=e=>i.onChangeWhen(n,e),t[43]=i,t[44]=n,t[45]=z):z=t[45];let B=n<0||c,V;t[46]!==r.when||t[47]!==z||t[48]!==B?(V=(0,Z.jsx)(Oe,{currentWhen:r.when,onChange:z,disabled:B}),t[46]=r.when,t[47]=z,t[48]=B,t[49]=V):V=t[49];let H;t[50]!==n||t[51]!==O||t[52]!==c?(H=n>=0&&!c?(0,Z.jsx)(`button`,{type:`button`,onClick:O,"aria-label":`Remove this shortcut`,className:`opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100`,children:(0,Z.jsx)(y,{className:`size-3 text-muted-foreground/60 hover:text-destructive`})}):null,t[50]=n,t[51]=O,t[52]=c,t[53]=H):H=t[53];let U;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Z.jsx)(ke,{}),t[54]=U):U=t[54];let W;return t[55]!==I||t[56]!==V||t[57]!==H?(W=(0,Z.jsxs)(`span`,{className:`relative inline-flex items-center gap-1`,children:[I,V,H,U]}),t[55]=I,t[56]=V,t[57]=H,t[58]=W):W=t[58],W}function Te(){document.querySelectorAll(`[data-chip-pending-record="true"]`).forEach(Ee)}function Ee(e){e.click()}function De(e){let t=(0,R.c)(5),{token:n,isMac:r}=e,i=r&&n.length===1&&/[⌀-⏿←-⇿]/.test(n)?`bg-transparent`:`bg-foreground/10`,a;t[0]===i?a=t[1]:(a=S(`rounded px-1 leading-none`,i),t[0]=i,t[1]=a);let o;return t[2]!==a||t[3]!==n?(o=(0,Z.jsx)(`span`,{className:a,children:n}),t[2]=a,t[3]=n,t[4]=o):o=t[4],o}function Oe(e){let t=(0,R.c)(35),{currentWhen:n,onChange:r,disabled:i}=e,a;t[0]===n?a=t[1]:(a=K(n),t[0]=n,t[1]=a);let o=a,s,c,l,u,d,f,p;if(t[2]!==n||t[3]!==i){let e=q(n);c=A,s=j,l=`button`,u=i;let r=n===void 0&&`italic opacity-70`;t[11]===r?d=t[12]:(d=S(`inline-flex h-5 items-center gap-1 rounded bg-muted/40 px-1.5 text-[10px] text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,r),t[11]=r,t[12]=d),f=`When: ${e}`,p=n===void 0?`always`:e.toLowerCase(),t[2]=n,t[3]=i,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=p}else s=t[4],c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10];let m;t[13]!==l||t[14]!==u||t[15]!==d||t[16]!==f||t[17]!==p?(m=(0,Z.jsx)(`button`,{type:l,disabled:u,className:d,"aria-label":f,children:p}),t[13]=l,t[14]=u,t[15]=d,t[16]=f,t[17]=p,t[18]=m):m=t[18];let h;t[19]!==s||t[20]!==m?(h=(0,Z.jsx)(s,{render:m}),t[19]=s,t[20]=m,t[21]=h):h=t[21];let g;t[22]!==n||t[23]!==o?(g=!o&&n!==void 0?(0,Z.jsxs)(`div`,{className:`px-2 py-1.5 text-[10px] text-muted-foreground`,children:[`Current: `,(0,Z.jsx)(`code`,{className:`font-mono`,children:n})]}):null,t[22]=n,t[23]=o,t[24]=g):g=t[24];let _;t[25]!==n||t[26]!==r?(_=U.map(e=>(0,Z.jsxs)(M,{onClick:()=>r(e.value),className:S(`flex items-center justify-between text-[12px]`,e.value===n&&`font-semibold text-foreground`),children:[(0,Z.jsx)(`span`,{children:e.label}),e.value===void 0?(0,Z.jsx)(`span`,{className:`text-[10px] text-muted-foreground/60`,children:`no condition`}):(0,Z.jsx)(`code`,{className:`text-[10px] font-mono text-muted-foreground/60`,children:e.value})]},e.id)),t[25]=n,t[26]=r,t[27]=_):_=t[27];let v;t[28]!==_||t[29]!==g?(v=(0,Z.jsxs)(k,{side:`bottom`,align:`end`,className:`min-w-[220px]`,children:[g,_]}),t[28]=_,t[29]=g,t[30]=v):v=t[30];let y;return t[31]!==c||t[32]!==v||t[33]!==h?(y=(0,Z.jsxs)(c,{children:[h,v]}),t[31]=c,t[32]=v,t[33]=h,t[34]=y):y=t[34],y}function ke(){let e=(0,R.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`style`,{children:`@keyframes keybindings-pulse {
1
+ import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{Gn as r,Hn as i,It as a,Sn as o,Vn as s,Yt as c,Zn as l,gn as u}from"./runtime-Cy36EhFa.js";import{dt as d}from"./primary-DiL6nRV-.js";import{It as f}from"./composerDraftStore-DXTD6mKH.js";import{i as p}from"./toast-CV5dwFOH.js";import{t as m}from"./keyboard-BqeRMHfL.js";import{t as h}from"./plus-B2h-VEqh.js";import{t as g}from"./search-BGQsenCM.js";import{t as _}from"./triangle-alert-RL_T3KLo.js";import{t as v}from"./undo-2-x37tfI3V.js";import{t as y}from"./x-C1Cemsov.js";import{t as b}from"./shallow-DWZCFNun.js";import{n as x,t as S}from"./utils-Ct58OPtz.js";import{i as C,n as w,t as T}from"./tooltip-DZhBSkif.js";import{t as E}from"./input-Ba4jS4Ks.js";import{t as D}from"./button-WR80VgkK.js";import{t as O}from"./toastHelpers-CSQRKo4F.js";import{c as k,i as A,p as j,s as M}from"./menu-CsEBcjDz.js";import{r as N}from"./editorPreferences-BqfWlBPx.js";import{i as P,n as F,r as I}from"./settingsLayout-BPKHc7wz.js";var L=e(t(),1),R=n(),z={terminal:{id:`terminal`,label:`Terminal`,sortWeight:10},workspace:{id:`workspace`,label:`Workspace`,sortWeight:20},diff:{id:`diff`,label:`Diff`,sortWeight:30},commandPalette:{id:`commandPalette`,label:`Command palette`,sortWeight:40},sidebar:{id:`sidebar`,label:`Sidebar`,sortWeight:50},chat:{id:`chat`,label:`Chat`,sortWeight:60},composer:{id:`composer`,label:`Composer`,sortWeight:70},editor:{id:`editor`,label:`Editor`,sortWeight:80},modelPicker:{id:`modelPicker`,label:`Model picker`,sortWeight:90},thread:{id:`thread`,label:`Threads`,sortWeight:100},script:{id:`script`,label:`Project scripts`,sortWeight:110}},B={"terminal.toggle":{title:`Toggle terminal drawer`,sortWeight:1},"terminal.split":{title:`Split terminal`,sortWeight:2},"terminal.new":{title:`New terminal`,sortWeight:3},"terminal.close":{title:`Close terminal`,sortWeight:4},"workspace.files":{title:`Open workspace files`,sortWeight:1},"workspace.review":{title:`Open workspace review`,sortWeight:2},"workspace.terminal":{title:`Open workspace terminal`,sortWeight:3},"workspace.simulator":{title:`Open iOS Simulator workspace`,sortWeight:4},"diff.toggle":{title:`Toggle diff view`,sortWeight:1},"commandPalette.toggle":{title:`Open command palette`,sortWeight:1},"sidebar.showInbox":{title:`Show Inbox sidebar`,sortWeight:1},"sidebar.showProjects":{title:`Show Projects sidebar`,sortWeight:2},"chat.new":{title:`New chat`,sortWeight:1},"chat.newLocal":{title:`New chat (local environment)`,sortWeight:2},"composer.stash":{title:`Stash prompt or open stash`,sortWeight:1},"editor.openFavorite":{title:`Open in preferred editor`,sortWeight:1},"modelPicker.toggle":{title:`Toggle model picker`,sortWeight:1},"modelPicker.jump.1":{title:`Pick model 1`,sortWeight:2},"modelPicker.jump.2":{title:`Pick model 2`,sortWeight:3},"modelPicker.jump.3":{title:`Pick model 3`,sortWeight:4},"modelPicker.jump.4":{title:`Pick model 4`,sortWeight:5},"modelPicker.jump.5":{title:`Pick model 5`,sortWeight:6},"modelPicker.jump.6":{title:`Pick model 6`,sortWeight:7},"modelPicker.jump.7":{title:`Pick model 7`,sortWeight:8},"modelPicker.jump.8":{title:`Pick model 8`,sortWeight:9},"modelPicker.jump.9":{title:`Pick model 9`,sortWeight:10},"thread.find":{title:`Find in current thread`,sortWeight:1},"thread.pinToggle":{title:`Pin or unpin current thread`,sortWeight:2},"thread.previous":{title:`Previous thread`,sortWeight:3},"thread.next":{title:`Next thread`,sortWeight:4},"thread.jump.1":{title:`Jump to thread 1`,sortWeight:5},"thread.jump.2":{title:`Jump to thread 2`,sortWeight:6},"thread.jump.3":{title:`Jump to thread 3`,sortWeight:7},"thread.jump.4":{title:`Jump to thread 4`,sortWeight:8},"thread.jump.5":{title:`Jump to thread 5`,sortWeight:9},"thread.jump.6":{title:`Jump to thread 6`,sortWeight:10},"thread.jump.7":{title:`Jump to thread 7`,sortWeight:11},"thread.jump.8":{title:`Jump to thread 8`,sortWeight:12},"thread.jump.9":{title:`Jump to thread 9`,sortWeight:13}};function V(e){let t=e.indexOf(`.`),n=t===-1?e:e.slice(0,t);return n===`script`?z.script:z[n]??z.script}function H(e,t){let n=V(e),r=B[e];if(r)return{category:n,title:r.title,sortWeight:r.sortWeight};let i=e.match(/^script\.([a-z0-9][a-z0-9-]*)\.run$/)?.[1]??e;return{category:n,title:t??`Run: ${i}`,sortWeight:100}}var U=[{id:`always`,label:`Always`,value:void 0},{id:`terminalFocus`,label:`Terminal focused`,value:`terminalFocus`},{id:`notTerminalFocus`,label:`Not in terminal`,value:`!terminalFocus`},{id:`terminalOpen`,label:`Terminal open`,value:`terminalOpen`},{id:`notTerminalOpen`,label:`Terminal not open`,value:`!terminalOpen`},{id:`modelPickerOpen`,label:`Model picker open`,value:`modelPickerOpen`},{id:`commandPaletteOpen`,label:`Command palette open`,value:`commandPaletteOpen`},{id:`composerFocus`,label:`Composer focused`,value:`composerFocus`},{id:`notComposerFocus`,label:`Not in composer`,value:`!composerFocus`}],W=new Map(U.map(e=>[e.value,e])),G=new Map(U.map(e=>[e.value===void 0?void 0:e.value.replace(/\s+/g,``),e]));function K(e){return e===void 0?W.get(void 0):W.get(e)||G.get(e.replace(/\s+/g,``))}function q(e){let t=K(e);return t?t.label:e??`Always`}function J(e){if(e)switch(e.type){case`identifier`:return e.name;case`not`:return`!${J(e.node)}`;case`and`:return`(${J(e.left)} && ${J(e.right)})`;case`or`:return`(${J(e.left)} || ${J(e.right)})`}}function ee(e,t){return(e===void 0?``:e.replace(/\s+/g,``))===(t===void 0?``:t.replace(/\s+/g,``))}function te(e,t){let n=e[t];if(!n)return[];let r=[];return e.forEach((e,i)=>{i!==t&&e.command!==n.command&&e.key===n.key&&ee(e.when,n.when)&&r.push({key:n.key,otherCommand:e.command,otherWhen:e.when})}),r}function ne(e){let t=new Map;return e.forEach((n,r)=>{let i=te(e,r);if(i.length===0)return;let a=e[r].command,o=t.get(a)??[];o.push(...i),t.set(a,o)}),t}function Y(e){return/mac|iphone|ipad|ipod/i.test(e)}var re=new Set([`control`,`shift`,`alt`,`altgraph`,`meta`,`os`,`hyper`,`super`,`fn`,`capslock`,`numlock`,`scrolllock`]),ie=new Set([`escape`,`tab`,`enter`]);function ae(e,t){let n=e.toLowerCase();if(n===` `||n===`spacebar`)return`space`;if(n===`esc`)return`escape`;if(n===`arrowup`)return`up`;if(n===`arrowdown`)return`down`;if(n===`arrowleft`)return`left`;if(n===`arrowright`)return`right`;if(t){let e=t.match(/^Digit(\d)$/);if(e)return e[1];if(t===`BracketLeft`)return`[`;if(t===`BracketRight`)return`]`}return n}function oe(e,t){let n=e.key.toLowerCase();if(re.has(n))return null;let r=Y(t?.platform??(typeof navigator<`u`?navigator.platform:``)),i=r?e.metaKey:e.ctrlKey;if(!(i||e.shiftKey||e.altKey||(r?e.ctrlKey:e.metaKey))&&ie.has(n))return null;let a=ae(e.key,e.code);return a.length===0?null:{key:a,modKey:i,metaKey:!r&&e.metaKey,ctrlKey:r&&e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey}}var se={mod:`⌘`,meta:`⌘`,cmd:`⌘`,ctrl:`⌃`,control:`⌃`,shift:`⇧`,alt:`⌥`,option:`⌥`},ce={mod:`Ctrl`,meta:`Meta`,cmd:`Meta`,ctrl:`Ctrl`,control:`Ctrl`,shift:`Shift`,alt:`Alt`,option:`Alt`},X={space:`Space`,enter:`Enter`,escape:`Esc`,up:`↑`,down:`↓`,left:`←`,right:`→`,tab:`Tab`,backspace:`⌫`,delete:`Del`};function le(e,t){let n=Y(t?.platform??(typeof navigator<`u`?navigator.platform:``))?se:ce,r=[];e.modKey&&r.push(n.mod),e.metaKey&&r.push(n.meta),e.ctrlKey&&r.push(n.ctrl),e.altKey&&r.push(n.alt),e.shiftKey&&r.push(n.shift);let i=X[e.key]??(e.key.length===1?e.key.toUpperCase():e.key);return r.push(i),r}function ue(e){let t=[];e.modKey&&t.push(`mod`),e.metaKey&&t.push(`meta`),e.ctrlKey&&t.push(`ctrl`),e.altKey&&t.push(`alt`),e.shiftKey&&t.push(`shift`);let n=e.key===` `?`space`:e.key;return t.push(n),t.join(`+`)}var Z=f(),de=[],fe=(()=>{let e=new Map;for(let t of d){let n=`${t.key}|${t.when??``}`,r=e.get(t.command)??new Set;r.add(n),e.set(t.command,r)}return e})(),Q=new Set(d.map(e=>e.command));function pe(e,t){return`${e.command}|${e.key}|${e.when??``}|${t}`}function me(e){return{key:ue(e.shortcut),command:e.command,when:J(e.whenAst)}}function $(e){return e.map((e,t)=>({...me(e),__id:pe(e,t)}))}function he(e){return e.map(({__id:e,...t})=>t)}function ge(e){return d.filter(t=>t.command===e).map(e=>Object.assign({},e))}function _e(e,t){if(!Q.has(e))return`custom`;let n=fe.get(e);if(!n)return`custom`;if(t.length!==n.size)return`modified`;for(let e of t){let t=`${e.key}|${e.when??``}`;if(!n.has(t))return`modified`}return`default`}function ve(e,t,n){return!n||[t.toLowerCase(),e.command.toLowerCase(),e.key.toLowerCase(),q(e.when).toLowerCase()].some(e=>e.includes(n))}function ye(){return Math.random().toString(36).slice(2)}function be(){let e=l(),t=i(),n=r(),d=s(),f=typeof navigator<`u`?navigator.platform:``,h=x(f),[y,S]=(0,L.useState)(!1),[C,w]=(0,L.useState)(null),T=!e||e.primary,k=e?u(e.environmentId)?.keybindings:o().keybindings,A=(0,L.useCallback)(()=>{if(!n)return;if(!T){w(`This file lives on ${e?.nodeLabel??`the selected node`} and cannot be opened in a local editor.`);return}w(null),S(!0);let t=N(d??[]);if(!t){w(`No available editors found.`),S(!1);return}o().shell.openInEditor(n,t).catch(e=>{w(e instanceof Error?e.message:`Unable to open keybindings file.`)}).finally(()=>{S(!1)})},[d,T,n,e?.nodeLabel]),j=c(b(a)),M=(0,L.useMemo)(()=>{let e=new Set,t=new Map;for(let n of j)for(let r of n.scripts){let n=`script.${r.id}.run`;e.add(n),t.has(n)||t.set(n,`Run: ${r.name}`)}return{commandList:Array.from(e),titles:t}},[j]),R=t?.keybindings??de,[B,V]=(0,L.useState)(()=>$(R)),[U,W]=(0,L.useState)(()=>JSON.stringify(he($(R)))),G=(0,L.useRef)(!1);(0,L.useEffect)(()=>{let e=JSON.stringify(he($(R)));e!==U&&(W(e),G.current||V($(R)))},[R,U]);let K=(0,L.useCallback)(async e=>{G.current=!0;try{if(!k)throw Error(`Keybinding settings are unavailable on this node.`);await k.replaceCustom({rules:he(e)})}catch(e){p.add(O({type:`error`,title:`Could not save keybindings`,description:e instanceof Error?e.message:`An unknown error occurred.`})),V($(R))}finally{G.current=!1}},[k,R]),q=(0,L.useCallback)((e,t)=>{V(n=>{let r=n.slice(),i=r[e];if(!i)return n;let a=ue(t);return a===i.key?n:(r[e]={...i,key:a,__id:i.__id},K(r),r)})},[K]),J=(0,L.useCallback)(e=>{V(t=>{let n={command:e,key:``,when:void 0,__id:`placeholder-${ye()}`},r=(()=>{let n=-1;return t.forEach((t,r)=>{t.command===e&&(n=r)}),n})();return r===-1?[...t,n]:[...t.slice(0,r+1),n,...t.slice(r+1)]})},[]),ee=(0,L.useCallback)(e=>{V(t=>{let n=t.slice();return n.splice(e,1),K(n),n})},[K]),te=(0,L.useCallback)((e,t)=>{V(n=>{let r=n.slice(),i=r[e];return!i||(i.when??void 0)===t?n:(r[e]={...i,when:t,__id:i.__id},K(r),r)})},[K]),Y=(0,L.useCallback)(e=>{V(t=>{let n=t[e];if(!n)return t;let r=n.command;if(!Q.has(r)){let n=t.slice();return n.splice(e,1),K(n),n}let i=ge(r),a=t.filter(e=>e.command!==r);for(let e of i)a.push({...e,__id:`default-${r}-${ye()}`});return K(a),a})},[K]),re=(0,L.useCallback)(e=>{V(t=>{let n=t.filter(t=>t.command!==e);if(Q.has(e))for(let t of ge(e))n.push({...t,__id:`default-${e}-${ye()}`});return K(n),n})},[K]),ie=(0,L.useCallback)(async()=>{V([]);try{if(!k)throw Error(`Keybinding settings are unavailable on this node.`);await k.replaceCustom({rules:[]})}catch(e){p.add(O({type:`error`,title:`Could not restore default keybindings`,description:e instanceof Error?e.message:`An unknown error occurred.`})),V($(R))}},[k,R]),ae=(0,L.useRef)(new Map),oe=(0,L.useCallback)(e=>{let t=ae.current.get(e);t&&(t.scrollIntoView({behavior:`smooth`,block:`center`}),t.dataset.flash=`true`,window.setTimeout(()=>{delete t.dataset.flash},1100))},[]),[se,ce]=(0,L.useState)(``),X=(0,L.useDeferredValue)(se.trim().toLowerCase()),le=(0,L.useMemo)(()=>ne(B),[B]),fe=(0,L.useMemo)(()=>{let e=new Map;B.forEach((t,n)=>{let r=e.get(t.command);r?r.push(n):e.set(t.command,[n])});let t=new Set([...e.keys(),...Q,...M.commandList]),n=new Map;for(let r of t){let t=e.get(r)??[],i=t.map(e=>B[e]).filter(Boolean),a=H(r,M.titles.get(r)),o=_e(r,i),s={key:``,command:r,when:void 0};if(!(X.length===0||ve(s,a.title,X)||i.some(e=>ve(e,a.title,X))))continue;let c={command:r,title:a.title,indicesInDraft:t,status:o},l=n.get(a.category.id);l?l.push(c):n.set(a.category.id,[c])}let r=[];for(let e of Object.values(z).toSorted((e,t)=>e.sortWeight-t.sortWeight)){let t=n.get(e.id);!t||t.length===0||(t.sort((e,t)=>{let n=H(e.command,M.titles.get(e.command)),r=H(t.command,M.titles.get(t.command));return n.sortWeight-r.sortWeight}),r.push({category:e,rows:t}))}return r},[B,X,M]),pe=fe.reduce((e,t)=>e+t.rows.length,0),me=(0,L.useMemo)(()=>({platform:f,draft:B,conflictsByCommand:le,onRebind:q,onAddBinding:J,onRemoveBinding:ee,onChangeWhen:te,onResetBinding:Y,onResetCommand:re,scrollToCommand:oe,rowRefs:ae}),[f,B,le,q,J,ee,te,Y,re,oe]),be=t?.issues.filter(e=>e.kind.startsWith(`keybindings.`))??[],Se=(d??[]).length>0;return(0,Z.jsxs)(F,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`span`,{className:`grid size-9 place-items-center rounded-lg bg-accent text-foreground/70`,children:(0,Z.jsx)(m,{className:`size-4`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight`,children:`Keybindings`}),(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Click any shortcut and press a new combination to rebind. Press Esc to cancel, Backspace to clear.`})]})]}),(0,Z.jsxs)(D,{variant:`outline`,size:`xs`,onClick:()=>void ie(),disabled:B.length===0,children:[(0,Z.jsx)(v,{className:`size-3.5`}),`Restore defaults`]})]}),(0,Z.jsx)(P,{title:`Configuration file`,children:(0,Z.jsx)(I,{title:`Keybindings file`,description:"Open the persisted `keybindings.json` file to edit advanced bindings directly.",status:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`block break-all font-mono text-[11px] text-foreground`,children:n??`Resolving keybindings path...`}),C?(0,Z.jsx)(`span`,{className:`mt-1 block text-destructive`,children:C}):(0,Z.jsx)(`span`,{className:`mt-1 block`,children:T?Se?`Opens in your preferred editor.`:`No available editors found.`:`Stored on ${e?.nodeLabel??`the selected node`}; use an editor on that machine.`})]}),control:(0,Z.jsx)(D,{size:`xs`,variant:`outline`,disabled:!T||!n||!Se||y,onClick:A,children:y?`Opening...`:`Open file`})})}),be.length>0?(0,Z.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs text-amber-200`,children:[(0,Z.jsx)(_,{className:`mt-0.5 size-4 shrink-0`}),(0,Z.jsxs)(`div`,{className:`flex-1 space-y-0.5`,children:[be.map(e=>(0,Z.jsx)(`p`,{children:e.message},`${e.kind}-${e.message}`)),n?(0,Z.jsxs)(`p`,{className:`opacity-70`,children:[`Edit `,(0,Z.jsx)(`code`,{className:`rounded bg-amber-500/20 px-1`,children:n}),` `,`to resolve.`]}):null]})]}):null,(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(g,{className:`absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground/60`}),(0,Z.jsx)(E,{type:`search`,placeholder:`Search by command, shortcut, or when…`,className:`pl-9`,value:se,onChange:e=>ce(e.target.value)})]}),pe===0?(0,Z.jsx)(`div`,{className:`rounded-lg border border-dashed border-border/60 px-6 py-12 text-center text-sm text-muted-foreground`,children:`No commands match your search.`}):fe.map(e=>(0,Z.jsx)(P,{title:e.category.label,children:e.rows.map(e=>(0,Z.jsx)(xe,{row:e,context:me,isMac:h,scriptTitle:M.titles.get(e.command)},e.command))},e.category.id))]})}var xe=(0,L.memo)(function(e){let t=(0,R.c)(42),{row:n,context:r,isMac:i}=e,a;if(t[0]!==r||t[1]!==i||t[2]!==n.command||t[3]!==n.indicesInDraft||t[4]!==n.status||t[5]!==n.title){let e;t[7]===r.draft?e=t[8]:(e=e=>({index:e,rule:r.draft[e]}),t[7]=r.draft,t[8]=e);let o=n.indicesInDraft.map(e),s=r.conflictsByCommand.get(n.command)??[],c=s.slice(0,3),l=n.command,u;t[9]!==r.rowRefs.current||t[10]!==n.command?(u=e=>{r.rowRefs.current.set(n.command,e)},t[9]=r.rowRefs.current,t[10]=n.command,t[11]=u):u=t[11];let d;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(d=S(`group flex flex-col gap-2 border-t border-border/60 px-4 py-3 first:border-t-0 transition-colors data-[flash=true]:bg-amber-500/10 sm:px-5`),t[12]=d):d=t[12];let f;t[13]===n.title?f=t[14]:(f=(0,Z.jsx)(`span`,{className:`truncate text-[13px] font-medium tracking-tight text-foreground`,children:n.title}),t[13]=n.title,t[14]=f);let p;t[15]===n.status?p=t[16]:(p=(0,Z.jsx)(Se,{status:n.status}),t[15]=n.status,t[16]=p);let m;t[17]!==f||t[18]!==p?(m=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[f,p]}),t[17]=f,t[18]=p,t[19]=m):m=t[19];let g;t[20]===n.command?g=t[21]:(g=(0,Z.jsx)(`code`,{className:`block truncate text-[10px] text-muted-foreground/60`,children:n.command}),t[20]=n.command,t[21]=g);let _;t[22]!==m||t[23]!==g?(_=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[m,g]}),t[22]=m,t[23]=g,t[24]=_):_=t[24];let y=o.length===0?(0,Z.jsx)(we,{draftIndex:-1,rule:{command:n.command,key:``,when:void 0},context:r,isMac:i,isPrimary:!0,isPlaceholder:!0,onAddPlaceholder:()=>r.onAddBinding(n.command)},`placeholder`):o.map((e,t)=>{let{index:n,rule:a}=e;return(0,Z.jsx)(we,{draftIndex:n,rule:a,context:r,isMac:i,isPrimary:t===0,isPlaceholder:a.key.length===0},`${n}-${a.__id}`)}),b;t[25]!==r||t[26]!==n.command||t[27]!==n.title||t[28]!==o?(b=o.length>0?(0,Z.jsxs)(T,{children:[(0,Z.jsx)(C,{render:(0,Z.jsx)(`button`,{type:`button`,onClick:()=>r.onAddBinding(n.command),className:`inline-flex size-6 items-center justify-center rounded-md border border-dashed border-border/60 text-muted-foreground/60 transition-colors hover:border-border hover:text-foreground`,"aria-label":`Add another shortcut for ${n.title}`,children:(0,Z.jsx)(h,{className:`size-3.5`})})}),(0,Z.jsx)(w,{side:`top`,children:`Add another shortcut`})]}):null,t[25]=r,t[26]=n.command,t[27]=n.title,t[28]=o,t[29]=b):b=t[29];let x;t[30]!==r||t[31]!==n.command||t[32]!==n.status||t[33]!==n.title?(x=n.status!=="default"&&Q.has(n.command)?(0,Z.jsxs)(T,{children:[(0,Z.jsx)(C,{render:(0,Z.jsx)(`button`,{type:`button`,onClick:()=>r.onResetCommand(n.command),className:`inline-flex size-6 items-center justify-center rounded-md text-muted-foreground/50 transition-colors hover:text-foreground`,"aria-label":`Reset ${n.title} to default`,children:(0,Z.jsx)(v,{className:`size-3.5`})})}),(0,Z.jsx)(w,{side:`top`,children:`Reset to default`})]}):null,t[30]=r,t[31]=n.command,t[32]=n.status,t[33]=n.title,t[34]=x):x=t[34];let E;t[35]!==y||t[36]!==b||t[37]!==x?(E=(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-1.5`,children:[y,b,x]}),t[35]=y,t[36]=b,t[37]=x,t[38]=E):E=t[38];let D;t[39]!==_||t[40]!==E?(D=(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[_,E]}),t[39]=_,t[40]=E,t[41]=D):D=t[41],a=(0,Z.jsxs)(`div`,{"data-keybinding-command":l,ref:u,className:d,children:[D,c.length>0?(0,Z.jsxs)(`div`,{className:`animate-in fade-in slide-in-from-top-1 flex flex-col gap-1 rounded-md border border-destructive/30 bg-destructive/10 px-2.5 py-1.5 text-[11px] text-destructive-foreground/90`,children:[c.map(e=>(0,Z.jsx)(Ce,{conflict:e,isMac:i,platform:r.platform,onSelect:()=>r.scrollToCommand(e.otherCommand)},`${e.key}-${e.otherCommand}`)),s.length>c.length?(0,Z.jsxs)(`span`,{className:`opacity-70`,children:[`+ `,s.length-c.length,` more`]}):null]}):null]}),t[0]=r,t[1]=i,t[2]=n.command,t[3]=n.indicesInDraft,t[4]=n.status,t[5]=n.title,t[6]=a}else a=t[6];return a});function Se(e){let t=(0,R.c)(5),{status:n}=e;if(n==="default")return null;let r=n===`modified`?`bg-amber-500/15 text-amber-300`:`bg-indigo-500/15 text-indigo-300`,i;t[0]===r?i=t[1]:(i=S(`rounded px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.06em]`,r),t[0]=r,t[1]=i);let a=n===`modified`?`Modified`:`Custom`,o;return t[2]!==i||t[3]!==a?(o=(0,Z.jsx)(`span`,{className:i,children:a}),t[2]=i,t[3]=a,t[4]=o):o=t[4],o}function Ce(e){let t=(0,R.c)(27),{conflict:n,platform:r,isMac:i,onSelect:a}=e,o;t[0]===n.otherCommand?o=t[1]:(o=H(n.otherCommand),t[0]=n.otherCommand,t[1]=o);let s=o,c,l,u,d;if(t[2]!==n.key||t[3]!==i||t[4]!==r){let e=je(n.key),a=e?le(e,{platform:r}):[n.key];u=`flex flex-wrap items-center gap-1.5`,t[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(_,{className:`size-3 shrink-0 text-destructive`}),t[9]=d):d=t[9],c=`inline-flex items-center gap-0.5 font-mono`;let o;t[10]===i?o=t[11]:(o=e=>(0,Z.jsx)(De,{token:e,isMac:i},e),t[10]=i,t[11]=o),l=a.map(o),t[2]=n.key,t[3]=i,t[4]=r,t[5]=c,t[6]=l,t[7]=u,t[8]=d}else c=t[5],l=t[6],u=t[7],d=t[8];let f;t[12]!==c||t[13]!==l?(f=(0,Z.jsx)(`span`,{className:c,children:l}),t[12]=c,t[13]=l,t[14]=f):f=t[14];let p;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(`span`,{children:`also bound to`}),t[15]=p):p=t[15];let m;t[16]!==s.title||t[17]!==a?(m=(0,Z.jsx)(`button`,{type:`button`,onClick:a,className:`rounded bg-destructive/20 px-1.5 py-0.5 font-medium text-destructive-foreground hover:bg-destructive/30`,children:s.title}),t[16]=s.title,t[17]=a,t[18]=m):m=t[18];let h;t[19]===n.otherWhen?h=t[20]:(h=n.otherWhen===void 0?null:(0,Z.jsxs)(`span`,{className:`opacity-70`,children:[`when `,(0,Z.jsx)(`code`,{className:`font-mono`,children:q(n.otherWhen)})]}),t[19]=n.otherWhen,t[20]=h);let g;return t[21]!==u||t[22]!==d||t[23]!==f||t[24]!==m||t[25]!==h?(g=(0,Z.jsxs)(`div`,{className:u,children:[d,f,p,m,h]}),t[21]=u,t[22]=d,t[23]=f,t[24]=m,t[25]=h,t[26]=g):g=t[26],g}function we(e){let t=(0,R.c)(59),{draftIndex:n,rule:r,context:i,isMac:a,isPlaceholder:o,onAddPlaceholder:s}=e,[c,l]=(0,L.useState)(!1),[u,d]=(0,L.useState)(!1),f=(0,L.useRef)(null),p;bb0:{if(r.key.length===0){p=null;break bb0}let e;t[0]===r.key?e=t[1]:(e=je(r.key),t[0]=r.key,t[1]=e),p=e}let m=p,g=m?le(m,{platform:i.platform}):[],_;t[2]!==n||t[3]!==o||t[4]!==s?(_=()=>{if(o&&n===-1&&s){s(),setTimeout(Te,50);return}l(!0)},t[2]=n,t[3]=o,t[4]=s,t[5]=_):_=t[5];let v=_,b,x;t[6]!==i||t[7]!==n||t[8]!==c?(b=()=>{if(!c)return;let e=e=>{if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`&&!Ae(e)){l(!1);return}if(e.key===`Tab`&&!Ae(e)){l(!1);return}if(e.key===`Backspace`&&!Ae(e)){n>=0&&i.onRemoveBinding(n),l(!1);return}let t=oe(e,{platform:i.platform});t&&(n>=0&&i.onRebind(n,t),d(!0),l(!1),setTimeout(()=>d(!1),220))};return window.addEventListener(`keydown`,e,{capture:!0}),()=>window.removeEventListener(`keydown`,e,{capture:!0})},x=[c,n,i],t[6]=i,t[7]=n,t[8]=c,t[9]=b,t[10]=x):(b=t[9],x=t[10]),(0,L.useEffect)(b,x);let C,w;t[11]===c?(C=t[12],w=t[13]):(C=()=>{c&&f.current?.focus()},w=[c],t[11]=c,t[12]=C,t[13]=w),(0,L.useEffect)(C,w);let T;t[14]!==c||t[15]!==v?(T=e=>{c||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v())},t[14]=c,t[15]=v,t[16]=T):T=t[16];let E=T,D;t[17]!==i||t[18]!==n?(D=()=>{n>=0&&i.onRemoveBinding(n)},t[17]=i,t[18]=n,t[19]=D):D=t[19];let O=D;if(o&&n===-1&&g.length===0){let e;t[20]===s?e=t[21]:(e=()=>s?.(),t[20]=s,t[21]=e);let n;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(h,{className:`size-3`}),t[22]=n):n=t[22];let r;return t[23]!==E||t[24]!==e?(r=(0,Z.jsxs)(`button`,{ref:f,type:`button`,onClick:e,onKeyDown:E,className:`inline-flex h-6 items-center gap-1 rounded-md border border-dashed border-border/60 bg-transparent px-2 text-[11px] text-muted-foreground/70 transition-colors hover:border-border hover:text-foreground`,children:[n,` No shortcut — click to set`]}),t[23]=E,t[24]=e,t[25]=r):r=t[25],r}let k=`Edit shortcut for ${r.command}`,A=g.length===0&&n>=0?`true`:void 0,j=c?`kb-chip-recording border-indigo-500/60 bg-indigo-500/15 text-indigo-100 shadow-[0_0_0_4px_rgba(99,102,241,0.18)]`:u?`border-emerald-500/50 bg-emerald-500/15 text-emerald-100`:`border-border bg-muted/60 text-foreground hover:bg-muted`,M;t[26]===j?M=t[27]:(M=S(`inline-flex h-6 items-center gap-1 rounded-md border px-2 font-mono text-[11px] transition-all duration-150`,j),t[26]=j,t[27]=M);let N;t[28]===c?N=t[29]:(N=c?{animation:`keybindings-pulse 1.4s ease-in-out infinite`}:{},t[28]=c,t[29]=N);let P=c?(0,Z.jsx)(`span`,{className:`text-[11px] tracking-[0.04em]`,children:`Press shortcut…`}):g.length===0?(0,Z.jsx)(`span`,{className:`text-muted-foreground/60`,children:`Click to set`}):g.map(e=>(0,Z.jsx)(De,{token:e,isMac:a},e)),F;t[30]!==c||t[31]!==r.when?(F=!c&&r.when!==void 0?(0,Z.jsx)(`span`,{className:`ml-1 hidden sm:inline`,children:`·`}):null,t[30]=c,t[31]=r.when,t[32]=F):F=t[32];let I;t[33]!==c||t[34]!==E||t[35]!==v||t[36]!==k||t[37]!==A||t[38]!==M||t[39]!==N||t[40]!==P||t[41]!==F?(I=(0,Z.jsxs)(`button`,{ref:f,type:`button`,"aria-pressed":c,"aria-label":k,"data-chip-pending-record":A,onClick:v,onKeyDown:E,className:M,style:N,children:[P,F]}),t[33]=c,t[34]=E,t[35]=v,t[36]=k,t[37]=A,t[38]=M,t[39]=N,t[40]=P,t[41]=F,t[42]=I):I=t[42];let z;t[43]!==i||t[44]!==n?(z=e=>i.onChangeWhen(n,e),t[43]=i,t[44]=n,t[45]=z):z=t[45];let B=n<0||c,V;t[46]!==r.when||t[47]!==z||t[48]!==B?(V=(0,Z.jsx)(Oe,{currentWhen:r.when,onChange:z,disabled:B}),t[46]=r.when,t[47]=z,t[48]=B,t[49]=V):V=t[49];let H;t[50]!==n||t[51]!==O||t[52]!==c?(H=n>=0&&!c?(0,Z.jsx)(`button`,{type:`button`,onClick:O,"aria-label":`Remove this shortcut`,className:`opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100`,children:(0,Z.jsx)(y,{className:`size-3 text-muted-foreground/60 hover:text-destructive`})}):null,t[50]=n,t[51]=O,t[52]=c,t[53]=H):H=t[53];let U;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Z.jsx)(ke,{}),t[54]=U):U=t[54];let W;return t[55]!==I||t[56]!==V||t[57]!==H?(W=(0,Z.jsxs)(`span`,{className:`relative inline-flex items-center gap-1`,children:[I,V,H,U]}),t[55]=I,t[56]=V,t[57]=H,t[58]=W):W=t[58],W}function Te(){document.querySelectorAll(`[data-chip-pending-record="true"]`).forEach(Ee)}function Ee(e){e.click()}function De(e){let t=(0,R.c)(5),{token:n,isMac:r}=e,i=r&&n.length===1&&/[⌀-⏿←-⇿]/.test(n)?`bg-transparent`:`bg-foreground/10`,a;t[0]===i?a=t[1]:(a=S(`rounded px-1 leading-none`,i),t[0]=i,t[1]=a);let o;return t[2]!==a||t[3]!==n?(o=(0,Z.jsx)(`span`,{className:a,children:n}),t[2]=a,t[3]=n,t[4]=o):o=t[4],o}function Oe(e){let t=(0,R.c)(35),{currentWhen:n,onChange:r,disabled:i}=e,a;t[0]===n?a=t[1]:(a=K(n),t[0]=n,t[1]=a);let o=a,s,c,l,u,d,f,p;if(t[2]!==n||t[3]!==i){let e=q(n);c=A,s=j,l=`button`,u=i;let r=n===void 0&&`italic opacity-70`;t[11]===r?d=t[12]:(d=S(`inline-flex h-5 items-center gap-1 rounded bg-muted/40 px-1.5 text-[10px] text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,r),t[11]=r,t[12]=d),f=`When: ${e}`,p=n===void 0?`always`:e.toLowerCase(),t[2]=n,t[3]=i,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=p}else s=t[4],c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10];let m;t[13]!==l||t[14]!==u||t[15]!==d||t[16]!==f||t[17]!==p?(m=(0,Z.jsx)(`button`,{type:l,disabled:u,className:d,"aria-label":f,children:p}),t[13]=l,t[14]=u,t[15]=d,t[16]=f,t[17]=p,t[18]=m):m=t[18];let h;t[19]!==s||t[20]!==m?(h=(0,Z.jsx)(s,{render:m}),t[19]=s,t[20]=m,t[21]=h):h=t[21];let g;t[22]!==n||t[23]!==o?(g=!o&&n!==void 0?(0,Z.jsxs)(`div`,{className:`px-2 py-1.5 text-[10px] text-muted-foreground`,children:[`Current: `,(0,Z.jsx)(`code`,{className:`font-mono`,children:n})]}):null,t[22]=n,t[23]=o,t[24]=g):g=t[24];let _;t[25]!==n||t[26]!==r?(_=U.map(e=>(0,Z.jsxs)(M,{onClick:()=>r(e.value),className:S(`flex items-center justify-between text-[12px]`,e.value===n&&`font-semibold text-foreground`),children:[(0,Z.jsx)(`span`,{children:e.label}),e.value===void 0?(0,Z.jsx)(`span`,{className:`text-[10px] text-muted-foreground/60`,children:`no condition`}):(0,Z.jsx)(`code`,{className:`text-[10px] font-mono text-muted-foreground/60`,children:e.value})]},e.id)),t[25]=n,t[26]=r,t[27]=_):_=t[27];let v;t[28]!==_||t[29]!==g?(v=(0,Z.jsxs)(k,{side:`bottom`,align:`end`,className:`min-w-[220px]`,children:[g,_]}),t[28]=_,t[29]=g,t[30]=v):v=t[30];let y;return t[31]!==c||t[32]!==v||t[33]!==h?(y=(0,Z.jsxs)(c,{children:[h,v]}),t[31]=c,t[32]=v,t[33]=h,t[34]=y):y=t[34],y}function ke(){let e=(0,R.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`style`,{children:`@keyframes keybindings-pulse {
2
2
  0%, 100% { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); }
3
3
  50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.30); }
4
4
  }
@@ -1,4 +1,4 @@
1
- import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{_ as r,g as i}from"./src-DmPIm3ie.js";import{Sn as a,Zn as o,gn as s}from"./runtime-QZPKtH2P.js";import{It as c,Z as l}from"./composerDraftStore-TYv9j3vY.js";import{f as u}from"./useRenderElement-DchFnsR8.js";import{t as d}from"./chevron-down-B7C6FKzM.js";import{i as f,o as p}from"./toast-C-0Ft2jD.js";import{t as m}from"./loader-zHASMrUy.js";import{t as h}from"./plus-B2h-VEqh.js";import{t as g}from"./refresh-cw-DopCMrtR.js";import{t as _}from"./save-Bh36JIv6.js";import{t as v}from"./server-JApJpgLa.js";import{t as y}from"./terminal-C_CyIsDD.js";import{t as ee}from"./trash-2-CM1zXPGb.js";import{t as b}from"./triangle-alert-RL_T3KLo.js";import{t as x}from"./wrench-D0IetWa1.js";import{t as te}from"./utils-CV2fJJxC.js";import{i as ne,n as re,t as ie}from"./tooltip-C_-9XEfA.js";import{t as S}from"./switch-BZjA7VT9.js";import{t as C}from"./input-BZz4eLRl.js";import{t as w}from"./button-DG8WqjNn.js";import{t as T}from"./toastHelpers-CSQRKo4F.js";import{a as E,c as D,i as O,o as k,r as A,s as j,t as M}from"./dialog-BNmFD6Nh.js";import{t as N}from"./textarea-DHdmRD1r.js";import{a as P,i as F,o as I,s as L,t as R}from"./select-CZukJlTn.js";import{t as z}from"./badge-w43sx8eF.js";import"./providerModels-vd2eZtHx.js";import{r as B}from"./providerDriverMeta-sBwZhQoN.js";var ae=u(`earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),oe=u(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),V=e(t(),1),H=n(),U=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function W(){return{name:``,transport:`stdio`,command:``,argsText:``,cwd:``,url:``,bearerTokenEnvVar:``,envText:``,envVarsText:``,httpHeadersText:``,envHttpHeadersText:``,enabled:!0,required:!1,startupTimeoutSec:``,toolTimeoutSec:``,enabledToolsText:``,disabledToolsText:``,oauthScopesText:``,secretFields:[],clearedSecretFields:[]}}function G(e){return e.join(`
1
+ import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{_ as r,g as i}from"./src-CtanPQei.js";import{Sn as a,Zn as o,gn as s}from"./runtime-Cy36EhFa.js";import{It as c,Z as l}from"./composerDraftStore-DXTD6mKH.js";import{f as u}from"./useRenderElement-DchFnsR8.js";import{t as d}from"./chevron-down-B7C6FKzM.js";import{i as f,o as p}from"./toast-CV5dwFOH.js";import{t as m}from"./loader-zHASMrUy.js";import{t as h}from"./plus-B2h-VEqh.js";import{t as g}from"./refresh-cw-DopCMrtR.js";import{t as _}from"./save-Bh36JIv6.js";import{t as v}from"./server-JApJpgLa.js";import{t as y}from"./terminal-C_CyIsDD.js";import{t as ee}from"./trash-2-CM1zXPGb.js";import{t as b}from"./triangle-alert-RL_T3KLo.js";import{t as x}from"./wrench-D0IetWa1.js";import{t as te}from"./utils-Ct58OPtz.js";import{i as ne,n as re,t as ie}from"./tooltip-DZhBSkif.js";import{t as S}from"./switch-B50w01tf.js";import{t as C}from"./input-Ba4jS4Ks.js";import{t as w}from"./button-WR80VgkK.js";import{t as T}from"./toastHelpers-CSQRKo4F.js";import{a as E,c as D,i as O,o as k,r as A,s as j,t as M}from"./dialog-CwRtKu2U.js";import{t as N}from"./textarea-CJ8Vux-T.js";import{a as P,i as F,o as I,s as L,t as R}from"./select-DQIoKiCF.js";import{t as z}from"./badge-tHmsB3yQ.js";import"./providerModels-pNPE7SuA.js";import{r as B}from"./providerDriverMeta-DrgHrvO3.js";var ae=u(`earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),oe=u(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),V=e(t(),1),H=n(),U=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function W(){return{name:``,transport:`stdio`,command:``,argsText:``,cwd:``,url:``,bearerTokenEnvVar:``,envText:``,envVarsText:``,httpHeadersText:``,envHttpHeadersText:``,enabled:!0,required:!1,startupTimeoutSec:``,toolTimeoutSec:``,enabledToolsText:``,disabledToolsText:``,oauthScopesText:``,secretFields:[],clearedSecretFields:[]}}function G(e){return e.join(`
2
2
  `)}function K(e){return Object.entries(e).map(([e,t])=>`${e}=${t}`).join(`
3
3
  `)}function q(e){let t=e.config;return{name:e.name,transport:t.transport===`http`?`http`:`stdio`,command:t.command??``,argsText:G(t.args),cwd:t.cwd??``,url:t.url??``,bearerTokenEnvVar:t.bearerTokenEnvVar??``,envText:K(t.env),envVarsText:G(t.envVars),httpHeadersText:K(t.httpHeaders),envHttpHeadersText:K(t.envHttpHeaders),enabled:t.enabled,required:t.required??!1,startupTimeoutSec:t.startupTimeoutSec?.toString()??``,toolTimeoutSec:t.toolTimeoutSec?.toString()??``,enabledToolsText:G(t.enabledTools),disabledToolsText:G(t.disabledTools),oauthScopesText:G(t.oauthScopes),secretFields:Object.entries(t.secretFields??{}).filter(([,e])=>e===`present`).map(([e])=>e).toSorted(),clearedSecretFields:[]}}function J(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e.length>0)}function se(e){let t={};for(let n of J(e)){let e=n.indexOf(`=`);if(e<=0)continue;let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();r.length>0&&(t[r]=i)}return t}function ce(e){let t=e.trim();if(!t)return;let n=Number(t);return Number.isFinite(n)&&n>0?n:NaN}function le(e){let t=e.name.trim();if(!U.test(t))return`Server name must start with a letter and use only letters, numbers, dashes, and underscores.`;if(e.transport===`stdio`&&e.command.trim().length===0)return`Stdio servers need a command.`;if(e.transport===`http`&&e.url.trim().length===0)return`HTTP servers need a URL.`;for(let[t,n]of[[`Startup timeout`,e.startupTimeoutSec],[`Tool timeout`,e.toolTimeoutSec]]){let e=ce(n);if(Number.isNaN(e))return`${t} must be a positive number.`}return null}function ue(e){let t=ce(e.startupTimeoutSec),n=ce(e.toolTimeoutSec);return{transport:e.transport,command:e.command.trim(),args:J(e.argsText),cwd:e.cwd.trim()||null,url:e.url.trim(),bearerTokenEnvVar:e.bearerTokenEnvVar.trim()||null,env:se(e.envText),envVars:J(e.envVarsText),httpHeaders:se(e.httpHeadersText),envHttpHeaders:se(e.envHttpHeadersText),enabled:e.enabled,required:e.required,...t===void 0||Number.isNaN(t)?{}:{startupTimeoutSec:t},...n===void 0||Number.isNaN(n)?{}:{toolTimeoutSec:n},enabledTools:J(e.enabledToolsText),disabledTools:J(e.disabledToolsText),oauthScopes:J(e.oauthScopesText)}}function de(e){return Object.fromEntries(e.secretFields.map(t=>[t,e.clearedSecretFields.includes(t)?{action:`clear`}:{action:`retain`}]))}function fe(e){let t=e.config;return t.transport===`http`?t.url||`HTTP`:t.transport===`stdio`?[t.command,...t.args].filter(Boolean).join(` `)||`stdio`:`Configured outside the known MCP schema`}var Y=c(),pe=[],me=[];function X(e){if(!e)throw Error(`MCP settings are unavailable before a backend is paired.`);return e}function Z(e,t){f.add(T({type:`error`,title:e,description:t instanceof Error?t.message:`An error occurred.`}))}function he(e){switch(e){case`user`:return`User config`;case`project`:return`Project`;case`system`:return`System`;case`managed`:return`Managed`;case`mixed`:return`Mixed`;case`unknown`:return`Unknown`}}function ge(e){return e.startupStatus===`failed`?`error`:e.startupStatus===`disabled`?`outline`:e.authStatus===`notLoggedIn`?`warning`:e.startupStatus===`ready`?`success`:`outline`}function _e(e){return e.startupStatus===`disabled`?`Disabled`:e.startupStatus===`failed`?`Failed`:e.authStatus===`notLoggedIn`?`Login needed`:e.startupStatus===`ready`?`Ready`:`Unknown`}function ve(e){return e.enabled?e.status===`managed`?`success`:e.status===`external`?`warning`:`outline`:`outline`}function ye(e){if(!e.enabled)return`Disabled`;switch(e.status){case`managed`:return`Managed`;case`external`:return`External config`;case`unsupported`:return`Not wired`}}function be(e){return e.displayName??B(e.driver)?.label??l(e.driver)}function xe(e){return e?e.providerDisplayName??B(e.driver)?.label??l(e.driver):`the provider`}function Q(e){let t=(0,H.c)(5),n;t[0]===e.label?n=t[1]:(n=(0,Y.jsx)(`span`,{children:e.label}),t[0]=e.label,t[1]=n);let r;return t[2]!==e.children||t[3]!==n?(r=(0,Y.jsxs)(`label`,{className:`grid gap-1.5 text-xs font-medium text-foreground/80`,children:[n,e.children]}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4],r}function $(e){let t=(0,H.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Y.jsx)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground/70`,children:n}),t[0]=n,t[1]=r),r}function Se(e){let t=(0,H.c)(5),{value:n,onChange:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={value:`stdio`,label:`Stdio`,icon:y},t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=[i,{value:`http`,label:`HTTP`,icon:ae}],t[1]=a):a=t[1];let o;return t[2]!==r||t[3]!==n?(o=(0,Y.jsx)(`div`,{className:`grid grid-cols-2 rounded-lg border bg-muted/30 p-1`,children:a.map(e=>{let t=e.icon,i=n===e.value;return(0,Y.jsxs)(`button`,{type:`button`,onClick:()=>r(e.value),className:te(`flex h-8 items-center justify-center gap-2 rounded-md text-xs font-medium transition-colors`,i?`bg-background text-foreground shadow-xs`:`text-muted-foreground`),children:[(0,Y.jsx)(t,{className:`size-3.5`}),e.label]},e.value)})}),t[2]=r,t[3]=n,t[4]=o):o=t[4],o}function Ce({open:e,server:t,providerName:n,onOpenChange:r,onSubmit:i}){let[a,o]=(0,V.useState)(()=>W()),[s,c]=(0,V.useState)(null),[l,u]=(0,V.useState)(!1),d=t!==null;(0,V.useEffect)(()=>{e&&(o(t?q(t):W()),c(null))},[e,t]);let f=(e,t)=>{o(n=>({...n,[e]:t}))},p=async()=>{let e=le(a);if(e){c(e);return}u(!0);try{await i(a),r(!1)}catch(e){Z(`Failed to save MCP server`,e)}finally{u(!1)}};return(0,Y.jsx)(M,{open:e,onOpenChange:r,children:(0,Y.jsxs)(j,{className:`max-w-2xl`,bottomStickOnMobile:!1,children:[(0,Y.jsxs)(E,{children:[(0,Y.jsx)(D,{children:d?`Edit MCP server`:`Add MCP server`}),(0,Y.jsxs)(A,{children:[`Configuration is written through `,n,`'s native MCP management surface. Existing secret values are never loaded into this form and are retained unless you enter replacements with the same keys.`]})]}),(0,Y.jsxs)(k,{className:`space-y-5`,children:[(0,Y.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-[1fr_12rem]`,children:[(0,Y.jsx)(Q,{label:`Server name`,children:(0,Y.jsx)(C,{value:a.name,disabled:d,onChange:e=>f(`name`,e.target.value),placeholder:`github`,spellCheck:!1})}),(0,Y.jsx)(Q,{label:`Transport`,children:(0,Y.jsx)(Se,{value:a.transport,onChange:e=>f(`transport`,e)})})]}),a.transport===`stdio`?(0,Y.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Y.jsx)(Q,{label:`Command`,children:(0,Y.jsx)(C,{value:a.command,onChange:e=>f(`command`,e.target.value),placeholder:`npx`,spellCheck:!1})}),(0,Y.jsxs)(Q,{label:`Arguments`,children:[(0,Y.jsx)(N,{value:a.argsText,onChange:e=>f(`argsText`,e.target.value),placeholder:`-y
4
4
  @modelcontextprotocol/server-filesystem
@@ -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-TYv9j3vY.js";import{Bt as i,En as a,Kn as o,Mn as s,Nn as c,Ot as l,Qt as u,Rn as d,Rt as f,Wn as p,Yn as m,dn as h,et as g,j as _,jn as v,jt as y,on as b,y as x,zn as S,zt as C}from"./usePopupViewport-8F-J1h5f.js";import{a as w,i as T,r as E,t as D}from"./useSwipeDismiss-D22_vuiH.js";import{d as O,o as k,r as A,t as j}from"./useRenderElement-DchFnsR8.js";import{t as M}from"./x-C1Cemsov.js";import{t as N}from"./utils-CV2fJJxC.js";import{i as P,n as F,o as I,s as L,t as ee}from"./DialogViewport-tgJz2Lwn.js";import{n as R,r as z,t as B}from"./DialogTitle-Bk-w3xLJ.js";import{p as te,s as ne}from"./useScrollLock-CBz-5_MX.js";import{t as re}from"./react-dom-x9LNwWQc.js";import{n as ie,t as V}from"./clamp-CgH0Dl6R.js";import{t as ae}from"./button-DG8WqjNn.js";import{t as H}from"./GlassSurface-CDok2tTN.js";var U=e(t(),1),W=n(),G=120;function K(e){let t=e.replace(/\s+/gu,` `).trim();return t.length<=G?t:`${t.slice(0,119)}…`}var q=r();function J(e){let t=(0,W.c)(37),{label:n,icon:r,secondaryText:i,trailing:a,disabled:o,disabledReason:s,destructive:c,selected:l,onClick:u,className:d}=e,f=o!==void 0&&o,p=c!==void 0&&c,m=(0,U.useId)(),h;t[0]!==f||t[1]!==s?(h=f&&s?K(s):null,t[0]=f,t[1]=s,t[2]=h):h=t[2];let g=h,_=`${m}-label`,v=`${m}-secondary`,y=`${m}-trailing`,b=`${m}-reason`,x=i?v:null,S=a?y:null,C;t[3]!==_||t[4]!==x||t[5]!==S?(C=[_,x,S].filter(oe),t[3]=_,t[4]=x,t[5]=S,t[6]=C):C=t[6];let w=C.join(` `),T=g?w:void 0,E=g?b:void 0,D=p&&!f&&`text-destructive`,O=l&&`bg-accent/60 font-medium`,k;t[7]!==d||t[8]!==O||t[9]!==D?(k=N(`flex min-h-11 w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:text-muted-foreground/60`,D,O,d),t[7]=d,t[8]=O,t[9]=D,t[10]=k):k=t[10];let A;t[11]!==n||t[12]!==_?(A=(0,q.jsx)(`span`,{id:_,className:`truncate`,children:n}),t[11]=n,t[12]=_,t[13]=A):A=t[13];let j;t[14]!==v||t[15]!==i?(j=i?(0,q.jsx)(`span`,{id:v,className:`truncate text-xs text-muted-foreground`,children:i}):null,t[14]=v,t[15]=i,t[16]=j):j=t[16];let M;t[17]!==g||t[18]!==b?(M=g?(0,q.jsx)(`span`,{id:b,className:`truncate text-xs text-muted-foreground/80`,children:g}):null,t[17]=g,t[18]=b,t[19]=M):M=t[19];let P;t[20]!==A||t[21]!==j||t[22]!==M?(P=(0,q.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[A,j,M]}),t[20]=A,t[21]=j,t[22]=M,t[23]=P):P=t[23];let F;t[24]!==a||t[25]!==y?(F=a?(0,q.jsx)(`span`,{id:y,className:`flex shrink-0 items-center gap-2`,children:a}):null,t[24]=a,t[25]=y,t[26]=F):F=t[26];let I;return t[27]!==f||t[28]!==r||t[29]!==u||t[30]!==l||t[31]!==k||t[32]!==P||t[33]!==F||t[34]!==T||t[35]!==E?(I=(0,q.jsxs)(`button`,{type:`button`,disabled:f,"aria-labelledby":T,"aria-describedby":E,"aria-pressed":l,className:k,"data-slot":`mobile-list-row`,onClick:u,children:[r,P,F]}),t[27]=f,t[28]=r,t[29]=u,t[30]=l,t[31]=k,t[32]=P,t[33]=F,t[34]=T,t[35]=E,t[36]=I):I=t[36],I}function oe(e){return e!==null}var Y=function(e){return e.nestedDrawers=`--nested-drawers`,e.height=`--drawer-height`,e.frontmostHeight=`--drawer-frontmost-height`,e.swipeMovementX=`--drawer-swipe-movement-x`,e.swipeMovementY=`--drawer-swipe-movement-y`,e.snapPointOffset=`--drawer-snap-point-offset`,e.swipeStrength=`--drawer-swipe-strength`,e}({}),se=function(e){return e.swipeProgress=`--drawer-swipe-progress`,e}({}),ce=U.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...s}=e,c=L(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`mounted`),f={open:l,transitionStatus:c.useState(`transitionStatus`)};return j(`div`,e,{state:f,ref:[c.context.backdropRef,t],stateAttributesMapping:o,props:[{role:`presentation`,hidden:!d,style:{pointerEvents:l?void 0:`none`,userSelect:`none`,WebkitUserSelect:`none`,[se.swipeProgress]:`0`,[Y.swipeStrength]:`1`}},s],enabled:a||!u})}),X=z,le=`data-drawer-content`,ue=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return L(),j(`div`,e,{ref:t,props:[{[le]:``},a]})}),de=R,fe=U.createContext(void 0);function pe(){return U.useContext(fe)}var me=function(e){return e[e.open=p.open]=`open`,e[e.closed=p.closed]=`closed`,e[e.startingStyle=p.startingStyle]=`startingStyle`,e[e.endingStyle=p.endingStyle]=`endingStyle`,e.expanded=`data-expanded`,e.nestedDrawerOpen=`data-nested-drawer-open`,e.nestedDrawerSwiping=`data-nested-drawer-swiping`,e.swipeDismiss=`data-swipe-dismiss`,e.swipeDirection=`data-swipe-direction`,e.swiping=`data-swiping`,e}({}),he=U.createContext(void 0);function ge(e){let t=U.useContext(he);if(e!==!0&&t===void 0)throw Error(O(90));return t}function _e(e,t){let n=e+t;return n>=0?t:-Math.sqrt(-n)-e}function ve(e,t,n){if(!Number.isFinite(t)||t<=0)return null;if(typeof e==`number`)return Number.isFinite(e)?e<=1?V(e,0,1)*t:e:null;let r=e.trim();if(r.endsWith(`px`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e:null}if(r.endsWith(`rem`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e*n:null}return null}function ye(e,t){let n=-1,r=1/0;for(let i=0;i<e.length;i+=1){let a=Math.abs(e[i]-t);a<r&&(r=a,n=i)}return n}function be(){let e=L(),{snapPoints:t,activeSnapPoint:n,setActiveSnapPoint:r,popupHeight:i}=ge(),a=e.useState(`viewportElement`),[o,l]=U.useState(0),[u,d]=U.useState(16),f=c(()=>{let e=v(a).documentElement;l(a?a.offsetHeight:e.clientHeight);let t=parseFloat(getComputedStyle(e).fontSize);Number.isFinite(t)&&d(t)});s(()=>{if(f(),!a||typeof ResizeObserver!=`function`)return;let e=new ResizeObserver(f);return e.observe(a),()=>{e.disconnect()}},[f,a]);let p=U.useMemo(()=>{if(!t||t.length===0||o<=0||i<=0)return[];let e=Math.min(i,o),n=t.map(t=>{let n=ve(t,o,u);if(n===null)return null;let r=V(n,0,e);return{value:t,height:r,offset:Math.max(0,i-r)}}).filter(e=>!!e);if(n.length<=1)return n;let r=[],a=[];for(let e=n.length-1;e>=0;--e){let t=n[e];a.some(e=>Math.abs(e-t.height)<=1)||(a.push(t.height),r.push(t))}return r.reverse(),r},[i,u,t,o]);return{snapPoints:t,activeSnapPoint:n,setActiveSnapPoint:r,popupHeight:i,viewportHeight:o,resolvedSnapPoints:p,activeSnapPointOffset:U.useMemo(()=>{if(n===null)return;let e=p.find(e=>Object.is(e.value,n));if(e)return e;let t=Math.min(i,o),r=ve(n,o,u);if(r===null)return;let a=V(r,0,t);return p[ye(p.map(e=>e.height),a)]},[n,i,p,u,o])?.offset??null}}var xe=U.createContext(null);function Se(){return U.useContext(xe)}var Ce=!1;function we(){Ce||=(typeof CSS<`u`&&`registerProperty`in CSS&&([Y.swipeMovementX,Y.swipeMovementY,Y.snapPointOffset].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),[{name:se.swipeProgress,initialValue:`0`},{name:Y.swipeStrength,initialValue:`1`}].forEach(({name:e,initialValue:t})=>{try{CSS.registerProperty({name:e,syntax:`<number>`,inherits:!1,initialValue:t})}catch{}})),!0)}var Z={...o,expanded(e){return e?{[me.expanded]:``}:null},nestedDrawerOpen(e){return e?{[me.nestedDrawerOpen]:``}:null},nestedDrawerSwiping(e){return e?{[me.nestedDrawerSwiping]:``}:null},swipeDirection(e){return{[me.swipeDirection]:e}},swiping(e){return e?{[me.swiping]:``}:null}},Te=U.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...l}=e,u=L(),d=u.context.popupRef,{swipeDirection:f,frontmostHeight:p,hasNestedDrawer:m,nestedSwiping:h,nestedSwipeProgressStore:g,onPopupHeightChange:v,notifyParentFrontmostHeight:y,notifyParentHasNestedDrawer:b}=ge(),S=u.useState(`descriptionElementId`),C=u.useState(`disablePointerDismissal`),w=u.useState(`floatingRootContext`),T=u.useState(`popupProps`),E=u.useState(`modal`),D=u.useState(`mounted`),O=u.useState(`nested`),A=u.useState(`nestedOpenDrawerCount`),M=u.useState(`transitionStatus`),N=u.useState(`open`),P=u.useState(`openMethod`),F=u.useState(`titleElementId`),ee=u.useState(`role`),R=w.useState(`floatingId`),z=l.id??R,B=Se();I();let{snapPoints:re,activeSnapPoint:ie,activeSnapPointOffset:V}=be(),ae=A>0,H=B?.swiping??!1,W=B?.swipeStrength??null,[G,K]=U.useState(0),J=U.useRef(0),oe=c(()=>{let e=d.current;if(!e)return;let t=e.offsetHeight;if(J.current>0&&p>J.current&&t>J.current)return;if(J.current>0&&m){let e=J.current;K(e),v(e);return}let n=t;n!==J.current&&(J.current=n,K(n),v(n))});s(()=>{if(!D){J.current=0,K(0),v(0);return}let e=d.current;if(!e||(we(),oe(),typeof ResizeObserver!=`function`))return;let t=new ResizeObserver(oe);return t.observe(e),()=>{t.disconnect()}},[oe,D,ae,v,d]),s(()=>{let e=()=>{let e=d.current;if(!e)return;let t=g.getSnapshot();t>0?e.style.setProperty(se.swipeProgress,`${t}`):e.style.setProperty(se.swipeProgress,`0`)};e();let t=g.subscribe(e),n=d.current;return()=>{t(),n&&n.style.setProperty(se.swipeProgress,`0`)}},[g,d]),s(()=>{if(N)return y?.(p),()=>{y?.(0)}},[p,N,y]),s(()=>{if(b)return b(N||M===`ending`),()=>{b(!1)}},[b,N,M]),_({open:N,ref:d,onComplete(){N&&u.context.onOpenChangeComplete?.(!0)}});let ce=o===void 0?d:o,X=u.useStateSetter(`popupElement`),le={open:N,nested:O,transitionStatus:M,expanded:ie===1,nestedDrawerOpen:ae,nestedDrawerSwiping:h,swipeDirection:f,swiping:H},ue;G&&!(!m&&M!==`ending`)&&(ue=`${G}px`);let de=re&&re.length>0&&(f===`down`||f===`up`),fe=null;de&&V!==null&&(fe=f===`up`?-V:V);let pe=B?B.getDragStyles():k;if(de&&f===`down`){let e=V??0,t=Number.parseFloat(String(pe[Y.swipeMovementY]));pe=H&&Number.isFinite(t)?{...pe,transform:void 0,[Y.swipeMovementY]:`${_e(e,t)}px`}:{...pe,transform:void 0}}let me=j(`div`,e,{state:le,props:[T,{id:z,"aria-labelledby":F,"aria-describedby":S,role:ee,...x,hidden:!D,onKeyDown(e){ne.has(e.key)&&e.stopPropagation()},style:{...pe,[se.swipeProgress]:`0`,[Y.nestedDrawers]:A,[Y.height]:ue,[Y.snapPointOffset]:typeof fe==`number`?`${fe}px`:`0px`,[Y.frontmostHeight]:p?`${p}px`:void 0,[Y.swipeStrength]:typeof W==`number`&&Number.isFinite(W)&&W>0?`${W}`:`1`}},l],ref:[t,d,X],stateAttributesMapping:Z});return(0,q.jsx)(te,{context:w,openInteractionType:P,disabled:!D,closeOnFocusOut:!C,initialFocus:ce,returnFocus:a,modal:E!==!1,restoreFocus:`popup`,children:me})}),Ee=P,De,Q;function Oe(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:o=!1,modal:s=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null,swipeDirection:p=`down`,snapToSequentialPoints:m=!1,snapPoints:h,snapPoint:g,defaultSnapPoint:_,onSnapPointChange:v}=e,y=ge(!0),x=y?.onNestedSwipeProgressChange,S=y?.onNestedFrontmostHeightChange,C=y?.onNestedSwipingChange,w=y?.onNestedDrawerPresenceChange,[T,E]=U.useState(0),[D,O]=U.useState(0),[k,A]=U.useState(!1),[j,M]=U.useState(!1),[N]=U.useState(ke),P=_===void 0?h?.[0]??null:_,I=g!==void 0,[L,ee]=ie({controlled:g,default:P,name:`Drawer`,state:`snapPoint`}),R=U.useRef(!1),z=U.useRef(!1),B=c((e,t)=>{let n=t??b(`none`);v?.(e,n),!n.isCanceled&&ee(e)}),te=U.useMemo(()=>I||!h||h.length===0?L:L===null||!h.some(e=>Object.is(e,L))?P:L,[L,I,P,h]),ne=c(e=>{E(e),!R.current&&e>0&&O(e)}),re=c(e=>{if(e>0){R.current=!0,O(e);return}R.current=!1,T>0&&O(T)}),V=c(e=>{A(e)}),ae=c(e=>{N.set(e),x?.(e)}),H=c(e=>{M(e),C?.(e)}),W=c((e,t)=>{i?.(e,t),!t.isCanceled&&!e&&h&&h.length>0&&B(P,b(t.reason,t.event,t.trigger))}),G=U.useMemo(()=>({swipeDirection:p,swipeAreaActiveRef:z,snapToSequentialPoints:m,snapPoints:h,activeSnapPoint:te,setActiveSnapPoint:B,frontmostHeight:D,popupHeight:T,hasNestedDrawer:k,nestedSwiping:j,nestedSwipeProgressStore:N,onNestedDrawerPresenceChange:V,onPopupHeightChange:ne,onNestedFrontmostHeightChange:re,onNestedSwipingChange:H,onNestedSwipeProgressChange:ae,notifyParentFrontmostHeight:S,notifyParentSwipingChange:C,notifyParentSwipeProgressChange:x,notifyParentHasNestedDrawer:w}),[te,D,k,j,N,w,x,C,S,V,re,ae,H,ne,T,B,h,m,z,p]),K=typeof t==`function`?e=>(0,q.jsxs)(U.Fragment,{children:[De||=(0,q.jsx)(Ae,{}),t(e)]}):(0,q.jsxs)(U.Fragment,{children:[Q||=(0,q.jsx)(Ae,{}),t]}),J=F(`drawer`,{open:n,defaultOpen:r,onOpenChange:W,onOpenChangeComplete:a,disablePointerDismissal:o,modal:s,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f,children:K});return(0,q.jsx)(he.Provider,{value:G,children:J})}function ke(){let e=0,t=new Set;return{getSnapshot:()=>e,set(n){let r=Number.isFinite(n)?n:0;r!==e&&(e=r,t.forEach(e=>{e()}))},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}function Ae(){let e=pe(),t=L(!1),n=e?.setDrawerOpen,r=e?.removeDrawer,i=t.useState(`open`),a=t.useState(`nestedOpenDialogCount`),o=t.useState(`popupElement`),c=a===0;return s(()=>{if(r)return()=>{r(t)}},[r,t]),s(()=>{n?.(t,i)},[i,n,t]),U.useEffect(()=>{if(!i||!c||!u)return;let e=d(o).CloseWatcher;if(!e)return;function n(e){t.select(`open`)&&t.setOpen(!1,b(h,e))}let r=new e,a=y(r,`close`,n);return()=>{a(),r.destroy()}},[t,c,i,o]),null}var je=B,Me=e(re(),1),$=U.createContext(void 0);function Ne(){return U.useContext($)}var Pe=10,Fe=.5,Ie=.5,Le=300,Re=4,ze=.2,Be=4,Ve=80,He=360,Ue=.1,We=6,Ge=2,Ke=`[${le}]`,qe=U.forwardRef(function(e,t){let{render:n,className:r,style:o,children:u,...d}=e,f=L(),p=f.context.popupRef,h=f.context.backdropRef,{swipeDirection:g,notifyParentSwipingChange:_,notifyParentSwipeProgressChange:x,frontmostHeight:O,snapToSequentialPoints:k,swipeAreaActiveRef:j}=ge(),M=pe(),{snapPoints:N,resolvedSnapPoints:P,activeSnapPoint:F,activeSnapPointOffset:I,setActiveSnapPoint:R,popupHeight:z}=be(),B=f.useState(`open`),te=f.useState(`mounted`),ne=f.useState(`nested`),re=f.useState(`nestedOpenDrawerCount`),ie=f.useState(`viewportElement`),ae=f.useState(`popupElement`),H=M?.visualStateStore,W=re>0,G=g===`left`||g===`right`?`horizontal`:`vertical`,K=G===`vertical`,J=K?`horizontal`:`vertical`,[oe,ce]=U.useState(null),X=U.useRef(void 0),le=U.useRef(null),ue=l(),de=U.useRef(!1),fe=U.useRef(!1),he=U.useRef(``),ve=U.useRef(!1),Se=U.useRef(!1),Ce=U.useRef(null),we=Ne(),Z=U.useMemo(()=>{if(!N||N.length<2||P.length<2||g!==`down`&&g!==`up`)return null;let e=P.map(e=>e.offset).sort((e,t)=>e-t),t=e[0];return{minOffset:t,range:e[1]-t}},[P,N,g]),Te=U.useMemo(()=>!Z||I===null?null:V((I-Z.minOffset)/Z.range,0,1),[I,Z]),Ee=U.useMemo(()=>N&&N.length>0&&(g===`down`||g===`up`)?g===`down`?[`down`,`up`]:[`up`,`down`]:[g],[N,g]),De=c(e=>{p.current?.toggleAttribute(me.swipeDismiss,e),h.current?.toggleAttribute(me.swipeDismiss,e)}),Q=c(()=>{De(!1),p.current?.removeAttribute(m.endingStyle),ce(null)}),Oe=c(()=>{fe.current&&(fe.current=!1,_?.(!1))}),ke=c((e,t,n)=>{let r=B&&!ne&&t,i=r?e:0,a=B&&t?e:0;n&&x&&(x(a),a<=0&&Oe()),H?.set({swipeProgress:i,frontmostHeight:i>0?O:0});let o=h.current;if(!o)return;let s=r&&i>0;o.style.setProperty(se.swipeProgress,s?`${i}`:`0`),s&&O>0?o.style.setProperty(Y.height,`${O}px`):o.style.removeProperty(Y.height)});function Ae(e,t,n,r,i,a,o,s){let c=Ze(e,t);if(c<=0)return null;let l=((t===`down`||t===`up`)&&N&&N.length>0?I??0:0)+D(t,n,r),u=Math.max(0,c-l);if(u<=0)return null;let d=D(t,o,s),f=Math.abs(d)>0?d:D(t,i,a);if(f<=ze)return null;let p=V(f,ze,Be);return Ue+(V(u/p,Ve,He)-Ve)/280*.9}function je(e){if(fe.current||!e)return;let t=e.direction??g,n=D(t,e.deltaX,e.deltaY);Math.abs(n)<Pe||(fe.current=!0,_?.(!0))}let $=E({enabled:te&&!W,directions:Ee,elementRef:f.context.popupRef,ignoreSelectorWhenTouch:!1,ignoreScrollableAncestors:!0,movementCssVars:{x:Y.swipeMovementX,y:Y.swipeMovementY},onSwipeStart(e){if(`touches`in e||e.pointerType===`touch`)return;let t=p.current,n=v(t).getSelection?.();if(!n||n.isCollapsed)return;let r=S(n.anchorNode)?n.anchorNode:n.anchorNode?.parentElement,i=S(n.focusNode)?n.focusNode:n.focusNode?.parentElement;!C(t,r)&&!C(t,i)||n.removeAllRanges()},onSwipingChange(e){de.current=e,Je(f.context.backdropRef.current,e),!e&&!x&&Oe()},swipeThreshold({element:e,direction:t}){return Qe(e,t)},canStart(e,t){let n=f.context.popupRef.current;if(!n)return!1;let r=n.ownerDocument,i=T(n.getRootNode(),e.x,e.y);if(!i||!C(n,i))return!1;let a=t.nativeEvent;return!((`touches`in a||a.pointerType===`touch`)&&nt(r,n))},onProgress(e,t){je(t);let n=!!(N&&N.length>0);if(de.current&&g===`down`&&n&&t){let e=f.context.popupRef.current;e&&(e.style.removeProperty(`transform`),e.style.setProperty(Y.swipeMovementY,`${_e(I??0,t.deltaY)}px`))}let r=e;if(Z&&z>0){let e=I??Z.minOffset;t&&Number.isFinite(t.deltaY)?r=(e=>V((e-Z.minOffset)/Z.range,0,1))(V(e+t.deltaY,0,z)):Te!==null&&(r=Te)}ke(r,!0,!0)},onRelease({event:e,deltaX:t,deltaY:n,direction:r,velocityX:i,velocityY:o,releaseVelocityX:s,releaseVelocityY:c}){let l=f.context.popupRef.current;if(!l){Q();return}let u=l;function d(e){Oe(),De(!0),u.style.removeProperty(`transition`),u.setAttribute(m.endingStyle,``),Me.flushSync(()=>{ce(Ae(u,e,t,n,i,o,s,c))})}if(!N||N.length===0){if(!r){Q();return}let e=D(r,t,n);if(e<=0)return Q(),!1;if(D(r,i,o)>=Fe)return d(r),!0;let a=e>Qe(u,r);return a?d(r):Q(),a}if(g!==`down`&&g!==`up`){Q();return}if(!z)return Q(),!1;if(P.length===0){Q();return}let p=g===`down`?n:-n,h=Math.sign(p),_=g===`down`?c:-c,v=g===`down`?o:-o,y=_;if(h!==0&&Math.abs(p)>=Pe){let e=Math.sign(y);e!==0&&e!==h&&(y=v)}let x=I??0,S=V(x+p,0,z),C=Math.abs(y)>=Ie?V(y,-4,Re)*Le:0,w=k?S:V(S+C,0,z),T=b(a,e),E=()=>(X.current=F,R(null,T),d(g),!0);if(k){let e=[...P].sort((e,t)=>e.offset-t.offset),t=e.map(e=>e.offset),n=ye(t,x),r=e[ye(t,w)],i=Math.sign(y),a=h!==0&&i!==0&&i===h&&Math.abs(y)>=Ie,o=w;if(a){let t=V(n+h,0,e.length-1);if(t!==n){let n=e[t];(h>0?w<n.offset:w>n.offset)&&(r=n,o=n.offset)}else if(h>0)return E()}return Math.abs(o-z)<Math.abs(o-r.offset)?E():(R(r.value,T),Q(),!1)}if(y>=Fe&&p>0)return E();let O=P[ye(P.map(e=>e.offset),w)];return Math.abs(w-z)<Math.abs(w-O.offset)?E():(R(O.value,T),Q(),!1)},onDismiss(e){H?.set({swipeProgress:0,frontmostHeight:0});let t=f.context.backdropRef.current;t&&(t.style.setProperty(se.swipeProgress,`0`),t.style.removeProperty(Y.height));let n=b(a,e);if(f.setOpen(!1,n),n.isCanceled){let t=X.current;t!==void 0&&R(t,b(a,e)),X.current=void 0,le.current?.(),Q();return}if(f.select(`open`)){let t=e;ue.request(()=>{if(f.select(`open`)){let e=X.current;e!==void 0&&R(e,b(a,t)),X.current=void 0,Q(),le.current?.()}else X.current=void 0});return}X.current=void 0,De(!0)}}),We=$.getPointerProps(),Ge=$.getTouchProps(),{moveNative:Ke,reset:qe}=$;le.current=qe,U.useEffect(()=>{let e=ie??ae;if(!e)return;let t=e,n=v(t);function r(e,r,i){let a=K?i.clientY-r.lastY:i.clientX-r.lastX;if(e.touches.length===2||nt(n,t)||!B||!te||W||ot(r,e,i,K))return;let o=r.scrollTarget;if(!o||o===n.documentElement||o===n.body){e.cancelable&&e.preventDefault(),e.stopPropagation(),Ke(e,t);return}if(!st(o,G)){e.cancelable&&e.preventDefault(),e.stopPropagation();return}if(a!==0){let t=ut(o,G,g,a);r.allowSwipe?e.cancelable&&e.preventDefault():e.cancelable&&t?(r.allowSwipe=!0,e.preventDefault()):r.allowSwipe=!1}r.allowSwipe===!0&&(e.stopPropagation(),Ke(e,t))}function i(e){if(we?.onTouchMove(e),Se.current)return;let t=Ce.current,n=e.touches[0];!n||!t||(r(e,t,n),at(t,n))}return y(n,`touchmove`,i,{passive:!1,capture:!0})},[te,W,B,ae,K,G,g,Ke,ie,we]),s(()=>{!Z||$.swiping||ke(!B||ne?0:Te??0,!0,!1)},[ke,O,ne,x,B,Te,Z,$.swiping,f,H]),s(()=>{if(x)return B||x(0),()=>{x(0)}},[x,B]),s(()=>{B&&(j.current||qe(),Q())},[Q,B,qe,j]),s(()=>{let e=h.current;return()=>{H?.set({swipeProgress:0,frontmostHeight:0}),Je(e,!1);let t=h.current;t!==e&&Je(t,!1),Oe()}},[h,Oe,H]);let $e=U.useMemo(()=>({swiping:$.swiping,getDragStyles:$.getDragStyles,swipeStrength:oe??null,setSwipeDismissed:De}),[De,$.getDragStyles,$.swiping,oe]);function et(e){Se.current=e,Ce.current=null}function tt(){et(!1),he.current=``,ve.current=!1}function rt(e){return he.current=``,e.pointerType!==`touch`}return(0,q.jsx)(ee,{ref:t,className:r,style:o,render:n,...A(d,{onPointerDown(e){if(he.current=e.pointerType,ve.current=e.pointerType===`pen`,!B||!te||W)return;let t=T(e.currentTarget.getRootNode(),e.clientX,e.clientY);Ye(t)||Xe(t)||e.pointerType!==`touch`&&We.onPointerDown?.(e)},onPointerMove(e){e.pointerType!==`touch`&&We.onPointerMove?.(e)},onPointerUp(e){rt(e)&&We.onPointerUp?.(e)},onPointerCancel(e){rt(e)&&We.onPointerCancel?.(e)},onTouchStart(e){if(he.current===`pen`&&ve.current){ve.current=!1,et(!1);return}if(!B||!te||W){et(!1);return}let t=e.touches[0];if(!t)return;if(it(e)){et(!1);return}let n=e.currentTarget,r=T(n.getRootNode(),t.clientX,t.clientY),a=i(e.nativeEvent),o=S(a)?a:n;if(!C(n,o)){et(!0);return}if(we?.onTouchStart(e),Ye(r)){et(!0);return}Se.current=!1;let s=w(o,n,G),c=w(o,n,J)!=null,l=null;s&&(l=lt(s,G,g)?null:!1),Ce.current={startX:t.clientX,startY:t.clientY,lastX:t.clientX,lastY:t.clientY,scrollTarget:s,hasCrossAxisScrollableContent:c,allowSwipe:l,preserveNativeCrossAxisScroll:!1,drawerAxisAttributed:!1},Ge.onTouchStart?.(e)},onTouchEnd(e){we?.onTouchEnd(e),tt(),Ge.onTouchEnd?.(e)},onTouchCancel(e){we?.onTouchCancel(),tt(),Ge.onTouchCancel?.(e)},"data-nested-dialog-open":void 0}),children:(0,q.jsx)(xe.Provider,{value:$e,children:u})})});function Je(e,t){e?.toggleAttribute(me.swiping,t)}function Ye(e){return!!e?.closest(g)}function Xe(e){return!!e?.closest(Ke)}function Ze(e,t){return t===`left`||t===`right`?e.offsetWidth:e.offsetHeight}function Qe(e,t){return Math.max(Ze(e,t)*.5,Pe)}function $e(e,t){return e instanceof t.HTMLInputElement&&e.type===`range`}function et(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`}function tt(e,t){let n=S(e.anchorNode)?e.anchorNode:e.anchorNode?.parentElement,r=S(e.focusNode)?e.focusNode:e.focusNode?.parentElement;return e.containsNode(t,!0)||C(t,n)||C(t,r)}function nt(e,t){let n=f(e);if(n&&C(t,n)&&et(n)){let{selectionStart:e,selectionEnd:t}=n;if(e!=null&&t!=null&&e<t)return!0}let r=e.getSelection?.();return!r||r.isCollapsed?!1:tt(r,t)}function rt(e,t){return e.composedPath().some(e=>$e(e,t))}function it(e){return rt(e.nativeEvent,d(e.currentTarget))}function at(e,t){e.lastX=t.clientX,e.lastY=t.clientY}function ot(e,t,n,r){if(e.preserveNativeCrossAxisScroll)return!0;if(e.drawerAxisAttributed||e.allowSwipe===!0||!e.hasCrossAxisScrollableContent)return!1;if(!t.cancelable)return e.preserveNativeCrossAxisScroll=!0,!0;let i=r?n.clientY-e.startY:n.clientX-e.startX,a=r?n.clientX-e.startX:n.clientY-e.startY,o=Math.abs(i),s=Math.abs(a);return s>=We&&s>o+Ge?(e.preserveNativeCrossAxisScroll=!0,!0):o>=We?(e.drawerAxisAttributed=!0,!1):!0}function st(e,t){return ct(e,t).max>0}function ct(e,t){if(t===`vertical`){let t=Math.max(0,e.scrollHeight-e.clientHeight);return{offset:e.scrollTop,max:t}}let n=Math.max(0,e.scrollWidth-e.clientWidth);return{offset:e.scrollLeft,max:n}}function lt(e,t,n){let r=dt(n,t),{offset:i,max:a}=ct(e,t);return r?i<=0:i>=a}function ut(e,t,n,r){return(dt(n,t)?r>0:r<0)&&lt(e,t,n)}function dt(e,t){return t===`vertical`?e===`down`:e===`right`}var ft=.5,pt=1,mt=[ft,pt];function ht(e){return e===`medium`?ft:pt}function gt(e){return e==null?null:e===ft?`medium`:`large`}function _t(e){let t=(0,W.c)(23),{open:n,onOpenChange:r,label:i,detent:a,onDetentChange:o,activeDetent:s,className:c,children:l}=e,u=a===void 0?`large`:a,d;t[0]===u?d=t[1]:(d=ht(u),t[0]=u,t[1]=d);let f;t[2]===s?f=t[3]:(f=s===void 0?{}:{snapPoint:s===null?null:ht(s)},t[2]=s,t[3]=f);let p;t[4]===o?p=t[5]:(p=e=>o?.(gt(e)),t[4]=o,t[5]=p);let m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,q.jsx)(ce,{className:N(`app-sheet-backdrop fixed inset-0 z-50 backdrop-blur-sm`,`transition-opacity duration-[var(--app-motion-duration-sheet)] ease-[var(--app-motion-ease)] data-ending-style:opacity-0 data-starting-style:opacity-0 motion-reduce:transition-none`),"data-slot":`mobile-sheet-backdrop`}),t[6]=m):m=t[6];let h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=N(`pointer-events-auto fixed inset-0 z-50 flex flex-col justify-end pt-12`,`pb-[var(--app-keyboard-inset,0px)]`),t[7]=h):h=t[7];let g;t[8]===c?g=t[9]:(g=N(H(`sheet`),`pointer-events-auto flex max-h-full min-h-0 w-full min-w-0 flex-col rounded-t-2xl border-t not-dark:bg-clip-padding text-popover-foreground shadow-lg/5`,`pb-safe pl-safe pr-safe`,`translate-y-[calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y,0px))] data-ending-style:translate-y-full data-starting-style:translate-y-full`,`transition-[translate,scale] duration-[var(--app-motion-duration-sheet)] ease-[var(--app-motion-ease)] will-change-transform motion-reduce:transition-none`,`data-nested-drawer-open:scale-96`,c),t[8]=c,t[9]=g);let _;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,q.jsx)(`span`,{"aria-hidden":!0,className:`mx-auto mt-2 mb-1 h-1 w-9 shrink-0 rounded-full bg-muted-foreground/32`,"data-slot":`mobile-sheet-grabber`}),t[10]=_):_=t[10];let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,q.jsx)(X,{"aria-label":`Close`,className:`absolute end-2 top-2 z-20`,"data-slot":`mobile-sheet-close`,render:(0,q.jsx)(ae,{size:`icon`,variant:`ghost`}),children:(0,q.jsx)(M,{})}),t[11]=v):v=t[11];let y;t[12]!==l||t[13]!==i||t[14]!==g?(y=(0,q.jsxs)(Ee,{children:[m,(0,q.jsx)(qe,{className:h,"data-slot":`mobile-sheet-viewport`,children:(0,q.jsxs)(Te,{"aria-label":i,className:g,"data-slot":`sheet-popup`,"data-mobile-sheet":``,onKeyDown:vt,children:[_,l,v]})})]}),t[12]=l,t[13]=i,t[14]=g,t[15]=y):y=t[15];let b;return t[16]!==r||t[17]!==n||t[18]!==y||t[19]!==d||t[20]!==f||t[21]!==p?(b=(0,q.jsx)(Oe,{open:n,onOpenChange:r,swipeDirection:`down`,snapPoints:mt,defaultSnapPoint:d,...f,onSnapPointChange:p,children:y}),t[16]=r,t[17]=n,t[18]=y,t[19]=d,t[20]=f,t[21]=p,t[22]=b):b=t[22],b}function vt(e){e.stopPropagation()}function yt(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=N(`flex shrink-0 flex-col gap-1 px-4 pt-2 pe-11 pb-3`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(`div`,{className:i,"data-slot":`mobile-sheet-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function bt(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=N(`truncate font-heading font-semibold text-base leading-tight`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(je,{className:i,"data-slot":`mobile-sheet-title`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function xt(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=N(`text-muted-foreground text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(de,{className:i,"data-slot":`mobile-sheet-description`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function St(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=N(`min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 pb-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(ue,{className:i,"data-slot":`mobile-sheet-panel`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ct(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=N(`flex shrink-0 flex-col-reverse gap-2 px-4 pt-3 pb-2 sm:flex-row`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(`div`,{className:i,"data-slot":`mobile-sheet-footer`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{St as a,K as c,yt as i,xt as n,bt as o,Ct as r,J as s,_t as t};
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-DXTD6mKH.js";import{Bt as i,En as a,Kn as o,Mn as s,Nn as c,Ot as l,Qt as u,Rn as d,Rt as f,Wn as p,Yn as m,dn as h,et as g,j as _,jn as v,jt as y,on as b,y as x,zn as S,zt as C}from"./usePopupViewport-SxCh7dCg.js";import{a as w,i as T,r as E,t as D}from"./useSwipeDismiss-ALyKckxx.js";import{d as O,o as k,r as A,t as j}from"./useRenderElement-DchFnsR8.js";import{t as M}from"./x-C1Cemsov.js";import{t as N}from"./utils-Ct58OPtz.js";import{i as P,n as F,o as I,s as L,t as ee}from"./DialogViewport-BrRcGV_l.js";import{n as R,r as z,t as B}from"./DialogTitle-7dK2BQ85.js";import{p as te,s as ne}from"./useScrollLock-cFFkQSYy.js";import{t as re}from"./react-dom-x9LNwWQc.js";import{n as ie,t as V}from"./clamp-CgH0Dl6R.js";import{t as ae}from"./button-WR80VgkK.js";import{t as H}from"./GlassSurface--5lIEJCy.js";var U=e(t(),1),W=n(),G=120;function K(e){let t=e.replace(/\s+/gu,` `).trim();return t.length<=G?t:`${t.slice(0,119)}…`}var q=r();function J(e){let t=(0,W.c)(37),{label:n,icon:r,secondaryText:i,trailing:a,disabled:o,disabledReason:s,destructive:c,selected:l,onClick:u,className:d}=e,f=o!==void 0&&o,p=c!==void 0&&c,m=(0,U.useId)(),h;t[0]!==f||t[1]!==s?(h=f&&s?K(s):null,t[0]=f,t[1]=s,t[2]=h):h=t[2];let g=h,_=`${m}-label`,v=`${m}-secondary`,y=`${m}-trailing`,b=`${m}-reason`,x=i?v:null,S=a?y:null,C;t[3]!==_||t[4]!==x||t[5]!==S?(C=[_,x,S].filter(oe),t[3]=_,t[4]=x,t[5]=S,t[6]=C):C=t[6];let w=C.join(` `),T=g?w:void 0,E=g?b:void 0,D=p&&!f&&`text-destructive`,O=l&&`bg-accent/60 font-medium`,k;t[7]!==d||t[8]!==O||t[9]!==D?(k=N(`flex min-h-11 w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:text-muted-foreground/60`,D,O,d),t[7]=d,t[8]=O,t[9]=D,t[10]=k):k=t[10];let A;t[11]!==n||t[12]!==_?(A=(0,q.jsx)(`span`,{id:_,className:`truncate`,children:n}),t[11]=n,t[12]=_,t[13]=A):A=t[13];let j;t[14]!==v||t[15]!==i?(j=i?(0,q.jsx)(`span`,{id:v,className:`truncate text-xs text-muted-foreground`,children:i}):null,t[14]=v,t[15]=i,t[16]=j):j=t[16];let M;t[17]!==g||t[18]!==b?(M=g?(0,q.jsx)(`span`,{id:b,className:`truncate text-xs text-muted-foreground/80`,children:g}):null,t[17]=g,t[18]=b,t[19]=M):M=t[19];let P;t[20]!==A||t[21]!==j||t[22]!==M?(P=(0,q.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[A,j,M]}),t[20]=A,t[21]=j,t[22]=M,t[23]=P):P=t[23];let F;t[24]!==a||t[25]!==y?(F=a?(0,q.jsx)(`span`,{id:y,className:`flex shrink-0 items-center gap-2`,children:a}):null,t[24]=a,t[25]=y,t[26]=F):F=t[26];let I;return t[27]!==f||t[28]!==r||t[29]!==u||t[30]!==l||t[31]!==k||t[32]!==P||t[33]!==F||t[34]!==T||t[35]!==E?(I=(0,q.jsxs)(`button`,{type:`button`,disabled:f,"aria-labelledby":T,"aria-describedby":E,"aria-pressed":l,className:k,"data-slot":`mobile-list-row`,onClick:u,children:[r,P,F]}),t[27]=f,t[28]=r,t[29]=u,t[30]=l,t[31]=k,t[32]=P,t[33]=F,t[34]=T,t[35]=E,t[36]=I):I=t[36],I}function oe(e){return e!==null}var Y=function(e){return e.nestedDrawers=`--nested-drawers`,e.height=`--drawer-height`,e.frontmostHeight=`--drawer-frontmost-height`,e.swipeMovementX=`--drawer-swipe-movement-x`,e.swipeMovementY=`--drawer-swipe-movement-y`,e.snapPointOffset=`--drawer-snap-point-offset`,e.swipeStrength=`--drawer-swipe-strength`,e}({}),se=function(e){return e.swipeProgress=`--drawer-swipe-progress`,e}({}),ce=U.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...s}=e,c=L(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`mounted`),f={open:l,transitionStatus:c.useState(`transitionStatus`)};return j(`div`,e,{state:f,ref:[c.context.backdropRef,t],stateAttributesMapping:o,props:[{role:`presentation`,hidden:!d,style:{pointerEvents:l?void 0:`none`,userSelect:`none`,WebkitUserSelect:`none`,[se.swipeProgress]:`0`,[Y.swipeStrength]:`1`}},s],enabled:a||!u})}),X=z,le=`data-drawer-content`,ue=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return L(),j(`div`,e,{ref:t,props:[{[le]:``},a]})}),de=R,fe=U.createContext(void 0);function pe(){return U.useContext(fe)}var me=function(e){return e[e.open=p.open]=`open`,e[e.closed=p.closed]=`closed`,e[e.startingStyle=p.startingStyle]=`startingStyle`,e[e.endingStyle=p.endingStyle]=`endingStyle`,e.expanded=`data-expanded`,e.nestedDrawerOpen=`data-nested-drawer-open`,e.nestedDrawerSwiping=`data-nested-drawer-swiping`,e.swipeDismiss=`data-swipe-dismiss`,e.swipeDirection=`data-swipe-direction`,e.swiping=`data-swiping`,e}({}),he=U.createContext(void 0);function ge(e){let t=U.useContext(he);if(e!==!0&&t===void 0)throw Error(O(90));return t}function _e(e,t){let n=e+t;return n>=0?t:-Math.sqrt(-n)-e}function ve(e,t,n){if(!Number.isFinite(t)||t<=0)return null;if(typeof e==`number`)return Number.isFinite(e)?e<=1?V(e,0,1)*t:e:null;let r=e.trim();if(r.endsWith(`px`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e:null}if(r.endsWith(`rem`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e*n:null}return null}function ye(e,t){let n=-1,r=1/0;for(let i=0;i<e.length;i+=1){let a=Math.abs(e[i]-t);a<r&&(r=a,n=i)}return n}function be(){let e=L(),{snapPoints:t,activeSnapPoint:n,setActiveSnapPoint:r,popupHeight:i}=ge(),a=e.useState(`viewportElement`),[o,l]=U.useState(0),[u,d]=U.useState(16),f=c(()=>{let e=v(a).documentElement;l(a?a.offsetHeight:e.clientHeight);let t=parseFloat(getComputedStyle(e).fontSize);Number.isFinite(t)&&d(t)});s(()=>{if(f(),!a||typeof ResizeObserver!=`function`)return;let e=new ResizeObserver(f);return e.observe(a),()=>{e.disconnect()}},[f,a]);let p=U.useMemo(()=>{if(!t||t.length===0||o<=0||i<=0)return[];let e=Math.min(i,o),n=t.map(t=>{let n=ve(t,o,u);if(n===null)return null;let r=V(n,0,e);return{value:t,height:r,offset:Math.max(0,i-r)}}).filter(e=>!!e);if(n.length<=1)return n;let r=[],a=[];for(let e=n.length-1;e>=0;--e){let t=n[e];a.some(e=>Math.abs(e-t.height)<=1)||(a.push(t.height),r.push(t))}return r.reverse(),r},[i,u,t,o]);return{snapPoints:t,activeSnapPoint:n,setActiveSnapPoint:r,popupHeight:i,viewportHeight:o,resolvedSnapPoints:p,activeSnapPointOffset:U.useMemo(()=>{if(n===null)return;let e=p.find(e=>Object.is(e.value,n));if(e)return e;let t=Math.min(i,o),r=ve(n,o,u);if(r===null)return;let a=V(r,0,t);return p[ye(p.map(e=>e.height),a)]},[n,i,p,u,o])?.offset??null}}var xe=U.createContext(null);function Se(){return U.useContext(xe)}var Ce=!1;function we(){Ce||=(typeof CSS<`u`&&`registerProperty`in CSS&&([Y.swipeMovementX,Y.swipeMovementY,Y.snapPointOffset].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),[{name:se.swipeProgress,initialValue:`0`},{name:Y.swipeStrength,initialValue:`1`}].forEach(({name:e,initialValue:t})=>{try{CSS.registerProperty({name:e,syntax:`<number>`,inherits:!1,initialValue:t})}catch{}})),!0)}var Z={...o,expanded(e){return e?{[me.expanded]:``}:null},nestedDrawerOpen(e){return e?{[me.nestedDrawerOpen]:``}:null},nestedDrawerSwiping(e){return e?{[me.nestedDrawerSwiping]:``}:null},swipeDirection(e){return{[me.swipeDirection]:e}},swiping(e){return e?{[me.swiping]:``}:null}},Te=U.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...l}=e,u=L(),d=u.context.popupRef,{swipeDirection:f,frontmostHeight:p,hasNestedDrawer:m,nestedSwiping:h,nestedSwipeProgressStore:g,onPopupHeightChange:v,notifyParentFrontmostHeight:y,notifyParentHasNestedDrawer:b}=ge(),S=u.useState(`descriptionElementId`),C=u.useState(`disablePointerDismissal`),w=u.useState(`floatingRootContext`),T=u.useState(`popupProps`),E=u.useState(`modal`),D=u.useState(`mounted`),O=u.useState(`nested`),A=u.useState(`nestedOpenDrawerCount`),M=u.useState(`transitionStatus`),N=u.useState(`open`),P=u.useState(`openMethod`),F=u.useState(`titleElementId`),ee=u.useState(`role`),R=w.useState(`floatingId`),z=l.id??R,B=Se();I();let{snapPoints:re,activeSnapPoint:ie,activeSnapPointOffset:V}=be(),ae=A>0,H=B?.swiping??!1,W=B?.swipeStrength??null,[G,K]=U.useState(0),J=U.useRef(0),oe=c(()=>{let e=d.current;if(!e)return;let t=e.offsetHeight;if(J.current>0&&p>J.current&&t>J.current)return;if(J.current>0&&m){let e=J.current;K(e),v(e);return}let n=t;n!==J.current&&(J.current=n,K(n),v(n))});s(()=>{if(!D){J.current=0,K(0),v(0);return}let e=d.current;if(!e||(we(),oe(),typeof ResizeObserver!=`function`))return;let t=new ResizeObserver(oe);return t.observe(e),()=>{t.disconnect()}},[oe,D,ae,v,d]),s(()=>{let e=()=>{let e=d.current;if(!e)return;let t=g.getSnapshot();t>0?e.style.setProperty(se.swipeProgress,`${t}`):e.style.setProperty(se.swipeProgress,`0`)};e();let t=g.subscribe(e),n=d.current;return()=>{t(),n&&n.style.setProperty(se.swipeProgress,`0`)}},[g,d]),s(()=>{if(N)return y?.(p),()=>{y?.(0)}},[p,N,y]),s(()=>{if(b)return b(N||M===`ending`),()=>{b(!1)}},[b,N,M]),_({open:N,ref:d,onComplete(){N&&u.context.onOpenChangeComplete?.(!0)}});let ce=o===void 0?d:o,X=u.useStateSetter(`popupElement`),le={open:N,nested:O,transitionStatus:M,expanded:ie===1,nestedDrawerOpen:ae,nestedDrawerSwiping:h,swipeDirection:f,swiping:H},ue;G&&!(!m&&M!==`ending`)&&(ue=`${G}px`);let de=re&&re.length>0&&(f===`down`||f===`up`),fe=null;de&&V!==null&&(fe=f===`up`?-V:V);let pe=B?B.getDragStyles():k;if(de&&f===`down`){let e=V??0,t=Number.parseFloat(String(pe[Y.swipeMovementY]));pe=H&&Number.isFinite(t)?{...pe,transform:void 0,[Y.swipeMovementY]:`${_e(e,t)}px`}:{...pe,transform:void 0}}let me=j(`div`,e,{state:le,props:[T,{id:z,"aria-labelledby":F,"aria-describedby":S,role:ee,...x,hidden:!D,onKeyDown(e){ne.has(e.key)&&e.stopPropagation()},style:{...pe,[se.swipeProgress]:`0`,[Y.nestedDrawers]:A,[Y.height]:ue,[Y.snapPointOffset]:typeof fe==`number`?`${fe}px`:`0px`,[Y.frontmostHeight]:p?`${p}px`:void 0,[Y.swipeStrength]:typeof W==`number`&&Number.isFinite(W)&&W>0?`${W}`:`1`}},l],ref:[t,d,X],stateAttributesMapping:Z});return(0,q.jsx)(te,{context:w,openInteractionType:P,disabled:!D,closeOnFocusOut:!C,initialFocus:ce,returnFocus:a,modal:E!==!1,restoreFocus:`popup`,children:me})}),Ee=P,De,Q;function Oe(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:o=!1,modal:s=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null,swipeDirection:p=`down`,snapToSequentialPoints:m=!1,snapPoints:h,snapPoint:g,defaultSnapPoint:_,onSnapPointChange:v}=e,y=ge(!0),x=y?.onNestedSwipeProgressChange,S=y?.onNestedFrontmostHeightChange,C=y?.onNestedSwipingChange,w=y?.onNestedDrawerPresenceChange,[T,E]=U.useState(0),[D,O]=U.useState(0),[k,A]=U.useState(!1),[j,M]=U.useState(!1),[N]=U.useState(ke),P=_===void 0?h?.[0]??null:_,I=g!==void 0,[L,ee]=ie({controlled:g,default:P,name:`Drawer`,state:`snapPoint`}),R=U.useRef(!1),z=U.useRef(!1),B=c((e,t)=>{let n=t??b(`none`);v?.(e,n),!n.isCanceled&&ee(e)}),te=U.useMemo(()=>I||!h||h.length===0?L:L===null||!h.some(e=>Object.is(e,L))?P:L,[L,I,P,h]),ne=c(e=>{E(e),!R.current&&e>0&&O(e)}),re=c(e=>{if(e>0){R.current=!0,O(e);return}R.current=!1,T>0&&O(T)}),V=c(e=>{A(e)}),ae=c(e=>{N.set(e),x?.(e)}),H=c(e=>{M(e),C?.(e)}),W=c((e,t)=>{i?.(e,t),!t.isCanceled&&!e&&h&&h.length>0&&B(P,b(t.reason,t.event,t.trigger))}),G=U.useMemo(()=>({swipeDirection:p,swipeAreaActiveRef:z,snapToSequentialPoints:m,snapPoints:h,activeSnapPoint:te,setActiveSnapPoint:B,frontmostHeight:D,popupHeight:T,hasNestedDrawer:k,nestedSwiping:j,nestedSwipeProgressStore:N,onNestedDrawerPresenceChange:V,onPopupHeightChange:ne,onNestedFrontmostHeightChange:re,onNestedSwipingChange:H,onNestedSwipeProgressChange:ae,notifyParentFrontmostHeight:S,notifyParentSwipingChange:C,notifyParentSwipeProgressChange:x,notifyParentHasNestedDrawer:w}),[te,D,k,j,N,w,x,C,S,V,re,ae,H,ne,T,B,h,m,z,p]),K=typeof t==`function`?e=>(0,q.jsxs)(U.Fragment,{children:[De||=(0,q.jsx)(Ae,{}),t(e)]}):(0,q.jsxs)(U.Fragment,{children:[Q||=(0,q.jsx)(Ae,{}),t]}),J=F(`drawer`,{open:n,defaultOpen:r,onOpenChange:W,onOpenChangeComplete:a,disablePointerDismissal:o,modal:s,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f,children:K});return(0,q.jsx)(he.Provider,{value:G,children:J})}function ke(){let e=0,t=new Set;return{getSnapshot:()=>e,set(n){let r=Number.isFinite(n)?n:0;r!==e&&(e=r,t.forEach(e=>{e()}))},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}function Ae(){let e=pe(),t=L(!1),n=e?.setDrawerOpen,r=e?.removeDrawer,i=t.useState(`open`),a=t.useState(`nestedOpenDialogCount`),o=t.useState(`popupElement`),c=a===0;return s(()=>{if(r)return()=>{r(t)}},[r,t]),s(()=>{n?.(t,i)},[i,n,t]),U.useEffect(()=>{if(!i||!c||!u)return;let e=d(o).CloseWatcher;if(!e)return;function n(e){t.select(`open`)&&t.setOpen(!1,b(h,e))}let r=new e,a=y(r,`close`,n);return()=>{a(),r.destroy()}},[t,c,i,o]),null}var je=B,Me=e(re(),1),$=U.createContext(void 0);function Ne(){return U.useContext($)}var Pe=10,Fe=.5,Ie=.5,Le=300,Re=4,ze=.2,Be=4,Ve=80,He=360,Ue=.1,We=6,Ge=2,Ke=`[${le}]`,qe=U.forwardRef(function(e,t){let{render:n,className:r,style:o,children:u,...d}=e,f=L(),p=f.context.popupRef,h=f.context.backdropRef,{swipeDirection:g,notifyParentSwipingChange:_,notifyParentSwipeProgressChange:x,frontmostHeight:O,snapToSequentialPoints:k,swipeAreaActiveRef:j}=ge(),M=pe(),{snapPoints:N,resolvedSnapPoints:P,activeSnapPoint:F,activeSnapPointOffset:I,setActiveSnapPoint:R,popupHeight:z}=be(),B=f.useState(`open`),te=f.useState(`mounted`),ne=f.useState(`nested`),re=f.useState(`nestedOpenDrawerCount`),ie=f.useState(`viewportElement`),ae=f.useState(`popupElement`),H=M?.visualStateStore,W=re>0,G=g===`left`||g===`right`?`horizontal`:`vertical`,K=G===`vertical`,J=K?`horizontal`:`vertical`,[oe,ce]=U.useState(null),X=U.useRef(void 0),le=U.useRef(null),ue=l(),de=U.useRef(!1),fe=U.useRef(!1),he=U.useRef(``),ve=U.useRef(!1),Se=U.useRef(!1),Ce=U.useRef(null),we=Ne(),Z=U.useMemo(()=>{if(!N||N.length<2||P.length<2||g!==`down`&&g!==`up`)return null;let e=P.map(e=>e.offset).sort((e,t)=>e-t),t=e[0];return{minOffset:t,range:e[1]-t}},[P,N,g]),Te=U.useMemo(()=>!Z||I===null?null:V((I-Z.minOffset)/Z.range,0,1),[I,Z]),Ee=U.useMemo(()=>N&&N.length>0&&(g===`down`||g===`up`)?g===`down`?[`down`,`up`]:[`up`,`down`]:[g],[N,g]),De=c(e=>{p.current?.toggleAttribute(me.swipeDismiss,e),h.current?.toggleAttribute(me.swipeDismiss,e)}),Q=c(()=>{De(!1),p.current?.removeAttribute(m.endingStyle),ce(null)}),Oe=c(()=>{fe.current&&(fe.current=!1,_?.(!1))}),ke=c((e,t,n)=>{let r=B&&!ne&&t,i=r?e:0,a=B&&t?e:0;n&&x&&(x(a),a<=0&&Oe()),H?.set({swipeProgress:i,frontmostHeight:i>0?O:0});let o=h.current;if(!o)return;let s=r&&i>0;o.style.setProperty(se.swipeProgress,s?`${i}`:`0`),s&&O>0?o.style.setProperty(Y.height,`${O}px`):o.style.removeProperty(Y.height)});function Ae(e,t,n,r,i,a,o,s){let c=Ze(e,t);if(c<=0)return null;let l=((t===`down`||t===`up`)&&N&&N.length>0?I??0:0)+D(t,n,r),u=Math.max(0,c-l);if(u<=0)return null;let d=D(t,o,s),f=Math.abs(d)>0?d:D(t,i,a);if(f<=ze)return null;let p=V(f,ze,Be);return Ue+(V(u/p,Ve,He)-Ve)/280*.9}function je(e){if(fe.current||!e)return;let t=e.direction??g,n=D(t,e.deltaX,e.deltaY);Math.abs(n)<Pe||(fe.current=!0,_?.(!0))}let $=E({enabled:te&&!W,directions:Ee,elementRef:f.context.popupRef,ignoreSelectorWhenTouch:!1,ignoreScrollableAncestors:!0,movementCssVars:{x:Y.swipeMovementX,y:Y.swipeMovementY},onSwipeStart(e){if(`touches`in e||e.pointerType===`touch`)return;let t=p.current,n=v(t).getSelection?.();if(!n||n.isCollapsed)return;let r=S(n.anchorNode)?n.anchorNode:n.anchorNode?.parentElement,i=S(n.focusNode)?n.focusNode:n.focusNode?.parentElement;!C(t,r)&&!C(t,i)||n.removeAllRanges()},onSwipingChange(e){de.current=e,Je(f.context.backdropRef.current,e),!e&&!x&&Oe()},swipeThreshold({element:e,direction:t}){return Qe(e,t)},canStart(e,t){let n=f.context.popupRef.current;if(!n)return!1;let r=n.ownerDocument,i=T(n.getRootNode(),e.x,e.y);if(!i||!C(n,i))return!1;let a=t.nativeEvent;return!((`touches`in a||a.pointerType===`touch`)&&nt(r,n))},onProgress(e,t){je(t);let n=!!(N&&N.length>0);if(de.current&&g===`down`&&n&&t){let e=f.context.popupRef.current;e&&(e.style.removeProperty(`transform`),e.style.setProperty(Y.swipeMovementY,`${_e(I??0,t.deltaY)}px`))}let r=e;if(Z&&z>0){let e=I??Z.minOffset;t&&Number.isFinite(t.deltaY)?r=(e=>V((e-Z.minOffset)/Z.range,0,1))(V(e+t.deltaY,0,z)):Te!==null&&(r=Te)}ke(r,!0,!0)},onRelease({event:e,deltaX:t,deltaY:n,direction:r,velocityX:i,velocityY:o,releaseVelocityX:s,releaseVelocityY:c}){let l=f.context.popupRef.current;if(!l){Q();return}let u=l;function d(e){Oe(),De(!0),u.style.removeProperty(`transition`),u.setAttribute(m.endingStyle,``),Me.flushSync(()=>{ce(Ae(u,e,t,n,i,o,s,c))})}if(!N||N.length===0){if(!r){Q();return}let e=D(r,t,n);if(e<=0)return Q(),!1;if(D(r,i,o)>=Fe)return d(r),!0;let a=e>Qe(u,r);return a?d(r):Q(),a}if(g!==`down`&&g!==`up`){Q();return}if(!z)return Q(),!1;if(P.length===0){Q();return}let p=g===`down`?n:-n,h=Math.sign(p),_=g===`down`?c:-c,v=g===`down`?o:-o,y=_;if(h!==0&&Math.abs(p)>=Pe){let e=Math.sign(y);e!==0&&e!==h&&(y=v)}let x=I??0,S=V(x+p,0,z),C=Math.abs(y)>=Ie?V(y,-4,Re)*Le:0,w=k?S:V(S+C,0,z),T=b(a,e),E=()=>(X.current=F,R(null,T),d(g),!0);if(k){let e=[...P].sort((e,t)=>e.offset-t.offset),t=e.map(e=>e.offset),n=ye(t,x),r=e[ye(t,w)],i=Math.sign(y),a=h!==0&&i!==0&&i===h&&Math.abs(y)>=Ie,o=w;if(a){let t=V(n+h,0,e.length-1);if(t!==n){let n=e[t];(h>0?w<n.offset:w>n.offset)&&(r=n,o=n.offset)}else if(h>0)return E()}return Math.abs(o-z)<Math.abs(o-r.offset)?E():(R(r.value,T),Q(),!1)}if(y>=Fe&&p>0)return E();let O=P[ye(P.map(e=>e.offset),w)];return Math.abs(w-z)<Math.abs(w-O.offset)?E():(R(O.value,T),Q(),!1)},onDismiss(e){H?.set({swipeProgress:0,frontmostHeight:0});let t=f.context.backdropRef.current;t&&(t.style.setProperty(se.swipeProgress,`0`),t.style.removeProperty(Y.height));let n=b(a,e);if(f.setOpen(!1,n),n.isCanceled){let t=X.current;t!==void 0&&R(t,b(a,e)),X.current=void 0,le.current?.(),Q();return}if(f.select(`open`)){let t=e;ue.request(()=>{if(f.select(`open`)){let e=X.current;e!==void 0&&R(e,b(a,t)),X.current=void 0,Q(),le.current?.()}else X.current=void 0});return}X.current=void 0,De(!0)}}),We=$.getPointerProps(),Ge=$.getTouchProps(),{moveNative:Ke,reset:qe}=$;le.current=qe,U.useEffect(()=>{let e=ie??ae;if(!e)return;let t=e,n=v(t);function r(e,r,i){let a=K?i.clientY-r.lastY:i.clientX-r.lastX;if(e.touches.length===2||nt(n,t)||!B||!te||W||ot(r,e,i,K))return;let o=r.scrollTarget;if(!o||o===n.documentElement||o===n.body){e.cancelable&&e.preventDefault(),e.stopPropagation(),Ke(e,t);return}if(!st(o,G)){e.cancelable&&e.preventDefault(),e.stopPropagation();return}if(a!==0){let t=ut(o,G,g,a);r.allowSwipe?e.cancelable&&e.preventDefault():e.cancelable&&t?(r.allowSwipe=!0,e.preventDefault()):r.allowSwipe=!1}r.allowSwipe===!0&&(e.stopPropagation(),Ke(e,t))}function i(e){if(we?.onTouchMove(e),Se.current)return;let t=Ce.current,n=e.touches[0];!n||!t||(r(e,t,n),at(t,n))}return y(n,`touchmove`,i,{passive:!1,capture:!0})},[te,W,B,ae,K,G,g,Ke,ie,we]),s(()=>{!Z||$.swiping||ke(!B||ne?0:Te??0,!0,!1)},[ke,O,ne,x,B,Te,Z,$.swiping,f,H]),s(()=>{if(x)return B||x(0),()=>{x(0)}},[x,B]),s(()=>{B&&(j.current||qe(),Q())},[Q,B,qe,j]),s(()=>{let e=h.current;return()=>{H?.set({swipeProgress:0,frontmostHeight:0}),Je(e,!1);let t=h.current;t!==e&&Je(t,!1),Oe()}},[h,Oe,H]);let $e=U.useMemo(()=>({swiping:$.swiping,getDragStyles:$.getDragStyles,swipeStrength:oe??null,setSwipeDismissed:De}),[De,$.getDragStyles,$.swiping,oe]);function et(e){Se.current=e,Ce.current=null}function tt(){et(!1),he.current=``,ve.current=!1}function rt(e){return he.current=``,e.pointerType!==`touch`}return(0,q.jsx)(ee,{ref:t,className:r,style:o,render:n,...A(d,{onPointerDown(e){if(he.current=e.pointerType,ve.current=e.pointerType===`pen`,!B||!te||W)return;let t=T(e.currentTarget.getRootNode(),e.clientX,e.clientY);Ye(t)||Xe(t)||e.pointerType!==`touch`&&We.onPointerDown?.(e)},onPointerMove(e){e.pointerType!==`touch`&&We.onPointerMove?.(e)},onPointerUp(e){rt(e)&&We.onPointerUp?.(e)},onPointerCancel(e){rt(e)&&We.onPointerCancel?.(e)},onTouchStart(e){if(he.current===`pen`&&ve.current){ve.current=!1,et(!1);return}if(!B||!te||W){et(!1);return}let t=e.touches[0];if(!t)return;if(it(e)){et(!1);return}let n=e.currentTarget,r=T(n.getRootNode(),t.clientX,t.clientY),a=i(e.nativeEvent),o=S(a)?a:n;if(!C(n,o)){et(!0);return}if(we?.onTouchStart(e),Ye(r)){et(!0);return}Se.current=!1;let s=w(o,n,G),c=w(o,n,J)!=null,l=null;s&&(l=lt(s,G,g)?null:!1),Ce.current={startX:t.clientX,startY:t.clientY,lastX:t.clientX,lastY:t.clientY,scrollTarget:s,hasCrossAxisScrollableContent:c,allowSwipe:l,preserveNativeCrossAxisScroll:!1,drawerAxisAttributed:!1},Ge.onTouchStart?.(e)},onTouchEnd(e){we?.onTouchEnd(e),tt(),Ge.onTouchEnd?.(e)},onTouchCancel(e){we?.onTouchCancel(),tt(),Ge.onTouchCancel?.(e)},"data-nested-dialog-open":void 0}),children:(0,q.jsx)(xe.Provider,{value:$e,children:u})})});function Je(e,t){e?.toggleAttribute(me.swiping,t)}function Ye(e){return!!e?.closest(g)}function Xe(e){return!!e?.closest(Ke)}function Ze(e,t){return t===`left`||t===`right`?e.offsetWidth:e.offsetHeight}function Qe(e,t){return Math.max(Ze(e,t)*.5,Pe)}function $e(e,t){return e instanceof t.HTMLInputElement&&e.type===`range`}function et(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`}function tt(e,t){let n=S(e.anchorNode)?e.anchorNode:e.anchorNode?.parentElement,r=S(e.focusNode)?e.focusNode:e.focusNode?.parentElement;return e.containsNode(t,!0)||C(t,n)||C(t,r)}function nt(e,t){let n=f(e);if(n&&C(t,n)&&et(n)){let{selectionStart:e,selectionEnd:t}=n;if(e!=null&&t!=null&&e<t)return!0}let r=e.getSelection?.();return!r||r.isCollapsed?!1:tt(r,t)}function rt(e,t){return e.composedPath().some(e=>$e(e,t))}function it(e){return rt(e.nativeEvent,d(e.currentTarget))}function at(e,t){e.lastX=t.clientX,e.lastY=t.clientY}function ot(e,t,n,r){if(e.preserveNativeCrossAxisScroll)return!0;if(e.drawerAxisAttributed||e.allowSwipe===!0||!e.hasCrossAxisScrollableContent)return!1;if(!t.cancelable)return e.preserveNativeCrossAxisScroll=!0,!0;let i=r?n.clientY-e.startY:n.clientX-e.startX,a=r?n.clientX-e.startX:n.clientY-e.startY,o=Math.abs(i),s=Math.abs(a);return s>=We&&s>o+Ge?(e.preserveNativeCrossAxisScroll=!0,!0):o>=We?(e.drawerAxisAttributed=!0,!1):!0}function st(e,t){return ct(e,t).max>0}function ct(e,t){if(t===`vertical`){let t=Math.max(0,e.scrollHeight-e.clientHeight);return{offset:e.scrollTop,max:t}}let n=Math.max(0,e.scrollWidth-e.clientWidth);return{offset:e.scrollLeft,max:n}}function lt(e,t,n){let r=dt(n,t),{offset:i,max:a}=ct(e,t);return r?i<=0:i>=a}function ut(e,t,n,r){return(dt(n,t)?r>0:r<0)&&lt(e,t,n)}function dt(e,t){return t===`vertical`?e===`down`:e===`right`}var ft=.5,pt=1,mt=[ft,pt];function ht(e){return e===`medium`?ft:pt}function gt(e){return e==null?null:e===ft?`medium`:`large`}function _t(e){let t=(0,W.c)(23),{open:n,onOpenChange:r,label:i,detent:a,onDetentChange:o,activeDetent:s,className:c,children:l}=e,u=a===void 0?`large`:a,d;t[0]===u?d=t[1]:(d=ht(u),t[0]=u,t[1]=d);let f;t[2]===s?f=t[3]:(f=s===void 0?{}:{snapPoint:s===null?null:ht(s)},t[2]=s,t[3]=f);let p;t[4]===o?p=t[5]:(p=e=>o?.(gt(e)),t[4]=o,t[5]=p);let m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,q.jsx)(ce,{className:N(`app-sheet-backdrop fixed inset-0 z-50 backdrop-blur-sm`,`transition-opacity duration-[var(--app-motion-duration-sheet)] ease-[var(--app-motion-ease)] data-ending-style:opacity-0 data-starting-style:opacity-0 motion-reduce:transition-none`),"data-slot":`mobile-sheet-backdrop`}),t[6]=m):m=t[6];let h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=N(`pointer-events-auto fixed inset-0 z-50 flex flex-col justify-end pt-12`,`pb-[var(--app-keyboard-inset,0px)]`),t[7]=h):h=t[7];let g;t[8]===c?g=t[9]:(g=N(H(`sheet`),`pointer-events-auto flex max-h-full min-h-0 w-full min-w-0 flex-col rounded-t-2xl border-t not-dark:bg-clip-padding text-popover-foreground shadow-lg/5`,`pb-safe pl-safe pr-safe`,`translate-y-[calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y,0px))] data-ending-style:translate-y-full data-starting-style:translate-y-full`,`transition-[translate,scale] duration-[var(--app-motion-duration-sheet)] ease-[var(--app-motion-ease)] will-change-transform motion-reduce:transition-none`,`data-nested-drawer-open:scale-96`,c),t[8]=c,t[9]=g);let _;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,q.jsx)(`span`,{"aria-hidden":!0,className:`mx-auto mt-2 mb-1 h-1 w-9 shrink-0 rounded-full bg-muted-foreground/32`,"data-slot":`mobile-sheet-grabber`}),t[10]=_):_=t[10];let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,q.jsx)(X,{"aria-label":`Close`,className:`absolute end-2 top-2 z-20`,"data-slot":`mobile-sheet-close`,render:(0,q.jsx)(ae,{size:`icon`,variant:`ghost`}),children:(0,q.jsx)(M,{})}),t[11]=v):v=t[11];let y;t[12]!==l||t[13]!==i||t[14]!==g?(y=(0,q.jsxs)(Ee,{children:[m,(0,q.jsx)(qe,{className:h,"data-slot":`mobile-sheet-viewport`,children:(0,q.jsxs)(Te,{"aria-label":i,className:g,"data-slot":`sheet-popup`,"data-mobile-sheet":``,onKeyDown:vt,children:[_,l,v]})})]}),t[12]=l,t[13]=i,t[14]=g,t[15]=y):y=t[15];let b;return t[16]!==r||t[17]!==n||t[18]!==y||t[19]!==d||t[20]!==f||t[21]!==p?(b=(0,q.jsx)(Oe,{open:n,onOpenChange:r,swipeDirection:`down`,snapPoints:mt,defaultSnapPoint:d,...f,onSnapPointChange:p,children:y}),t[16]=r,t[17]=n,t[18]=y,t[19]=d,t[20]=f,t[21]=p,t[22]=b):b=t[22],b}function vt(e){e.stopPropagation()}function yt(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=N(`flex shrink-0 flex-col gap-1 px-4 pt-2 pe-11 pb-3`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(`div`,{className:i,"data-slot":`mobile-sheet-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function bt(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=N(`truncate font-heading font-semibold text-base leading-tight`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(je,{className:i,"data-slot":`mobile-sheet-title`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function xt(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=N(`text-muted-foreground text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(de,{className:i,"data-slot":`mobile-sheet-description`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function St(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=N(`min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 pb-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(ue,{className:i,"data-slot":`mobile-sheet-panel`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ct(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=N(`flex shrink-0 flex-col-reverse gap-2 px-4 pt-3 pb-2 sm:flex-row`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,q.jsx)(`div`,{className:i,"data-slot":`mobile-sheet-footer`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{St as a,K as c,yt as i,xt as n,bt as o,Ct as r,J as s,_t as t};