decocms 4.429.15 → 4.429.17

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 (350) hide show
  1. package/dist/client/assets/{AlertCircle-CuDczHDR.js → AlertCircle-B-U1UzJy.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CdW9t8cj.js → AreaChart-CtdiOFj8.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-Bo9mbsAZ.js → ArrowLeft-DWMp2ePO.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-CwzrTKhr.js → ArrowRight-BUYijqTX.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DIwlV_vZ.js → ArrowUp-CJDQxQ_X.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-CYnyxntV.js → CartesianChart-BTxDXji_.js} +1 -1
  7. package/dist/client/assets/{Check-BabNNnmH.js → Check-D6Xgemeb.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-BEIFKjMv.js → CheckCircle-WGnb_ikI.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DMEZ4Ndj.js → ChevronUp-DheBKBgy.js} +1 -1
  10. package/dist/client/assets/{Copy01-BkyebR6O.js → Copy01-DWQ9KHmS.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-CUqwDXVT.js → CreditCard01-3uUuhgiM.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-8vBQwHOR.js → DotsVertical-BaKtw__w.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-9xji2hI-.js → ErrorBarContext-DLq7d5Ts.js} +1 -1
  14. package/dist/client/assets/{Image01-qfqy9swl.js → Image01-DMXF1Qce.js} +1 -1
  15. package/dist/client/assets/{Key01-Csp2b37o.js → Key01-oFV0Ghxa.js} +1 -1
  16. package/dist/client/assets/{Line-DLzC61fT.js → Line-4f1XGl33.js} +1 -1
  17. package/dist/client/assets/{Link01-BLEXQzbw.js → Link01-mtktwecI.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-DfAqCiDA.js → LinkExternal01-DdmYXSfw.js} +1 -1
  19. package/dist/client/assets/{Monitor01-ZAWuAcI2.js → Monitor01-G22-1kYR.js} +1 -1
  20. package/dist/client/assets/{Palette-DlbiBl_j.js → Palette-Dj6nu481.js} +1 -1
  21. package/dist/client/assets/{Plus-AwkstShZ.js → Plus-B1PdYp1B.js} +1 -1
  22. package/dist/client/assets/{SearchMd-CamWCDhQ.js → SearchMd-CippXiaJ.js} +1 -1
  23. package/dist/client/assets/{Sector-DJpWy6WJ.js → Sector-BNmK-GoX.js} +1 -1
  24. package/dist/client/assets/{ShoppingBag01-CoZ5vwOJ.js → ShoppingBag01-CkiwNCJ1.js} +1 -1
  25. package/dist/client/assets/{Sun-CCJdDdvK.js → Sun-DBisSftO.js} +1 -1
  26. package/dist/client/assets/{Tool01-BChrjB8k.js → Tool01-Bgd2tvp5.js} +1 -1
  27. package/dist/client/assets/{Trash01-CT7b30WK.js → Trash01-D6T8CbfV.js} +1 -1
  28. package/dist/client/assets/{Upload01-CL1ZW-yo.js → Upload01-fOi5PXXe.js} +1 -1
  29. package/dist/client/assets/{User01-D8U9gLIR.js → User01-D84561nP.js} +1 -1
  30. package/dist/client/assets/{UserSquare-1ac2E4Qd.js → UserSquare-PItW8fkC.js} +1 -1
  31. package/dist/client/assets/{Users01-B7Weknnl.js → Users01-CRnhjaQ6.js} +1 -1
  32. package/dist/client/assets/{X-zmCUS8vK.js → X-BZ3dYFZP.js} +1 -1
  33. package/dist/client/assets/{XAxis-DaaG0GwZ.js → XAxis-WXUF5lZ_.js} +1 -1
  34. package/dist/client/assets/{XClose-DPw2E-Li.js → XClose-CVkLSF48.js} +1 -1
  35. package/dist/client/assets/{ZoomOut-CmHr1Qbd.js → ZoomOut-BQIdpjjz.js} +1 -1
  36. package/dist/client/assets/{access-gate-DAuoTnkK.js → access-gate-BLK_F3Um.js} +1 -1
  37. package/dist/client/assets/{add-connection-dialog-B5cnT70N.js → add-connection-dialog-gztSytxH.js} +1 -1
  38. package/dist/client/assets/{agent-analytics-XU13791O.js → agent-analytics-CoEzdZPh.js} +1 -1
  39. package/dist/client/assets/agent-app-DdnBkhGN.js +1 -0
  40. package/dist/client/assets/{agent-assets-DAwyrkYI.js → agent-assets-BsvB6GjU.js} +1 -1
  41. package/dist/client/assets/{agent-automation-HUPTUqzn.js → agent-automation-Dzia1g6I.js} +1 -1
  42. package/dist/client/assets/{agent-automations-Zag1eWjI.js → agent-automations-CidgRnXt.js} +1 -1
  43. package/dist/client/assets/{agent-connect-sources-W6Vrx-m6.js → agent-connect-sources-DQ0LpIwo.js} +1 -1
  44. package/dist/client/assets/agent-deck-D8VLMwS1.js +1 -0
  45. package/dist/client/assets/{agent-e2e-B1ezNIG5.js → agent-e2e-DvmJROz6.js} +1 -1
  46. package/dist/client/assets/{agent-experiments--OPh2q-E.js → agent-experiments-B6VeS1rR.js} +1 -1
  47. package/dist/client/assets/{agent-file-nYMiSfR-.js → agent-file-DJz6cNOW.js} +1 -1
  48. package/dist/client/assets/{agent-git-CidWkBk4.js → agent-git-CqpjZD9G.js} +1 -1
  49. package/dist/client/assets/{agent-hosting-Cdj91r7x.js → agent-hosting-BPP0GyBz.js} +1 -1
  50. package/dist/client/assets/{agent-icon-C4T6-vm3.js → agent-icon-BHQYaWGI.js} +1 -1
  51. package/dist/client/assets/agent-library-HRf9DP_D.js +1 -0
  52. package/dist/client/assets/agent-library-file-DcpYMs-X.js +1 -0
  53. package/dist/client/assets/{agent-monitor-C03EG0HB.js → agent-monitor-B4KJCwQO.js} +1 -1
  54. package/dist/client/assets/{agent-overview-BgNt5Zti.js → agent-overview-DZcyxPIf.js} +1 -1
  55. package/dist/client/assets/agent-settings-CcvYJU73.js +1 -0
  56. package/dist/client/assets/{agent-site-editor-BgEsvKbR.js → agent-site-editor-CWmpMwqY.js} +1 -1
  57. package/dist/client/assets/agent-site-editor-code-CL64bIqx.js +2 -0
  58. package/dist/client/assets/{agent-site-editor-content-CspnKX0t.js → agent-site-editor-content-ziukOKty.js} +3 -3
  59. package/dist/client/assets/{agent-site-editor-preview-CccvJWp1.js → agent-site-editor-preview-BjctZQoO.js} +3 -3
  60. package/dist/client/assets/agent-view-DQvNVKSQ.js +1 -0
  61. package/dist/client/assets/{agent-view-guard-B8vCMA2F.js → agent-view-guard-BPY8L90T.js} +1 -1
  62. package/dist/client/assets/{agents-list-1G1VtXzM.js → agents-list-DLoiJmd2.js} +1 -1
  63. package/dist/client/assets/{ai-providers-Bewi-H4T.js → ai-providers-CnQwGFt2.js} +1 -1
  64. package/dist/client/assets/{alert-ssaT6P_t.js → alert-A_NoEYwO.js} +1 -1
  65. package/dist/client/assets/{alert-dialog-BfVPdL6C.js → alert-dialog-DAsY_6vW.js} +1 -1
  66. package/dist/client/assets/{analytics-sections-CPDFVLQZ.js → analytics-sections-gDumwofC.js} +1 -1
  67. package/dist/client/assets/{api-keys-4a5TMMvW.js → api-keys-CQZHAIJ7.js} +1 -1
  68. package/dist/client/assets/api-keys-OxewiGz0.js +1 -0
  69. package/dist/client/assets/{app-editor-BDwDymDi.js → app-editor-Btdo4jOO.js} +1 -1
  70. package/dist/client/assets/{asset-utils-BdLNSa8G.js → asset-utils-BE9qWYYH.js} +1 -1
  71. package/dist/client/assets/{auth-B26YmJp8.js → auth-CPuYtN_v.js} +1 -1
  72. package/dist/client/assets/{auth-catchall-BmIjr8L4.js → auth-catchall-B6rRGvfd.js} +1 -1
  73. package/dist/client/assets/{auth-entry-_V60-Yy2.js → auth-entry-B6znBOgM.js} +1 -1
  74. package/dist/client/assets/{auth-split-layout-Amys8f_M.js → auth-split-layout-DBDuhF7k.js} +1 -1
  75. package/dist/client/assets/{authenticate-and-persist-oauth-g4x9tuBO.js → authenticate-and-persist-oauth-ckGECAJT.js} +1 -1
  76. package/dist/client/assets/{automation-list-row-DsucCADr.js → automation-list-row-fNhj8I3n.js} +1 -1
  77. package/dist/client/assets/{automation-runs-BSjCW9wW.js → automation-runs-3musja8M.js} +1 -1
  78. package/dist/client/assets/{automations-D3ClLXrK.js → automations-DRKTa5Sk.js} +1 -1
  79. package/dist/client/assets/{autosend-Dr45c1FR.js → autosend-DAx1Tn8n.js} +1 -1
  80. package/dist/client/assets/{avatar-2gZ-GjTa.js → avatar-KDoZXYs8.js} +1 -1
  81. package/dist/client/assets/{badge-BvD0c33J.js → badge-jpM0MnTV.js} +1 -1
  82. package/dist/client/assets/{block-document-DMQrhyWU.js → block-document-gcMzZVgU.js} +1 -1
  83. package/dist/client/assets/{blocks-preview-workspace-context-yxKPdz1g.js → blocks-preview-workspace-context-CtP6H3iJ.js} +1 -1
  84. package/dist/client/assets/{buckets-3xp9Ukqd.js → buckets-CL0XfhfK.js} +1 -1
  85. package/dist/client/assets/{build-improve-prompt-doc-B41pEVQX.js → build-improve-prompt-doc-Co-CuWXb.js} +1 -1
  86. package/dist/client/assets/{calendar-TlF1uxmz.js → calendar-CQDafm45.js} +1 -1
  87. package/dist/client/assets/{capability-load-error-DyaNaGSJ.js → capability-load-error-Di3bKHCw.js} +1 -1
  88. package/dist/client/assets/{category-editor-DWRpGkz4.js → category-editor-s9K-SQ46.js} +1 -1
  89. package/dist/client/assets/{chart-CniPyseK.js → chart-DYpPQaD9.js} +1 -1
  90. package/dist/client/assets/{chat-context-CThPxaIG.js → chat-context-DGgdYQQd.js} +1 -1
  91. package/dist/client/assets/{chat-draft-Bk2ti61u.js → chat-draft-ChM4eeu1.js} +1 -1
  92. package/dist/client/assets/{checkbox-DADCqX1w.js → checkbox-fVJdVAKX.js} +1 -1
  93. package/dist/client/assets/{choose-editor-DAKdg2o0.js → choose-editor-Cq_PnJc9.js} +1 -1
  94. package/dist/client/assets/{claim-phase-copy-ztpV7yBK.js → claim-phase-copy-BAYQAubR.js} +1 -1
  95. package/dist/client/assets/{cli-auth-success-CthDFW1R.js → cli-auth-success-DANghiX3.js} +1 -1
  96. package/dist/client/assets/{client-icons-B6d76git.js → client-icons-y_9F_zHx.js} +1 -1
  97. package/dist/client/assets/{collapsible-CAmsliwi.js → collapsible-DWUIznq_.js} +1 -1
  98. package/dist/client/assets/{collection-detail-DckM2ti7.js → collection-detail-P_BceVg8.js} +1 -1
  99. package/dist/client/assets/{collection-display-button-DoTKVxrW.js → collection-display-button-DyQDP8LI.js} +1 -1
  100. package/dist/client/assets/{collection-search-BrbcE8Yr.js → collection-search-BFsC42YH.js} +1 -1
  101. package/dist/client/assets/{collection-table-wrapper-PFFSWqtC.js → collection-table-wrapper-By6knxtd.js} +1 -1
  102. package/dist/client/assets/{collection-tabs-C4Gyezfe.js → collection-tabs-DUyODpIN.js} +1 -1
  103. package/dist/client/assets/{combobox-DKN6MbxZ.js → combobox-BnXjcam-.js} +1 -1
  104. package/dist/client/assets/{command-DA-y1t0V.js → command-D75S692j.js} +1 -1
  105. package/dist/client/assets/{companion-mcps-section-BkAwDEqR.js → companion-mcps-section-BjWWbHZB.js} +1 -1
  106. package/dist/client/assets/{config-Da7u-kds.js → config-CzuK3lGY.js} +1 -1
  107. package/dist/client/assets/{connect-DtZEhE9m.js → connect-DabGy4pG.js} +1 -1
  108. package/dist/client/assets/{connect-layout-BrfWz6Lc.js → connect-layout-DKk1-c-i.js} +1 -1
  109. package/dist/client/assets/{connection-D7J6-LHA.js → connection-C1gNykEH.js} +1 -1
  110. package/dist/client/assets/{connection-card-BW0Kep2V.js → connection-card-C4chDbP4.js} +1 -1
  111. package/dist/client/assets/{connection-detail-B4CVPaQ2.js → connection-detail-uGoStT4_.js} +1 -1
  112. package/dist/client/assets/{connection-form-helpers-DQ_Dl-b0.js → connection-form-helpers-Da9dvr7X.js} +1 -1
  113. package/dist/client/assets/{connections-CFZPWzp7.js → connections-Dp0T-NkR.js} +1 -1
  114. package/dist/client/assets/{context-CwVRkeX0.js → context-B7AqHk4f.js} +1 -1
  115. package/dist/client/assets/{context-menu-Cl-6WX9a.js → context-menu-BgXlIs0y.js} +1 -1
  116. package/dist/client/assets/{create-organization-dialog-B6U2ffaP.js → create-organization-dialog-BhTQVU2r.js} +1 -1
  117. package/dist/client/assets/{daily-pulse-D3vyHgy1.js → daily-pulse-BCSswLq0.js} +1 -1
  118. package/dist/client/assets/{decopilot-CF90aSVO.js → decopilot-mJE0FvL9.js} +1 -1
  119. package/dist/client/assets/{dialog-DKFnbgeG.js → dialog-DrX8LCd0.js} +1 -1
  120. package/dist/client/assets/{discover-C3Uqa0wT.js → discover-DNzpcotD.js} +1 -1
  121. package/dist/client/assets/{domain-settings-h-DadmBQ.js → domain-settings-DXuVgmPq.js} +1 -1
  122. package/dist/client/assets/{download-app-dialog-Ds-Xx8IX.js → download-app-dialog-CymXtAiJ.js} +1 -1
  123. package/dist/client/assets/{drawer-DUhw33Cm.js → drawer-6D3h8ppq.js} +1 -1
  124. package/dist/client/assets/{editor-CrBdYZI5.js → editor-DHofLxpo.js} +1 -1
  125. package/dist/client/assets/{empty-state--rC9WEvW.js → empty-state-CK0hEjT9.js} +1 -1
  126. package/dist/client/assets/{empty-state-5JsGLGCz.js → empty-state-NNuShZhG.js} +1 -1
  127. package/dist/client/assets/{extract-connection-data-D_dxE07t.js → extract-connection-data-N95bICfq.js} +1 -1
  128. package/dist/client/assets/{feature-gate-Deky0fNI.js → feature-gate-DyKpAttI.js} +1 -1
  129. package/dist/client/assets/{feature-paywall-dLI77uR0.js → feature-paywall-COZt-ftO.js} +1 -1
  130. package/dist/client/assets/{file-explorer-NJQXW1j7.js → file-explorer-ChiyfOhy.js} +1 -1
  131. package/dist/client/assets/{file-preview-BsPrfzyM.js → file-preview-DxT5Hi-Z.js} +1 -1
  132. package/dist/client/assets/{file-share-button-CzYRDeuY.js → file-share-button-CU1Okrnl.js} +1 -1
  133. package/dist/client/assets/{file-type-icon-YmBL0Ufl.js → file-type-icon-CF6OU3CS.js} +1 -1
  134. package/dist/client/assets/flat-project-D6QuIObL.js +1 -0
  135. package/dist/client/assets/{folder-icon-C3uRtP6t.js → folder-icon-BqV3haPq.js} +1 -1
  136. package/dist/client/assets/{form-D6BtwTxk.js → form-CC5Oqxht.js} +1 -1
  137. package/dist/client/assets/{gateway-client-CRfhRMow.js → gateway-client-Dv_0B48a.js} +1 -1
  138. package/dist/client/assets/{general-CoC3_QQI.js → general-C5pJzhu6.js} +1 -1
  139. package/dist/client/assets/{home-qHa3ti7g.js → home-DcLkErVz.js} +1 -1
  140. package/dist/client/assets/{icon-button-i5RgVq5a.js → icon-button-C1ldzdZB.js} +1 -1
  141. package/dist/client/assets/{index-Duf3JTVM.js → index-2duAHMPd.js} +2 -2
  142. package/dist/client/assets/{index-D7e3BA8h.js → index-BSD1WJ1k.js} +1 -1
  143. package/dist/client/assets/{index-CcySvCN4.js → index-BTP8DloI.js} +1 -1
  144. package/dist/client/assets/{index-CXf75Yf4.js → index-Bk7vvydh.js} +1 -1
  145. package/dist/client/assets/{index-DYugmvl5.js → index-C2gPjDAx.js} +3 -3
  146. package/dist/client/assets/{index-Tpahi3np.js → index-C4F9Divv.js} +1 -1
  147. package/dist/client/assets/{index-CZeMzTvJ.js → index-C9qVVNGU.js} +1 -1
  148. package/dist/client/assets/{index-CLyiTL--.js → index-COyjmB74.js} +1 -1
  149. package/dist/client/assets/{index-D_yKJ5r1.js → index-CbxNxJ3D.js} +1 -1
  150. package/dist/client/assets/{index-Cr5hQ6uq.js → index-Df85Uxj3.js} +1 -1
  151. package/dist/client/assets/{index-pgtYYcYn.js → index-DkL8PTFF.js} +1 -1
  152. package/dist/client/assets/{index-D8RoZcUH.js → index-Dn8Jj1z2.js} +1 -1
  153. package/dist/client/assets/{index-DcUogktQ.js → index-Ds6C9Pw0.js} +1 -1
  154. package/dist/client/assets/{index-Bfi27UhN.js → index-DxNN-0_k.js} +1 -1
  155. package/dist/client/assets/{index-qYPg4vR1.js → index-eLRUo3R2.js} +1 -1
  156. package/dist/client/assets/{index-redirect-DLvNHVan.js → index-redirect-Dt6C2aPq.js} +1 -1
  157. package/dist/client/assets/{infiniteQueryObserver-CJNI8p40.js → infiniteQueryObserver--wAA-0G_.js} +1 -1
  158. package/dist/client/assets/{infra-billing-DkVOaeno.js → infra-billing-S56qKUue.js} +1 -1
  159. package/dist/client/assets/{input-G7iRGp47.js → input-BBep7NXw.js} +1 -1
  160. package/dist/client/assets/{input-DIHf45hi.js → input-DWCi04NW.js} +3 -3
  161. package/dist/client/assets/{input-l6pnirh7.js → input-FbqXnpg0.js} +1 -1
  162. package/dist/client/assets/{integration-icon-CHOKyeun.js → integration-icon-DSd3hD2d.js} +1 -1
  163. package/dist/client/assets/{label-p08oIK78.js → label-DSUhz-8r.js} +1 -1
  164. package/dist/client/assets/{last-preview-page-Di-9CPt9.js → last-preview-page-fmjqGqll.js} +1 -1
  165. package/dist/client/assets/{layout-RKtuhKtG.js → layout-B_b3S2PA.js} +1 -1
  166. package/dist/client/assets/{legacy-agents-deep-CSkPzj2-.js → legacy-agents-deep-CE1NZTEn.js} +1 -1
  167. package/dist/client/assets/{legacy-main-redirect-bBfTCRf6.js → legacy-main-redirect-DBECkjIF.js} +1 -1
  168. package/dist/client/assets/library-CvGTTuej.js +1 -0
  169. package/dist/client/assets/{library-tab-D0HatkvE.js → library-tab-B2IRkdOX.js} +1 -1
  170. package/dist/client/assets/{login-bu0uzVIo.js → login-Qqgm6lP9.js} +1 -1
  171. package/dist/client/assets/{markdown-DMc4L9PJ.js → markdown-f8vEyvSB.js} +1 -1
  172. package/dist/client/assets/{mcp-app-renderer-DnB7YUTt.js → mcp-app-renderer-ZqX9tE8u.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-DBFkaLko.js → mcp-oauth-B1sCs29q.js} +1 -1
  174. package/dist/client/assets/{members-DIBY5Thw.js → members-ByjxbTQp.js} +1 -1
  175. package/dist/client/assets/{message-templates-DMjEdOm7.js → message-templates-syKtBIht.js} +1 -1
  176. package/dist/client/assets/{mini-report-page-DFhLy1Rt.js → mini-report-page-BuQdRzx2.js} +1 -1
  177. package/dist/client/assets/{mock-board-Bke2rQZW.js → mock-board-DllCwyEI.js} +1 -1
  178. package/dist/client/assets/{monaco-editor-BJnDtHLE.js → monaco-editor-DdgeEEDA.js} +1 -1
  179. package/dist/client/assets/{monitoring-stats-row-BLbJ2Tof.js → monitoring-stats-row-DHOo1ldQ.js} +1 -1
  180. package/dist/client/assets/{multi-select-DkGkliEJ.js → multi-select-9z__aMpt.js} +1 -1
  181. package/dist/client/assets/{mustache-C7QWN07d.js → mustache-QU0we0s5.js} +1 -1
  182. package/dist/client/assets/{new-project-dialog-LuuCDNwb.js → new-project-dialog-C98g6ieG.js} +1 -1
  183. package/dist/client/assets/{oauth-callback-DiiT3vyV.js → oauth-callback-afm5pu38.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-ai-provider-hIQkfwcQ.js → oauth-callback-ai-provider-DuUuwsC9.js} +1 -1
  185. package/dist/client/assets/{onboarding-D3E_xaHG.js → onboarding-DMOuYU-Q.js} +1 -1
  186. package/dist/client/assets/{openai-conversation-DS_RVFTJ.js → openai-conversation-_RBUZBr3.js} +1 -1
  187. package/dist/client/assets/{optimistic-project-sidebar-views-B6qw0tAj.js → optimistic-project-sidebar-views-BjeRU-XZ.js} +1 -1
  188. package/dist/client/assets/{org-file-open-context-BKbeUb22.js → org-file-open-context-DbIprta1.js} +1 -1
  189. package/dist/client/assets/{organization-choice-DwJbeUxP.js → organization-choice-DCwOC7n5.js} +1 -1
  190. package/dist/client/assets/{orgs-BteQiefi.js → orgs-Ck5sOKbT.js} +1 -1
  191. package/dist/client/assets/{page-seo-form-ZBXAhbe4.js → page-seo-form-Cc0sGCwt.js} +1 -1
  192. package/dist/client/assets/{pair-Dgil36Yz.js → pair-C0NJ0A_-.js} +1 -1
  193. package/dist/client/assets/{plan-ladder-CdeagvwX.js → plan-ladder-DqWuXj-9.js} +1 -1
  194. package/dist/client/assets/{popover-s1a5JQP4.js → popover-D2xjI0gX.js} +1 -1
  195. package/dist/client/assets/{post-calendar-Cl0Z3Hp7.js → post-calendar-Bwi4RuR5.js} +1 -1
  196. package/dist/client/assets/{post-editor-CHu6cUd2.js → post-editor-B6OQfhgD.js} +1 -1
  197. package/dist/client/assets/{preview-content-ztM5Hw98.js → preview-content-B44CeltE.js} +1 -1
  198. package/dist/client/assets/{preview-dialog-BzjaOKkg.js → preview-dialog-DxUh7dSA.js} +1 -1
  199. package/dist/client/assets/{profile-vn453nYJ.js → profile-B5KzfeTl.js} +1 -1
  200. package/dist/client/assets/{project-app-view-BTkzokzo.js → project-app-view-ljtaEpJp.js} +1 -1
  201. package/dist/client/assets/{project-feed-CeciwEdo.js → project-feed-DPfkoA60.js} +1 -1
  202. package/dist/client/assets/{project-icon-B09wIDW7.js → project-icon-CN7LeQgZ.js} +1 -1
  203. package/dist/client/assets/project-reports-DcP4ST1W.js +1 -0
  204. package/dist/client/assets/project-tasks-Cw3r-0PX.js +1 -0
  205. package/dist/client/assets/{projects-lL9Tt0Gt.js → projects-XmltrOmU.js} +1 -1
  206. package/dist/client/assets/{projects-empty-state-CPn4J3ug.js → projects-empty-state-C1DhoE5h.js} +1 -1
  207. package/dist/client/assets/{prompts-DCiDCd7e.js → prompts-CFFndp1J.js} +1 -1
  208. package/dist/client/assets/record-editor-DR9ff28n.js +1 -0
  209. package/dist/client/assets/{redirect-editor-KHRzogrA.js → redirect-editor-DRKIREIt.js} +1 -1
  210. package/dist/client/assets/{reports-DDr5sk70.js → reports-ChAiErHf.js} +1 -1
  211. package/dist/client/assets/{reports-onboarding-vXvCovWn.js → reports-onboarding-BK3uT0Do.js} +1 -1
  212. package/dist/client/assets/reports-q6Aa1l8I.js +1 -0
  213. package/dist/client/assets/{reports-tab-DowsfbUm.js → reports-tab-CyIG6VIq.js} +2 -2
  214. package/dist/client/assets/{repositories-D94WRwdz.js → repositories-Di1_eK47.js} +1 -1
  215. package/dist/client/assets/{repository-binding-BUZ4C7bh.js → repository-binding-8VYBinex.js} +1 -1
  216. package/dist/client/assets/{repository-import-picker-BlkJicNM.js → repository-import-picker-jpCBwYFc.js} +1 -1
  217. package/dist/client/assets/{repository-picker-kIjp5Sqw.js → repository-picker-DySTd9fg.js} +1 -1
  218. package/dist/client/assets/{require-capability-DHUiC1kU.js → require-capability-C5D6gHPU.js} +1 -1
  219. package/dist/client/assets/{required-auth-layout-D-pWNSJt.js → required-auth-layout-moHXj_OK.js} +1 -1
  220. package/dist/client/assets/{reset-password-DJFs6nDu.js → reset-password-gg3N9Nco.js} +1 -1
  221. package/dist/client/assets/{resizable-D8VTzp-2.js → resizable-kDaQYbub.js} +1 -1
  222. package/dist/client/assets/{resolve-tab-icon-CS1i6ia0.js → resolve-tab-icon-CsqF-nZx.js} +1 -1
  223. package/dist/client/assets/{review-settings-DGa7f9RE.js → review-settings-Dor7IWdB.js} +1 -1
  224. package/dist/client/assets/{rich-text-link-control-FPU_SLYm.js → rich-text-link-control-DYmX7w7m.js} +1 -1
  225. package/dist/client/assets/{roles-h5xSLk23.js → roles-CMYjxljc.js} +1 -1
  226. package/dist/client/assets/route-CXM2AIp9.js +1 -0
  227. package/dist/client/assets/{route-4jHr-bMY.js → route-CqYe2U2q.js} +1 -1
  228. package/dist/client/assets/{route-BWoxxBqA.js → route-lkH9X93d.js} +1 -1
  229. package/dist/client/assets/{runnable-block-editor-B0gRYmL2.js → runnable-block-editor-CtmbUYzg.js} +1 -1
  230. package/dist/client/assets/{sandbox-lifecycle-context-Ck7sGDzG.js → sandbox-lifecycle-context-bqVwVcpS.js} +1 -1
  231. package/dist/client/assets/{schema-CbWS_s_m.js → schema-DLGFQ_bS.js} +1 -1
  232. package/dist/client/assets/{scroll-area-D_QALYqx.js → scroll-area-He9-sGlT.js} +1 -1
  233. package/dist/client/assets/{search-input-CKkGnh67.js → search-input-qTQyzPLx.js} +1 -1
  234. package/dist/client/assets/{search-toggle-BVmQ-kix.js → search-toggle-9xMSJN7j.js} +1 -1
  235. package/dist/client/assets/{secret-picker-BN_ni740.js → secret-picker-f6QFH40I.js} +1 -1
  236. package/dist/client/assets/{secrets-p-sCUTf6.js → secrets-DtymHtzY.js} +1 -1
  237. package/dist/client/assets/{sections-editor-BkBHdOcL.js → sections-editor-DGYiWXTz.js} +1 -1
  238. package/dist/client/assets/{select-DmFd2IfD.js → select-CKrXrcZs.js} +1 -1
  239. package/dist/client/assets/{select-model-zczhm8Dx.js → select-model-Cvr5bBt6.js} +1 -1
  240. package/dist/client/assets/{seo-editor-D59PA5PL.js → seo-editor-D-azfyni.js} +1 -1
  241. package/dist/client/assets/{separator-BJoDGV4Q.js → separator-CHrKVs9_.js} +1 -1
  242. package/dist/client/assets/{settings-tab-BYNcgZBo.js → settings-tab-DgvCXv5z.js} +1 -1
  243. package/dist/client/assets/{sheet-BytVG-aD.js → sheet-CQPD5xTR.js} +1 -1
  244. package/dist/client/assets/{shell-layout-a98Fc2ws.js → shell-layout-DpGl28JY.js} +1 -1
  245. package/dist/client/assets/{skills-DSGXOLjK.js → skills-CH4rKZf1.js} +1 -1
  246. package/dist/client/assets/{sso-CehOfix1.js → sso-xBnR7WQh.js} +1 -1
  247. package/dist/client/assets/{suggestion-CHA_ncti.js → suggestion-DpW-jRo9.js} +1 -1
  248. package/dist/client/assets/{switch-vQEzq2Z3.js → switch-CeO5THtb.js} +1 -1
  249. package/dist/client/assets/{synced-repos-BnZS_V0S.js → synced-repos-BbxfVJnh.js} +1 -1
  250. package/dist/client/assets/{tab-icon-glyph-A1cK_g2C.js → tab-icon-glyph-DAroF_JF.js} +1 -1
  251. package/dist/client/assets/{table-CTatCBhK.js → table-BVP8O4tE.js} +1 -1
  252. package/dist/client/assets/{tabs-CbqmKlcd.js → tabs-DuodUgc0.js} +1 -1
  253. package/dist/client/assets/{task-board-DxHSj0XG.js → task-board-DIlOu-03.js} +1 -1
  254. package/dist/client/assets/{task-route-Cue4Muhb.js → task-route-CfjG98i0.js} +1 -1
  255. package/dist/client/assets/{task-status-DBak8l4e.js → task-status-C_gcv7wp.js} +1 -1
  256. package/dist/client/assets/{taskboard-analytics-CWMvrGYW.js → taskboard-analytics-CDUz_LXj.js} +1 -1
  257. package/dist/client/assets/{tasks-C2Ri_Sqx.js → tasks-CHz1504o.js} +1 -1
  258. package/dist/client/assets/tasks-TI13kSfl.js +1 -0
  259. package/dist/client/assets/{textarea-DXgI38kY.js → textarea-CV1alryh.js} +1 -1
  260. package/dist/client/assets/{thread-analytics-QdEbbkqj.js → thread-analytics-CDlE-dIA.js} +1 -1
  261. package/dist/client/assets/{thread-intent-D-SVYHox.js → thread-intent-BYxnrHPt.js} +1 -1
  262. package/dist/client/assets/{thread-route-B25YLy3x.js → thread-route-Co7DhBS_.js} +1 -1
  263. package/dist/client/assets/{thread-route-Da2apUB_.js → thread-route-z765fuyX.js} +1 -1
  264. package/dist/client/assets/{thread-sheet-body-BQBP5vRQ.js → thread-sheet-body-ZzXO2TWM.js} +1 -1
  265. package/dist/client/assets/{toggle-group-Dy611Xhi.js → toggle-group-CtowKi63.js} +1 -1
  266. package/dist/client/assets/{toolbar-icon-button-CwOroP4Z.js → toolbar-icon-button-D-gnoI0d.js} +1 -1
  267. package/dist/client/assets/{tooltip-B_w5veU-.js → tooltip-9nV6z2d1.js} +1 -1
  268. package/dist/client/assets/{track-WZViR3XU.js → track-BW3qvKgr.js} +1 -1
  269. package/dist/client/assets/{types-D1do3DS4.js → types-CAC6NSWI.js} +1 -1
  270. package/dist/client/assets/{usage-stats-DqPWtk0P.js → usage-stats-CCQMNpfX.js} +1 -1
  271. package/dist/client/assets/{use-ai-providers-CtF8PEZb.js → use-ai-providers-BF31TBzE.js} +1 -1
  272. package/dist/client/assets/{use-automations-BJ0sr36g.js → use-automations-Dtkz7oat.js} +1 -1
  273. package/dist/client/assets/{use-autosave-BcfWf8CY.js → use-autosave-Bmg58s-n.js} +1 -1
  274. package/dist/client/assets/{use-chat-layout-state-BVDHbxk6.js → use-chat-layout-state-CdHnHdi0.js} +1 -1
  275. package/dist/client/assets/{use-connect-companion-nB_AjiP-.js → use-connect-companion-Vml6tSxq.js} +1 -1
  276. package/dist/client/assets/{use-connection-C_FTHaum.js → use-connection-CZPzkDC-.js} +1 -1
  277. package/dist/client/assets/{use-copy-DPjQGXpw.js → use-copy-DyKZ95CH.js} +1 -1
  278. package/dist/client/assets/{use-create-virtual-mcp-BHYJpz4o.js → use-create-virtual-mcp-5H6AqV6D.js} +1 -1
  279. package/dist/client/assets/{use-date-fns-locale-DBA4v-sv.js → use-date-fns-locale-BuMan_Fe.js} +1 -1
  280. package/dist/client/assets/{use-debounced-autosave-DD7xTAl9.js → use-debounced-autosave-BQonEC9C.js} +1 -1
  281. package/dist/client/assets/{use-debounced-value-BALQm1iz.js → use-debounced-value-DinI25kX.js} +1 -1
  282. package/dist/client/assets/{use-deco-credits-DXkEEOaM.js → use-deco-credits-DR58jG6W.js} +1 -1
  283. package/dist/client/assets/{use-decopilot-events-BgS6itDI.js → use-decopilot-events-BsEITGFA.js} +1 -1
  284. package/dist/client/assets/{use-delete-connection-Bikp23q2.js → use-delete-connection-BTyRTfPn.js} +1 -1
  285. package/dist/client/assets/{use-deployment-admin-BFJBogfM.js → use-deployment-admin-BZJVs1Vv.js} +1 -1
  286. package/dist/client/assets/{use-fast-preview-draft-url-FunsJoGH.js → use-fast-preview-draft-url-CVcFiOsC.js} +1 -1
  287. package/dist/client/assets/{use-file-configs-ptvtyseu.js → use-file-configs-wr-P_oXv.js} +1 -1
  288. package/dist/client/assets/{use-infinite-scroll-BiKJiTfn.js → use-infinite-scroll-CYbqB46q.js} +1 -1
  289. package/dist/client/assets/{use-join-requests-BfrehNqR.js → use-join-requests-Dgj_aOyM.js} +1 -1
  290. package/dist/client/assets/{use-main-panel-tabs-DNY-14XG.js → use-main-panel-tabs-CThm-MsZ.js} +1 -1
  291. package/dist/client/assets/{use-mcp-auth-status-DCXIavbb.js → use-mcp-auth-status-BBYtZ3UX.js} +1 -1
  292. package/dist/client/assets/{use-mcp-client-DZGwCgNY.js → use-mcp-client-BqOylQpo.js} +1 -1
  293. package/dist/client/assets/{use-mcp-prompts-BqMdzUKc.js → use-mcp-prompts-CdQYJm8p.js} +1 -1
  294. package/dist/client/assets/{use-mcp-tools-GIma6hPz.js → use-mcp-tools-CSfqHIDA.js} +1 -1
  295. package/dist/client/assets/{use-members-CT3cNk6W.js → use-members-ClR2rX-Z.js} +1 -1
  296. package/dist/client/assets/{use-mobile-CWVoSlP7.js → use-mobile-D-FuyO_a.js} +1 -1
  297. package/dist/client/assets/{use-navigate-to-agent-CMLrR8_i.js → use-navigate-to-agent-DsQtABEb.js} +1 -1
  298. package/dist/client/assets/use-new-blocks-editor-Cs3ReMIg.js +1 -0
  299. package/dist/client/assets/{use-open-billing-url-DV3Mw_rW.js → use-open-billing-url-DI6SI6_b.js} +1 -1
  300. package/dist/client/assets/{use-org-auth-client-BPRhxMnE.js → use-org-auth-client-CMfKy3Bq.js} +1 -1
  301. package/dist/client/assets/{use-org-fs-DuYRtxMU.js → use-org-fs-Z9-raKJQ.js} +1 -1
  302. package/dist/client/assets/{use-org-repo-syncs-Cq8OTk0s.js → use-org-repo-syncs-CFMdB1kK.js} +1 -1
  303. package/dist/client/assets/{use-org-sso-B_12ddXr.js → use-org-sso-BXCR5jDm.js} +1 -1
  304. package/dist/client/assets/{use-organization-roles-CLTRHhQF.js → use-organization-roles-CSxnxFnM.js} +1 -1
  305. package/dist/client/assets/{use-organization-settings-CyNbsT_Y.js → use-organization-settings-5npr8MOa.js} +1 -1
  306. package/dist/client/assets/{use-panel-navigate-CI4aMO6T.js → use-panel-navigate-r-hPPKVX.js} +1 -1
  307. package/dist/client/assets/{use-project-scope-MVaROdW9.js → use-project-scope-DREdn5UJ.js} +1 -1
  308. package/dist/client/assets/{use-releases-COQQVDUj.js → use-releases-D7Uc8Png.js} +1 -1
  309. package/dist/client/assets/{use-reports-diagnostic-DXOvpvwj.js → use-reports-diagnostic-gGHoUye7.js} +1 -1
  310. package/dist/client/assets/{use-secrets-uMcIopGp.js → use-secrets-CHwzXsH3.js} +1 -1
  311. package/dist/client/assets/{use-section-preview-base-LTLUWNLJ.js → use-section-preview-base-Bc9_R9CZ.js} +1 -1
  312. package/dist/client/assets/{use-session-runtime-kkE6TWA-.js → use-session-runtime-C2ZA1Uab.js} +1 -1
  313. package/dist/client/assets/{use-tags-SfmdU89q.js → use-tags-BG7CoZRp.js} +1 -1
  314. package/dist/client/assets/{use-task-board-analytics-Du_3w6eI.js → use-task-board-analytics-DL68Rrrc.js} +1 -1
  315. package/dist/client/assets/{use-task-board-events-Dw8MmqKy.js → use-task-board-events-C3Z-ROLX.js} +1 -1
  316. package/dist/client/assets/{use-task-metadata-DWsFfeya.js → use-task-metadata-BZy8h2lF.js} +1 -1
  317. package/dist/client/assets/{use-thread-analytics-DjtxIzoC.js → use-thread-analytics-C_ZSrCnI.js} +1 -1
  318. package/dist/client/assets/{use-thread-outputs-Cshgq-qA.js → use-thread-outputs-BYTr6TGN.js} +1 -1
  319. package/dist/client/assets/useInfiniteQuery-BUWL84Zp.js +1 -0
  320. package/dist/client/assets/{useQueries-Gt4dEzY9.js → useQueries-Ds1aAzfY.js} +1 -1
  321. package/dist/client/assets/useSuspenseInfiniteQuery-BCbva-TN.js +1 -0
  322. package/dist/client/assets/{users-DY95ydzZ.js → users-CDJ79sCY.js} +1 -1
  323. package/dist/client/assets/{utils-DJ53MNtQ.js → utils-BwKsJ1bC.js} +1 -1
  324. package/dist/client/assets/{variant-calendar-DxoEME3l.js → variant-calendar-CXXuWqfj.js} +1 -1
  325. package/dist/client/assets/{variant-matcher-override-Ds9I3rXK.js → variant-matcher-override-CJ0zKSC-.js} +1 -1
  326. package/dist/client/assets/{view-mode-toggle-CSEnbhbe.js → view-mode-toggle-Bmy_DGPc.js} +1 -1
  327. package/dist/client/assets/{virtual-mcp-Dq934w5H.js → virtual-mcp-Crc3UkRp.js} +1 -1
  328. package/dist/client/index.html +1 -1
  329. package/dist/server/cli.js +5 -5
  330. package/dist/server/server.js +5 -5
  331. package/package.json +1 -1
  332. package/dist/client/assets/agent-app-DuQgCc0g.js +0 -1
  333. package/dist/client/assets/agent-deck-BHmOD9sH.js +0 -1
  334. package/dist/client/assets/agent-library-CcFoBfUn.js +0 -1
  335. package/dist/client/assets/agent-library-file-BxAkQ3vS.js +0 -1
  336. package/dist/client/assets/agent-settings-WhkcZPVp.js +0 -1
  337. package/dist/client/assets/agent-site-editor-code-BBoPn4RF.js +0 -2
  338. package/dist/client/assets/agent-view-CNEaMjVV.js +0 -1
  339. package/dist/client/assets/api-keys-CywOJSDL.js +0 -1
  340. package/dist/client/assets/flat-project-B3rHfM-e.js +0 -1
  341. package/dist/client/assets/library-DIwomljg.js +0 -1
  342. package/dist/client/assets/project-reports-DP-DPfgn.js +0 -1
  343. package/dist/client/assets/project-tasks-BwWgAP4T.js +0 -1
  344. package/dist/client/assets/record-editor-BM3JWxfl.js +0 -1
  345. package/dist/client/assets/reports-CE_Jb1Xk.js +0 -1
  346. package/dist/client/assets/route-BStOq0fK.js +0 -1
  347. package/dist/client/assets/tasks-DPS33dUJ.js +0 -1
  348. package/dist/client/assets/use-new-blocks-editor-CMGUR49P.js +0 -1
  349. package/dist/client/assets/useInfiniteQuery-B0bYlgUv.js +0 -1
  350. package/dist/client/assets/useSuspenseInfiniteQuery-Bs7AyvsN.js +0 -1
