decocms 4.143.1 → 4.145.0

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 (244) hide show
  1. package/dist/client/assets/{AlertCircle-CvrFlbkJ.js → AlertCircle-DOdV26SG.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DVoaA00m.js → AreaChart-DSYvOcyE.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-m-T0IzDd.js → ArrowUp-Bzuzx3o4.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-BMajILyG.js → ArrowUpRight-gsGGZTp8.js} +1 -1
  5. package/dist/client/assets/{Check-6UeSvTCG.js → Check-BjHUTESx.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-Bnr6_-gp.js → CheckCircle-CQl7io5M.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-PrZIeYJI.js → ChevronDown-Bwqdwd9f.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-C_ghEWr4.js → ChevronRight-BtvC9VHm.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DUxdEAbV.js → ChevronUp-CQn0ohUc.js} +1 -1
  10. package/dist/client/assets/{Copy01-D9pYrycJ.js → Copy01-Cs6Pjq4P.js} +1 -1
  11. package/dist/client/assets/{DotsVertical-CH8pMegD.js → DotsVertical-Oq8DvMqA.js} +1 -1
  12. package/dist/client/assets/{Eye-DLPpLKBg.js → Eye-D9xLc9D1.js} +1 -1
  13. package/dist/client/assets/{FilterLines-BuL247hS.js → FilterLines-DZ8yodUi.js} +1 -1
  14. package/dist/client/assets/{HardDrive-CsEwwTgZ.js → HardDrive-D6kRY6FP.js} +1 -1
  15. package/dist/client/assets/{Key01-TTyZsvW1.js → Key01-NWi-qdwk.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-B9EFHxoy.js → LayoutLeft-B2Qy9IsH.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-MkOU1z3r.js → LinkExternal01-B843-euO.js} +1 -1
  18. package/dist/client/assets/{LogOut01-CCOGBiwE.js → LogOut01-BTIuunKz.js} +1 -1
  19. package/dist/client/assets/{Monitor01-Bh9-cd3p.js → Monitor01-Dz6kerrc.js} +1 -1
  20. package/dist/client/assets/{Palette-Dmutg04h.js → Palette-BGXAA_s0.js} +1 -1
  21. package/dist/client/assets/{Play-Bt8_7Qy1.js → Play-Dzg-punW.js} +1 -1
  22. package/dist/client/assets/{Plus-Be-2uE6V.js → Plus-BFDzpqlA.js} +1 -1
  23. package/dist/client/assets/{SearchLg-DJYx4P8r.js → SearchLg-DCa9efLT.js} +1 -1
  24. package/dist/client/assets/{SearchMd-TuNIAA-m.js → SearchMd-B1ESGPOj.js} +1 -1
  25. package/dist/client/assets/{Settings02-CywsG0FT.js → Settings02-DaOoUFqv.js} +1 -1
  26. package/dist/client/assets/{Shield01-BzQVyqUc.js → Shield01-CTgR0GxW.js} +1 -1
  27. package/dist/client/assets/{Star01-BZEPJoy0.js → Star01-BcKIqfr0.js} +1 -1
  28. package/dist/client/assets/{Stars01-z6Ln5wQz.js → Stars01-DVe6rF63.js} +1 -1
  29. package/dist/client/assets/{Stars02-B5-5GSTU.js → Stars02-pwFAZthJ.js} +1 -1
  30. package/dist/client/assets/{Sun-DdAPY2yd.js → Sun-D9iudmrW.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-CnuOBOmj.js → SwitchHorizontal01-B6Yup7-A.js} +1 -1
  32. package/dist/client/assets/{Tool01-TTd3NXjc.js → Tool01-BYILQVCT.js} +1 -1
  33. package/dist/client/assets/{Tool02-DFvQwFwY.js → Tool02-BVTC_CLA.js} +1 -1
  34. package/dist/client/assets/{Trash01-f3EzsFdS.js → Trash01-Bv5gqOZN.js} +1 -1
  35. package/dist/client/assets/{TrendUp01-CZtPgnQ-.js → TrendUp01-LFNQfvzv.js} +1 -1
  36. package/dist/client/assets/{Upload01-BkhX6rOi.js → Upload01-CFw29EV6.js} +1 -1
  37. package/dist/client/assets/{User01-Bs_7qy3O.js → User01-BzHjHKhU.js} +1 -1
  38. package/dist/client/assets/{Users01-B7vJ74OR.js → Users01-Bjc49rdX.js} +1 -1
  39. package/dist/client/assets/{Users03-CZYN5l0S.js → Users03-CH4iz8WK.js} +1 -1
  40. package/dist/client/assets/{X-C817Fvj3.js → X-4rHxalja.js} +1 -1
  41. package/dist/client/assets/{XCircle-BEHxOfeJ.js → XCircle-SQTGKvaQ.js} +1 -1
  42. package/dist/client/assets/{XClose-Bd59Alyf.js → XClose-BdreN2P3.js} +1 -1
  43. package/dist/client/assets/{Zap-Hg4YL285.js → Zap-ns7J8qo9.js} +1 -1
  44. package/dist/client/assets/{ZapSquare-Ck-0YfX2.js → ZapSquare-B76IRv2t.js} +1 -1
  45. package/dist/client/assets/{access-gate-D4eVzN6w.js → access-gate-DTa1uKLS.js} +1 -1
  46. package/dist/client/assets/{add-section-modal-CHKaIR9a.js → add-section-modal-BdEeJSRd.js} +1 -1
  47. package/dist/client/assets/{agent-icon-DeRmD-Ut.js → agent-icon-DjdZOUrv.js} +1 -1
  48. package/dist/client/assets/agents-list-CUudTS6H.js +1 -0
  49. package/dist/client/assets/{ai-providers-jWpg_fGX.js → ai-providers-DZivMCbL.js} +1 -1
  50. package/dist/client/assets/{alert-DzlW0CWt.js → alert-Ca4ILBib.js} +1 -1
  51. package/dist/client/assets/{alert-dialog-D0Xq8-G9.js → alert-dialog-ORevJurf.js} +1 -1
  52. package/dist/client/assets/app-editor-EABIKDMQ.js +1 -0
  53. package/dist/client/assets/{auth-r_R7jlRX.js → auth-DgMDRN9a.js} +1 -1
  54. package/dist/client/assets/{auth-catchall-D24pIocz.js → auth-catchall-BeY6k8NA.js} +1 -1
  55. package/dist/client/assets/{auth-entry-D26l7U5c.js → auth-entry-DdqzZyo3.js} +1 -1
  56. package/dist/client/assets/{auth-split-layout-CjF9GE7t.js → auth-split-layout-DIL_CFHe.js} +1 -1
  57. package/dist/client/assets/{authenticate-and-persist-oauth-B79xOOC5.js → authenticate-and-persist-oauth-BGE9TNV5.js} +1 -1
  58. package/dist/client/assets/{automation-list-row-DRf8yWQX.js → automation-list-row-DFOChBrp.js} +1 -1
  59. package/dist/client/assets/{automation-runs-CwK9k80k.js → automation-runs-BKJqa7aT.js} +1 -1
  60. package/dist/client/assets/{automations-Bc0brjvp.js → automations-D1Yvc5eR.js} +1 -1
  61. package/dist/client/assets/{avatar-DysBv2rW.js → avatar-BCIQy5tG.js} +1 -1
  62. package/dist/client/assets/{badge-VPmrT2oL.js → badge-DMih-jJE.js} +1 -1
  63. package/dist/client/assets/{block-document-C_ulbLX6.js → block-document-CC3sHaA9.js} +1 -1
  64. package/dist/client/assets/{brand-context-Bl7X22tV.js → brand-context-C6HaD_iL.js} +1 -1
  65. package/dist/client/assets/{buckets-DoiITreV.js → buckets-AE0QboRn.js} +1 -1
  66. package/dist/client/assets/bulk-category-panel-CreeOaZg.js +1 -0
  67. package/dist/client/assets/{calendar-sc89KMhh.js → calendar-DRIpPV7N.js} +1 -1
  68. package/dist/client/assets/{capability-load-error-xVDo-Vjh.js → capability-load-error-DwezOip8.js} +1 -1
  69. package/dist/client/assets/{card-YiZHzhvM.js → card-DmHlzhtm.js} +1 -1
  70. package/dist/client/assets/category-editor-o-mfBVFm.js +1 -0
  71. package/dist/client/assets/{chat-context-BDdy7IaA.js → chat-context-JmBj-HcB.js} +1 -1
  72. package/dist/client/assets/{checkbox-Cc7kJnis.js → checkbox-Pj2atrYo.js} +1 -1
  73. package/dist/client/assets/{cli-auth-success-C0oX4sBJ.js → cli-auth-success-Br1FNBUy.js} +1 -1
  74. package/dist/client/assets/{collection-detail-2q2UbOOR.js → collection-detail-v6-SHfqe.js} +1 -1
  75. package/dist/client/assets/{collection-display-button-BcUkpF_v.js → collection-display-button-BGKlaQg6.js} +1 -1
  76. package/dist/client/assets/{collection-search-BHAPWHnI.js → collection-search-CmZmXFg9.js} +1 -1
  77. package/dist/client/assets/{collection-table-wrapper-BdYy058g.js → collection-table-wrapper-EQ0EAR82.js} +1 -1
  78. package/dist/client/assets/{collection-tabs-C2b3sUGC.js → collection-tabs-CD0IUTHR.js} +1 -1
  79. package/dist/client/assets/command-7-D04uZP.js +1 -0
  80. package/dist/client/assets/commerce-onboarding-DD5G9Uzf.js +1 -0
  81. package/dist/client/assets/companions-core-Buf_Jqwn.js +1 -0
  82. package/dist/client/assets/{connect-mt7PZK23.js → connect-B2xDccis.js} +1 -1
  83. package/dist/client/assets/{connect-desktop-dialog-D8YkU7en.js → connect-desktop-dialog-Dq8ZdKBG.js} +1 -1
  84. package/dist/client/assets/{connection-DcqqsdMZ.js → connection-Nv32m8fx.js} +1 -1
  85. package/dist/client/assets/{connection-card-gNmIVtPw.js → connection-card-C5lUigNS.js} +1 -1
  86. package/dist/client/assets/{connection-detail-DmW4KPP6.js → connection-detail-C3Jl5Ege.js} +1 -1
  87. package/dist/client/assets/{connection-form-helpers-D51ifhJY.js → connection-form-helpers-OJ83nZGE.js} +1 -1
  88. package/dist/client/assets/{connections-DOuMb_P3.js → connections-B6NX5kUG.js} +1 -1
  89. package/dist/client/assets/{decopilot-sse-pool-Dlxt5BEP.js → decopilot-sse-pool-DtRbsseI.js} +1 -1
  90. package/dist/client/assets/{dialog-Dz3D1_wO.js → dialog-CS_RHIal.js} +1 -1
  91. package/dist/client/assets/{domain-settings-2cPDNbax.js → domain-settings-Bj_-Ur1-.js} +1 -1
  92. package/dist/client/assets/{drawer-DwolfiYb.js → drawer-j6CFeQ7c.js} +1 -1
  93. package/dist/client/assets/{dropdown-menu-CCCa3iK6.js → dropdown-menu-Bjv_xtsa.js} +1 -1
  94. package/dist/client/assets/{empty-state-CmIgkakh.js → empty-state-CQp4HuN2.js} +1 -1
  95. package/dist/client/assets/{extract-connection-data-fSzwYlzu.js → extract-connection-data-J7bq9VQM.js} +1 -1
  96. package/dist/client/assets/file-explorer-Dzr5LRa9.js +2 -0
  97. package/dist/client/assets/{form-DJfCxNjS.js → form-Cge63ASx.js} +1 -1
  98. package/dist/client/assets/{general-O5qrGH3R.js → general-nEFAf9VW.js} +1 -1
  99. package/dist/client/assets/github-repo-picker-Bmn_erMf.js +1 -0
  100. package/dist/client/assets/{hooks-DZ8pDEMU.js → hooks-prd75NuB.js} +1 -1
  101. package/dist/client/assets/{index-Y57kq-L5.js → index-2kBclbiN.js} +1 -1
  102. package/dist/client/assets/{index-DXYEtebX.js → index-CBkg0ddl.js} +12 -12
  103. package/dist/client/assets/{index-BN5v8iz4.js → index-CZxbgA5F.js} +1 -1
  104. package/dist/client/assets/{index-DN0HZ17-.js → index-CrsyTcKf.js} +10 -10
  105. package/dist/client/assets/{index-CJCGZQ5R.js → index-DPU3E7d-.js} +1 -1
  106. package/dist/client/assets/index-DSghpBCP.css +1 -0
  107. package/dist/client/assets/index-DmTcHcUP.js +1 -0
  108. package/dist/client/assets/index-DxCUUajA.js +8 -0
  109. package/dist/client/assets/{index-yomehP0P.js → index-PSBFJXp3.js} +1 -1
  110. package/dist/client/assets/{index-D6eTJw4X.js → index-QAj1yGbX.js} +1 -1
  111. package/dist/client/assets/{index-CLUtnbmj.js → index-ojgQlW3D.js} +1 -1
  112. package/dist/client/assets/{index-LrTAeIKk.js → index-r-uYCY4F.js} +1 -1
  113. package/dist/client/assets/{index-redirect-BZg6hpQG.js → index-redirect-CM0Ym4YC.js} +1 -1
  114. package/dist/client/assets/{input-XEOAcRsc.js → input-CNOI6m9-.js} +1 -1
  115. package/dist/client/assets/{integration-icon-DEaFeZwd.js → integration-icon-xsEISGik.js} +1 -1
  116. package/dist/client/assets/{invite-member-dialog-CJesVfEc.js → invite-member-dialog-DaJfPMd7.js} +1 -1
  117. package/dist/client/assets/{label-BFOZsQ7W.js → label-DUC31aW7.js} +1 -1
  118. package/dist/client/assets/{layout-DgxkpBY6.js → layout-BYO_bwlU.js} +1 -1
  119. package/dist/client/assets/{login-CDm7gBLo.js → login-D-xw7bNG.js} +1 -1
  120. package/dist/client/assets/{mcp-oauth-CzgpLuP3.js → mcp-oauth-r3DHtOb3.js} +1 -1
  121. package/dist/client/assets/members-DnacJSJe.js +1 -0
  122. package/dist/client/assets/{monaco-editor-CZGXNAVH.js → monaco-editor-D5amEgiv.js} +1 -1
  123. package/dist/client/assets/{monitoring-stats-row-B7QvSbVw.js → monitoring-stats-row-Cel2FVL0.js} +1 -1
  124. package/dist/client/assets/{multi-select-BewmmCC6.js → multi-select-BW6J9UxZ.js} +1 -1
  125. package/dist/client/assets/{oauth-callback-DkRj6SvC.js → oauth-callback-CPxl-uR9.js} +1 -1
  126. package/dist/client/assets/{oauth-callback-ai-provider-BT2W6ICJ.js → oauth-callback-ai-provider-DyD7-sj0.js} +1 -1
  127. package/dist/client/assets/{onboarding-d92VTgIw.js → onboarding-D5kcVORi.js} +1 -1
  128. package/dist/client/assets/{org-install-DAK6m5G4.js → org-install-EvcFJnvV.js} +1 -1
  129. package/dist/client/assets/{org-layout-Tf2KuumQ.js → org-layout-ClOm4H5J.js} +1 -1
  130. package/dist/client/assets/{organization-choice-D569ByYQ.js → organization-choice-Bp_GfWPv.js} +1 -1
  131. package/dist/client/assets/{orgs-P-A6I1t2.js → orgs-COUYW7BA.js} +1 -1
  132. package/dist/client/assets/{page-seo-form-BO5DKcpv.js → page-seo-form-CbBqzO4z.js} +1 -1
  133. package/dist/client/assets/{popover-DW5BZnQk.js → popover-Bgwc_Q1x.js} +1 -1
  134. package/dist/client/assets/post-editor-COnKbjLT.js +1 -0
  135. package/dist/client/assets/{primitives-DsNDKdM2.js → primitives-DQXNpGUI.js} +1 -1
  136. package/dist/client/assets/{profile-CY8C0xcJ.js → profile-COW-i90b.js} +1 -1
  137. package/dist/client/assets/project-app-view-Bm6H7YZo.js +1 -0
  138. package/dist/client/assets/provision-repo-scoped-github-connection-DWINBxtd.js +1 -0
  139. package/dist/client/assets/record-editor-BaUpCDVh.js +1 -0
  140. package/dist/client/assets/redirect-editor-b1Vgw9Ya.js +1 -0
  141. package/dist/client/assets/registry-TSqH-aqk.js +2 -0
  142. package/dist/client/assets/{registry-layout-ADj_q7yb.js → registry-layout-BVqaAmGp.js} +1 -1
  143. package/dist/client/assets/{reports-D14K5PzY.js → reports-Bh3b7zHB.js} +1 -1
  144. package/dist/client/assets/{require-capability-DTeTKRoi.js → require-capability-B9yaVpBc.js} +1 -1
  145. package/dist/client/assets/{required-auth-layout-_aE_8vNw.js → required-auth-layout-ssqkpP7I.js} +1 -1
  146. package/dist/client/assets/{reset-password-CkBJRrQX.js → reset-password-CvSq0GQI.js} +1 -1
  147. package/dist/client/assets/{roles-DprbKeBh.js → roles-DwNloK8b.js} +1 -1
  148. package/dist/client/assets/{search-input-DHqNzhkP.js → search-input-AxWUKdTw.js} +1 -1
  149. package/dist/client/assets/{secrets-DjtbvFOw.js → secrets-Sc3HPG1v.js} +1 -1
  150. package/dist/client/assets/{sections-editor-Dc_DVQnT.js → sections-editor-BdELmnF5.js} +2 -2
  151. package/dist/client/assets/{select-model-CPuKJnum.js → select-model-CxhiT7nj.js} +1 -1
  152. package/dist/client/assets/{select-Yp6zWcx9.js → select-nrzuayK7.js} +1 -1
  153. package/dist/client/assets/{self-tool-result-ug9uuodF.js → self-tool-result-B-416lSt.js} +1 -1
  154. package/dist/client/assets/seo-editor-BcPrV9yR.js +1 -0
  155. package/dist/client/assets/{settings-layout-CVhqy-VC.js → settings-layout-NiWCrUQC.js} +1 -1
  156. package/dist/client/assets/{settings-section-B9o0Klab.js → settings-section-BbiP48JV.js} +1 -1
  157. package/dist/client/assets/{shell-controls-B_TixGYr.js → shell-controls-DX6UTx8M.js} +1 -1
  158. package/dist/client/assets/{shell-layout-BTnJnjeQ.js → shell-layout-BsbkP0Y7.js} +1 -1
  159. package/dist/client/assets/{sidebar-CxX25qbL.js → sidebar-CxoCSS7P.js} +1 -1
  160. package/dist/client/assets/{skeleton-A0lFbrF1.js → skeleton-DiQ1kqhG.js} +1 -1
  161. package/dist/client/assets/{sso-B7_QbyEv.js → sso-D9X_EeYf.js} +1 -1
  162. package/dist/client/assets/{store-CNPMwngh.js → store-CGsUhskg.js} +1 -1
  163. package/dist/client/assets/store-registry-Zc_Xi4fE.js +2 -0
  164. package/dist/client/assets/{studio-tools-BqrxGZ2p.js → studio-tools-C7-EPYVg.js} +1 -1
  165. package/dist/client/assets/{switch-D_ktzN7d.js → switch-CtaVMESx.js} +1 -1
  166. package/dist/client/assets/{tab-id-BU58EEaT.js → tab-id-Ci2UpaIV.js} +1 -1
  167. package/dist/client/assets/{table-Dbxx_YbS.js → table-CBGqifHP.js} +1 -1
  168. package/dist/client/assets/{tabs-DzXjnb60.js → tabs-BUUFMKx_.js} +1 -1
  169. package/dist/client/assets/{textarea-Cb4jqUQ2.js → textarea-DVZgQHt1.js} +1 -1
  170. package/dist/client/assets/{toggle-group-I2EPSD2v.js → toggle-group-DjqzcDbA.js} +1 -1
  171. package/dist/client/assets/{toolbar-Dp-Wmj0k.js → toolbar-DNmduz_c.js} +1 -1
  172. package/dist/client/assets/{tooltip-BQ_WAZuK.js → tooltip-CJ7iUP_Y.js} +1 -1
  173. package/dist/client/assets/{use-ai-providers-iU2xkQ2O.js → use-ai-providers-0-lhpZRB.js} +1 -1
  174. package/dist/client/assets/{use-api-keys-OY6XnWgE.js → use-api-keys-DY6HPTKv.js} +1 -1
  175. package/dist/client/assets/{use-automations-CPsyT0np.js → use-automations-CBCHlkhE.js} +1 -1
  176. package/dist/client/assets/{use-autosave-GFZBq54v.js → use-autosave-BCSlq2P2.js} +1 -1
  177. package/dist/client/assets/{use-capability-qohmF9nn.js → use-capability-CE8fJx7X.js} +1 -1
  178. package/dist/client/assets/{use-clock-tick-hmgWGWsl.js → use-clock-tick-DX-Q9Evz.js} +1 -1
  179. package/dist/client/assets/{use-connection-BoYd4xWj.js → use-connection-BnOEK0c8.js} +1 -1
  180. package/dist/client/assets/{use-copy-B5IQD5wo.js → use-copy-BDg0jugQ.js} +1 -1
  181. package/dist/client/assets/{use-create-virtual-mcp-rPLCe07h.js → use-create-virtual-mcp-DsouaeM8.js} +1 -1
  182. package/dist/client/assets/{use-debounced-autosave-CSked4BT.js → use-debounced-autosave-BBej2o9T.js} +1 -1
  183. package/dist/client/assets/{use-debounced-value-CKMJuaC4.js → use-debounced-value-vdjmo1Vi.js} +1 -1
  184. package/dist/client/assets/use-deco-credits-DhGulFyD.js +1 -0
  185. package/dist/client/assets/{use-decopilot-events-Cqk2_6QI.js → use-decopilot-events-DXcozC_f.js} +1 -1
  186. package/dist/client/assets/{use-delete-connection-BJMsqKlT.js → use-delete-connection-CAiZ5vGA.js} +1 -1
  187. package/dist/client/assets/{use-deployment-admin-5W8wBSm2.js → use-deployment-admin-DFpsQQi3.js} +1 -1
  188. package/dist/client/assets/{use-file-configs-D7ymBTAq.js → use-file-configs-B-6dV3ii.js} +1 -1
  189. package/dist/client/assets/{use-infinite-scroll-D-lLxv4O.js → use-infinite-scroll-C5XhEC2U.js} +1 -1
  190. package/dist/client/assets/{use-join-requests-COT9B-tb.js → use-join-requests-VZGdjPGW.js} +1 -1
  191. package/dist/client/assets/{use-mcp-auth-status-Clzak56Q.js → use-mcp-auth-status-CmhwaqEe.js} +1 -1
  192. package/dist/client/assets/{use-mcp-client-DkKrtwqw.js → use-mcp-client-DvfiEO37.js} +1 -1
  193. package/dist/client/assets/{use-mcp-tools-DTNDkyz3.js → use-mcp-tools-BVz9_wLn.js} +1 -1
  194. package/dist/client/assets/{use-members-fkE7-imt.js → use-members-DspM0Xto.js} +1 -1
  195. package/dist/client/assets/{use-mobile-DbI9XSa2.js → use-mobile-Cg29r57v.js} +1 -1
  196. package/dist/client/assets/{use-navigate-to-agent-BbztfQ-r.js → use-navigate-to-agent-DS0UqOs4.js} +1 -1
  197. package/dist/client/assets/{use-org-auth-client-C7wnr8bH.js → use-org-auth-client-CV8JMAFh.js} +1 -1
  198. package/dist/client/assets/{use-org-sso-BjjzVM0-.js → use-org-sso-DTW9mwBx.js} +1 -1
  199. package/dist/client/assets/{use-organization-roles-DflmyLmz.js → use-organization-roles-DN8Wo6dG.js} +1 -1
  200. package/dist/client/assets/{use-organization-settings-DL4y3UNb.js → use-organization-settings-BDBrKj0Z.js} +1 -1
  201. package/dist/client/assets/{use-registry-connections-DUwE9JEd.js → use-registry-connections-NTS_m7o_.js} +1 -1
  202. package/dist/client/assets/{use-secrets-CbrfgedO.js → use-secrets-sk-dTiCE.js} +1 -1
  203. package/dist/client/assets/{use-status-sounds-CQaYjHaJ.js → use-status-sounds-D2ZcnZTu.js} +1 -1
  204. package/dist/client/assets/use-tags-CxpGmr4b.js +1 -0
  205. package/dist/client/assets/{use-view-mode-YBxRGbND.js → use-view-mode-CjnNgalD.js} +1 -1
  206. package/dist/client/assets/{use-virtual-mcp-DIppxANU.js → use-virtual-mcp-Ch6fa3ah.js} +1 -1
  207. package/dist/client/assets/useInfiniteQuery-DdT6iNdI.js +1 -0
  208. package/dist/client/assets/{useQueries-CkaCvHta.js → useQueries-Bga6qG7L.js} +1 -1
  209. package/dist/client/assets/{useRouterState-B_wpCODt.js → useRouterState-1asnvJ46.js} +1 -1
  210. package/dist/client/assets/useSuspenseInfiniteQuery-czMygCwl.js +1 -0
  211. package/dist/client/assets/{users-Bq5-8A27.js → users-BeITT-20.js} +1 -1
  212. package/dist/client/assets/{variant-calendar-BiH9KNVd.js → variant-calendar-DedXbl5V.js} +1 -1
  213. package/dist/client/assets/{view-mode-toggle-CUaKFbS9.js → view-mode-toggle-DhJ-VMAL.js} +1 -1
  214. package/dist/client/index.html +2 -2
  215. package/dist/server/cli.js +588 -506
  216. package/dist/server/migrate.js +114 -114
  217. package/dist/server/server.js +296 -296
  218. package/package.json +1 -1
  219. package/dist/client/assets/agents-list-C5EyN0M_.js +0 -1
  220. package/dist/client/assets/app-editor-uHzbcC0t.js +0 -1
  221. package/dist/client/assets/bulk-category-panel-ddiYQZSi.js +0 -1
  222. package/dist/client/assets/category-editor-CsivtK81.js +0 -1
  223. package/dist/client/assets/command-BOjoL7KJ.js +0 -1
  224. package/dist/client/assets/commerce-onboarding-Lfg6Nrj1.js +0 -1
  225. package/dist/client/assets/companions-core-CkP-CzhI.js +0 -1
  226. package/dist/client/assets/file-explorer-BbVx8dmM.js +0 -2
  227. package/dist/client/assets/github-repo-picker-BKfGOdTN.js +0 -1
  228. package/dist/client/assets/github-repo-scope-CKSTLD3W.js +0 -1
  229. package/dist/client/assets/index-DZpEhuMO.css +0 -1
  230. package/dist/client/assets/index-cq6NO4Rp.js +0 -1
  231. package/dist/client/assets/index-i-X9wjOr.js +0 -8
  232. package/dist/client/assets/members-FMYFRXVJ.js +0 -1
  233. package/dist/client/assets/post-editor-9r5syJmm.js +0 -1
  234. package/dist/client/assets/project-app-view-DXpn4ZL1.js +0 -1
  235. package/dist/client/assets/provision-repo-scoped-github-connection-Dp638N7g.js +0 -1
  236. package/dist/client/assets/record-editor-8RnPHK0f.js +0 -1
  237. package/dist/client/assets/redirect-editor-DR8alk4U.js +0 -1
  238. package/dist/client/assets/registry-BA9HrlAV.js +0 -2
  239. package/dist/client/assets/seo-editor-CGrYD_65.js +0 -1
  240. package/dist/client/assets/store-registry-U7_ArY0F.js +0 -2
  241. package/dist/client/assets/use-deco-credits-DJeLvChW.js +0 -1
  242. package/dist/client/assets/use-registry-app-lFKqXb7f.js +0 -1
  243. package/dist/client/assets/useInfiniteQuery-C7mkHXX2.js +0 -1
  244. package/dist/client/assets/useSuspenseInfiniteQuery-BXwdn9yf.js +0 -1