@@ -1 +1 @@
1
- import{a as z,R as Fe,r as w,e as ue,q as V,j as t,l as I,B as te,o as ze,m as Ve,K as ge,c as le,b as be,h as _e}from"./index-Duf3JTVM.js";import{I as ee}from"./input-l6pnirh7.js";import{i as Qe}from"./use-is-desktop-app-BNujXJc_.js";import{d as He,e as Ke}from"./backoff-8mStPHYB.js";class Le extends Error{constructor(e,a){super(`Retrying exceeded the maxAttempts (${a}).`),this.name="RetryError",this.cause=e}}async function Ye(n,e){const{multiplier:a=2,maxTimeout:u=6e4,maxAttempts:f=5,minTimeout:o=1e3,jitter:i=1,isRetriable:m=()=>!0,signal:g}=e??{};if(!Number.isInteger(f)||f<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${f}`);if(!Number.isFinite(a)||a<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${a}`);if(Number.isNaN(u)||u<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${u}`);if(Number.isNaN(o)||o<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${o}`);if(o>u)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${o}', 'maxTimeout=${u}'`);if(Number.isNaN(i)||i<0||i>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${i}`);let N=0;for(;;){g?.throwIfAborted();try{return await n()}catch(v){if(!m(v))throw v;if(N+1>=f)throw new Le(v,f);const P=Ke(u,o,N,a,i);await He(P,g?{signal:g}:void 0)}N++}}const Oe={submitEmailPassword:({mode:n,email:e,password:a,name:u})=>n==="sign_up"?z.signUp.email({email:e,password:a,name:u||""}):z.signIn.email({email:e,password:a}),requestPasswordReset:({email:n,redirectTo:e})=>z.requestPasswordReset({email:n,redirectTo:e}),sendOtp:({email:n})=>z.emailOtp.sendVerificationOtp({email:n,type:"sign-in"}),submitOtp:({email:n,otp:e})=>z.signIn.emailOtp({email:n,otp:e}),socialSignIn:({provider:n,callbackURL:e})=>z.signIn.social({provider:n,callbackURL:e}),ssoSignIn:({providerId:n,callbackURL:e})=>z.signIn.sso({providerId:n,callbackURL:e}),onAuthenticated:n=>{window.location.href=n}},he="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Ge={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:n=>`Code sent to ${n}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:n=>`Continue with ${n}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Je({redirectUrl:n,callbackUrl:e="/",title:a,subtitle:u,brand:f,copy:o,variant:i="default",allowedSocialProviders:m,allowPassword:g=!0,onAuthEvent:N,actions:v}){const{emailAndPassword:P,resetPassword:E,emailOtp:y,socialProviders:A}=Fe(),d={...Oe,...v},h=s=>{try{N?.(s)}catch{}},j=i==="compact",se=m?A.providers.filter(s=>m.includes(s.name)):A.providers,ne=A.enabled&&se.length>0,de=P.enabled&&(g||!y.enabled&&!ne),ce=A.enabled&&A.providers.length>0&&!ne&&!y.enabled&&!de?A.providers:se,p=A.enabled&&ce.length>0,F=P.enabled&&(g||!y.enabled&&!p),[b,_]=w.useState(""),[L,Q]=w.useState(""),[U,O]=w.useState(""),[D,l]=w.useState(""),[x,$]=w.useState(!1),[M,W]=w.useState(()=>y.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[C,H]=w.useState(""),[ye,we]=w.useState(!1),[Re,pe]=w.useState(null),r={...Ge,...o},re=w.useId(),K=`${re}-email`,Y=`${re}-email-error`,ve=`${re}-name`,Ee=`${re}-password`,Se=`${re}-otp`,k=M==="signUp",q=M==="forgotPassword",T=M==="emailOtp",ie=ue({mutationFn:async({email:s,password:c,name:R})=>{try{const Z=await d.submitEmailPassword({mode:k?"sign_up":"sign_in",email:s,password:c,name:R});if(Z.error)throw new Error(Z.error.message||(k?r.signUpFailed:r.signInFailed));return Z}catch(Z){throw Z instanceof Error?Z:new Error(r.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:k?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:k?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),V(k?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),ae=ue({mutationFn:async({email:s})=>{const c=await d.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(c.error)throw new Error(c.error.message||r.resetEmailFailed);return c},onSuccess:()=>{V("password_reset_requested"),we(!0)},onError:s=>{V("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),G=ue({mutationFn:async({email:s})=>{const c=await d.sendOtp({email:s});if(c.error)throw new Error(c.error.message||r.otpSendFailed);return c},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),V("email_otp_sent"),$(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),V("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),J=ue({mutationFn:async({email:s,otp:c})=>{const R=await d.submitOtp({email:s,otp:c});if(R.error)throw new Error(R.error.message||r.invalidCode);return R},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),V("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),me=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),xe=()=>{b.trim()&&!me(b)&&H(r.invalidEmail)},De=s=>{if(s.preventDefault(),!me(b)){H(r.invalidEmail),h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}ie.mutate({email:b,password:L,name:U})},$e=s=>{if(s.preventDefault(),!me(b)){H(r.invalidEmail);return}ae.mutate({email:b})},Me=s=>{if(s.preventDefault(),!me(b)){H(r.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}G.mutate({email:b})},We=s=>{s.preventDefault(),J.mutate({email:b,otp:D})},X=s=>c=>{s(c.target.value),je&&ie.reset(),Ne&&ae.reset(),Ae&&(G.reset(),J.reset()),s===_&&C&&H("")},oe=s=>{W(s),O(""),l(""),$(!1),H(""),we(!1),pe(null),ie.reset(),ae.reset(),G.reset(),J.reset()},S=ie.isPending||ae.isPending||G.isPending||J.isPending,je=ie.error,Ne=ae.error,Ae=G.error||J.error,B=k?b.trim()&&L.trim()&&U.trim():q?b.trim():T?x?D.trim():b.trim():b.trim()&&L.trim(),qe=s=>{if(!s)return null;const c=s.message.toLowerCase();return c.includes("unauthorized")||c.includes("401")?r.invalidEmailOrPassword:c.includes("already exists")||c.includes("409")?r.accountExists:c.includes("network")||c.includes("fetch")?r.networkError:c.includes("rate limit")||c.includes("429")?r.tooManyAttempts:c.includes("invalid")&&c.includes("otp")?r.invalidOrExpiredCode:s.message||r.genericError},Ce=je||Ne||Ae||Re,Ue=async s=>{h({type:"started",method:"social",provider:s}),pe(null);try{const c=await d.socialSignIn({provider:s,callbackURL:n??e});if(c.error)throw new Error(c.error.message||r.authenticationFailed)}catch(c){const R=c instanceof Error?c.message:String(c);h({type:"failed",method:"social",provider:s,stage:"redirect",error:R}),V("social_signin_failed",{provider:s,error:R}),pe(c instanceof Error?c:new Error(R))}},Be=q?r.resetPasswordTitle:T&&x?r.verificationCodeTitle:a??r.welcomeTitle,Pe=q?r.resetPasswordSubtitle:T&&x?r.codeSentTo(b):u===void 0?r.defaultSubtitle:u;return t.jsxs("div",{className:I("grid w-full",j?"gap-5":"gap-10"),children:[f??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:I("font-medium",j?"text-xl leading-7":"text-2xl leading-8"),children:Be}),Pe&&t.jsx("p",{className:I("text-muted-foreground",j?"text-sm leading-5":"text-base leading-6"),children:Pe})]}),Ce&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:qe(Ce)}),ye&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:r.resetEmailSent}),!q&&!(T&&x)&&p&&t.jsx("div",{className:"grid gap-2",children:ce.map(s=>t.jsxs(te,{type:"button",variant:"outline",size:j?"lg":"xl",disabled:S,onClick:()=>{Ue(s.name)},className:I("flex w-full items-center justify-center gap-3 bg-background px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 rounded-lg",j?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:I("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),r.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!q&&!(T&&x)&&p&&(F||y.enabled)&&t.jsxs("div",{className:I("flex items-center gap-2.5",j?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:I("text-muted-foreground",j?"text-sm":"text-base"),children:r.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),T&&y.enabled&&t.jsx(t.Fragment,{children:x?t.jsxs("form",{onSubmit:We,className:I("grid gap-2",j&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:Se,className:I("text-sm font-medium text-foreground",j&&"sr-only"),children:r.verificationCodeLabel}),t.jsx(ee,{id:Se,type:"text",placeholder:r.enterCodePlaceholder,value:D,onChange:X(l),required:!0,disabled:S,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx(te,{type:"submit",size:j?"lg":"xl",disabled:S||!B,className:I(j?"sm:w-auto":"w-full"),children:S?r.verifying:r.verify}),t.jsx("button",{type:"button",onClick:()=>{$(!1),l(""),G.reset(),J.reset()},disabled:S,className:I("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",j&&"sm:col-span-2"),children:r.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Me,className:I("grid gap-2",j&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:K,className:I("text-sm font-medium text-foreground",j&&"sr-only"),children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:r.emailPlaceholder,value:b,onChange:X(_),onBlur:xe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?Y:void 0,className:"h-11 rounded-lg"}),C&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive",children:C})]}),t.jsx(te,{type:"submit",size:j?"lg":"xl",disabled:S||!B,className:I(j?"sm:w-auto":"w-full"),children:S?r.sending:r.sendCode})]})}),q&&F&&!ye&&t.jsxs("form",{onSubmit:$e,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:xe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?Y:void 0,className:"h-11 rounded-lg"}),C&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:C})]}),t.jsx(te,{type:"submit",disabled:S||!B,className:"w-full font-semibold",size:"xl",children:S?r.sending:r.sendResetLink})]}),!q&&!T&&F&&t.jsxs("form",{onSubmit:De,className:"grid gap-5",children:[k&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ve,className:"block text-sm font-medium text-foreground mb-2",children:r.nameLabel}),t.jsx(ee,{id:ve,type:"text",placeholder:r.namePlaceholder,value:U,onChange:X(O),required:!0,disabled:S,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:xe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?Y:void 0,className:"h-11 rounded-lg"}),C&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:C})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:Ee,className:"block text-sm font-medium text-foreground",children:r.passwordLabel}),!k&&E.enabled&&t.jsx("button",{type:"button",onClick:()=>oe("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:r.forgotPassword})]}),t.jsx(ee,{id:Ee,type:"password",placeholder:"••••••••",value:L,onChange:X(Q),required:!0,disabled:S,autoComplete:k?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:I("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",B?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:I("p-1",!B&&"pointer-events-none"),children:t.jsx(te,{type:"submit",disabled:S||!B,className:I("w-full font-semibold"),size:"xl","aria-hidden":!B,children:S?k?r.creatingAccount:r.signingIn:r.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:q?t.jsx("button",{type:"button",onClick:()=>oe("signIn"),disabled:S,className:he,children:r.backToSignIn}):T&&F?t.jsx("button",{type:"button",onClick:()=>oe("signIn"),disabled:S,className:he,children:r.signInWithPassword}):!T&&F?t.jsxs(t.Fragment,{children:[k?r.alreadyHaveAccount:r.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>oe(k?"signIn":"signUp"),disabled:S,className:he,children:k?r.signIn:r.signUp}),y.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>oe("emailOtp"),disabled:S,className:he,children:r.signInWithEmailCode})]})]}):null})]})}async function fe(){throw new Error("Tauri bridge is unavailable outside the desktop build")}function Xe(){const n=ze(),e=Qe(),a=Ve({queryKey:ge.desktopAuthStatus(),queryFn:async()=>(await fe()).fetchAuthStatus(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0}),[u,f]=w.useState(!1),[o,i]=w.useState(null),[m,g]=w.useState(!1),[N,v]=w.useState(null);w.useEffect(()=>{},[e,n]);async function P(){f(!0),i(null);try{const d=await fe();await d.performAuthLogin();const h=await d.fetchAuthStatus();n.setQueryData(ge.desktopAuthStatus(),h)}catch(d){i(d instanceof Error?d.message:"Sign-in failed")}finally{f(!1)}}async function E(){f(!0);try{const d=await fe();await d.performAuthLogout();const h=await d.fetchAuthStatus();n.setQueryData(ge.desktopAuthStatus(),h)}finally{f(!1)}}async function y(){g(!0),v(null);let d;try{d=await fe()}catch(h){v(h instanceof Error?h.message:"Sign-in failed"),g(!1);return}try{await d.performAuthCompleteSession()}catch(h){v(h instanceof Error?h.message:"Sign-in failed")}finally{try{const h=await d.fetchAuthStatus();n.setQueryData(ge.desktopAuthStatus(),h)}finally{g(!1)}}}async function A(){await a.refetch()}return{status:a.data,isChecking:a.isLoading,isRetryingStatus:a.isFetching,isPending:u,loginError:o,login:P,logout:E,isCompletingSession:m,completeSessionError:N,completeSession:y,retryStatus:A}}function Ze(n){return!(n.emailAndPassword.enabled||n.emailOtp.enabled||n.socialProviders.enabled)&&!n.sso.enabled&&n.magicLink.enabled}function et(){return le.c(10),Xe(),null}function tt(n){const e=le.c(25),{onContinue:a,isPending:u,error:f}=n,o=be();let i;e[0]!==o?(i=o("common.authEntry.browserOnlyTitle"),e[0]=o,e[1]=i):i=e[1];let m;e[2]!==i?(m=t.jsx("h1",{className:"text-lg font-medium text-foreground",children:i}),e[2]=i,e[3]=m):m=e[3];let g;e[4]!==o?(g=o("common.authEntry.browserOnlyDescription"),e[4]=o,e[5]=g):g=e[5];let N;e[6]!==g?(N=t.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:g}),e[6]=g,e[7]=N):N=e[7];let v;e[8]!==m||e[9]!==N?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[m,N]}),e[8]=m,e[9]=N,e[10]=v):v=e[10];let P;e[11]!==a?(P=()=>{a()},e[11]=a,e[12]=P):P=e[12];let E;e[13]!==o?(E=o("common.authEntry.browserOnlyCta"),e[13]=o,e[14]=E):E=e[14];let y;e[15]!==u||e[16]!==P||e[17]!==E?(y=t.jsx(te,{onClick:P,disabled:u,children:E}),e[15]=u,e[16]=P,e[17]=E,e[18]=y):y=e[18];let A;e[19]!==f?(A=f&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:f}),e[19]=f,e[20]=A):A=e[20];let d;return e[21]!==v||e[22]!==y||e[23]!==A?(d=t.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[v,y,A]}),e[21]=v,e[22]=y,e[23]=A,e[24]=d):d=e[24],d}function Ie(n){const e=le.c(8),{label:a,error:u}=n;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(_e,{size:"lg"}),e[0]=f):f=e[0];let o;e[1]!==a?(o=a&&t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[1]=a,e[2]=o):o=e[2];let i;e[3]!==u?(i=u&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:u}),e[3]=u,e[4]=i):i=e[4];let m;return e[5]!==o||e[6]!==i?(m=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[f,o,i]}),e[5]=o,e[6]=i,e[7]=m):m=e[7],m}class ke{constructor(e){this.response=e}response}function st(n){return n.startsWith("/")&&!n.startsWith("//")?n:"/"}function nt({redirectTo:n,onAuthEvent:e}){const a=be(),[u,f]=w.useState(null),o=w.useEffectEvent(i=>{try{e?.(i)}catch{}});return w.useEffect(()=>{let i=!1;return(async()=>{o({type:"started",method:"local"});try{let m;try{m=await Ye(async()=>{const g=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(g.status>=500)throw new ke(g);return g},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(g){if(g instanceof Le&&g.cause instanceof ke)m=g.cause.response;else throw g}if(!m.ok){const g=await m.json().catch(()=>({}));throw new Error(g?.error||a("common.authEntry.autoLoginFailed"))}i||(o({type:"succeeded",method:"local"}),window.location.href=st(n))}catch(m){i||(o({type:"failed",method:"local",stage:"authenticate",error:m instanceof Error?m.message:String(m)}),f(m instanceof Error?m.message:a("common.authEntry.autoLoginFailed")))}})(),()=>{i=!0}},[n]),u?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:a("common.authEntry.autoLoginFailedWithError",{error:u})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:a("common.authEntry.tryRestartingServer")})]})}):t.jsx(Te,{})}function Te(){const n=le.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(_e,{size:"lg",label:"Signing in"})}),n[0]=e):e=n[0],e}function rt({callbackURL:n,providerId:e,ssoSignIn:a,onAuthEvent:u}){const f=w.useEffectEvent(i=>{try{u?.(i)}catch{}}),o=w.useEffectEvent(a);return w.useEffect(()=>{(async()=>{f({type:"started",method:"sso",provider:e});try{const i=await o({providerId:e,callbackURL:n});if(i.error)throw new Error(i.error.message||"SSO redirect failed")}catch(i){f({type:"failed",method:"sso",provider:e,stage:"redirect",error:i instanceof Error?i.message:String(i)})}})()},[e,n]),t.jsx(Te,{})}function dt(n){const e=le.c(51),{callbackUrl:a,redirectUrl:u,allowAutoLogin:f,title:o,subtitle:i,brand:m,copy:g,variant:N,allowedSocialProviders:v,allowPassword:P,onAuthEvent:E,onAuthenticated:y}=n,A=f===void 0?!0:f,d=be(),{sso:h,emailAndPassword:j,magicLink:se,emailOtp:ne,socialProviders:de,localMode:ce}=Fe(),p=et(),F=u||a;let b;e[0]!==y?(b=y?{onAuthenticated:y}:void 0,e[0]=y,e[1]=b):b=e[1];const _=b,L=p?.actions;let Q;e[2]!==_||e[3]!==L?(Q={...Oe,..._,...L},e[2]=_,e[3]=L,e[4]=Q):Q=e[4];const U=Q;if(p?.isPending){let l;e[5]!==d?(l=d("common.authEntry.finishSignInInBrowser"),e[5]=d,e[6]=l):l=e[6];let x;return e[7]!==p.loginError||e[8]!==l?(x=t.jsx(Ie,{label:l,error:p.loginError}),e[7]=p.loginError,e[8]=l,e[9]=x):x=e[9],x}if(p?.isCompletingSession){let l;e[10]!==d?(l=d("common.authEntry.finishingSignIn"),e[10]=d,e[11]=l):l=e[11];let x;return e[12]!==p.completeSessionError||e[13]!==l?(x=t.jsx(Ie,{label:l,error:p.completeSessionError}),e[12]=p.completeSessionError,e[13]=l,e[14]=x):x=e[14],x}if(ce&&A){let l;return e[15]!==E||e[16]!==F?(l=t.jsx(nt,{redirectTo:F,onAuthEvent:E}),e[15]=E,e[16]=F,e[17]=l):l=e[17],l}if(h.enabled){let l;return e[18]!==E||e[19]!==F||e[20]!==U.ssoSignIn||e[21]!==h.providerId?(l=t.jsx(rt,{callbackURL:F,providerId:h.providerId,ssoSignIn:U.ssoSignIn,onAuthEvent:E}),e[18]=E,e[19]=F,e[20]=U.ssoSignIn,e[21]=h.providerId,e[22]=l):l=e[22],l}if(p&&Ze({emailAndPassword:j,emailOtp:ne,socialProviders:de,magicLink:se,sso:h})){let l;return e[23]!==p.isPending||e[24]!==p.login||e[25]!==p.loginError?(l=t.jsx(tt,{onContinue:p.login,isPending:p.isPending,error:p.loginError}),e[23]=p.isPending,e[24]=p.login,e[25]=p.loginError,e[26]=l):l=e[26],l}if(j.enabled||se.enabled||ne.enabled||de.enabled){const l=p?.loginError??p?.completeSessionError??null;let x;e[27]!==_||e[28]!==L?(x={..._,...L},e[27]=_,e[28]=L,e[29]=x):x=e[29];let $;e[30]!==P||e[31]!==v||e[32]!==m||e[33]!==a||e[34]!==g||e[35]!==E||e[36]!==u||e[37]!==i||e[38]!==x||e[39]!==o||e[40]!==N?($=t.jsx(Je,{redirectUrl:u,callbackUrl:a,title:o,subtitle:i,brand:m,copy:g,variant:N,allowedSocialProviders:v,allowPassword:P,onAuthEvent:E,actions:x}),e[30]=P,e[31]=v,e[32]=m,e[33]=a,e[34]=g,e[35]=E,e[36]=u,e[37]=i,e[38]=x,e[39]=o,e[40]=N,e[41]=$):$=e[41];const M=$;if(!l)return M;let W;e[42]!==l?(W=t.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:l}),e[42]=l,e[43]=W):W=e[43];let C;return e[44]!==M||e[45]!==W?(C=t.jsxs("div",{className:"grid gap-4",children:[W,M]}),e[44]=M,e[45]=W,e[46]=C):C=e[46],C}let O;e[47]!==d?(O=d("common.authEntry.noLoginOptions"),e[47]=d,e[48]=O):O=e[48];let D;return e[49]!==O?(D=t.jsx("div",{children:O}),e[49]=O,e[50]=D):D=e[50],D}export{Te as A,dt as a,Xe as u};
1
+ import{a as z,R as Fe,r as w,e as ue,q as V,j as t,l as I,B as te,o as ze,m as Ve,K as ge,c as le,b as be,h as _e}from"./index-2duAHMPd.js";import{I as ee}from"./input-FbqXnpg0.js";import{i as Qe}from"./use-is-desktop-app-BNujXJc_.js";import{d as He,e as Ke}from"./backoff-8mStPHYB.js";class Le extends Error{constructor(e,a){super(`Retrying exceeded the maxAttempts (${a}).`),this.name="RetryError",this.cause=e}}async function Ye(n,e){const{multiplier:a=2,maxTimeout:u=6e4,maxAttempts:f=5,minTimeout:o=1e3,jitter:i=1,isRetriable:m=()=>!0,signal:g}=e??{};if(!Number.isInteger(f)||f<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${f}`);if(!Number.isFinite(a)||a<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${a}`);if(Number.isNaN(u)||u<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${u}`);if(Number.isNaN(o)||o<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${o}`);if(o>u)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${o}', 'maxTimeout=${u}'`);if(Number.isNaN(i)||i<0||i>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${i}`);let N=0;for(;;){g?.throwIfAborted();try{return await n()}catch(v){if(!m(v))throw v;if(N+1>=f)throw new Le(v,f);const P=Ke(u,o,N,a,i);await He(P,g?{signal:g}:void 0)}N++}}const Oe={submitEmailPassword:({mode:n,email:e,password:a,name:u})=>n==="sign_up"?z.signUp.email({email:e,password:a,name:u||""}):z.signIn.email({email:e,password:a}),requestPasswordReset:({email:n,redirectTo:e})=>z.requestPasswordReset({email:n,redirectTo:e}),sendOtp:({email:n})=>z.emailOtp.sendVerificationOtp({email:n,type:"sign-in"}),submitOtp:({email:n,otp:e})=>z.signIn.emailOtp({email:n,otp:e}),socialSignIn:({provider:n,callbackURL:e})=>z.signIn.social({provider:n,callbackURL:e}),ssoSignIn:({providerId:n,callbackURL:e})=>z.signIn.sso({providerId:n,callbackURL:e}),onAuthenticated:n=>{window.location.href=n}},he="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Ge={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:n=>`Code sent to ${n}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:n=>`Continue with ${n}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Je({redirectUrl:n,callbackUrl:e="/",title:a,subtitle:u,brand:f,copy:o,variant:i="default",allowedSocialProviders:m,allowPassword:g=!0,onAuthEvent:N,actions:v}){const{emailAndPassword:P,resetPassword:E,emailOtp:y,socialProviders:A}=Fe(),d={...Oe,...v},h=s=>{try{N?.(s)}catch{}},j=i==="compact",se=m?A.providers.filter(s=>m.includes(s.name)):A.providers,ne=A.enabled&&se.length>0,de=P.enabled&&(g||!y.enabled&&!ne),ce=A.enabled&&A.providers.length>0&&!ne&&!y.enabled&&!de?A.providers:se,p=A.enabled&&ce.length>0,F=P.enabled&&(g||!y.enabled&&!p),[b,_]=w.useState(""),[L,Q]=w.useState(""),[U,O]=w.useState(""),[D,l]=w.useState(""),[x,$]=w.useState(!1),[M,W]=w.useState(()=>y.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[C,H]=w.useState(""),[ye,we]=w.useState(!1),[Re,pe]=w.useState(null),r={...Ge,...o},re=w.useId(),K=`${re}-email`,Y=`${re}-email-error`,ve=`${re}-name`,Ee=`${re}-password`,Se=`${re}-otp`,k=M==="signUp",q=M==="forgotPassword",T=M==="emailOtp",ie=ue({mutationFn:async({email:s,password:c,name:R})=>{try{const Z=await d.submitEmailPassword({mode:k?"sign_up":"sign_in",email:s,password:c,name:R});if(Z.error)throw new Error(Z.error.message||(k?r.signUpFailed:r.signInFailed));return Z}catch(Z){throw Z instanceof Error?Z:new Error(r.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:k?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:k?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),V(k?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),ae=ue({mutationFn:async({email:s})=>{const c=await d.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(c.error)throw new Error(c.error.message||r.resetEmailFailed);return c},onSuccess:()=>{V("password_reset_requested"),we(!0)},onError:s=>{V("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),G=ue({mutationFn:async({email:s})=>{const c=await d.sendOtp({email:s});if(c.error)throw new Error(c.error.message||r.otpSendFailed);return c},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),V("email_otp_sent"),$(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),V("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),J=ue({mutationFn:async({email:s,otp:c})=>{const R=await d.submitOtp({email:s,otp:c});if(R.error)throw new Error(R.error.message||r.invalidCode);return R},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),V("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),me=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),xe=()=>{b.trim()&&!me(b)&&H(r.invalidEmail)},De=s=>{if(s.preventDefault(),!me(b)){H(r.invalidEmail),h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}ie.mutate({email:b,password:L,name:U})},$e=s=>{if(s.preventDefault(),!me(b)){H(r.invalidEmail);return}ae.mutate({email:b})},Me=s=>{if(s.preventDefault(),!me(b)){H(r.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}G.mutate({email:b})},We=s=>{s.preventDefault(),J.mutate({email:b,otp:D})},X=s=>c=>{s(c.target.value),je&&ie.reset(),Ne&&ae.reset(),Ae&&(G.reset(),J.reset()),s===_&&C&&H("")},oe=s=>{W(s),O(""),l(""),$(!1),H(""),we(!1),pe(null),ie.reset(),ae.reset(),G.reset(),J.reset()},S=ie.isPending||ae.isPending||G.isPending||J.isPending,je=ie.error,Ne=ae.error,Ae=G.error||J.error,B=k?b.trim()&&L.trim()&&U.trim():q?b.trim():T?x?D.trim():b.trim():b.trim()&&L.trim(),qe=s=>{if(!s)return null;const c=s.message.toLowerCase();return c.includes("unauthorized")||c.includes("401")?r.invalidEmailOrPassword:c.includes("already exists")||c.includes("409")?r.accountExists:c.includes("network")||c.includes("fetch")?r.networkError:c.includes("rate limit")||c.includes("429")?r.tooManyAttempts:c.includes("invalid")&&c.includes("otp")?r.invalidOrExpiredCode:s.message||r.genericError},Ce=je||Ne||Ae||Re,Ue=async s=>{h({type:"started",method:"social",provider:s}),pe(null);try{const c=await d.socialSignIn({provider:s,callbackURL:n??e});if(c.error)throw new Error(c.error.message||r.authenticationFailed)}catch(c){const R=c instanceof Error?c.message:String(c);h({type:"failed",method:"social",provider:s,stage:"redirect",error:R}),V("social_signin_failed",{provider:s,error:R}),pe(c instanceof Error?c:new Error(R))}},Be=q?r.resetPasswordTitle:T&&x?r.verificationCodeTitle:a??r.welcomeTitle,Pe=q?r.resetPasswordSubtitle:T&&x?r.codeSentTo(b):u===void 0?r.defaultSubtitle:u;return t.jsxs("div",{className:I("grid w-full",j?"gap-5":"gap-10"),children:[f??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:I("font-medium",j?"text-xl leading-7":"text-2xl leading-8"),children:Be}),Pe&&t.jsx("p",{className:I("text-muted-foreground",j?"text-sm leading-5":"text-base leading-6"),children:Pe})]}),Ce&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:qe(Ce)}),ye&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:r.resetEmailSent}),!q&&!(T&&x)&&p&&t.jsx("div",{className:"grid gap-2",children:ce.map(s=>t.jsxs(te,{type:"button",variant:"outline",size:j?"lg":"xl",disabled:S,onClick:()=>{Ue(s.name)},className:I("flex w-full items-center justify-center gap-3 bg-background px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 rounded-lg",j?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:I("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),r.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!q&&!(T&&x)&&p&&(F||y.enabled)&&t.jsxs("div",{className:I("flex items-center gap-2.5",j?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:I("text-muted-foreground",j?"text-sm":"text-base"),children:r.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),T&&y.enabled&&t.jsx(t.Fragment,{children:x?t.jsxs("form",{onSubmit:We,className:I("grid gap-2",j&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:Se,className:I("text-sm font-medium text-foreground",j&&"sr-only"),children:r.verificationCodeLabel}),t.jsx(ee,{id:Se,type:"text",placeholder:r.enterCodePlaceholder,value:D,onChange:X(l),required:!0,disabled:S,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx(te,{type:"submit",size:j?"lg":"xl",disabled:S||!B,className:I(j?"sm:w-auto":"w-full"),children:S?r.verifying:r.verify}),t.jsx("button",{type:"button",onClick:()=>{$(!1),l(""),G.reset(),J.reset()},disabled:S,className:I("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",j&&"sm:col-span-2"),children:r.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Me,className:I("grid gap-2",j&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:K,className:I("text-sm font-medium text-foreground",j&&"sr-only"),children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:r.emailPlaceholder,value:b,onChange:X(_),onBlur:xe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?Y:void 0,className:"h-11 rounded-lg"}),C&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive",children:C})]}),t.jsx(te,{type:"submit",size:j?"lg":"xl",disabled:S||!B,className:I(j?"sm:w-auto":"w-full"),children:S?r.sending:r.sendCode})]})}),q&&F&&!ye&&t.jsxs("form",{onSubmit:$e,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:xe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?Y:void 0,className:"h-11 rounded-lg"}),C&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:C})]}),t.jsx(te,{type:"submit",disabled:S||!B,className:"w-full font-semibold",size:"xl",children:S?r.sending:r.sendResetLink})]}),!q&&!T&&F&&t.jsxs("form",{onSubmit:De,className:"grid gap-5",children:[k&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ve,className:"block text-sm font-medium text-foreground mb-2",children:r.nameLabel}),t.jsx(ee,{id:ve,type:"text",placeholder:r.namePlaceholder,value:U,onChange:X(O),required:!0,disabled:S,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:xe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!C,"aria-describedby":C?Y:void 0,className:"h-11 rounded-lg"}),C&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:C})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:Ee,className:"block text-sm font-medium text-foreground",children:r.passwordLabel}),!k&&E.enabled&&t.jsx("button",{type:"button",onClick:()=>oe("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:r.forgotPassword})]}),t.jsx(ee,{id:Ee,type:"password",placeholder:"••••••••",value:L,onChange:X(Q),required:!0,disabled:S,autoComplete:k?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:I("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",B?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:I("p-1",!B&&"pointer-events-none"),children:t.jsx(te,{type:"submit",disabled:S||!B,className:I("w-full font-semibold"),size:"xl","aria-hidden":!B,children:S?k?r.creatingAccount:r.signingIn:r.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:q?t.jsx("button",{type:"button",onClick:()=>oe("signIn"),disabled:S,className:he,children:r.backToSignIn}):T&&F?t.jsx("button",{type:"button",onClick:()=>oe("signIn"),disabled:S,className:he,children:r.signInWithPassword}):!T&&F?t.jsxs(t.Fragment,{children:[k?r.alreadyHaveAccount:r.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>oe(k?"signIn":"signUp"),disabled:S,className:he,children:k?r.signIn:r.signUp}),y.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>oe("emailOtp"),disabled:S,className:he,children:r.signInWithEmailCode})]})]}):null})]})}async function fe(){throw new Error("Tauri bridge is unavailable outside the desktop build")}function Xe(){const n=ze(),e=Qe(),a=Ve({queryKey:ge.desktopAuthStatus(),queryFn:async()=>(await fe()).fetchAuthStatus(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0}),[u,f]=w.useState(!1),[o,i]=w.useState(null),[m,g]=w.useState(!1),[N,v]=w.useState(null);w.useEffect(()=>{},[e,n]);async function P(){f(!0),i(null);try{const d=await fe();await d.performAuthLogin();const h=await d.fetchAuthStatus();n.setQueryData(ge.desktopAuthStatus(),h)}catch(d){i(d instanceof Error?d.message:"Sign-in failed")}finally{f(!1)}}async function E(){f(!0);try{const d=await fe();await d.performAuthLogout();const h=await d.fetchAuthStatus();n.setQueryData(ge.desktopAuthStatus(),h)}finally{f(!1)}}async function y(){g(!0),v(null);let d;try{d=await fe()}catch(h){v(h instanceof Error?h.message:"Sign-in failed"),g(!1);return}try{await d.performAuthCompleteSession()}catch(h){v(h instanceof Error?h.message:"Sign-in failed")}finally{try{const h=await d.fetchAuthStatus();n.setQueryData(ge.desktopAuthStatus(),h)}finally{g(!1)}}}async function A(){await a.refetch()}return{status:a.data,isChecking:a.isLoading,isRetryingStatus:a.isFetching,isPending:u,loginError:o,login:P,logout:E,isCompletingSession:m,completeSessionError:N,completeSession:y,retryStatus:A}}function Ze(n){return!(n.emailAndPassword.enabled||n.emailOtp.enabled||n.socialProviders.enabled)&&!n.sso.enabled&&n.magicLink.enabled}function et(){return le.c(10),Xe(),null}function tt(n){const e=le.c(25),{onContinue:a,isPending:u,error:f}=n,o=be();let i;e[0]!==o?(i=o("common.authEntry.browserOnlyTitle"),e[0]=o,e[1]=i):i=e[1];let m;e[2]!==i?(m=t.jsx("h1",{className:"text-lg font-medium text-foreground",children:i}),e[2]=i,e[3]=m):m=e[3];let g;e[4]!==o?(g=o("common.authEntry.browserOnlyDescription"),e[4]=o,e[5]=g):g=e[5];let N;e[6]!==g?(N=t.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:g}),e[6]=g,e[7]=N):N=e[7];let v;e[8]!==m||e[9]!==N?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[m,N]}),e[8]=m,e[9]=N,e[10]=v):v=e[10];let P;e[11]!==a?(P=()=>{a()},e[11]=a,e[12]=P):P=e[12];let E;e[13]!==o?(E=o("common.authEntry.browserOnlyCta"),e[13]=o,e[14]=E):E=e[14];let y;e[15]!==u||e[16]!==P||e[17]!==E?(y=t.jsx(te,{onClick:P,disabled:u,children:E}),e[15]=u,e[16]=P,e[17]=E,e[18]=y):y=e[18];let A;e[19]!==f?(A=f&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:f}),e[19]=f,e[20]=A):A=e[20];let d;return e[21]!==v||e[22]!==y||e[23]!==A?(d=t.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[v,y,A]}),e[21]=v,e[22]=y,e[23]=A,e[24]=d):d=e[24],d}function Ie(n){const e=le.c(8),{label:a,error:u}=n;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(_e,{size:"lg"}),e[0]=f):f=e[0];let o;e[1]!==a?(o=a&&t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[1]=a,e[2]=o):o=e[2];let i;e[3]!==u?(i=u&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:u}),e[3]=u,e[4]=i):i=e[4];let m;return e[5]!==o||e[6]!==i?(m=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[f,o,i]}),e[5]=o,e[6]=i,e[7]=m):m=e[7],m}class ke{constructor(e){this.response=e}response}function st(n){return n.startsWith("/")&&!n.startsWith("//")?n:"/"}function nt({redirectTo:n,onAuthEvent:e}){const a=be(),[u,f]=w.useState(null),o=w.useEffectEvent(i=>{try{e?.(i)}catch{}});return w.useEffect(()=>{let i=!1;return(async()=>{o({type:"started",method:"local"});try{let m;try{m=await Ye(async()=>{const g=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(g.status>=500)throw new ke(g);return g},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(g){if(g instanceof Le&&g.cause instanceof ke)m=g.cause.response;else throw g}if(!m.ok){const g=await m.json().catch(()=>({}));throw new Error(g?.error||a("common.authEntry.autoLoginFailed"))}i||(o({type:"succeeded",method:"local"}),window.location.href=st(n))}catch(m){i||(o({type:"failed",method:"local",stage:"authenticate",error:m instanceof Error?m.message:String(m)}),f(m instanceof Error?m.message:a("common.authEntry.autoLoginFailed")))}})(),()=>{i=!0}},[n]),u?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:a("common.authEntry.autoLoginFailedWithError",{error:u})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:a("common.authEntry.tryRestartingServer")})]})}):t.jsx(Te,{})}function Te(){const n=le.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(_e,{size:"lg",label:"Signing in"})}),n[0]=e):e=n[0],e}function rt({callbackURL:n,providerId:e,ssoSignIn:a,onAuthEvent:u}){const f=w.useEffectEvent(i=>{try{u?.(i)}catch{}}),o=w.useEffectEvent(a);return w.useEffect(()=>{(async()=>{f({type:"started",method:"sso",provider:e});try{const i=await o({providerId:e,callbackURL:n});if(i.error)throw new Error(i.error.message||"SSO redirect failed")}catch(i){f({type:"failed",method:"sso",provider:e,stage:"redirect",error:i instanceof Error?i.message:String(i)})}})()},[e,n]),t.jsx(Te,{})}function dt(n){const e=le.c(51),{callbackUrl:a,redirectUrl:u,allowAutoLogin:f,title:o,subtitle:i,brand:m,copy:g,variant:N,allowedSocialProviders:v,allowPassword:P,onAuthEvent:E,onAuthenticated:y}=n,A=f===void 0?!0:f,d=be(),{sso:h,emailAndPassword:j,magicLink:se,emailOtp:ne,socialProviders:de,localMode:ce}=Fe(),p=et(),F=u||a;let b;e[0]!==y?(b=y?{onAuthenticated:y}:void 0,e[0]=y,e[1]=b):b=e[1];const _=b,L=p?.actions;let Q;e[2]!==_||e[3]!==L?(Q={...Oe,..._,...L},e[2]=_,e[3]=L,e[4]=Q):Q=e[4];const U=Q;if(p?.isPending){let l;e[5]!==d?(l=d("common.authEntry.finishSignInInBrowser"),e[5]=d,e[6]=l):l=e[6];let x;return e[7]!==p.loginError||e[8]!==l?(x=t.jsx(Ie,{label:l,error:p.loginError}),e[7]=p.loginError,e[8]=l,e[9]=x):x=e[9],x}if(p?.isCompletingSession){let l;e[10]!==d?(l=d("common.authEntry.finishingSignIn"),e[10]=d,e[11]=l):l=e[11];let x;return e[12]!==p.completeSessionError||e[13]!==l?(x=t.jsx(Ie,{label:l,error:p.completeSessionError}),e[12]=p.completeSessionError,e[13]=l,e[14]=x):x=e[14],x}if(ce&&A){let l;return e[15]!==E||e[16]!==F?(l=t.jsx(nt,{redirectTo:F,onAuthEvent:E}),e[15]=E,e[16]=F,e[17]=l):l=e[17],l}if(h.enabled){let l;return e[18]!==E||e[19]!==F||e[20]!==U.ssoSignIn||e[21]!==h.providerId?(l=t.jsx(rt,{callbackURL:F,providerId:h.providerId,ssoSignIn:U.ssoSignIn,onAuthEvent:E}),e[18]=E,e[19]=F,e[20]=U.ssoSignIn,e[21]=h.providerId,e[22]=l):l=e[22],l}if(p&&Ze({emailAndPassword:j,emailOtp:ne,socialProviders:de,magicLink:se,sso:h})){let l;return e[23]!==p.isPending||e[24]!==p.login||e[25]!==p.loginError?(l=t.jsx(tt,{onContinue:p.login,isPending:p.isPending,error:p.loginError}),e[23]=p.isPending,e[24]=p.login,e[25]=p.loginError,e[26]=l):l=e[26],l}if(j.enabled||se.enabled||ne.enabled||de.enabled){const l=p?.loginError??p?.completeSessionError??null;let x;e[27]!==_||e[28]!==L?(x={..._,...L},e[27]=_,e[28]=L,e[29]=x):x=e[29];let $;e[30]!==P||e[31]!==v||e[32]!==m||e[33]!==a||e[34]!==g||e[35]!==E||e[36]!==u||e[37]!==i||e[38]!==x||e[39]!==o||e[40]!==N?($=t.jsx(Je,{redirectUrl:u,callbackUrl:a,title:o,subtitle:i,brand:m,copy:g,variant:N,allowedSocialProviders:v,allowPassword:P,onAuthEvent:E,actions:x}),e[30]=P,e[31]=v,e[32]=m,e[33]=a,e[34]=g,e[35]=E,e[36]=u,e[37]=i,e[38]=x,e[39]=o,e[40]=N,e[41]=$):$=e[41];const M=$;if(!l)return M;let W;e[42]!==l?(W=t.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:l}),e[42]=l,e[43]=W):W=e[43];let C;return e[44]!==M||e[45]!==W?(C=t.jsxs("div",{className:"grid gap-4",children:[W,M]}),e[44]=M,e[45]=W,e[46]=C):C=e[46],C}let O;e[47]!==d?(O=d("common.authEntry.noLoginOptions"),e[47]=d,e[48]=O):O=e[48];let D;return e[49]!==O?(D=t.jsx("div",{children:O}),e[49]=O,e[50]=D):D=e[50],D}export{Te as A,dt as a,Xe as u};
@@ -1 +1 @@
1
- import{c as g,l as p,j as f}from"./index-Duf3JTVM.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
1
+ import{c as g,l as p,j as f}from"./index-2duAHMPd.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
@@ -1 +1 @@
1
- import"./index-Duf3JTVM.js";import{i as u,a as p}from"./mcp-oauth-DBFkaLko.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await u({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await p({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
1
+ import"./index-2duAHMPd.js";import{i as u,a as p}from"./mcp-oauth-B1sCs29q.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await u({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await p({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
@@ -1 +1 @@
1
- import{c as q,b as J,r as U,l as W,j as t,F as X,B as Y,I as Z,H as ee,G as te}from"./index-Duf3JTVM.js";import{A as se,a as ie,b as ne,c as oe,g as ae,d as re,e as le,f as ce}from"./alert-dialog-BfVPdL6C.js";import{A as me,I as ue}from"./agent-icon-C4T6-vm3.js";import{i as de}from"./DotsVertical-8vBQwHOR.js";import{s as fe}from"./Trash01-CT7b30WK.js";import{i as ge}from"./ZoomOut-CmHr1Qbd.js";import{a as xe}from"./repository-binding-BUZ4C7bh.js";import{a as pe}from"./use-automations-BJ0sr36g.js";function Ce(c){const e=q.c(80),{automation:s,showAgent:a,onClick:n}=c,i=J(),{remove:o}=pe(),[l,K]=U.useState(!1),r=xe(a?s.virtual_mcp_id:void 0);let M;e[0]!==s.id||e[1]!==o?(M=()=>{o.mutate(s.id),K(!1)},e[0]=s.id,e[1]=o,e[2]=M):M=e[2];const O=M;let S;e[3]!==n?(S=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=S):S=e[4];const H=S,G=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==G?(u=W("inline-block size-2 rounded-full shrink-0",G),e[5]=G,e[6]=u):u=e[6];const V=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==V?(d=i(V),e[7]=i,e[8]=V,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(me,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==r||e[21]!==a?(p=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[20]=r,e[21]=a,e[22]=p):p=e[22];let h;e[23]!==p||e[24]!==x?(h=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p]}),e[23]=p,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==s.nearest_next_run_at||e[27]!==s.trigger_count?(j=t.jsx(we,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[26]=s.nearest_next_run_at,e[27]=s.trigger_count,e[28]=j):j=e[28];let w;e[29]!==h||e[30]!==j?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[h,j]}),e[29]=h,e[30]=j,e[31]=w):w=e[31];let E;e[32]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(X,{asChild:!0,children:t.jsx(Y,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(de,{size:16})})}),e[32]=E):E=e[32];let I,$;e[33]===Symbol.for("react.memo_cache_sentinel")?(I=m=>{m.stopPropagation(),K(!0)},$=t.jsx(fe,{size:16}),e[33]=I,e[34]=$):(I=e[33],$=e[34]);let v;e[35]!==i?(v=i("automations.automationListRow.delete"),e[35]=i,e[36]=v):v=e[36];let _;e[37]!==v?(_=t.jsx("div",{onClick:je,onKeyDown:he,role:"presentation",className:"shrink-0",children:t.jsxs(Z,{children:[E,t.jsx(ee,{align:"end",children:t.jsxs(te,{variant:"destructive",onClick:I,children:[$,v]})})]})}),e[37]=v,e[38]=_):_=e[38];let A;e[39]!==H||e[40]!==n||e[41]!==w||e[42]!==_||e[43]!==f||e[44]!==g?(A=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:H,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[f,g,w,_]}),e[39]=H,e[40]=n,e[41]=w,e[42]=_,e[43]=f,e[44]=g,e[45]=A):A=e[45];let b;e[46]!==i?(b=i("automations.automationListRow.deleteTitle"),e[46]=i,e[47]=b):b=e[47];let D;e[48]!==b?(D=t.jsx(se,{children:b}),e[48]=b,e[49]=D):D=e[49];let N;e[50]!==s.name||e[51]!==i?(N=i("automations.automationListRow.deleteDescription",{name:s.name}),e[50]=s.name,e[51]=i,e[52]=N):N=e[52];let R;e[53]!==N?(R=t.jsx(ie,{children:N}),e[53]=N,e[54]=R):R=e[54];let y;e[55]!==D||e[56]!==R?(y=t.jsxs(ne,{children:[D,R]}),e[55]=D,e[56]=R,e[57]=y):y=e[57];let C;e[58]!==i?(C=i("automations.automationListRow.cancel"),e[58]=i,e[59]=C):C=e[59];let L;e[60]!==C?(L=t.jsx(oe,{children:C}),e[60]=C,e[61]=L):L=e[61];const Q=o.isPending;let k;e[62]!==i?(k=i("automations.automationListRow.deleteButton"),e[62]=i,e[63]=k):k=e[63];let P;e[64]!==O||e[65]!==o.isPending||e[66]!==k?(P=t.jsx(ae,{onClick:O,disabled:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:k}),e[64]=O,e[65]=o.isPending,e[66]=k,e[67]=P):P=e[67];let T;e[68]!==L||e[69]!==P?(T=t.jsxs(re,{children:[L,P]}),e[68]=L,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==y||e[72]!==T?(z=t.jsxs(le,{children:[y,T]}),e[71]=y,e[72]=T,e[73]=z):z=e[73];let F;e[74]!==l||e[75]!==z?(F=t.jsx(ce,{open:l,onOpenChange:K,children:z}),e[74]=l,e[75]=z,e[76]=F):F=e[76];let B;return e[77]!==A||e[78]!==F?(B=t.jsxs(t.Fragment,{children:[A,F]}),e[77]=A,e[78]=F,e[79]=B):B=e[79],B}function he(c){return c.stopPropagation()}function je(c){return c.stopPropagation()}function we(c){const e=q.c(8),{triggerCount:s,nextRunAt:a}=c,n=J();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(ue,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(ge,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{Ce as A};
1
+ import{c as q,b as J,r as U,l as W,j as t,F as X,B as Y,I as Z,H as ee,G as te}from"./index-2duAHMPd.js";import{A as se,a as ie,b as ne,c as oe,g as ae,d as re,e as le,f as ce}from"./alert-dialog-DAsY_6vW.js";import{A as me,I as ue}from"./agent-icon-BHQYaWGI.js";import{i as de}from"./DotsVertical-BaKtw__w.js";import{s as fe}from"./Trash01-D6T8CbfV.js";import{i as ge}from"./ZoomOut-BQIdpjjz.js";import{a as xe}from"./repository-binding-8VYBinex.js";import{a as pe}from"./use-automations-Dtkz7oat.js";function Ce(c){const e=q.c(80),{automation:s,showAgent:a,onClick:n}=c,i=J(),{remove:o}=pe(),[l,K]=U.useState(!1),r=xe(a?s.virtual_mcp_id:void 0);let M;e[0]!==s.id||e[1]!==o?(M=()=>{o.mutate(s.id),K(!1)},e[0]=s.id,e[1]=o,e[2]=M):M=e[2];const O=M;let S;e[3]!==n?(S=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=S):S=e[4];const H=S,G=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==G?(u=W("inline-block size-2 rounded-full shrink-0",G),e[5]=G,e[6]=u):u=e[6];const V=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==V?(d=i(V),e[7]=i,e[8]=V,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(me,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==r||e[21]!==a?(p=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[20]=r,e[21]=a,e[22]=p):p=e[22];let h;e[23]!==p||e[24]!==x?(h=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p]}),e[23]=p,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==s.nearest_next_run_at||e[27]!==s.trigger_count?(j=t.jsx(we,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[26]=s.nearest_next_run_at,e[27]=s.trigger_count,e[28]=j):j=e[28];let w;e[29]!==h||e[30]!==j?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[h,j]}),e[29]=h,e[30]=j,e[31]=w):w=e[31];let E;e[32]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(X,{asChild:!0,children:t.jsx(Y,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(de,{size:16})})}),e[32]=E):E=e[32];let I,$;e[33]===Symbol.for("react.memo_cache_sentinel")?(I=m=>{m.stopPropagation(),K(!0)},$=t.jsx(fe,{size:16}),e[33]=I,e[34]=$):(I=e[33],$=e[34]);let v;e[35]!==i?(v=i("automations.automationListRow.delete"),e[35]=i,e[36]=v):v=e[36];let _;e[37]!==v?(_=t.jsx("div",{onClick:je,onKeyDown:he,role:"presentation",className:"shrink-0",children:t.jsxs(Z,{children:[E,t.jsx(ee,{align:"end",children:t.jsxs(te,{variant:"destructive",onClick:I,children:[$,v]})})]})}),e[37]=v,e[38]=_):_=e[38];let A;e[39]!==H||e[40]!==n||e[41]!==w||e[42]!==_||e[43]!==f||e[44]!==g?(A=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:H,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[f,g,w,_]}),e[39]=H,e[40]=n,e[41]=w,e[42]=_,e[43]=f,e[44]=g,e[45]=A):A=e[45];let b;e[46]!==i?(b=i("automations.automationListRow.deleteTitle"),e[46]=i,e[47]=b):b=e[47];let D;e[48]!==b?(D=t.jsx(se,{children:b}),e[48]=b,e[49]=D):D=e[49];let N;e[50]!==s.name||e[51]!==i?(N=i("automations.automationListRow.deleteDescription",{name:s.name}),e[50]=s.name,e[51]=i,e[52]=N):N=e[52];let R;e[53]!==N?(R=t.jsx(ie,{children:N}),e[53]=N,e[54]=R):R=e[54];let y;e[55]!==D||e[56]!==R?(y=t.jsxs(ne,{children:[D,R]}),e[55]=D,e[56]=R,e[57]=y):y=e[57];let C;e[58]!==i?(C=i("automations.automationListRow.cancel"),e[58]=i,e[59]=C):C=e[59];let L;e[60]!==C?(L=t.jsx(oe,{children:C}),e[60]=C,e[61]=L):L=e[61];const Q=o.isPending;let k;e[62]!==i?(k=i("automations.automationListRow.deleteButton"),e[62]=i,e[63]=k):k=e[63];let P;e[64]!==O||e[65]!==o.isPending||e[66]!==k?(P=t.jsx(ae,{onClick:O,disabled:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:k}),e[64]=O,e[65]=o.isPending,e[66]=k,e[67]=P):P=e[67];let T;e[68]!==L||e[69]!==P?(T=t.jsxs(re,{children:[L,P]}),e[68]=L,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==y||e[72]!==T?(z=t.jsxs(le,{children:[y,T]}),e[71]=y,e[72]=T,e[73]=z):z=e[73];let F;e[74]!==l||e[75]!==z?(F=t.jsx(ce,{open:l,onOpenChange:K,children:z}),e[74]=l,e[75]=z,e[76]=F):F=e[76];let B;return e[77]!==A||e[78]!==F?(B=t.jsxs(t.Fragment,{children:[A,F]}),e[77]=A,e[78]=F,e[79]=B):B=e[79],B}function he(c){return c.stopPropagation()}function je(c){return c.stopPropagation()}function we(c){const e=q.c(8),{triggerCount:s,nextRunAt:a}=c,n=J();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(ue,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(ge,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{Ce as A};
@@ -1 +1 @@
1
- import{c as z,r as lt,b as W,X as it,z as rt,a2 as ct,K as tt,j as s,l as ut,m as dt,e_ as mt}from"./index-Duf3JTVM.js";import{u as ft}from"./useInfiniteQuery-B0bYlgUv.js";import{u as xt}from"./use-connection-C_FTHaum.js";import{u as pt}from"./use-mcp-client-DZGwCgNY.js";import{b as gt}from"./repository-binding-BUZ4C7bh.js";import{b as ht,a as Rt}from"./sheet-BytVG-aD.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as V}from"./table-CTatCBhK.js";import{E as et}from"./empty-state-5JsGLGCz.js";import{u as Tt}from"./use-infinite-scroll-BiKJiTfn.js";import{a as St}from"./use-members-CT3cNk6W.js";import{g as vt}from"./task-status-DBak8l4e.js";import{e as wt}from"./use-automations-BJ0sr36g.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-BQBP5vRQ.js";function It(c){const t=z.c(15),[i,r]=lt.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,o=a!==-1?c[a]:null,n=o!==null;let l,w;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=u=>r(u),w=()=>r(null),t[3]=l,t[4]=w):(l=t[3],w=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let m;return t[9]!==a||t[10]!==o||t[11]!==n||t[12]!==f||t[13]!==x?(m={selected:o,index:a,isOpen:n,select:l,close:w,prev:f,next:x},t[9]=a,t[10]=o,t[11]=n,t[12]=f,t[13]=x,t[14]=m):m=t[14],m}const Z=50;function X(c){const t=z.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let o;t[2]!==r?(o=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=o):o=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let l;return t[6]!==a||t[7]!==o||t[8]!==n?(l=s.jsxs(mt,{className:"pt-4 px-4 pb-5 gap-1",children:[a,o,n]}),t[6]=a,t[7]=o,t[8]=n,t[9]=l):l=t[9],l}function kt(c){const t=z.c(45),{automationId:i,range:r}=c,e=W(),{data:a,isLoading:o}=wt(i,r),n=a?.runs,l=a?.usage;let w;t[0]!==n?(w=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=w):w=t[1];const f=w;let x;t[2]!==e||t[3]!==l?(x=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=x):x=t[4];const m=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==o||t[8]!==n?.total?(g=o?"…":n?.total.toLocaleString()??"0",t[7]=o,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(X,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const k=o?"…":f;let C;t[19]!==T||t[20]!==k?(C=s.jsx(X,{title:T,value:k}),t[19]=T,t[20]=k,t[21]=C):C=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==o||t[25]!==l?.totalTokens?(p=o?"…":at(l?.totalTokens??0),t[24]=o,t[25]=l?.totalTokens,t[26]=p):p=t[26];let I;t[27]!==S||t[28]!==p||t[29]!==m?(I=s.jsx(X,{title:S,value:p,subtitle:m}),t[27]=S,t[28]=p,t[29]=m,t[30]=I):I=t[30];let d;t[31]!==e?(d=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=d):d=t[32];let j;t[33]!==o||t[34]!==l?(j=o?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=o,t[34]=l,t[35]=j):j=t[35];let v;t[36]!==d||t[37]!==j||t[38]!==m?(v=s.jsx(X,{title:d,value:j,subtitle:m}),t[36]=d,t[37]=j,t[38]=m,t[39]=v):v=t[39];let N;return t[40]!==I||t[41]!==v||t[42]!==R||t[43]!==C?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,C,I,v]}),t[40]=I,t[41]=v,t[42]=R,t[43]=C,t[44]=N):N=t[44],N}function yt(c){const t=z.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,o=W();let n,l;if(t[0]!==i.created_at){const P=new Date(i.created_at);n=P.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=P.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=l}else n=t[1],l=t[2];const w=l;let f,x,m,u,g,h,R,T,k,C,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==o){const P=vt(i.status),U=P.icon;x=st,k=a,C="h-14 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",S=e,t[19]!==i.title?(m=s.jsx(V,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=m):m=t[20],f=V,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:P.iconClassName}),u=ut("text-sm",P.labelColor),g=o(P.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=o,t[8]=f,t[9]=x,t[10]=m,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=k,t[17]=C,t[18]=S}else f=t[8],x=t[9],m=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],k=t[16],C=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let I;t[24]!==p||t[25]!==h||t[26]!==R?(I=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=I):I=t[27];let d;t[28]!==f||t[29]!==I||t[30]!==T?(d=s.jsx(f,{className:T,children:I}),t[28]=f,t[29]=I,t[30]=T,t[31]=d):d=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let y;t[38]!==N?(y=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=y):y=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let _;t[42]!==w?(_=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:w}),t[42]=w,t[43]=_):_=t[43];let E;t[44]!==D||t[45]!==_?(E=s.jsxs(V,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==m||t[49]!==d||t[50]!==v||t[51]!==y||t[52]!==E||t[53]!==k||t[54]!==C||t[55]!==S?($=s.jsxs(x,{ref:k,className:C,onClick:S,children:[m,d,v,y,E]}),t[47]=x,t[48]=m,t[49]=d,t[50]=v,t[51]=y,t[52]=E,t[53]=k,t[54]=C,t[55]=S,t[56]=$):$=t[56],$}function Bt(c){const t=z.c(73),{automationId:i,triggerIds:r,range:e}=c,a=W(),{org:o,locator:n}=it();let l;t[0]!==o.id||t[1]!==o.slug?(l={connectionId:rt,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=l):l=t[2];const w=pt(l),f=ct(),x=xt(),m=gt(),{data:u}=St(),g=r.length>0;let h;t[3]!==i||t[4]!==o.id||t[5]!==r?(h=tt.automationRuns(o.id,i,r),t[3]=i,t[4]=o.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async M=>{const{pageParam:J}=M,ot=J===void 0?0:J;return await f.call("COLLECTION_THREADS_LIST",{limit:Z,offset:ot,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:k,fetchNextPage:C,hasNextPage:S,isFetchingNextPage:p,isLoading:I}=ft(T);let d,j,v,N;t[14]!==k?.pages||t[15]!==n||t[16]!==e?(d=(k?.pages??[]).flatMap(Dt),N=d.map(Pt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=k?.pages,t[15]=n,t[16]=e,t[17]=d,t[18]=j,t[19]=v,t[20]=N):(d=t[17],j=t[18],v=t[19],N=t[20]);let y;t[21]!==e||t[22]!==f||t[23]!==N?(y=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=y):y=t[24];const D=N.length>0;let _;t[25]!==j||t[26]!==y||t[27]!==D?(_={queryKey:j,queryFn:y,enabled:D,staleTime:3e4},t[25]=j,t[26]=y,t[27]=D,t[28]=_):_=t[28];const{data:E}=v(_);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(_t)),t[29]=E?.items,t[30]=$):$=t[30];const P=$;let U;t[31]!==C||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&C()},t[31]=C,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Y=Tt(U,S??!1,p),b=It(d),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(kt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==I||t[40]!==Y||t[41]!==d||t[42]!==b||t[43]!==a||t[44]!==P?(O=g?I?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):d.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(bt,{children:d.map((M,J)=>s.jsx(yt,{run:M,usage:P.get(M.id),onClick:()=>b.select(M.id),lastRowRef:J===d.length-1?Y:void 0},M.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=I,t[40]=Y,t[41]=d,t[42]=b,t[43]=a,t[44]=P,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=M=>{M||b.close()},t[49]=b,t[50]=H):H=t[50];let K;t[51]!==x||t[52]!==m||t[53]!==w||t[54]!==n||t[55]!==u||t[56]!==d||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(K=B&&s.jsx(Ct,{thread:B,client:w,locator:n,connections:x,virtualMcps:m,members:u,nav:{index:b.index,total:d.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=m,t[53]=w,t[54]=n,t[55]=u,t[56]=d,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let Q;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(Q=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=Q):Q=t[72],Q}function _t(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function Pt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<Z))return r.length*Z}export{Bt as A,It as u};
1
+ import{c as z,r as lt,b as W,X as it,z as rt,a2 as ct,K as tt,j as s,l as ut,m as dt,e_ as mt}from"./index-2duAHMPd.js";import{u as ft}from"./useInfiniteQuery-BUWL84Zp.js";import{u as xt}from"./use-connection-CZPzkDC-.js";import{u as pt}from"./use-mcp-client-BqOylQpo.js";import{b as gt}from"./repository-binding-8VYBinex.js";import{b as ht,a as Rt}from"./sheet-CQPD5xTR.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as V}from"./table-BVP8O4tE.js";import{E as et}from"./empty-state-NNuShZhG.js";import{u as Tt}from"./use-infinite-scroll-CYbqB46q.js";import{a as St}from"./use-members-ClR2rX-Z.js";import{g as vt}from"./task-status-C_gcv7wp.js";import{e as wt}from"./use-automations-Dtkz7oat.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-ZzXO2TWM.js";function It(c){const t=z.c(15),[i,r]=lt.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,o=a!==-1?c[a]:null,n=o!==null;let l,w;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=u=>r(u),w=()=>r(null),t[3]=l,t[4]=w):(l=t[3],w=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let m;return t[9]!==a||t[10]!==o||t[11]!==n||t[12]!==f||t[13]!==x?(m={selected:o,index:a,isOpen:n,select:l,close:w,prev:f,next:x},t[9]=a,t[10]=o,t[11]=n,t[12]=f,t[13]=x,t[14]=m):m=t[14],m}const Z=50;function X(c){const t=z.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let o;t[2]!==r?(o=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=o):o=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let l;return t[6]!==a||t[7]!==o||t[8]!==n?(l=s.jsxs(mt,{className:"pt-4 px-4 pb-5 gap-1",children:[a,o,n]}),t[6]=a,t[7]=o,t[8]=n,t[9]=l):l=t[9],l}function kt(c){const t=z.c(45),{automationId:i,range:r}=c,e=W(),{data:a,isLoading:o}=wt(i,r),n=a?.runs,l=a?.usage;let w;t[0]!==n?(w=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=w):w=t[1];const f=w;let x;t[2]!==e||t[3]!==l?(x=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=x):x=t[4];const m=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==o||t[8]!==n?.total?(g=o?"…":n?.total.toLocaleString()??"0",t[7]=o,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(X,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const k=o?"…":f;let C;t[19]!==T||t[20]!==k?(C=s.jsx(X,{title:T,value:k}),t[19]=T,t[20]=k,t[21]=C):C=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==o||t[25]!==l?.totalTokens?(p=o?"…":at(l?.totalTokens??0),t[24]=o,t[25]=l?.totalTokens,t[26]=p):p=t[26];let I;t[27]!==S||t[28]!==p||t[29]!==m?(I=s.jsx(X,{title:S,value:p,subtitle:m}),t[27]=S,t[28]=p,t[29]=m,t[30]=I):I=t[30];let d;t[31]!==e?(d=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=d):d=t[32];let j;t[33]!==o||t[34]!==l?(j=o?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=o,t[34]=l,t[35]=j):j=t[35];let v;t[36]!==d||t[37]!==j||t[38]!==m?(v=s.jsx(X,{title:d,value:j,subtitle:m}),t[36]=d,t[37]=j,t[38]=m,t[39]=v):v=t[39];let N;return t[40]!==I||t[41]!==v||t[42]!==R||t[43]!==C?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,C,I,v]}),t[40]=I,t[41]=v,t[42]=R,t[43]=C,t[44]=N):N=t[44],N}function yt(c){const t=z.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,o=W();let n,l;if(t[0]!==i.created_at){const P=new Date(i.created_at);n=P.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=P.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=l}else n=t[1],l=t[2];const w=l;let f,x,m,u,g,h,R,T,k,C,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==o){const P=vt(i.status),U=P.icon;x=st,k=a,C="h-14 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",S=e,t[19]!==i.title?(m=s.jsx(V,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=m):m=t[20],f=V,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:P.iconClassName}),u=ut("text-sm",P.labelColor),g=o(P.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=o,t[8]=f,t[9]=x,t[10]=m,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=k,t[17]=C,t[18]=S}else f=t[8],x=t[9],m=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],k=t[16],C=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let I;t[24]!==p||t[25]!==h||t[26]!==R?(I=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=I):I=t[27];let d;t[28]!==f||t[29]!==I||t[30]!==T?(d=s.jsx(f,{className:T,children:I}),t[28]=f,t[29]=I,t[30]=T,t[31]=d):d=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let y;t[38]!==N?(y=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=y):y=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let _;t[42]!==w?(_=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:w}),t[42]=w,t[43]=_):_=t[43];let E;t[44]!==D||t[45]!==_?(E=s.jsxs(V,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==m||t[49]!==d||t[50]!==v||t[51]!==y||t[52]!==E||t[53]!==k||t[54]!==C||t[55]!==S?($=s.jsxs(x,{ref:k,className:C,onClick:S,children:[m,d,v,y,E]}),t[47]=x,t[48]=m,t[49]=d,t[50]=v,t[51]=y,t[52]=E,t[53]=k,t[54]=C,t[55]=S,t[56]=$):$=t[56],$}function Bt(c){const t=z.c(73),{automationId:i,triggerIds:r,range:e}=c,a=W(),{org:o,locator:n}=it();let l;t[0]!==o.id||t[1]!==o.slug?(l={connectionId:rt,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=l):l=t[2];const w=pt(l),f=ct(),x=xt(),m=gt(),{data:u}=St(),g=r.length>0;let h;t[3]!==i||t[4]!==o.id||t[5]!==r?(h=tt.automationRuns(o.id,i,r),t[3]=i,t[4]=o.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async M=>{const{pageParam:J}=M,ot=J===void 0?0:J;return await f.call("COLLECTION_THREADS_LIST",{limit:Z,offset:ot,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:k,fetchNextPage:C,hasNextPage:S,isFetchingNextPage:p,isLoading:I}=ft(T);let d,j,v,N;t[14]!==k?.pages||t[15]!==n||t[16]!==e?(d=(k?.pages??[]).flatMap(Dt),N=d.map(Pt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=k?.pages,t[15]=n,t[16]=e,t[17]=d,t[18]=j,t[19]=v,t[20]=N):(d=t[17],j=t[18],v=t[19],N=t[20]);let y;t[21]!==e||t[22]!==f||t[23]!==N?(y=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=y):y=t[24];const D=N.length>0;let _;t[25]!==j||t[26]!==y||t[27]!==D?(_={queryKey:j,queryFn:y,enabled:D,staleTime:3e4},t[25]=j,t[26]=y,t[27]=D,t[28]=_):_=t[28];const{data:E}=v(_);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(_t)),t[29]=E?.items,t[30]=$):$=t[30];const P=$;let U;t[31]!==C||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&C()},t[31]=C,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Y=Tt(U,S??!1,p),b=It(d),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(kt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==I||t[40]!==Y||t[41]!==d||t[42]!==b||t[43]!==a||t[44]!==P?(O=g?I?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):d.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(bt,{children:d.map((M,J)=>s.jsx(yt,{run:M,usage:P.get(M.id),onClick:()=>b.select(M.id),lastRowRef:J===d.length-1?Y:void 0},M.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=I,t[40]=Y,t[41]=d,t[42]=b,t[43]=a,t[44]=P,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=M=>{M||b.close()},t[49]=b,t[50]=H):H=t[50];let K;t[51]!==x||t[52]!==m||t[53]!==w||t[54]!==n||t[55]!==u||t[56]!==d||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(K=B&&s.jsx(Ct,{thread:B,client:w,locator:n,connections:x,virtualMcps:m,members:u,nav:{index:b.index,total:d.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=m,t[53]=w,t[54]=n,t[55]=u,t[56]=d,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let Q;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(Q=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=Q):Q=t[72],Q}function _t(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function Pt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<Z))return r.length*Z}export{Bt as A,It as u};
@@ -1 +1 @@
1
- import{c as k,j as e,b as $,X as D,d as M,r as q,n as d,B as O,fO as V,q as R}from"./index-Duf3JTVM.js";import{s as X}from"./Plus-AwkstShZ.js";import{i as S}from"./ZoomOut-CmHr1Qbd.js";import{S as F}from"./search-input-CKkGnh67.js";import{E as T}from"./empty-state-5JsGLGCz.js";import{u as G}from"./use-automations-BJ0sr36g.js";import{u as H}from"./use-navigate-to-agent-CMLrR8_i.js";import{A as J}from"./automation-list-row-DsucCADr.js";import{b as K}from"./repository-binding-BUZ4C7bh.js";import{R as Q}from"./require-capability-DHUiC1kU.js";import"./SearchMd-CamWCDhQ.js";import"./use-mcp-client-DZGwCgNY.js";import"./auth-B26YmJp8.js";import"./thread-intent-D-SVYHox.js";import"./backoff-8mStPHYB.js";import"./task-board-DxHSj0XG.js";import"./schema-CbWS_s_m.js";import"./slugify-CEUa2lfQ.js";import"./alert-dialog-BfVPdL6C.js";import"./agent-icon-C4T6-vm3.js";import"./AlertCircle-CuDczHDR.js";import"./Tool01-BChrjB8k.js";import"./ArrowUp-DIwlV_vZ.js";import"./ArrowLeft-Bo9mbsAZ.js";import"./ArrowRight-CwzrTKhr.js";import"./ShoppingBag01-CoZ5vwOJ.js";import"./Palette-DlbiBl_j.js";import"./CheckCircle-BEIFKjMv.js";import"./Check-BabNNnmH.js";import"./ChevronUp-DMEZ4Ndj.js";import"./UserSquare-1ac2E4Qd.js";import"./Copy01-BkyebR6O.js";import"./CreditCard01-CUqwDXVT.js";import"./DotsVertical-8vBQwHOR.js";import"./Image01-qfqy9swl.js";import"./XClose-DPw2E-Li.js";import"./Key01-Csp2b37o.js";import"./Link01-BLEXQzbw.js";import"./LinkExternal01-DfAqCiDA.js";import"./Monitor01-ZAWuAcI2.js";import"./Sun-CCJdDdvK.js";import"./Trash01-CT7b30WK.js";import"./Upload01-CL1ZW-yo.js";import"./User01-D8U9gLIR.js";import"./Users01-B7Weknnl.js";import"./X-zmCUS8vK.js";import"./access-gate-DAuoTnkK.js";import"./capability-load-error-DyaNaGSJ.js";function U(){const t=k.c(20),o=$(),{org:c}=D(),{data:y}=G(void 0),g=y===void 0?[]:y,E=K(),P=H(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),b=new Map(E.map(W)),A=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const l=b.get(i.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(i,l)=>{const N=l&&b.has(l)?l:V(c.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{panel:`automation:${i}`})};let p;t[0]!==f||t[1]!==c.slug?(p=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=p):p=t[2];const L=p,j=d,C=d,v=d;let s;t[3]!==o?(s=o("settings.automations.pageTitle"),t[3]=o,t[4]=s):s=t[4];let r;t[5]!==s?(r=e.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const w=g.length>0&&e.jsx(F,{value:x,onChange:z,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==w?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,w]}),t[7]=r,t[8]=w,t[9]=n):n=t[9];const _=g.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.emptyTitle"),description:o("settings.automations.emptyDescription"),actions:e.jsxs(O,{size:"sm",onClick:L,children:[e.jsx(X,{size:14}),o("settings.automations.browseAgentsButton")]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.noResultsTitle"),description:o("settings.automations.noResultsDescription",{search:x})})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(i=>e.jsx(J,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==v.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(v.Container,{children:[n,_]}),t[10]=v.Container,t[11]=n,t[12]=_,t[13]=a):a=t[13];let m;t[14]!==C.Content||t[15]!==a?(m=e.jsx(C.Content,{children:a}),t[14]=C.Content,t[15]=a,t[16]=m):m=t[16];let u;return t[17]!==j||t[18]!==m?(u=e.jsx(j,{children:m}),t[17]=j,t[18]=m,t[19]=u):u=t[19],u}function W(t){return[t.id,t]}function Ht(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(Q,{capability:"automations:manage",area:"automations",children:e.jsx(U,{})}),t[0]=o):o=t[0],o}export{Ht as default};
1
+ import{c as k,j as e,b as $,X as D,d as M,r as q,n as d,B as O,fO as V,q as R}from"./index-2duAHMPd.js";import{s as X}from"./Plus-B1PdYp1B.js";import{i as S}from"./ZoomOut-BQIdpjjz.js";import{S as F}from"./search-input-qTQyzPLx.js";import{E as T}from"./empty-state-NNuShZhG.js";import{u as G}from"./use-automations-Dtkz7oat.js";import{u as H}from"./use-navigate-to-agent-DsQtABEb.js";import{A as J}from"./automation-list-row-fNhj8I3n.js";import{b as K}from"./repository-binding-8VYBinex.js";import{R as Q}from"./require-capability-C5D6gHPU.js";import"./SearchMd-CippXiaJ.js";import"./use-mcp-client-BqOylQpo.js";import"./auth-CPuYtN_v.js";import"./thread-intent-BYxnrHPt.js";import"./backoff-8mStPHYB.js";import"./task-board-DIlOu-03.js";import"./schema-DLGFQ_bS.js";import"./slugify-CEUa2lfQ.js";import"./alert-dialog-DAsY_6vW.js";import"./agent-icon-BHQYaWGI.js";import"./AlertCircle-B-U1UzJy.js";import"./Tool01-Bgd2tvp5.js";import"./ArrowUp-CJDQxQ_X.js";import"./ArrowLeft-DWMp2ePO.js";import"./ArrowRight-BUYijqTX.js";import"./ShoppingBag01-CkiwNCJ1.js";import"./Palette-Dj6nu481.js";import"./CheckCircle-WGnb_ikI.js";import"./Check-D6Xgemeb.js";import"./ChevronUp-DheBKBgy.js";import"./UserSquare-PItW8fkC.js";import"./Copy01-DWQ9KHmS.js";import"./CreditCard01-3uUuhgiM.js";import"./DotsVertical-BaKtw__w.js";import"./Image01-DMXF1Qce.js";import"./XClose-CVkLSF48.js";import"./Key01-oFV0Ghxa.js";import"./Link01-mtktwecI.js";import"./LinkExternal01-DdmYXSfw.js";import"./Monitor01-G22-1kYR.js";import"./Sun-DBisSftO.js";import"./Trash01-D6T8CbfV.js";import"./Upload01-fOi5PXXe.js";import"./User01-D84561nP.js";import"./Users01-CRnhjaQ6.js";import"./X-BZ3dYFZP.js";import"./access-gate-BLK_F3Um.js";import"./capability-load-error-Di3bKHCw.js";function U(){const t=k.c(20),o=$(),{org:c}=D(),{data:y}=G(void 0),g=y===void 0?[]:y,E=K(),P=H(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),b=new Map(E.map(W)),A=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const l=b.get(i.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(i,l)=>{const N=l&&b.has(l)?l:V(c.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{panel:`automation:${i}`})};let p;t[0]!==f||t[1]!==c.slug?(p=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=p):p=t[2];const L=p,j=d,C=d,v=d;let s;t[3]!==o?(s=o("settings.automations.pageTitle"),t[3]=o,t[4]=s):s=t[4];let r;t[5]!==s?(r=e.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const w=g.length>0&&e.jsx(F,{value:x,onChange:z,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==w?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,w]}),t[7]=r,t[8]=w,t[9]=n):n=t[9];const _=g.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.emptyTitle"),description:o("settings.automations.emptyDescription"),actions:e.jsxs(O,{size:"sm",onClick:L,children:[e.jsx(X,{size:14}),o("settings.automations.browseAgentsButton")]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.noResultsTitle"),description:o("settings.automations.noResultsDescription",{search:x})})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(i=>e.jsx(J,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==v.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(v.Container,{children:[n,_]}),t[10]=v.Container,t[11]=n,t[12]=_,t[13]=a):a=t[13];let m;t[14]!==C.Content||t[15]!==a?(m=e.jsx(C.Content,{children:a}),t[14]=C.Content,t[15]=a,t[16]=m):m=t[16];let u;return t[17]!==j||t[18]!==m?(u=e.jsx(j,{children:m}),t[17]=j,t[18]=m,t[19]=u):u=t[19],u}function W(t){return[t.id,t]}function Ht(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(Q,{capability:"automations:manage",area:"automations",children:e.jsx(U,{})}),t[0]=o):o=t[0],o}export{Ht as default};
@@ -1 +1 @@
1
- import{V as d}from"./index-Duf3JTVM.js";const m=1e4,y="true",i=2;function a(t,n){return d.chatAutosend(t,n)}function l(t){return t==="pending"||t==="sending"}function f(t){if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object")return null;const e=n;let o=0;e.status==="sending"?o=e.retryAt===void 0?1:i:e.retryAt!==void 0&&(o=1);const r=e.attempt===void 0?o:e.attempt;return typeof e.createdAt!="number"||typeof e.message!="object"||!l(e.status)||e.retryAt!==void 0&&typeof e.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>i?null:{...n,attempt:r}}function S(t,n,e,o,r=Date.now()){const s={message:o,createdAt:r,status:"pending",attempt:0};return t.setItem(a(n,e),JSON.stringify(s)),s}function p(t,n,e){const o=a(n,e),r=f(t.getItem(o));return r||(t.removeItem(o),null)}function g(t,n,e,o=Date.now()){const r=a(n,e),s=p(t,n,e);if(!s||s.status!=="pending")return null;if(s.attempt>=i)return t.removeItem(r),null;const c=s.retryAt??s.createdAt;if(o-c>=m)return t.removeItem(r),null;const u={...s,status:"sending",attempt:s.attempt+1};return t.setItem(r,JSON.stringify(u)),{message:u.message,createdAt:u.createdAt,attempt:u.attempt}}function T(t,n,e){t.removeItem(a(n,e))}export{y as A,T as a,g as c,S as w};
1
+ import{V as d}from"./index-2duAHMPd.js";const m=1e4,y="true",i=2;function a(t,n){return d.chatAutosend(t,n)}function l(t){return t==="pending"||t==="sending"}function f(t){if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object")return null;const e=n;let o=0;e.status==="sending"?o=e.retryAt===void 0?1:i:e.retryAt!==void 0&&(o=1);const r=e.attempt===void 0?o:e.attempt;return typeof e.createdAt!="number"||typeof e.message!="object"||!l(e.status)||e.retryAt!==void 0&&typeof e.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>i?null:{...n,attempt:r}}function S(t,n,e,o,r=Date.now()){const s={message:o,createdAt:r,status:"pending",attempt:0};return t.setItem(a(n,e),JSON.stringify(s)),s}function p(t,n,e){const o=a(n,e),r=f(t.getItem(o));return r||(t.removeItem(o),null)}function g(t,n,e,o=Date.now()){const r=a(n,e),s=p(t,n,e);if(!s||s.status!=="pending")return null;if(s.attempt>=i)return t.removeItem(r),null;const c=s.retryAt??s.createdAt;if(o-c>=m)return t.removeItem(r),null;const u={...s,status:"sending",attempt:s.attempt+1};return t.setItem(r,JSON.stringify(u)),{message:u.message,createdAt:u.createdAt,attempt:u.attempt}}function T(t,n,e){t.removeItem(a(n,e))}export{y as A,T as a,g as c,S as w};
@@ -1 +1 @@
1
- import{c as k,j as i,l as f,aH as R,ba as V,bb as I,bc as $}from"./index-Duf3JTVM.js";import{s as O}from"./User01-D8U9gLIR.js";function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function H(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const b=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==m||e[20]!==h?(w=f(S({shape:m,size:h}),s),e[18]=s,e[19]=m,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==b||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:f(_({objectFit:u}))}),i.jsx(M,{className:f(z,"rounded-none"),delayMs:l?600:0,children:b})]}),e[22]=z,e[23]=b,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function W(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let b;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==m||e[15]!==x||e[16]!==l?(b=i.jsx(H,{shape:m,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=m,e[15]=x,e[16]=l,e[17]=b):b=e[17],b}W.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{W as A};
1
+ import{c as k,j as i,l as f,aH as R,ba as V,bb as I,bc as $}from"./index-2duAHMPd.js";import{s as O}from"./User01-D84561nP.js";function U(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function E(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function H(r){const e=k.c(34);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],x=c;break e}x=t}const b=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const F=q;let w;e[18]!==s||e[19]!==m||e[20]!==h?(w=f(S({shape:m,size:h}),s),e[18]=s,e[19]=m,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==b||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx(O,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(E,{src:l,loading:"lazy",alt:"Avatar",className:f(_({objectFit:u}))}),i.jsx(M,{className:f(z,"rounded-none"),delayMs:l?600:0,children:b})]}),e[22]=z,e[23]=b,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(U,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function W(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let b;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==m||e[15]!==x||e[16]!==l?(b=i.jsx(H,{shape:m,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=m,e[15]=x,e[16]=l,e[17]=b):b=e[17],b}W.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{W as A};
@@ -1 +1 @@
1
- import{c as u,l as g,j as l,bd as v,aH as b}from"./index-Duf3JTVM.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",muted:"border-transparent bg-muted text-muted-foreground [a&]:hover:bg-muted/80"},size:{default:"px-2 py-0.5",icon:"size-5",segmented:"h-7 gap-0 rounded-lg border-transparent bg-card p-0 card-shadow"}},defaultVariants:{variant:"default",size:"default"}});function x(d){const e=u.c(14);let r,s,t,n,a;e[0]!==d?({className:r,variant:a,size:t,asChild:n,...s}=d,e[0]=d,e[1]=r,e[2]=s,e[3]=t,e[4]=n,e[5]=a):(r=e[1],s=e[2],t=e[3],n=e[4],a=e[5]);const c=(n===void 0?!1:n)?v:"span";let i;e[6]!==r||e[7]!==t||e[8]!==a?(i=g(f({variant:a,size:t}),r),e[6]=r,e[7]=t,e[8]=a,e[9]=i):i=e[9];let o;return e[10]!==c||e[11]!==s||e[12]!==i?(o=l.jsx(c,{"data-slot":"badge",className:i,...s}),e[10]=c,e[11]=s,e[12]=i,e[13]=o):o=e[13],o}export{x as B};
1
+ import{c as u,l as g,j as l,bd as v,aH as b}from"./index-2duAHMPd.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",muted:"border-transparent bg-muted text-muted-foreground [a&]:hover:bg-muted/80"},size:{default:"px-2 py-0.5",icon:"size-5",segmented:"h-7 gap-0 rounded-lg border-transparent bg-card p-0 card-shadow"}},defaultVariants:{variant:"default",size:"default"}});function x(d){const e=u.c(14);let r,s,t,n,a;e[0]!==d?({className:r,variant:a,size:t,asChild:n,...s}=d,e[0]=d,e[1]=r,e[2]=s,e[3]=t,e[4]=n,e[5]=a):(r=e[1],s=e[2],t=e[3],n=e[4],a=e[5]);const c=(n===void 0?!1:n)?v:"span";let i;e[6]!==r||e[7]!==t||e[8]!==a?(i=g(f({variant:a,size:t}),r),e[6]=r,e[7]=t,e[8]=a,e[9]=i):i=e[9];let o;return e[10]!==c||e[11]!==s||e[12]!==i?(o=l.jsx(c,{"data-slot":"badge",className:i,...s}),e[10]=c,e[11]=s,e[12]=i,e[13]=o):o=e[13],o}export{x as B};