@@ -1 +1 @@
1
- import{c as j,b as q,j as t,f as D,F as K,m as z,y as U,L as T,p as E,P as G,a as B,k as V,r as X,O as Y}from"./index-DN0HZ17-.js";import{u as Z}from"./useRouterState-B_wpCODt.js";import{j as ee,k as se,l as te,S as M,a as O,b as L,d as I,c as R,g as ie,h as ne}from"./sidebar-CxX25qbL.js";import{a as le}from"./index-CLUtnbmj.js";import{n as re,i as oe,a as ae,c as ce,b as me}from"./ZapSquare-Ck-0YfX2.js";import{t as fe,a as A}from"./Users03-CZYN5l0S.js";import{i as de}from"./HardDrive-CsEwwTgZ.js";import{i as xe}from"./Key01-TTyZsvW1.js";import{n as be}from"./LinkExternal01-MkOU1z3r.js";import{i as F}from"./LogOut01-CCOGBiwE.js";import{i as ue}from"./Shield01-BzQVyqUc.js";import{s as ge}from"./User01-Bs_7qy3O.js";import{i as he}from"./Zap-Hg4YL285.js";import{a as pe}from"./use-capability-qohmF9nn.js";import{u as je}from"./use-join-requests-COT9B-tb.js";import{u as H}from"./use-mobile-DbI9XSa2.js";import{u as ye}from"./use-status-sounds-CQaYjHaJ.js";import{a as _}from"./toolbar-Dp-Wmj0k.js";import{S as _e,M as ve}from"./shell-controls-B_TixGYr.js";import"./LayoutLeft-B9EFHxoy.js";import"./X-C817Fvj3.js";import"./tooltip-BQ_WAZuK.js";import"./studio-tools-BqrxGZ2p.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-Cqk2_6QI.js";import"./decopilot-sse-pool-Dlxt5BEP.js";import"./backoff-CrEUbyZT.js";function J(){const e=j.c(23),s=q(),{capabilities:o,isPrivileged:n,loading:i,error:l}=pe(),a=je().length;let r,c;if(e[0]!==o||e[1]!==l||e[2]!==n||e[3]!==a||e[4]!==i||e[5]!==s){c=Symbol.for("react.early_return_sentinel");e:{let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(fe,{size:14}),e[8]=m):m=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(be,{size:14}),e[9]=f):f=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(re,{size:14}),e[10]=d):d=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(oe,{size:14}),e[11]=x):x=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(xe,{size:14}),e[12]=b):b=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(de,{size:14}),e[13]=g):g=e[13];let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(ae,{size:14}),e[14]=h):h=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(A,{size:14}),e[15]=u):u=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(he,{size:14}),e[16]=y):y=e[16];let p;e[17]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(ce,{size:14}),e[17]=p):p=e[17];let v;e[18]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(me,{size:14}),e[18]=v):v=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(A,{size:14}),e[19]=S):S=e[19];let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(ue,{size:14}),e[20]=k):k=e[20];let N;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(U,{size:14}),e[21]=N):N=e[21];let $;e[22]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(ge,{size:14}),e[22]=$):$=e[22];const w=[{key:"organization",label:s("settings.nav.organization"),items:[{key:"general",label:s("settings.nav.general"),icon:m,to:"/$org/settings/general",requires:"org:manage"},{key:"connect",label:"Connect to clients",icon:f,to:"/$org/settings/connect"},{key:"brand-context",label:s("settings.nav.brandContext"),icon:d,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:s("settings.nav.aiProviders"),icon:x,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:s("settings.nav.secrets"),icon:b,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:s("settings.nav.buckets"),icon:g,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{key:"build",label:s("settings.nav.build"),items:[{key:"connections",label:s("settings.nav.connections"),icon:h,to:"/$org/settings/connections"},{key:"agents",label:s("settings.nav.agents"),icon:u,to:"/$org/settings/agents"},{key:"automations",label:s("settings.nav.automations"),icon:y,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:s("settings.nav.store"),icon:p,to:"/$org/settings/store",requires:"registry:manage"}]},{key:"manage",label:s("settings.nav.manage"),items:[{key:"monitor",label:s("settings.nav.monitor"),icon:v,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:s("settings.nav.members"),icon:S,to:"/$org/settings/members",requires:"members:manage",badge:a},{key:"roles",label:s("settings.nav.roles"),icon:k,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:s("settings.nav.security"),icon:N,to:"/$org/settings/sso",requires:"org:manage"}]},{key:"account",label:s("settings.nav.account"),items:[{key:"profile",label:s("settings.nav.profile"),icon:$,to:"/$org/settings/profile"}]}];if(i||l){c=w;break e}r=w.map(P=>({...P,items:P.items.filter(C=>C.privilegedOnly?n:C.requires?n||o[C.requires]:!0)})).filter(Se)}e[0]=o,e[1]=l,e[2]=n,e[3]=a,e[4]=i,e[5]=s,e[6]=r,e[7]=c}else r=e[6],c=e[7];return c!==Symbol.for("react.early_return_sentinel")?c:r}function Se(e){return e.items.length>0}function Q(e){const s=j.c(5),{icon:o,badge:n}=e;let i;s[0]!==n?(i=n?t.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,s[0]=n,s[1]=i):i=s[1];let l;return s[2]!==o||s[3]!==i?(l=t.jsxs("span",{className:"relative shrink-0",children:[o,i]}),s[2]=o,s[3]=i,s[4]=l):l=s[4],l}function W(){const e=j.c(8);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=D(s);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={select:ke},e[1]=n):n=e[1];const i=Z(n);let l;e[2]!==o||e[3]!==i?(l=c=>{const m=c.replace("$org",o);return i.startsWith(m)},e[2]=o,e[3]=i,e[4]=l):l=e[4];const a=l;let r;return e[5]!==a||e[6]!==o?(r={org:o,isActive:a},e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ke(e){return e.location.pathname}function Ne(){const e=j.c(19),s=q(),o=J(),{org:n,isActive:i}=W();let l;if(e[0]!==o||e[1]!==i||e[2]!==n){let b;e[4]!==i||e[5]!==n?(b=(g,h)=>t.jsxs(M,{className:"pt-0 pr-0 pb-0 pl-0",children:[g.label&&t.jsx("p",{className:z("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",h>0&&"mt-3"),children:g.label}),t.jsx(O,{children:t.jsx(L,{className:"gap-0.5",children:g.items.map(u=>t.jsx(I,{children:t.jsx(R,{asChild:!0,isActive:i(u.to),children:t.jsxs(T,{to:u.to,params:{org:n},onClick:()=>E("settings_nav_clicked",{section_key:u.key,group_key:g.key}),className:"flex items-center gap-2.5 text-sm",children:[t.jsx(Q,{icon:u.icon,badge:u.badge}),t.jsx("span",{className:"truncate",children:u.label})]})})},u.key))})})]},g.key),e[4]=i,e[5]=n,e[6]=b):b=e[6],l=o.map(b),e[0]=o,e[1]=i,e[2]=n,e[3]=l}else l=e[3];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[7]=a):a=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("span",{className:"shrink-0",children:t.jsx(F,{size:14})}),e[8]=r):r=e[8];let c;e[9]!==s?(c=s("settings.nav.signOut"),e[9]=s,e[10]=c):c=e[10];let m;e[11]!==c?(m=t.jsxs(M,{className:"pt-0 pr-0 pb-0 pl-0",children:[a,t.jsx(O,{children:t.jsx(L,{className:"gap-0.5",children:t.jsx(I,{children:t.jsxs(R,{onClick:$e,className:"flex items-center gap-2.5 text-sm",children:[r,t.jsx("span",{className:"truncate",children:c})]})})})})]}),e[11]=c,e[12]=m):m=e[12];let f;e[13]!==l||e[14]!==m?(f=t.jsxs(ie,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[l,m]}),e[13]=l,e[14]=m,e[15]=f):f=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"mt-auto px-4 pb-1",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.143.1"]})}),e[16]=d):d=e[16];let x;return e[17]!==f?(x=t.jsxs(ne,{variant:"sidebar",children:[f,d]}),e[17]=f,e[18]=x):x=e[18],x}function $e(){E("signed_out",{source:"settings_sidebar"}),G(),B.signOut()}function ze(e){const s=j.c(21),{onClose:o}=e,n=q(),i=J(),{org:l,isActive:a}=W();let r;if(s[0]!==i||s[1]!==a||s[2]!==o||s[3]!==l){let h;s[5]!==a||s[6]!==o||s[7]!==l?(h=(u,y)=>t.jsxs("div",{className:"flex flex-col gap-0.5",children:[u.label&&t.jsx("p",{className:z("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",y>0&&"mt-3"),children:u.label}),u.items.map(p=>t.jsxs(T,{to:p.to,params:{org:l},onClick:o,className:z("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",a(p.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[t.jsx(Q,{icon:p.icon,badge:p.badge}),t.jsx("span",{className:"truncate",children:p.label})]},p.key))]},u.key),s[5]=a,s[6]=o,s[7]=l,s[8]=h):h=s[8],r=i.map(h),s[0]=i,s[1]=a,s[2]=o,s[3]=l,s[4]=r}else r=s[4];let c;s[9]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"h-px bg-border/50 my-2"}),s[9]=c):c=s[9];let m;s[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("span",{className:"shrink-0",children:t.jsx(F,{size:14})}),s[10]=m):m=s[10];let f;s[11]!==n?(f=n("settings.nav.signOut"),s[11]=n,s[12]=f):f=s[12];let d;s[13]!==f?(d=t.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,t.jsxs("button",{type:"button",onClick:Ce,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[m,t.jsx("span",{className:"truncate",children:f})]})]}),s[13]=f,s[14]=d):d=s[14];let x;s[15]!==r||s[16]!==d?(x=t.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[r,d]}),s[15]=r,s[16]=d,s[17]=x):x=s[17];let b;s[18]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.143.1"]})}),s[18]=b):b=s[18];let g;return s[19]!==x?(g=t.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[x,b]}),s[19]=x,s[20]=g):g=s[20],g}function Ce(){G(),B.signOut()}function qe(){const e=j.c(4),s=H(),{org:o}=K();ye(o.slug);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(V,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=n):n=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(X.Suspense,{fallback:n,children:t.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:t.jsx(le,{value:"p-0",children:t.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:t.jsx(Y,{})})})})}),e[1]=i):i=e[1];const l=i;if(s){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:l}),e[2]=r):r=e[2],r}let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex-1 min-h-0 p-1",children:t.jsx("div",{className:z("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:l})}),e[3]=a):a=e[3],a}function ns(){const e=j.c(21),s=H();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(_.LogoLink,{}),e[0]=o):o=e[0];let n;e[1]!==s?(n=s&&t.jsx(_e,{}),e[1]=s,e[2]=n):n=e[2];let i;e[3]!==n?(i=t.jsxs(_.LeftColumn,{children:[o,n]}),e[3]=n,e[4]=i):i=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(_.CenterSlot,{}),e[5]=l):l=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(_.RightColumn,{children:t.jsx("span",{})}),e[6]=a):a=e[6];let r;e[7]!==i?(r=t.jsxs(_.Header,{children:[i,l,a]}),e[7]=i,e[8]=r):r=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c={"--sidebar-width-icon":"3.125rem"},e[9]=c):c=e[9];let m;e[10]!==s?(m=!s&&t.jsx(Ne,{}),e[10]=s,e[11]=m):m=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ee,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:t.jsx(qe,{})}),e[12]=f):f=e[12];let d;e[13]!==m?(d=t.jsxs(se,{className:"flex-1 bg-sidebar min-h-0",style:c,children:[m,f]}),e[13]=m,e[14]=d):d=e[14];let x;e[15]!==s?(x=s&&t.jsx(ve,{renderSidebar:we}),e[15]=s,e[16]=x):x=e[16];let b;return e[17]!==x||e[18]!==r||e[19]!==d?(b=t.jsx(_.Provider,{children:t.jsx(te,{defaultOpen:!0,children:t.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[r,d,x]})})}),e[17]=x,e[18]=r,e[19]=d,e[20]=b):b=e[20],b}function we(e){const{onClose:s}=e;return t.jsx(ze,{onClose:s})}export{Ne as SettingsSidebar,ze as SettingsSidebarMobile,ns as default};
1
+ import{c as j,b as q,j as t,f as D,F as K,m as z,y as U,L as T,p as E,P as G,a as B,k as V,r as X,O as Y}from"./index-CrsyTcKf.js";import{u as Z}from"./useRouterState-1asnvJ46.js";import{j as ee,k as se,l as te,S as M,a as O,b as L,d as I,c as R,g as ie,h as ne}from"./sidebar-CxoCSS7P.js";import{a as le}from"./index-ojgQlW3D.js";import{n as re,i as oe,a as ae,c as ce,b as me}from"./ZapSquare-B76IRv2t.js";import{t as fe,a as A}from"./Users03-CH4iz8WK.js";import{i as de}from"./HardDrive-D6kRY6FP.js";import{i as xe}from"./Key01-NWi-qdwk.js";import{n as be}from"./LinkExternal01-B843-euO.js";import{i as F}from"./LogOut01-BTIuunKz.js";import{i as ue}from"./Shield01-CTgR0GxW.js";import{s as ge}from"./User01-BzHjHKhU.js";import{i as he}from"./Zap-ns7J8qo9.js";import{a as pe}from"./use-capability-CE8fJx7X.js";import{u as je}from"./use-join-requests-VZGdjPGW.js";import{u as H}from"./use-mobile-Cg29r57v.js";import{u as ye}from"./use-status-sounds-D2ZcnZTu.js";import{a as _}from"./toolbar-DNmduz_c.js";import{S as _e,M as ve}from"./shell-controls-DX6UTx8M.js";import"./LayoutLeft-B2Qy9IsH.js";import"./X-4rHxalja.js";import"./tooltip-CJ7iUP_Y.js";import"./studio-tools-C7-EPYVg.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-DXcozC_f.js";import"./decopilot-sse-pool-DtRbsseI.js";import"./backoff-CrEUbyZT.js";function J(){const e=j.c(23),s=q(),{capabilities:o,isPrivileged:n,loading:i,error:l}=pe(),a=je().length;let r,c;if(e[0]!==o||e[1]!==l||e[2]!==n||e[3]!==a||e[4]!==i||e[5]!==s){c=Symbol.for("react.early_return_sentinel");e:{let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(fe,{size:14}),e[8]=m):m=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(be,{size:14}),e[9]=f):f=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(re,{size:14}),e[10]=d):d=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(oe,{size:14}),e[11]=x):x=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(xe,{size:14}),e[12]=b):b=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(de,{size:14}),e[13]=g):g=e[13];let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(ae,{size:14}),e[14]=h):h=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(A,{size:14}),e[15]=u):u=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(he,{size:14}),e[16]=y):y=e[16];let p;e[17]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(ce,{size:14}),e[17]=p):p=e[17];let v;e[18]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(me,{size:14}),e[18]=v):v=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(A,{size:14}),e[19]=S):S=e[19];let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(ue,{size:14}),e[20]=k):k=e[20];let N;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(U,{size:14}),e[21]=N):N=e[21];let $;e[22]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(ge,{size:14}),e[22]=$):$=e[22];const w=[{key:"organization",label:s("settings.nav.organization"),items:[{key:"general",label:s("settings.nav.general"),icon:m,to:"/$org/settings/general",requires:"org:manage"},{key:"connect",label:"Connect to clients",icon:f,to:"/$org/settings/connect"},{key:"brand-context",label:s("settings.nav.brandContext"),icon:d,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:s("settings.nav.aiProviders"),icon:x,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:s("settings.nav.secrets"),icon:b,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:s("settings.nav.buckets"),icon:g,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{key:"build",label:s("settings.nav.build"),items:[{key:"connections",label:s("settings.nav.connections"),icon:h,to:"/$org/settings/connections"},{key:"agents",label:s("settings.nav.agents"),icon:u,to:"/$org/settings/agents"},{key:"automations",label:s("settings.nav.automations"),icon:y,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:s("settings.nav.store"),icon:p,to:"/$org/settings/store",requires:"registry:manage"}]},{key:"manage",label:s("settings.nav.manage"),items:[{key:"monitor",label:s("settings.nav.monitor"),icon:v,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:s("settings.nav.members"),icon:S,to:"/$org/settings/members",requires:"members:manage",badge:a},{key:"roles",label:s("settings.nav.roles"),icon:k,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:s("settings.nav.security"),icon:N,to:"/$org/settings/sso",requires:"org:manage"}]},{key:"account",label:s("settings.nav.account"),items:[{key:"profile",label:s("settings.nav.profile"),icon:$,to:"/$org/settings/profile"}]}];if(i||l){c=w;break e}r=w.map(P=>({...P,items:P.items.filter(C=>C.privilegedOnly?n:C.requires?n||o[C.requires]:!0)})).filter(Se)}e[0]=o,e[1]=l,e[2]=n,e[3]=a,e[4]=i,e[5]=s,e[6]=r,e[7]=c}else r=e[6],c=e[7];return c!==Symbol.for("react.early_return_sentinel")?c:r}function Se(e){return e.items.length>0}function Q(e){const s=j.c(5),{icon:o,badge:n}=e;let i;s[0]!==n?(i=n?t.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,s[0]=n,s[1]=i):i=s[1];let l;return s[2]!==o||s[3]!==i?(l=t.jsxs("span",{className:"relative shrink-0",children:[o,i]}),s[2]=o,s[3]=i,s[4]=l):l=s[4],l}function W(){const e=j.c(8);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=D(s);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={select:ke},e[1]=n):n=e[1];const i=Z(n);let l;e[2]!==o||e[3]!==i?(l=c=>{const m=c.replace("$org",o);return i.startsWith(m)},e[2]=o,e[3]=i,e[4]=l):l=e[4];const a=l;let r;return e[5]!==a||e[6]!==o?(r={org:o,isActive:a},e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ke(e){return e.location.pathname}function Ne(){const e=j.c(19),s=q(),o=J(),{org:n,isActive:i}=W();let l;if(e[0]!==o||e[1]!==i||e[2]!==n){let b;e[4]!==i||e[5]!==n?(b=(g,h)=>t.jsxs(M,{className:"pt-0 pr-0 pb-0 pl-0",children:[g.label&&t.jsx("p",{className:z("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",h>0&&"mt-3"),children:g.label}),t.jsx(O,{children:t.jsx(L,{className:"gap-0.5",children:g.items.map(u=>t.jsx(I,{children:t.jsx(R,{asChild:!0,isActive:i(u.to),children:t.jsxs(T,{to:u.to,params:{org:n},onClick:()=>E("settings_nav_clicked",{section_key:u.key,group_key:g.key}),className:"flex items-center gap-2.5 text-sm",children:[t.jsx(Q,{icon:u.icon,badge:u.badge}),t.jsx("span",{className:"truncate",children:u.label})]})})},u.key))})})]},g.key),e[4]=i,e[5]=n,e[6]=b):b=e[6],l=o.map(b),e[0]=o,e[1]=i,e[2]=n,e[3]=l}else l=e[3];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[7]=a):a=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("span",{className:"shrink-0",children:t.jsx(F,{size:14})}),e[8]=r):r=e[8];let c;e[9]!==s?(c=s("settings.nav.signOut"),e[9]=s,e[10]=c):c=e[10];let m;e[11]!==c?(m=t.jsxs(M,{className:"pt-0 pr-0 pb-0 pl-0",children:[a,t.jsx(O,{children:t.jsx(L,{className:"gap-0.5",children:t.jsx(I,{children:t.jsxs(R,{onClick:$e,className:"flex items-center gap-2.5 text-sm",children:[r,t.jsx("span",{className:"truncate",children:c})]})})})})]}),e[11]=c,e[12]=m):m=e[12];let f;e[13]!==l||e[14]!==m?(f=t.jsxs(ie,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[l,m]}),e[13]=l,e[14]=m,e[15]=f):f=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"mt-auto px-4 pb-1",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.145.0"]})}),e[16]=d):d=e[16];let x;return e[17]!==f?(x=t.jsxs(ne,{variant:"sidebar",children:[f,d]}),e[17]=f,e[18]=x):x=e[18],x}function $e(){E("signed_out",{source:"settings_sidebar"}),G(),B.signOut()}function ze(e){const s=j.c(21),{onClose:o}=e,n=q(),i=J(),{org:l,isActive:a}=W();let r;if(s[0]!==i||s[1]!==a||s[2]!==o||s[3]!==l){let h;s[5]!==a||s[6]!==o||s[7]!==l?(h=(u,y)=>t.jsxs("div",{className:"flex flex-col gap-0.5",children:[u.label&&t.jsx("p",{className:z("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",y>0&&"mt-3"),children:u.label}),u.items.map(p=>t.jsxs(T,{to:p.to,params:{org:l},onClick:o,className:z("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",a(p.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[t.jsx(Q,{icon:p.icon,badge:p.badge}),t.jsx("span",{className:"truncate",children:p.label})]},p.key))]},u.key),s[5]=a,s[6]=o,s[7]=l,s[8]=h):h=s[8],r=i.map(h),s[0]=i,s[1]=a,s[2]=o,s[3]=l,s[4]=r}else r=s[4];let c;s[9]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"h-px bg-border/50 my-2"}),s[9]=c):c=s[9];let m;s[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("span",{className:"shrink-0",children:t.jsx(F,{size:14})}),s[10]=m):m=s[10];let f;s[11]!==n?(f=n("settings.nav.signOut"),s[11]=n,s[12]=f):f=s[12];let d;s[13]!==f?(d=t.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,t.jsxs("button",{type:"button",onClick:Ce,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[m,t.jsx("span",{className:"truncate",children:f})]})]}),s[13]=f,s[14]=d):d=s[14];let x;s[15]!==r||s[16]!==d?(x=t.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[r,d]}),s[15]=r,s[16]=d,s[17]=x):x=s[17];let b;s[18]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.145.0"]})}),s[18]=b):b=s[18];let g;return s[19]!==x?(g=t.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[x,b]}),s[19]=x,s[20]=g):g=s[20],g}function Ce(){G(),B.signOut()}function qe(){const e=j.c(4),s=H(),{org:o}=K();ye(o.slug);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(V,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=n):n=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(X.Suspense,{fallback:n,children:t.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:t.jsx(le,{value:"p-0",children:t.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:t.jsx(Y,{})})})})}),e[1]=i):i=e[1];const l=i;if(s){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:l}),e[2]=r):r=e[2],r}let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex-1 min-h-0 p-1",children:t.jsx("div",{className:z("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:l})}),e[3]=a):a=e[3],a}function ns(){const e=j.c(21),s=H();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(_.LogoLink,{}),e[0]=o):o=e[0];let n;e[1]!==s?(n=s&&t.jsx(_e,{}),e[1]=s,e[2]=n):n=e[2];let i;e[3]!==n?(i=t.jsxs(_.LeftColumn,{children:[o,n]}),e[3]=n,e[4]=i):i=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(_.CenterSlot,{}),e[5]=l):l=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(_.RightColumn,{children:t.jsx("span",{})}),e[6]=a):a=e[6];let r;e[7]!==i?(r=t.jsxs(_.Header,{children:[i,l,a]}),e[7]=i,e[8]=r):r=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c={"--sidebar-width-icon":"3.125rem"},e[9]=c):c=e[9];let m;e[10]!==s?(m=!s&&t.jsx(Ne,{}),e[10]=s,e[11]=m):m=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ee,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:t.jsx(qe,{})}),e[12]=f):f=e[12];let d;e[13]!==m?(d=t.jsxs(se,{className:"flex-1 bg-sidebar min-h-0",style:c,children:[m,f]}),e[13]=m,e[14]=d):d=e[14];let x;e[15]!==s?(x=s&&t.jsx(ve,{renderSidebar:we}),e[15]=s,e[16]=x):x=e[16];let b;return e[17]!==x||e[18]!==r||e[19]!==d?(b=t.jsx(_.Provider,{children:t.jsx(te,{defaultOpen:!0,children:t.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[r,d,x]})})}),e[17]=x,e[18]=r,e[19]=d,e[20]=b):b=e[20],b}function we(e){const{onClose:s}=e;return t.jsx(ze,{onClose:s})}export{Ne as SettingsSidebar,ze as SettingsSidebarMobile,ns as default};
@@ -1 +1 @@
1
- import{c as v,m as N,j as r,r as S}from"./index-DN0HZ17-.js";import{C as w}from"./card-YiZHzhvM.js";import{i as E}from"./ArrowUpRight-BMajILyG.js";function I(c){const e=v.c(12),{title:i,description:l,docsHref:t,actions:s,className:n,headerClassName:a,children:d}=c;let m;e[0]!==n?(m=N("flex flex-col gap-3",n),e[0]=n,e[1]=m):m=e[1];let f;e[2]!==s||e[3]!==l||e[4]!==t||e[5]!==a||e[6]!==i?(f=(i||l||t||s)&&r.jsxs("div",{className:N("flex items-center justify-between gap-3 px-4",a),children:[r.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[i&&r.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:i}),(l||t)&&r.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[l,t&&r.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",r.jsx(E,{size:12})]})]})]}),s&&r.jsx("div",{className:"shrink-0",children:s})]}),e[2]=s,e[3]=l,e[4]=t,e[5]=a,e[6]=i,e[7]=f):f=e[7];let o;return e[8]!==d||e[9]!==m||e[10]!==f?(o=r.jsxs("section",{className:m,children:[f,d]}),e[8]=d,e[9]=m,e[10]=f,e[11]=o):o=e[11],o}function P(c){const e=v.c(11),{className:i,children:l}=c;let t,s,n;if(e[0]!==l||e[1]!==i){const d=S.Children.toArray(l).filter(S.isValidElement);t=w,e[5]!==i?(s=N("p-0 gap-0 overflow-hidden",i),e[5]=i,e[6]=s):s=e[6],n=d.map($),e[0]=l,e[1]=i,e[2]=t,e[3]=s,e[4]=n}else t=e[2],s=e[3],n=e[4];let a;return e[7]!==t||e[8]!==s||e[9]!==n?(a=r.jsx(t,{className:s,children:n}),e[7]=t,e[8]=s,e[9]=n,e[10]=a):a=e[10],a}function $(c,e){return r.jsxs("div",{children:[e>0&&r.jsx("div",{className:"h-px bg-border mx-5"}),c]},e)}function R(c){const e=v.c(27),{icon:i,title:l,description:t,action:s,onClick:n,className:a,children:d}=c,m=d?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",f=n&&"hover:bg-muted/50 cursor-pointer";let o;e[0]!==a||e[1]!==m||e[2]!==f?(o=N(m,f,a),e[0]=a,e[1]=m,e[2]=f,e[3]=o):o=e[3];const b=n?"button":void 0,C=n?0:void 0;let x;e[4]!==n?(x=n?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),n())}:void 0,e[4]=n,e[5]=x):x=e[5];let p;e[6]!==i?(p=i&&r.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:i}),e[6]=i,e[7]=p):p=e[7];let u;e[8]!==l?(u=r.jsx("div",{className:"text-sm font-medium",children:l}),e[8]=l,e[9]=u):u=e[9];let h;e[10]!==t?(h=t&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:t}),e[10]=t,e[11]=h):h=e[11];let g;e[12]!==d||e[13]!==u||e[14]!==h?(g=r.jsxs("div",{className:"flex-1 min-w-0",children:[u,h,d]}),e[12]=d,e[13]=u,e[14]=h,e[15]=g):g=e[15];let j;e[16]!==s?(j=s&&r.jsx("div",{className:"shrink-0",onClick:D,children:s}),e[16]=s,e[17]=j):j=e[17];let y;return e[18]!==n||e[19]!==g||e[20]!==j||e[21]!==o||e[22]!==b||e[23]!==C||e[24]!==x||e[25]!==p?(y=r.jsxs("div",{className:o,onClick:n,role:b,tabIndex:C,onKeyDown:x,children:[p,g,j]}),e[18]=n,e[19]=g,e[20]=j,e[21]=o,e[22]=b,e[23]=C,e[24]=x,e[25]=p,e[26]=y):y=e[26],y}function D(c){return c.stopPropagation()}function H(c){const e=v.c(5),{children:i,className:l}=c;let t;e[0]!==l?(t=N("flex items-center justify-end gap-2 px-4 py-4",l),e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t?(s=r.jsx("div",{className:t,children:i}),e[2]=i,e[3]=t,e[4]=s):s=e[4],s}function K(c){const e=v.c(5),{className:i,children:l}=c;let t;e[0]!==i?(t=N("flex flex-col gap-10",i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==l||e[3]!==t?(s=r.jsx("div",{className:t,children:l}),e[2]=l,e[3]=t,e[4]=s):s=e[4],s}export{I as S,P as a,R as b,K as c,H as d};
1
+ import{c as v,m as N,j as r,r as S}from"./index-CrsyTcKf.js";import{C as w}from"./card-DmHlzhtm.js";import{i as E}from"./ArrowUpRight-gsGGZTp8.js";function I(c){const e=v.c(12),{title:i,description:l,docsHref:t,actions:s,className:n,headerClassName:a,children:d}=c;let m;e[0]!==n?(m=N("flex flex-col gap-3",n),e[0]=n,e[1]=m):m=e[1];let f;e[2]!==s||e[3]!==l||e[4]!==t||e[5]!==a||e[6]!==i?(f=(i||l||t||s)&&r.jsxs("div",{className:N("flex items-center justify-between gap-3 px-4",a),children:[r.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[i&&r.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:i}),(l||t)&&r.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[l,t&&r.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",r.jsx(E,{size:12})]})]})]}),s&&r.jsx("div",{className:"shrink-0",children:s})]}),e[2]=s,e[3]=l,e[4]=t,e[5]=a,e[6]=i,e[7]=f):f=e[7];let o;return e[8]!==d||e[9]!==m||e[10]!==f?(o=r.jsxs("section",{className:m,children:[f,d]}),e[8]=d,e[9]=m,e[10]=f,e[11]=o):o=e[11],o}function P(c){const e=v.c(11),{className:i,children:l}=c;let t,s,n;if(e[0]!==l||e[1]!==i){const d=S.Children.toArray(l).filter(S.isValidElement);t=w,e[5]!==i?(s=N("p-0 gap-0 overflow-hidden",i),e[5]=i,e[6]=s):s=e[6],n=d.map($),e[0]=l,e[1]=i,e[2]=t,e[3]=s,e[4]=n}else t=e[2],s=e[3],n=e[4];let a;return e[7]!==t||e[8]!==s||e[9]!==n?(a=r.jsx(t,{className:s,children:n}),e[7]=t,e[8]=s,e[9]=n,e[10]=a):a=e[10],a}function $(c,e){return r.jsxs("div",{children:[e>0&&r.jsx("div",{className:"h-px bg-border mx-5"}),c]},e)}function R(c){const e=v.c(27),{icon:i,title:l,description:t,action:s,onClick:n,className:a,children:d}=c,m=d?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",f=n&&"hover:bg-muted/50 cursor-pointer";let o;e[0]!==a||e[1]!==m||e[2]!==f?(o=N(m,f,a),e[0]=a,e[1]=m,e[2]=f,e[3]=o):o=e[3];const b=n?"button":void 0,C=n?0:void 0;let x;e[4]!==n?(x=n?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),n())}:void 0,e[4]=n,e[5]=x):x=e[5];let p;e[6]!==i?(p=i&&r.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:i}),e[6]=i,e[7]=p):p=e[7];let u;e[8]!==l?(u=r.jsx("div",{className:"text-sm font-medium",children:l}),e[8]=l,e[9]=u):u=e[9];let h;e[10]!==t?(h=t&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:t}),e[10]=t,e[11]=h):h=e[11];let g;e[12]!==d||e[13]!==u||e[14]!==h?(g=r.jsxs("div",{className:"flex-1 min-w-0",children:[u,h,d]}),e[12]=d,e[13]=u,e[14]=h,e[15]=g):g=e[15];let j;e[16]!==s?(j=s&&r.jsx("div",{className:"shrink-0",onClick:D,children:s}),e[16]=s,e[17]=j):j=e[17];let y;return e[18]!==n||e[19]!==g||e[20]!==j||e[21]!==o||e[22]!==b||e[23]!==C||e[24]!==x||e[25]!==p?(y=r.jsxs("div",{className:o,onClick:n,role:b,tabIndex:C,onKeyDown:x,children:[p,g,j]}),e[18]=n,e[19]=g,e[20]=j,e[21]=o,e[22]=b,e[23]=C,e[24]=x,e[25]=p,e[26]=y):y=e[26],y}function D(c){return c.stopPropagation()}function H(c){const e=v.c(5),{children:i,className:l}=c;let t;e[0]!==l?(t=N("flex items-center justify-end gap-2 px-4 py-4",l),e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t?(s=r.jsx("div",{className:t,children:i}),e[2]=i,e[3]=t,e[4]=s):s=e[4],s}function K(c){const e=v.c(5),{className:i,children:l}=c;let t;e[0]!==i?(t=N("flex flex-col gap-10",i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==l||e[3]!==t?(s=r.jsx("div",{className:t,children:l}),e[2]=l,e[3]=t,e[4]=s):s=e[4],s}export{I as S,P as a,R as b,K as c,H as d};
@@ -1 +1 @@
1
- import{c as p,b,j as m}from"./index-DN0HZ17-.js";import{u as d,m as h,p as S,q as x}from"./sidebar-CxX25qbL.js";import{i as g}from"./LayoutLeft-B9EFHxoy.js";import{T as j}from"./toolbar-Dp-Wmj0k.js";function B(u){const e=p.c(7),{className:l}=u,n=b(),{toggleSidebar:i}=d();let t;e[0]!==n?(t=n("layouts.shellControls.toggleSidebar"),e[0]=n,e[1]=t):t=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=m.jsx(g,{size:16}),e[2]=s):s=e[2];let o;return e[3]!==l||e[4]!==t||e[5]!==i?(o=m.jsx(j,{onClick:i,"aria-label":t,className:l,children:s}),e[3]=l,e[4]=t,e[5]=i,e[6]=o):o=e[6],o}function N(u){const e=p.c(16),{renderSidebar:l}=u,n=b(),{openMobile:i,setOpenMobile:t}=d();let s;e[0]!==n?(s=n("layouts.shellControls.navigationTitle"),e[0]=n,e[1]=s):s=e[1];let o;e[2]!==s?(o=m.jsx(h,{className:"sr-only",children:s}),e[2]=s,e[3]=o):o=e[3];let r;e[4]!==t?(r=()=>t(!1),e[4]=t,e[5]=r):r=e[5];let a;e[6]!==l||e[7]!==r?(a=l({onClose:r}),e[6]=l,e[7]=r,e[8]=a):a=e[8];let c;e[9]!==o||e[10]!==a?(c=m.jsxs(S,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[o,a]}),e[9]=o,e[10]=a,e[11]=c):c=e[11];let f;return e[12]!==i||e[13]!==t||e[14]!==c?(f=m.jsx(x,{open:i,onOpenChange:t,children:c}),e[12]=i,e[13]=t,e[14]=c,e[15]=f):f=e[15],f}export{N as M,B as S};
1
+ import{c as p,b,j as m}from"./index-CrsyTcKf.js";import{u as d,m as h,p as S,q as x}from"./sidebar-CxoCSS7P.js";import{i as g}from"./LayoutLeft-B2Qy9IsH.js";import{T as j}from"./toolbar-DNmduz_c.js";function B(u){const e=p.c(7),{className:l}=u,n=b(),{toggleSidebar:i}=d();let t;e[0]!==n?(t=n("layouts.shellControls.toggleSidebar"),e[0]=n,e[1]=t):t=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=m.jsx(g,{size:16}),e[2]=s):s=e[2];let o;return e[3]!==l||e[4]!==t||e[5]!==i?(o=m.jsx(j,{onClick:i,"aria-label":t,className:l,children:s}),e[3]=l,e[4]=t,e[5]=i,e[6]=o):o=e[6],o}function N(u){const e=p.c(16),{renderSidebar:l}=u,n=b(),{openMobile:i,setOpenMobile:t}=d();let s;e[0]!==n?(s=n("layouts.shellControls.navigationTitle"),e[0]=n,e[1]=s):s=e[1];let o;e[2]!==s?(o=m.jsx(h,{className:"sr-only",children:s}),e[2]=s,e[3]=o):o=e[3];let r;e[4]!==t?(r=()=>t(!1),e[4]=t,e[5]=r):r=e[5];let a;e[6]!==l||e[7]!==r?(a=l({onClose:r}),e[6]=l,e[7]=r,e[8]=a):a=e[8];let c;e[9]!==o||e[10]!==a?(c=m.jsxs(S,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[o,a]}),e[9]=o,e[10]=a,e[11]=c):c=e[11];let f;return e[12]!==i||e[13]!==t||e[14]!==c?(f=m.jsx(x,{open:i,onOpenChange:t,children:c}),e[12]=i,e[13]=t,e[14]=c,e[15]=f):f=e[15],f}export{N as M,B as S};
@@ -1 +1 @@
1
- import{c as L,b as F,e as ae,j as n,B as $,t as te,bQ as ee,y as ke,a as Z,w as Fe,x as Ne,K as ce,bR as Me,bS as Be,G as X,m as ge,r as M,n as re,ax as he,v as Ue,bT as Je,p as pe,bU as He,bV as Ke,d as Ge,F as Ve,f as _e,u as We,J as Qe,aW as Ye,bW as Xe,bX as xe,bY as Ze,bZ as et,S as tt,O as nt,b_ as st}from"./index-DN0HZ17-.js";import{A as de}from"./avatar-DysBv2rW.js";import{t as Te,a as ot}from"./Users03-CZYN5l0S.js";import{i as it}from"./SearchLg-DJYx4P8r.js";import{i as at,s as rt,a as U,n as lt}from"./Stars02-B5-5GSTU.js";import{s as ct}from"./XClose-Bd59Alyf.js";import{i as K}from"./CheckCircle-Bnr6_-gp.js";import{i as ye}from"./FilterLines-BuL247hS.js";import{i as Y}from"./Zap-Hg4YL285.js";import{a as Ae,b as Oe,d as Ce,e as Pe,h as dt,c as ut}from"./dialog-Dz3D1_wO.js";import{R as mt}from"./required-auth-layout-_aE_8vNw.js";import{q as ft,A as gt}from"./tab-id-BU58EEaT.js";import{a as be,m as ht,S as pt}from"./use-mcp-client-DkKrtwqw.js";import{c as xt}from"./hooks-DZ8pDEMU.js";import{g as yt}from"./use-organization-settings-DL4y3UNb.js";import{u as bt}from"./use-org-sso-BjjzVM0-.js";function St(t){const e=L.c(49),{orgName:o,orgSlug:a,orgLogo:l,domain:s}=t,i=F();let r;e[0]!==a||e[1]!==i?(r=async()=>{const N=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),O=await N.json();if(!N.ok||!O.success)throw new Error(O.error??i("common.autoDomainJoinScreen.joinError"));return O},e[0]=a,e[1]=i,e[2]=r):r=e[2];let d;e[3]!==a?(d=N=>{window.location.href=`/${N.slug??a}`},e[3]=a,e[4]=d):d=e[4];let h;e[5]!==i?(h=N=>{te.error(N instanceof Error?N.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=h):h=e[6];let w;e[7]!==r||e[8]!==d||e[9]!==h?(w={mutationFn:r,onSuccess:d,onError:h},e[7]=r,e[8]=d,e[9]=h,e[10]=w):w=e[10];const m=ae(w),p=wt;let c;e[11]!==l||e[12]!==o?(c=l?n.jsx(de,{url:l,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Te,{className:"h-6 w-6 text-primary"})}),e[11]=l,e[12]=o,e[13]=c):c=e[13];let u;e[14]!==o||e[15]!==i?(u=i("common.autoDomainJoinScreen.joinPrompt",{orgName:o}),e[14]=o,e[15]=i,e[16]=u):u=e[16];let g;e[17]!==u?(g=n.jsx("h3",{className:"text-lg font-medium",children:u}),e[17]=u,e[18]=g):g=e[18];let f;e[19]!==s||e[20]!==i?(f=i("common.autoDomainJoinScreen.joinDescription",{domain:s}),e[19]=s,e[20]=i,e[21]=f):f=e[21];let x;e[22]!==f?(x=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[22]=f,e[23]=x):x=e[23];let y;e[24]!==g||e[25]!==x?(y=n.jsxs("div",{className:"space-y-2",children:[g,x]}),e[24]=g,e[25]=x,e[26]=y):y=e[26];let S;e[27]!==m?(S=()=>m.mutate(),e[27]=m,e[28]=S):S=e[28];let v;e[29]!==m.isPending||e[30]!==o||e[31]!==i?(v=m.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:o}),e[29]=m.isPending,e[30]=o,e[31]=i,e[32]=v):v=e[32];let _;e[33]!==m.isPending||e[34]!==S||e[35]!==v?(_=n.jsx($,{onClick:S,disabled:m.isPending,children:v}),e[33]=m.isPending,e[34]=S,e[35]=v,e[36]=_):_=e[36];const k=m.isPending;let j;e[37]!==i?(j=i("common.autoDomainJoinScreen.goHome"),e[37]=i,e[38]=j):j=e[38];let b;e[39]!==m.isPending||e[40]!==j?(b=n.jsx($,{variant:"ghost",onClick:p,disabled:k,children:j}),e[39]=m.isPending,e[40]=j,e[41]=b):b=e[41];let T;e[42]!==_||e[43]!==b?(T=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,b]}),e[42]=_,e[43]=b,e[44]=T):T=e[44];let A;return e[45]!==y||e[46]!==T||e[47]!==c?(A=n.jsxs(ee,{children:[c,y,T]}),e[45]=y,e[46]=T,e[47]=c,e[48]=A):A=e[48],A}function wt(){window.location.href="/"}function Se(t){const e=L.c(25),{orgSlug:o,orgName:a,reason:l}=t,s=F(),i=vt,r=l==="not-found",d=r?it:ke;let h;e[0]!==r||e[1]!==s?(h=s(r?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=r,e[1]=s,e[2]=h):h=e[2];const w=h;let m;e[3]!==r||e[4]!==a||e[5]!==o||e[6]!==s?(m=r?n.jsxs(n.Fragment,{children:[s("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:o}),"."]}):n.jsxs(n.Fragment,{children:[s("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:a??o}),".",n.jsx("br",{}),s("common.noAccessScreen.askAdminToInvite")]}),e[3]=r,e[4]=a,e[5]=o,e[6]=s,e[7]=m):m=e[7];const p=m;let c;e[8]!==d?(c=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(d,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=d,e[9]=c):c=e[9];let u;e[10]!==w?(u=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[10]=w,e[11]=u):u=e[11];let g;e[12]!==p?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[12]=p,e[13]=g):g=e[13];let f;e[14]!==u||e[15]!==g?(f=n.jsxs("div",{className:"space-y-2",children:[u,g]}),e[14]=u,e[15]=g,e[16]=f):f=e[16];let x;e[17]!==s?(x=s("common.noAccessScreen.goToHome"),e[17]=s,e[18]=x):x=e[18];let y;e[19]!==x?(y=n.jsx($,{onClick:i,children:x}),e[19]=x,e[20]=y):y=e[20];let S;return e[21]!==c||e[22]!==f||e[23]!==y?(S=n.jsxs(ee,{children:[c,f,y]}),e[21]=c,e[22]=f,e[23]=y,e[24]=S):S=e[24],S}function vt(){window.location.href="/"}function jt(t){const e=L.c(59),{invitationId:o,orgName:a,orgSlug:l,orgLogo:s}=t,i=F();let r;e[0]!==o?(r=async()=>{const P=await Z.organization.acceptInvitation({invitationId:o});if(P.error)throw new Error(P.error.message);return P.data},e[0]=o,e[1]=r):r=e[1];let d;e[2]!==l?(d=()=>{Fe(),window.location.href=`/${l}`},e[2]=l,e[3]=d):d=e[3];let h;e[4]!==i?(h=P=>{te.error(P instanceof Error?P.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=h):h=e[5];let w;e[6]!==r||e[7]!==d||e[8]!==h?(w={mutationFn:r,onSuccess:d,onError:h},e[6]=r,e[7]=d,e[8]=h,e[9]=w):w=e[9];const m=ae(w);let p;e[10]!==o?(p=async()=>{const P=await Z.organization.rejectInvitation({invitationId:o});if(P.error)throw new Error(P.error.message);return P.data},e[10]=o,e[11]=p):p=e[11];let c,u;e[12]!==i?(c=()=>{te.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},u=P=>{te.error(P instanceof Error?P.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=c,e[14]=u):(c=e[13],u=e[14]);let g;e[15]!==p||e[16]!==c||e[17]!==u?(g={mutationFn:p,onSuccess:c,onError:u},e[15]=p,e[16]=c,e[17]=u,e[18]=g):g=e[18];const f=ae(g),x=m.isPending||f.isPending;let y;e[19]!==s||e[20]!==a?(y=s?n.jsx(de,{url:s,fallback:a.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(at,{className:"h-6 w-6 text-primary"})}),e[19]=s,e[20]=a,e[21]=y):y=e[21];let S;e[22]!==a||e[23]!==i?(S=i("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=i,e[24]=S):S=e[24];let v;e[25]!==S?(v=n.jsx("h3",{className:"text-lg font-medium",children:S}),e[25]=S,e[26]=v):v=e[26];let _;e[27]!==i?(_=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=_):_=e[28];let k;e[29]!==_?(k=n.jsx("p",{className:"text-sm text-muted-foreground",children:_}),e[29]=_,e[30]=k):k=e[30];let j;e[31]!==v||e[32]!==k?(j=n.jsxs("div",{className:"space-y-2",children:[v,k]}),e[31]=v,e[32]=k,e[33]=j):j=e[33];let b;e[34]!==m?(b=()=>m.mutate(),e[34]=m,e[35]=b):b=e[35];let T;e[36]!==m.isPending||e[37]!==i?(T=m.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=m.isPending,e[37]=i,e[38]=T):T=e[38];let A;e[39]!==x||e[40]!==b||e[41]!==T?(A=n.jsx($,{onClick:b,disabled:x,children:T}),e[39]=x,e[40]=b,e[41]=T,e[42]=A):A=e[42];let N;e[43]!==f?(N=()=>f.mutate(),e[43]=f,e[44]=N):N=e[44];let O;e[45]!==f.isPending||e[46]!==i?(O=f.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=f.isPending,e[46]=i,e[47]=O):O=e[47];let I;e[48]!==x||e[49]!==N||e[50]!==O?(I=n.jsx($,{variant:"ghost",onClick:N,disabled:x,children:O}),e[48]=x,e[49]=N,e[50]=O,e[51]=I):I=e[51];let C;e[52]!==A||e[53]!==I?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[A,I]}),e[52]=A,e[53]=I,e[54]=C):C=e[54];let D;return e[55]!==j||e[56]!==C||e[57]!==y?(D=n.jsxs(ee,{children:[y,j,C]}),e[55]=j,e[56]=C,e[57]=y,e[58]=D):D=e[58],D}function kt(t){const e=L.c(23),{orgName:o,orgLogo:a}=t,l=F();let s;e[0]!==a||e[1]!==o?(s=a?n.jsx(de,{url:a,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(rt,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=o,e[2]=s):s=e[2];let i;e[3]!==l?(i=l("common.requestPendingScreen.title"),e[3]=l,e[4]=i):i=e[4];let r;e[5]!==i?(r=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=r):r=e[6];let d;e[7]!==o||e[8]!==l?(d=l("common.requestPendingScreen.description",{orgName:o}),e[7]=o,e[8]=l,e[9]=d):d=e[9];let h;e[10]!==d?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[10]=d,e[11]=h):h=e[11];let w;e[12]!==r||e[13]!==h?(w=n.jsxs("div",{className:"space-y-2",children:[r,h]}),e[12]=r,e[13]=h,e[14]=w):w=e[14];let m;e[15]!==l?(m=l("common.requestPendingScreen.goHome"),e[15]=l,e[16]=m):m=e[16];let p;e[17]!==m?(p=n.jsx($,{variant:"ghost",onClick:Nt,children:m}),e[17]=m,e[18]=p):p=e[18];let c;return e[19]!==s||e[20]!==w||e[21]!==p?(c=n.jsxs(ee,{children:[s,w,p]}),e[19]=s,e[20]=w,e[21]=p,e[22]=c):c=e[22],c}function Nt(){window.location.href="/"}function _t(t){const e=L.c(45),{orgName:o,orgSlug:a,orgLogo:l,domain:s}=t,i=F();let r;e[0]!==a?(r=async()=>{const A=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),N=await A.json();if(!A.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=a,e[1]=r):r=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=At,e[2]=d):d=e[2];let h;e[3]!==i?(h=A=>{te.error(A instanceof Error?A.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=h):h=e[4];let w;e[5]!==r||e[6]!==h?(w={mutationFn:r,onSuccess:d,onError:h},e[5]=r,e[6]=h,e[7]=w):w=e[7];const m=ae(w);let p;e[8]!==l||e[9]!==o?(p=l?n.jsx(de,{url:l,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Te,{className:"h-6 w-6 text-primary"})}),e[8]=l,e[9]=o,e[10]=p):p=e[10];let c;e[11]!==o||e[12]!==i?(c=i("common.requestToJoinScreen.title",{orgName:o}),e[11]=o,e[12]=i,e[13]=c):c=e[13];let u;e[14]!==c?(u=n.jsx("h3",{className:"text-lg font-medium",children:c}),e[14]=c,e[15]=u):u=e[15];let g;e[16]!==s||e[17]!==i?(g=i("common.requestToJoinScreen.description",{domain:s}),e[16]=s,e[17]=i,e[18]=g):g=e[18];let f;e[19]!==g?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[19]=g,e[20]=f):f=e[20];let x;e[21]!==u||e[22]!==f?(x=n.jsxs("div",{className:"space-y-2",children:[u,f]}),e[21]=u,e[22]=f,e[23]=x):x=e[23];let y;e[24]!==m?(y=()=>m.mutate(),e[24]=m,e[25]=y):y=e[25];let S;e[26]!==m.isPending||e[27]!==i?(S=m.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=m.isPending,e[27]=i,e[28]=S):S=e[28];let v;e[29]!==m.isPending||e[30]!==y||e[31]!==S?(v=n.jsx($,{onClick:y,disabled:m.isPending,children:S}),e[29]=m.isPending,e[30]=y,e[31]=S,e[32]=v):v=e[32];const _=m.isPending;let k;e[33]!==i?(k=i("common.requestToJoinScreen.goToHome"),e[33]=i,e[34]=k):k=e[34];let j;e[35]!==m.isPending||e[36]!==k?(j=n.jsx($,{variant:"ghost",onClick:Tt,disabled:_,children:k}),e[35]=m.isPending,e[36]=k,e[37]=j):j=e[37];let b;e[38]!==v||e[39]!==j?(b=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[v,j]}),e[38]=v,e[39]=j,e[40]=b):b=e[40];let T;return e[41]!==x||e[42]!==b||e[43]!==p?(T=n.jsxs(ee,{children:[p,x,b]}),e[41]=x,e[42]=b,e[43]=p,e[44]=T):T=e[44],T}function Tt(){window.location.href="/"}function At(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Ot(t){const e=L.c(7);let o;e[0]!==t?(o=ce.orgAccessStatus(t),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==t?(a=async()=>{const s=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!s.ok)throw new Error(`org-access-status failed (${s.status})`);return await s.json()},e[2]=t,e[3]=a):a=e[3];let l;return e[4]!==o||e[5]!==a?(l={queryKey:o,queryFn:a,refetchOnWindowFocus:!1},e[4]=o,e[5]=a,e[6]=l):l=e[6],Ne(l)}function Ct({orgSlug:t}){const{data:e}=Ot(t);if(e.status!=="member"){Me()?.org===t&&Be();const o=localStorage.getItem(X.lastOrgSlug())===t;if(o&&localStorage.removeItem(X.lastOrgSlug()),o&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(Se,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(jt,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(St,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(_t,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(kt,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(Se,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Ee(t){const e=L.c(42),{ariaLabel:o,dismissLabel:a,eyebrow:l,title:s,description:i,icon:r,children:d,footerLeading:h,actions:w,onDismiss:m,tone:p}=t,c=p===void 0?"neutral":p,u=h||w;let g;e[0]!==c?(g=c==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=c,e[1]=g):g=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(ct,{size:14}),e[2]=f):f=e[2];let x;e[3]!==a||e[4]!==m?(x=n.jsx($,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:m,children:f}),e[3]=a,e[4]=m,e[5]=x):x=e[5];const y=r&&"flex items-start gap-3",S=d&&"pb-3";let v;e[6]!==y||e[7]!==S?(v=ge("p-4 pr-11",y,S),e[6]=y,e[7]=S,e[8]=v):v=e[8];let _;e[9]!==r?(_=r&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:r}),e[9]=r,e[10]=_):_=e[10];let k;e[11]!==l?(k=l&&n.jsx("p",{className:"text-xs text-muted-foreground",children:l}),e[11]=l,e[12]=k):k=e[12];let j;e[13]!==s?(j=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:s}),e[13]=s,e[14]=j):j=e[14];let b;e[15]!==i?(b=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=b):b=e[16];let T;e[17]!==j||e[18]!==b||e[19]!==k?(T=n.jsxs("div",{children:[k,j,b]}),e[17]=j,e[18]=b,e[19]=k,e[20]=T):T=e[20];let A;e[21]!==d?(A=d&&n.jsx("div",{className:"mt-3",children:d}),e[21]=d,e[22]=A):A=e[22];let N;e[23]!==T||e[24]!==A?(N=n.jsxs("div",{className:"min-w-0 flex-1",children:[T,A]}),e[23]=T,e[24]=A,e[25]=N):N=e[25];let O;e[26]!==N||e[27]!==v||e[28]!==_?(O=n.jsxs("div",{className:v,children:[_,N]}),e[26]=N,e[27]=v,e[28]=_,e[29]=O):O=e[29];let I;e[30]!==w||e[31]!==h||e[32]!==u||e[33]!==c?(I=u&&n.jsxs("div",{className:ge("flex items-center justify-between gap-3 px-4 py-2.5",c==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:h}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:w})]}),e[30]=w,e[31]=h,e[32]=u,e[33]=c,e[34]=I):I=e[34];let C;return e[35]!==o||e[36]!==O||e[37]!==I||e[38]!==g||e[39]!==x||e[40]!==c?(C=n.jsxs("div",{role:"dialog","aria-label":o,"data-slot":"announcement-card","data-tone":c,className:"relative w-full overflow-hidden rounded-lg border border-border bg-background shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[g,x,O,I]}),e[35]=o,e[36]=O,e[37]=I,e[38]=g,e[39]=x,e[40]=c,e[41]=C):C=e[41],C}const Ie=[{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:U,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:K,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:Y,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:U,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:K,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:Y,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:K,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:U,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:Y,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:U,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:K,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:Y,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:U,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:K,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:Y,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:U,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ye,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:K,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:ot,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:Y,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:K,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:U,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ye,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:U,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:lt,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],le="studio.release-feed.v1",ue=new Set;let G="",V={},me=!1;function Pt(){if(me)return G||"{}";try{return localStorage.getItem(le)??"{}"}catch{return G||"{}"}}function Le(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function we(){const t=Pt();return t!==G&&(G=t,V=Le(t)),V}function Et(t){ue.add(t);const e=o=>{if(!(o.key!==le&&o.key!==null)){try{const a=localStorage.getItem(le)??"{}",s={...Le(a),...V};V=s,G=JSON.stringify(s)}catch{}t()}};return window.addEventListener("storage",e),()=>{ue.delete(t),window.removeEventListener("storage",e)}}function It(t){V=t,G=JSON.stringify(t);try{localStorage.setItem(le,G),me=!1}catch{me=!0}ue.forEach(e=>e())}function Lt(){const t=L.c(7),e=M.useSyncExternalStore(Et,we,we);let o;t[0]!==e?(o=d=>!!e[d],t[0]=e,t[1]=o):o=t[1];const a=o,l=Dt;let s;t[2]!==e?(s=Ie.reduce((d,h)=>e[h.id]?d:d+1,0),t[2]=e,t[3]=s):s=t[3];const i=s;let r;return t[4]!==a||t[5]!==i?(r={isSeen:a,markSeen:l,unseenCount:i},t[4]=a,t[5]=i,t[6]=r):r=t[6],r}function Dt(t){V[t]||It({...V,[t]:{seenAt:new Date().toISOString()}})}const $t=720*60*60*1e3,zt=10080*60*1e3;function qt(t){const[e,o,a]=t.split("-").map(Number);return!e||!o||!a?new Date(t).getTime():new Date(e,o-1,a).getTime()}function Rt(t){const e=Ie[0];if(!e)return null;const o=qt(e.date),a=t-o;return a<0||a>$t?null:e}function Ft(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Mt(t,e){const o=Ft(t);return o===null?!1:e-o>=zt}function Bt(){const t=L.c(34),e=F(),{data:o}=Z.useSession(),{isSeen:a,markSeen:l}=Lt();let s,i,r;if(t[0]!==a||t[1]!==o?.user?.createdAt){r=Symbol.for("react.early_return_sentinel");e:{const y=Date.now();if(s=Rt(y),!s){r=null;break e}if(!Mt(o?.user?.createdAt,y)){r=null;break e}i=a(s.id)}t[0]=a,t[1]=o?.user?.createdAt,t[2]=s,t[3]=i,t[4]=r}else s=t[2],i=t[3],r=t[4];if(r!==Symbol.for("react.early_return_sentinel"))return r;if(i)return null;let d;t[5]!==e?(d=e("announcements.release.ariaLabel"),t[5]=e,t[6]=d):d=t[6];let h;t[7]!==e?(h=e("announcements.release.dismiss"),t[7]=e,t[8]=h):h=t[8];const w=s.eyebrow,m=s.title;let p;t[9]!==s.id||t[10]!==l?(p=()=>l(s.id),t[9]=s.id,t[10]=l,t[11]=p):p=t[11];let c;t[12]!==s.id||t[13]!==s.learnMoreHref||t[14]!==l||t[15]!==e?(c=s.learnMoreHref?n.jsx("a",{href:s.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>l(s.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[12]=s.id,t[13]=s.learnMoreHref,t[14]=l,t[15]=e,t[16]=c):c=t[16];let u;t[17]!==s.cta||t[18]!==s.id||t[19]!==l?(u=s.cta?n.jsx($,{asChild:!0,size:"sm",onClick:()=>l(s.id),children:n.jsx("a",{href:s.cta.href,children:s.cta.label})}):null,t[17]=s.cta,t[18]=s.id,t[19]=l,t[20]=u):u=t[20];let g;t[21]!==s.bullets?(g=s.bullets.map(Ut),t[21]=s.bullets,t[22]=g):g=t[22];let f;t[23]!==g?(f=n.jsx("ul",{className:"flex flex-col gap-3",children:g}),t[23]=g,t[24]=f):f=t[24];let x;return t[25]!==s.eyebrow||t[26]!==s.title||t[27]!==f||t[28]!==d||t[29]!==h||t[30]!==p||t[31]!==c||t[32]!==u?(x=n.jsx(Ee,{ariaLabel:d,dismissLabel:h,eyebrow:w,title:m,onDismiss:p,footerLeading:c,actions:u,children:f}),t[25]=s.eyebrow,t[26]=s.title,t[27]=f,t[28]=d,t[29]=h,t[30]=p,t[31]=c,t[32]=u,t[33]=x):x=t[33],x}function Ut(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const De=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),J=De?"⌘":"Ctrl",q={keyboardShortcuts:{keys:[J,"K"],description:"Keyboard shortcuts"},back:{keys:[J,"["],description:"Back to previous"},focusChatInput:{keys:[J,"L"],description:"Focus chat input"},saveAndFormat:{keys:[J,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[J,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[J,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",J,"S"],description:"New task"},toggleDaemon:{keys:[J,"D"],description:"Toggle daemon logs"}},Jt=[{label:"General",shortcuts:[q.keyboardShortcuts,q.back,q.newTask,q.toggleDaemon]},{label:"Editor",shortcuts:[q.saveAndFormat]},{label:"Chat",shortcuts:[q.focusChatInput,q.togglePlanMode,q.sendMessage,q.newLine]},{label:"Questions",shortcuts:[q.selectOption]},{label:"Monitoring",shortcuts:[q.applyFilter]}];function ve(t){return De?t.metaKey:t.ctrlKey}function Ht(t){const e=L.c(11),{open:o,onOpenChange:a}=t,l=F();let s;e[0]!==l?(s=l("common.keyboardShortcutsDialog.title"),e[0]=l,e[1]=s):s=e[1];let i;e[2]!==s?(i=n.jsx(Ae,{children:n.jsx(Oe,{children:s})}),e[2]=s,e[3]=i):i=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex flex-col gap-4",children:Jt.map(Kt)}),e[4]=r):r=e[4];let d;e[5]!==i?(d=n.jsxs(Ce,{className:"sm:max-w-md",children:[i,r]}),e[5]=i,e[6]=d):d=e[6];let h;return e[7]!==a||e[8]!==o||e[9]!==d?(h=n.jsx(Pe,{open:o,onOpenChange:a,children:d}),e[7]=a,e[8]=o,e[9]=d,e[10]=h):h=e[10],h}function Kt(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Gt)})]},t.label)}function Gt(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Vt)})]},t.description)}function Vt(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const Wt=300*1e3,Qt=2;function Yt(t,e,o){return!e||e===o?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function Xt(t,e){return t.count>=Qt&&t.version!==null&&t.version!==e}function Zt(){const t=L.c(31),e=F();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:ce.appVersionCheck(),queryFn:tn,refetchInterval:Wt,refetchIntervalInBackground:!0,staleTime:0},t[0]=o):o=t[0];const{data:a,dataUpdatedAt:l}=re(o),[s,i]=M.useState(0);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={version:null,count:0},t[1]=r):r=t[1];const[d,h]=M.useState(r);l!==s&&(i(l),h(b=>Yt(b,a,"4.143.1")));const[w,m]=M.useState(null);if(!Xt(d,w))return null;let p;t[2]!==e?(p=e("announcements.version.ariaLabel"),t[2]=e,t[3]=p):p=t[3];let c;t[4]!==e?(c=e("announcements.version.dismiss"),t[4]=e,t[5]=c):c=t[5];let u;t[6]!==e?(u=e("announcements.version.eyebrow"),t[6]=e,t[7]=u):u=t[7];let g;t[8]!==e?(g=e("announcements.version.title"),t[8]=e,t[9]=g):g=t[9];let f;t[10]!==e?(f=e("announcements.version.description"),t[10]=e,t[11]=f):f=t[11];let x;t[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(he,{size:16}),t[12]=x):x=t[12];let y;t[13]!==d.version?(y=()=>m(d.version),t[13]=d.version,t[14]=y):y=t[14];let S;t[15]!==e?(S=e("announcements.version.currentSession",{version:"4.143.1"}),t[15]=e,t[16]=S):S=t[16];let v;t[17]!==e?(v=e("announcements.version.refresh"),t[17]=e,t[18]=v):v=t[18];let _;t[19]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(he,{size:14}),t[19]=_):_=t[19];let k;t[20]!==v?(k=n.jsxs($,{size:"sm",onClick:en,children:[v,_]}),t[20]=v,t[21]=k):k=t[21];let j;return t[22]!==k||t[23]!==p||t[24]!==c||t[25]!==u||t[26]!==g||t[27]!==f||t[28]!==y||t[29]!==S?(j=n.jsx(Ee,{ariaLabel:p,dismissLabel:c,eyebrow:u,title:g,description:f,icon:x,tone:"system",onDismiss:y,footerLeading:S,actions:k}),t[22]=k,t[23]=p,t[24]=c,t[25]=u,t[26]=g,t[27]=f,t[28]=y,t[29]=S,t[30]=j):j=t[30],j}function en(){return window.location.reload()}async function tn(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function nn(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const sn=Date.parse("2026-07-21T00:00:00Z"),je=t=>nn(X.ptBrAnnouncementSeen(t));function on(){const t=L.c(35),e=F(),[o,a]=Ue(),{data:l,isPending:s}=Z.useSession(),i=l?.user,r=i?.id,d=i?.createdAt,h=d!=null&&new Date(d).getTime()<sn,w=Je()==="pt-BR",m=!s&&!!r&&h&&w&&o.language==="en"&&!je(r).has(),[p,c]=M.useState(!1),[u,g]=M.useState(!1);!p&&!s&&(c(!0),m&&r&&(je(r).mark(),a(rn),g(!0),pe("pt_br_auto_switch_shown")));let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=R=>{pe("pt_br_auto_switch_closed",{action:R}),g(!1)},t[0]=f):f=t[0];const x=f;let y;t[1]!==a?(y=()=>{a(an),x("switch-back")},t[1]=a,t[2]=y):y=t[2];const S=y;let v;t[3]===Symbol.for("react.memo_cache_sentinel")?(v=R=>!R&&x("dismiss"),t[3]=v):v=t[3];let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=_):_=t[4];let k;t[5]!==e?(k=e("announcements.ptBr.title"),t[5]=e,t[6]=k):k=t[6];let j;t[7]!==k?(j=n.jsx(Oe,{children:k}),t[7]=k,t[8]=j):j=t[8];let b;t[9]!==e?(b=e("announcements.ptBr.description"),t[9]=e,t[10]=b):b=t[10];let T;t[11]!==b?(T=n.jsx(dt,{children:b}),t[11]=b,t[12]=T):T=t[12];let A;t[13]!==j||t[14]!==T?(A=n.jsxs(Ae,{children:[j,T]}),t[13]=j,t[14]=T,t[15]=A):A=t[15];let N;t[16]!==e?(N=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=N):N=t[17];let O;t[18]!==S||t[19]!==N?(O=n.jsx($,{variant:"outline",onClick:S,children:N}),t[18]=S,t[19]=N,t[20]=O):O=t[20];let I;t[21]===Symbol.for("react.memo_cache_sentinel")?(I=()=>x("ok"),t[21]=I):I=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let D;t[24]!==C?(D=n.jsx($,{onClick:I,children:C}),t[24]=C,t[25]=D):D=t[25];let P;t[26]!==O||t[27]!==D?(P=n.jsxs(ut,{children:[O,D]}),t[26]=O,t[27]=D,t[28]=P):P=t[28];let H;t[29]!==P||t[30]!==A?(H=n.jsxs(Ce,{className:"sm:max-w-md",children:[_,A,P]}),t[29]=P,t[30]=A,t[31]=H):H=t[31];let B;return t[32]!==u||t[33]!==H?(B=n.jsx(Pe,{open:u,onOpenChange:v,children:H}),t[32]=u,t[33]=H,t[34]=B):B=t[34],B}function an(t){return{...t,language:"en"}}function rn(t){return{...t,language:"pt-BR"}}function ln({activeOrg:t}){return t&&(He(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Ke()),null}function cn(t){const{prev:e,virtualMcpId:o,decopilotId:a,savedLayout:l,opts:s,autosendValue:i}=t,r={};o?r.virtualmcpid=o:e.virtualmcpid&&(r.virtualmcpid=e.virtualmcpid);const d=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,w=(o??d)!==d;let m;if(s?.main)r.main=s.main;else if(l)l.main!==void 0&&(r.main=l.main),l.sidepanel!==void 0&&(m=l.sidepanel);else if(!w){const p=e.main;p&&typeof p=="string"&&!ft(p)&&(r.main=p)}return m!==void 0&&(r.sidepanel=m),s?.autosend&&(r.autosend=i),r}const $e="studio:thread-layout:v1",dn=50;function ze(t){const e={};return(t.main===0||typeof t.main=="string")&&(e.main=t.main),(t.sidepanel===0||t.sidepanel==="chat")&&(e.sidepanel=t.sidepanel),e}function un(t,e,o,a=dn){const l=t.filter(([s])=>s!==e);for(l.push([e,ze(o)]);l.length>a;)l.shift();return l}function fe(){try{const t=sessionStorage.getItem($e);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(o=>Array.isArray(o)&&o.length===2&&typeof o[0]=="string"):[]}catch{return[]}}function qe(t){try{sessionStorage.setItem($e,JSON.stringify(t))}catch{}}function mn(t,e){t&&qe(un(fe(),t,e))}function fn(t){if(!t)return null;const e=fe().find(([o])=>o===t);return e?ze(e[1]):null}function zn(t){if(!t)return;const e=fe(),o=e.filter(([a])=>a!==t);o.length!==e.length&&qe(o)}function Re(t){return{queryKey:ce.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function qn(t){const e=L.c(10);let o;e[0]!==t?(o=Re(t),e[0]=t,e[1]=o):o=e[1];const a=re(o);let l;e[2]!==a.data?.prompts?(l=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=l):l=e[3];let s;e[4]!==a.data?.tiles?(s=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=s):s=e[5];let i;return e[6]!==a.isLoading||e[7]!==l||e[8]!==s?(i={isLoading:a.isLoading,prompts:l,tiles:s},e[6]=a.isLoading,e[7]=l,e[8]=s,e[9]=i):i=e[9],i}function gn(t){const e=L.c(31),{orgSlug:o,orgName:a,domain:l}=t,s=F();let i;e[0]!==o?(i=()=>{window.location.href=`/api/${encodeURIComponent(o)}/sso/authorize`},e[0]=o,e[1]=i):i=e[1];const r=i,d=hn;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(ke,{className:"h-6 w-6 text-primary"})}),e[2]=h):h=e[2];let w;e[3]!==s?(w=s("common.ssoRequiredScreen.title"),e[3]=s,e[4]=w):w=e[4];let m;e[5]!==w?(m=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[5]=w,e[6]=m):m=e[6];let p;e[7]!==l||e[8]!==a||e[9]!==s?(p=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",s("common.ssoRequiredScreen.requiresSsoAuth"),l?` ${s("common.ssoRequiredScreen.via",{domain:l})}`:"","."]}):s("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=l,e[8]=a,e[9]=s,e[10]=p):p=e[10];let c;e[11]!==p?(c=n.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[11]=p,e[12]=c):c=e[12];let u;e[13]!==m||e[14]!==c?(u=n.jsxs("div",{className:"space-y-2",children:[m,c]}),e[13]=m,e[14]=c,e[15]=u):u=e[15];let g;e[16]!==s?(g=s("common.ssoRequiredScreen.signInWithSso"),e[16]=s,e[17]=g):g=e[17];let f;e[18]!==r||e[19]!==g?(f=n.jsx($,{onClick:r,children:g}),e[18]=r,e[19]=g,e[20]=f):f=e[20];let x;e[21]!==s?(x=s("common.ssoRequiredScreen.goBack"),e[21]=s,e[22]=x):x=e[22];let y;e[23]!==x?(y=n.jsx($,{variant:"ghost",onClick:d,children:x}),e[23]=x,e[24]=y):y=e[24];let S;e[25]!==y||e[26]!==f?(S=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,y]}),e[25]=y,e[26]=f,e[27]=S):S=e[27];let v;return e[28]!==S||e[29]!==u?(v=n.jsxs(ee,{children:[h,u,S]}),e[28]=S,e[29]=u,e[30]=v):v=e[30],v}function hn(){window.location.href="/"}function pn(t){const e=L.c(8),{org:o,children:a}=t,s=yt(o.id,o.slug)?.enabled_plugins??null;let i;e[0]!==o.id||e[1]!==o.name||e[2]!==s?(i={id:o.id,organizationId:o.id,slug:"_org",name:o.name,enabledPlugins:s,ui:null},e[0]=o.id,e[1]=o.name,e[2]=s,e[3]=i):i=e[3];const r=i;let d;return e[4]!==a||e[5]!==o||e[6]!==r?(d=n.jsx(st,{org:o,project:r,children:a}),e[4]=a,e[5]=o,e[6]=r,e[7]=d):d=e[7],d}function xn(){const t=Ge(),e=xt(),{org:o}=Ve(),a=_e({strict:!1}),l=We({strict:!1}),s=a.org??"",i=a.taskId??"",r=(c,u,g=!0)=>t({to:"/$org/$taskId",params:{org:s,taskId:c},search:u,replace:g}),d=(c,u=!0)=>r(i,c,u),h=c=>d(u=>({...u,sidepanel:c})),w=(c,u,g)=>{const f=!!i&&i===c;i&&!f&&mn(i,{main:l.main,sidepanel:l.sidepanel});const x=f?null:fn(c),y=be(o.id).id;return r(c,S=>cn({prev:S,virtualMcpId:u,decopilotId:y,savedLayout:x,opts:g,autosendValue:gt}),!1)};return{openSidePanel:h,setTaskId:w,createNewTask:async(c,u)=>{const g=crypto.randomUUID(),f=c??l.virtualmcpid??be(o.id).id;try{await e?.create({id:g,virtual_mcp_id:f,...u?{branch:u}:{}})}catch{}w(g,f)},openTab:c=>r(i||crypto.randomUUID(),u=>({...u,main:c}))}}function yn(){const t=L.c(53);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const a=Qe(e)?.params.org;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[1]=l):l=t[1];const{taskId:s}=_e(l),[i,r]=M.useState(!1),d=Ye(),h=a??"";let w;t[2]!==h?(w=Re(h),t[2]=h,t[3]=w):w=t[3];const m=!!a&&!s;let p;t[4]!==w||t[5]!==m?(p={...w,enabled:m},t[4]=w,t[5]=m,t[6]=p):p=t[6],re(p);const{data:c}=Z.useSession(),u=c?.user?.id;let g;t[7]!==a||t[8]!==u?(g=a&&u?Xe(u,a):null,t[7]=a,t[8]=u,t[9]=g):g=t[9];const f=g;let x,y;t[10]!==d?(x=()=>{const E=z=>{if(ve(z)&&z.code==="KeyK"){z.preventDefault(),r(!0);return}ve(z)&&z.code==="BracketLeft"&&d.history.canGoBack()&&(z.preventDefault(),d.history.back())};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},y=[d],t[10]=d,t[11]=x,t[12]=y):(x=t[11],y=t[12]),M.useEffect(x,y);let S;t[13]!==a?(S=ce.activeOrganization(a),t[13]=a,t[14]=S):S=t[14];let v;t[15]!==a||t[16]!==u?(v=async()=>{if(!a)return null;performance.mark("mesh:active-org-fetch:start");const{data:E}=await Z.organization.getFullOrganization({query:{organizationSlug:a}}).finally(bn),z=xe(E);return E&&!z&&localStorage.setItem(X.lastOrgSlug(),a),u&&E&&et(u,a,E),E},t[15]=a,t[16]=u,t[17]=v):v=t[17];const _=f?f.data:void 0,k=f?.updatedAt;let j;t[18]!==v||t[19]!==_||t[20]!==k||t[21]!==S?(j={queryKey:S,queryFn:v,initialData:_,initialDataUpdatedAt:k,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=v,t[19]=_,t[20]=k,t[21]=S,t[22]=j):j=t[22];const{data:b}=Ne(j),T=b?.id,A=b?.slug,{data:N}=bt(T,A),O=T??"",I=A??"";let C;t[23]!==O||t[24]!==I?(C=ht({connectionId:pt,orgId:O,orgSlug:I}),t[23]=O,t[24]=I,t[25]=C):C=t[25];const D=!!T&&!!A;let P;if(t[26]!==C||t[27]!==D?(P={...C,enabled:D},t[26]=C,t[27]=D,t[28]=P):P=t[28],re(P),!b){let E;t[29]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(tt,{}),t[29]=E):E=t[29];let z;return t[30]!==a?(z=n.jsx(M.Suspense,{fallback:E,children:n.jsx(Ct,{orgSlug:a})}),t[30]=a,t[31]=z):z=t[31],z}if(xe(b)){localStorage.getItem(X.lastOrgSlug())===a&&localStorage.removeItem(X.lastOrgSlug());let E;return t[32]!==b.name?(E=n.jsx(Ze,{orgName:b.name}),t[32]=b.name,t[33]=E):E=t[33],E}if(N?.ssoRequired&&!N.authenticated){let E;return t[34]!==b.id||t[35]!==b.name||t[36]!==b.slug||t[37]!==N.domain?(E=n.jsx(gn,{orgId:b.id,orgSlug:b.slug,orgName:b.name,domain:N.domain}),t[34]=b.id,t[35]=b.name,t[36]=b.slug,t[37]=N.domain,t[38]=E):E=t[38],E}const B=b.logo??null;let R;t[39]!==b||t[40]!==B?(R={...b,logo:B},t[39]=b,t[40]=B,t[41]=R):R=t[41];let W;t[42]!==b?(W=n.jsx(ln,{activeOrg:b}),t[42]=b,t[43]=W):W=t[43];let ne;t[44]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(nt,{}),t[44]=ne):ne=t[44];let se;t[45]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(Bt,{}),n.jsx(Zt,{})]}),t[45]=se):se=t[45];let Q;t[46]!==i?(Q=n.jsx(Ht,{open:i,onOpenChange:r}),t[46]=i,t[47]=Q):Q=t[47];let oe;t[48]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(on,{}),t[48]=oe):oe=t[48];let ie;return t[49]!==R||t[50]!==W||t[51]!==Q?(ie=n.jsxs(pn,{org:R,children:[W,ne,se,Q,oe]}),t[49]=R,t[50]=W,t[51]=Q,t[52]=ie):ie=t[52],ie}function bn(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Sn(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(mt,{children:n.jsx(yn,{})}),t[0]=e):e=t[0],e}const Rn=Object.freeze(Object.defineProperty({__proto__:null,default:Sn,usePanelActions:xn},Symbol.toStringTag,{value:"Module"}));export{q as K,qn as a,zn as f,ve as i,nn as m,Rn as s,xn as u};
1
+ import{c as L,b as F,e as ae,j as n,B as $,t as te,bQ as ee,y as ke,a as Z,w as Fe,x as Ne,K as ce,bR as Me,bS as Be,G as X,m as ge,r as M,n as re,ax as he,v as Ue,bT as Je,p as pe,bU as He,bV as Ke,d as Ge,F as Ve,f as _e,u as We,J as Qe,aW as Ye,bW as Xe,bX as xe,bY as Ze,bZ as et,S as tt,O as nt,b_ as st}from"./index-CrsyTcKf.js";import{A as de}from"./avatar-BCIQy5tG.js";import{t as Te,a as ot}from"./Users03-CH4iz8WK.js";import{i as it}from"./SearchLg-DCa9efLT.js";import{i as at,s as rt,a as U,n as lt}from"./Stars02-pwFAZthJ.js";import{s as ct}from"./XClose-BdreN2P3.js";import{i as K}from"./CheckCircle-CQl7io5M.js";import{i as ye}from"./FilterLines-DZ8yodUi.js";import{i as Y}from"./Zap-ns7J8qo9.js";import{a as Ae,b as Oe,d as Ce,e as Pe,h as dt,c as ut}from"./dialog-CS_RHIal.js";import{R as mt}from"./required-auth-layout-ssqkpP7I.js";import{q as ft,A as gt}from"./tab-id-Ci2UpaIV.js";import{a as be,m as ht,S as pt}from"./use-mcp-client-DvfiEO37.js";import{c as xt}from"./hooks-prd75NuB.js";import{g as yt}from"./use-organization-settings-BDBrKj0Z.js";import{u as bt}from"./use-org-sso-DTW9mwBx.js";function St(t){const e=L.c(49),{orgName:o,orgSlug:a,orgLogo:l,domain:s}=t,i=F();let r;e[0]!==a||e[1]!==i?(r=async()=>{const N=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),O=await N.json();if(!N.ok||!O.success)throw new Error(O.error??i("common.autoDomainJoinScreen.joinError"));return O},e[0]=a,e[1]=i,e[2]=r):r=e[2];let d;e[3]!==a?(d=N=>{window.location.href=`/${N.slug??a}`},e[3]=a,e[4]=d):d=e[4];let h;e[5]!==i?(h=N=>{te.error(N instanceof Error?N.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=h):h=e[6];let w;e[7]!==r||e[8]!==d||e[9]!==h?(w={mutationFn:r,onSuccess:d,onError:h},e[7]=r,e[8]=d,e[9]=h,e[10]=w):w=e[10];const m=ae(w),p=wt;let c;e[11]!==l||e[12]!==o?(c=l?n.jsx(de,{url:l,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Te,{className:"h-6 w-6 text-primary"})}),e[11]=l,e[12]=o,e[13]=c):c=e[13];let u;e[14]!==o||e[15]!==i?(u=i("common.autoDomainJoinScreen.joinPrompt",{orgName:o}),e[14]=o,e[15]=i,e[16]=u):u=e[16];let g;e[17]!==u?(g=n.jsx("h3",{className:"text-lg font-medium",children:u}),e[17]=u,e[18]=g):g=e[18];let f;e[19]!==s||e[20]!==i?(f=i("common.autoDomainJoinScreen.joinDescription",{domain:s}),e[19]=s,e[20]=i,e[21]=f):f=e[21];let x;e[22]!==f?(x=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[22]=f,e[23]=x):x=e[23];let y;e[24]!==g||e[25]!==x?(y=n.jsxs("div",{className:"space-y-2",children:[g,x]}),e[24]=g,e[25]=x,e[26]=y):y=e[26];let S;e[27]!==m?(S=()=>m.mutate(),e[27]=m,e[28]=S):S=e[28];let v;e[29]!==m.isPending||e[30]!==o||e[31]!==i?(v=m.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:o}),e[29]=m.isPending,e[30]=o,e[31]=i,e[32]=v):v=e[32];let _;e[33]!==m.isPending||e[34]!==S||e[35]!==v?(_=n.jsx($,{onClick:S,disabled:m.isPending,children:v}),e[33]=m.isPending,e[34]=S,e[35]=v,e[36]=_):_=e[36];const k=m.isPending;let j;e[37]!==i?(j=i("common.autoDomainJoinScreen.goHome"),e[37]=i,e[38]=j):j=e[38];let b;e[39]!==m.isPending||e[40]!==j?(b=n.jsx($,{variant:"ghost",onClick:p,disabled:k,children:j}),e[39]=m.isPending,e[40]=j,e[41]=b):b=e[41];let T;e[42]!==_||e[43]!==b?(T=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,b]}),e[42]=_,e[43]=b,e[44]=T):T=e[44];let A;return e[45]!==y||e[46]!==T||e[47]!==c?(A=n.jsxs(ee,{children:[c,y,T]}),e[45]=y,e[46]=T,e[47]=c,e[48]=A):A=e[48],A}function wt(){window.location.href="/"}function Se(t){const e=L.c(25),{orgSlug:o,orgName:a,reason:l}=t,s=F(),i=vt,r=l==="not-found",d=r?it:ke;let h;e[0]!==r||e[1]!==s?(h=s(r?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=r,e[1]=s,e[2]=h):h=e[2];const w=h;let m;e[3]!==r||e[4]!==a||e[5]!==o||e[6]!==s?(m=r?n.jsxs(n.Fragment,{children:[s("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:o}),"."]}):n.jsxs(n.Fragment,{children:[s("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:a??o}),".",n.jsx("br",{}),s("common.noAccessScreen.askAdminToInvite")]}),e[3]=r,e[4]=a,e[5]=o,e[6]=s,e[7]=m):m=e[7];const p=m;let c;e[8]!==d?(c=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(d,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=d,e[9]=c):c=e[9];let u;e[10]!==w?(u=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[10]=w,e[11]=u):u=e[11];let g;e[12]!==p?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[12]=p,e[13]=g):g=e[13];let f;e[14]!==u||e[15]!==g?(f=n.jsxs("div",{className:"space-y-2",children:[u,g]}),e[14]=u,e[15]=g,e[16]=f):f=e[16];let x;e[17]!==s?(x=s("common.noAccessScreen.goToHome"),e[17]=s,e[18]=x):x=e[18];let y;e[19]!==x?(y=n.jsx($,{onClick:i,children:x}),e[19]=x,e[20]=y):y=e[20];let S;return e[21]!==c||e[22]!==f||e[23]!==y?(S=n.jsxs(ee,{children:[c,f,y]}),e[21]=c,e[22]=f,e[23]=y,e[24]=S):S=e[24],S}function vt(){window.location.href="/"}function jt(t){const e=L.c(59),{invitationId:o,orgName:a,orgSlug:l,orgLogo:s}=t,i=F();let r;e[0]!==o?(r=async()=>{const P=await Z.organization.acceptInvitation({invitationId:o});if(P.error)throw new Error(P.error.message);return P.data},e[0]=o,e[1]=r):r=e[1];let d;e[2]!==l?(d=()=>{Fe(),window.location.href=`/${l}`},e[2]=l,e[3]=d):d=e[3];let h;e[4]!==i?(h=P=>{te.error(P instanceof Error?P.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=h):h=e[5];let w;e[6]!==r||e[7]!==d||e[8]!==h?(w={mutationFn:r,onSuccess:d,onError:h},e[6]=r,e[7]=d,e[8]=h,e[9]=w):w=e[9];const m=ae(w);let p;e[10]!==o?(p=async()=>{const P=await Z.organization.rejectInvitation({invitationId:o});if(P.error)throw new Error(P.error.message);return P.data},e[10]=o,e[11]=p):p=e[11];let c,u;e[12]!==i?(c=()=>{te.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},u=P=>{te.error(P instanceof Error?P.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=c,e[14]=u):(c=e[13],u=e[14]);let g;e[15]!==p||e[16]!==c||e[17]!==u?(g={mutationFn:p,onSuccess:c,onError:u},e[15]=p,e[16]=c,e[17]=u,e[18]=g):g=e[18];const f=ae(g),x=m.isPending||f.isPending;let y;e[19]!==s||e[20]!==a?(y=s?n.jsx(de,{url:s,fallback:a.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(at,{className:"h-6 w-6 text-primary"})}),e[19]=s,e[20]=a,e[21]=y):y=e[21];let S;e[22]!==a||e[23]!==i?(S=i("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=i,e[24]=S):S=e[24];let v;e[25]!==S?(v=n.jsx("h3",{className:"text-lg font-medium",children:S}),e[25]=S,e[26]=v):v=e[26];let _;e[27]!==i?(_=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=_):_=e[28];let k;e[29]!==_?(k=n.jsx("p",{className:"text-sm text-muted-foreground",children:_}),e[29]=_,e[30]=k):k=e[30];let j;e[31]!==v||e[32]!==k?(j=n.jsxs("div",{className:"space-y-2",children:[v,k]}),e[31]=v,e[32]=k,e[33]=j):j=e[33];let b;e[34]!==m?(b=()=>m.mutate(),e[34]=m,e[35]=b):b=e[35];let T;e[36]!==m.isPending||e[37]!==i?(T=m.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=m.isPending,e[37]=i,e[38]=T):T=e[38];let A;e[39]!==x||e[40]!==b||e[41]!==T?(A=n.jsx($,{onClick:b,disabled:x,children:T}),e[39]=x,e[40]=b,e[41]=T,e[42]=A):A=e[42];let N;e[43]!==f?(N=()=>f.mutate(),e[43]=f,e[44]=N):N=e[44];let O;e[45]!==f.isPending||e[46]!==i?(O=f.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=f.isPending,e[46]=i,e[47]=O):O=e[47];let I;e[48]!==x||e[49]!==N||e[50]!==O?(I=n.jsx($,{variant:"ghost",onClick:N,disabled:x,children:O}),e[48]=x,e[49]=N,e[50]=O,e[51]=I):I=e[51];let C;e[52]!==A||e[53]!==I?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[A,I]}),e[52]=A,e[53]=I,e[54]=C):C=e[54];let D;return e[55]!==j||e[56]!==C||e[57]!==y?(D=n.jsxs(ee,{children:[y,j,C]}),e[55]=j,e[56]=C,e[57]=y,e[58]=D):D=e[58],D}function kt(t){const e=L.c(23),{orgName:o,orgLogo:a}=t,l=F();let s;e[0]!==a||e[1]!==o?(s=a?n.jsx(de,{url:a,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(rt,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=o,e[2]=s):s=e[2];let i;e[3]!==l?(i=l("common.requestPendingScreen.title"),e[3]=l,e[4]=i):i=e[4];let r;e[5]!==i?(r=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=r):r=e[6];let d;e[7]!==o||e[8]!==l?(d=l("common.requestPendingScreen.description",{orgName:o}),e[7]=o,e[8]=l,e[9]=d):d=e[9];let h;e[10]!==d?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[10]=d,e[11]=h):h=e[11];let w;e[12]!==r||e[13]!==h?(w=n.jsxs("div",{className:"space-y-2",children:[r,h]}),e[12]=r,e[13]=h,e[14]=w):w=e[14];let m;e[15]!==l?(m=l("common.requestPendingScreen.goHome"),e[15]=l,e[16]=m):m=e[16];let p;e[17]!==m?(p=n.jsx($,{variant:"ghost",onClick:Nt,children:m}),e[17]=m,e[18]=p):p=e[18];let c;return e[19]!==s||e[20]!==w||e[21]!==p?(c=n.jsxs(ee,{children:[s,w,p]}),e[19]=s,e[20]=w,e[21]=p,e[22]=c):c=e[22],c}function Nt(){window.location.href="/"}function _t(t){const e=L.c(45),{orgName:o,orgSlug:a,orgLogo:l,domain:s}=t,i=F();let r;e[0]!==a?(r=async()=>{const A=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),N=await A.json();if(!A.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=a,e[1]=r):r=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=At,e[2]=d):d=e[2];let h;e[3]!==i?(h=A=>{te.error(A instanceof Error?A.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=h):h=e[4];let w;e[5]!==r||e[6]!==h?(w={mutationFn:r,onSuccess:d,onError:h},e[5]=r,e[6]=h,e[7]=w):w=e[7];const m=ae(w);let p;e[8]!==l||e[9]!==o?(p=l?n.jsx(de,{url:l,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Te,{className:"h-6 w-6 text-primary"})}),e[8]=l,e[9]=o,e[10]=p):p=e[10];let c;e[11]!==o||e[12]!==i?(c=i("common.requestToJoinScreen.title",{orgName:o}),e[11]=o,e[12]=i,e[13]=c):c=e[13];let u;e[14]!==c?(u=n.jsx("h3",{className:"text-lg font-medium",children:c}),e[14]=c,e[15]=u):u=e[15];let g;e[16]!==s||e[17]!==i?(g=i("common.requestToJoinScreen.description",{domain:s}),e[16]=s,e[17]=i,e[18]=g):g=e[18];let f;e[19]!==g?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[19]=g,e[20]=f):f=e[20];let x;e[21]!==u||e[22]!==f?(x=n.jsxs("div",{className:"space-y-2",children:[u,f]}),e[21]=u,e[22]=f,e[23]=x):x=e[23];let y;e[24]!==m?(y=()=>m.mutate(),e[24]=m,e[25]=y):y=e[25];let S;e[26]!==m.isPending||e[27]!==i?(S=m.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=m.isPending,e[27]=i,e[28]=S):S=e[28];let v;e[29]!==m.isPending||e[30]!==y||e[31]!==S?(v=n.jsx($,{onClick:y,disabled:m.isPending,children:S}),e[29]=m.isPending,e[30]=y,e[31]=S,e[32]=v):v=e[32];const _=m.isPending;let k;e[33]!==i?(k=i("common.requestToJoinScreen.goToHome"),e[33]=i,e[34]=k):k=e[34];let j;e[35]!==m.isPending||e[36]!==k?(j=n.jsx($,{variant:"ghost",onClick:Tt,disabled:_,children:k}),e[35]=m.isPending,e[36]=k,e[37]=j):j=e[37];let b;e[38]!==v||e[39]!==j?(b=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[v,j]}),e[38]=v,e[39]=j,e[40]=b):b=e[40];let T;return e[41]!==x||e[42]!==b||e[43]!==p?(T=n.jsxs(ee,{children:[p,x,b]}),e[41]=x,e[42]=b,e[43]=p,e[44]=T):T=e[44],T}function Tt(){window.location.href="/"}function At(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Ot(t){const e=L.c(7);let o;e[0]!==t?(o=ce.orgAccessStatus(t),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==t?(a=async()=>{const s=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!s.ok)throw new Error(`org-access-status failed (${s.status})`);return await s.json()},e[2]=t,e[3]=a):a=e[3];let l;return e[4]!==o||e[5]!==a?(l={queryKey:o,queryFn:a,refetchOnWindowFocus:!1},e[4]=o,e[5]=a,e[6]=l):l=e[6],Ne(l)}function Ct({orgSlug:t}){const{data:e}=Ot(t);if(e.status!=="member"){Me()?.org===t&&Be();const o=localStorage.getItem(X.lastOrgSlug())===t;if(o&&localStorage.removeItem(X.lastOrgSlug()),o&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(Se,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(jt,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(St,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(_t,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(kt,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(Se,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Ee(t){const e=L.c(42),{ariaLabel:o,dismissLabel:a,eyebrow:l,title:s,description:i,icon:r,children:d,footerLeading:h,actions:w,onDismiss:m,tone:p}=t,c=p===void 0?"neutral":p,u=h||w;let g;e[0]!==c?(g=c==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=c,e[1]=g):g=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(ct,{size:14}),e[2]=f):f=e[2];let x;e[3]!==a||e[4]!==m?(x=n.jsx($,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:m,children:f}),e[3]=a,e[4]=m,e[5]=x):x=e[5];const y=r&&"flex items-start gap-3",S=d&&"pb-3";let v;e[6]!==y||e[7]!==S?(v=ge("p-4 pr-11",y,S),e[6]=y,e[7]=S,e[8]=v):v=e[8];let _;e[9]!==r?(_=r&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:r}),e[9]=r,e[10]=_):_=e[10];let k;e[11]!==l?(k=l&&n.jsx("p",{className:"text-xs text-muted-foreground",children:l}),e[11]=l,e[12]=k):k=e[12];let j;e[13]!==s?(j=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:s}),e[13]=s,e[14]=j):j=e[14];let b;e[15]!==i?(b=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=b):b=e[16];let T;e[17]!==j||e[18]!==b||e[19]!==k?(T=n.jsxs("div",{children:[k,j,b]}),e[17]=j,e[18]=b,e[19]=k,e[20]=T):T=e[20];let A;e[21]!==d?(A=d&&n.jsx("div",{className:"mt-3",children:d}),e[21]=d,e[22]=A):A=e[22];let N;e[23]!==T||e[24]!==A?(N=n.jsxs("div",{className:"min-w-0 flex-1",children:[T,A]}),e[23]=T,e[24]=A,e[25]=N):N=e[25];let O;e[26]!==N||e[27]!==v||e[28]!==_?(O=n.jsxs("div",{className:v,children:[_,N]}),e[26]=N,e[27]=v,e[28]=_,e[29]=O):O=e[29];let I;e[30]!==w||e[31]!==h||e[32]!==u||e[33]!==c?(I=u&&n.jsxs("div",{className:ge("flex items-center justify-between gap-3 px-4 py-2.5",c==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:h}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:w})]}),e[30]=w,e[31]=h,e[32]=u,e[33]=c,e[34]=I):I=e[34];let C;return e[35]!==o||e[36]!==O||e[37]!==I||e[38]!==g||e[39]!==x||e[40]!==c?(C=n.jsxs("div",{role:"dialog","aria-label":o,"data-slot":"announcement-card","data-tone":c,className:"relative w-full overflow-hidden rounded-lg border border-border bg-background shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[g,x,O,I]}),e[35]=o,e[36]=O,e[37]=I,e[38]=g,e[39]=x,e[40]=c,e[41]=C):C=e[41],C}const Ie=[{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:U,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:K,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:Y,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:U,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:K,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:Y,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:K,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:U,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:Y,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:U,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:K,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:Y,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:U,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:K,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:Y,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:U,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ye,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:K,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:ot,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:Y,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:K,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:U,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ye,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:U,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:lt,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],le="studio.release-feed.v1",ue=new Set;let G="",V={},me=!1;function Pt(){if(me)return G||"{}";try{return localStorage.getItem(le)??"{}"}catch{return G||"{}"}}function Le(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function we(){const t=Pt();return t!==G&&(G=t,V=Le(t)),V}function Et(t){ue.add(t);const e=o=>{if(!(o.key!==le&&o.key!==null)){try{const a=localStorage.getItem(le)??"{}",s={...Le(a),...V};V=s,G=JSON.stringify(s)}catch{}t()}};return window.addEventListener("storage",e),()=>{ue.delete(t),window.removeEventListener("storage",e)}}function It(t){V=t,G=JSON.stringify(t);try{localStorage.setItem(le,G),me=!1}catch{me=!0}ue.forEach(e=>e())}function Lt(){const t=L.c(7),e=M.useSyncExternalStore(Et,we,we);let o;t[0]!==e?(o=d=>!!e[d],t[0]=e,t[1]=o):o=t[1];const a=o,l=Dt;let s;t[2]!==e?(s=Ie.reduce((d,h)=>e[h.id]?d:d+1,0),t[2]=e,t[3]=s):s=t[3];const i=s;let r;return t[4]!==a||t[5]!==i?(r={isSeen:a,markSeen:l,unseenCount:i},t[4]=a,t[5]=i,t[6]=r):r=t[6],r}function Dt(t){V[t]||It({...V,[t]:{seenAt:new Date().toISOString()}})}const $t=720*60*60*1e3,zt=10080*60*1e3;function qt(t){const[e,o,a]=t.split("-").map(Number);return!e||!o||!a?new Date(t).getTime():new Date(e,o-1,a).getTime()}function Rt(t){const e=Ie[0];if(!e)return null;const o=qt(e.date),a=t-o;return a<0||a>$t?null:e}function Ft(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Mt(t,e){const o=Ft(t);return o===null?!1:e-o>=zt}function Bt(){const t=L.c(34),e=F(),{data:o}=Z.useSession(),{isSeen:a,markSeen:l}=Lt();let s,i,r;if(t[0]!==a||t[1]!==o?.user?.createdAt){r=Symbol.for("react.early_return_sentinel");e:{const y=Date.now();if(s=Rt(y),!s){r=null;break e}if(!Mt(o?.user?.createdAt,y)){r=null;break e}i=a(s.id)}t[0]=a,t[1]=o?.user?.createdAt,t[2]=s,t[3]=i,t[4]=r}else s=t[2],i=t[3],r=t[4];if(r!==Symbol.for("react.early_return_sentinel"))return r;if(i)return null;let d;t[5]!==e?(d=e("announcements.release.ariaLabel"),t[5]=e,t[6]=d):d=t[6];let h;t[7]!==e?(h=e("announcements.release.dismiss"),t[7]=e,t[8]=h):h=t[8];const w=s.eyebrow,m=s.title;let p;t[9]!==s.id||t[10]!==l?(p=()=>l(s.id),t[9]=s.id,t[10]=l,t[11]=p):p=t[11];let c;t[12]!==s.id||t[13]!==s.learnMoreHref||t[14]!==l||t[15]!==e?(c=s.learnMoreHref?n.jsx("a",{href:s.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>l(s.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[12]=s.id,t[13]=s.learnMoreHref,t[14]=l,t[15]=e,t[16]=c):c=t[16];let u;t[17]!==s.cta||t[18]!==s.id||t[19]!==l?(u=s.cta?n.jsx($,{asChild:!0,size:"sm",onClick:()=>l(s.id),children:n.jsx("a",{href:s.cta.href,children:s.cta.label})}):null,t[17]=s.cta,t[18]=s.id,t[19]=l,t[20]=u):u=t[20];let g;t[21]!==s.bullets?(g=s.bullets.map(Ut),t[21]=s.bullets,t[22]=g):g=t[22];let f;t[23]!==g?(f=n.jsx("ul",{className:"flex flex-col gap-3",children:g}),t[23]=g,t[24]=f):f=t[24];let x;return t[25]!==s.eyebrow||t[26]!==s.title||t[27]!==f||t[28]!==d||t[29]!==h||t[30]!==p||t[31]!==c||t[32]!==u?(x=n.jsx(Ee,{ariaLabel:d,dismissLabel:h,eyebrow:w,title:m,onDismiss:p,footerLeading:c,actions:u,children:f}),t[25]=s.eyebrow,t[26]=s.title,t[27]=f,t[28]=d,t[29]=h,t[30]=p,t[31]=c,t[32]=u,t[33]=x):x=t[33],x}function Ut(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const De=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),J=De?"⌘":"Ctrl",q={keyboardShortcuts:{keys:[J,"K"],description:"Keyboard shortcuts"},back:{keys:[J,"["],description:"Back to previous"},focusChatInput:{keys:[J,"L"],description:"Focus chat input"},saveAndFormat:{keys:[J,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[J,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[J,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",J,"S"],description:"New task"},toggleDaemon:{keys:[J,"D"],description:"Toggle daemon logs"}},Jt=[{label:"General",shortcuts:[q.keyboardShortcuts,q.back,q.newTask,q.toggleDaemon]},{label:"Editor",shortcuts:[q.saveAndFormat]},{label:"Chat",shortcuts:[q.focusChatInput,q.togglePlanMode,q.sendMessage,q.newLine]},{label:"Questions",shortcuts:[q.selectOption]},{label:"Monitoring",shortcuts:[q.applyFilter]}];function ve(t){return De?t.metaKey:t.ctrlKey}function Ht(t){const e=L.c(11),{open:o,onOpenChange:a}=t,l=F();let s;e[0]!==l?(s=l("common.keyboardShortcutsDialog.title"),e[0]=l,e[1]=s):s=e[1];let i;e[2]!==s?(i=n.jsx(Ae,{children:n.jsx(Oe,{children:s})}),e[2]=s,e[3]=i):i=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex flex-col gap-4",children:Jt.map(Kt)}),e[4]=r):r=e[4];let d;e[5]!==i?(d=n.jsxs(Ce,{className:"sm:max-w-md",children:[i,r]}),e[5]=i,e[6]=d):d=e[6];let h;return e[7]!==a||e[8]!==o||e[9]!==d?(h=n.jsx(Pe,{open:o,onOpenChange:a,children:d}),e[7]=a,e[8]=o,e[9]=d,e[10]=h):h=e[10],h}function Kt(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Gt)})]},t.label)}function Gt(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Vt)})]},t.description)}function Vt(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const Wt=300*1e3,Qt=2;function Yt(t,e,o){return!e||e===o?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function Xt(t,e){return t.count>=Qt&&t.version!==null&&t.version!==e}function Zt(){const t=L.c(31),e=F();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:ce.appVersionCheck(),queryFn:tn,refetchInterval:Wt,refetchIntervalInBackground:!0,staleTime:0},t[0]=o):o=t[0];const{data:a,dataUpdatedAt:l}=re(o),[s,i]=M.useState(0);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={version:null,count:0},t[1]=r):r=t[1];const[d,h]=M.useState(r);l!==s&&(i(l),h(b=>Yt(b,a,"4.145.0")));const[w,m]=M.useState(null);if(!Xt(d,w))return null;let p;t[2]!==e?(p=e("announcements.version.ariaLabel"),t[2]=e,t[3]=p):p=t[3];let c;t[4]!==e?(c=e("announcements.version.dismiss"),t[4]=e,t[5]=c):c=t[5];let u;t[6]!==e?(u=e("announcements.version.eyebrow"),t[6]=e,t[7]=u):u=t[7];let g;t[8]!==e?(g=e("announcements.version.title"),t[8]=e,t[9]=g):g=t[9];let f;t[10]!==e?(f=e("announcements.version.description"),t[10]=e,t[11]=f):f=t[11];let x;t[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(he,{size:16}),t[12]=x):x=t[12];let y;t[13]!==d.version?(y=()=>m(d.version),t[13]=d.version,t[14]=y):y=t[14];let S;t[15]!==e?(S=e("announcements.version.currentSession",{version:"4.145.0"}),t[15]=e,t[16]=S):S=t[16];let v;t[17]!==e?(v=e("announcements.version.refresh"),t[17]=e,t[18]=v):v=t[18];let _;t[19]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(he,{size:14}),t[19]=_):_=t[19];let k;t[20]!==v?(k=n.jsxs($,{size:"sm",onClick:en,children:[v,_]}),t[20]=v,t[21]=k):k=t[21];let j;return t[22]!==k||t[23]!==p||t[24]!==c||t[25]!==u||t[26]!==g||t[27]!==f||t[28]!==y||t[29]!==S?(j=n.jsx(Ee,{ariaLabel:p,dismissLabel:c,eyebrow:u,title:g,description:f,icon:x,tone:"system",onDismiss:y,footerLeading:S,actions:k}),t[22]=k,t[23]=p,t[24]=c,t[25]=u,t[26]=g,t[27]=f,t[28]=y,t[29]=S,t[30]=j):j=t[30],j}function en(){return window.location.reload()}async function tn(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function nn(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const sn=Date.parse("2026-07-21T00:00:00Z"),je=t=>nn(X.ptBrAnnouncementSeen(t));function on(){const t=L.c(35),e=F(),[o,a]=Ue(),{data:l,isPending:s}=Z.useSession(),i=l?.user,r=i?.id,d=i?.createdAt,h=d!=null&&new Date(d).getTime()<sn,w=Je()==="pt-BR",m=!s&&!!r&&h&&w&&o.language==="en"&&!je(r).has(),[p,c]=M.useState(!1),[u,g]=M.useState(!1);!p&&!s&&(c(!0),m&&r&&(je(r).mark(),a(rn),g(!0),pe("pt_br_auto_switch_shown")));let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=R=>{pe("pt_br_auto_switch_closed",{action:R}),g(!1)},t[0]=f):f=t[0];const x=f;let y;t[1]!==a?(y=()=>{a(an),x("switch-back")},t[1]=a,t[2]=y):y=t[2];const S=y;let v;t[3]===Symbol.for("react.memo_cache_sentinel")?(v=R=>!R&&x("dismiss"),t[3]=v):v=t[3];let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=_):_=t[4];let k;t[5]!==e?(k=e("announcements.ptBr.title"),t[5]=e,t[6]=k):k=t[6];let j;t[7]!==k?(j=n.jsx(Oe,{children:k}),t[7]=k,t[8]=j):j=t[8];let b;t[9]!==e?(b=e("announcements.ptBr.description"),t[9]=e,t[10]=b):b=t[10];let T;t[11]!==b?(T=n.jsx(dt,{children:b}),t[11]=b,t[12]=T):T=t[12];let A;t[13]!==j||t[14]!==T?(A=n.jsxs(Ae,{children:[j,T]}),t[13]=j,t[14]=T,t[15]=A):A=t[15];let N;t[16]!==e?(N=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=N):N=t[17];let O;t[18]!==S||t[19]!==N?(O=n.jsx($,{variant:"outline",onClick:S,children:N}),t[18]=S,t[19]=N,t[20]=O):O=t[20];let I;t[21]===Symbol.for("react.memo_cache_sentinel")?(I=()=>x("ok"),t[21]=I):I=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let D;t[24]!==C?(D=n.jsx($,{onClick:I,children:C}),t[24]=C,t[25]=D):D=t[25];let P;t[26]!==O||t[27]!==D?(P=n.jsxs(ut,{children:[O,D]}),t[26]=O,t[27]=D,t[28]=P):P=t[28];let H;t[29]!==P||t[30]!==A?(H=n.jsxs(Ce,{className:"sm:max-w-md",children:[_,A,P]}),t[29]=P,t[30]=A,t[31]=H):H=t[31];let B;return t[32]!==u||t[33]!==H?(B=n.jsx(Pe,{open:u,onOpenChange:v,children:H}),t[32]=u,t[33]=H,t[34]=B):B=t[34],B}function an(t){return{...t,language:"en"}}function rn(t){return{...t,language:"pt-BR"}}function ln({activeOrg:t}){return t&&(He(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Ke()),null}function cn(t){const{prev:e,virtualMcpId:o,decopilotId:a,savedLayout:l,opts:s,autosendValue:i}=t,r={};o?r.virtualmcpid=o:e.virtualmcpid&&(r.virtualmcpid=e.virtualmcpid);const d=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,w=(o??d)!==d;let m;if(s?.main)r.main=s.main;else if(l)l.main!==void 0&&(r.main=l.main),l.sidepanel!==void 0&&(m=l.sidepanel);else if(!w){const p=e.main;p&&typeof p=="string"&&!ft(p)&&(r.main=p)}return m!==void 0&&(r.sidepanel=m),s?.autosend&&(r.autosend=i),r}const $e="studio:thread-layout:v1",dn=50;function ze(t){const e={};return(t.main===0||typeof t.main=="string")&&(e.main=t.main),(t.sidepanel===0||t.sidepanel==="chat")&&(e.sidepanel=t.sidepanel),e}function un(t,e,o,a=dn){const l=t.filter(([s])=>s!==e);for(l.push([e,ze(o)]);l.length>a;)l.shift();return l}function fe(){try{const t=sessionStorage.getItem($e);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(o=>Array.isArray(o)&&o.length===2&&typeof o[0]=="string"):[]}catch{return[]}}function qe(t){try{sessionStorage.setItem($e,JSON.stringify(t))}catch{}}function mn(t,e){t&&qe(un(fe(),t,e))}function fn(t){if(!t)return null;const e=fe().find(([o])=>o===t);return e?ze(e[1]):null}function zn(t){if(!t)return;const e=fe(),o=e.filter(([a])=>a!==t);o.length!==e.length&&qe(o)}function Re(t){return{queryKey:ce.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function qn(t){const e=L.c(10);let o;e[0]!==t?(o=Re(t),e[0]=t,e[1]=o):o=e[1];const a=re(o);let l;e[2]!==a.data?.prompts?(l=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=l):l=e[3];let s;e[4]!==a.data?.tiles?(s=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=s):s=e[5];let i;return e[6]!==a.isLoading||e[7]!==l||e[8]!==s?(i={isLoading:a.isLoading,prompts:l,tiles:s},e[6]=a.isLoading,e[7]=l,e[8]=s,e[9]=i):i=e[9],i}function gn(t){const e=L.c(31),{orgSlug:o,orgName:a,domain:l}=t,s=F();let i;e[0]!==o?(i=()=>{window.location.href=`/api/${encodeURIComponent(o)}/sso/authorize`},e[0]=o,e[1]=i):i=e[1];const r=i,d=hn;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(ke,{className:"h-6 w-6 text-primary"})}),e[2]=h):h=e[2];let w;e[3]!==s?(w=s("common.ssoRequiredScreen.title"),e[3]=s,e[4]=w):w=e[4];let m;e[5]!==w?(m=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[5]=w,e[6]=m):m=e[6];let p;e[7]!==l||e[8]!==a||e[9]!==s?(p=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",s("common.ssoRequiredScreen.requiresSsoAuth"),l?` ${s("common.ssoRequiredScreen.via",{domain:l})}`:"","."]}):s("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=l,e[8]=a,e[9]=s,e[10]=p):p=e[10];let c;e[11]!==p?(c=n.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[11]=p,e[12]=c):c=e[12];let u;e[13]!==m||e[14]!==c?(u=n.jsxs("div",{className:"space-y-2",children:[m,c]}),e[13]=m,e[14]=c,e[15]=u):u=e[15];let g;e[16]!==s?(g=s("common.ssoRequiredScreen.signInWithSso"),e[16]=s,e[17]=g):g=e[17];let f;e[18]!==r||e[19]!==g?(f=n.jsx($,{onClick:r,children:g}),e[18]=r,e[19]=g,e[20]=f):f=e[20];let x;e[21]!==s?(x=s("common.ssoRequiredScreen.goBack"),e[21]=s,e[22]=x):x=e[22];let y;e[23]!==x?(y=n.jsx($,{variant:"ghost",onClick:d,children:x}),e[23]=x,e[24]=y):y=e[24];let S;e[25]!==y||e[26]!==f?(S=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,y]}),e[25]=y,e[26]=f,e[27]=S):S=e[27];let v;return e[28]!==S||e[29]!==u?(v=n.jsxs(ee,{children:[h,u,S]}),e[28]=S,e[29]=u,e[30]=v):v=e[30],v}function hn(){window.location.href="/"}function pn(t){const e=L.c(8),{org:o,children:a}=t,s=yt(o.id,o.slug)?.enabled_plugins??null;let i;e[0]!==o.id||e[1]!==o.name||e[2]!==s?(i={id:o.id,organizationId:o.id,slug:"_org",name:o.name,enabledPlugins:s,ui:null},e[0]=o.id,e[1]=o.name,e[2]=s,e[3]=i):i=e[3];const r=i;let d;return e[4]!==a||e[5]!==o||e[6]!==r?(d=n.jsx(st,{org:o,project:r,children:a}),e[4]=a,e[5]=o,e[6]=r,e[7]=d):d=e[7],d}function xn(){const t=Ge(),e=xt(),{org:o}=Ve(),a=_e({strict:!1}),l=We({strict:!1}),s=a.org??"",i=a.taskId??"",r=(c,u,g=!0)=>t({to:"/$org/$taskId",params:{org:s,taskId:c},search:u,replace:g}),d=(c,u=!0)=>r(i,c,u),h=c=>d(u=>({...u,sidepanel:c})),w=(c,u,g)=>{const f=!!i&&i===c;i&&!f&&mn(i,{main:l.main,sidepanel:l.sidepanel});const x=f?null:fn(c),y=be(o.id).id;return r(c,S=>cn({prev:S,virtualMcpId:u,decopilotId:y,savedLayout:x,opts:g,autosendValue:gt}),!1)};return{openSidePanel:h,setTaskId:w,createNewTask:async(c,u)=>{const g=crypto.randomUUID(),f=c??l.virtualmcpid??be(o.id).id;try{await e?.create({id:g,virtual_mcp_id:f,...u?{branch:u}:{}})}catch{}w(g,f)},openTab:c=>r(i||crypto.randomUUID(),u=>({...u,main:c}))}}function yn(){const t=L.c(53);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const a=Qe(e)?.params.org;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[1]=l):l=t[1];const{taskId:s}=_e(l),[i,r]=M.useState(!1),d=Ye(),h=a??"";let w;t[2]!==h?(w=Re(h),t[2]=h,t[3]=w):w=t[3];const m=!!a&&!s;let p;t[4]!==w||t[5]!==m?(p={...w,enabled:m},t[4]=w,t[5]=m,t[6]=p):p=t[6],re(p);const{data:c}=Z.useSession(),u=c?.user?.id;let g;t[7]!==a||t[8]!==u?(g=a&&u?Xe(u,a):null,t[7]=a,t[8]=u,t[9]=g):g=t[9];const f=g;let x,y;t[10]!==d?(x=()=>{const E=z=>{if(ve(z)&&z.code==="KeyK"){z.preventDefault(),r(!0);return}ve(z)&&z.code==="BracketLeft"&&d.history.canGoBack()&&(z.preventDefault(),d.history.back())};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},y=[d],t[10]=d,t[11]=x,t[12]=y):(x=t[11],y=t[12]),M.useEffect(x,y);let S;t[13]!==a?(S=ce.activeOrganization(a),t[13]=a,t[14]=S):S=t[14];let v;t[15]!==a||t[16]!==u?(v=async()=>{if(!a)return null;performance.mark("mesh:active-org-fetch:start");const{data:E}=await Z.organization.getFullOrganization({query:{organizationSlug:a}}).finally(bn),z=xe(E);return E&&!z&&localStorage.setItem(X.lastOrgSlug(),a),u&&E&&et(u,a,E),E},t[15]=a,t[16]=u,t[17]=v):v=t[17];const _=f?f.data:void 0,k=f?.updatedAt;let j;t[18]!==v||t[19]!==_||t[20]!==k||t[21]!==S?(j={queryKey:S,queryFn:v,initialData:_,initialDataUpdatedAt:k,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=v,t[19]=_,t[20]=k,t[21]=S,t[22]=j):j=t[22];const{data:b}=Ne(j),T=b?.id,A=b?.slug,{data:N}=bt(T,A),O=T??"",I=A??"";let C;t[23]!==O||t[24]!==I?(C=ht({connectionId:pt,orgId:O,orgSlug:I}),t[23]=O,t[24]=I,t[25]=C):C=t[25];const D=!!T&&!!A;let P;if(t[26]!==C||t[27]!==D?(P={...C,enabled:D},t[26]=C,t[27]=D,t[28]=P):P=t[28],re(P),!b){let E;t[29]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(tt,{}),t[29]=E):E=t[29];let z;return t[30]!==a?(z=n.jsx(M.Suspense,{fallback:E,children:n.jsx(Ct,{orgSlug:a})}),t[30]=a,t[31]=z):z=t[31],z}if(xe(b)){localStorage.getItem(X.lastOrgSlug())===a&&localStorage.removeItem(X.lastOrgSlug());let E;return t[32]!==b.name?(E=n.jsx(Ze,{orgName:b.name}),t[32]=b.name,t[33]=E):E=t[33],E}if(N?.ssoRequired&&!N.authenticated){let E;return t[34]!==b.id||t[35]!==b.name||t[36]!==b.slug||t[37]!==N.domain?(E=n.jsx(gn,{orgId:b.id,orgSlug:b.slug,orgName:b.name,domain:N.domain}),t[34]=b.id,t[35]=b.name,t[36]=b.slug,t[37]=N.domain,t[38]=E):E=t[38],E}const B=b.logo??null;let R;t[39]!==b||t[40]!==B?(R={...b,logo:B},t[39]=b,t[40]=B,t[41]=R):R=t[41];let W;t[42]!==b?(W=n.jsx(ln,{activeOrg:b}),t[42]=b,t[43]=W):W=t[43];let ne;t[44]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(nt,{}),t[44]=ne):ne=t[44];let se;t[45]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(Bt,{}),n.jsx(Zt,{})]}),t[45]=se):se=t[45];let Q;t[46]!==i?(Q=n.jsx(Ht,{open:i,onOpenChange:r}),t[46]=i,t[47]=Q):Q=t[47];let oe;t[48]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(on,{}),t[48]=oe):oe=t[48];let ie;return t[49]!==R||t[50]!==W||t[51]!==Q?(ie=n.jsxs(pn,{org:R,children:[W,ne,se,Q,oe]}),t[49]=R,t[50]=W,t[51]=Q,t[52]=ie):ie=t[52],ie}function bn(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Sn(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(mt,{children:n.jsx(yn,{})}),t[0]=e):e=t[0],e}const Rn=Object.freeze(Object.defineProperty({__proto__:null,default:Sn,usePanelActions:xn},Symbol.toStringTag,{value:"Module"}));export{q as K,qn as a,zn as f,ve as i,nn as m,Rn as s,xn as u};
@@ -1 +1 @@
1
- import{c as b,m as g,j as o,cJ as P,cK as H,H as R,cL as A,cM as L,cN as V,cO as W,r as T,B as q,b6 as G,bu as F}from"./index-DN0HZ17-.js";import{i as J}from"./LayoutLeft-B9EFHxoy.js";import{u as K}from"./use-mobile-DbI9XSa2.js";import{i as Q}from"./X-C817Fvj3.js";import{b as z,T as B,a as D,c as k}from"./tooltip-BQ_WAZuK.js";function U(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(H,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function X(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(L,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function Y(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(W,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Z(i){const e=b.c(20);let t,s,a,l,d;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:d,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"right":l,r=d===void 0?!1:d;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(Y,{}),e[6]=m):m=e[6];const u=n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",h=n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",p=n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let x;e[7]!==s||e[8]!==u||e[9]!==h||e[10]!==f||e[11]!==p?(x=g("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",u,h,f,p,s),e[7]=s,e[8]=u,e[9]=h,e[10]=f,e[11]=p,e[12]=x):x=e[12];let c;e[13]!==r?(c=!r&&o.jsxs(V,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[o.jsx(Q,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=r,e[14]=c):c=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==x||e[18]!==c?(v=o.jsxs(X,{children:[m,o.jsxs(R,{"data-slot":"sheet-content",className:x,...a,children:[t,c]})]}),e[15]=t,e[16]=a,e[17]=x,e[18]=c,e[19]=v):v=e[19],v}function ee(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function te(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(P,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(A,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const ae="15rem",le="18rem",ie="4.5rem",E=T.createContext(null);function I(){const i=T.useContext(E);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function be(i){const e=b.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:l}=i,d=s===void 0?!1:s,n=K(),[r,m]=T.useState(d),[u,h]=T.useState(!1),f=a!==void 0,p=f?a:r;let x;e[0]!==f||e[1]!==l?(x=$=>{f||m($),l?.($)},e[0]=f,e[1]=l,e[2]=x):x=e[2];const c=x;let v;e[3]!==n||e[4]!==p||e[5]!==c?(v=()=>{n?h(oe):c(!p)},e[3]=n,e[4]=p,e[5]=c,e[6]=v):v=e[6];const y=v,w=p?"expanded":"collapsed";let j;e[7]!==n||e[8]!==p||e[9]!==u||e[10]!==c||e[11]!==w||e[12]!==y?(j={state:w,open:p,setOpen:c,isMobile:n,openMobile:u,setOpenMobile:h,toggleSidebar:y},e[7]=n,e[8]=p,e[9]=u,e[10]=c,e[11]=w,e[12]=y,e[13]=j):j=e[13];const S=j;let N;e[14]!==t?(N=o.jsx(z,{delayDuration:0,children:t}),e[14]=t,e[15]=N):N=e[15];let C;return e[16]!==S||e[17]!==N?(C=o.jsx(E.Provider,{value:S,children:N}),e[16]=S,e[17]=N,e[18]=C):C=e[18],C}function oe(i){return!i}function me(i){const e=b.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let d;e[5]!==l?(d={"--sidebar-width":ae,"--sidebar-width-icon":ie,...l},e[5]=l,e[6]=d):d=e[6];const n=d;let r;e[7]!==s?(r=g("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=r):r=e[8];let m;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==r?(m=o.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:r,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=r,e[13]=m):m=e[13],m}function he(i){const e=b.c(36);let t,s,a,l,d;e[0]!==i?({side:l,variant:d,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"left":l,r=d===void 0?"sidebar":d,{isMobile:m,state:u,openMobile:h,setOpenMobile:f}=I();if(m){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":le},e[6]=C):C=e[6];let $;e[7]===Symbol.for("react.memo_cache_sentinel")?($=o.jsxs(ee,{className:"sr-only",children:[o.jsx(te,{children:"Sidebar"}),o.jsx(se,{children:"Displays the mobile sidebar."})]}),e[7]=$):$=e[7];let _;e[8]!==t?(_=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=_):_=e[9];let M;e[10]!==n||e[11]!==_?(M=o.jsxs(Z,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[$,_]}),e[10]=n,e[11]=_,e[12]=M):M=e[12];let O;return e[13]!==h||e[14]!==a||e[15]!==f||e[16]!==M?(O=o.jsx(U,{open:h,onOpenChange:f,...a,children:M}),e[13]=h,e[14]=a,e[15]=f,e[16]=M,e[17]=O):O=e[17],O}const p=u==="expanded",x=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let c;e[18]!==x?(c=g("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",x),e[18]=x,e[19]=c):c=e[19];const v=p?void 0:"icon",y=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let w;e[20]!==s||e[21]!==y?(w=g("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=w):w=e[22];let j;e[23]!==t?(j=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let S;e[25]!==a||e[26]!==w||e[27]!==j?(S=o.jsx("div",{"data-slot":"sidebar-container",className:w,...a,children:j}),e[25]=a,e[26]=w,e[27]=j,e[28]=S):S=e[28];let N;return e[29]!==n||e[30]!==u||e[31]!==c||e[32]!==v||e[33]!==S||e[34]!==r?(N=o.jsx("div",{className:c,"data-state":u,"data-collapsible":v,"data-variant":r,"data-side":n,"data-slot":"sidebar",children:S}),e[29]=n,e[30]=u,e[31]=c,e[32]=v,e[33]=S,e[34]=r,e[35]=N):N=e[35],N}function xe(i){const e=b.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=I();let d;e[4]!==t?(d=g("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==l?(n=p=>{s?.(p),l()},e[6]=s,e[7]=l,e[8]=n):n=e[8];let r,m;e[9]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(J,{}),m=o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=r,e[10]=m):(r=e[9],m=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=o.jsx(B,{asChild:!0,children:o.jsxs(q,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[r,m]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",o.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(ne)})]}),e[15]=h):h=e[15];let f;return e[16]!==u?(f=o.jsx(z,{delayDuration:300,children:o.jsxs(k,{children:[u,h]})}),e[16]=u,e[17]=f):f=e[17],f}function ne(i){return o.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function ge(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ve(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function je(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function we(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ne(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ye(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ce(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function $e(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const re=F("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function _e(i){const e=b.c(28);let t,s,a,l,d,n,r;e[0]!==i?({asChild:a,isActive:l,variant:d,size:n,tooltip:r,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d,e[6]=n,e[7]=r):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5],n=e[6],r=e[7]);const m=a===void 0?!1:a,u=l===void 0?!1:l,h=d===void 0?"default":d,f=n===void 0?"default":n,p=m?G:"button",{isMobile:x}=I();let c;e[8]!==t||e[9]!==f||e[10]!==h?(c=g(re({variant:h,size:f}),t),e[8]=t,e[9]=f,e[10]=h,e[11]=c):c=e[11];let v;e[12]!==p||e[13]!==u||e[14]!==s||e[15]!==f||e[16]!==c?(v=o.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":u,className:c,...s}),e[12]=p,e[13]=u,e[14]=s,e[15]=f,e[16]=c,e[17]=v):v=e[17];const y=v;if(!r)return y;if(typeof r=="string"){let N;e[18]!==r?(N={children:r},e[18]=r,e[19]=N):N=e[19],r=N}let w;e[20]!==y?(w=o.jsx(B,{asChild:!0,children:y}),e[20]=y,e[21]=w):w=e[21];let j;e[22]!==x||e[23]!==r?(j=o.jsx(D,{side:"right",align:"center",hidden:x,...r}),e[22]=x,e[23]=r,e[24]=j):j=e[24];let S;return e[25]!==w||e[26]!==j?(S=o.jsxs(k,{children:[w,j]}),e[25]=w,e[26]=j,e[27]=S):S=e[27],S}export{Se as S,ye as a,Ce as b,_e as c,$e as d,we as e,ve as f,Ne as g,he as h,je as i,ge as j,me as k,be as l,te as m,se as n,ee as o,Z as p,U as q,xe as r,I as u};
1
+ import{c as b,m as g,j as o,cJ as P,cK as H,H as R,cL as A,cM as L,cN as V,cO as W,r as T,B as q,b6 as G,bu as F}from"./index-CrsyTcKf.js";import{i as J}from"./LayoutLeft-B2Qy9IsH.js";import{u as K}from"./use-mobile-Cg29r57v.js";import{i as Q}from"./X-4rHxalja.js";import{b as z,T as B,a as D,c as k}from"./tooltip-CJ7iUP_Y.js";function U(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(H,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function X(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(L,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function Y(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(W,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Z(i){const e=b.c(20);let t,s,a,l,d;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:d,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"right":l,r=d===void 0?!1:d;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(Y,{}),e[6]=m):m=e[6];const u=n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",h=n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",p=n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let x;e[7]!==s||e[8]!==u||e[9]!==h||e[10]!==f||e[11]!==p?(x=g("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",u,h,f,p,s),e[7]=s,e[8]=u,e[9]=h,e[10]=f,e[11]=p,e[12]=x):x=e[12];let c;e[13]!==r?(c=!r&&o.jsxs(V,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[o.jsx(Q,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=r,e[14]=c):c=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==x||e[18]!==c?(v=o.jsxs(X,{children:[m,o.jsxs(R,{"data-slot":"sheet-content",className:x,...a,children:[t,c]})]}),e[15]=t,e[16]=a,e[17]=x,e[18]=c,e[19]=v):v=e[19],v}function ee(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function te(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(P,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(A,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const ae="15rem",le="18rem",ie="4.5rem",E=T.createContext(null);function I(){const i=T.useContext(E);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function be(i){const e=b.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:l}=i,d=s===void 0?!1:s,n=K(),[r,m]=T.useState(d),[u,h]=T.useState(!1),f=a!==void 0,p=f?a:r;let x;e[0]!==f||e[1]!==l?(x=$=>{f||m($),l?.($)},e[0]=f,e[1]=l,e[2]=x):x=e[2];const c=x;let v;e[3]!==n||e[4]!==p||e[5]!==c?(v=()=>{n?h(oe):c(!p)},e[3]=n,e[4]=p,e[5]=c,e[6]=v):v=e[6];const y=v,w=p?"expanded":"collapsed";let j;e[7]!==n||e[8]!==p||e[9]!==u||e[10]!==c||e[11]!==w||e[12]!==y?(j={state:w,open:p,setOpen:c,isMobile:n,openMobile:u,setOpenMobile:h,toggleSidebar:y},e[7]=n,e[8]=p,e[9]=u,e[10]=c,e[11]=w,e[12]=y,e[13]=j):j=e[13];const S=j;let N;e[14]!==t?(N=o.jsx(z,{delayDuration:0,children:t}),e[14]=t,e[15]=N):N=e[15];let C;return e[16]!==S||e[17]!==N?(C=o.jsx(E.Provider,{value:S,children:N}),e[16]=S,e[17]=N,e[18]=C):C=e[18],C}function oe(i){return!i}function me(i){const e=b.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let d;e[5]!==l?(d={"--sidebar-width":ae,"--sidebar-width-icon":ie,...l},e[5]=l,e[6]=d):d=e[6];const n=d;let r;e[7]!==s?(r=g("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=r):r=e[8];let m;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==r?(m=o.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:r,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=r,e[13]=m):m=e[13],m}function he(i){const e=b.c(36);let t,s,a,l,d;e[0]!==i?({side:l,variant:d,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"left":l,r=d===void 0?"sidebar":d,{isMobile:m,state:u,openMobile:h,setOpenMobile:f}=I();if(m){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":le},e[6]=C):C=e[6];let $;e[7]===Symbol.for("react.memo_cache_sentinel")?($=o.jsxs(ee,{className:"sr-only",children:[o.jsx(te,{children:"Sidebar"}),o.jsx(se,{children:"Displays the mobile sidebar."})]}),e[7]=$):$=e[7];let _;e[8]!==t?(_=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=_):_=e[9];let M;e[10]!==n||e[11]!==_?(M=o.jsxs(Z,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[$,_]}),e[10]=n,e[11]=_,e[12]=M):M=e[12];let O;return e[13]!==h||e[14]!==a||e[15]!==f||e[16]!==M?(O=o.jsx(U,{open:h,onOpenChange:f,...a,children:M}),e[13]=h,e[14]=a,e[15]=f,e[16]=M,e[17]=O):O=e[17],O}const p=u==="expanded",x=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let c;e[18]!==x?(c=g("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",x),e[18]=x,e[19]=c):c=e[19];const v=p?void 0:"icon",y=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let w;e[20]!==s||e[21]!==y?(w=g("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=w):w=e[22];let j;e[23]!==t?(j=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let S;e[25]!==a||e[26]!==w||e[27]!==j?(S=o.jsx("div",{"data-slot":"sidebar-container",className:w,...a,children:j}),e[25]=a,e[26]=w,e[27]=j,e[28]=S):S=e[28];let N;return e[29]!==n||e[30]!==u||e[31]!==c||e[32]!==v||e[33]!==S||e[34]!==r?(N=o.jsx("div",{className:c,"data-state":u,"data-collapsible":v,"data-variant":r,"data-side":n,"data-slot":"sidebar",children:S}),e[29]=n,e[30]=u,e[31]=c,e[32]=v,e[33]=S,e[34]=r,e[35]=N):N=e[35],N}function xe(i){const e=b.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=I();let d;e[4]!==t?(d=g("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==l?(n=p=>{s?.(p),l()},e[6]=s,e[7]=l,e[8]=n):n=e[8];let r,m;e[9]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(J,{}),m=o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=r,e[10]=m):(r=e[9],m=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=o.jsx(B,{asChild:!0,children:o.jsxs(q,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[r,m]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",o.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(ne)})]}),e[15]=h):h=e[15];let f;return e[16]!==u?(f=o.jsx(z,{delayDuration:300,children:o.jsxs(k,{children:[u,h]})}),e[16]=u,e[17]=f):f=e[17],f}function ne(i){return o.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function ge(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ve(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function je(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function we(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ne(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ye(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ce(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function $e(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const re=F("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function _e(i){const e=b.c(28);let t,s,a,l,d,n,r;e[0]!==i?({asChild:a,isActive:l,variant:d,size:n,tooltip:r,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d,e[6]=n,e[7]=r):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5],n=e[6],r=e[7]);const m=a===void 0?!1:a,u=l===void 0?!1:l,h=d===void 0?"default":d,f=n===void 0?"default":n,p=m?G:"button",{isMobile:x}=I();let c;e[8]!==t||e[9]!==f||e[10]!==h?(c=g(re({variant:h,size:f}),t),e[8]=t,e[9]=f,e[10]=h,e[11]=c):c=e[11];let v;e[12]!==p||e[13]!==u||e[14]!==s||e[15]!==f||e[16]!==c?(v=o.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":u,className:c,...s}),e[12]=p,e[13]=u,e[14]=s,e[15]=f,e[16]=c,e[17]=v):v=e[17];const y=v;if(!r)return y;if(typeof r=="string"){let N;e[18]!==r?(N={children:r},e[18]=r,e[19]=N):N=e[19],r=N}let w;e[20]!==y?(w=o.jsx(B,{asChild:!0,children:y}),e[20]=y,e[21]=w):w=e[21];let j;e[22]!==x||e[23]!==r?(j=o.jsx(D,{side:"right",align:"center",hidden:x,...r}),e[22]=x,e[23]=r,e[24]=j):j=e[24];let S;return e[25]!==w||e[26]!==j?(S=o.jsxs(k,{children:[w,j]}),e[25]=w,e[26]=j,e[27]=S):S=e[27],S}export{Se as S,ye as a,Ce as b,_e as c,$e as d,we as e,ve as f,Ne as g,he as h,je as i,ge as j,me as k,be as l,te as m,se as n,ee as o,Z as p,U as q,xe as r,I as u};
@@ -1 +1 @@
1
- import{c as n,m as c,j as i}from"./index-DN0HZ17-.js";function r(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{r as S};
1
+ import{c as n,m as c,j as i}from"./index-CrsyTcKf.js";function r(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{r as S};
@@ -1 +1 @@
1
- import{b as B,F as L,r as v,j as e,B as u,p as C,t as c,c as k}from"./index-DN0HZ17-.js";import{D as z}from"./domain-settings-2cPDNbax.js";import{P as x}from"./index-CLUtnbmj.js";import{A as T,a as O,b as R,c as F,e as q,f as M,g as U}from"./alert-dialog-D0Xq8-G9.js";import{I as d}from"./input-XEOAcRsc.js";import{S as $}from"./switch-D_ktzN7d.js";import{a as H,b as G,c as J,d as K}from"./use-org-sso-BjjzVM0-.js";import{c as Q,S as y,a as E,b as a,d as D}from"./settings-section-B9o0Klab.js";import{s as V}from"./Trash01-f3EzsFdS.js";import{R as W}from"./require-capability-DTeTKRoi.js";import"./studio-tools-BqrxGZ2p.js";import"./badge-VPmrT2oL.js";import"./select-Yp6zWcx9.js";import"./tooltip-BQ_WAZuK.js";import"./Check-6UeSvTCG.js";import"./ChevronDown-PrZIeYJI.js";import"./ChevronUp-DUxdEAbV.js";import"./sidebar-CxX25qbL.js";import"./LayoutLeft-B9EFHxoy.js";import"./use-mobile-DbI9XSa2.js";import"./X-C817Fvj3.js";import"./card-YiZHzhvM.js";import"./ArrowUpRight-BMajILyG.js";import"./use-capability-qohmF9nn.js";import"./access-gate-D4eVzN6w.js";import"./capability-load-error-xVDo-Vjh.js";function X(){const s=B(),{org:o}=L(),{data:f,isLoading:P}=H(o.id,o.slug),h=G(o.id,o.slug),p=J(o.id,o.slug),b=K(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,S]=v.useState(!1),[I,j]=v.useState(!1),m=f?.configured&&f.config,n=f?.config,N=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),S(!0)},_=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await h.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),S(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await p.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),S(!1),j(!1)}catch{c.error(s("settings.orgSso.removeSsoConfigError"))}},A=async t=>{try{await b.mutateAsync(t),C("sso_enforcement_toggled",{organization_id:o.id,enforced:t}),c.success(s(t?"settings.orgSso.enforcementEnabledSuccess":"settings.orgSso.enforcementDisabledSuccess"))}catch{c.error(s("settings.orgSso.toggleEnforcementError"))}};return e.jsxs(x,{children:[e.jsx(x.Content,{children:e.jsx(x.Body,{children:e.jsxs(Q,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(z,{}),P?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[m&&!g&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx($,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:p.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(V,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:N,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>S(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:_,disabled:h.isPending,size:"sm",children:h.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(T,{open:I,onOpenChange:j,children:e.jsxs(O,{children:[e.jsx(R,{children:e.jsx(F,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(q,{children:[e.jsx(M,{disabled:p.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx(U,{onClick:w,disabled:p.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.orgSso.removeButton")})]})]})})]})}function Ee(){const s=k.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(W,{capability:"org:manage",area:"security",children:e.jsx(X,{})}),s[0]=o):o=s[0],o}export{Ee as default};
1
+ import{b as B,F as L,r as v,j as e,B as u,p as C,t as c,c as k}from"./index-CrsyTcKf.js";import{D as z}from"./domain-settings-Bj_-Ur1-.js";import{P as x}from"./index-ojgQlW3D.js";import{A as T,a as O,b as R,c as F,e as q,f as M,g as U}from"./alert-dialog-ORevJurf.js";import{I as d}from"./input-CNOI6m9-.js";import{S as $}from"./switch-CtaVMESx.js";import{a as H,b as G,c as J,d as K}from"./use-org-sso-DTW9mwBx.js";import{c as Q,S as y,a as E,b as a,d as D}from"./settings-section-BbiP48JV.js";import{s as V}from"./Trash01-Bv5gqOZN.js";import{R as W}from"./require-capability-B9yaVpBc.js";import"./studio-tools-C7-EPYVg.js";import"./badge-DMih-jJE.js";import"./select-nrzuayK7.js";import"./tooltip-CJ7iUP_Y.js";import"./Check-BjHUTESx.js";import"./ChevronDown-Bwqdwd9f.js";import"./ChevronUp-CQn0ohUc.js";import"./sidebar-CxoCSS7P.js";import"./LayoutLeft-B2Qy9IsH.js";import"./use-mobile-Cg29r57v.js";import"./X-4rHxalja.js";import"./card-DmHlzhtm.js";import"./ArrowUpRight-gsGGZTp8.js";import"./use-capability-CE8fJx7X.js";import"./access-gate-DTa1uKLS.js";import"./capability-load-error-DwezOip8.js";function X(){const s=B(),{org:o}=L(),{data:f,isLoading:P}=H(o.id,o.slug),h=G(o.id,o.slug),p=J(o.id,o.slug),b=K(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,S]=v.useState(!1),[I,j]=v.useState(!1),m=f?.configured&&f.config,n=f?.config,N=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),S(!0)},_=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await h.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),S(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await p.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),S(!1),j(!1)}catch{c.error(s("settings.orgSso.removeSsoConfigError"))}},A=async t=>{try{await b.mutateAsync(t),C("sso_enforcement_toggled",{organization_id:o.id,enforced:t}),c.success(s(t?"settings.orgSso.enforcementEnabledSuccess":"settings.orgSso.enforcementDisabledSuccess"))}catch{c.error(s("settings.orgSso.toggleEnforcementError"))}};return e.jsxs(x,{children:[e.jsx(x.Content,{children:e.jsx(x.Body,{children:e.jsxs(Q,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(z,{}),P?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[m&&!g&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx($,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:p.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(V,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:N,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>S(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:_,disabled:h.isPending,size:"sm",children:h.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(T,{open:I,onOpenChange:j,children:e.jsxs(O,{children:[e.jsx(R,{children:e.jsx(F,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(q,{children:[e.jsx(M,{disabled:p.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx(U,{onClick:w,disabled:p.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.orgSso.removeButton")})]})]})})]})}function Ee(){const s=k.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(W,{capability:"org:manage",area:"security",children:e.jsx(X,{})}),s[0]=o):o=s[0],o}export{Ee as default};
@@ -1 +1 @@
1
- import{c as J,b as Z,j as i,r as V,E as pe,F as ue,o as Se,B as X,d as xe,f as he,p as ae,K as ye,e as je,t as ge}from"./index-DN0HZ17-.js";import{i as ve}from"./AlertCircle-CvrFlbkJ.js";import{i as Ce}from"./ChevronRight-C_ghEWr4.js";import{s as be}from"./Plus-Be-2uE6V.js";import{s as _e}from"./Trash01-f3EzsFdS.js";import{I as re}from"./input-XEOAcRsc.js";import{S as de}from"./switch-D_ktzN7d.js";import{S as Re}from"./skeleton-A0lFbrF1.js";import{A as me}from"./avatar-DysBv2rW.js";import{P as ke,a as Ne,b as Pe}from"./popover-DW5BZnQk.js";import{b as fe}from"./use-connection-BoYd4xWj.js";import{W as ne}from"./use-mcp-client-DkKrtwqw.js";import{P as te}from"./index-CLUtnbmj.js";import{u as Te}from"./use-registry-connections-DUwE9JEd.js";import{j as we,k as Ae}from"./use-organization-settings-DL4y3UNb.js";import{c as ze,b as H,a as ie,S as le}from"./settings-section-B9o0Klab.js";import{R as Ee}from"./require-capability-DTeTKRoi.js";import"./User01-Bs_7qy3O.js";import"./auth-r_R7jlRX.js";import"./sidebar-CxX25qbL.js";import"./LayoutLeft-B9EFHxoy.js";import"./use-mobile-DbI9XSa2.js";import"./X-C817Fvj3.js";import"./tooltip-BQ_WAZuK.js";import"./studio-tools-BqrxGZ2p.js";import"./card-YiZHzhvM.js";import"./ArrowUpRight-BMajILyG.js";import"./use-capability-qohmF9nn.js";import"./access-gate-D4eVzN6w.js";import"./capability-load-error-xVDo-Vjh.js";function Me(t){const e=J.c(6),{error:l}=t,c=Z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(ve,{size:16}),e[0]=s):s=e[0];let o;e[1]!==c?(o=c("settings.orgStore.failedLoadStoreSettings"),e[1]=c,e[2]=o):o=e[2];let r;return e[3]!==l.message||e[4]!==o?(r=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[s,i.jsxs("span",{className:"text-sm font-medium",children:[o," ",l.message]})]}),e[3]=l.message,e[4]=o,e[5]=r):r=e[5],r}function $e(t){const e=J.c(74),{onCancel:l,onSuccess:c}=t,s=Z(),o=fe(),[r,u]=V.useState(""),[a,A]=V.useState(""),[S,_]=V.useState("");let j;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==S||e[4]!==a?(j=async()=>(await o.create.mutateAsync({title:r||s("settings.orgStore.privateRegistry"),description:s("settings.orgStore.privateMcpRegistry"),connection_type:"HTTP",connection_url:a,connection_token:S||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=o,e[1]=r,e[2]=s,e[3]=S,e[4]=a,e[5]=j):j=e[5];let d;e[6]!==c||e[7]!==s?(d=y=>{ae("store_private_registry_added",{connection_id:y}),ge.success(s("settings.orgStore.privateRegistryAdded")),c(y)},e[6]=c,e[7]=s,e[8]=d):d=e[8];let x;e[9]!==s?(x=y=>{ge.error(s("settings.orgStore.failedAddRegistry",{error:y.message}))},e[9]=s,e[10]=x):x=e[10];let m;e[11]!==j||e[12]!==d||e[13]!==x?(m={mutationFn:j,onSuccess:d,onError:x},e[11]=j,e[12]=d,e[13]=x,e[14]=m):m=e[14];const{mutate:v,isPending:g}=je(m);let h;e[15]!==s?(h=s("settings.orgStore.nameLabel"),e[15]=s,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("settings.orgStore.namePlaceholder"),e[17]=s,e[18]=f):f=e[18];let p;e[19]===Symbol.for("react.memo_cache_sentinel")?(p=y=>u(y.target.value),e[19]=p):p=e[19];let C;e[20]!==r||e[21]!==f?(C=i.jsx(re,{placeholder:f,value:r,onChange:p,className:"w-[280px]"}),e[20]=r,e[21]=f,e[22]=C):C=e[22];let R;e[23]!==h||e[24]!==C?(R=i.jsx(H,{title:h,action:C}),e[23]=h,e[24]=C,e[25]=R):R=e[25];let F;e[26]!==s?(F=s("settings.orgStore.registryUrlLabel"),e[26]=s,e[27]=F):F=e[27];let U;e[28]!==s?(U=s("settings.orgStore.registryUrlPlaceholder"),e[28]=s,e[29]=U):U=e[29];let q;e[30]===Symbol.for("react.memo_cache_sentinel")?(q=y=>A(y.target.value),e[30]=q):q=e[30];let B;e[31]!==U||e[32]!==a?(B=i.jsx(re,{placeholder:U,value:a,onChange:q,className:"w-[280px]"}),e[31]=U,e[32]=a,e[33]=B):B=e[33];let O;e[34]!==F||e[35]!==B?(O=i.jsx(H,{title:F,action:B}),e[34]=F,e[35]=B,e[36]=O):O=e[36];let z;e[37]!==s?(z=s("settings.orgStore.authTokenLabel"),e[37]=s,e[38]=z):z=e[38];let b;e[39]!==s?(b=s("settings.orgStore.optional"),e[39]=s,e[40]=b):b=e[40];let E;e[41]!==s?(E=s("settings.orgStore.authTokenPlaceholder"),e[41]=s,e[42]=E):E=e[42];let Y;e[43]===Symbol.for("react.memo_cache_sentinel")?(Y=y=>_(y.target.value),e[43]=Y):Y=e[43];let M;e[44]!==E||e[45]!==S?(M=i.jsx(re,{type:"password",placeholder:E,value:S,onChange:Y,className:"w-[280px]"}),e[44]=E,e[45]=S,e[46]=M):M=e[46];let I;e[47]!==z||e[48]!==b||e[49]!==M?(I=i.jsx(H,{title:z,description:b,action:M}),e[47]=z,e[48]=b,e[49]=M,e[50]=I):I=e[50];let k;e[51]!==s?(k=s("settings.orgStore.cancel"),e[51]=s,e[52]=k):k=e[52];let D;e[53]!==g||e[54]!==l||e[55]!==k?(D=i.jsx(X,{variant:"ghost",size:"sm",onClick:l,disabled:g,children:k}),e[53]=g,e[54]=l,e[55]=k,e[56]=D):D=e[56];let N;e[57]!==v?(N=()=>v(),e[57]=v,e[58]=N):N=e[58];const L=!a||g;let P;e[59]!==g||e[60]!==s?(P=s(g?"settings.orgStore.adding":"settings.orgStore.addRegistry"),e[59]=g,e[60]=s,e[61]=P):P=e[61];let T;e[62]!==N||e[63]!==L||e[64]!==P?(T=i.jsx(X,{size:"sm",onClick:N,disabled:L,children:P}),e[62]=N,e[63]=L,e[64]=P,e[65]=T):T=e[65];let w;e[66]!==D||e[67]!==T?(w=i.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[D,T]}),e[66]=D,e[67]=T,e[68]=w):w=e[68];let $;return e[69]!==O||e[70]!==I||e[71]!==w||e[72]!==R?($=i.jsxs(ie,{children:[R,O,I,w]}),e[69]=O,e[70]=I,e[71]=w,e[72]=R,e[73]=$):$=e[73],$}function se(t){const e=J.c(30),{name:l,description:c,icon:s,enabled:o,onToggle:r,onDelete:u,href:a}=t,A=Z(),S=xe();let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_={from:"/shell/$org"},e[0]=_):_=e[0];const{org:j}=he(_);let d;e[1]!==o||e[2]!==a||e[3]!==S||e[4]!==r||e[5]!==j?(d=()=>{a?S({to:a,params:{org:j}}):r(!o)},e[1]=o,e[2]=a,e[3]=S,e[4]=r,e[5]=j,e[6]=d):d=e[6];const x=d;let m;e[7]!==s||e[8]!==l?(m=s?i.jsx("img",{src:s,alt:l,className:"size-8 rounded-md object-contain"}):i.jsx(me,{fallback:l.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=s,e[8]=l,e[9]=m):m=e[9];let v;e[10]!==u||e[11]!==A?(v=u&&i.jsxs(ke,{children:[i.jsx(Ne,{asChild:!0,children:i.jsx(X,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ie,children:i.jsx(_e,{size:14})})}),i.jsx(Pe,{className:"w-auto p-2",align:"end",children:i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("p",{className:"text-xs font-medium",children:A("settings.orgStore.removeRegistry")}),i.jsx(X,{variant:"destructive",size:"xs",onClick:R=>{R.stopPropagation(),u()},children:A("settings.orgStore.remove")})]})})]}),e[10]=u,e[11]=A,e[12]=v):v=e[12];let g;e[13]!==r?(g=R=>r(R),e[13]=r,e[14]=g):g=e[14];let h;e[15]!==o||e[16]!==g?(h=i.jsx(de,{checked:o,onClick:Fe,onCheckedChange:g}),e[15]=o,e[16]=g,e[17]=h):h=e[17];let f;e[18]!==a?(f=a&&i.jsx(Ce,{size:14,className:"text-muted-foreground"}),e[18]=a,e[19]=f):f=e[19];let p;e[20]!==v||e[21]!==h||e[22]!==f?(p=i.jsxs("div",{className:"flex items-center gap-2",children:[v,h,f]}),e[20]=v,e[21]=h,e[22]=f,e[23]=p):p=e[23];let C;return e[24]!==c||e[25]!==x||e[26]!==l||e[27]!==m||e[28]!==p?(C=i.jsx(H,{title:l,description:c,onClick:x,icon:m,action:p}),e[24]=c,e[25]=x,e[26]=l,e[27]=m,e[28]=p,e[29]=C):C=e[29],C}function Fe(t){return t.stopPropagation()}function Ie(t){return t.stopPropagation()}function De(){const t=J.c(78),e=Z(),{org:l}=ue(),c=Te(),s=fe(),o=we(),{mutateAsync:r}=Ae(),u=Se(),[a,A]=V.useState(!1);let S,_,j,d,x,m;if(t[0]!==s||t[1]!==l.id||t[2]!==u||t[3]!==o||t[4]!==c||t[5]!==a||t[6]!==e||t[7]!==r){const f=ne.REGISTRY(l.id),p=n=>{if(!o)return n===f;const K=o.registries[n];return K?K.enabled:n===f},C=ne.COMMUNITY_REGISTRY(l.id),R=c.find(n=>n.id===f),F=c.find(n=>n.id===C||n.id==="community-registry"),U=F?.id??C,q=ne.SELF(l.id),B=new Set([f,C,"community-registry",q]),O=c.filter(n=>!B.has(n.id));let z;t[14]!==o||t[15]!==r?(z=async(n,K)=>{ae("store_registry_toggled",{connection_id:n,enabled:K});const ce=o??{registries:{},blockedMcps:[]};await r({...ce,registries:{...ce.registries,[n]:{enabled:K}}})},t[14]=o,t[15]=r,t[16]=z):z=t[16];const b=z;let E;t[17]!==s||t[18]!==l.id||t[19]!==u?(E=async n=>{ae("store_private_registry_removed",{connection_id:n}),await s.delete.mutateAsync(n),u.invalidateQueries({queryKey:ye.organizationSettings(l.id)})},t[17]=s,t[18]=l.id,t[19]=u,t[20]=E):E=t[20];const Y=E;let M;t[21]!==o||t[22]!==r?(M=async n=>{A(!1);const K=o??{registries:{},blockedMcps:[]};await r({...K,registries:{...K.registries,[n]:{enabled:!0}}})},t[21]=o,t[22]=r,t[23]=M):M=t[23];const I=M;let k;t[24]!==e?(k=e("settings.orgStore.decoStoreSection"),t[24]=e,t[25]=k):k=t[25];const D=R?i.jsx(se,{name:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.decoStoreDescription"),icon:R.icon,enabled:p(f),onToggle:n=>b(f,n)}):i.jsx(H,{title:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.connectionNotFound")});let N;t[26]!==D?(N=i.jsx(ie,{children:D}),t[26]=D,t[27]=N):N=t[27],t[28]!==k||t[29]!==N?(x=i.jsx(le,{title:k,children:N}),t[28]=k,t[29]=N,t[30]=x):x=t[30];let L;t[31]!==e?(L=e("settings.orgStore.privateRegistriesSection"),t[31]=e,t[32]=L):L=t[32];let P;t[33]!==a||t[34]!==e?(P=a?void 0:i.jsxs(X,{variant:"outline",size:"sm",onClick:()=>A(!0),children:[i.jsx(be,{size:14}),e("settings.orgStore.addRegistry")]}),t[33]=a,t[34]=e,t[35]=P):P=t[35];let T;t[36]!==I||t[37]!==a?(T=a&&i.jsx($e,{onCancel:()=>A(!1),onSuccess:I}),t[36]=I,t[37]=a,t[38]=T):T=t[38];let w;t[39]!==e?(w=e("settings.orgStore.privateRegistry"),t[39]=e,t[40]=w):w=t[40];let $;t[41]!==e?($=e("settings.orgStore.privateRegistryDescription"),t[41]=e,t[42]=$):$=t[42];let y;t[43]!==p?(y=p("self"),t[43]=p,t[44]=y):y=t[44];let G;t[45]!==b?(G=n=>b("self",n),t[45]=b,t[46]=G):G=t[46];let Q;t[47]!==w||t[48]!==$||t[49]!==y||t[50]!==G?(Q=i.jsx(se,{name:w,description:$,enabled:y,onToggle:G,href:"/$org/settings/store/registry"}),t[47]=w,t[48]=$,t[49]=y,t[50]=G,t[51]=Q):Q=t[51];let ee;t[52]!==Y||t[53]!==b||t[54]!==p||t[55]!==e?(ee=n=>i.jsx(se,{name:n.title,description:n.description??e("settings.orgStore.privateMcpRegistry"),icon:n.icon,enabled:p(n.id),onToggle:K=>b(n.id,K),onDelete:()=>Y(n.id)},n.id),t[52]=Y,t[53]=b,t[54]=p,t[55]=e,t[56]=ee):ee=t[56];const oe=O.map(ee);let W;t[57]!==Q||t[58]!==oe?(W=i.jsxs(ie,{children:[Q,oe]}),t[57]=Q,t[58]=oe,t[59]=W):W=t[59],t[60]!==L||t[61]!==P||t[62]!==T||t[63]!==W?(m=i.jsxs(le,{title:L,actions:P,children:[T,W]}),t[60]=L,t[61]=P,t[62]=T,t[63]=W,t[64]=m):m=t[64],_=le,t[65]!==e?(d=e("settings.orgStore.communitySection"),t[65]=e,t[66]=d):d=t[66],S=ie,j=F?i.jsx(se,{name:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryDescription"),icon:F.icon,enabled:p(U),onToggle:n=>b(U,n)}):i.jsx(H,{title:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryNotAdded"),icon:i.jsx(me,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:i.jsx(de,{checked:!1,disabled:!0,onCheckedChange:Le})}),t[0]=s,t[1]=l.id,t[2]=u,t[3]=o,t[4]=c,t[5]=a,t[6]=e,t[7]=r,t[8]=S,t[9]=_,t[10]=j,t[11]=d,t[12]=x,t[13]=m}else S=t[8],_=t[9],j=t[10],d=t[11],x=t[12],m=t[13];let v;t[67]!==S||t[68]!==j?(v=i.jsx(S,{children:j}),t[67]=S,t[68]=j,t[69]=v):v=t[69];let g;t[70]!==_||t[71]!==d||t[72]!==v?(g=i.jsx(_,{title:d,children:v}),t[70]=_,t[71]=d,t[72]=v,t[73]=g):g=t[73];let h;return t[74]!==x||t[75]!==m||t[76]!==g?(h=i.jsxs(i.Fragment,{children:[x,m,g]}),t[74]=x,t[75]=m,t[76]=g,t[77]=h):h=t[77],h}function Le(){}function Ke(){const t=J.c(13),e=Z();let l;t[0]!==e?(l=A=>{const{error:S}=A;return i.jsx(Me,{error:S??new Error(e("settings.orgStore.failedLoadStoreSettings"))})},t[0]=e,t[1]=l):l=t[1];let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(Re,{className:"h-64 w-full"}),t[2]=c):c=t[2];let s;t[3]!==e?(s=e("settings.orgStore.pageTitle"),t[3]=e,t[4]=s):s=t[4];let o;t[5]!==s?(o=i.jsx(te.Title,{children:s}),t[5]=s,t[6]=o):o=t[6];let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{}),t[7]=r):r=t[7];let u;t[8]!==o?(u=i.jsx(V.Suspense,{fallback:c,children:i.jsx(te,{children:i.jsx(te.Content,{children:i.jsx(te.Body,{children:i.jsxs(ze,{children:[o,r]})})})})}),t[8]=o,t[9]=u):u=t[9];let a;return t[10]!==l||t[11]!==u?(a=i.jsx(pe,{fallback:l,children:u}),t[10]=l,t[11]=u,t[12]=a):a=t[12],a}function xt(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(Ee,{capability:"registry:manage",area:"the store",children:i.jsx(Ke,{})}),t[0]=e):e=t[0],e}export{xt as default};
1
+ import{c as J,b as Z,j as i,r as V,E as pe,F as ue,o as Se,B as X,d as xe,f as he,p as ae,K as ye,e as je,t as ge}from"./index-CrsyTcKf.js";import{i as ve}from"./AlertCircle-DOdV26SG.js";import{i as Ce}from"./ChevronRight-BtvC9VHm.js";import{s as be}from"./Plus-BFDzpqlA.js";import{s as _e}from"./Trash01-Bv5gqOZN.js";import{I as re}from"./input-CNOI6m9-.js";import{S as de}from"./switch-CtaVMESx.js";import{S as Re}from"./skeleton-DiQ1kqhG.js";import{A as me}from"./avatar-BCIQy5tG.js";import{P as ke,a as Ne,b as Pe}from"./popover-Bgwc_Q1x.js";import{b as fe}from"./use-connection-BnOEK0c8.js";import{W as ne}from"./use-mcp-client-DvfiEO37.js";import{P as te}from"./index-ojgQlW3D.js";import{u as Te}from"./use-registry-connections-NTS_m7o_.js";import{j as we,k as Ae}from"./use-organization-settings-BDBrKj0Z.js";import{c as ze,b as H,a as ie,S as le}from"./settings-section-BbiP48JV.js";import{R as Ee}from"./require-capability-B9yaVpBc.js";import"./User01-BzHjHKhU.js";import"./auth-DgMDRN9a.js";import"./sidebar-CxoCSS7P.js";import"./LayoutLeft-B2Qy9IsH.js";import"./use-mobile-Cg29r57v.js";import"./X-4rHxalja.js";import"./tooltip-CJ7iUP_Y.js";import"./studio-tools-C7-EPYVg.js";import"./card-DmHlzhtm.js";import"./ArrowUpRight-gsGGZTp8.js";import"./use-capability-CE8fJx7X.js";import"./access-gate-DTa1uKLS.js";import"./capability-load-error-DwezOip8.js";function Me(t){const e=J.c(6),{error:l}=t,c=Z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(ve,{size:16}),e[0]=s):s=e[0];let o;e[1]!==c?(o=c("settings.orgStore.failedLoadStoreSettings"),e[1]=c,e[2]=o):o=e[2];let r;return e[3]!==l.message||e[4]!==o?(r=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[s,i.jsxs("span",{className:"text-sm font-medium",children:[o," ",l.message]})]}),e[3]=l.message,e[4]=o,e[5]=r):r=e[5],r}function $e(t){const e=J.c(74),{onCancel:l,onSuccess:c}=t,s=Z(),o=fe(),[r,u]=V.useState(""),[a,A]=V.useState(""),[S,_]=V.useState("");let j;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==S||e[4]!==a?(j=async()=>(await o.create.mutateAsync({title:r||s("settings.orgStore.privateRegistry"),description:s("settings.orgStore.privateMcpRegistry"),connection_type:"HTTP",connection_url:a,connection_token:S||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=o,e[1]=r,e[2]=s,e[3]=S,e[4]=a,e[5]=j):j=e[5];let d;e[6]!==c||e[7]!==s?(d=y=>{ae("store_private_registry_added",{connection_id:y}),ge.success(s("settings.orgStore.privateRegistryAdded")),c(y)},e[6]=c,e[7]=s,e[8]=d):d=e[8];let x;e[9]!==s?(x=y=>{ge.error(s("settings.orgStore.failedAddRegistry",{error:y.message}))},e[9]=s,e[10]=x):x=e[10];let m;e[11]!==j||e[12]!==d||e[13]!==x?(m={mutationFn:j,onSuccess:d,onError:x},e[11]=j,e[12]=d,e[13]=x,e[14]=m):m=e[14];const{mutate:v,isPending:g}=je(m);let h;e[15]!==s?(h=s("settings.orgStore.nameLabel"),e[15]=s,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("settings.orgStore.namePlaceholder"),e[17]=s,e[18]=f):f=e[18];let p;e[19]===Symbol.for("react.memo_cache_sentinel")?(p=y=>u(y.target.value),e[19]=p):p=e[19];let C;e[20]!==r||e[21]!==f?(C=i.jsx(re,{placeholder:f,value:r,onChange:p,className:"w-[280px]"}),e[20]=r,e[21]=f,e[22]=C):C=e[22];let R;e[23]!==h||e[24]!==C?(R=i.jsx(H,{title:h,action:C}),e[23]=h,e[24]=C,e[25]=R):R=e[25];let F;e[26]!==s?(F=s("settings.orgStore.registryUrlLabel"),e[26]=s,e[27]=F):F=e[27];let U;e[28]!==s?(U=s("settings.orgStore.registryUrlPlaceholder"),e[28]=s,e[29]=U):U=e[29];let q;e[30]===Symbol.for("react.memo_cache_sentinel")?(q=y=>A(y.target.value),e[30]=q):q=e[30];let B;e[31]!==U||e[32]!==a?(B=i.jsx(re,{placeholder:U,value:a,onChange:q,className:"w-[280px]"}),e[31]=U,e[32]=a,e[33]=B):B=e[33];let O;e[34]!==F||e[35]!==B?(O=i.jsx(H,{title:F,action:B}),e[34]=F,e[35]=B,e[36]=O):O=e[36];let z;e[37]!==s?(z=s("settings.orgStore.authTokenLabel"),e[37]=s,e[38]=z):z=e[38];let b;e[39]!==s?(b=s("settings.orgStore.optional"),e[39]=s,e[40]=b):b=e[40];let E;e[41]!==s?(E=s("settings.orgStore.authTokenPlaceholder"),e[41]=s,e[42]=E):E=e[42];let Y;e[43]===Symbol.for("react.memo_cache_sentinel")?(Y=y=>_(y.target.value),e[43]=Y):Y=e[43];let M;e[44]!==E||e[45]!==S?(M=i.jsx(re,{type:"password",placeholder:E,value:S,onChange:Y,className:"w-[280px]"}),e[44]=E,e[45]=S,e[46]=M):M=e[46];let I;e[47]!==z||e[48]!==b||e[49]!==M?(I=i.jsx(H,{title:z,description:b,action:M}),e[47]=z,e[48]=b,e[49]=M,e[50]=I):I=e[50];let k;e[51]!==s?(k=s("settings.orgStore.cancel"),e[51]=s,e[52]=k):k=e[52];let D;e[53]!==g||e[54]!==l||e[55]!==k?(D=i.jsx(X,{variant:"ghost",size:"sm",onClick:l,disabled:g,children:k}),e[53]=g,e[54]=l,e[55]=k,e[56]=D):D=e[56];let N;e[57]!==v?(N=()=>v(),e[57]=v,e[58]=N):N=e[58];const L=!a||g;let P;e[59]!==g||e[60]!==s?(P=s(g?"settings.orgStore.adding":"settings.orgStore.addRegistry"),e[59]=g,e[60]=s,e[61]=P):P=e[61];let T;e[62]!==N||e[63]!==L||e[64]!==P?(T=i.jsx(X,{size:"sm",onClick:N,disabled:L,children:P}),e[62]=N,e[63]=L,e[64]=P,e[65]=T):T=e[65];let w;e[66]!==D||e[67]!==T?(w=i.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[D,T]}),e[66]=D,e[67]=T,e[68]=w):w=e[68];let $;return e[69]!==O||e[70]!==I||e[71]!==w||e[72]!==R?($=i.jsxs(ie,{children:[R,O,I,w]}),e[69]=O,e[70]=I,e[71]=w,e[72]=R,e[73]=$):$=e[73],$}function se(t){const e=J.c(30),{name:l,description:c,icon:s,enabled:o,onToggle:r,onDelete:u,href:a}=t,A=Z(),S=xe();let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_={from:"/shell/$org"},e[0]=_):_=e[0];const{org:j}=he(_);let d;e[1]!==o||e[2]!==a||e[3]!==S||e[4]!==r||e[5]!==j?(d=()=>{a?S({to:a,params:{org:j}}):r(!o)},e[1]=o,e[2]=a,e[3]=S,e[4]=r,e[5]=j,e[6]=d):d=e[6];const x=d;let m;e[7]!==s||e[8]!==l?(m=s?i.jsx("img",{src:s,alt:l,className:"size-8 rounded-md object-contain"}):i.jsx(me,{fallback:l.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=s,e[8]=l,e[9]=m):m=e[9];let v;e[10]!==u||e[11]!==A?(v=u&&i.jsxs(ke,{children:[i.jsx(Ne,{asChild:!0,children:i.jsx(X,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ie,children:i.jsx(_e,{size:14})})}),i.jsx(Pe,{className:"w-auto p-2",align:"end",children:i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("p",{className:"text-xs font-medium",children:A("settings.orgStore.removeRegistry")}),i.jsx(X,{variant:"destructive",size:"xs",onClick:R=>{R.stopPropagation(),u()},children:A("settings.orgStore.remove")})]})})]}),e[10]=u,e[11]=A,e[12]=v):v=e[12];let g;e[13]!==r?(g=R=>r(R),e[13]=r,e[14]=g):g=e[14];let h;e[15]!==o||e[16]!==g?(h=i.jsx(de,{checked:o,onClick:Fe,onCheckedChange:g}),e[15]=o,e[16]=g,e[17]=h):h=e[17];let f;e[18]!==a?(f=a&&i.jsx(Ce,{size:14,className:"text-muted-foreground"}),e[18]=a,e[19]=f):f=e[19];let p;e[20]!==v||e[21]!==h||e[22]!==f?(p=i.jsxs("div",{className:"flex items-center gap-2",children:[v,h,f]}),e[20]=v,e[21]=h,e[22]=f,e[23]=p):p=e[23];let C;return e[24]!==c||e[25]!==x||e[26]!==l||e[27]!==m||e[28]!==p?(C=i.jsx(H,{title:l,description:c,onClick:x,icon:m,action:p}),e[24]=c,e[25]=x,e[26]=l,e[27]=m,e[28]=p,e[29]=C):C=e[29],C}function Fe(t){return t.stopPropagation()}function Ie(t){return t.stopPropagation()}function De(){const t=J.c(78),e=Z(),{org:l}=ue(),c=Te(),s=fe(),o=we(),{mutateAsync:r}=Ae(),u=Se(),[a,A]=V.useState(!1);let S,_,j,d,x,m;if(t[0]!==s||t[1]!==l.id||t[2]!==u||t[3]!==o||t[4]!==c||t[5]!==a||t[6]!==e||t[7]!==r){const f=ne.REGISTRY(l.id),p=n=>{if(!o)return n===f;const K=o.registries[n];return K?K.enabled:n===f},C=ne.COMMUNITY_REGISTRY(l.id),R=c.find(n=>n.id===f),F=c.find(n=>n.id===C||n.id==="community-registry"),U=F?.id??C,q=ne.SELF(l.id),B=new Set([f,C,"community-registry",q]),O=c.filter(n=>!B.has(n.id));let z;t[14]!==o||t[15]!==r?(z=async(n,K)=>{ae("store_registry_toggled",{connection_id:n,enabled:K});const ce=o??{registries:{},blockedMcps:[]};await r({...ce,registries:{...ce.registries,[n]:{enabled:K}}})},t[14]=o,t[15]=r,t[16]=z):z=t[16];const b=z;let E;t[17]!==s||t[18]!==l.id||t[19]!==u?(E=async n=>{ae("store_private_registry_removed",{connection_id:n}),await s.delete.mutateAsync(n),u.invalidateQueries({queryKey:ye.organizationSettings(l.id)})},t[17]=s,t[18]=l.id,t[19]=u,t[20]=E):E=t[20];const Y=E;let M;t[21]!==o||t[22]!==r?(M=async n=>{A(!1);const K=o??{registries:{},blockedMcps:[]};await r({...K,registries:{...K.registries,[n]:{enabled:!0}}})},t[21]=o,t[22]=r,t[23]=M):M=t[23];const I=M;let k;t[24]!==e?(k=e("settings.orgStore.decoStoreSection"),t[24]=e,t[25]=k):k=t[25];const D=R?i.jsx(se,{name:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.decoStoreDescription"),icon:R.icon,enabled:p(f),onToggle:n=>b(f,n)}):i.jsx(H,{title:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.connectionNotFound")});let N;t[26]!==D?(N=i.jsx(ie,{children:D}),t[26]=D,t[27]=N):N=t[27],t[28]!==k||t[29]!==N?(x=i.jsx(le,{title:k,children:N}),t[28]=k,t[29]=N,t[30]=x):x=t[30];let L;t[31]!==e?(L=e("settings.orgStore.privateRegistriesSection"),t[31]=e,t[32]=L):L=t[32];let P;t[33]!==a||t[34]!==e?(P=a?void 0:i.jsxs(X,{variant:"outline",size:"sm",onClick:()=>A(!0),children:[i.jsx(be,{size:14}),e("settings.orgStore.addRegistry")]}),t[33]=a,t[34]=e,t[35]=P):P=t[35];let T;t[36]!==I||t[37]!==a?(T=a&&i.jsx($e,{onCancel:()=>A(!1),onSuccess:I}),t[36]=I,t[37]=a,t[38]=T):T=t[38];let w;t[39]!==e?(w=e("settings.orgStore.privateRegistry"),t[39]=e,t[40]=w):w=t[40];let $;t[41]!==e?($=e("settings.orgStore.privateRegistryDescription"),t[41]=e,t[42]=$):$=t[42];let y;t[43]!==p?(y=p("self"),t[43]=p,t[44]=y):y=t[44];let G;t[45]!==b?(G=n=>b("self",n),t[45]=b,t[46]=G):G=t[46];let Q;t[47]!==w||t[48]!==$||t[49]!==y||t[50]!==G?(Q=i.jsx(se,{name:w,description:$,enabled:y,onToggle:G,href:"/$org/settings/store/registry"}),t[47]=w,t[48]=$,t[49]=y,t[50]=G,t[51]=Q):Q=t[51];let ee;t[52]!==Y||t[53]!==b||t[54]!==p||t[55]!==e?(ee=n=>i.jsx(se,{name:n.title,description:n.description??e("settings.orgStore.privateMcpRegistry"),icon:n.icon,enabled:p(n.id),onToggle:K=>b(n.id,K),onDelete:()=>Y(n.id)},n.id),t[52]=Y,t[53]=b,t[54]=p,t[55]=e,t[56]=ee):ee=t[56];const oe=O.map(ee);let W;t[57]!==Q||t[58]!==oe?(W=i.jsxs(ie,{children:[Q,oe]}),t[57]=Q,t[58]=oe,t[59]=W):W=t[59],t[60]!==L||t[61]!==P||t[62]!==T||t[63]!==W?(m=i.jsxs(le,{title:L,actions:P,children:[T,W]}),t[60]=L,t[61]=P,t[62]=T,t[63]=W,t[64]=m):m=t[64],_=le,t[65]!==e?(d=e("settings.orgStore.communitySection"),t[65]=e,t[66]=d):d=t[66],S=ie,j=F?i.jsx(se,{name:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryDescription"),icon:F.icon,enabled:p(U),onToggle:n=>b(U,n)}):i.jsx(H,{title:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryNotAdded"),icon:i.jsx(me,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:i.jsx(de,{checked:!1,disabled:!0,onCheckedChange:Le})}),t[0]=s,t[1]=l.id,t[2]=u,t[3]=o,t[4]=c,t[5]=a,t[6]=e,t[7]=r,t[8]=S,t[9]=_,t[10]=j,t[11]=d,t[12]=x,t[13]=m}else S=t[8],_=t[9],j=t[10],d=t[11],x=t[12],m=t[13];let v;t[67]!==S||t[68]!==j?(v=i.jsx(S,{children:j}),t[67]=S,t[68]=j,t[69]=v):v=t[69];let g;t[70]!==_||t[71]!==d||t[72]!==v?(g=i.jsx(_,{title:d,children:v}),t[70]=_,t[71]=d,t[72]=v,t[73]=g):g=t[73];let h;return t[74]!==x||t[75]!==m||t[76]!==g?(h=i.jsxs(i.Fragment,{children:[x,m,g]}),t[74]=x,t[75]=m,t[76]=g,t[77]=h):h=t[77],h}function Le(){}function Ke(){const t=J.c(13),e=Z();let l;t[0]!==e?(l=A=>{const{error:S}=A;return i.jsx(Me,{error:S??new Error(e("settings.orgStore.failedLoadStoreSettings"))})},t[0]=e,t[1]=l):l=t[1];let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(Re,{className:"h-64 w-full"}),t[2]=c):c=t[2];let s;t[3]!==e?(s=e("settings.orgStore.pageTitle"),t[3]=e,t[4]=s):s=t[4];let o;t[5]!==s?(o=i.jsx(te.Title,{children:s}),t[5]=s,t[6]=o):o=t[6];let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{}),t[7]=r):r=t[7];let u;t[8]!==o?(u=i.jsx(V.Suspense,{fallback:c,children:i.jsx(te,{children:i.jsx(te.Content,{children:i.jsx(te.Body,{children:i.jsxs(ze,{children:[o,r]})})})})}),t[8]=o,t[9]=u):u=t[9];let a;return t[10]!==l||t[11]!==u?(a=i.jsx(pe,{fallback:l,children:u}),t[10]=l,t[11]=u,t[12]=a):a=t[12],a}function xt(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(Ee,{capability:"registry:manage",area:"the store",children:i.jsx(Ke,{})}),t[0]=e):e=t[0],e}export{xt as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BVqaAmGp.js","assets/index-CrsyTcKf.js","assets/index-DSghpBCP.css","assets/Tool02-BVTC_CLA.js","assets/CheckCircle-CQl7io5M.js","assets/Settings02-DaOoUFqv.js","assets/use-mcp-client-DvfiEO37.js","assets/auth-DgMDRN9a.js","assets/useInfiniteQuery-DdT6iNdI.js","assets/use-infinite-scroll-C5XhEC2U.js","assets/studio-tools-C7-EPYVg.js","assets/badge-DMih-jJE.js","assets/input-CNOI6m9-.js","assets/dropdown-menu-Bjv_xtsa.js","assets/Check-BjHUTESx.js","assets/ChevronRight-BtvC9VHm.js","assets/DotsVertical-Oq8DvMqA.js","assets/table-CBGqifHP.js","assets/toggle-group-DjqzcDbA.js","assets/use-view-mode-CjnNgalD.js","assets/use-mobile-Cg29r57v.js","assets/FilterLines-DZ8yodUi.js","assets/SearchMd-B1ESGPOj.js","assets/dialog-CS_RHIal.js","assets/X-4rHxalja.js","assets/AlertCircle-DOdV26SG.js","assets/Upload01-CFw29EV6.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-ORevJurf.js","assets/card-DmHlzhtm.js","assets/Trash01-Bv5gqOZN.js","assets/label-DUC31aW7.js","assets/select-nrzuayK7.js","assets/tooltip-CJ7iUP_Y.js","assets/ChevronDown-Bwqdwd9f.js","assets/ChevronUp-CQn0ohUc.js","assets/switch-CtaVMESx.js","assets/textarea-DVZgQHt1.js","assets/XCircle-SQTGKvaQ.js","assets/checkbox-Pj2atrYo.js","assets/Eye-D9xLc9D1.js","assets/LinkExternal01-B843-euO.js","assets/use-copy-BDg0jugQ.js","assets/Copy01-Cs6Pjq4P.js","assets/Key01-NWi-qdwk.js","assets/Plus-BFDzpqlA.js","assets/mcp-oauth-r3DHtOb3.js","assets/Play-Dzg-punW.js"])))=>i.map(i=>d[i]);
2
+ import{c as m,d as n,f as c,j as t,k as f,r as l,aH as p}from"./index-CrsyTcKf.js";import{R as u}from"./require-capability-B9yaVpBc.js";import"./use-capability-CE8fJx7X.js";import"./access-gate-DTa1uKLS.js";import"./capability-load-error-DwezOip8.js";const g=l.lazy(()=>p(()=>import("./registry-layout-BVqaAmGp.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
@@ -1 +1 @@
1
- import{c,F as i}from"./index-DN0HZ17-.js";class l extends Error{constructor(r,s){super(r),this.status=s,this.name="StudioToolError"}status}async function u(o,r,s){const t=await fetch(`/api/${encodeURIComponent(o)}/tools/${encodeURIComponent(r)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s??{})});if(!t.ok){let e=`${r} failed (${t.status})`;try{const n=await t.json();n?.error&&(e=n.error)}catch{}throw new l(e,t.status)}return await t.json()}function p(){const o=c.c(5),{org:r}=i(),s=r.slug;let t;o[0]!==s?(t=(n,a)=>u(s,n,a),o[0]=s,o[1]=t):t=o[1];let e;return o[2]!==s||o[3]!==t?(e={orgSlug:s,call:t},o[2]=s,o[3]=t,o[4]=e):e=o[4],e}export{u as c,p as u};
1
+ import{c,F as i}from"./index-CrsyTcKf.js";class l extends Error{constructor(r,s){super(r),this.status=s,this.name="StudioToolError"}status}async function u(o,r,s){const t=await fetch(`/api/${encodeURIComponent(o)}/tools/${encodeURIComponent(r)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s??{})});if(!t.ok){let e=`${r} failed (${t.status})`;try{const n=await t.json();n?.error&&(e=n.error)}catch{}throw new l(e,t.status)}return await t.json()}function p(){const o=c.c(5),{org:r}=i(),s=r.slug;let t;o[0]!==s?(t=(n,a)=>u(s,n,a),o[0]=s,o[1]=t):t=o[1];let e;return o[2]!==s||o[3]!==t?(e={orgSlug:s,call:t},o[2]=s,o[3]=t,o[4]=e):e=o[4],e}export{u as c,p as u};
@@ -1 +1 @@
1
- import{r as c,j as i,az as C,aD as y,aC as T,aF as I,bA as z,bz as M,aB as A,c as H,m as g}from"./index-DN0HZ17-.js";var m="Switch",[U]=A(m),[q,D]=U(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:s,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:a,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(r.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:s,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...s}=r,a=D(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:e})});R.displayName=P;var F="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:s=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=z(t),k=M(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:s});h.call(l,t),l.dispatchEvent(v)}},[u,t,s]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=F;function j(r){return r?"checked":"unchecked"}var L=E,O=R;function W(r){const e=H.c(9);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(O,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==s||e[7]!==a?(o=i.jsx(L,{"data-slot":"switch",className:a,...s,children:n}),e[6]=s,e[7]=a,e[8]=o):o=e[8],o}export{W as S};
1
+ import{r as c,j as i,az as C,aD as y,aC as T,aF as I,bA as z,bz as M,aB as A,c as H,m as g}from"./index-CrsyTcKf.js";var m="Switch",[U]=A(m),[q,D]=U(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:s,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:a,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(r.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:s,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...s}=r,a=D(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:e})});R.displayName=P;var F="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:s=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=z(t),k=M(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:s});h.call(l,t),l.dispatchEvent(v)}},[u,t,s]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=F;function j(r){return r?"checked":"unchecked"}var L=E,O=R;function W(r){const e=H.c(9);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(O,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==s||e[7]!==a?(o=i.jsx(L,{"data-slot":"switch",className:a,...s,children:n}),e[6]=s,e[7]=a,e[8]=o):o=e[8],o}export{W as S};
@@ -1 +1 @@
1
- import{G as u}from"./index-DN0HZ17-.js";const l=1e4,g="true";function s(e,t){return u.chatAutosend(e,t)}function c(e){return e==="pending"||e==="sending"}function f(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}return!t||typeof t!="object"||typeof t.createdAt!="number"||typeof t.message!="object"||!c(t.status)?null:t}function A(e,t,n,r,i=Date.now()){const a={message:r,createdAt:i,status:"pending"};return e.setItem(s(t,n),JSON.stringify(a)),a}function d(e,t,n){const r=s(t,n),i=f(e.getItem(r));return i||(e.removeItem(r),null)}function v(e,t,n,r=Date.now()){const i=s(t,n),a=d(e,t,n);return!a||a.status!=="pending"?null:r-a.createdAt>=l?(e.removeItem(i),null):(e.setItem(i,JSON.stringify({...a,status:"sending"})),{message:a.message,createdAt:a.createdAt})}function b(e,t,n){e.removeItem(s(t,n))}function p(e){if(!e||!e.startsWith("automation:"))return null;const t=e.slice(11);return t?{id:t}:null}function m(e,t){return`app:${e}:${t}`}function O(e){if(!e||!e.startsWith("app:"))return null;const t=e.slice(4),n=t.indexOf(":");if(n<=0)return null;const r=t.slice(0,n),i=t.slice(n+1);return!r||!i?null:{connectionId:r,toolName:i}}function C(e){return`deck:${encodeURIComponent(e)}`}function I(e){if(!e||!e.startsWith("deck:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function w(e){return`file:${encodeURIComponent(e)}`}function E(e){if(!e||!e.startsWith("file:"))return null;const t=e.slice(5);if(!t)return null;try{return{key:decodeURIComponent(t)}}catch{return null}}function k(e){return`library-file:${encodeURIComponent(e)}`}function _(e){if(!e||!e.startsWith("library-file:"))return null;const t=e.slice(13);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function U(e){return`code:${encodeURIComponent(e)}`}function W(e){if(!e)return null;if(e==="code")return{path:null};if(!e.startsWith("code:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}const T=["overview","settings","automations","preview","code","content","git"],h=new Set(T),R=new Set(["board","files"]);function D(e){return e.startsWith("app:")||e.startsWith("automation:")||e.startsWith("file:")||e.startsWith("deck:")||e.startsWith("library-file:")||e.startsWith("code:")}const o=new Set(["instructions","connections","layout","settings"]);function L(e){return!!e&&o.has(e)}function y(e){const t=e?.defaultMainView??null;if(!t||o.has(t.type))return"settings";if(h.has(t.type))return t.type;if(t.type==="ext-app"||t.type==="ext-apps"){if(t.id&&t.toolName)return m(t.id,t.toolName);const n=e?.tabs?.map(r=>r.id)??[];return t.id&&n.includes(t.id)?t.id:n[0]??"settings"}return e?.tabs?.[0]?.id??"settings"}function N(e){const t=e.mainParam===0?"0":e.mainParam,n=y(e.metadata);if(t==="0")return{mainOpen:!1,activeTab:n};if(t===void 0){const r=e.metadata?.defaultMainView??null;return{mainOpen:!(r==null||r.type==="chat"),activeTab:n}}return o.has(t)?{mainOpen:!0,activeTab:"settings"}:{mainOpen:!0,activeTab:t}}function P(e){return e.mainOpen&&e.clickedId===e.activeTab?0:e.clickedId}function F(e){return e.mainOpen?e.activeTab==="automations"?!0:p(e.activeTab)!==null:!1}function V(e){return e.mainOpen&&e.activeTab==="automations"?0:"automations"}export{g as A,T as F,R as O,N as a,E as b,I as c,_ as d,P as e,m as f,U as g,k as h,L as i,W as j,O as k,F as l,V as m,C as n,w as o,p,D as q,y as r,v as s,b as t,A as w};
1
+ import{G as u}from"./index-CrsyTcKf.js";const l=1e4,g="true";function s(e,t){return u.chatAutosend(e,t)}function c(e){return e==="pending"||e==="sending"}function f(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}return!t||typeof t!="object"||typeof t.createdAt!="number"||typeof t.message!="object"||!c(t.status)?null:t}function A(e,t,n,r,i=Date.now()){const a={message:r,createdAt:i,status:"pending"};return e.setItem(s(t,n),JSON.stringify(a)),a}function d(e,t,n){const r=s(t,n),i=f(e.getItem(r));return i||(e.removeItem(r),null)}function v(e,t,n,r=Date.now()){const i=s(t,n),a=d(e,t,n);return!a||a.status!=="pending"?null:r-a.createdAt>=l?(e.removeItem(i),null):(e.setItem(i,JSON.stringify({...a,status:"sending"})),{message:a.message,createdAt:a.createdAt})}function b(e,t,n){e.removeItem(s(t,n))}function p(e){if(!e||!e.startsWith("automation:"))return null;const t=e.slice(11);return t?{id:t}:null}function m(e,t){return`app:${e}:${t}`}function O(e){if(!e||!e.startsWith("app:"))return null;const t=e.slice(4),n=t.indexOf(":");if(n<=0)return null;const r=t.slice(0,n),i=t.slice(n+1);return!r||!i?null:{connectionId:r,toolName:i}}function C(e){return`deck:${encodeURIComponent(e)}`}function I(e){if(!e||!e.startsWith("deck:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function w(e){return`file:${encodeURIComponent(e)}`}function E(e){if(!e||!e.startsWith("file:"))return null;const t=e.slice(5);if(!t)return null;try{return{key:decodeURIComponent(t)}}catch{return null}}function k(e){return`library-file:${encodeURIComponent(e)}`}function _(e){if(!e||!e.startsWith("library-file:"))return null;const t=e.slice(13);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function U(e){return`code:${encodeURIComponent(e)}`}function W(e){if(!e)return null;if(e==="code")return{path:null};if(!e.startsWith("code:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}const T=["overview","settings","automations","preview","code","content","git"],h=new Set(T),R=new Set(["board","files"]);function D(e){return e.startsWith("app:")||e.startsWith("automation:")||e.startsWith("file:")||e.startsWith("deck:")||e.startsWith("library-file:")||e.startsWith("code:")}const o=new Set(["instructions","connections","layout","settings"]);function L(e){return!!e&&o.has(e)}function y(e){const t=e?.defaultMainView??null;if(!t||o.has(t.type))return"settings";if(h.has(t.type))return t.type;if(t.type==="ext-app"||t.type==="ext-apps"){if(t.id&&t.toolName)return m(t.id,t.toolName);const n=e?.tabs?.map(r=>r.id)??[];return t.id&&n.includes(t.id)?t.id:n[0]??"settings"}return e?.tabs?.[0]?.id??"settings"}function N(e){const t=e.mainParam===0?"0":e.mainParam,n=y(e.metadata);if(t==="0")return{mainOpen:!1,activeTab:n};if(t===void 0){const r=e.metadata?.defaultMainView??null;return{mainOpen:!(r==null||r.type==="chat"),activeTab:n}}return o.has(t)?{mainOpen:!0,activeTab:"settings"}:{mainOpen:!0,activeTab:t}}function P(e){return e.mainOpen&&e.clickedId===e.activeTab?0:e.clickedId}function F(e){return e.mainOpen?e.activeTab==="automations"?!0:p(e.activeTab)!==null:!1}function V(e){return e.mainOpen&&e.activeTab==="automations"?0:"automations"}export{g as A,T as F,R as O,N as a,E as b,I as c,_ as d,P as e,m as f,U as g,k as h,L as i,W as j,O as k,F as l,V as m,C as n,w as o,p,D as q,y as r,v as s,b as t,A as w};