zenml-nightly 0.83.1.dev20250711__py3-none-any.whl → 0.84.0.dev20250713__py3-none-any.whl

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 (222) hide show
  1. zenml/VERSION +1 -1
  2. zenml/constants.py +1 -0
  3. zenml/enums.py +9 -0
  4. zenml/models/v2/core/logs.py +2 -1
  5. zenml/zen_server/dashboard/assets/{404-B5eko6XL.js → 404-B5cfnwZ1.js} +1 -1
  6. zenml/zen_server/dashboard/assets/{@radix-Cdvw4jJ8.js → @radix-C_LirfyT.js} +1 -1
  7. zenml/zen_server/dashboard/assets/{@react-router-DeDfXbUF.js → @react-router-BSsrkPOd.js} +1 -1
  8. zenml/zen_server/dashboard/assets/{@reactflow-B_iCtR7X.js → @reactflow-D9hglKLF.js} +2 -2
  9. zenml/zen_server/dashboard/assets/{@tanstack-5gTMR7G2.js → @tanstack-C0SeHZng.js} +1 -1
  10. zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-druRNuO2.js +1 -0
  11. zenml/zen_server/dashboard/assets/ButtonGroup-SF2DlzHV.js +1 -0
  12. zenml/zen_server/dashboard/assets/{CodeSnippet-Ctplhzdc.js → CodeSnippet-D8iBqOVv.js} +1 -1
  13. zenml/zen_server/dashboard/assets/CollapsibleCard-D0-pQi1n.js +1 -0
  14. zenml/zen_server/dashboard/assets/{ComponentBadge-Cnecw3qz.js → ComponentBadge-mw2Ja_ON.js} +1 -1
  15. zenml/zen_server/dashboard/assets/ComponentIcon-BXgpt-jw.js +1 -0
  16. zenml/zen_server/dashboard/assets/{DeleteAlertDialog-DEI0YDzP.js → DeleteAlertDialog-BbyFVnVI.js} +1 -1
  17. zenml/zen_server/dashboard/assets/DialogItem-DeME0oSt.js +1 -0
  18. zenml/zen_server/dashboard/assets/{DisplayDate-8RESqe5H.js → DisplayDate-v3KW7oez.js} +1 -1
  19. zenml/zen_server/dashboard/assets/{EmptyState-CjrgDtVk.js → EmptyState-DG0m-CGv.js} +1 -1
  20. zenml/zen_server/dashboard/assets/Error-DcVLcrLs.js +1 -0
  21. zenml/zen_server/dashboard/assets/ExecutionStatus-C4tlFnlh.js +1 -0
  22. zenml/zen_server/dashboard/assets/{Helpbox-DtUG2Bf_.js → Helpbox-C-RGHz3S.js} +1 -1
  23. zenml/zen_server/dashboard/assets/{Infobox-CSBRrM6r.js → Infobox-DFCWPbMb.js} +1 -1
  24. zenml/zen_server/dashboard/assets/{LeftSideMenu-DPsCCK3z.js → LeftSideMenu-Czev0KCA.js} +1 -1
  25. zenml/zen_server/dashboard/assets/{Lock-CrIAdQo6.js → Lock-CRP5J_su.js} +1 -1
  26. zenml/zen_server/dashboard/assets/NestedCollapsible-CN9scBUn.js +1 -0
  27. zenml/zen_server/dashboard/assets/{NumberBox-DtCv7jh3.js → NumberBox-CoQjQYDJ.js} +1 -1
  28. zenml/zen_server/dashboard/assets/{Pagination-CWnEpSpN.js → Pagination-CcDD5yHh.js} +1 -1
  29. zenml/zen_server/dashboard/assets/Partials-DlMzfKgs.js +1 -0
  30. zenml/zen_server/dashboard/assets/{PasswordChecker-B88WjuCe.js → PasswordChecker-BZwoeQIm.js} +1 -1
  31. zenml/zen_server/dashboard/assets/{ProCta-CNyp04C8.js → ProCta-CU2ycJDo.js} +1 -1
  32. zenml/zen_server/dashboard/assets/ProviderIcon-BMAn9Jld.js +1 -0
  33. zenml/zen_server/dashboard/assets/ProviderRadio-D_q9tE3G.js +1 -0
  34. zenml/zen_server/dashboard/assets/RunsBody-BToytB8e.js +1 -0
  35. zenml/zen_server/dashboard/assets/{SearchField-BtUi6cYl.js → SearchField-D_0-uAPj.js} +1 -1
  36. zenml/zen_server/dashboard/assets/SecretTooltip-BcWMKb9f.js +1 -0
  37. zenml/zen_server/dashboard/assets/{SetPassword-BmbgL_ed.js → SetPassword-CaKVSqAL.js} +1 -1
  38. zenml/zen_server/dashboard/assets/{SheetHeader-DkH7aG9K.js → SheetHeader-7vwlsY_i.js} +1 -1
  39. zenml/zen_server/dashboard/assets/StackComponentList-s7eSfm8o.js +1 -0
  40. zenml/zen_server/dashboard/assets/StackList-Dt0FrIkM.js +1 -0
  41. zenml/zen_server/dashboard/assets/Tabs-B27AHUfo.js +1 -0
  42. zenml/zen_server/dashboard/assets/Tick-DDeDgTuT.js +1 -0
  43. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-D_DCETSO.js → UpdatePasswordSchemas-Da5RndbV.js} +1 -1
  44. zenml/zen_server/dashboard/assets/{Wizard-BHvY75u_.js → Wizard-8aJzxUjb.js} +1 -1
  45. zenml/zen_server/dashboard/assets/WizardFooter-Bt7_UE14.js +1 -0
  46. zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-DpKw9WL9.js → all-pipeline-runs-query-gorNNEaT.js} +1 -1
  47. zenml/zen_server/dashboard/assets/{arrow-left-MRXv5pAH.js → arrow-left-hcj2H8HY.js} +1 -1
  48. zenml/zen_server/dashboard/assets/bar-chart-square-check-9siI9icm.js +1 -0
  49. zenml/zen_server/dashboard/assets/{bulk-delete-CzYA--cC.js → bulk-delete-B5RTlnD_.js} +1 -1
  50. zenml/zen_server/dashboard/assets/{check-B9QMTa3f.js → check-D1bHMJkL.js} +1 -1
  51. zenml/zen_server/dashboard/assets/{check-circle-C4tYvbtw.js → check-circle-mnEgPhPF.js} +1 -1
  52. zenml/zen_server/dashboard/assets/{chevron-down-jbbQh82s.js → chevron-down-Z3nUe-0U.js} +1 -1
  53. zenml/zen_server/dashboard/assets/{chevron-right-double-Dgp_gEsp.js → chevron-right-double-CbRQKN4Q.js} +1 -1
  54. zenml/zen_server/dashboard/assets/{clock-B_mTG8PH.js → clock-BMjHXT3f.js} +1 -1
  55. zenml/zen_server/dashboard/assets/{code-browser-CiD8qkBx.js → code-browser-DftoiCIg.js} +1 -1
  56. zenml/zen_server/dashboard/assets/configuration-form-Yz8m0QIG.js +1 -0
  57. zenml/zen_server/dashboard/assets/constants-DeV48DuZ.js +1 -0
  58. zenml/zen_server/dashboard/assets/{create-stack-BpZrmKDu.js → create-stack-BruqH_6X.js} +1 -1
  59. zenml/zen_server/dashboard/assets/credit-card-CH1BHrXY.js +1 -0
  60. zenml/zen_server/dashboard/assets/dataflow-2-qHjWt7zp.js +1 -0
  61. zenml/zen_server/dashboard/assets/{delete-run-BkyDsKQc.js → delete-run-ibBtciMR.js} +1 -1
  62. zenml/zen_server/dashboard/assets/{expand-full-BPiXpch2.js → expand-full-CD4fFvM-.js} +1 -1
  63. zenml/zen_server/dashboard/assets/{eye-CbVlAYty.js → eye-CLNgIh_K.js} +1 -1
  64. zenml/zen_server/dashboard/assets/{file-text-Cd8wVfq5.js → file-text-CltVhgwZ.js} +1 -1
  65. zenml/zen_server/dashboard/assets/form-6aSt3tIl.js +1 -0
  66. zenml/zen_server/dashboard/assets/form-schemas-B9XgTS1V.js +1 -0
  67. zenml/zen_server/dashboard/assets/gradient_bg-BH8t8fi6.webp +0 -0
  68. zenml/zen_server/dashboard/assets/{help-Co6aedki.js → help-B0CvBhCm.js} +1 -1
  69. zenml/zen_server/dashboard/assets/icon-hDriJUXY.js +1 -0
  70. zenml/zen_server/dashboard/assets/{index-eoDB_1XX.js → index-B7CRNU8l.js} +1 -1
  71. zenml/zen_server/dashboard/assets/index-BQWlHo1Y.js +1 -0
  72. zenml/zen_server/dashboard/assets/{index-DWpiv-Ft.js → index-BRhKF2z-.js} +1 -1
  73. zenml/zen_server/dashboard/assets/{index-BgEfQ3_G.js → index-BacoJBEQ.js} +11 -11
  74. zenml/zen_server/dashboard/assets/{index-BBt0LDtR.js → index-dCcVgFNl.js} +1 -1
  75. zenml/zen_server/dashboard/assets/index-eggipFZS.css +1 -0
  76. zenml/zen_server/dashboard/assets/index-mA8kL088.js +14 -0
  77. zenml/zen_server/dashboard/assets/{index.es-C1gfATPn.js → index.es-DcVFDpJU.js} +1 -1
  78. zenml/zen_server/dashboard/assets/{index.esm-DhJo3mA6.js → index.esm-COnaHLSh.js} +1 -1
  79. zenml/zen_server/dashboard/assets/{info-QkbQz4QU.js → info-CyMih3vQ.js} +1 -1
  80. zenml/zen_server/dashboard/assets/{key-icon-C07HKw8z.js → key-icon-HOx2gazv.js} +1 -1
  81. zenml/zen_server/dashboard/assets/{layout-DBbfEFBe.js → layout-C5dgIReC.js} +1 -1
  82. zenml/zen_server/dashboard/assets/layout-CFLL6-CM.js +1 -0
  83. zenml/zen_server/dashboard/assets/{login-mutation-C1hvP_cX.js → login-mutation-CidpsqyH.js} +1 -1
  84. zenml/zen_server/dashboard/assets/{logs-CQKlJjo0.js → logs-DoLoTEfj.js} +1 -1
  85. zenml/zen_server/dashboard/assets/mail-C160gvB0.js +1 -0
  86. zenml/zen_server/dashboard/assets/message-chat-square-DLz6XmPS.js +1 -0
  87. zenml/zen_server/dashboard/assets/{package-miExReQl.js → package-BhYXGPxF.js} +1 -1
  88. zenml/zen_server/dashboard/assets/page-6huxSHEu.js +1 -0
  89. zenml/zen_server/dashboard/assets/page-7CJ4Wq3O.js +1 -0
  90. zenml/zen_server/dashboard/assets/page-8U20Tu_8.js +1 -0
  91. zenml/zen_server/dashboard/assets/{page-4zc4xPv2.js → page-BByayrO-.js} +2 -2
  92. zenml/zen_server/dashboard/assets/page-BCRXJXC9.js +1 -0
  93. zenml/zen_server/dashboard/assets/page-BK59rZvf.js +1 -0
  94. zenml/zen_server/dashboard/assets/page-BMpXak4U.js +1 -0
  95. zenml/zen_server/dashboard/assets/page-BTDi81N3.js +1 -0
  96. zenml/zen_server/dashboard/assets/{page-D-tJ_Y0a.js → page-BX67x4iL.js} +1 -1
  97. zenml/zen_server/dashboard/assets/page-Bjmcdg64.js +1 -0
  98. zenml/zen_server/dashboard/assets/page-BsAn8p4m.js +1 -0
  99. zenml/zen_server/dashboard/assets/{page-C2i-C7jv.js → page-BwjPRuaY.js} +1 -1
  100. zenml/zen_server/dashboard/assets/page-CDtSVkNc.js +1 -0
  101. zenml/zen_server/dashboard/assets/page-CEDU0L2T.js +1 -0
  102. zenml/zen_server/dashboard/assets/page-COJK90rG.js +1 -0
  103. zenml/zen_server/dashboard/assets/page-CY0LPcAJ.js +1 -0
  104. zenml/zen_server/dashboard/assets/page-C_XMn4GU.js +1 -0
  105. zenml/zen_server/dashboard/assets/page-Cb3KGsPK.js +22 -0
  106. zenml/zen_server/dashboard/assets/page-Cc8owYXQ.js +1 -0
  107. zenml/zen_server/dashboard/assets/{page-C3JfJxuR.js → page-CeGBDh1Q.js} +1 -1
  108. zenml/zen_server/dashboard/assets/page-CiGOVsj3.js +1 -0
  109. zenml/zen_server/dashboard/assets/page-CmLSFMkW.js +1 -0
  110. zenml/zen_server/dashboard/assets/page-CnfCptXq.js +1 -0
  111. zenml/zen_server/dashboard/assets/page-CvllZMBF.js +1 -0
  112. zenml/zen_server/dashboard/assets/page-CxzglV3-.js +1 -0
  113. zenml/zen_server/dashboard/assets/{page-rVhXI5ZO.js → page-D6cvOG8w.js} +1 -1
  114. zenml/zen_server/dashboard/assets/{page-BxeZrG_t.js → page-DDWW21kl.js} +1 -1
  115. zenml/zen_server/dashboard/assets/{page-DiHZK-1w.js → page-DF4FVxxW.js} +2 -2
  116. zenml/zen_server/dashboard/assets/page-DSZfclXt.js +1 -0
  117. zenml/zen_server/dashboard/assets/page-DVLez4R1.js +1 -0
  118. zenml/zen_server/dashboard/assets/page-DcXrWWWh.js +1 -0
  119. zenml/zen_server/dashboard/assets/page-Dg7-H_9i.js +1 -0
  120. zenml/zen_server/dashboard/assets/{page-BPQ66vR-.js → page-DgldL5UB.js} +2 -2
  121. zenml/zen_server/dashboard/assets/page-Dw7XuiSo.js +18 -0
  122. zenml/zen_server/dashboard/assets/{page-DOCOmmKn.js → page-FQxi1Otg.js} +1 -1
  123. zenml/zen_server/dashboard/assets/page-XrmOHHg7.js +1 -0
  124. zenml/zen_server/dashboard/assets/page-YdWnx9MX.js +1 -0
  125. zenml/zen_server/dashboard/assets/page-oRm7D4TC.js +1 -0
  126. zenml/zen_server/dashboard/assets/{page-uxjMX8Iq.js → page-q41JNDWO.js} +1 -1
  127. zenml/zen_server/dashboard/assets/page-x2GXC8sI.js +1 -0
  128. zenml/zen_server/dashboard/assets/page-z2FXP4GY.js +1 -0
  129. zenml/zen_server/dashboard/assets/{persist-CFPbMcJX.js → persist-BKKcL1Kp.js} +1 -1
  130. zenml/zen_server/dashboard/assets/{persist-BsdEtCkd.js → persist-DxiyfAax.js} +1 -1
  131. zenml/zen_server/dashboard/assets/{pipeline-CSUlkd50.js → pipeline-BJ8liDnl.js} +1 -1
  132. zenml/zen_server/dashboard/assets/{plus-Cl0_rCVF.js → plus-cI8zD2xh.js} +1 -1
  133. zenml/zen_server/dashboard/assets/primary-role-CPGHymjN.js +1 -0
  134. zenml/zen_server/dashboard/assets/{react-error-boundary.esm-7_MuhCay.js → react-error-boundary.esm-DoXxY4pT.js} +1 -1
  135. zenml/zen_server/dashboard/assets/{refresh-BcTM09NW.js → refresh-3EF2R7ja.js} +1 -1
  136. zenml/zen_server/dashboard/assets/{resource-tyes-list-79FqS3LY.js → resource-tyes-list-B5rkZcbc.js} +1 -1
  137. zenml/zen_server/dashboard/assets/resource-type-tooltip-E97WGqfk.js +1 -0
  138. zenml/zen_server/dashboard/assets/service-B9aVzfAF.js +2 -0
  139. zenml/zen_server/dashboard/assets/service-connectors-DL2-k_E2.js +1 -0
  140. zenml/zen_server/dashboard/assets/{sharedSchema-C_HkejsG.js → sharedSchema-DyUO09BR.js} +1 -1
  141. zenml/zen_server/dashboard/assets/slash-circle-D2Lb2FyR.js +1 -0
  142. zenml/zen_server/dashboard/assets/stack-detail-query-Bc4QKlWg.js +1 -0
  143. zenml/zen_server/dashboard/assets/{terminal-XFL_4QN-.js → terminal-BObrvDlO.js} +1 -1
  144. zenml/zen_server/dashboard/assets/{terminal-square-XFL_4QN-.js → terminal-square-BObrvDlO.js} +1 -1
  145. zenml/zen_server/dashboard/assets/{transform-CeZdrxDZ.js → transform-DFpKTKgF.js} +1 -1
  146. zenml/zen_server/dashboard/assets/{trash-DP6Tpp_E.js → trash-HKxXWbSG.js} +1 -1
  147. zenml/zen_server/dashboard/assets/{update-current-user-mutation-Ca-Lmwuj.js → update-current-user-mutation-DSyUyHVj.js} +1 -1
  148. zenml/zen_server/dashboard/assets/update-server-settings-mutation-CdM-Sdds.js +1 -0
  149. zenml/zen_server/dashboard/assets/{zod-XdS2h1ws.js → zod-DgEcN9jD.js} +1 -1
  150. zenml/zen_server/dashboard/index.html +7 -7
  151. zenml/zen_stores/migrations/versions/0.84.0_release.py +23 -0
  152. zenml/zen_stores/sql_zen_store.py +9 -3
  153. {zenml_nightly-0.83.1.dev20250711.dist-info → zenml_nightly-0.84.0.dev20250713.dist-info}/METADATA +1 -1
  154. {zenml_nightly-0.83.1.dev20250711.dist-info → zenml_nightly-0.84.0.dev20250713.dist-info}/RECORD +157 -150
  155. zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-DsOmO1FH.js +0 -1
  156. zenml/zen_server/dashboard/assets/ButtonGroup-4sPZDv70.js +0 -1
  157. zenml/zen_server/dashboard/assets/CollapsibleCard-CBKenz9f.js +0 -1
  158. zenml/zen_server/dashboard/assets/ComponentIcon-CMiVW-O6.js +0 -1
  159. zenml/zen_server/dashboard/assets/DialogItem-CRCDpYU6.js +0 -1
  160. zenml/zen_server/dashboard/assets/Error-BG6f_WRd.js +0 -1
  161. zenml/zen_server/dashboard/assets/ExecutionStatus-BuhNAE9w.js +0 -1
  162. zenml/zen_server/dashboard/assets/NestedCollapsible-CMuDIJlp.js +0 -1
  163. zenml/zen_server/dashboard/assets/Partials-CfHD6OH5.js +0 -1
  164. zenml/zen_server/dashboard/assets/ProviderIcon-DHejyg7C.js +0 -1
  165. zenml/zen_server/dashboard/assets/ProviderRadio-tGtie8Gc.js +0 -1
  166. zenml/zen_server/dashboard/assets/RunsBody-mYwMcWWj.js +0 -1
  167. zenml/zen_server/dashboard/assets/SecretTooltip-B5u1UsQ9.js +0 -1
  168. zenml/zen_server/dashboard/assets/StackComponentList-Bi8BKqCu.js +0 -1
  169. zenml/zen_server/dashboard/assets/StackList-Cvxapo0p.js +0 -1
  170. zenml/zen_server/dashboard/assets/StackName-CFSZL8ec.js +0 -1
  171. zenml/zen_server/dashboard/assets/Tabs-D4dv48ry.js +0 -1
  172. zenml/zen_server/dashboard/assets/Tick-Qquvr4P3.js +0 -1
  173. zenml/zen_server/dashboard/assets/UsageReason-DhiUV1bu.js +0 -1
  174. zenml/zen_server/dashboard/assets/WizardFooter-FQm8y-jP.js +0 -1
  175. zenml/zen_server/dashboard/assets/configuration-form-DSoMMiPE.js +0 -1
  176. zenml/zen_server/dashboard/assets/constants-DTfsIqHy.js +0 -1
  177. zenml/zen_server/dashboard/assets/flyte-Cj-xy_8I.svg +0 -10
  178. zenml/zen_server/dashboard/assets/form-BgtamtJm.js +0 -1
  179. zenml/zen_server/dashboard/assets/form-schemas-dyDkAxXP.js +0 -1
  180. zenml/zen_server/dashboard/assets/gcp-B1I3Qvcx.js +0 -1
  181. zenml/zen_server/dashboard/assets/index-BfNISy0X.css +0 -1
  182. zenml/zen_server/dashboard/assets/layout-o1x87a3q.js +0 -1
  183. zenml/zen_server/dashboard/assets/metaflow-weOkWNyT.svg +0 -10
  184. zenml/zen_server/dashboard/assets/page-4xUZpMN0.js +0 -31
  185. zenml/zen_server/dashboard/assets/page-B0104V6C.js +0 -1
  186. zenml/zen_server/dashboard/assets/page-BNJsjvof.js +0 -1
  187. zenml/zen_server/dashboard/assets/page-BQgSZ2nH.js +0 -1
  188. zenml/zen_server/dashboard/assets/page-BXl2ZX6J.js +0 -1
  189. zenml/zen_server/dashboard/assets/page-C2A-2Cj_.js +0 -1
  190. zenml/zen_server/dashboard/assets/page-CESEqC2L.js +0 -1
  191. zenml/zen_server/dashboard/assets/page-CF8cTZ7l.js +0 -1
  192. zenml/zen_server/dashboard/assets/page-CKjsimVu.js +0 -1
  193. zenml/zen_server/dashboard/assets/page-COLzBwff.js +0 -1
  194. zenml/zen_server/dashboard/assets/page-COifg5fa.js +0 -1
  195. zenml/zen_server/dashboard/assets/page-CQeJuA8T.js +0 -1
  196. zenml/zen_server/dashboard/assets/page-CcjWEjre.js +0 -1
  197. zenml/zen_server/dashboard/assets/page-CefGLeWy.js +0 -1
  198. zenml/zen_server/dashboard/assets/page-CfxpV3j4.js +0 -1
  199. zenml/zen_server/dashboard/assets/page-ClcUzawe.js +0 -1
  200. zenml/zen_server/dashboard/assets/page-Ct_LB3zo.js +0 -1
  201. zenml/zen_server/dashboard/assets/page-D-ZWUMYY.js +0 -1
  202. zenml/zen_server/dashboard/assets/page-DHrvih9u.js +0 -1
  203. zenml/zen_server/dashboard/assets/page-DMhaHZDw.js +0 -1
  204. zenml/zen_server/dashboard/assets/page-DcQmxKLp.js +0 -1
  205. zenml/zen_server/dashboard/assets/page-Dh4GRWw5.js +0 -1
  206. zenml/zen_server/dashboard/assets/page-Dn7ZNapg.js +0 -1
  207. zenml/zen_server/dashboard/assets/page-Dy4vSQY7.js +0 -1
  208. zenml/zen_server/dashboard/assets/page-QrvWQwZb.js +0 -1
  209. zenml/zen_server/dashboard/assets/page-RF3Fup0q.js +0 -40
  210. zenml/zen_server/dashboard/assets/page-WuvCrN47.js +0 -1
  211. zenml/zen_server/dashboard/assets/page-_WnHBI1F.js +0 -1
  212. zenml/zen_server/dashboard/assets/page-ghjVNgVE.js +0 -1
  213. zenml/zen_server/dashboard/assets/page-iDsDiDXw.js +0 -1
  214. zenml/zen_server/dashboard/assets/resource-type-tooltip-BL9ZTRKi.js +0 -1
  215. zenml/zen_server/dashboard/assets/service-connectors-Q8h7-_rG.js +0 -1
  216. zenml/zen_server/dashboard/assets/service-k-9Vsb30.js +0 -2
  217. zenml/zen_server/dashboard/assets/stack-detail-query-CNmVZ0Bo.js +0 -1
  218. zenml/zen_server/dashboard/assets/type-guards-CNgPYg8l.js +0 -1
  219. zenml/zen_server/dashboard/assets/update-server-settings-mutation-Bwe3gUt4.js +0 -1
  220. {zenml_nightly-0.83.1.dev20250711.dist-info → zenml_nightly-0.84.0.dev20250713.dist-info}/LICENSE +0 -0
  221. {zenml_nightly-0.83.1.dev20250711.dist-info → zenml_nightly-0.84.0.dev20250713.dist-info}/WHEEL +0 -0
  222. {zenml_nightly-0.83.1.dev20250711.dist-info → zenml_nightly-0.84.0.dev20250713.dist-info}/entry_points.txt +0 -0
@@ -1 +0,0 @@
1
- import{r as c,j as e}from"./@radix-Cdvw4jJ8.js";import{c as A,u as _}from"./bulk-delete-CzYA--cC.js";import{q as E,c as O,b as I}from"./@tanstack-5gTMR7G2.js";import{i as C,j as w,o as F,f as B,n as L,F as y,A as q,k as z,B as P,D as $,l as M,m as G,p as H,C as g,r as p,T as U,q as K,s as Q,t as J,v as j,w as V,z as d,x as W,g as D}from"./index-BgEfQ3_G.js";import{S as X}from"./refresh-BcTM09NW.js";import{P as Y}from"./Pagination-CWnEpSpN.js";import{S as Z}from"./SearchField-BtUi6cYl.js";import{S}from"./trash-DP6Tpp_E.js";import{D as v,a as T}from"./DeleteAlertDialog-DEI0YDzP.js";import{S as ee}from"./pipeline-CSUlkd50.js";import{S as te}from"./terminal-XFL_4QN-.js";import{g as se,E as ne,a as ae}from"./ExecutionStatus-BuhNAE9w.js";import{L as m,f as ie}from"./@react-router-DeDfXbUF.js";import{A as re}from"./AlertDialogDropdownItem-DsOmO1FH.js";import"./@reactflow-B_iCtR7X.js";import"./chevron-right-double-Dgp_gEsp.js";import"./index-DWpiv-Ft.js";import"./zod-XdS2h1ws.js";import"./index.esm-DhJo3mA6.js";import"./check-circle-C4tYvbtw.js";import"./help-Co6aedki.js";async function oe({params:t}){const n=C(w.pipelines.all+"?"+F(t)),s=await B(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&L(),!s.ok)throw new y({message:"Error while fetching pipelines",status:s.status,statusText:s.statusText});return s.json()}const x={all:["pipelines"],pipelineList:t=>E({queryKey:[...x.all,t],queryFn:async()=>oe({params:t})})};async function le({pipelineId:t}){const n=C(w.pipelines.detail(t)),s=await fetch(n,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!s.ok){const a=await s.json().then(i=>i.detail).catch(()=>`Failed to delete pipeline ${t}`);throw new y({status:s.status,statusText:s.statusText,message:a})}return s.json()}function ce(t){return O({mutationFn:le,...t})}const{ContextProvider:de,useContext:u}=A();function b(){const{setRowSelection:t}=u(),{mutateAsync:n}=ce();async function s(a){await n({pipelineId:a})}return _({deleteFn:s,queryKeyToInvalidate:x.all,setRowSelection:t})}function ue(){const[t,n]=c.useState(!1),{selectedRowCount:s,selectedRowIDs:a}=u(),{bulkDelete:i}=b();async function r(){await i(a),n(!1)}return e.jsxs(q,{open:t,onOpenChange:n,children:[e.jsx(z,{asChild:!0,children:e.jsxs(P,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(S,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(v,{title:`Delete Pipeline${s>=2?"s":""}`,handleDelete:r,children:e.jsxs(T,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function pe(){const{selectedRowCount:t}=u();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${t} Pipeline${t>1?"s":""} selected`}),e.jsx(ue,{})]})}function me({id:t}){const[n,s]=c.useState(!1),[a,i]=c.useState(!1),r=c.useRef(null),o=c.useRef(null),{bulkDelete:N}=b();async function R(){await N([t]),f(!1)}function k(){o.current=r.current}function f(l){if(l===!1){i(!1),setTimeout(()=>{s(l)},200);return}s(l)}return e.jsxs($,{onOpenChange:i,open:a,children:[e.jsx(M,{ref:r,children:e.jsx(G,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(H,{hidden:n,onCloseAutoFocus:l=>{o.current&&(o.current.focus(),o.current=null,l.preventDefault())},align:"end",sideOffset:7,children:e.jsx(re,{onSelect:k,open:n,onOpenChange:f,triggerChildren:"Delete",icon:e.jsx(S,{fill:"red"}),children:e.jsx(v,{title:"Delete Pipeline",handleDelete:R,children:e.jsxs(T,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}function he(){return[{id:"select",meta:{width:"1%"},header:({table:t})=>e.jsx(g,{id:"check-all",checked:t.getIsAllRowsSelected(),onCheckedChange:n=>t.toggleAllRowsSelected(n==="indeterminate"?!0:n)}),cell:({row:t})=>e.jsx(g,{id:`check-${t.id}`,checked:t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})},{id:"name",header:"Pipeline",cell:({row:t})=>{var n,s,a;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(ee,{className:`h-5 w-5 ${se((n=t.original.resources)==null?void 0:n.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(m,{to:p.projects.pipelines.namespace(encodeURIComponent(t.original.name)),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t.original.name})}),e.jsx(U,{children:e.jsxs(K,{children:[e.jsx(Q,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(ne,{status:(s=t.original.resources)==null?void 0:s.latest_run_status})}),e.jsx(J,{className:"z-20 capitalize",children:(a=t.original.resources)==null?void 0:a.latest_run_status})]})}),e.jsx(j,{copyText:t.original.name})]}),e.jsxs(m,{to:p.projects.pipelines.namespace(encodeURIComponent(t.original.name)),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:t.original.id.split("-")[0]}),e.jsx(j,{copyText:t.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:t=>{var n,s;return{status:(n=t.resources)==null?void 0:n.latest_run_status,runId:(s=t.resources)==null?void 0:s.latest_run_id}},cell:({getValue:t})=>{const{runId:n,status:s}=t();return!n||!s?e.jsx("div",{children:"No run"}):e.jsx(m,{to:p.projects.runs.detail(n),children:e.jsxs(V,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:ae(s),children:[e.jsx(te,{className:"h-3 w-3 fill-current"}),n==null?void 0:n.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:t})=>e.jsx(me,{id:t.original.id})}]}const h=1,xe=d.object({page:d.coerce.number().min(h).optional().default(h).catch(h),name:d.string().optional(),operator:d.enum(["and","or"]).optional()});function fe(){const[t]=ie(),{page:n,name:s,operator:a}=xe.parse({page:t.get("page")||void 0,name:t.get("name")||void 0,operator:t.get("operator")||void 0});return{page:n,name:s,logical_operator:a}}function ge(){const t=fe(),{selectedRowCount:n,rowSelection:s,setRowSelection:a}=u(),{data:i,refetch:r}=I({...x.pipelineList({...t,sort_by:"desc:latest_run"}),throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5 pt-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[n?e.jsx(pe,{}):e.jsx(Z,{searchParams:t}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(P,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>r(),children:[e.jsx(X,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:i?e.jsx(W,{rowSelection:s,onRowSelectionChange:a,getRowId:o=>o.id,columns:he(),data:i.items}):e.jsx(D,{className:"h-[500px] w-full"})}),i?i.total_pages>1&&e.jsx(Y,{searchParams:t,paginate:i}):e.jsx(D,{className:"h-[36px] w-[300px]"})]})]})}function qe(){return e.jsx(de,{children:e.jsx(ge,{})})}export{qe as default};
@@ -1 +0,0 @@
1
- import{r as j,j as s}from"./@radix-Cdvw4jJ8.js";import{R as g,u as b,a as y,b as v}from"./ButtonGroup-4sPZDv70.js";import{y as N,E as P,r as c,P as S,z as i,C as p,T as k,q as C,s as R,t as T,v as u,w as x,G as w,B as E,x as _,g as h}from"./index-BgEfQ3_G.js";import{S as B}from"./pipeline-CSUlkd50.js";import{f as D,L as l,a as f}from"./@react-router-DeDfXbUF.js";import{S as A}from"./refresh-BcTM09NW.js";import{u as F}from"./all-pipeline-runs-query-DpKw9WL9.js";import{S as I}from"./SearchField-BtUi6cYl.js";import{P as z}from"./Pagination-CWnEpSpN.js";import{S as G}from"./terminal-XFL_4QN-.js";import{D as H}from"./DisplayDate-8RESqe5H.js";import{g as L,E as U}from"./ExecutionStatus-BuhNAE9w.js";import"./trash-DP6Tpp_E.js";import"./AlertDialogDropdownItem-DsOmO1FH.js";import"./DeleteAlertDialog-DEI0YDzP.js";import"./zod-XdS2h1ws.js";import"./index.esm-DhJo3mA6.js";import"./bulk-delete-CzYA--cC.js";import"./@tanstack-5gTMR7G2.js";import"./delete-run-BkyDsKQc.js";import"./@reactflow-B_iCtR7X.js";import"./index-DWpiv-Ft.js";import"./chevron-right-double-Dgp_gEsp.js";import"./check-circle-C4tYvbtw.js";import"./help-Co6aedki.js";function q(e){const{setBreadcrumbs:t}=N();j.useEffect(()=>{e&&t([P,{label:e,href:c.projects.pipelines.namespace(e)}])},[t,e])}function $({namespace:e}){return s.jsx(S,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(B,{className:"h-5 w-5 fill-neutral-400"}),s.jsx("h1",{className:"text-display-xs font-semibold",children:decodeURIComponent(e)})]})})}const d=1,O=i.object({page:i.coerce.number().min(d).optional().default(d).catch(d),name:i.string().optional(),operator:i.enum(["and","or"]).optional()});function J(){const[e]=D(),{page:t,name:a,operator:r}=O.parse({page:e.get("page")||void 0,name:e.get("name")||void 0});return{page:t,name:a,logical_operator:r}}function K(){return[{id:"select",meta:{width:"1%"},header:({table:e})=>s.jsx(p,{id:"check-all",checked:e.getIsAllRowsSelected(),onCheckedChange:t=>e.toggleAllRowsSelected(t==="indeterminate"?!0:t)}),cell:({row:e})=>s.jsx(p,{id:`check-${e.id}`,checked:e.getIsSelected(),onCheckedChange:e.getToggleSelectedHandler()})},{id:"run",header:"Run",accessorFn:e=>{var t;return{name:e.name,id:e.id,status:(t=e.body)==null?void 0:t.status}},cell:({getValue:e})=>{const{name:t,status:a,id:r}=e();return s.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[s.jsx(G,{className:`h-5 w-5 shrink-0 ${L(a)}`}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(l,{to:c.projects.runs.detail(r),className:"flex items-center gap-1",children:s.jsx("h2",{className:"text-text-md font-semibold",children:t})}),s.jsx(k,{children:s.jsxs(C,{children:[s.jsx(R,{className:"hover:text-theme-text-brand hover:underline",children:s.jsx(U,{status:a})}),s.jsx(T,{className:"z-20 capitalize",children:a})]})}),s.jsx(u,{copyText:t})]}),s.jsxs(l,{to:c.projects.runs.detail(r),className:"flex items-center gap-1",children:[s.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:r.split("-")[0]}),s.jsx(u,{copyText:r})]})]})]})}},{id:"stack",header:"Stack",accessorFn:e=>{var t,a,r,o;return{name:(a=(t=e.body)==null?void 0:t.stack)==null?void 0:a.name,id:(o=(r=e.body)==null?void 0:r.stack)==null?void 0:o.id}},cell:({getValue:e})=>{const{name:t,id:a}=e();return!t||!a?null:s.jsx(l,{to:c.stacks.overview,children:s.jsx(x,{rounded:!1,className:"inline-block",color:"turquoise",emphasis:"subtle",children:t})})}},{id:"repository",header:"Repository",accessorFn:e=>{var t,a,r,o,n,m;return{name:(r=(a=(t=e.body)==null?void 0:t.code_reference)==null?void 0:a.body)==null?void 0:r.code_repository.name,id:(m=(n=(o=e.body)==null?void 0:o.code_reference)==null?void 0:n.body)==null?void 0:m.code_repository.id}},cell:({getValue:e})=>{const{name:t,id:a}=e();return!t||!a?null:s.jsx("div",{children:s.jsx(x,{rounded:!1,className:"inline-block",color:"grey",emphasis:"subtle",children:t})})}},{id:"created",header:"Created at",accessorFn:e=>{var t;return(t=e.body)==null?void 0:t.created},cell:({getValue:e})=>s.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:s.jsx(H,{dateString:e()})})},{id:"author",header:"Author",accessorFn:e=>{var t;return{author:(t=e.resources)==null?void 0:t.user}},cell:({getValue:e})=>{const{author:t}=e();return s.jsx(w,{username:t.name})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:e})=>s.jsx(g,{id:e.original.id})}]}function M(){const{namespace:e}=f(),t=J(),a=K(),{selectedRowCount:r}=b(),{data:o,refetch:n}=F({params:{pipeline_name:decodeURIComponent(e),...t,sort_by:"desc:updated"}},{throwOnError:!0});return s.jsxs("div",{className:"flex flex-col gap-5 p-5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[r?s.jsx(y,{}):s.jsx(I,{searchParams:t}),s.jsxs(E,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>n(),children:[s.jsx(A,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})]}),s.jsxs("div",{className:"flex flex-col items-center gap-5",children:[s.jsx("div",{className:"w-full",children:o?s.jsx(_,{columns:a,data:o.items}):s.jsx(h,{className:"h-[500px] w-full"})}),o?o.total_pages>1&&s.jsx(z,{searchParams:t,paginate:o}):s.jsx(h,{className:"h-[36px] w-[300px]"})]})]})}function be(){const{namespace:e}=f();return q(e),s.jsx("div",{children:s.jsxs(v,{children:[s.jsx($,{namespace:e}),s.jsx(M,{})]})})}export{be as default};
@@ -1 +0,0 @@
1
- import{r as t,j as e}from"./@radix-Cdvw4jJ8.js";import{S as Z}from"./code-browser-CiD8qkBx.js";import{S as d}from"./help-Co6aedki.js";import{S as x}from"./info-QkbQz4QU.js";import{b as T,h as R,br as B,bs as P,d as M,g as V,aq as E,r as m,T as a,q as l,s as n,t as c}from"./index-BgEfQ3_G.js";import{f as z,L as h}from"./@react-router-DeDfXbUF.js";import{S as F}from"./clock-B_mTG8PH.js";import{C as L}from"./ProviderIcon-DHejyg7C.js";import{S as _}from"./layout-DBbfEFBe.js";import"./@tanstack-5gTMR7G2.js";import"./@reactflow-B_iCtR7X.js";import"./gcp-B1I3Qvcx.js";const q=s=>t.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.56811 2C4.57873 2 4.58936 2.00001 4.60001 2.00001H5.40001C5.41065 2.00001 5.42128 2 5.4319 2C5.68429 1.99997 5.93008 1.99994 6.13824 2.01695C6.36683 2.03563 6.63656 2.07969 6.90799 2.21799C7.28431 2.40974 7.59027 2.7157 7.78202 3.09202C7.92032 3.36345 7.96438 3.63318 7.98306 3.86178C7.98669 3.90624 7.98955 3.95241 7.99179 4.00001L16.0082 4.00001C16.0105 3.95241 16.0133 3.90624 16.0169 3.86178C16.0356 3.63318 16.0797 3.36345 16.218 3.09202C16.4097 2.7157 16.7157 2.40974 17.092 2.21799C17.3634 2.07969 17.6332 2.03563 17.8618 2.01695C18.0699 1.99994 18.3157 1.99997 18.5681 2H19.4319C19.6843 1.99997 19.9301 1.99994 20.1382 2.01695C20.3668 2.03563 20.6366 2.07969 20.908 2.21799C21.2843 2.40974 21.5903 2.7157 21.782 3.09202C21.9203 3.36345 21.9644 3.63318 21.9831 3.86178C22.0001 4.06993 22 4.31571 22 4.56809V5.43192C22 5.6843 22.0001 5.93008 21.9831 6.13824C21.9644 6.36683 21.9203 6.63656 21.782 6.90799C21.5903 7.28431 21.2843 7.59027 20.908 7.78202C20.6366 7.92032 20.3668 7.96438 20.1382 7.98306C20.0938 7.98669 20.0476 7.98955 20 7.99179V11C20 11.5523 19.5523 12 19 12C18.4477 12 18 11.5523 18 11V7.99179C17.9524 7.98955 17.9062 7.98669 17.8618 7.98306C17.6332 7.96438 17.3634 7.92032 17.092 7.78202C16.7157 7.59027 16.4097 7.28431 16.218 6.90799C16.0797 6.63656 16.0356 6.36683 16.0169 6.13824C16.0133 6.09377 16.0105 6.0476 16.0082 6.00001L7.99179 6.00001C7.98955 6.0476 7.98669 6.09377 7.98306 6.13824C7.96438 6.36683 7.92032 6.63656 7.78202 6.90799C7.59027 7.28431 7.28431 7.59027 6.90799 7.78202C6.63656 7.92032 6.36683 7.96438 6.13824 7.98306C6.09377 7.98669 6.0476 7.98955 6.00001 7.99179V16.0082C6.0476 16.0105 6.09377 16.0133 6.13824 16.0169C6.36683 16.0356 6.63656 16.0797 6.90799 16.218C7.28431 16.4097 7.59027 16.7157 7.78202 17.092C7.92032 17.3634 7.96438 17.6332 7.98306 17.8618C7.98669 17.9062 7.98955 17.9524 7.99179 18H11C11.5523 18 12 18.4477 12 19C12 19.5523 11.5523 20 11 20H7.99179C7.98955 20.0476 7.98669 20.0938 7.98306 20.1382C7.96438 20.3668 7.92032 20.6366 7.78202 20.908C7.59027 21.2843 7.28431 21.5903 6.90799 21.782C6.63656 21.9203 6.36683 21.9644 6.13824 21.9831C5.93008 22.0001 5.6843 22 5.43192 22H4.56809C4.31571 22 4.06993 22.0001 3.86178 21.9831C3.63318 21.9644 3.36345 21.9203 3.09202 21.782C2.7157 21.5903 2.40974 21.2843 2.21799 20.908C2.07969 20.6366 2.03563 20.3668 2.01695 20.1382C1.99994 19.9301 1.99997 19.6843 2 19.4319V18.5681C1.99997 18.3157 1.99994 18.0699 2.01695 17.8618C2.03563 17.6332 2.07969 17.3634 2.21799 17.092C2.40974 16.7157 2.7157 16.4097 3.09202 16.218C3.36345 16.0797 3.63318 16.0356 3.86178 16.0169C3.90624 16.0133 3.95241 16.0105 4.00001 16.0082V7.99179C3.95241 7.98955 3.90624 7.98669 3.86178 7.98306C3.63318 7.96438 3.36345 7.92032 3.09202 7.78202C2.7157 7.59027 2.40974 7.28431 2.21799 6.90799C2.07969 6.63656 2.03563 6.36683 2.01695 6.13824C1.99994 5.93008 1.99997 5.68429 2 5.4319C2 5.42128 2.00001 5.41065 2.00001 5.40001V4.60001C2.00001 4.58936 2 4.57873 2 4.56811C1.99997 4.31572 1.99994 4.06993 2.01695 3.86178C2.03563 3.63318 2.07969 3.36345 2.21799 3.09202C2.40974 2.7157 2.7157 2.40974 3.09202 2.21799C3.36345 2.07969 3.63318 2.03563 3.86178 2.01695C4.06993 1.99994 4.31572 1.99997 4.56811 2ZM5.40001 6.00001C5.69653 6.00001 5.85879 5.99923 5.97537 5.9897C5.98001 5.98932 5.98441 5.98894 5.98856 5.98856C5.98894 5.98441 5.98932 5.98001 5.9897 5.97537C5.99923 5.85879 6.00001 5.69653 6.00001 5.40001V4.60001C6.00001 4.30348 5.99923 4.14122 5.9897 4.02464C5.98932 4.02 5.98894 4.0156 5.98856 4.01145C5.98441 4.01107 5.98001 4.01069 5.97537 4.01031C5.85879 4.00078 5.69653 4.00001 5.40001 4.00001H4.60001C4.30348 4.00001 4.14122 4.00078 4.02464 4.01031C4.02 4.01069 4.0156 4.01107 4.01145 4.01145C4.01107 4.0156 4.01069 4.02 4.01031 4.02464C4.00078 4.14122 4.00001 4.30348 4.00001 4.60001V5.40001C4.00001 5.69653 4.00078 5.85879 4.01031 5.97537C4.01069 5.98001 4.01107 5.98441 4.01145 5.98856C4.0156 5.98894 4.02 5.98932 4.02464 5.9897C4.14122 5.99923 4.30348 6.00001 4.60001 6.00001H5.40001ZM4.60001 18C4.30348 18 4.14122 18.0008 4.02464 18.0103C4.02 18.0107 4.0156 18.0111 4.01145 18.0115C4.01107 18.0156 4.01069 18.02 4.01031 18.0246C4.00078 18.1412 4.00001 18.3035 4.00001 18.6V19.4C4.00001 19.6965 4.00078 19.8588 4.01031 19.9754C4.01069 19.98 4.01107 19.9844 4.01145 19.9885C4.0156 19.9889 4.02 19.9893 4.02464 19.9897C4.14122 19.9992 4.30348 20 4.60001 20H5.40001C5.69653 20 5.85879 19.9992 5.97537 19.9897C5.98001 19.9893 5.98441 19.9889 5.98856 19.9885C5.98894 19.9844 5.98932 19.98 5.9897 19.9754C5.99923 19.8588 6.00001 19.6965 6.00001 19.4V18.6C6.00001 18.3035 5.99923 18.1412 5.9897 18.0246C5.98932 18.02 5.98894 18.0156 5.98856 18.0115C5.98441 18.0111 5.98001 18.0107 5.97537 18.0103C5.85879 18.0008 5.69653 18 5.40001 18H4.60001ZM18 5.40001C18 5.69653 18.0008 5.85879 18.0103 5.97537C18.0107 5.98001 18.0111 5.98441 18.0115 5.98856C18.0156 5.98894 18.02 5.98932 18.0246 5.9897C18.1412 5.99923 18.3035 6.00001 18.6 6.00001H19.4C19.6965 6.00001 19.8588 5.99923 19.9754 5.9897C19.98 5.98932 19.9844 5.98893 19.9886 5.98855C19.9889 5.9844 19.9893 5.98001 19.9897 5.97537C19.9992 5.85879 20 5.69653 20 5.40001V4.60001C20 4.30348 19.9992 4.14122 19.9897 4.02464C19.9893 4.02 19.9889 4.0156 19.9885 4.01145C19.9844 4.01107 19.98 4.01069 19.9754 4.01031C19.8588 4.00078 19.6965 4.00001 19.4 4.00001H18.6C18.3035 4.00001 18.1412 4.00078 18.0246 4.01031C18.02 4.01069 18.0156 4.01107 18.0115 4.01145C18.0111 4.0156 18.0107 4.02 18.0103 4.02464C18.0008 4.14122 18 4.30348 18 4.60001V5.40001ZM18 14C18.5523 14 19 14.4477 19 15V17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H19V21C19 21.5523 18.5523 22 18 22C17.4477 22 17 21.5523 17 21V19H15C14.4477 19 14 18.5523 14 18C14 17.4477 14.4477 17 15 17H17V15C17 14.4477 17.4477 14 18 14Z"}));function S(){return e.jsx("div",{className:"group absolute z-20 flex h-full w-full items-center justify-center rounded-md border border-theme-border-moderate bg-white/70",children:e.jsx("div",{className:"hidden rounded-md bg-theme-text-primary px-3 py-2 text-text-xs text-theme-text-negative shadow-lg animate-in fade-in-0 fade-out-0 zoom-in-95 group-hover:block",children:"This option is not available for local deployments"})})}const D=s=>t.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},t.createElement("path",{d:"M15.1636 8.68344V14.9934L20.644 11.8401V5.52344L15.1636 8.68344Z",fill:"#4040B2"}),t.createElement("path",{d:"M9.08185 5.52344L14.5622 8.68344V14.9934L9.08185 11.8368V5.52344Z",fill:"#5C4EE5"}),t.createElement("path",{d:"M3 2V8.31333L8.48033 11.47V5.15667L3 2ZM9.08183 18.8433L14.5622 22V15.6867L9.08183 12.53V18.8433Z",fill:"#5C4EE5"}));function u({children:s,className:r,...i}){return e.jsx(T,{...i,className:R("h-full w-full space-y-1 px-6 py-5",r),children:s})}function C({children:s}){return e.jsx(e.Fragment,{children:s})}function j({children:s}){return e.jsx("div",{className:"space-y-0.5",children:s})}function f({children:s}){return e.jsx("div",{className:"flex items-center gap-1",children:s})}function p({children:s}){return e.jsx("h2",{className:"text-text-lg font-semibold",children:s})}function g({children:s}){return e.jsx("p",{className:"text-theme-text-secondary",children:s})}function y({children:s}){return e.jsx("div",{className:"flex w-full flex-wrap items-start justify-between gap-y-1",children:s})}function v({hasTerraform:s=!1}){return e.jsxs("div",{className:"flex items-center gap-2",children:[s&&e.jsx(D,{className:"h-4 w-4 shrink-0"}),e.jsx(L,{className:"h-4 w-4",provider:"aws"}),e.jsx(L,{className:"h-4 w-4",provider:"gcp"}),e.jsx(L,{className:"h-4 w-4",provider:"azure"})]})}function w({min:s}){return e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx(F,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"}),e.jsxs("p",{className:"text-text-xs text-theme-text-tertiary",children:["Estimated time: ",s," mins"]})]})}function N({flexibility:s,children:r}){return e.jsxs("div",{className:"flex w-full items-center gap-0.5 lg:w-1/3",children:[e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx("span",{className:"text-theme-text-secondary",children:"Flexibility"}),r]}),e.jsx(P,{className:"h-1 flex-1 shrink-0 rounded-rounded",value:s})]})}function b({children:s}){return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-y-1 text-text-xs",children:s})}function k({recommendataion:s}){return e.jsxs("div",{className:"flex items-center gap-0.5 text-text-xs text-theme-text-success",children:[e.jsx(B,{className:"h-3 w-3 shrink-0 fill-theme-text-success"}),e.jsxs("p",{children:["Recommended for ",s]})]})}const H="https://docs.zenml.io/how-to/infrastructure-deployment/stack-deployment/deploy-a-cloud-stack";function U(){const{isError:s,isPending:r,data:i}=M();if(r)return e.jsx(V,{className:"h-[200px] w-full"});if(s)return e.jsx("div",{children:"Failed to load server info"});const o=E(i.deployment_type||"other");return e.jsxs("section",{className:"w-full space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-text-xl font-semibold",children:"Create New Infrastructure"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Use our smart tools to create a new Cloud infrastructure a quick and simplified way."})]}),e.jsxs("div",{className:"grid w-full grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsx($,{isLocalDeployment:o}),e.jsx(O,{isLocalDeployment:o})]})]})}function $({isLocalDeployment:s}){const[r]=z(),i=m.stacks.create.newInfra+(r.size>=1?`?${r.toString()}`:"");return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:i,children:e.jsxs(u,{children:[e.jsxs(y,{children:[e.jsx(C,{children:e.jsx(Z,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"In-browser Experience"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Deploy the necessary pieces of infrastructure on your selected cloud provider and get you started on remote stack with a single click."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:H,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Provision cloud infrastructure via browser UI. No local installs needed. Quick setup for cloud resources."})]}),e.jsx(k,{recommendataion:"data scientists"}),e.jsxs(b,{children:[e.jsx(w,{min:"5"}),e.jsx(N,{flexibility:25,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(d,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Low flexibility:"})," Best for straightforward setups with minimal customization."]})]})})})]})]})})]})}function O({isLocalDeployment:s}){const[r]=z(),i=m.stacks.create.terraform+(r.size>=1?`?${r.toString()}`:"");return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:i,children:e.jsxs(u,{className:"flex flex-col justify-between space-y-0",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(y,{children:[e.jsx(C,{children:e.jsx(q,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{hasTerraform:!0})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Infrastructure-as-code"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Infrastructure-as-code (IaC) refers to using a dynamic codebase to provision and manage infrastructure, rather than deferring to manual processes."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:H,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Use Terraform modules to deploy infrastructure and register it back to ZenML."})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(k,{recommendataion:"infrastructure engineers"}),e.jsxs(b,{children:[e.jsx(w,{min:"3"}),e.jsx(N,{flexibility:75,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(d,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"High flexibility:"})," Offers extensive customization for advanced users or complex setups."]})]})})})]})]})]})})]})}const A=s=>t.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.24923 6.14303C6.0632 3.17816 8.7764 1 12 1C15.2236 1 17.9368 3.17816 18.7508 6.14303C21.1861 6.70961 23 8.8925 23 11.5C23 13.8963 21.4681 15.9322 19.3332 16.6868C18.8125 16.8708 18.2412 16.5979 18.0572 16.0772C17.8731 15.5565 18.146 14.9851 18.6668 14.8011C20.0275 14.3201 21 13.0224 21 11.5C21 9.67779 19.6067 8.17984 17.828 8.01511C17.375 7.97315 17.0073 7.63059 16.9335 7.18159C16.5436 4.80968 14.4822 3 12 3C9.51785 3 7.45643 4.80968 7.0665 7.18159C6.99268 7.63059 6.62505 7.97315 6.17196 8.01511C4.39329 8.17984 3 9.67779 3 11.5C3 13.0224 3.97251 14.3201 5.33325 14.8011C5.85396 14.9851 6.12689 15.5565 5.94284 16.0772C5.75879 16.5979 5.18747 16.8708 4.66675 16.6868C2.53192 15.9322 1 13.8963 1 11.5C1 8.8925 2.8139 6.70961 5.24923 6.14303Z"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C8.44772 12 8 12.4477 8 13C8 13.5523 8.44772 14 9 14C9.55228 14 10 13.5523 10 13C10 12.4477 9.55228 12 9 12ZM6 13C6 11.3431 7.34315 10 9 10C10.6569 10 12 11.3431 12 13C12 14.3062 11.1652 15.4175 10 15.8293V17C10 18.1046 10.8954 19 12 19H14V21H12C9.79086 21 8 19.2091 8 17V15.8293C6.83481 15.4175 6 14.3062 6 13Z"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 19C15.4477 19 15 19.4477 15 20C15 20.5523 15.4477 21 16 21C16.5523 21 17 20.5523 17 20C17 19.4477 16.5523 19 16 19ZM13 20C13 18.3431 14.3431 17 16 17C17.6569 17 19 18.3431 19 20C19 21.6569 17.6569 23 16 23C14.3431 23 13 21.6569 13 20Z"})),I="https://docs.zenml.io/how-to/infrastructure-deployment/stack-deployment/deploy-a-cloud-stack";function Q(){const{isError:s,isPending:r,data:i}=M();if(r)return e.jsx(V,{className:"h-[200px] w-full"});if(s)return e.jsx("div",{children:"Failed to load server info"});const o=E(i.deployment_type||"other");return e.jsxs("section",{className:"w-full space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-text-xl font-semibold",children:"Connect Existing Infrastructure"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Register your stack and components using existing resources that are already provisioned."})]}),e.jsxs("div",{className:"grid w-full grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsx(J,{isLocalDeployment:o}),e.jsx(G,{})]})]})}function G(){const[s]=z(),r=m.stacks.create.manual+(s.size>=1?`?${s.toString()}`:"");return e.jsx("div",{className:"relative",children:e.jsx(h,{to:r,children:e.jsxs(u,{children:[e.jsxs(y,{children:[e.jsx(C,{children:e.jsx(_,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Manual Setup"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Customize your ML stack by selecting each component individually through the ZenML interface. Choose from a list of pre-configured components or add new ones tailored to your needs."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:I,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Register stack and components manually using ZenML. Recommended for advanced or custom configurations."})]}),e.jsx(k,{recommendataion:"advanced users"}),e.jsxs(b,{children:[e.jsx(w,{min:"5-10"}),e.jsx(N,{flexibility:100,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(d,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Full flexibility:"})," Complete control and customization. For expert users and highly specialized requirements."]})]})})})]})]})})})}function J({isLocalDeployment:s}){return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:m.stacks.create.existingInfra,children:e.jsxs(u,{children:[e.jsxs(y,{children:[e.jsx(C,{children:e.jsx(A,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Scan your Cloud"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"The stack wizard allows you to browse through your existing infrastructure and use it to register a ZenML cloud stack."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:I,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Input your credentials and scan existing infrastructure on your cloud provider. Best for users with existing resources."})]}),e.jsx(k,{recommendataion:"infrastructure engineers"}),e.jsxs(b,{children:[e.jsx(w,{min:"5"}),e.jsx(N,{flexibility:50,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(d,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Medium flexibility:"})," Balances ease-of-use with some customization options."]})]})})})]})]})})]})}function c1(){return e.jsxs("section",{className:"layout-container space-y-5 py-5",children:[e.jsx(U,{}),e.jsx(Q,{})]})}export{c1 as default};
@@ -1 +0,0 @@
1
- import{j as t}from"./@radix-Cdvw4jJ8.js";import{C as o,S as r}from"./StackComponentList-Bi8BKqCu.js";import"./plus-Cl0_rCVF.js";import"./refresh-BcTM09NW.js";import"./Pagination-CWnEpSpN.js";import"./index-BgEfQ3_G.js";import"./@tanstack-5gTMR7G2.js";import"./@react-router-DeDfXbUF.js";import"./@reactflow-B_iCtR7X.js";import"./chevron-right-double-Dgp_gEsp.js";import"./SearchField-BtUi6cYl.js";import"./index-DWpiv-Ft.js";import"./DisplayDate-8RESqe5H.js";import"./expand-full-BPiXpch2.js";import"./SheetHeader-DkH7aG9K.js";import"./Tabs-D4dv48ry.js";import"./terminal-XFL_4QN-.js";import"./chevron-down-jbbQh82s.js";import"./transform-CeZdrxDZ.js";import"./NestedCollapsible-CMuDIJlp.js";import"./type-guards-CNgPYg8l.js";import"./eye-CbVlAYty.js";import"./CollapsibleCard-CBKenz9f.js";import"./check-circle-C4tYvbtw.js";import"./CodeSnippet-Ctplhzdc.js";import"./all-pipeline-runs-query-DpKw9WL9.js";import"./ExecutionStatus-BuhNAE9w.js";import"./help-Co6aedki.js";import"./index-BBt0LDtR.js";import"./stack-detail-query-CNmVZ0Bo.js";import"./ComponentBadge-Cnecw3qz.js";import"./ComponentIcon-CMiVW-O6.js";import"./layout-DBbfEFBe.js";import"./trash-DP6Tpp_E.js";import"./DeleteAlertDialog-DEI0YDzP.js";import"./zod-XdS2h1ws.js";import"./index.esm-DhJo3mA6.js";import"./Infobox-CSBRrM6r.js";import"./info-QkbQz4QU.js";import"./bulk-delete-CzYA--cC.js";function O(){return t.jsx("div",{className:"pt-5",children:t.jsx(o,{children:t.jsx(r,{})})})}export{O as default};
@@ -1 +0,0 @@
1
- import{r as a,j as e}from"./@radix-Cdvw4jJ8.js";import{y as g,bg as C,r as p,P as y,aZ as b,B as i,ai as c}from"./index-BgEfQ3_G.js";import{H as u,B as x,F as v,W as N}from"./Wizard-BHvY75u_.js";import{S as f}from"./arrow-left-MRXv5pAH.js";import{C as S}from"./configuration-form-DSoMMiPE.js";import{c as k,L as F}from"./@react-router-DeDfXbUF.js";import{S as B,s as w}from"./constants-DTfsIqHy.js";import{C as T}from"./ComponentIcon-CMiVW-O6.js";import"./@tanstack-5gTMR7G2.js";import"./@reactflow-B_iCtR7X.js";import"./index-eoDB_1XX.js";import"./form-BgtamtJm.js";import"./plus-Cl0_rCVF.js";import"./trash-DP6Tpp_E.js";import"./index.esm-DhJo3mA6.js";import"./type-guards-CNgPYg8l.js";import"./zod-XdS2h1ws.js";import"./transform-CeZdrxDZ.js";import"./check-B9QMTa3f.js";import"./CodeSnippet-Ctplhzdc.js";import"./file-text-Cd8wVfq5.js";import"./terminal-square-XFL_4QN-.js";import"./layout-DBbfEFBe.js";function z(){const{setBreadcrumbs:s}=g();a.useEffect(()=>{s([C,{label:"Create",href:p.components.create}])},[s])}function H(){return z(),e.jsx(y,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(b,{className:"h-5 w-5 fill-turquoise-400"}),e.jsx("h1",{className:"text-display-xs font-semibold",children:"Register new Component"})]})})}function I({flavor:s,type:t,handleBack:r}){const l=a.useId(),o=k();function m(d){o(p.components.detail(d))}return e.jsxs(e.Fragment,{children:[e.jsxs(u,{className:"flex items-center gap-2",children:[e.jsxs(i,{intent:"secondary",emphasis:"subtle",className:"flex aspect-square size-6 items-center justify-center",onClick:()=>r(),children:[e.jsx(f,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs("span",{children:["Configure your ",c(s.name)," ",c(t)]})]}),e.jsx(x,{className:"p-0",children:e.jsx(S,{flavorId:s.id,formId:l,successHandler:m,FooterComponent:L})})]})}function L({formId:s,isPending:t}){return e.jsxs(v,{children:[e.jsx(i,{asChild:!0,intent:"secondary",size:"md",children:e.jsx(F,{to:p.components.overview,children:"Cancel"})}),e.jsxs(i,{size:"md",disabled:t,type:"submit",form:s,children:[t&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Component"]})]})}function R({type:s,handleFlavorSelect:t,handleBack:r}){return e.jsxs(e.Fragment,{children:[e.jsxs(u,{className:"flex items-center gap-2",children:[e.jsxs(i,{intent:"secondary",emphasis:"subtle",className:"flex aspect-square size-6 items-center justify-center",onClick:()=>r(),children:[e.jsx(f,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs("span",{children:["Select your ",c(s)," Flavor"]})," "]}),e.jsx(x,{children:e.jsx(B,{type:s,setSelectedFlavor:t})})]})}function q({selectTypeHandler:s}){return e.jsxs(e.Fragment,{children:[e.jsx(u,{children:"Select your Component Type"}),e.jsx(x,{children:e.jsx("ul",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:w.map(t=>e.jsx(E,{type:t,selectTypeHandler:s},t))})})]})}function E({type:s,selectTypeHandler:t}){return e.jsxs("button",{onClick:()=>t(s),className:"flex h-[110px] flex-col items-center justify-center space-y-2 truncate whitespace-nowrap rounded-md border border-theme-border-moderate bg-theme-surface-secondary py-5 text-center text-text-sm text-theme-text-secondary transition-all duration-150 hover:bg-theme-surface-primary hover:shadow-sm",children:[e.jsx(T,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong",type:s}),e.jsx("span",{children:c(s)})]})}function W(){const[s,t]=a.useState(0),[r,l]=a.useState(null),[o,m]=a.useState();function d(n){l(n),t(1)}function j(n){m(n),t(2)}function h(){t(n=>n-1)}return e.jsxs(N,{children:[s===0&&e.jsx(q,{selectTypeHandler:d}),s===1&&r&&e.jsx(R,{type:r,handleFlavorSelect:j,handleBack:h}),s===2&&o&&r&&e.jsx(I,{flavor:o,type:r,handleBack:h})]})}function ie(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx(H,{}),e.jsx("section",{className:"layout-container pb-5",children:e.jsx(W,{})})]})}export{ie as default};
@@ -1 +0,0 @@
1
- import{j as e,r as n}from"./@radix-Cdvw4jJ8.js";import{f as p,i as f,F as y,j,as as g,au as v,V as C,B as d,ap as u,aQ as x,aO as N,g as w,ac as E,ad as b,ae as F,af as k,S as V}from"./index-BgEfQ3_G.js";import{S as _}from"./chevron-down-jbbQh82s.js";import{I as H}from"./Infobox-CSBRrM6r.js";import{c as S,b as P}from"./@tanstack-5gTMR7G2.js";import{a as B}from"./@react-router-DeDfXbUF.js";import"./@reactflow-B_iCtR7X.js";import"./info-QkbQz4QU.js";async function D({connectorId:t}){const s=f(j.serviceConnectors.verifyExisting(t)),a=await p(s,{method:"PUT",headers:{"Content-Type":"application/json"}});if(!a.ok){const r=await a.json().then(l=>Array.isArray(l.detail)?l.detail[1]:l.detail).catch(()=>"Failed to verify connector");throw new y({status:a.status,statusText:a.statusText,message:r})}return a.json()}function A(t){return S({...t,mutationFn:async({connectorId:s})=>D({connectorId:s})})}const M="/assets/connectivity-4UKGMYnr.webp";function R({open:t,isLoading:s,isError:a,onClose:r,onSuccess:l,data:c}){const i=!!(c!=null&&c.error),o=(c==null?void 0:c.error)??void 0;return e.jsx(g,{open:t,children:e.jsx(v,{onPointerDownOutside:m=>s?m.preventDefault():r==null?void 0:r(),onEscapeKeyDown:m=>s?m.preventDefault():r==null?void 0:r(),className:"max-w-[540px] p-8",children:e.jsxs("div",{className:"flex w-full flex-col items-center justify-center space-y-5",children:[s&&!c&&e.jsx(T,{onClose:r}),!s&&!a&&!i&&e.jsx(O,{onSuccess:l}),!s&&(a||i)&&e.jsx(Z,{error:o,onClose:r})]})})})}function T({onClose:t}){return e.jsxs(e.Fragment,{children:[e.jsx(C,{}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"Verifying your service connector"}),e.jsxs("p",{className:"text-text-lg text-theme-text-secondary",children:["Please wait while we check your connection ",e.jsx("br",{}),"This may take up to a minute."]})]}),e.jsx(d,{size:"md",emphasis:"subtle",onClick:t,intent:"secondary",className:"mt-4",children:"Cancel"})]})}function O({onSuccess:t}){return e.jsxs(e.Fragment,{children:[e.jsx(u,{width:180,height:180,className:"fill-theme-text-success"}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"Connection verified successfully!"}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"Ready to show your available resources"})]}),e.jsx(d,{size:"md",onClick:t,className:"mt-4",children:"Display Resources"})]})}function Z({onClose:t,error:s}){return e.jsxs(e.Fragment,{children:[e.jsx("img",{src:M,alt:"Connectivity",width:180,height:180}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"We couldn't verify your connection"}),s&&e.jsx("p",{className:"max-h-[250px] overflow-auto rounded-md border border-theme-border-moderate bg-theme-surface-secondary p-1 text-left font-mono",children:s}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"Please try again to list your resources"})]}),e.jsx(d,{size:"md",emphasis:"subtle",onClick:t,intent:"secondary",className:"mt-4",children:"Close"})]})}function h({children:t}){const{setResources:s}=x(),{connectorId:a}=B(),r=P({...N.serviceConnectorDetail(a),throwOnError:!0}),[l,c]=n.useState(!1),i=A();if(r.isPending)return e.jsx(w,{className:"h-7 w-[150px]"});if(r.isError)return null;const o=()=>{c(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(R,{data:i.data,open:l,isLoading:i.isPending,isError:i.isError,onClose:o,onSuccess:()=>{i.data&&(s(i.data),c(!1))}}),e.jsxs(d,{disabled:i.isPending&&l,onClick:()=>{c(!0),i.mutate({connectorId:a})},className:"gap-1",size:"md",children:[e.jsx(u,{width:24,height:24,className:"size-5 shrink-0 fill-white"}),t]})]})}function z(){var a;const{resources:t}=x();if(!t)return null;const s=t.connector_type;return!s||typeof s=="string"?null:e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx(h,{children:e.jsx("span",{children:"Reverify now"})})}),(a=t.resources)==null?void 0:a.map(r=>{var l,c;return e.jsx(I,{title:(l=s.resource_types.find(i=>i.resource_type===r.resource_type))==null?void 0:l.name,logoUrl:((c=s.resource_types.find(i=>i.resource_type===r.resource_type))==null?void 0:c.logo_url)??void 0,resource:r},r.resource_type)})]})}function I({resource:t,title:s,logoUrl:a}){const[r,l]=n.useState(!0),c=t.error,i=t.resource_ids??[];return e.jsxs(E,{open:r,onOpenChange:l,children:[e.jsx(b,{className:"flex items-center gap-[10px]",children:e.jsxs(F,{className:"flex w-full items-center gap-[10px] text-text-lg",children:[e.jsx(_,{className:` ${r?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),s||t.resource_type]})}),e.jsx(k,{className:"space-y-5 border-t border-theme-border-moderate bg-theme-surface-primary",children:c?e.jsx("div",{className:"p-5",children:e.jsx(H,{intent:"error",children:c})}):e.jsx("ul",{className:"divide-y divide-theme-border-moderate",children:i.map(o=>e.jsxs("li",{className:"flex items-center space-x-2 py-3 pl-8",children:[!!a&&e.jsx("img",{width:24,height:24,src:a,alt:s,className:"size-5 shrink-0"}),e.jsx("span",{children:o})]},o))})})]})}const Q=t=>n.createElement("svg",{width:182,height:104,viewBox:"0 0 182 104",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},n.createElement("path",{d:"M35 12C35 7.58172 38.5817 4 43 4H147C151.418 4 155 7.58172 155 12V96C155 100.418 151.418 104 147 104H43C38.5817 104 35 100.418 35 96V12Z",fill:"#F1EBFE"}),n.createElement("path",{d:"M1 56H181",stroke:"#7A3EF4",strokeLinecap:"round"}),n.createElement("path",{d:"M16 61H166",stroke:"#7A3EF4",strokeLinecap:"round"}),n.createElement("g",{clipPath:"url(#clip0_8218_459)"},n.createElement("path",{d:"M31 8C31 3.58172 34.5817 0 39 0H143C147.418 0 151 3.58172 151 8V92C151 96.4183 147.418 100 143 100H39C34.5817 100 31 96.4183 31 92V8Z",fill:"white"}),n.createElement("mask",{id:"path-6-inside-1_8218_459",fill:"white"},n.createElement("path",{d:"M31 0H151V12H31V0Z"})),n.createElement("path",{d:"M31 0H151V12H31V0Z",fill:"#FBF9FF"}),n.createElement("path",{d:"M151 11H31V13H151V11Z",fill:"#7A3EF4",mask:"url(#path-6-inside-1_8218_459)"}),n.createElement("circle",{cx:41,cy:6,r:2,fill:"#AF8BF8"}),n.createElement("circle",{cx:47,cy:6,r:2,fill:"#AF8BF8"}),n.createElement("circle",{cx:53,cy:6,r:2,fill:"#AF8BF8"})),n.createElement("path",{d:"M31.5 8C31.5 3.85786 34.8579 0.5 39 0.5H143C147.142 0.5 150.5 3.85786 150.5 8V92C150.5 96.1421 147.142 99.5 143 99.5H39C34.8579 99.5 31.5 96.1421 31.5 92V8Z",stroke:"#7A3EF4"}),n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_8218_459"},n.createElement("path",{d:"M31 8C31 3.58172 34.5817 0 39 0H143C147.418 0 151 3.58172 151 8V92C151 96.4183 147.418 100 143 100H39C34.5817 100 31 96.4183 31 92V8Z",fill:"white"}))));function K({icon:t}){return e.jsxs("div",{className:"relative",children:[e.jsx(Q,{}),e.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-rounded bg-primary-25 p-3",children:t})]})}function L(){return e.jsx("div",{className:"p-9",children:e.jsxs("div",{className:"flex flex-col items-center space-y-5",children:[e.jsx(K,{icon:e.jsx(V,{className:"h-[36px] w-[36px] fill-primary-400"})}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"Please verify your service connector"}),e.jsxs("p",{className:"text-text-lg text-theme-text-secondary",children:["We'll check your connection and load available resources.",e.jsx("br",{}),"This may take up to a minute."]})]}),e.jsx(h,{children:e.jsx("span",{children:"Verify now"})})]})})}function ee(){const{resources:t}=x();return t===null?e.jsx(L,{}):e.jsx(z,{})}export{ee as default};
@@ -1 +0,0 @@
1
- import{j as e,r}from"./@radix-Cdvw4jJ8.js";import{as as m,at as i,B as o,au as p,aw as x,az as h,aA as u,b as n,a_ as f}from"./index-BgEfQ3_G.js";import{I as l}from"./Infobox-CSBRrM6r.js";import{H as C}from"./Helpbox-DtUG2Bf_.js";import{C as g}from"./CodeSnippet-Ctplhzdc.js";import"./@tanstack-5gTMR7G2.js";import"./@react-router-DeDfXbUF.js";import"./@reactflow-B_iCtR7X.js";import"./info-QkbQz4QU.js";import"./help-Co6aedki.js";const j=[{command:"zenml code-repository register <NAME> --type=<CODE_REPOSITORY_TYPE] [--CODE_REPOSITORY_OPTIONS]",description:"Register a code repository"},{command:"zenml code-repository register <NAME> --type=custom --source=<CODE_REPOSITORY_SOURCE> [--CODE_REPOSITORY_OPTIONS]",description:"Use a custom repository "},{command:"zenml code-repository list",description:"List your registered code repositories"},{command:"zenml code-repository delete <REPOSITORY_NAME_OR_ID>",description:"Delete a code repository that you have previously registered"}];function y(s){return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:s.description}),e.jsx(g,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:s.command})]})}const w=s=>r.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3ZM1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12ZM11.2451 7.43304C11.2546 7.43912 11.264 7.44517 11.2734 7.45121L15.994 10.4859C16.0026 10.4914 16.0112 10.497 16.02 10.5026C16.171 10.5996 16.3361 10.7057 16.4676 10.8083C16.6071 10.917 16.8273 11.1089 16.9571 11.4162C17.1148 11.7894 17.1148 12.2106 16.9571 12.5838C16.8273 12.8911 16.6071 13.083 16.4676 13.1917C16.3361 13.2943 16.171 13.4004 16.02 13.4974C16.0112 13.503 16.0026 13.5086 15.994 13.5141L11.2734 16.5488C11.264 16.5548 11.2545 16.5609 11.2451 16.567C11.0694 16.68 10.8846 16.7988 10.7219 16.8835C10.5582 16.9687 10.2611 17.1066 9.89314 17.0804C9.45914 17.0494 9.05999 16.8314 8.79923 16.4831C8.57813 16.1878 8.5335 15.8633 8.51664 15.6796C8.49989 15.4969 8.49995 15.2772 8.49999 15.0683C8.5 15.057 8.5 15.0458 8.5 15.0347V8.96533C8.5 8.95417 8.5 8.94296 8.49999 8.93173C8.49995 8.72279 8.49989 8.50311 8.51664 8.32042C8.5335 8.13665 8.57813 7.81219 8.79923 7.51687C9.05999 7.16856 9.45914 6.95064 9.89314 6.91964C10.2611 6.89336 10.5582 7.03127 10.7219 7.11647C10.8846 7.20117 11.0694 7.32001 11.2451 7.43304ZM10.5 9.33167V14.6683L14.6507 12L10.5 9.33167Z"}));function a({videoLink:s,isButton:t=!0,buttonText:c,fallbackImage:d}){return e.jsxs(m,{children:[t?e.jsx(i,{asChild:!0,children:e.jsxs(o,{className:"mt-5 h-auto gap-1 px-2 py-1 sm:h-7",size:"md",children:[e.jsx(w,{className:"h-5 w-5 shrink-0 fill-white"}),c??e.jsx(e.Fragment,{children:"Watch the Quickstart Guide (3 min)"})]})}):e.jsx(i,{children:d}),e.jsxs(p,{className:"max-w-[1000px]",children:[e.jsx("div",{className:"flex items-center justify-between border-b border-theme-border-moderate py-2 pl-5 pr-3",children:e.jsx(x,{className:"text-text-lg",children:"Get Started"})}),e.jsx("div",{className:"",children:e.jsx("iframe",{className:"aspect-video w-full overflow-hidden",src:s,allowFullScreen:!0,allow:"fullscreen"})}),e.jsx(h,{children:e.jsx(u,{asChild:!0,children:e.jsx(o,{size:"md",children:"Close"})})})]})]})}const N="/assets/repos-video-D8kpu60k.svg";function v(){return e.jsx(l,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"We are creating a new Repositories experience"}),e.jsx("p",{children:"In the meanwhile you can use the CLI to add and manage your repos."})]})})}function R(){const s="https://zenml.portal.trainn.co/share/koVfVubiXfXLXtVcDAqPyg/embed?autoplay=false";return e.jsxs(n,{className:"flex flex-col-reverse items-stretch overflow-hidden md:flex-row",children:[e.jsxs("div",{className:"w-full p-7 md:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Learn More about Repositories"}),e.jsx("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:"Get started with ZenML Repositories for streamlined pipeline versioning and faster Docker builds."}),e.jsx(a,{videoLink:s,buttonText:"Watch the Starter Guide (2 min)"})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx(a,{fallbackImage:e.jsx("img",{src:N,alt:"Purple squares with text indicating a starter guide for secrets",className:"h-full w-full"}),videoLink:s,isButton:!1})})]})}function O(){return e.jsxs("section",{className:"space-y-5 pl-8 pr-5",children:[e.jsx(l,{className:"text-text-md",intent:"neutral",children:"Code repositories enable ZenML to keep track of the code version that you use for your pipeline runs. Additionally, running a pipeline which is tracked in a registered code repository can decrease the time it takes Docker to build images for containerized stack components."}),j.map((s,t)=>e.jsx(e.Fragment,{children:y(s)},t)),e.jsx(C,{text:"Check all the commands and find more about Repositories in our Docs",link:"https://docs.zenml.io/how-to/setting-up-a-project-repository/connect-your-git-repository"})]})}function T(){return e.jsxs(n,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Repositories"}),e.jsx(v,{}),e.jsx(R,{}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{}),"Administering your Code Repositories"]}),e.jsx(O,{})]})}export{T as default};
@@ -1 +0,0 @@
1
- import{r as o,j as e}from"./@radix-Cdvw4jJ8.js";import{f as C,i as b,F as y,j as v,as as M,at as F,B as h,au as E,av as T,aw as P,ax as U,a as w,I as k,ay as O,az as I,aA as H,aB as R,S as D,z as u,aC as _,aD as z,aE as B,aF as Z,aG as q,D as V,l as G,m as L,p as K,G as Q,a3 as j,aH as J,e as $,g as f,x as W,b as X}from"./index-BgEfQ3_G.js";import{S as Y}from"./SearchField-BtUi6cYl.js";import{C as ee}from"./CodeSnippet-Ctplhzdc.js";import{c as N,h as A}from"./@tanstack-5gTMR7G2.js";import{u as se}from"./index.esm-DhJo3mA6.js";import{D as te}from"./DisplayDate-8RESqe5H.js";import{A as ae}from"./AlertDialogDropdownItem-DsOmO1FH.js";import{f as re}from"./@react-router-DeDfXbUF.js";import{P as ne}from"./Pagination-CWnEpSpN.js";import"./@reactflow-B_iCtR7X.js";import"./index-DWpiv-Ft.js";import"./chevron-right-double-Dgp_gEsp.js";const ie=a=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...a},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 4C8.06703 4 6.50002 5.567 6.50002 7.5C6.50002 9.433 8.06703 11 10 11C11.933 11 13.5 9.433 13.5 7.5C13.5 5.567 11.933 4 10 4ZM4.50002 7.5C4.50002 4.46243 6.96246 2 10 2C13.0376 2 15.5 4.46243 15.5 7.5C15.5 10.5376 13.0376 13 10 13C6.96246 13 4.50002 10.5376 4.50002 7.5ZM19 14C19.5523 14 20 14.4477 20 15V17H22C22.5523 17 23 17.4477 23 18C23 18.5523 22.5523 19 22 19H20V21C20 21.5523 19.5523 22 19 22C18.4477 22 18 21.5523 18 21V19H16C15.4477 19 15 18.5523 15 18C15 17.4477 15.4477 17 16 17H18V15C18 14.4477 18.4477 14 19 14ZM7.32629 14.5C7.38335 14.5 7.44125 14.5 7.50003 14.5H12C12.5523 14.5 13 14.9477 13 15.5C13 16.0523 12.5523 16.5 12 16.5H7.50003C6.03171 16.5 5.51923 16.5109 5.12917 16.6292C4.17036 16.92 3.42005 17.6703 3.1292 18.6291C3.01088 19.0192 3.00002 19.5317 3.00002 21C3.00002 21.5523 2.55231 22 2.00002 22C1.44774 22 1.00002 21.5523 1.00002 21C1.00002 20.9412 1 20.8833 0.99998 20.8263C0.999526 19.599 0.999216 18.761 1.21532 18.0486C1.70007 16.4506 2.95059 15.2 4.54859 14.7153C5.261 14.4992 6.09902 14.4995 7.32629 14.5Z"}));async function oe(a){const s=b(v.users.all),t=await C(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>"Failed to create User");throw new y({status:t.status,statusText:t.statusText,message:r})}return t.json()}function le(a){return N({mutationFn:async s=>oe(s),...a})}function ce(){const[a,s]=o.useState(!1),[t,r]=o.useState(null);return e.jsxs(M,{open:a,onOpenChange:n=>{s(n),r(null)},children:[e.jsx(F,{asChild:!0,children:e.jsx(h,{className:"shrink-0",intent:"primary",children:"Add Member"})}),e.jsxs(E,{className:"",children:[e.jsx(T,{children:e.jsx(P,{children:" Add a New Member"})}),t?e.jsx(me,{name:t.name,token:U(t)}):e.jsx(de,{setSuccessMember:r})]})]})}u.object({username:u.string(),isAdmin:u.boolean()});function de({setSuccessMember:a}){const{toast:s}=w(),t=A(),{mutate:r,isPending:n}=le({onError(d){R(d)&&s({status:"error",emphasis:"subtle",icon:e.jsx(D,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess(d){a(d),t.invalidateQueries({queryKey:["users"]})}}),c=o.useId(),l=o.useId(),{register:i,handleSubmit:x,watch:p,setValue:m}=se();function S(d){r({is_admin:d.isAdmin,name:d.username})}return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-user-form",onSubmit:x(S),className:"space-y-5 p-7",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:c,className:"text-text-sm",children:"Username"}),e.jsx(k,{...i("username"),id:c,className:"w-full"})]}),e.jsxs("div",{className:"flex gap-5",children:[e.jsx("label",{htmlFor:l,className:"text-text-md",children:"Add user as an Admin"}),e.jsx(O,{onCheckedChange:d=>m("isAdmin",!!d),...i("isAdmin",{value:!1}),id:l})]})]})}),e.jsxs(I,{className:"gap-[10px]",children:[e.jsx(H,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{disabled:!p("username")||n,form:"create-user-form",size:"sm",children:"Generate Token"})]})]})}function me({token:a,name:s}){return e.jsxs("div",{className:"space-y-5 overflow-hidden p-7 text-center",children:[e.jsx(ie,{className:"m-auto mb-5 h-[110px] w-[110px] fill-success-500"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold text-theme-text-primary",children:`The user ${s} was created successfully!`}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Share the invitation link with the user to complete the registration."})]}),e.jsx(ee,{className:"mx-auto",code:a})]})}const ue=a=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...a},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.9681 6.38231C3.73647 7.92199 3 9.87499 3 12C3 16.9706 7.02944 21 12 21C14.125 21 16.078 20.2635 17.6177 19.0319L4.9681 6.38231ZM6.38231 4.9681L19.0319 17.6177C20.2635 16.078 21 14.125 21 12C21 7.02944 16.9706 3 12 3C9.87499 3 7.92199 3.73647 6.38231 4.9681ZM1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12Z"}));async function he(a){const s=b(v.users.detail(a)),t=await C(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>"Failed to delete User");throw new y({status:t.status,statusText:t.statusText,message:r})}return t.json()}function xe(a){return N({mutationFn:async s=>he(s),...a})}function pe({userId:a,name:s}){const{toast:t}=w(),r=A(),{isPending:n,mutate:c}=xe({onSuccess(){r.invalidateQueries({queryKey:["users"]})},onError:i=>{i instanceof Error&&t({status:"error",emphasis:"subtle",icon:e.jsx(D,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:i.message,rounded:!0})}});function l(){c(a)}return e.jsxs(_,{className:"p-0",children:[e.jsx(z,{className:"py-2 pl-5 pr-3 text-text-lg font-semibold",children:"Delete Member"}),e.jsx("div",{className:"border-y border-theme-border-moderate px-5 py-5",children:e.jsxs(B,{children:["Deleting ",e.jsx("strong",{children:s})," cannot be undone."]})}),e.jsxs("div",{className:"flex justify-end gap-3 px-5 py-3",children:[e.jsx(Z,{asChild:!0,children:e.jsx(h,{intent:"secondary",children:"Cancel"})}),e.jsx(q,{asChild:!0,children:e.jsx(h,{onClick:l,disabled:n,intent:"danger",children:"Delete"})})]})]})}function fe({userId:a,name:s}){const[t,r]=o.useState(!1),[n,c]=o.useState(!1),l=o.useRef(null),i=o.useRef(null);function x(){i.current=l.current}function p(m){if(m===!1){c(!1),setTimeout(()=>{r(m)},200);return}r(m)}return e.jsxs(V,{onOpenChange:c,open:n,children:[e.jsx(G,{ref:l,children:e.jsx(L,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(K,{hidden:t,onCloseAutoFocus:m=>{i.current&&(i.current.focus(),i.current=null,m.preventDefault())},align:"end",sideOffset:7,children:e.jsx(ae,{onSelect:x,onOpenChange:p,triggerChildren:"Remove Member",icon:e.jsx(ue,{fill:"red"}),children:e.jsx(pe,{name:s,userId:a})})})]})}function ge({isAdmin:a}){return[{id:"name",accessorFn:s=>{var t;return{name:s.name,is_admin:!!((t=s.body)!=null&&t.is_admin)}},cell:({getValue:s})=>{const{name:t,is_admin:r}=s();return e.jsxs("div",{className:"flex",children:[e.jsx(Q,{username:t}),r&&e.jsx("div",{children:e.jsx(j,{className:"ml-2 capitalize",size:"xs",color:"purple",children:"Admin"})})]})},header:"User"},{accessorKey:"status",header:"Status",accessorFn:s=>{var t;return{status:(t=s.body)==null?void 0:t.active}},cell:({getValue:s})=>{const{status:t}=s();return e.jsx(j,{className:"capitalize",color:t?"green":"grey",children:t?"Active":"Inactive"})}},{id:"created",header:"Created",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(te,{dateString:s()})})},...a?[{id:"actions",header:"",accessorFn:s=>({id:s.id,name:s.name}),meta:{width:"5%"},cell:({getValue:s})=>{const{id:t,name:r}=s();return e.jsx(fe,{name:r,userId:t})}}]:[]]}const g=1,je=u.object({page:u.coerce.number().min(g).optional().default(g).catch(g),name:u.string().optional(),operator:u.enum(["and","or"]).optional()});function Ce(){const[a]=re(),{page:s,name:t,operator:r}=je.parse({page:a.get("page")||void 0,name:a.get("name")||void 0,operator:a.get("operator")||void 0});return{page:s,name:t,logical_operator:r}}function be(){var l,i;const a=Ce(),{data:s,isError:t}=J({params:{...a,sort_by:"desc:created"}},{throwOnError:!0}),{data:r,isPending:n,isError:c}=$();return t||c?null:n?e.jsx(f,{className:"h-[350px]"}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(Y,{searchParams:a}),((l=r.body)==null?void 0:l.is_admin)&&e.jsx(ce,{})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:s?e.jsx(W,{columns:ge({isAdmin:(i=r.body)==null?void 0:i.is_admin}),data:s.items}):e.jsx(f,{className:"h-[250px] w-full"})}),s?s.total_pages>1&&e.jsx(ne,{searchParams:a,paginate:s}):e.jsx(f,{className:"h-[36px] w-[300px]"})]})]})}function ke(){return e.jsxs(X,{className:"flex flex-col gap-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Members"}),e.jsx(be,{})]})}export{ke as default};
@@ -1 +0,0 @@
1
- import{r as f,j as e}from"./@radix-Cdvw4jJ8.js";import{u as y,W as X,L as $}from"./LeftSideMenu-DPsCCK3z.js";import{u,R as ee,a as te,E as se,D as F,G as re,A as ae,C as O,b as oe,N as ne}from"./Partials-CfHD6OH5.js";import{g as V,b as Y,bf as ie,B as ce,r as T}from"./index-BgEfQ3_G.js";import{f as de,c as le}from"./@react-router-DeDfXbUF.js";import{S as me,C as ue}from"./StackName-CFSZL8ec.js";import{I as G}from"./Infobox-CSBRrM6r.js";import{t as H}from"./zod-XdS2h1ws.js";import{u as Q,F as pe}from"./index.esm-DhJo3mA6.js";import{b as xe,c as q,d as fe,p as he}from"./persist-BsdEtCkd.js";import{C as h}from"./ProviderIcon-DHejyg7C.js";import{s as J}from"./index-BBt0LDtR.js";import{b as K}from"./@tanstack-5gTMR7G2.js";import{C as v,P as N}from"./ProviderRadio-tGtie8Gc.js";import"./Tick-Qquvr4P3.js";import"./check-B9QMTa3f.js";import"./package-miExReQl.js";import"./ComponentBadge-Cnecw3qz.js";import"./ComponentIcon-CMiVW-O6.js";import"./layout-DBbfEFBe.js";import"./transform-CeZdrxDZ.js";import"./logs-CQKlJjo0.js";import"./CodeSnippet-Ctplhzdc.js";import"./NumberBox-DtCv7jh3.js";import"./@reactflow-B_iCtR7X.js";import"./info-QkbQz4QU.js";import"./sharedSchema-C_HkejsG.js";import"./index.es-C1gfATPn.js";import"./gcp-B1I3Qvcx.js";import"./stack-detail-query-CNmVZ0Bo.js";function je(){const{formRef:t,setIsNextButtonDisabled:s,setData:a,data:o}=u(),n=Q({resolver:H(xe),mode:"onChange",defaultValues:{region:o.location,stackName:o.stackName||""}});f.useEffect(()=>{s(!n.formState.isValid)},[n.formState.isValid,s]);function l(r){a(m=>({...m,location:r.region,stackName:r.stackName}))}return e.jsx(j,{title:"Review Stack Configuration",children:e.jsx(pe,{...n,children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs(G,{className:"text-text-sm",children:[e.jsx("p",{className:"font-semibold",children:"Important"}),e.jsx("p",{children:"This will create new resources in your account. Ensure you have the necessary permissions and are aware of any potential costs."})]}),e.jsxs("form",{onSubmit:n.handleSubmit(l),ref:t,className:"space-y-5",children:[e.jsx(ee,{provider:o.provider||"aws"}),e.jsx(me,{})]}),e.jsx(te,{provider:o.provider||"aws"}),e.jsx(se,{provider:o.provider||"aws"})]})})})}function ve(){const{data:t,timestamp:s,setIsNextButtonDisabled:a}=u(),{setCurrentStep:o}=y(),{isPending:n,isError:l,data:r}=K({...J.stackDeploymentStack({provider:t.provider,stack_name:t.stackName,date_start:s}),refetchInterval:5e3,throwOnError:!0});return f.useEffect(()=>{r&&(q(),o(m=>m+1),a(!1))},[r]),n?e.jsx(V,{className:"h-[200px] w-full"}):l?null:e.jsxs("div",{className:"space-y-5",children:[e.jsx(Ne,{}),e.jsx(ye,{stack:r})]})}function Ne(){const{data:t}=u();return e.jsxs("section",{className:"space-y-5 border-b border-theme-border-moderate pb-5",children:[e.jsxs(Y,{className:"flex items-center justify-between gap-4 px-6 py-5",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(h,{provider:t.provider,className:"h-6 w-6 shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Deploying the Stack..."}),e.jsx("p",{className:"text-theme-text-secondary",children:"Follow the steps in your Cloud console to finish the setup. You can come back to check once your components are deployed."})]})]}),t.provider==="azure"?e.jsx(F,{children:e.jsx("span",{children:"Deploy in Azure"})}):e.jsx(F,{})]}),t.provider==="gcp"&&e.jsx(re,{}),t.provider==="azure"&&e.jsx(ae,{})]})}function ye({stack:t}){const s=!!t;return e.jsxs("div",{className:"space-y-5",children:[!s&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(ie,{className:"h-5 w-5 fill-primary-400"}),"Creating your stack and components..."]}),e.jsx("p",{className:"text-theme-text-secondary",children:"We are creating your stack and stack components based on your configuration. Once you finish the setup, come back to check your brand new stack and components ready."})]}),e.jsx(ke,{isReady:s}),e.jsx(ge,{stack:t})]})}function ge({stack:t}){const s=!!t,{data:a}=u();return e.jsxs("div",{className:"relative overflow-hidden rounded-md",children:[!s&&e.jsx("div",{className:"absolute z-50 h-full w-full bg-neutral-50/50"}),e.jsx(O,{type:a.provider,componentProps:{isLoading:!s,isSuccess:s,stackName:a.stackName}})]})}function ke({isReady:t}){const[s,a]=f.useState(!1);return f.useEffect(()=>{const o=setTimeout(()=>{a(!0)},3e5);return()=>clearTimeout(o)},[]),!s||t?null:e.jsx(G,{children:"Your stack is taking longer than usual to deploy. Please check your Cloud console, or the stacks list in ZenML."})}function Se(){return e.jsx(j,{title:"Deploy ZenML Stack",children:e.jsx(be,{})})}function be(){const{setIsNextButtonDisabled:t,isLoading:s}=u();return f.useEffect(()=>{t(!0)},[]),s?e.jsx(ve,{}):e.jsx(oe,{})}function we(){const{formRef:t,setIsNextButtonDisabled:s,setData:a,data:o}=u(),{register:n,handleSubmit:l,formState:{isValid:r}}=Q({resolver:H(fe),defaultValues:{provider:o.provider}});f.useEffect(()=>{s(!r)},[r,s]);function m(d){a(c=>({...c,provider:d.provider}))}return e.jsx(j,{title:"New Cloud Infrastructure",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where your want to create your infrastructure and deploy your ZenML models. You will be able to remove the ZenML stack at any time."})]}),e.jsxs("form",{id:"provider-form",onSubmit:l(m),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",ref:t,children:[e.jsx(v,{id:"aws-provider",...n("provider"),value:"aws",children:e.jsx(N,{icon:e.jsx(h,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"ZenML stack with S3, ECR, and SageMaker integration"})}),e.jsx(v,{id:"gcp-provider",...n("provider"),value:"gcp",children:e.jsx(N,{icon:e.jsx(h,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Create ZenML infrastructure using GCS, Artifact Registry, and Vertex AI"})}),e.jsx(v,{id:"azure-provider",...n("provider"),value:"azure",children:e.jsx(N,{icon:e.jsx(h,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Set up ZenML with Azure Storage, Container Registry, and ML services"})})]})]})})}function Ce({provider:t,stackName:s,timestamp:a,isTerraform:o}){var g,k,S,b,w,C,P,D,I,z,L,R,B,E,W,M,_,A;const{isPending:n,isError:l,data:r}=K({...J.stackDeploymentStack({provider:t,stack_name:s,date_start:a,terraform:o}),throwOnError:!0});if(n)return e.jsx(V,{className:"h-[200px] w-full"});if(l)return null;const m=r.stack.name,d=(g=r.stack.metadata)==null?void 0:g.components.orchestrator,c=(k=r.stack.metadata)==null?void 0:k.components.artifact_store,i=(S=r.stack.metadata)==null?void 0:S.components.container_registry,p=(b=r.stack.metadata)==null?void 0:b.components.image_builder,x=(w=r.stack.metadata)==null?void 0:w.components.step_operator,U={orchestrator:{name:((C=d==null?void 0:d[0])==null?void 0:C.name)??"Orchestrator",id:((P=d==null?void 0:d[0])==null?void 0:P.id.split("-")[0])??""},artifactStore:{name:((D=c==null?void 0:c[0])==null?void 0:D.name)??"Artifact Store",id:((I=c==null?void 0:c[0])==null?void 0:I.id.split("-")[0])??""},registry:{name:((z=i==null?void 0:i[0])==null?void 0:z.name)??"Container Registry",id:((L=i==null?void 0:i[0])==null?void 0:L.id.split("-")[0])??""},connector:{name:(R=r.service_connector)==null?void 0:R.name,id:((E=(B=r.service_connector)==null?void 0:B.id)==null?void 0:E.split("-")[0])??""},imageBuilder:{name:((W=p==null?void 0:p[0])==null?void 0:W.name)??"Image Builder",id:((M=p==null?void 0:p[0])==null?void 0:M.id.split("-")[0])??""},operator:{name:((_=x==null?void 0:x[0])==null?void 0:_.name)??"Step Operator",id:((A=x==null?void 0:x[0])==null?void 0:A.id.split("-")[0])??""}};return e.jsx(O,{type:t,componentProps:{components:U,isSuccess:!0,stackName:m}})}function Pe(){const{setIsNextButtonDisabled:t,data:s,timestamp:a}=u();return t(!1),e.jsx(j,{title:"Your Stack",children:e.jsxs("div",{className:"space-y-5",children:[e.jsx("p",{className:"text-theme-text-secondary",children:"Here you can review the created stack and stack components. Now you can start running pipelines using this new configuration."}),e.jsx(Ce,{provider:s.provider||"aws",stackName:s.stackName||"",timestamp:a})]})})}function De(){const{currentStep:t}=y();if(t===1)return e.jsx(we,{});if(t===2)return e.jsx(je,{});if(t===3)return e.jsx(Se,{});if(t===4)return e.jsx(Pe,{})}function Ie(){var c;const[s]=de(),{setCurrentStep:a,currentStep:o}=y(),{formRef:n,isNextButtonDisabled:l}=u(),r=le(),m=s.get("origin")==="onboarding";async function d(){n.current&&(n.current.requestSubmit(),await new Promise(i=>setTimeout(i,20))),a(i=>i<4?i+1:i),o===4&&(q(),r(m?T.onboarding:T.stacks.overview))}return e.jsx(ce,{form:(c=n.current)==null?void 0:c.id,disabled:l,onClick:()=>d(),size:"md",children:o===4?"Finish":"Next"})}function j({children:t,title:s}){return e.jsxs(Y,{className:"w-full",children:[e.jsx("div",{className:"border-b border-theme-border-moderate px-5 py-3 text-display-xs font-semibold",children:s}),e.jsx("div",{className:"p-5",children:t}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-theme-border-moderate p-5",children:[e.jsx(ue,{}),e.jsx(Ie,{})]})]})}const Z=["Infrastructure Type","Cloud Provider","Review Configuration","Deploy Stack"];function nt(){const{success:t}=he();return e.jsx(X,{maxSteps:Z.length,initialStep:t?3:1,children:e.jsx(ne,{children:e.jsxs("section",{className:"layout-container flex flex-col gap-5 p-5 xl:flex-row",children:[e.jsx($,{entries:Z}),e.jsx("div",{className:"w-full overflow-y-hidden",children:e.jsx(De,{})})]})})})}export{nt as default};
@@ -1 +0,0 @@
1
- import{r as x,j as e}from"./@radix-Cdvw4jJ8.js";import{s as j,A as E,d as ae,u as re,b as C,a as B}from"./service-k-9Vsb30.js";import{h as A,c as N,b as S}from"./@tanstack-5gTMR7G2.js";import{as as q,at as ie,B as f,au as _,av as z,aw as $,a as K,I as D,az as V,aA as H,aB as k,f as T,i as F,F as R,j as P,A as Q,k as oe,n as G,z as v,ay as L,T as ce,q as le,s as de,t as ue,g as b,D as me,l as xe,m as he,p as pe,an as fe,aC as ye,b3 as je,aD as ge,b4 as be,aF as Ae,C as I,b as U,x as ve,y as De,b8 as we,r as Ce,a3 as Ne}from"./index-BgEfQ3_G.js";import{P as Se}from"./Pagination-CWnEpSpN.js";import{S as Ke}from"./SearchField-BtUi6cYl.js";import{t as Y}from"./zod-XdS2h1ws.js";import{u as J,C as w}from"./index.esm-DhJo3mA6.js";import{S as Z}from"./trash-DP6Tpp_E.js";import{c as ke,u as Te}from"./bulk-delete-CzYA--cC.js";import{D as W,a as X}from"./DeleteAlertDialog-DEI0YDzP.js";import{S as ee}from"./key-icon-C07HKw8z.js";import{D as M}from"./DisplayDate-8RESqe5H.js";import{i as Fe,a as Re}from"./dates-Buh6SMo7.js";import{S as Pe}from"./refresh-BcTM09NW.js";import{A as Oe}from"./AlertDialogDropdownItem-DsOmO1FH.js";import{S as Ie}from"./info-QkbQz4QU.js";import{I as Me}from"./Infobox-CSBRrM6r.js";import{a as O}from"./@react-router-DeDfXbUF.js";import"./CodeSnippet-Ctplhzdc.js";import"./Tick-Qquvr4P3.js";import"./check-B9QMTa3f.js";import"./@reactflow-B_iCtR7X.js";import"./chevron-right-double-Dgp_gEsp.js";import"./index-DWpiv-Ft.js";function te({serviceAccountId:t,isFallback:s}){const n=A(),[i,a]=x.useState(!1),[r,o]=x.useState(""),u=!!r;function m(){return u?e.jsx(E,{value:r}):e.jsx(Ee,{isFallback:s,serviceAccountId:t,setApikeyValue:o})}return e.jsx(e.Fragment,{children:e.jsxs(q,{open:i,onOpenChange:l=>{s&&!l&&n.invalidateQueries({queryKey:j.apiKeysKey(t)}),a(l),o("")},children:[e.jsx(ie,{asChild:!0,children:e.jsx(f,{className:"shrink-0",intent:"primary",size:"sm",children:"Generate API Key"})}),e.jsxs(_,{"data-success":u,className:"mx-auto overflow-x-auto transition-none data-[success=true]:max-w-[800px]",children:[e.jsx(z,{children:e.jsx($,{children:u?"API Key Created Successfully":"Generate API Key"})}),m()]})]})})}function Ee({serviceAccountId:t,setApikeyValue:s,isFallback:n}){const{toast:i}=K(),a=A(),{handleSubmit:r,control:o,formState:{isValid:u},reset:m}=J({resolver:Y(ae),defaultValues:{name:"",description:""}}),{mutate:l}=re({onError(c){k(c)&&i({status:"error",emphasis:"subtle",description:c.message,rounded:!0})},onSuccess(c){var y;n||a.invalidateQueries({queryKey:j.apiKeysKey(t)}),s(((y=c.body)==null?void 0:y.key)||""),m()}});function d(c){l({serviceAccountId:t,body:{name:c.name,description:c.description}})}return e.jsxs(e.Fragment,{children:[e.jsxs("form",{id:"create-secret-form",className:"space-y-5 p-7",onSubmit:r(d),children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Name:"}),e.jsx(w,{name:"name",control:o,render:({field:c})=>e.jsx(D,{...c,className:"w-full",required:!0,placeholder:"Add name"})})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Description:"}),e.jsx(w,{name:"description",control:o,render:({field:c})=>e.jsx(D,{...c,className:"w-full",placeholder:"Add description"})})]})]}),e.jsxs(V,{className:"gap-[10px]",children:[e.jsx(H,{asChild:!0,children:e.jsx(f,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(f,{intent:"primary",disabled:!u,type:"submit",form:"create-secret-form",children:"Generate Key"})]})]})}async function Be(t,s){const n=F(P.serviceAccounts.apiKeys.detail(t,s)),i=await T(n,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!i.ok){const a=await i.json().then(r=>Array.isArray(r.detail)?r.detail[1]:r.detail).catch(()=>`Failed to delete api key ${s}`);throw new R({status:i.status,statusText:i.statusText,message:a})}return i.json()}function qe(t){return N({...t,mutationFn:async({serviceAccountId:s,apiKeyId:n})=>{await Be(s,n)}})}const{ContextProvider:_e,useContext:g}=ke();function se(t){const{setRowSelection:s}=g(),{mutateAsync:n}=qe();async function i(a){await n({serviceAccountId:t,apiKeyId:a})}return Te({deleteFn:i,queryKeyToInvalidate:j.serviceAccountsKey(),setRowSelection:s})}function ze({serviceAccountId:t}){const[s,n]=x.useState(!1),{bulkDelete:i}=se(t),{selectedRowIDs:a,selectedRowCount:r}=g();async function o(){await i(a),n(!1)}return e.jsxs(Q,{open:s,onOpenChange:n,children:[e.jsx(oe,{asChild:!0,children:e.jsxs(f,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(Z,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(W,{title:`Delete Api Key${r>=2?"s":""}`,handleDelete:o,children:e.jsxs(X,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function $e({serviceAccountId:t}){const{selectedRowCount:s}=g();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${s} Api Key${s>1?"s":""} selected`}),e.jsx(ze,{serviceAccountId:t})]})}async function Ve({apiKeyId:t,body:s,serviceAccountId:n}){const i=F(P.serviceAccounts.apiKeys.rotate(n,t)),a=await T(i,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(a.status===404&&G(),!a.ok){const r=await a.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>`Failed to rotate key ${t}`);throw new R({status:a.status,statusText:a.statusText,message:r})}return a.json()}function He(t){return N({...t,mutationFn:async({serviceAccountId:s,apiKeyId:n,body:i})=>Ve({serviceAccountId:s,apiKeyId:n,body:i})})}const Qe=v.object({enableRetention:v.boolean(),rotateMinutes:v.coerce.number().int().min(1).optional()}).refine(t=>!(t.enableRetention&&!t.rotateMinutes));function Ge({serviceAccountId:t,apiKeyId:s,open:n,setOpen:i}){const[a,r]=x.useState(""),o=!!a;function u(){return o?e.jsx(E,{value:a}):e.jsx(Le,{setApiKeyValue:r,apiKeyId:s,serviceAccountId:t})}return e.jsx(q,{open:n,onOpenChange:m=>{i(m),r("")},children:e.jsxs(_,{className:"mx-auto max-w-[800px] overflow-x-auto",children:[e.jsx(z,{children:e.jsx($,{children:"Rotate API Key"})}),u()]})})}function Le({apiKeyId:t,serviceAccountId:s,setApiKeyValue:n}){const{toast:i}=K(),a=A(),{control:r,watch:o,register:u,handleSubmit:m,formState:{errors:l,isValid:d}}=J({resolver:Y(Qe),defaultValues:{enableRetention:!1,rotateMinutes:void 0}});function c(p){const h={retain_period_minutes:p.rotateMinutes};y({serviceAccountId:s,apiKeyId:t,body:h})}const{mutate:y}=He({onError(p){k(p)&&i({status:"error",emphasis:"subtle",description:p.message,rounded:!0})},onSuccess(p){var h;i({description:"The API key has been rotated successfully.",status:"success",emphasis:"subtle",rounded:!0}),n(((h=p.body)==null?void 0:h.key)||""),a.invalidateQueries({queryKey:[...j.apiKeysKey(s)]})}});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-5 p-7",children:[e.jsx(Ue,{apiKeyId:t,serviceAccountId:s}),e.jsx(Ye,{}),e.jsxs("form",{onSubmit:m(c),id:"retention-form",children:[e.jsxs("div",{className:"flex items-center gap-1 rounded-t-md border bg-theme-surface-secondary p-1",children:[e.jsx(w,{control:r,name:"enableRetention",render:({field:{onChange:p,value:h}})=>e.jsx(L,{className:"data-[state=unchecked]:bg-neutral-200",checked:h,id:"enable-retention",onCheckedChange:ne=>p(!!ne)})}),"Include Retention Period",e.jsx(ce,{children:e.jsxs(le,{children:[e.jsx(de,{asChild:!0,children:e.jsxs("button",{type:"button",children:[e.jsx(Ie,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"}),e.jsx("div",{className:"sr-only",children:"Info tooltip"})]})}),e.jsx(ue,{className:"z-50 flex max-w-[480px] bg-black",children:e.jsx("p",{className:"text-text-xs text-white",children:"To minimize disruption, you can set a retention period for your current key. Enter the duration(in minutes) you'd like the old key to remain active alongside the new one."})})]})})]}),e.jsxs("fieldset",{disabled:!o("enableRetention"),className:"space-y-5 rounded-b-md border-x border-b p-5 text-text-md text-theme-text-primary",children:[e.jsx("p",{className:"text-text-md text-theme-text-primary",children:"Keep the current key working for the next"}),e.jsxs("div",{children:[e.jsx("label",{className:"text-text-sm text-theme-text-primary",htmlFor:"retention-minutes",children:"Minutes"}),e.jsx(D,{id:"retention-minutes",...u("rotateMinutes"),disabled:!o("enableRetention"),placeholder:"0"}),l.rotateMinutes&&e.jsx("p",{className:"text-text-sm text-theme-text-error",children:l.rotateMinutes.message})]})]})]})]}),e.jsxs(V,{className:"gap-[10px]",children:[e.jsx(H,{asChild:!0,children:e.jsx(f,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(f,{intent:"primary",disabled:!d,size:"sm",form:"retention-form",children:"Rotate Key"})]})]})}function Ue({apiKeyId:t,serviceAccountId:s}){var r;const{data:n,isPending:i,isError:a}=S({...C.ApiKeysDetail(s,t),throwOnError:!0});return i?e.jsx(b,{className:"h-8 w-full"}):a?null:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(ee,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{children:n&&n.name}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:n&&((r=n.metadata)==null?void 0:r.description)})]})]})}function Ye(){return e.jsxs(Me,{children:[e.jsx("strong",{children:"Your current API Key will be deactivated."})," This means any processes or integrations using the old key will no longer function once the new key is generated."]})}function Je({serviceAccountId:t,apiKeyId:s}){const[n,i]=x.useState(!1),[a,r]=x.useState(!1),[o,u]=x.useState(!1),m=x.useRef(null),l=x.useRef(null),{bulkDelete:d}=se(t);function c(){l.current=m.current}function y(h){u(h),h||i(!1)}async function p(){await d([s]),y(!1)}return e.jsxs(e.Fragment,{children:[e.jsx(Ge,{setOpen:r,open:a,serviceAccountId:t,apiKeyId:s}),e.jsxs(me,{onOpenChange:i,open:n,children:[e.jsx(xe,{ref:m,children:e.jsx(he,{className:"h-5 w-5 fill-theme-text-secondary"})}),e.jsxs(pe,{hidden:o,onCloseAutoFocus:h=>{l.current&&(l.current.focus(),l.current=null,h.preventDefault())},align:"end",sideOffset:7,children:[e.jsx(fe,{className:"px-3",onClick:()=>r(!0),icon:e.jsx(Pe,{}),children:e.jsx("span",{children:"Rotate"})}),e.jsx(Oe,{onSelect:c,open:o,onOpenChange:y,triggerChildren:"Delete",icon:e.jsx(Z,{fill:"red"}),children:e.jsx(W,{title:"Delete API Key",handleDelete:p,children:e.jsxs(X,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})]})]})]})}async function Ze({apiKeyId:t,body:s,serviceAccountId:n}){const i=F(P.serviceAccounts.apiKeys.detail(n,t)),a=await T(i,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(a.status===404&&G(),!a.ok){const r=await a.json().then(o=>Array.isArray(o.detail)?o.detail[0]:o.detail||"An error occurred").catch(()=>`Failed to update key ${t}`);throw new R({status:a.status,statusText:a.statusText,message:r})}return a.json()}function We(t){return N({...t,mutationFn:async({serviceAccountId:s,apiKeyId:n,body:i})=>{await Ze({serviceAccountId:s,apiKeyId:n,body:i})}})}function Xe({isActive:t,serviceAccountId:s,apiKeyId:n}){const{toast:i}=K(),a=A(),[r,o]=x.useState(!1),{mutate:u}=We({onError(d){k(d)&&i({status:"error",emphasis:"subtle",description:d.message,rounded:!0})},onSuccess(){a.invalidateQueries({queryKey:j.apiKeysKey(s)})}});function m(d){d?l(d):o(!0)}async function l(d){u({serviceAccountId:s,apiKeyId:n,body:{active:d}})}return e.jsxs(e.Fragment,{children:[e.jsx(Q,{open:r,onOpenChange:o,children:e.jsxs(ye,{children:[e.jsx(je,{children:e.jsx(ge,{children:"Deactivate API Key"})}),e.jsxs("div",{className:"p-5 text-text-md text-theme-text-secondary",children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"You won't be able to use this API Key to authenticate with the server anymore."})]}),e.jsxs(be,{className:"gap-[10px]",children:[e.jsx(Ae,{asChild:!0,children:e.jsx(f,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(f,{onClick:()=>l(!1).then(d=>o(!1)),intent:"primary",type:"button",children:"Deactivate"})]})]})}),e.jsx(L,{checked:t,onCheckedChange:m})]})}function et(){return[{id:"select",meta:{width:"1%"},header:({table:t})=>e.jsx(I,{id:"check-all",checked:t.getIsAllRowsSelected(),onCheckedChange:s=>t.toggleAllRowsSelected(s==="indeterminate"?!0:s)}),cell:({row:t})=>e.jsx(I,{id:`check-${t.id}`,checked:t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})},{id:"name",header:"Name",accessorFn:t=>({name:t.name}),cell:({row:t})=>{var s;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(ee,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsx("div",{className:"flex flex-row items-center space-x-1",children:e.jsx("div",{className:"flex items-center space-x-1 text-text-md font-semibold text-theme-text-primary",children:t.original.name})}),e.jsx("div",{className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",children:(s=t.original.metadata)==null?void 0:s.description})]})]})}},{id:"last-login",header:"Last Login",accessorFn:t=>{var s;return(s=t.metadata)==null?void 0:s.last_login},cell:({row:t})=>{var s,n;return(s=t.original.metadata)!=null&&s.last_login?e.jsx("p",{children:e.jsx(M,{short:!0,dateString:(n=t.original.metadata)==null?void 0:n.last_login})}):e.jsx("p",{children:"Never"})}},{id:"last-rotated",header:"Last Rotated",accessorFn:t=>{var s;return(s=t.metadata)==null?void 0:s.last_rotated},cell:({row:t})=>{var r;const s=(r=t.original.metadata)==null?void 0:r.last_rotated;if(!s)return e.jsx("p",{children:"Never"});const n=new Date(`${s}Z`),i=Fe(n),a=Re(n);return e.jsxs("div",{children:[e.jsx("p",{children:e.jsx(M,{short:!0,dateString:s})}),(i||a)&&e.jsx("p",{className:`${a?"text-theme-text-error":"text-theme-text-warning"} text-text-xs`,children:a?"More than 1 year old":"More than 6 months old"})]})}},{id:"active",header:"Active",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.active},cell:({row:t})=>{var s,n;return e.jsx(Xe,{isActive:!!((s=t.original.body)!=null&&s.active),serviceAccountId:((n=t.original.body)==null?void 0:n.service_account.id)||"",apiKeyId:t.original.id})}},{id:"actions",header:"",meta:{width:"5%"},cell:({row:t})=>{var n;const s=(n=t.original.body)==null?void 0:n.service_account.id;return s?e.jsx("div",{className:"flex items-center justify-end",children:e.jsx(Je,{serviceAccountId:s,apiKeyId:t.original.id})}):null}}]}function tt(){const{serviceAccountId:t}=O();return e.jsxs(U,{className:"flex flex-col items-center justify-center space-y-4 p-9",children:[e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold text-theme-text-primary",children:"This service account doesn't have any API Keys yet"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Generate your first API Key to enable secure interactions with the ZenML Server."})]}),e.jsx(te,{isFallback:!0,serviceAccountId:t})]})}function st(){const{serviceAccountId:t}=O(),s=B(),{rowSelection:n,setRowSelection:i}=g(),a=x.useMemo(()=>et(),[]),{data:r}=S({...C.serviceAccountApiKeys(t,{...s,sort_by:"desc:created",hydrate:!0})});return r&&(r==null?void 0:r.items.length)<1&&!s.name?e.jsx(tt,{}):e.jsxs(e.Fragment,{children:[e.jsx(nt,{serviceAccountId:t}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:r?e.jsx(ve,{getRowId:o=>o.id,rowSelection:n,onRowSelectionChange:i,columns:a,data:r.items}):e.jsx(b,{className:"h-[500px] w-full"})}),r?r.total_pages>1&&e.jsx(Se,{searchParams:s,paginate:r}):e.jsx(b,{className:"h-[36px] w-[300px]"})]})]})}function nt({serviceAccountId:t}){const s=B(),{selectedRowCount:n}=g();return e.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[n?e.jsx($e,{serviceAccountId:t}):e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(Ke,{searchParams:s})}),e.jsx(te,{isFallback:!1,serviceAccountId:t})]})}function at(t){const{setBreadcrumbs:s}=De();x.useEffect(()=>{t&&s([...we,{label:t.name,href:Ce.settings.service_accounts.detail(t.id)}])},[s,t])}function Ft(){return e.jsxs(U,{className:"space-y-5 p-5",children:[e.jsxs("div",{children:[e.jsx(rt,{}),e.jsx("h1",{className:"my-5 text-text-lg font-semibold",children:"API Keys"})]}),e.jsx(_e,{children:e.jsx(st,{})})]})}function rt(){var i,a,r;const{serviceAccountId:t}=O(),s=S({...C.serviceAccountDetail(t),throwOnError:!0});if(at(s.data),s.isPending)return e.jsx(b,{className:"h-9 w-full"});if(s.isError)return null;const n=s.data;return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-text-xl font-semibold",children:n.name}),e.jsx(Ne,{size:"sm",color:(i=n.body)!=null&&i.active?"light-purple":"light-grey",className:"text-text-xs font-semibold uppercase",children:(a=n.body)!=null&&a.active?"active":"inactive"})]}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:(r=n.metadata)==null?void 0:r.description})]})}export{rt as APIKeyHeader,Ft as default};
@@ -1 +0,0 @@
1
- import{r as p,j as e}from"./@radix-Cdvw4jJ8.js";import{u as d,S as h,a as j,b as y}from"./form-schemas-dyDkAxXP.js";import{E as w}from"./EmptyState-CjrgDtVk.js";import{A,I as U,P as b,U as P,S as g}from"./UsageReason-DhiUV1bu.js";import{f as _}from"./@react-router-DeDfXbUF.js";import{f as F,i as C,F as E,j as N,u as k,a as H,S as I}from"./index-BgEfQ3_G.js";import{c as M}from"./@tanstack-5gTMR7G2.js";import{u as D}from"./login-mutation-C1hvP_cX.js";import{S as R}from"./SetPassword-BmbgL_ed.js";import"./check-circle-C4tYvbtw.js";import"./UpdatePasswordSchemas-D_DCETSO.js";import"./zod-XdS2h1ws.js";import"./index.esm-DhJo3mA6.js";import"./gcp-B1I3Qvcx.js";import"./@reactflow-B_iCtR7X.js";import"./PasswordChecker-B88WjuCe.js";const S=p.createContext(null);function T({children:t,initialUser:r}){const[a,s]=p.useState(r||{});return e.jsx(S.Provider,{value:{newUser:a,setNewUser:s},children:t})}function l(){const t=p.useContext(S);if(t===null)throw new Error("useActivationContext must be used within an ActivationProvider");return t}function L(){const{setSurveyStep:t}=d(),{setNewUser:r,newUser:a}=l();function s({fullName:n,getUpdates:o,email:u}){r(c=>({...c,...u?{email:u}:{email:null},full_name:n,email_opted_in:o})),t(c=>c+1)}return e.jsx(A,{email:a.email,fullName:a.full_name,submitHandler:s})}async function z({userId:t,body:r}){const a=C(N.users.activate(t)),s=await F(a,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Failed to update activate user");throw new E({status:s.status,statusText:s.statusText,message:n})}return s.json()}function J(t){return M({mutationFn:async r=>z(r),...t})}function O({userId:t,setUsername:r}){const{newUser:a}=l(),{setAuthState:s}=k(),{setSurveyStep:n}=d(),{mutate:o}=D({onSuccess:()=>{s("true"),n(i=>i+1)}}),{toast:u}=H(),{mutate:c}=J({onSuccess:async i=>{r(i.name),o({username:i.name,password:a.password??void 0})},onError:i=>{i instanceof Error&&u({status:"error",emphasis:"subtle",icon:e.jsx(I,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:i.message,rounded:!0})}});function m({other:i,providers:f,otherVal:x}){const v={infra_providers:i?[...f,x]:f,finished_onboarding_survey:!0};c({userId:t,body:{...a,user_metadata:{...a.user_metadata,...v}}})}return e.jsx(U,{submitHandler:m})}function W(){const{setSurveyStep:t}=d(),{setNewUser:r}=l();function a({newPassword:s}){r(n=>({...n,password:s})),t(n=>n+1)}return e.jsx(R,{submitHandler:a})}function Y(){const{setSurveyStep:t}=d(),{setNewUser:r}=l();function a({primaryUse:s}){const n={primary_use:s};r(o=>({...o,user_metadata:{...o.user_metadata,...n}})),t(o=>o+1)}return e.jsx(b,{submitHandler:a})}function Z(){const{setSurveyStep:t}=d(),{setNewUser:r}=l();function a({usageReason:s,comparison_tools:n,otherTool:o,otherToolVal:u}){const c={usage_reason:s,...!!n&&{comparing_tools:o&&u?[...n,u]:n}};r(m=>({...m,user_metadata:{...m.user_metadata,...c}})),t(m=>m+1)}return e.jsx(P,{submitHandler:a})}function q(){const{surveyStep:t}=d(),[r]=_(),[a,s]=p.useState(""),n=r.get("user"),o=r.get("token");return!n||!o?e.jsx(w,{children:e.jsx("p",{children:"Invalid activation link."})}):e.jsx(e.Fragment,{children:e.jsxs(T,{initialUser:{activation_token:o},children:[e.jsx(h,{stepAmount:6}),t===1&&e.jsx(L,{}),t===2&&e.jsx(W,{}),t===3&&e.jsx(Y,{}),t===4&&e.jsx(Z,{}),t===5&&e.jsx(O,{setUsername:s,userId:n}),t===6&&e.jsx(g,{}),t===7&&e.jsx(j,{subHeader:"Your created your ZenML account",username:a})]})})}function mt(){return e.jsx("div",{children:e.jsx(y,{children:e.jsx(q,{})})})}export{mt as default};
@@ -1 +0,0 @@
1
- import{j as e,r as d,aF as N,aG as H,aH as P,aI as Q}from"./@radix-Cdvw4jJ8.js";import{T as U,q as Z,s as G,t as J,av as O,aw as E,ai as u,ar as K,B as f,az as W,aA as X,as as Y,at as ee,au as te,bw as se,I as R,J as re,V as ne,L as ae,G as ie,r as B,z as x,a as oe,S as ce,h as le}from"./index-BgEfQ3_G.js";import{a as p,C as de,u as me,F as ue}from"./index.esm-DhJo3mA6.js";import{C as V}from"./ComponentIcon-CMiVW-O6.js";import{D as pe}from"./DisplayDate-8RESqe5H.js";import{j as he,k as xe,h as fe}from"./@tanstack-5gTMR7G2.js";import{d as ge}from"./index-DWpiv-Ft.js";import{s as je,R as ke,a as be,u as ve}from"./create-stack-BpZrmKDu.js";import{S as ye}from"./info-QkbQz4QU.js";import{S as Ne,s as b}from"./constants-DTfsIqHy.js";import{S as Se}from"./arrow-left-MRXv5pAH.js";import{C as we}from"./configuration-form-DSoMMiPE.js";import{S as Ce}from"./check-circle-C4tYvbtw.js";import{L as Le,c as _e}from"./@react-router-DeDfXbUF.js";import{s as Fe}from"./index-BBt0LDtR.js";import{t as Te}from"./zod-XdS2h1ws.js";import{s as ze}from"./sharedSchema-C_HkejsG.js";import"./@reactflow-B_iCtR7X.js";import"./layout-DBbfEFBe.js";import"./transform-CeZdrxDZ.js";import"./index-eoDB_1XX.js";import"./form-BgtamtJm.js";import"./plus-Cl0_rCVF.js";import"./trash-DP6Tpp_E.js";import"./type-guards-CNgPYg8l.js";import"./check-B9QMTa3f.js";import"./CodeSnippet-Ctplhzdc.js";import"./file-text-Cd8wVfq5.js";import"./terminal-square-XFL_4QN-.js";import"./stack-detail-query-CNmVZ0Bo.js";import"./index.es-C1gfATPn.js";const S={helpLink:"https://docs.zenml.io/stack-components/orchestrators",description:"An orchestrator is a special kind of backend that manages the running of each step of the pipeline. Orchestrators administer the actual pipeline runs. By default, ZenML initializes your repository with an orchestrator that runs everything on your local machine."},w={helpLink:"https://docs.zenml.io/stack-components/artifact-stores",description:"The Artifact Store is a central component in any MLOps stack. As the name suggests, it acts as a data persistence layer where artifacts (e.g. datasets, models) ingested or generated by the machine learning pipelines are stored."},C={helpLink:"https://docs.zenml.io/stack-components/container-registries",description:"Container registry is used to store container images that are built to run machine learning pipelines in remote environments. Containerization of the pipeline code creates a portable environment that allows code to run in an isolated manner."},L={description:"Step operators allow you to run individual steps in a custom environment different from the default one used by your active orchestrator.",helpLink:"https://docs.zenml.io/stack-components/step-operators"},_={description:"Model deployers are stack components responsible for online model serving. They are responsible for deploying models to a remote server. Model deployers also act as a registry for models that are served with ZenML.",helpLink:"https://docs.zenml.io/stack-components/model-deployers"},F={description:"ZenML supports connecting to a Redis-backed Feast feature store as a stack component integration.",helpLink:"https://docs.zenml.io/stack-components/feature-stores"},T={description:"Experiment trackers let you track your ML experiments by logging the parameters and allowing you to compare between different runs.",helpLink:"https://docs.zenml.io/stack-components/experiment-trackers"},z={description:"Alerters allow you to send messages to chat services (like Slack, Discord, Mattermost, etc.) from within your pipelines. This is useful to immediately get notified when failures happen, for general monitoring/reporting, and also for building human-in-the-loop ML.",helpLink:"https://docs.zenml.io/stack-components/alerters "},M={description:"Annotators are a stack component that enables the use of data annotation as part of your ZenML stack and pipelines.",helpLink:"https://docs.zenml.io/stack-components/annotators"},I={description:"Data Validators used in ZenML pipelines usually generate data profiles and data quality check reports that are versioned and stored in the Artifact Store and can be retrieved and visualized later.",helpLink:"https://docs.zenml.io/stack-components/data-validators"},A={description:"The image builder is an essential part of most remote MLOps stacks. It is used to build container images such that your machine-learning pipelines and steps can be executed in remote environments.",helpLink:"https://docs.zenml.io/stack-components/image-builders"},D={description:"Model registries are centralized storage solutions for managing and tracking machine learning models across various stages of development and deployment.",helpLink:"https://docs.zenml.io/stack-components/model-registries"};function Me({type:t}){const{description:s,link:r}=Ie(t);return e.jsx(U,{children:e.jsxs(Z,{delayDuration:200,children:[e.jsxs(G,{children:[e.jsx(ye,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"}),e.jsxs("div",{className:"sr-only",children:["Info for ",t]})]}),e.jsxs(J,{align:"start",side:"bottom",className:"flex max-w-xl flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:s}),e.jsx("a",{className:"link mt-2 text-primary-400",target:"_blank",href:r,children:"Learn more"})]})]})})}function Ie(t){switch(t){case"orchestrator":return{description:S.description,link:S.helpLink};case"alerter":return{description:z.description,link:z.helpLink};case"annotator":return{description:M.description,link:M.helpLink};case"artifact_store":return{description:w.description,link:w.helpLink};case"container_registry":return{description:C.description,link:C.helpLink};case"data_validator":return{description:I.description,link:I.helpLink};case"experiment_tracker":return{description:T.description,link:T.helpLink};case"feature_store":return{description:F.description,link:F.helpLink};case"image_builder":return{description:A.description,link:A.helpLink};case"model_deployer":return{description:_.description,link:_.helpLink};case"model_registry":return{description:D.description,link:D.helpLink};case"step_operator":return{description:L.description,link:L.helpLink}}}function Ae({type:t,setSelectedFlavor:s}){return e.jsxs(e.Fragment,{children:[e.jsx(O,{children:e.jsxs(E,{children:["Select ",u(t)," Flavor"]})}),e.jsx(K,{viewportClassName:"max-h-[70vh]",children:e.jsx("div",{className:"p-5",children:e.jsx(Ne,{setSelectedFlavor:s,type:t})})})]})}function De({name:t,id:s,backHandler:r,type:n,successHandler:a}){const o=d.useId();return e.jsxs(e.Fragment,{children:[e.jsx(O,{className:"w-full",children:e.jsxs("div",{className:"flex w-0 flex-1 items-center gap-2",children:[e.jsxs(f,{intent:"secondary",emphasis:"subtle",className:"flex aspect-square size-6 items-center justify-center",onClick:()=>r(),children:[e.jsx(Se,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs(E,{className:"truncate",children:["Configure your ",u(t)," ",u(n)]})]})}),e.jsx(we,{useMaxHeight:!0,flavorId:s,formId:o,successHandler:a,FooterComponent:$e})]})}function $e({formId:t,isPending:s}){return e.jsx(W,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(X,{asChild:!0,children:e.jsx(f,{size:"md",intent:"secondary",children:"Cancel"})}),e.jsxs(f,{size:"md",disabled:s,type:"submit",form:t,children:[s&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Component"]})]})})}function Oe({type:t}){const[s,r]=d.useState(!1),[n,a]=d.useState(0),[o,c]=d.useState(null);async function i(l){r(l),await je(100),l||(a(0),c(null))}function g(l){var m;c({id:l.id,name:l.name,logoUrl:((m=l.body)==null?void 0:m.logo_url)??void 0}),a(j=>j+1)}function h(){a(0),c(null)}return e.jsxs(Y,{open:s,onOpenChange:l=>i(l),children:[e.jsx(ee,{asChild:!0,children:e.jsxs("button",{className:"w-full rounded-md border border-dashed border-neutral-300 bg-theme-surface-tertiary py-5 text-theme-text-secondary",children:["New ",u(t)]})}),e.jsxs(te,{className:"w-full sm:max-w-[640px] md:max-w-3xl xl:max-w-[1080px]",children:[n===0&&e.jsx(Ae,{setSelectedFlavor:g,type:t}),n===1&&!!o&&e.jsx(De,{successHandler:()=>i(!1),backHandler:h,...o,type:t})]})]})}function Ee(){return e.jsxs(e.Fragment,{children:[b.map(t=>e.jsx(N,{className:"h-full space-y-5 p-5",value:t,children:e.jsx(Ve,{type:t})},t)),e.jsx(N,{className:"h-full",value:"",children:e.jsx("div",{className:"flex h-full w-full items-center justify-center text-theme-text-tertiary",children:"Select a category to add a new component"})})]})}function Re({type:t,search:s}){const r=he({...re.componentListInfinite({sort_by:"desc:updated",type:t,...s?{name:`contains:${s}`}:{}})}),{control:n,watch:a,setValue:o}=p();return r.isError?e.jsx("p",{children:"Error while fetching Components"}):r.isPending?e.jsx("div",{className:"flex w-full flex-1 items-center justify-center",children:e.jsx(ne,{})}):e.jsxs("div",{className:"space-y-1",children:[e.jsx("ul",{className:"space-y-1",children:r.data.pages.map(c=>c.items.map(i=>e.jsx("li",{children:e.jsx(de,{name:`components.${t}.id`,control:n,render:({field:{onChange:g,...h}})=>{var l,m,j,v;return e.jsxs(ke,{className:"justify-between bg-theme-surface-primary font-medium","data-state":a(`components.${t}.id`)===i.id?"selected":"unselected",htmlFor:i.id,children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(be,{...h,id:i.id,type:"radio",value:i.id,onChange:q=>{var y;o(`components.${t}.name`,i.name),o(`components.${t}.logoUrl`,((y=i.body)==null?void 0:y.logo_url)||""),g(q)},checked:a(`components.${t}.id`)===i.id,name:t}),e.jsx("img",{alt:"flavor icon",src:ae(((l=i.body)==null?void 0:l.logo_url)||""),width:24,height:24}),e.jsxs("div",{className:"min-w-0 truncate",children:[e.jsx("div",{className:"truncate font-semibold",children:i.name}),e.jsx("div",{className:"truncate text-text-xs text-theme-text-secondary",children:i.id.split("-")[0]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-text-sm",children:[((j=(m=i.resources)==null?void 0:m.user)==null?void 0:j.name)&&e.jsx(ie,{username:i.resources.user.name}),((v=i.body)==null?void 0:v.updated)&&e.jsx("div",{className:"whitespace-nowrap text-theme-text-secondary",children:e.jsx(pe,{short:!0,dateString:i.body.updated})})]})]})}})},i.id)))}),e.jsx(Oe,{type:t}),r.hasNextPage&&e.jsx(f,{onClick:()=>r.fetchNextPage(),type:"button",size:"md",intent:"secondary",emphasis:"subtle",className:"flex w-full items-center justify-center bg-theme-surface-primary",children:e.jsxs("div",{className:"flex items-center gap-1",children:[r.isFetchingNextPage&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Load more"]})})]})}function Be({type:t}){return e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(V,{className:"h-5 w-5 fill-primary-400",type:t}),e.jsx("h2",{className:"text-text-lg font-semibold",children:u(t)}),e.jsx(Me,{type:t})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Select a existing ",se(t)," from your server:"]})]})}function Ve({type:t}){const[s,r]=d.useState(""),{watch:n,setValue:a}=p(),o=n(`components.${t}`);return d.useEffect(()=>{o&&!o.id&&a(`components.${t}`,null)},[o,a,t]),e.jsxs(e.Fragment,{children:[e.jsx(Be,{type:t}),e.jsx(qe,{search:s,setSearch:r}),e.jsx(Re,{search:s,type:t})]})}function qe({setSearch:t,search:s}){const[r,n]=d.useState(s),a=d.useCallback(ge(t,500),[]);d.useEffect(()=>()=>{a.cancel()},[a]);function o(c){n(c),a(c)}return e.jsx(R,{value:r,onChange:c=>o(c.target.value),placeholder:"Search..."})}function He({type:t}){const{watch:s,formState:{errors:r}}=p(),n=s(`components.${t}`),a=n&&n.id;return e.jsx("div",{"data-error":!a&&r.components&&r.components[t]?"true":"false","data-filled":a?"true":"false",className:"flex h-[110px] flex-col items-center justify-center space-y-2 truncate whitespace-nowrap rounded-md border border-theme-border-moderate bg-theme-surface-secondary py-5 text-center text-text-sm text-theme-text-secondary transition-all duration-150 hover:bg-theme-surface-primary hover:shadow-sm data-[error=true]:border-theme-text-error data-[filled=true]:border-success-400 data-[filled=true]:bg-theme-surface-primary data-[state=active]:bg-theme-surface-primary group-data-[state=active]/trigger:bg-theme-surface-primary group-data-[state=active]/trigger:shadow-md data-[error=false]:data-[filled=false]:group-data-[state=active]/trigger:border-theme-border-bold",children:a?e.jsx(Pe,{type:t}):e.jsx(Qe,{type:t})})}function Pe({type:t}){const{watch:s}=p(),r=s(`components.${t}`);return r&&r.id?e.jsxs("div",{className:"flex flex-col items-center gap-2 text-text-sm",children:[e.jsx("img",{width:24,height:24,src:r.logoUrl,alt:`Icon of ${r.name}`}),e.jsxs("div",{className:"space-y-0.25",children:[e.jsx("div",{className:"text-theme-text-primary",children:r.name}),e.jsx("div",{className:"text-text-xs text-theme-text-tertiary",children:u(t)})]})]}):null}function Qe({type:t}){return e.jsxs(e.Fragment,{children:[e.jsx(V,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong",type:t}),e.jsx("span",{children:u(t)})]})}function Ue(){return e.jsxs("div",{className:"flex h-full flex-col justify-between space-y-5",children:[e.jsxs("div",{className:"space-y-5 p-5",children:[e.jsx(Je,{}),e.jsx(Ze,{})]}),e.jsx(Ge,{})]})}function Ze(){const{watch:t,resetField:s}=p();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-text-lg font-semibold",children:"Add Components"}),e.jsxs("p",{className:"text-theme-text-secondary",children:["All stacks have at minimum an orchestrator and an artifact store."," ",e.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://docs.zenml.io/stack-components/component-guide",className:"link text-primary-400",children:"Learn more"})]})]}),e.jsx(H,{children:e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:b.map(r=>e.jsxs("div",{className:"relative",children:[e.jsx(P,{className:"group/trigger w-full",value:r,children:e.jsx(He,{type:r})}),t(`components.${r}.id`)&&e.jsx("button",{type:"button",onClick:n=>{n.preventDefault(),s(`components.${r}`)},className:"absolute right-[-12px] top-[-12px] flex aspect-square h-[28px] w-[28px] items-center justify-center rounded-rounded bg-theme-surface-primary",children:e.jsx(Ce,{className:"h-5 w-5 shrink-0 fill-success-400"})})]},r))})})]})}function Ge(){const{formState:{isSubmitting:t}}=p(),s=!!xe();return e.jsxs("div",{className:"flex items-center justify-end space-x-2 border-t border-theme-border-moderate p-5",children:[e.jsx(f,{asChild:!0,intent:"secondary",size:"md",children:e.jsx(Le,{to:B.stacks.create.index,children:"Cancel"})}),e.jsxs(f,{className:"flex items-center gap-1",disabled:t||s,size:"md",children:[(s||t)&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Stack"]})]})}function Je(){var r;const{register:t,formState:{errors:s}}=p();return e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-text-sm",htmlFor:"stack-name",children:"Stack Name"}),e.jsx(R,{id:"stack-name",className:`${s.stackName?"border-red-500":""} w-full`,placeholder:"zenml-stack",...t("stackName")}),s.stackName&&e.jsx("p",{className:"text-text-xs text-red-500",children:(r=s.stackName.message)==null?void 0:r.toString()})]})}const k=x.object({id:x.string().trim().min(1),name:x.string().trim().min(1),logoUrl:x.string().trim().min(1)}),Ke=b.reduce((t,s)=>(t[s]=k.nullable(),t),{}),We=x.object({stackName:ze,components:x.object({...Ke,orchestrator:k,artifact_store:k})});function Xe(){const{toast:t}=oe(),s=_e(),r=fe(),n=ve({onSuccess:async()=>{r.invalidateQueries({queryKey:Fe.all}),s(B.stacks.overview)},onError:c=>{t({status:"error",emphasis:"subtle",icon:e.jsx(ce,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:c.message,rounded:!0})}});function a(c){const i=Object.entries(c.components).reduce((h,[l,m])=>(m&&(h[l]=[m.id]),h),{}),g={name:c.stackName,components:i};n.mutate({payload:g})}const o=me({resolver:Te(We),defaultValues:{components:{alerter:null,orchestrator:{},annotator:null,artifact_store:{},container_registry:null,data_validator:null,experiment_tracker:null,feature_store:null,model_registry:null,image_builder:null,model_deployer:null,step_operator:null},stackName:""}});return{createManualStack:a,form:o}}function Tt(){const[t,s]=d.useState(""),{createManualStack:r,form:n}=Xe();return e.jsx(ue,{...n,children:e.jsx(Q,{value:t,onValueChange:s,className:"h-full",children:e.jsxs("form",{onSubmit:n.handleSubmit(r),className:"flex h-[calc(100vh_-_4rem_-_4rem_-_2px)] flex-1 flex-col divide-y divide-theme-border-moderate xl:flex-row-reverse xl:divide-x xl:divide-y-0 xl:divide-x-reverse",children:[e.jsx($,{className:"h-full flex-1 bg-theme-surface-primary",children:e.jsx(Ue,{})}),e.jsx($,{children:e.jsx(Ee,{})})]})})})}function $({className:t,...s}){return e.jsx("div",{className:le("w-full overflow-y-auto xl:w-1/2",t),...s})}export{Tt as default};
@@ -1 +0,0 @@
1
- import{r as i,j as e}from"./@radix-Cdvw4jJ8.js";import{e as d,g as c,b9 as y,an as m,D as N,l as w,B as x,m as L,p as b,r as u,ba as P,b as H,T as C,q as h,s as p,a3 as S,t as j,bb as f,bc as k,ap as M,ab as z,h as E,b0 as T}from"./index-BgEfQ3_G.js";import{h as D,b as g}from"./@tanstack-5gTMR7G2.js";import{L as v}from"./@react-router-DeDfXbUF.js";import{S as U}from"./pipeline-CSUlkd50.js";import{S as Z}from"./terminal-XFL_4QN-.js";import{u as R}from"./update-current-user-mutation-Ca-Lmwuj.js";import{S as B}from"./plus-Cl0_rCVF.js";import"./@reactflow-B_iCtR7X.js";const _=s=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.66438 2.01352C10.2092 2.10431 10.5772 2.61954 10.4864 3.16431L9.84711 6.99991H15.8195L16.5136 2.83551C16.6044 2.29074 17.1196 1.92272 17.6644 2.01352C18.2091 2.10431 18.5772 2.61954 18.4864 3.16431L17.8471 6.99991H20.5C21.0523 6.99991 21.5 7.44763 21.5 7.99991C21.5 8.5522 21.0523 8.99991 20.5 8.99991H17.5138L16.5138 14.9999H19.5C20.0523 14.9999 20.5 15.4476 20.5 15.9999C20.5 16.5522 20.0523 16.9999 19.5 16.9999H16.1804L15.4864 21.1643C15.3956 21.7091 14.8803 22.0771 14.3356 21.9863C13.7908 21.8955 13.4228 21.3803 13.5136 20.8355L14.1528 16.9999H8.18045L7.48638 21.1643C7.39558 21.7091 6.88036 22.0771 6.33559 21.9863C5.79082 21.8955 5.4228 21.3803 5.51359 20.8355L6.15286 16.9999H2.5C1.94772 16.9999 1.5 16.5522 1.5 15.9999C1.5 15.4476 1.94772 14.9999 2.5 14.9999H6.48619L7.48619 8.99991H3.5C2.94772 8.99991 2.5 8.5522 2.5 7.99991C2.5 7.44763 2.94772 6.99991 3.5 6.99991H7.81953L8.51359 2.83551C8.60439 2.29074 9.11961 1.92272 9.66438 2.01352ZM9.51378 8.99991L8.51378 14.9999H14.4862L15.4862 8.99991H9.51378Z"})),I=s=>i.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...s},i.createElement("g",{id:"settings"},i.createElement("g",{id:"Icon (Stroke)"},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79084 8 7.99998 9.79086 7.99998 12C7.99998 14.2091 9.79084 16 12 16ZM14 12C14 13.1046 13.1046 14 12 14C10.8954 14 9.99998 13.1046 9.99998 12C9.99998 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12Z"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.3426 2.32757C13.1416 0.826354 10.8583 0.826356 9.65737 2.32758L7.8196 4.62479C7.62983 4.86201 7.34251 5.0001 7.03873 5.0001H5.23605C3.0059 5.0001 1.55541 7.34703 2.55277 9.34174L3.65834 11.5529C3.7991 11.8344 3.7991 12.1658 3.65834 12.4473L2.55277 14.6585C1.55542 16.6532 3.0059 19.0001 5.23605 19.0001H7.03873C7.34251 19.0001 7.62983 19.1382 7.8196 19.3754L9.65737 21.6726C10.8584 23.1738 13.1416 23.1738 14.3426 21.6726L16.1804 19.3754C16.3701 19.1382 16.6574 19.0001 16.9612 19.0001H18.7639C20.9941 19.0001 22.4445 16.6532 21.4472 14.6585L20.3416 12.4473C20.2009 12.1658 20.2009 11.8344 20.3416 11.5529L21.4472 9.34174C22.4445 7.34703 20.9941 5.0001 18.7639 5.0001H16.9612C16.6574 5.0001 16.3701 4.86201 16.1804 4.62479L14.3426 2.32757ZM11.2191 3.57697C11.6194 3.07656 12.3805 3.07656 12.7808 3.57696L14.6186 5.87418C15.1879 6.58583 16.0499 7.0001 16.9612 7.0001H18.7639C19.5073 7.0001 19.9908 7.78241 19.6583 8.44731L18.5528 10.6585C18.1305 11.503 18.1305 12.4972 18.5528 13.3417L19.6583 15.5529C19.9908 16.2178 19.5073 17.0001 18.7639 17.0001H16.9612C16.0499 17.0001 15.1879 17.4144 14.6186 18.126L12.7809 20.4232C12.3805 20.9236 11.6194 20.9236 11.2191 20.4232L9.38134 18.126C8.81202 17.4144 7.95008 17.0001 7.03873 17.0001H5.23605C4.49267 17.0001 4.00917 16.2178 4.34162 15.5529L5.44719 13.3417C5.86949 12.4972 5.86949 11.503 5.44719 10.6585L4.34162 8.44731C4.00917 7.78241 4.49267 7.0001 5.23605 7.0001H7.03873C7.95008 7.0001 8.81202 6.58583 9.38134 5.87418L11.2191 3.57697Z"})))),Q=s=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.32406 1C8.33723 1 8.35044 1 8.36368 1L15.6768 1C16.0385 0.999969 16.3745 0.999939 16.6496 1.02491C16.9375 1.05104 17.2968 1.11316 17.6284 1.33301C18.0677 1.62422 18.3743 2.07707 18.4816 2.5931C18.5625 2.98268 18.4868 3.33932 18.4041 3.61632C18.3251 3.88107 18.2003 4.19305 18.0659 4.52883L17.0433 7.0853C17.0204 7.1427 17.0092 7.17072 17.0015 7.1913C17.0014 7.19179 17.0012 7.19225 17.001 7.1927C17.001 7.19318 17.001 7.19368 17.001 7.19419C17.0005 7.21616 17.0004 7.24632 17.0004 7.30814V9.43876C17.0004 9.55027 17.0006 9.60549 17.0022 9.64564C17.0022 9.64665 17.0023 9.64763 17.0023 9.64856C17.0029 9.64932 17.0034 9.6501 17.0041 9.65092C17.0279 9.68326 17.0622 9.7265 17.1319 9.81357L18.7295 11.8106C19.0385 12.1968 19.3122 12.5388 19.504 12.829C19.6913 13.1123 19.9193 13.5133 19.9198 13.9978C19.9205 14.6069 19.6435 15.1831 19.1675 15.5631C18.7888 15.8654 18.3333 15.9379 17.995 15.9686C17.6486 16.0001 17.2106 16 16.7159 16L13.0004 16L13.0004 22C13.0004 22.5523 12.5527 23 12.0004 23C11.4481 23 11.0004 22.5523 11.0004 22L11.0004 16L7.28496 16C6.79028 16 6.35222 16.0001 6.00585 15.9686C5.66758 15.9379 5.21203 15.8654 4.83335 15.5631C4.35733 15.1831 4.0804 14.6069 4.08106 13.9978C4.08158 13.5133 4.30954 13.1123 4.49686 12.829C4.68867 12.5388 4.96234 12.1968 5.27138 11.8105L6.86895 9.81357C6.93861 9.7265 6.97297 9.68327 6.99681 9.65092C6.99741 9.6501 6.99799 9.64932 6.99854 9.64856C6.99858 9.64762 6.99862 9.64665 6.99866 9.64564C7.00025 9.60549 7.00043 9.55027 7.00043 9.43876V7.30814C7.00043 7.24632 7.00037 7.21617 6.99987 7.1942C6.99986 7.19368 6.99985 7.19318 6.99984 7.1927C6.99967 7.19225 6.9995 7.19179 6.99932 7.1913C6.99162 7.17072 6.98047 7.1427 6.95752 7.0853L5.94964 4.56562C5.94473 4.55333 5.93982 4.54107 5.93493 4.52884C5.80058 4.19306 5.67575 3.88107 5.59675 3.61632C5.51409 3.33932 5.43834 2.98268 5.51929 2.5931C5.62652 2.07707 5.93312 1.62422 6.37241 1.33301C6.70406 1.11316 7.06333 1.05104 7.35122 1.02491C7.62638 0.999939 7.9624 0.999969 8.32406 1ZM16.6714 14C17.2242 14 17.5695 13.999 17.8141 13.9768C17.8312 13.9752 17.847 13.9736 17.8615 13.972C17.8537 13.9596 17.8451 13.9463 17.8356 13.932C17.7002 13.7271 17.4853 13.4568 17.14 13.0252L15.5702 11.063C15.5614 11.052 15.5523 11.0407 15.5431 11.0292C15.4416 10.903 15.3139 10.744 15.2194 10.5591C15.1374 10.3987 15.0775 10.2278 15.0413 10.0513C14.9995 9.84793 15 9.64398 15.0004 9.48205C15.0004 9.46725 15.0004 9.45281 15.0004 9.43876V7.30814C15.0004 7.30039 15.0004 7.29243 15.0004 7.28429C15.0003 7.19422 15.0001 7.08077 15.0134 6.96478C15.025 6.86392 15.0442 6.76409 15.071 6.66615C15.1017 6.55352 15.144 6.44823 15.1775 6.36464C15.1806 6.35709 15.1835 6.34971 15.1864 6.34252L16.1943 3.82284C16.3484 3.43753 16.4378 3.21134 16.4876 3.04443C16.4903 3.03549 16.4927 3.02712 16.4949 3.01929C16.4868 3.01843 16.4781 3.01757 16.4689 3.01672C16.2954 3.00098 16.0522 3 15.6372 3H8.36368C7.94869 3 7.70547 3.00098 7.53199 3.01672C7.52271 3.01757 7.51404 3.01843 7.50595 3.01929C7.50815 3.02712 7.51057 3.03549 7.51324 3.04443C7.56305 3.21134 7.65247 3.43753 7.8066 3.82284L8.81447 6.34252C8.81735 6.34971 8.82031 6.35709 8.82334 6.36465C8.8569 6.44823 8.89917 6.55352 8.9299 6.66615C8.95662 6.76409 8.97585 6.86392 8.98741 6.96478C9.00071 7.08077 9.00057 7.19423 9.00045 7.2843C9.00044 7.29244 9.00043 7.30039 9.00043 7.30814V9.43876C9.00043 9.45281 9.00046 9.46725 9.0005 9.48205C9.00087 9.64398 9.00133 9.84793 8.95959 10.0513C8.92337 10.2278 8.86344 10.3987 8.78146 10.5591C8.68701 10.744 8.55923 10.903 8.45778 11.0292C8.44852 11.0407 8.43947 11.052 8.43069 11.063L6.86091 13.0252C6.51558 13.4568 6.30064 13.7271 6.16521 13.932C6.15573 13.9463 6.14712 13.9596 6.13932 13.972C6.15384 13.9736 6.16964 13.9752 6.18677 13.9768C6.43132 13.999 6.77664 14 7.32943 14H16.6714Z"}));function q({projectId:s}){var l;const t=d();if(t.isPending||t.isError)return e.jsxs(e.Fragment,{children:[e.jsx(c,{className:"h-[44px] w-full"}),e.jsx("div",{"aria-hidden":"true",className:"my-1 h-[1px] bg-theme-border-moderate"})]});const a=((l=t.data.body)==null?void 0:l.default_project_id)===s,n=t.data.id;return a?e.jsx(o,{userId:n}):e.jsx(o,{projectId:s,userId:n})}function o({projectId:s}){const t=D(),{mutate:r,isPending:a}=R({onSuccess:()=>{t.invalidateQueries({queryKey:y()})}});return e.jsx(m,{onSelect:()=>{r({default_project_id:s||null})},disabled:a,className:"hover:cursor-pointer",icon:e.jsx(Q,{}),children:s?"Set as default":"Unset as default"})}function V({projectId:s}){return e.jsxs(N,{children:[e.jsx(w,{asChild:!0,children:e.jsx(x,{className:"z-20 flex aspect-square size-6 shrink-0 items-center justify-center bg-white p-0",intent:"secondary",emphasis:"bold",size:"sm",children:e.jsx(L,{className:"h-5 w-5 fill-theme-text-secondary"})})}),e.jsxs(b,{className:"z-10",align:"end",sideOffset:1,children:[e.jsx(m,{asChild:!0,icon:e.jsx(I,{}),children:e.jsx(v,{className:"hover:cursor-pointer",to:u.projects.settings.repositories.overview,children:"Project Settings"})}),e.jsx("div",{"aria-hidden":"true",className:"my-1 h-[1px] bg-theme-border-moderate"}),e.jsx(q,{projectId:s})]})]})}function F({project:s,isDefault:t=!1}){var n;const r=(n=s.body)==null?void 0:n.display_name,a=`https://public-flavor-logos.s3.eu-central-1.amazonaws.com/projects/${P(s.name)}.jpg`;return e.jsxs(H,{className:"group relative h-full overflow-hidden transition-all duration-300 hover:shadow-md",children:[e.jsxs("div",{className:"relative h-[180px] w-full",children:[e.jsx("img",{alt:s.name,src:a,className:"h-full w-full object-cover"}),e.jsx("div",{className:"absolute right-2 top-2 z-10 opacity-0 transition-all duration-300 group-hover:opacity-100",children:e.jsx(V,{projectId:s.id})})]}),e.jsxs("div",{className:"space-y-5 p-5",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"truncate text-text-xl font-semibold",children:r}),t&&e.jsx(G,{})]}),e.jsxs("div",{className:"flex items-center gap-0.5 text-text-sm text-theme-text-secondary",children:[e.jsx(_,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary"}),e.jsx("p",{className:"truncate",children:s.name})]})]}),e.jsx("div",{className:"space-y-4",children:e.jsx(K,{projectName:s.id})}),e.jsx($,{projectId:s.name})]}),e.jsx(v,{to:u.projects.pipelines.overview,className:"absolute inset-0"})]})}function K({projectName:s}){const t=g({...f.projectStatistics(s)});if(t.isPending)return e.jsx(c,{className:"h-4 w-[120px]"});if(t.isError)return null;const r=t.data;return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx(U,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:[r.pipelines," pipelines"]})]}),e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx(Z,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:[r.runs," runs"]})]})]})}function $({projectId:s}){const{copied:t,copyToClipboard:r}=k(),a=`zenml project set ${s}`;return e.jsx("div",{className:"flex items-center gap-2 truncate",children:e.jsxs("div",{className:"flex w-full items-center justify-between gap-1 truncate rounded-md border border-theme-border-moderate bg-theme-surface-secondary px-2 py-1 text-text-sm text-theme-text-secondary",children:[e.jsx("code",{className:"truncate",children:a}),t?e.jsxs(e.Fragment,{children:[e.jsx(M,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"}),e.jsx("p",{className:"sr-only",children:"copied successfully"})]}):e.jsxs("button",{className:"z-10",onClick:()=>r(a),children:[e.jsx(z,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"}),e.jsx("p",{className:"sr-only",children:"Copy tenantUrl"})]})]})})}function G(){return e.jsx(C,{children:e.jsxs(h,{children:[e.jsx(p,{className:"z-10",children:e.jsx(S,{size:"sm",rounded:!1,className:"font-semibold uppercase",color:"purple",children:"Default"})}),e.jsxs(j,{className:"max-w-[320px] space-y-0.5",children:[e.jsx("p",{className:"font-semibold",children:"This is your default project in this workspace"}),e.jsx("p",{children:"This project is used automatically when no specific project is selected"})]})]})})}function O(){var n,l;const s=g({...f.projectDetail("default")}),t=d();if(s.isPending||t.isPending)return e.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.jsx("div",{className:"h-full w-full",children:e.jsx(c,{className:"h-[400px] w-full"})})});if(s.isError)return e.jsx("p",{children:s.error.message});const r=s.data,a=(l=(n=t.data)==null?void 0:n.body)==null?void 0:l.default_project_id;return e.jsx("ul",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.jsx("li",{children:e.jsx(F,{project:r,isDefault:a===r.id})})})}function A(){return e.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2",children:e.jsx(C,{children:e.jsxs(h,{children:[e.jsx(p,{className:"z-10",children:e.jsxs("div",{className:E(T({size:"md"}),"pointer-events-none bg-primary-50"),children:[e.jsx(B,{width:24,height:24,className:"shrink-0 fill-white"}),"New Project"]})}),e.jsxs(j,{side:"bottom",align:"end",className:"max-w-[320px] space-y-4 border border-theme-border-moderate bg-theme-surface-primary p-5 text-text-md text-theme-text-primary",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{children:"Upgrade to create Projects"}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Get access to additional projects and workspaces, manage users and permissions, and get advanced features with ZenML Pro"})]}),e.jsx(x,{asChild:!0,children:e.jsx("a",{target:"_blank",className:"block w-fit",rel:"noopener noreferrer",href:"https://cloud.zenml.io/signup",children:"Try ZenML Pro"})})]})]})})})}function i1(){return e.jsxs("div",{className:"layout-container space-y-4 py-5",children:[e.jsx(A,{}),e.jsx(O,{})]})}export{i1 as default};
@@ -1 +0,0 @@
1
- import{r as i,j as s}from"./@radix-Cdvw4jJ8.js";import{as as D,at as k,B as f,au as z,av as E,aw as A,ap as T,a as v,aB as b,S,I as o,az as B,aA as q,z as a,e as M,b as Q,g as P,aj as V,ak as _}from"./index-BgEfQ3_G.js";import{u as C}from"./update-current-user-mutation-Ca-Lmwuj.js";import{h as K}from"./@tanstack-5gTMR7G2.js";import{u as F}from"./index.esm-DhJo3mA6.js";import{t as I}from"./zod-XdS2h1ws.js";import{P as O}from"./PasswordChecker-B88WjuCe.js";import{u as H}from"./UpdatePasswordSchemas-D_DCETSO.js";import{D as R}from"./DisplayDate-8RESqe5H.js";import"./@react-router-DeDfXbUF.js";import"./@reactflow-B_iCtR7X.js";function G(){const[e,l]=i.useState(!1);return s.jsxs(D,{onOpenChange:()=>{l(!1)},children:[s.jsx(k,{asChild:!0,children:s.jsx(f,{size:"md",className:"shrink-0",intent:"primary",emphasis:"subtle",children:"Change Password"})}),s.jsxs(z,{children:[s.jsx(E,{children:s.jsx(A,{children:" Update Credentials"})}),e?s.jsx(L,{}):s.jsx(J,{setSuccess:l})]})]})}function J({setSuccess:e}){var u;const l=i.useId(),d=i.useId(),n=i.useId(),{toast:x}=v(),{mutate:p,isPending:j}=C({onSuccess(){e(!0)},onError(t){b(t)&&x({status:"error",emphasis:"subtle",icon:s.jsx(S,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:t.message,rounded:!0})}}),{register:c,handleSubmit:m,watch:w,formState:{isValid:N,errors:y}}=F({resolver:I(H),mode:"onChange",criteriaMode:"all"});function g(t){p({old_password:t.oldPassword,password:t.newPassword})}const h=(u=y.newPassword)==null?void 0:u.types;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-5 p-7",children:[s.jsx("form",{id:"update-password-form",onSubmit:m(g),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:l,className:"text-text-sm",children:"Old Password"}),s.jsx(o,{...c("oldPassword"),type:"password",id:l,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:d,className:"text-text-sm",children:"New Password"}),s.jsx(o,{...c("newPassword"),type:"password",id:d,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:n,className:"text-text-sm",children:"Confirm Password"}),s.jsx(o,{...c("confirmPassword"),type:"password",id:n,className:"w-full"})]})]})}),s.jsx(O,{val:w("newPassword"),errors:h||[]})]}),s.jsxs(B,{className:"gap-[10px]",children:[s.jsx(q,{asChild:!0,children:s.jsx(f,{size:"sm",intent:"secondary",children:"Cancel"})}),s.jsx(f,{disabled:!N||j,form:"update-password-form",size:"sm",children:"Update Password"})]})]})}function L(){return s.jsxs("div",{className:"space-y-5 p-7 text-center",children:[s.jsx(T,{className:"mx-auto h-[110px] w-[110px] fill-success-500"}),s.jsx("p",{className:"text-text-lg font-semibold text-theme-text-primary",children:"The password was updated successfully!"})]})}const W=a.object({fullName:a.union([a.string(),a.literal("")]),username:a.union([a.string(),a.literal("")]),email:a.union([a.string().email(),a.literal("")])}).refine(e=>e.fullName!==""||e.username!==""||e.email!=="");function X({user:e}){var h,u,t;const l=K(),{toast:d}=v(),n=i.useId(),x=i.useId(),p=i.useId(),{isPending:j,mutate:c}=C({onError(r){b(r)&&d({status:"error",emphasis:"subtle",icon:s.jsx(S,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:r.message,rounded:!0})},onSuccess:()=>{l.invalidateQueries({queryKey:["current-user"]}),l.invalidateQueries({queryKey:["users"]}),w(),d({status:"success",emphasis:"subtle",rounded:!0,description:"User updated successfully"})}}),{register:m,reset:w,handleSubmit:N,formState:{isValid:y}}=F({resolver:I(W),defaultValues:{email:void 0,fullName:void 0,username:void 0}});function g(r){const U={...r.fullName&&{full_name:r.fullName},...r.username&&{name:r.username},...r.email&&{email:r.email}};c(U)}return s.jsxs("div",{className:"w-full max-w-[600px]",children:[s.jsx("form",{onSubmit:N(g),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:n,className:"text-text-sm",children:"Full Name"}),s.jsx(o,{placeholder:(h=e.body)==null?void 0:h.full_name,...m("fullName"),id:n,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:x,className:"text-text-sm",children:"Username"}),s.jsx(o,{...m("username"),placeholder:e.name,id:x,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:p,className:"text-text-sm",children:"Email"}),s.jsx(o,{placeholder:((u=e.metadata)==null?void 0:u.email)??void 0,...m("email"),id:p,className:"w-full"})]}),s.jsx("div",{className:"flex justify-end",children:s.jsx(f,{disabled:j||!y,size:"md",intent:"primary",children:"Update"})})]})}),s.jsx(G,{}),s.jsxs("p",{className:"mt-5 text-text-sm text-theme-text-secondary",children:["Created on ",s.jsx(R,{dateString:((t=e.body)==null?void 0:t.created)||""})]})]})}function ds(){const{data:e}=M();return s.jsxs(Q,{className:"flex flex-col gap-5 p-5",children:[s.jsx("h1",{className:"text-text-xl font-semibold",children:"Profile"}),s.jsxs("div",{className:"flex justify-between",children:[e?s.jsx(X,{user:e}):s.jsx(P,{className:"h-[350px] w-full"}),e?s.jsx(V,{size:"xxl",className:"ml-5 h-[140px] w-[140px]",type:"rounded",children:s.jsx(_,{className:"text-display-lg",size:"xxl",children:e.name[0]})}):s.jsx(P,{className:"h-[140px] w-[140px] rounded-rounded"})]})]})}export{ds as default};
@@ -1 +0,0 @@
1
- import{r as p,j as t}from"./@radix-Cdvw4jJ8.js";import{u as F,W as Ue,L as Ze}from"./LeftSideMenu-DPsCCK3z.js";import{W as O,H as D,B as M}from"./Wizard-BHvY75u_.js";import{t as q}from"./zod-XdS2h1ws.js";import{z as y,g as G,L as Ke,I as ge,B as E,aO as Ie,aU as Qe,aV as Ye,aW as Ge,aX as Xe,ar as Je,aY as et,as as tt,au as rt,aw as st,aM as nt,m as ot,V as it,f as at,i as ct,F as lt,j as ut,a as Oe,S as dt,aj as ft,ak as mt,ai as ht,r as xt}from"./index-BgEfQ3_G.js";import{a as v,C as k,u as W,F as $}from"./index.esm-DhJo3mA6.js";import{S as R}from"./WizardFooter-FQm8y-jP.js";import{C as je}from"./ComponentIcon-CMiVW-O6.js";import{R as U,a as Z,s as pt,u as yt}from"./create-stack-BpZrmKDu.js";import{f as gt}from"./index-eoDB_1XX.js";import{b as X,c as jt,k as De,h as _t}from"./@tanstack-5gTMR7G2.js";import{g as vt,S as St}from"./StackName-CFSZL8ec.js";import{S as Ct}from"./transform-CeZdrxDZ.js";import{C as L}from"./ProviderIcon-DHejyg7C.js";import{g as bt,a as wt,D as Nt,b as Pt,z as Ft}from"./form-BgtamtJm.js";import{s as kt}from"./sharedSchema-C_HkejsG.js";import{S as zt}from"./Lock-CrIAdQo6.js";import{T as _e}from"./Tick-Qquvr4P3.js";import{s as Me}from"./index-BBt0LDtR.js";import{C as oe,P as ie}from"./ProviderRadio-tGtie8Gc.js";import{C as At}from"./ComponentBadge-Cnecw3qz.js";import{e as It}from"./components-Br2ezRib.js";import{L as Ot}from"./@react-router-DeDfXbUF.js";import"./@reactflow-B_iCtR7X.js";import"./layout-DBbfEFBe.js";import"./persist-BsdEtCkd.js";import"./gcp-B1I3Qvcx.js";import"./plus-Cl0_rCVF.js";import"./trash-DP6Tpp_E.js";import"./type-guards-CNgPYg8l.js";import"./index.es-C1gfATPn.js";import"./check-B9QMTa3f.js";import"./stack-detail-query-CNmVZ0Bo.js";const Ee=p.createContext(null);function Dt({children:e}){const[r,s]=p.useState({stackName:null,createdStackId:null,connectorConfig:null,fullstackResources:null,artifactStoreConfig:null,registryConfig:null,orchestratorConfig:null});return t.jsx(Ee.Provider,{value:{data:r,setData:s},children:e})}function S(){const e=p.useContext(Ee);if(e===null)throw new Error("useExistingInfraContext must be used within an ExistingInfraProvider");return e}const Re=p.createContext(null);function be({children:e,initialSchema:r}){const[s,n]=p.useState(r),[o,a]=p.useState({});return t.jsx(Re.Provider,{value:{schema:s,setSchema:n,defaultValues:o,setDefaultValues:a},children:e})}function J(){const e=p.useContext(Re);if(!e)throw new Error("useSchemaContext must be used within a SchemaProvider");return e}const Mt=y.object({resourceId:y.string().min(1),flavor:y.string()});function Et(){return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"artifact_store",className:"h-5 w-5 fill-primary-400"}),"Select your Artifact Store"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Choose one of the storages for the new Artifact Store."})]})}var Le=Symbol.for("immer-nothing"),we=Symbol.for("immer-draftable"),g=Symbol.for("immer-state");function _(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var z=Object.getPrototypeOf;function A(e){return!!e&&!!e[g]}function N(e){var r;return e?Te(e)||Array.isArray(e)||!!e[we]||!!((r=e.constructor)!=null&&r[we])||te(e)||re(e):!1}var Rt=Object.prototype.constructor.toString();function Te(e){if(!e||typeof e!="object")return!1;const r=z(e);if(r===null)return!0;const s=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return s===Object?!0:typeof s=="function"&&Function.toString.call(s)===Rt}function K(e,r){ee(e)===0?Reflect.ownKeys(e).forEach(s=>{r(s,e[s],e)}):e.forEach((s,n)=>r(n,s,e))}function ee(e){const r=e[g];return r?r.type_:Array.isArray(e)?1:te(e)?2:re(e)?3:0}function de(e,r){return ee(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function Ve(e,r,s){const n=ee(e);n===2?e.set(r,s):n===3?e.add(s):e[r]=s}function Lt(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function te(e){return e instanceof Map}function re(e){return e instanceof Set}function w(e){return e.copy_||e.base_}function fe(e,r){if(te(e))return new Map(e);if(re(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const s=Te(e);if(r===!0||r==="class_only"&&!s){const n=Object.getOwnPropertyDescriptors(e);delete n[g];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const l=o[a],u=n[l];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[l]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[l]})}return Object.create(z(e),n)}else{const n=z(e);if(n!==null&&s)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function ve(e,r=!1){return se(e)||A(e)||!N(e)||(ee(e)>1&&(e.set=e.add=e.clear=e.delete=Tt),Object.freeze(e),r&&Object.entries(e).forEach(([s,n])=>ve(n,!0))),e}function Tt(){_(2)}function se(e){return Object.isFrozen(e)}var Vt={};function P(e){const r=Vt[e];return r||_(0,e),r}var T;function Be(){return T}function Bt(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ne(e,r){r&&(P("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function me(e){he(e),e.drafts_.forEach(qt),e.drafts_=null}function he(e){e===T&&(T=e.parent_)}function Pe(e){return T=Bt(T,e)}function qt(e){const r=e[g];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function Fe(e,r){r.unfinalizedDrafts_=r.drafts_.length;const s=r.drafts_[0];return e!==void 0&&e!==s?(s[g].modified_&&(me(r),_(4)),N(e)&&(e=Q(r,e),r.parent_||Y(r,e)),r.patches_&&P("Patches").generateReplacementPatches_(s[g].base_,e,r.patches_,r.inversePatches_)):e=Q(r,s,[]),me(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==Le?e:void 0}function Q(e,r,s){if(se(r))return r;const n=r[g];if(!n)return K(r,(o,a)=>ke(e,n,r,o,a,s)),r;if(n.scope_!==e)return r;if(!n.modified_)return Y(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let a=o,l=!1;n.type_===3&&(a=new Set(o),o.clear(),l=!0),K(a,(u,f)=>ke(e,n,o,u,f,s,l)),Y(e,o,!1),s&&e.patches_&&P("Patches").generatePatches_(n,s,e.patches_,e.inversePatches_)}return n.copy_}function ke(e,r,s,n,o,a,l){if(A(o)){const u=a&&r&&r.type_!==3&&!de(r.assigned_,n)?a.concat(n):void 0,f=Q(e,o,u);if(Ve(s,n,f),A(f))e.canAutoFreeze_=!1;else return}else l&&s.add(o);if(N(o)&&!se(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Q(e,o),(!r||!r.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(s,n)&&Y(e,o)}}function Y(e,r,s=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ve(r,s)}function Wt(e,r){const s=Array.isArray(e),n={type_:s?1:0,scope_:r?r.scope_:Be(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=Se;s&&(o=[n],a=V);const{revoke:l,proxy:u}=Proxy.revocable(o,a);return n.draft_=u,n.revoke_=l,u}var Se={get(e,r){if(r===g)return e;const s=w(e);if(!de(s,r))return $t(e,s,r);const n=s[r];return e.finalized_||!N(n)?n:n===ae(e.base_,r)?(ce(e),e.copy_[r]=pe(n,e)):n},has(e,r){return r in w(e)},ownKeys(e){return Reflect.ownKeys(w(e))},set(e,r,s){const n=qe(w(e),r);if(n!=null&&n.set)return n.set.call(e.draft_,s),!0;if(!e.modified_){const o=ae(w(e),r),a=o==null?void 0:o[g];if(a&&a.base_===s)return e.copy_[r]=s,e.assigned_[r]=!1,!0;if(Lt(s,o)&&(s!==void 0||de(e.base_,r)))return!0;ce(e),xe(e)}return e.copy_[r]===s&&(s!==void 0||r in e.copy_)||Number.isNaN(s)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=s,e.assigned_[r]=!0),!0},deleteProperty(e,r){return ae(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,ce(e),xe(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const s=w(e),n=Reflect.getOwnPropertyDescriptor(s,r);return n&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:n.enumerable,value:s[r]}},defineProperty(){_(11)},getPrototypeOf(e){return z(e.base_)},setPrototypeOf(){_(12)}},V={};K(Se,(e,r)=>{V[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});V.deleteProperty=function(e,r){return V.set.call(this,e,r,void 0)};V.set=function(e,r,s){return Se.set.call(this,e[0],r,s,e[0])};function ae(e,r){const s=e[g];return(s?w(s):e)[r]}function $t(e,r,s){var o;const n=qe(r,s);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function qe(e,r){if(!(r in e))return;let s=z(e);for(;s;){const n=Object.getOwnPropertyDescriptor(s,r);if(n)return n;s=z(s)}}function xe(e){e.modified_||(e.modified_=!0,e.parent_&&xe(e.parent_))}function ce(e){e.copy_||(e.copy_=fe(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ht=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,s,n)=>{if(typeof r=="function"&&typeof s!="function"){const a=s;s=r;const l=this;return function(f=a,...d){return l.produce(f,c=>s.call(this,c,...d))}}typeof s!="function"&&_(6),n!==void 0&&typeof n!="function"&&_(7);let o;if(N(r)){const a=Pe(this),l=pe(r,void 0);let u=!0;try{o=s(l),u=!1}finally{u?me(a):he(a)}return Ne(a,n),Fe(o,a)}else if(!r||typeof r!="object"){if(o=s(r),o===void 0&&(o=r),o===Le&&(o=void 0),this.autoFreeze_&&ve(o,!0),n){const a=[],l=[];P("Patches").generateReplacementPatches_(r,o,a,l),n(a,l)}return o}else _(1,r)},this.produceWithPatches=(r,s)=>{if(typeof r=="function")return(l,...u)=>this.produceWithPatches(l,f=>r(f,...u));let n,o;return[this.produce(r,s,(l,u)=>{n=l,o=u}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){N(e)||_(8),A(e)&&(e=Ut(e));const r=Pe(this),s=pe(e,void 0);return s[g].isManual_=!0,he(r),s}finishDraft(e,r){const s=e&&e[g];(!s||!s.isManual_)&&_(9);const{scope_:n}=s;return Ne(n,r),Fe(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,r){let s;for(s=r.length-1;s>=0;s--){const o=r[s];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}s>-1&&(r=r.slice(s+1));const n=P("Patches").applyPatches_;return A(e)?n(e,r):this.produce(e,o=>n(o,r))}};function pe(e,r){const s=te(e)?P("MapSet").proxyMap_(e,r):re(e)?P("MapSet").proxySet_(e,r):Wt(e,r);return(r?r.scope_:Be()).drafts_.push(s),s}function Ut(e){return A(e)||_(10,e),We(e)}function We(e){if(!N(e)||se(e))return e;const r=e[g];let s;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,s=fe(e,r.scope_.immer_.useStrictShallowCopy_)}else s=fe(e,!0);return K(s,(n,o)=>{Ve(s,n,We(o))}),r&&(r.finalized_=!1),s}var j=new Ht,I=j.produce;j.produceWithPatches.bind(j);j.setAutoFreeze.bind(j);j.setUseStrictShallowCopy.bind(j);j.applyPatches.bind(j);j.createDraft.bind(j);j.finishDraft.bind(j);function Zt(){const{data:e,setData:r}=S(),{setCurrentStep:s}=F();if(!e.fullstackResources)return s(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const n=e.fullstackResources.components_resources_info.artifact_store,o=n.flatMap(l=>l.accessible_by_service_connector.map(u=>({...l,value:u})));function a({flavor:l,resourceId:u}){const f=n.find(d=>d.flavor===l);f&&(r(d=>I(d,c=>{c.artifactStoreConfig={flavor:l,configuration:Object.fromEntries(Object.keys(f.required_configuration||{}).map(h=>[h,u])),service_connector_resource_id:u}})),s(d=>d+1))}return{handleFormSubmit:a,flattenedInstances:o}}function B({flavor:e,type:r,width:s=32,height:n=32,...o}){var l;const a=X({...gt.flavorList({name:e,type:r})});return a.isError?null:a.isPending?t.jsx(G,{style:{height:`${n}px`,width:`${s}px`}}):t.jsx("img",{width:s,height:n,alt:`${e} logo`,...o,src:Ke(((l=a.data.items[0].body)==null?void 0:l.logo_url)??"")})}const Kt="artifact_store";function Qt(){const[e,r]=p.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:l,trigger:u,reset:f}=v(),{flattenedInstances:d,handleFormSubmit:c}=Zt(),h=d.filter(i=>i.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(ge,{placeholder:"Search...",onChange:i=>{f(),r(i.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...a("flavor")}),t.jsx("ul",{className:"space-y-1",children:h.map(i=>t.jsx("li",{children:t.jsx(k,{name:"resourceId",control:s,render:({field:{onChange:m,...x}})=>t.jsxs(U,{"data-state":l("resourceId")===i.value?"selected":"unselected",htmlFor:i.value,children:[t.jsx(Z,{id:i.value,type:"radio",...x,onChange:C=>{n("flavor",i.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),m(C.target.value),u()},value:i.value,name:"connector-radio"}),t.jsx(B,{type:Kt,width:24,height:24,flavor:i.flavor})," ",t.jsx("span",{children:i.value})]})})},i.value))})]})]})}function Yt(){const e=W({resolver:q(Mt),shouldUnregister:!0});return t.jsx($,{...e,children:t.jsxs(O,{children:[t.jsx(D,{children:"Artifact Store"}),t.jsx(M,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(Et,{}),t.jsx(Qt,{})]})}),t.jsx(R,{children:t.jsx(Gt,{})})]})})}function Gt(){const e=v();return t.jsx(E,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const $e=y.object({authMethod:y.string().min(1),stackName:kt});function Xt(){var h,i;const{data:e}=S(),{setCurrentStep:r}=F(),{control:s,watch:n,resetField:o}=v(),{setSchema:a,setDefaultValues:l}=J(),u=X({...Ie.serviceConnectorTypeDetail(((h=e.connectorConfig)==null?void 0:h.type)||"")});if(u.isError)return null;if(u.isPending)return t.jsx(G,{className:"h-[40px] w-[100px]"});const f=u.data.auth_methods.filter(m=>m.auth_method!=="implicit").map(m=>({name:m.name,auth_method:m.auth_method}));if(!((i=e.connectorConfig)!=null&&i.type)){r(1);return}function d(){var Ce;const m=n("authMethod"),x=(Ce=u.data)==null?void 0:Ce.auth_methods.find(ne=>ne.auth_method===m);if(!x)return;const C=x.config_schema,b=bt(C),He=wt(C);a($e.merge(b)),l(He),Object.keys(b.shape).forEach(ne=>o(ne))}const c=e.connectorConfig.type||"";return t.jsx(k,{control:s,name:"authMethod",render:({field:{onChange:m,ref:x,...C}})=>t.jsxs(Qe,{...C,onValueChange:b=>{m(b),d()},children:[t.jsx(Ye,{className:"w-fit border border-neutral-300 text-left text-text-md",children:t.jsx(Ge,{className:"flex items-center gap-2",placeholder:"Select your Auth Method"})}),t.jsx(Xe,{children:t.jsx(Je,{viewportClassName:"max-h-[300px]",children:f.map(b=>t.jsx(et,{className:"space-x-2",value:b.auth_method,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(L,{provider:c}),t.jsx("div",{children:b.name})]})},b.auth_method))})})]})})}function Jt(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(Ct,{className:"h-5 w-5 fill-primary-400"}),"Select an Authentication Method"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Connect ZenML to your resources for seamless integration of cloud services into your ML pipelines."})]}),t.jsx(Xt,{})]})}function er(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(zt,{className:"h-5 w-5 fill-primary-400"}),"Add your Configuration"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Your credentials are securely stored and encrypted. ZenML uses these credentials to interact with your resources."})]}),t.jsx(tr,{})]})}function tr(){var c,h;const{data:e}=S(),{watch:r}=v(),s=X({...Ie.serviceConnectorTypeDetail(((c=e.connectorConfig)==null?void 0:c.type)||"")}),n=r("authMethod"),o=(h=s.data)==null?void 0:h.auth_methods.find(i=>i.auth_method===n);if(s.isError)return null;if(s.isPending)return t.jsx(G,{className:"h-[200px] w-full"});if(!o)return null;const a=o.config_schema,l=a.properties||{},u=a.required||[],f=a.$defs,d=Object.entries(l).sort(([i],[m])=>u.includes(i)&&!u.includes(m)?-1:!u.includes(i)&&u.includes(m)?1:0);return t.jsx("div",{className:"space-y-5",children:d.map(([i,m])=>t.jsx(Nt,{definitions:f,isOptional:Pt(i,u),name:i,schema:m},i))})}function rr({open:e,loadingComponents:r}){var n,o;const{data:s}=S();return(n=s.connectorConfig)!=null&&n.type?t.jsx(tt,{open:e,children:t.jsxs(rt,{onPointerDownOutside:a=>a.preventDefault(),onEscapeKeyDown:a=>a.preventDefault(),className:"max-w-[600px]",children:[t.jsx("div",{className:"flex items-center justify-between border-b border-theme-border-moderate py-2 pl-5 pr-3",children:t.jsx(st,{className:"text-text-lg",children:"Connecting and loading your components..."})}),t.jsxs("div",{className:"flex h-[200px] items-center justify-center gap-5 bg-primary-50",children:[t.jsx(nt,{className:"h-[60px] w-[60px]"}),t.jsx("div",{className:"flex h-[60px] w-[60px] items-center justify-center",children:t.jsx(ot,{className:"h-5 w-5 fill-theme-text-tertiary"})}),t.jsx(L,{className:"h-[60px] w-[60px]",provider:s.connectorConfig.type})]}),t.jsxs("div",{className:"flex flex-col gap-1 px-7 pb-6 pt-5",children:[t.jsxs("p",{className:"text-theme-text-secondary",children:["We're securely connecting to ",vt(((o=s.connectorConfig)==null?void 0:o.type)||"aws")," ","and retrieving your custom components. This process typically takes about 30-60 seconds."]}),t.jsx(sr,{loadingComponents:r})]})]})}):null}function sr({loadingComponents:e}){const[r,s]=p.useState(!0),[n,o]=p.useState(!0);return p.useEffect(()=>{const a=setTimeout(()=>{s(!1)},Math.floor(Math.random()*1e3)+500),l=setTimeout(()=>{o(!1)},1500);return()=>{clearTimeout(a),clearTimeout(l)}},[]),t.jsxs("ul",{className:"mt-3 space-y-3 text-theme-text-secondary",children:[t.jsxs(ue,{children:[t.jsx(le,{loading:r}),"Establishing a secure connection"]}),t.jsxs(ue,{children:[t.jsx(le,{loading:n}),"Authenticating your account"]}),t.jsxs(ue,{children:[t.jsx(le,{loading:e}),"Fetching your existing components"]})]})}function le({loading:e}){return e?t.jsx(it,{className:"h-5 w-5 border-2"}):t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"})}function ue({children:e}){return t.jsx("li",{className:"flex items-center gap-1",children:e})}async function nr({payload:e}){const r=ct(ut.serviceConnectors.fullStackResources),s=await at(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching service connector type");throw new lt({status:s.status,statusText:s.statusText,message:n})}return s.json()}function or(e){return jt({...e,mutationFn:async({payload:r})=>nr({payload:r})})}function ir(){const{setCurrentStep:e}=F(),[r,s]=p.useState(!0),{toast:n}=Oe(),{setData:o,data:a}=S(),l=or({onSuccess:async f=>{o(d=>I(d,c=>{c.fullstackResources=f})),s(!1),await pt(200),e(d=>d+1)},onError:f=>{n({status:"error",emphasis:"subtle",description:f.message,rounded:!0})}});return{handleFormSubmit:({authMethod:f,stackName:d,...c})=>{Object.keys(c).forEach(i=>{(c[i]===""||c[i]===null||c[i]===void 0||Array.isArray(c[i])&&c[i].length===0)&&delete c[i]});const h=I(a,i=>{i.stackName=d,i.connectorConfig&&(i.connectorConfig.auth_method=f,i.connectorConfig.configuration={...c})});o(h),h.connectorConfig&&l.mutate({payload:h.connectorConfig})},fullStackResources:l,loadingComponents:r}}function ar(){const{handleSubmit:e,formState:{isSubmitting:r}}=v(),{handleFormSubmit:s,fullStackResources:n,loadingComponents:o}=ir();return t.jsxs("form",{onSubmit:e(s),id:"connect-form",children:[t.jsx(rr,{loadingComponents:o,open:r||n.isPending}),t.jsx(Jt,{}),t.jsx(St,{}),t.jsx(er,{})]})}function cr(){const{schema:e,defaultValues:r}=J(),s=W({shouldUnregister:!0,mode:"onChange",resolver:q(e),defaultValues:{stackName:"",authMethod:"",...r}});return t.jsx($,{...s,children:t.jsxs(O,{children:[t.jsx(D,{children:"Connect to your Cloud"}),t.jsx(M,{children:t.jsx(ar,{})}),t.jsx(R,{children:t.jsx(lr,{})})]})})}function lr(){const{formState:{isValid:e,isSubmitting:r}}=v(),s=!!De();return t.jsx(E,{className:"justify-center gap-2",disabled:!e||s||r,form:"connect-form",size:"md",children:s||r?"Loading...":"Next"})}function ur(){const{data:e,setData:r}=S(),s=_t(),{toast:n}=Oe(),{setCurrentStep:o}=F(),{mutate:a}=yt({onError:d=>{d instanceof Error&&n({status:"error",emphasis:"subtle",icon:t.jsx(dt,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess:async d=>{r(c=>I(c,h=>{h.createdStackId=d.id})),o(c=>c+1),s.invalidateQueries({queryKey:Me.all})}});if(!e.fullstackResources)return o(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const l=e.fullstackResources.components_resources_info.container_registry,u=l.flatMap(d=>d.accessible_by_service_connector.map(c=>({...d,value:c})));function f({flavor:d,resourceId:c}){const h=l.find(m=>m.flavor===d);if(!h)return;const i=I(e,m=>{m.registryConfig={flavor:d,configuration:Object.fromEntries(Object.keys(h.required_configuration||{}).map(x=>[x,c])),service_connector_resource_id:c}});r(i),a({payload:{name:i.stackName||Math.random().toString(36).substring(7),service_connectors:i.connectorConfig?[i.connectorConfig]:[],components:{orchestrator:[{...i.orchestratorConfig,service_connector_index:0}],artifact_store:[{...i.artifactStoreConfig,service_connector_index:0}],container_registry:[{...i.registryConfig,service_connector_index:0}]}}})}return{handleFormSubmit:f,flattenedInstances:u}}const dr="container_registry";function fr(){const[e,r]=p.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:l,trigger:u,reset:f}=v(),{flattenedInstances:d,handleFormSubmit:c}=ur(),h=d.filter(i=>i.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(ge,{placeholder:"Search...",onChange:i=>{f(),r(i.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...a("flavor")}),t.jsx("ul",{className:"space-y-1",children:h.map(i=>t.jsx("li",{children:t.jsx(k,{name:"resourceId",control:s,render:({field:{onChange:m,...x}})=>t.jsxs(U,{"data-state":l("resourceId")===i.value?"selected":"unselected",htmlFor:i.value,children:[t.jsx(Z,{id:i.value,type:"radio",...x,onChange:C=>{n("flavor",i.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),m(C.target.value),u()},value:i.value,name:"connector-radio"}),t.jsx(B,{width:24,height:24,type:dr,flavor:i.flavor})," ",t.jsx("span",{children:i.value})]})})},i.value))})]})]})}function mr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"container_registry",className:"h-5 w-5 fill-primary-400"}),"Select your Container Registry"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the Container Registries for your new stack"})]})})}const hr=y.object({flavor:y.string().min(1),resourceId:y.string().min(1)});function xr(){const e=W({resolver:q(hr),shouldUnregister:!0});return t.jsx($,{...e,children:t.jsxs(O,{children:[t.jsx(D,{children:"Container Registry"}),t.jsx(M,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(mr,{}),t.jsx(fr,{})]})}),t.jsx(R,{children:t.jsx(pr,{})})]})})}function pr(){const e=v(),r=!!De();return t.jsxs(E,{className:"justify-center gap-2",disabled:!e.formState.isValid||r,form:"artifact-store-form",size:"md",children:[r&&t.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),r?"Loading...":"Next"]})}function yr(){var a;const{data:e,setData:r}=S(),{setCurrentStep:s}=F();if(!e.fullstackResources)return s(2),{orchestrators:[],handleFormSubmit:()=>{}};const n=((a=e.fullstackResources.components_resources_info)==null?void 0:a.orchestrator)||[];function o({flavor:l,resourceId:u,...f}){const d=n.find(c=>c.flavor===l);d&&(r(c=>{const h=d!=null&&d.use_resource_value_as_fixed_config?Object.fromEntries(Object.keys(d.required_configuration||{}).map(i=>[i,u])):{...f};return I(c,i=>{i.orchestratorConfig={flavor:l,configuration:h,service_connector_resource_id:u}})}),s(c=>c+1))}return{orchestrators:n,handleFormSubmit:o}}const ye=y.object({flavor:y.string().min(1),resourceId:y.string().min(1)}),H="kubernetes",ze="orchestrator";function gr(){const{orchestrators:e,handleFormSubmit:r}=yr(),{setSchema:s}=J(),{control:n,watch:o,setValue:a,register:l,reset:u,handleSubmit:f}=v(),d=o("flavor");return t.jsxs("form",{onSubmit:f(r),id:"artifact-store-form",children:[d!==H&&t.jsx("input",{...l("resourceId"),type:"hidden"}),t.jsx("ul",{className:"space-y-1",children:e.map((c,h)=>t.jsxs("li",{children:[t.jsx(k,{control:n,name:"flavor",render:({field:{onChange:i,...m}})=>t.jsxs(U,{"data-state":d===c.flavor?"selected":"unselected",htmlFor:c.flavor,children:[t.jsx(Z,{onChange:x=>{u({flavor:c.flavor}),c.use_resource_value_as_fixed_config===!0&&s(ye),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&s(ye.merge(Ft(c.required_configuration))),c.flavor!==H&&c.accessible_by_service_connector.length>0&&a("resourceId",c.accessible_by_service_connector[0]),i(x)},...m,id:c.flavor,type:"radio",value:c.flavor,name:"orchestrator-flavor-radio"}),t.jsx(B,{width:24,height:24,type:ze,flavor:c.flavor}),t.jsx("span",{children:c.flavor_display_name})]})}),d===c.flavor&&(c.flavor===H||c.use_resource_value_as_fixed_config===!1)&&t.jsxs("div",{className:"space-y-3 py-5 pl-8",children:[c.flavor===H&&t.jsx("ul",{className:"space-y-1",children:c.accessible_by_service_connector.map(i=>t.jsx("li",{children:t.jsx(k,{control:n,name:"resourceId",render:({field:m})=>t.jsxs(U,{"data-state":o("resourceId")===i?"selected":"unselected",htmlFor:i,children:[t.jsx(Z,{...m,id:i,type:"radio",value:i,name:"instance-radio"}),t.jsx(B,{type:ze,width:24,height:24,flavor:c.flavor}),t.jsx("span",{children:i})]})})},i))}),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&Object.keys(c.required_configuration).length>=1&&t.jsx("div",{children:Object.entries(c.required_configuration).map(([i,m])=>t.jsx("div",{children:t.jsx(k,{defaultValue:"",name:i,control:n,render:({field:x})=>t.jsxs("div",{children:[t.jsx("label",{htmlFor:i,className:"text-text-sm",children:m}),t.jsx(ge,{...x,inputSize:"md",required:!0,className:"w-full",id:i})]})})},i))})]})]},h))})]})}function jr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"orchestrator",className:"h-5 w-5 fill-primary-400"}),"Select your Orchestrator"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the connected orchestrators for your new stack"})]})})}function _r(){const{schema:e}=J(),r=W({resolver:q(e),shouldUnregister:!0,defaultValues:{resourceId:""}});return t.jsx($,{...r,children:t.jsxs(O,{children:[t.jsx(D,{children:"Orchestrator"}),t.jsxs(M,{children:[t.jsx(jr,{}),t.jsx(gr,{})]}),t.jsx(R,{children:t.jsx(vr,{})})]})})}function vr(){const e=v();return t.jsx(E,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const Sr=y.object({provider:y.string().min(1)});function Cr(){var a;const{setData:e,data:r}=S(),{setCurrentStep:s}=F(),n=W({resolver:q(Sr),defaultValues:{provider:((a=r.connectorConfig)==null?void 0:a.type)||""}});function o(l){e(u=>({...u,connectorConfig:{type:l.provider,auth_method:""}})),s(u=>u+1)}return t.jsx($,{...n,children:t.jsxs(O,{children:[t.jsx(D,{children:"Select Your Existing Cloud Infrastructure"}),t.jsx(M,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where you have existing infrastructure to connect with ZenML. This will allow you to integrate your current cloud resources with ZenML for model deployment and management."})]}),t.jsxs("form",{id:"provider-form",onSubmit:n.handleSubmit(o),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",children:[t.jsx(oe,{id:"aws-provider",...n.register("provider"),value:"aws",children:t.jsx(ie,{icon:t.jsx(L,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"Connect your existing S3, ECR, and Sagemaker components to ZenML"})}),t.jsx(oe,{id:"gcp-provider",...n.register("provider"),value:"gcp",children:t.jsx(ie,{icon:t.jsx(L,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Link your GCS, Artifact Registry, and Vertex AI components to ZenML"})}),t.jsx(oe,{id:"azure-provider",...n.register("provider"),value:"azure",children:t.jsx(ie,{icon:t.jsx(L,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Integrate ZenML with your Blob Storage, Container Registry, and Azure ML"})})]})]})}),t.jsx(R,{children:t.jsx(br,{})})]})})}function br(){const{formState:{isValid:e}}=v();return t.jsx(E,{form:"provider-form",disabled:!e,size:"md",children:"Next"})}function wr(){var o;const{data:e}=S(),r=X({...Me.stackDetail(e.createdStackId||""),throwOnError:!0});if(r.isError)return null;if(r.isPending)return t.jsx(G,{className:"h-[200px] w-full"});const s=r.data,n=It((o=r.data.metadata)==null?void 0:o.components);return t.jsxs(O,{children:[t.jsx(D,{children:"Your stack"}),t.jsx(M,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsx("p",{className:"text-theme-text-secondary",children:"Here you can review the created stack and stack components. Now you can start running pipelines using this new configuration."}),t.jsxs("div",{className:"divide-y divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[t.jsx(Pr,{stack:s}),n.map(a=>t.jsx(Fr,{component:a},a.id))]})]})}),t.jsx(R,{displayCancel:!1,children:t.jsx(Nr,{})})]})}function Nr(){return t.jsx(E,{size:"md",asChild:!0,children:t.jsx(Ot,{to:xt.stacks.overview,children:"Finish"})})}function Pr({stack:e}){return t.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 font-semibold",children:[t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(ft,{type:"square",size:"lg",children:t.jsx(mt,{size:"lg",children:e.name[0]})}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]})}function Fr({component:e}){var r,s,n,o;return t.jsxs("div",{className:"flex items-center justify-between py-3 pl-9 pr-5",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(B,{width:24,height:24,flavor:((r=e.body)==null?void 0:r.flavor_name)||"",type:((s=e.body)==null?void 0:s.type)||"orchestrator"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg font-semibold",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),t.jsx(At,{type:((n=e.body)==null?void 0:n.type)||"alerter",children:ht((o=e.body)==null?void 0:o.type)})]},e.id)}function kr(){const{currentStep:e}=F();if(e===1)return t.jsx(Cr,{});if(e===2)return t.jsx(be,{initialSchema:$e,children:t.jsx(cr,{})});if(e===3)return t.jsx(Yt,{});if(e===4)return t.jsx(be,{initialSchema:ye,children:t.jsx(_r,{})});if(e===5)return t.jsx(xr,{});if(e===6)return t.jsx(wr,{})}const Ae=["Infrastructure Type","Cloud Provider","Connect your Cloud","Artifact Store","Orchestrator","Container Registry"];function us(){return t.jsx(Ue,{maxSteps:Ae.length+1,initialStep:1,children:t.jsx(Dt,{children:t.jsxs("section",{className:"layout-container flex flex-col gap-5 py-5 xl:flex-row",children:[t.jsx(Ze,{entries:Ae}),t.jsx("div",{className:"w-full",children:t.jsx(kr,{})})]})})})}export{us as default};
@@ -1 +0,0 @@
1
- import{r as m,j as e}from"./@radix-Cdvw4jJ8.js";import{f as S,i as D,F as C,j as w,as as M,at as $,B as h,au as _,av as V,aw as J,a as P,I as k,C as g,az as U,aA as G,aB as A,A as K,k as Y,n as Z,aC as W,b3 as X,aD as ee,b4 as te,aF as se,ay as ne,D as ae,l as re,m as ce,p as ie,r as T,b as I,x as oe,g as F}from"./index-BgEfQ3_G.js";import{P as le}from"./Pagination-CWnEpSpN.js";import{S as ue}from"./SearchField-BtUi6cYl.js";import{s as f,c as de,A as me,u as xe,a as R,b as he}from"./service-k-9Vsb30.js";import{c as b,h as N,b as pe}from"./@tanstack-5gTMR7G2.js";import{t as fe}from"./zod-XdS2h1ws.js";import{u as je,F as ye,a as ve,C as v}from"./index.esm-DhJo3mA6.js";import{S as q}from"./trash-DP6Tpp_E.js";import{D as E,a as z}from"./DeleteAlertDialog-DEI0YDzP.js";import{c as ge,u as Ae}from"./bulk-delete-CzYA--cC.js";import{S as Se}from"./Lock-CrIAdQo6.js";import{L as O}from"./@react-router-DeDfXbUF.js";import{A as De}from"./AlertDialogDropdownItem-DsOmO1FH.js";import"./@reactflow-B_iCtR7X.js";import"./chevron-right-double-Dgp_gEsp.js";import"./index-DWpiv-Ft.js";import"./CodeSnippet-Ctplhzdc.js";import"./Infobox-CSBRrM6r.js";import"./info-QkbQz4QU.js";import"./Tick-Qquvr4P3.js";import"./check-B9QMTa3f.js";async function Ce({body:t}){const s=D(w.serviceAccounts.all),n=await S(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const r=await n.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Failed to create service account");throw new C({status:n.status,statusText:n.statusText,message:r})}return n.json()}function we(t){return b({...t,mutationFn:async s=>Ce({body:s})})}function B({isFallback:t}){const[s,n]=m.useState(!1),[r,a]=m.useState(""),i=N(),u=je({resolver:fe(de),defaultValues:{name:"",description:"",createDefault:!1}}),l=!!r&&u.watch("createDefault");function d(){return l?e.jsx(me,{value:r}):e.jsx(be,{isFallback:t,setApiKeyValue:a,setOpen:n})}return e.jsx(ye,{...u,children:e.jsxs(M,{open:s,onOpenChange:o=>{t&&!o&&i.invalidateQueries({queryKey:f.serviceAccountsKey()}),n(o),a(""),u.reset()},children:[e.jsx($,{asChild:!0,children:e.jsx(h,{className:"shrink-0",size:"sm",intent:"primary",children:"Add service account"})}),e.jsxs(_,{"data-success":l,className:"mx-auto overflow-x-auto transition-none data-[success=true]:max-w-[800px]",children:[e.jsx(V,{children:e.jsx(J,{children:"Add service account"})}),d()]})]})})}function be({setApiKeyValue:t,setOpen:s,isFallback:n}){const{watch:r,handleSubmit:a,control:i,formState:{isValid:u}}=ve(),{toast:l}=P(),d=N(),{mutate:o}=we({onError(c){A(c)&&l({status:"error",emphasis:"subtle",description:c.message,rounded:!0})},async onSuccess(c){if(l({description:"The service account has been added successfully.",status:"success",emphasis:"subtle",rounded:!0}),r("createDefault")){x(c.id);return}d.invalidateQueries({queryKey:f.serviceAccountsKey()}),s(!1)}}),{mutate:p}=xe({onSuccess(c){var y;n||d.invalidateQueries({queryKey:f.serviceAccountsKey()}),t(((y=c.body)==null?void 0:y.key)||"")},onError(c){A(c)&&l({status:"error",emphasis:"subtle",description:c.message,rounded:!0})}}),x=c=>{p({serviceAccountId:c,body:{name:"default",description:"Default api key"}})},H=c=>{o({name:c.name,description:c.description,active:!0})};return e.jsxs(e.Fragment,{children:[e.jsxs("form",{id:"create-secret-form",className:"space-y-5 p-7",onSubmit:a(H),children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Name:"}),e.jsx(v,{name:"name",control:i,render:({field:c})=>e.jsx(k,{...c,className:"w-full",required:!0,placeholder:"Add name"})})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Description:"}),e.jsx(v,{name:"description",control:i,render:({field:c})=>e.jsx(k,{...c,className:"w-full",placeholder:"Add description"})})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v,{control:i,name:"createDefault",render:({field:{onChange:c,value:y}})=>e.jsx(g,{checked:y,id:"default-key",onCheckedChange:L=>c(!!L)})}),e.jsx("label",{htmlFor:"default-key",children:"Create a default API Key"})]}),e.jsx("p",{className:"pl-[30px] text-text-xs text-theme-text-secondary",children:"This will include a default API Key for your service account."})]})]}),e.jsxs(U,{className:"gap-[10px]",children:[e.jsx(G,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"primary",size:"sm",disabled:!u,type:"submit",form:"create-secret-form",children:"Add service account"})]})]})}async function Ne(t){const s=D(w.serviceAccounts.detail(t)),n=await S(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!n.ok){const r=await n.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>`Failed to delete service account ${t}`);throw new C({status:n.status,statusText:n.statusText,message:r})}return n.json()}function ke(t){return b({...t,mutationFn:async s=>{await Ne(s)}})}const{ContextProvider:Te,useContext:j}=ge();function Q(){const{setRowSelection:t}=j(),{mutateAsync:s}=ke();async function n(r){await s(r)}return Ae({deleteFn:n,queryKeyToInvalidate:f.serviceAccountsKey(),setRowSelection:t})}function Fe(){const[t,s]=m.useState(!1),{selectedRowCount:n,selectedRowIDs:r}=j(),{bulkDelete:a}=Q();async function i(){await a(r),s(!1)}return e.jsxs(K,{open:t,onOpenChange:s,children:[e.jsx(Y,{asChild:!0,children:e.jsxs(h,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(q,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(E,{title:`Delete Service Account${n>=2?"s":""}`,handleDelete:i,children:e.jsxs(z,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Oe(){const{selectedRowCount:t}=j();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${t} Service Account${t>1?"s":""} selected`}),e.jsx(Fe,{})]})}async function Pe({body:t,serviceAccountId:s}){const n=D(w.serviceAccounts.detail(s)),r=await S(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.status===404&&Z(),!r.ok){const a=await r.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>`Failed to update service account ${s}`);throw new C({status:r.status,statusText:r.statusText,message:a})}return r.json()}function Ke(t){return b({...t,mutationFn:async({serviceAccountId:s,body:n})=>Pe({serviceAccountId:s,body:n})})}function Ie({isActive:t,serviceAccountId:s}){const{toast:n}=P(),r=N(),[a,i]=m.useState(!1),{mutate:u}=Ke({onError(o){A(o)&&n({status:"error",emphasis:"subtle",description:o.message,rounded:!0})},onSuccess(){r.invalidateQueries({queryKey:f.serviceAccountsKey()})}});function l(o){o?d(o):i(!0)}async function d(o){u({serviceAccountId:s,body:{active:o}})}return e.jsxs(e.Fragment,{children:[e.jsx(K,{open:a,onOpenChange:i,children:e.jsxs(W,{children:[e.jsx(X,{children:e.jsx(ee,{children:"Deactivate Service Account"})}),e.jsxs("div",{className:"p-5 text-text-md text-theme-text-secondary",children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"You won't be able to use any API keys of this service account to authenticate with the server anymore."})]}),e.jsxs(te,{className:"gap-[10px]",children:[e.jsx(se,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{onClick:()=>d(!1).then(o=>i(!1)),intent:"primary",type:"button",children:"Deactivate"})]})]})}),e.jsx(ne,{checked:t,onCheckedChange:l})]})}function Re({serviceAccountId:t}){const[s,n]=m.useState(!1),[r,a]=m.useState(!1),{bulkDelete:i}=Q(),u=m.useRef(null),l=m.useRef(null);function d(){l.current=u.current}async function o(){await i([t]),p(!1)}function p(x){if(x===!1){n(!1),setTimeout(()=>{a(x)},200);return}a(x)}return e.jsxs(ae,{onOpenChange:n,open:s,children:[e.jsx(re,{ref:u,children:e.jsx(ce,{className:"h-5 w-5 fill-theme-text-secondary"})}),e.jsx(ie,{hidden:r,onCloseAutoFocus:x=>{l.current&&(l.current.focus(),l.current=null,x.preventDefault())},align:"end",sideOffset:7,children:e.jsx(De,{onSelect:d,open:r,onOpenChange:p,triggerChildren:"Delete",icon:e.jsx(q,{fill:"red"}),children:e.jsx(E,{title:"Delete Service Account",handleDelete:o,children:e.jsxs(z,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}function qe(){return[{id:"select",meta:{width:"1%"},header:({table:t})=>e.jsx(g,{id:"check-all",checked:t.getIsAllRowsSelected(),onCheckedChange:s=>t.toggleAllRowsSelected(s==="indeterminate"?!0:s)}),cell:({row:t})=>e.jsx(g,{id:`check-${t.id}`,checked:t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})},{id:"service-account",header:"Service Account",accessorFn:t=>t.name,cell:({row:t})=>{var s;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Se,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsx("div",{className:"flex flex-row items-center space-x-1",children:e.jsx("div",{className:"flex items-center space-x-1",children:e.jsx(O,{className:"text-text-md font-semibold text-theme-text-primary",to:T.settings.service_accounts.detail(t.original.id),children:t.original.name})})}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(O,{className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",to:T.settings.service_accounts.detail(t.original.id),children:(s=t.original.metadata)==null?void 0:s.description})})]})]})}},{id:"active",header:"Active",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.active},cell:({row:t})=>{var s;return e.jsx(Ie,{isActive:!!((s=t.original.body)!=null&&s.active),serviceAccountId:t.original.id})}},{id:"actions",meta:{width:"5%"},header:"",cell:({row:t})=>e.jsx("div",{className:"flex items-center justify-end",children:e.jsx(Re,{serviceAccountId:t.original.id})})}]}function Ee(){return e.jsxs(I,{className:"flex flex-col items-center justify-center space-y-4 p-9",children:[e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold text-theme-text-primary",children:"There are no service accounts yet."}),e.jsx("p",{className:"text-theme-text-secondary",children:"Create your first one now to automate your processes securely with ZenML."})]}),e.jsx(B,{isFallback:!0})]})}function ze(){const t=R(),{rowSelection:s,setRowSelection:n}=j(),r=m.useMemo(()=>qe(),[]),{data:a}=pe({...he.serviceAccountList({...t,sort_by:"desc:created",hydrate:!0})});return a&&a.items.length<1&&!t.name?e.jsx(Ee,{}):e.jsxs(e.Fragment,{children:[e.jsx(Be,{}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:a?e.jsx(oe,{getRowId:i=>i.id,rowSelection:s,onRowSelectionChange:n,columns:r,data:a.items}):e.jsx(F,{className:"h-[500px] w-full"})}),a?a.total_pages>1&&e.jsx(le,{searchParams:t,paginate:a}):e.jsx(F,{className:"h-[36px] w-[300px]"})]})]})}function Be(){const t=R(),{selectedRowCount:s}=j();return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[s?e.jsx(Oe,{}):e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(ue,{searchParams:t})}),e.jsx(B,{isFallback:!1})]})}function lt(){return e.jsxs(I,{className:"space-y-4 p-5",children:[e.jsx(Qe,{}),e.jsx(Te,{children:e.jsx(ze,{})})]})}function Qe(){return e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Service Accounts"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Configure automated access for background tasks and integrations."}),e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/project-setup-and-management/connecting-to-zenml/connect-with-a-service-account",className:"link text-text-sm text-primary-400",children:"Learn More"})]})]})}export{lt as default};
@@ -1 +0,0 @@
1
- import{r as i,j as e}from"./@radix-Cdvw4jJ8.js";import{g as o,B as n,r as c,bh as d}from"./index-BgEfQ3_G.js";import{S as h}from"./StackList-Cvxapo0p.js";import{p as m,c as j}from"./persist-BsdEtCkd.js";import{p as l,c as k}from"./persist-CFPbMcJX.js";import{I as p}from"./Infobox-CSBRrM6r.js";import{s as u}from"./index-BBt0LDtR.js";import{b as f}from"./@tanstack-5gTMR7G2.js";import{L as x}from"./@react-router-DeDfXbUF.js";import"./@reactflow-B_iCtR7X.js";import"./plus-Cl0_rCVF.js";import"./refresh-BcTM09NW.js";import"./Pagination-CWnEpSpN.js";import"./chevron-right-double-Dgp_gEsp.js";import"./SearchField-BtUi6cYl.js";import"./index-DWpiv-Ft.js";import"./DisplayDate-8RESqe5H.js";import"./CodeSnippet-Ctplhzdc.js";import"./CollapsibleCard-CBKenz9f.js";import"./chevron-down-jbbQh82s.js";import"./check-circle-C4tYvbtw.js";import"./SheetHeader-DkH7aG9K.js";import"./components-Br2ezRib.js";import"./NumberBox-DtCv7jh3.js";import"./ComponentBadge-Cnecw3qz.js";import"./ComponentIcon-CMiVW-O6.js";import"./layout-DBbfEFBe.js";import"./transform-CeZdrxDZ.js";import"./trash-DP6Tpp_E.js";import"./DialogItem-CRCDpYU6.js";import"./AlertDialogDropdownItem-DsOmO1FH.js";import"./sharedSchema-C_HkejsG.js";import"./index.es-C1gfATPn.js";import"./info-QkbQz4QU.js";import"./stack-detail-query-CNmVZ0Bo.js";function w({setHasResumeableStack:a}){const{success:t,data:s}=m(),r=f({...u.stackDeploymentStack({provider:(s==null?void 0:s.provider)||"aws",stack_name:(s==null?void 0:s.stackName)||"",date_start:s==null?void 0:s.timestamp}),enabled:t,throwOnError:!0});return i.useEffect(()=>{r.data&&(j(),a(!1))},[r.data]),!t||r.isError?null:r.isPending?e.jsx(o,{className:"h-[70px] w-full"}):e.jsx(p,{className:"w-full",children:e.jsxs("section",{className:"flex flex-wrap items-center justify-between gap-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"font-semibold",children:"You have a Stack provision incomplete"}),e.jsx("p",{className:"text-text-sm",children:"Return to the setup and finish the configuration on your cloud provider"})]}),e.jsx("div",{children:e.jsx(n,{className:"w-fit bg-theme-surface-primary",intent:"primary",emphasis:"subtle",asChild:!0,children:e.jsx(x,{to:c.stacks.create.newInfra,children:e.jsx("span",{children:"Review Stack"})})})})]})})}function b({setHasResumeableTerraform:a}){const{success:t,data:s}=l(),r=f({...u.stackDeploymentStack({provider:(s==null?void 0:s.provider)||"aws",stack_name:(s==null?void 0:s.stackName)||"",date_start:s==null?void 0:s.timestamp}),enabled:t,throwOnError:!0});return i.useEffect(()=>{r.data&&(k(),a(!1))},[r.data]),!t||r.isError?null:r.isPending?e.jsx(o,{className:"h-[70px] w-full"}):e.jsx(p,{className:"w-full",children:e.jsxs("section",{className:"flex flex-wrap items-center justify-between gap-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"font-semibold",children:"You have a Terraform Stack provision incomplete"}),e.jsx("p",{className:"text-text-sm",children:"Return to the setup and finish the configuration on your cloud provider"})]}),e.jsx("div",{children:e.jsx(n,{className:"w-fit bg-theme-surface-primary",intent:"primary",emphasis:"subtle",asChild:!0,children:e.jsx(x,{to:c.stacks.create.terraform,children:e.jsx("span",{children:"Review Stack"})})})})]})})}function v(){const[a,t]=i.useState(m().success),[s,r]=i.useState(l().success);return!a&&!s?null:e.jsxs("div",{className:"space-y-5",children:[a&&e.jsx(w,{setHasResumeableStack:t}),s&&e.jsx(b,{setHasResumeableTerraform:r})]})}function te(){const{setTourState:a,tourState:{tourActive:t}}=d();return i.useEffect(()=>{t&&a(s=>({...s,run:!0,stepIndex:s.stepIndex}))},[t]),e.jsxs("div",{className:"space-y-5 py-5",children:[e.jsx(v,{}),e.jsx(h,{})]})}export{te as default};
@@ -1 +0,0 @@
1
- import{r as l,j as e}from"./@radix-Cdvw4jJ8.js";import{u as m,W as B,L as I}from"./LeftSideMenu-DPsCCK3z.js";import{p as C,s as M,c as k}from"./persist-CFPbMcJX.js";import{I as b}from"./Infobox-CSBRrM6r.js";import{W as v,H as g,B as y}from"./Wizard-BHvY75u_.js";import{t as z}from"./zod-XdS2h1ws.js";import{B as p,bf as A,g as P,a$ as F,r as Z,z as _}from"./index-BgEfQ3_G.js";import{u as T,F as L,a as W}from"./index.esm-DhJo3mA6.js";import{S as V}from"./StackName-CFSZL8ec.js";import{S as N}from"./WizardFooter-FQm8y-jP.js";import{R as $,a as H,E as O,C as G}from"./Partials-CfHD6OH5.js";import{b as Q,a as Y}from"./persist-BsdEtCkd.js";import{S as q}from"./logs-CQKlJjo0.js";import{C as j}from"./CodeSnippet-Ctplhzdc.js";import{N as w}from"./NumberBox-DtCv7jh3.js";import{s as E}from"./index-BBt0LDtR.js";import{b as D}from"./@tanstack-5gTMR7G2.js";import{c as J}from"./@react-router-DeDfXbUF.js";import{C as x,P as f}from"./ProviderRadio-tGtie8Gc.js";import{C as h}from"./ProviderIcon-DHejyg7C.js";import"./Tick-Qquvr4P3.js";import"./check-B9QMTa3f.js";import"./info-QkbQz4QU.js";import"./@reactflow-B_iCtR7X.js";import"./package-miExReQl.js";import"./ComponentBadge-Cnecw3qz.js";import"./ComponentIcon-CMiVW-O6.js";import"./layout-DBbfEFBe.js";import"./transform-CeZdrxDZ.js";import"./sharedSchema-C_HkejsG.js";import"./index.es-C1gfATPn.js";import"./stack-detail-query-CNmVZ0Bo.js";import"./gcp-B1I3Qvcx.js";const R=l.createContext(null);function K({children:r}){const{setCurrentStep:t}=m(),[i,s]=l.useState({}),[o,c]=l.useState("");return l.useEffect(()=>{const{success:a,data:n}=C();if(a){t(3),s({location:n.location,provider:n.provider,stackName:n.stackName}),c(n.timestamp);return}t(1)},[C]),e.jsx(R.Provider,{value:{data:i,setData:s,timestamp:o,setTimestamp:c},children:r})}function d(){const r=l.useContext(R);if(r===null)throw new Error("useCreateTerraformContext must be used within an CreateTerraformContext");return r}function U(){const{setData:r,data:t,setTimestamp:i}=d(),{setCurrentStep:s}=m(),o=T({resolver:z(Q,{async:!0}),defaultValues:{region:t.location||"",stackName:t.stackName||""}});function c(a){const n=new Date().toISOString().slice(0,-1);M({location:a.region,provider:t.provider||"aws",stackName:a.stackName,timestamp:n}),i(n),r(u=>({...u,location:a.region,stackName:a.stackName})),s(u=>u+1)}return e.jsx(L,{...o,children:e.jsxs(v,{children:[e.jsx(g,{children:"Review Stack Configuration"}),e.jsx(y,{children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs(b,{className:"text-text-sm",children:[e.jsx("p",{className:"font-semibold",children:"Important"}),e.jsx("p",{children:"This will create new resources in your account. Ensure you have the necessary permissions and are aware of any potential costs."})]}),e.jsxs("form",{id:"configuration-form",onSubmit:o.handleSubmit(c),className:"space-y-5",children:[e.jsx($,{provider:t.provider||"aws"}),e.jsx(V,{})]}),e.jsx(H,{provider:t.provider||"aws"}),e.jsx(O,{provider:t.provider||"aws"})]})}),e.jsx(N,{children:e.jsx(X,{})})]})})}function X(){const{formState:{isSubmitting:r}}=W();return e.jsx(p,{disabled:r,form:"configuration-form",size:"md",children:"Next"})}function ee(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"space-y-1",children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{children:"3"}),e.jsx("span",{className:"text-text-lg font-semibold",children:"Run the following commands"})]})}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Initialize the Terraform configuration."}),e.jsx(j,{code:"terraform init --upgrade"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Run terraform apply to deploy the ZenML stack to Azure."}),e.jsx(j,{code:"terraform apply"})]})]})}function re(){const{data:r,timestamp:t}=d(),{setCurrentStep:i}=m(),s=D({...E.stackDeploymentStack({provider:r.provider,stack_name:r.stackName,date_start:t,terraform:!0}),refetchInterval:5e3,throwOnError:!0});return l.useEffect(()=>{s.data&&(k(),i(o=>o+1))},[s.data]),{fullstackDeployment:s,data:r}}function te(){const{fullstackDeployment:r,data:t}=re();return r.isError?e.jsx("p",{children:"Error fetching Terraform Command"}):r.isPending?e.jsx(P,{className:"h-[200px] w-full"}):e.jsx(ae,{provider:t.provider||"aws",stackName:t.stackName||""})}function se(){return e.jsxs("section",{className:"space-y-5 border-t border-theme-border-moderate pt-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(A,{className:"h-5 w-5 fill-primary-400"}),"Waiting for your Terraform script to finish..."]}),e.jsx("p",{className:"text-theme-text-secondary",children:"We are detecting whether your Terraform script ran through successfully. Once the terraform script has finished successfully, come back to check your brand new stack and components ready."})]}),e.jsx(te,{})]})}function ae({stackName:r,provider:t}){return e.jsxs("div",{className:"relative overflow-hidden rounded-md",children:[e.jsx("div",{className:"absolute z-50 h-full w-full bg-neutral-50/50"}),e.jsx(G,{type:t,componentProps:{isLoading:!0,isSuccess:!1,stackName:r}})]})}function oe(){return e.jsxs(v,{children:[e.jsx(g,{children:"Deploy ZenML Stack"}),e.jsx(y,{children:e.jsxs("section",{className:"space-y-5",children:[e.jsx(ne,{}),e.jsx(de,{}),e.jsx(me,{}),e.jsx(ee,{}),e.jsx(se,{})]})}),e.jsxs(N,{displayCancel:!1,children:[e.jsx(ue,{}),e.jsx(ie,{})]})]})}function ie(){return e.jsx(p,{disabled:!0,size:"md",children:"Next"})}function ne(){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(q,{className:"h-5 w-5 fill-primary-400"}),"Configuration"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Follow the steps to deploy your Stack."})]})}function ce(r){switch(r){case"aws":return"https://aws.amazon.com/cli/";case"azure":return"https://learn.microsoft.com/en-us/cli/azure/";case"gcp":return"https://cloud.google.com/sdk/gcloud"}}function le(r){switch(r){case"aws":return"AWS";case"gcp":return"gcloud";case"azure":return"Azure"}}function de(){const{data:r}=d();return e.jsx("div",{className:"space-y-5",children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{children:"1"}),e.jsxs("span",{className:"text-text-lg font-semibold",children:["Login locally with the ",le(r.provider||"aws")," CLI"]})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Make sure you are logged in locally with an account with appropriate permissions."}),e.jsx(p,{asChild:!0,className:"w-fit gap-1",intent:"secondary",emphasis:"subtle",size:"md",children:e.jsxs("a",{rel:"noopener noreferrer",target:"_blank",href:ce(r.provider||"aws"),children:[e.jsx("span",{children:"Learn More"}),e.jsx(F,{className:"h-5 w-5 shrink-0 fill-primary-900"})]})})]})})}function me(){const{data:r}=d();return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{children:"2"}),e.jsx("span",{className:"text-text-lg font-semibold",children:"Create a file with the following configuration"})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Create a file named ",e.jsx("code",{className:"font-mono text-primary-400",children:"main.tf"})," in the Cloud Shell and copy and paste the Terraform configuration below into it."]})]}),r.provider==="gcp"&&e.jsxs(b,{intent:"warning",children:["Please replace ",e.jsx("code",{className:"font-mono text-primary-400",children:"project_id"})," in the following Terraform script with your own one."]}),e.jsx(pe,{})]})}function pe(){const{data:r}=d(),t=D({...E.stackDeploymentConfig({provider:r.provider||"aws",terraform:!0,stack_name:r.stackName,location:r.location}),enabled:!!r.stackName});return t.isError?null:t.isPending?e.jsx(P,{className:"h-[200px] w-full"}):e.jsx(j,{fullWidth:!0,highlightCode:!0,codeClasses:"whitespace-pre-wrap word-break-all",wrap:!0,code:t.data.configuration||""})}function ue(){const r=J();function t(){k(),r(Z.stacks.create.index)}return e.jsx(p,{onClick:()=>t(),intent:"secondary",size:"md",children:"Cancel"})}const xe=_.object({provider:Y});function fe(){const{setData:r,data:t}=d(),{setCurrentStep:i}=m(),s=T({resolver:z(xe),defaultValues:{provider:t.provider||void 0}});function o(c){r(a=>({...a,provider:c.provider})),i(a=>a+1)}return e.jsx(L,{...s,children:e.jsxs(v,{children:[e.jsx(g,{children:"New Cloud infrastructure"}),e.jsx(y,{children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where your want to create your infrastructure. You will be able to remove the ZenML stack at any time."})]}),e.jsxs("form",{id:"provider-form",onSubmit:s.handleSubmit(o),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",children:[e.jsx(x,{id:"aws-provider",...s.register("provider"),value:"aws",children:e.jsx(f,{icon:e.jsx(h,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"Connect your existing S3, ECR, and Sagemaker components to ZenML"})}),e.jsx(x,{id:"gcp-provider",...s.register("provider"),value:"gcp",children:e.jsx(f,{icon:e.jsx(h,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Link your GCS, Artifact Registry, and Vertex AI components to ZenML"})}),e.jsx(x,{id:"azure-provider",...s.register("provider"),value:"azure",children:e.jsx(f,{icon:e.jsx(h,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Integrate ZenML with your Blob Storage, Container Registry, and Azure ML"})})]})]})}),e.jsx(N,{children:e.jsx(he,{})})]})})}function he(){const{formState:{isValid:r}}=W();return e.jsx(p,{form:"provider-form",disabled:!r,size:"md",children:"Next"})}function je(){const{currentStep:r}=m();if(r===1)return e.jsx(fe,{});if(r===2)return e.jsx(U,{});if(r===3)return e.jsx(oe,{})}const S=["Infrastructure Type","Cloud Provider","Review Configuration","Deploy Stack"];function Ke(){return e.jsx(B,{maxSteps:S.length,initialStep:0,children:e.jsx(K,{children:e.jsxs("section",{className:"layout-container flex flex-col gap-5 py-5 xl:flex-row",children:[e.jsx(I,{entries:S}),e.jsx("div",{className:"w-full overflow-y-hidden",children:e.jsx(je,{})})]})})})}export{Ke as default};
@@ -1 +0,0 @@
1
- import{r as p,j as e}from"./@radix-Cdvw4jJ8.js";import{S as j}from"./chevron-down-jbbQh82s.js";import{D as i}from"./DisplayDate-8RESqe5H.js";import{aO as l,g as c,ac as h,ad as f,ae as g,af as y,w as u,G as b,aP as N}from"./index-BgEfQ3_G.js";import{K as n,a as v,V as C,N as E}from"./NestedCollapsible-CMuDIJlp.js";import{a as m,e as w,R as T,E as R}from"./service-connectors-Q8h7-_rG.js";import{R as P}from"./resource-tyes-list-79FqS3LY.js";import{b as d}from"./@tanstack-5gTMR7G2.js";import{a as x}from"./@react-router-DeDfXbUF.js";import"./@reactflow-B_iCtR7X.js";import"./type-guards-CNgPYg8l.js";import"./eye-CbVlAYty.js";import"./CollapsibleCard-CBKenz9f.js";import"./check-circle-C4tYvbtw.js";import"./CodeSnippet-Ctplhzdc.js";function D(){const[a,r]=p.useState(!0),{connectorId:s}=x(),o=d({...l.serviceConnectorDetail(s),throwOnError:!0});if(o.isPending)return e.jsx(c,{className:"h-[300px] w-full"});if(o.isError)return e.jsx("div",{children:"Error"});const t=o.data;return e.jsxs(h,{open:a,onOpenChange:r,children:[e.jsx(f,{className:"flex items-center gap-[10px]",children:e.jsxs(g,{className:"flex w-full items-center gap-[10px] text-text-lg",children:[e.jsx(j,{className:` ${a?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Basic Parameters"]})}),e.jsx(y,{className:"space-y-5 border-t border-theme-border-moderate bg-theme-surface-primary p-5",children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:gap-y-4 lg:grid-cols-3",children:[e.jsx(n,{label:"Name",value:t.name}),e.jsx(A,{connector:t}),e.jsx(O,{connector:t}),e.jsx(S,{connector:t}),e.jsx(_,{connector:t}),e.jsx(I,{connector:t}),e.jsx(Q,{connector:t}),e.jsx(K,{connector:t}),e.jsx(M,{connector:t})]})})]})}function A({connector:a}){var s;const r=(s=a.body)==null?void 0:s.connector_type;return!r||typeof r=="string"?null:e.jsx(n,{label:"Type",value:e.jsxs(u,{size:"sm",rounded:!1,emphasis:"minimal",className:"w-fit gap-0.5 text-theme-text-primary",color:"grey",children:[e.jsx("img",{src:r.logo_url??"",className:"h-4 w-4 shrink-0",alt:r.name}),e.jsx("span",{children:r.name})]})})}function O({connector:a}){var s;const r=m(a);return e.jsx(n,{label:"Auth Method",value:r===void 0?null:e.jsx(u,{size:"sm",rounded:!1,emphasis:"minimal",className:"w-fit text-theme-text-primary",color:"grey",children:e.jsx("span",{children:r.name||((s=a.body)==null?void 0:s.auth_method)})})})}function S({connector:a}){const r=w(a);return e.jsxs(e.Fragment,{children:[e.jsx(v,{children:"Resrouce Types"}),e.jsx(C,{className:"h-auto",children:e.jsx(P,{resourceTypes:r})})]})}function _({connector:a}){return e.jsx(n,{label:"Resource Name",value:e.jsx(T,{connector:a})})}function I({connector:a}){var s;const r=(s=a.resources)==null?void 0:s.user;return e.jsx(n,{label:"Author",value:r?e.jsx(b,{username:N(r)}):null})}function Q({connector:a}){var s;const r=(s=a.body)==null?void 0:s.expires_at;return e.jsx(n,{label:"Expires in",value:r?e.jsx(R,{expires:r}):"Never"})}function K({connector:a}){var s;const r=(s=a.body)==null?void 0:s.created;return e.jsx(n,{label:"Created",value:r?e.jsx("span",{className:"truncate",children:e.jsx(i,{dateString:r})}):null})}function M({connector:a}){var s;const r=(s=a.body)==null?void 0:s.updated;return e.jsx(n,{label:"Updated",value:r?e.jsx("span",{className:"truncate",children:e.jsx(i,{dateString:r})}):null})}function U(){var t;const{connectorId:a}=x(),r=d({...l.serviceConnectorDetail(a),throwOnError:!0});if(r.isPending)return e.jsx(c,{className:"h-[300px] w-full"});if(r.isError)return e.jsx("div",{children:"Error"});const s=r.data,o=m(s);return e.jsx(E,{schema:o==null?void 0:o.config_schema,title:e.jsx("p",{className:"text-text-xl",children:"Configuration"}),data:(t=s.metadata)==null?void 0:t.configuration,isInitialOpen:!0})}function ee(){return e.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[e.jsx("div",{children:e.jsx(D,{})}),e.jsx("div",{className:"space-y-5",children:e.jsx(U,{})})]})}export{ee as default};
@@ -1 +0,0 @@
1
- import{j as e,r as f}from"./@radix-Cdvw4jJ8.js";import{z as d,i as x,j as h,o as N,f as j,F as p,b as m,a as S,C as D,B as C,S as P,V as E}from"./index-BgEfQ3_G.js";import{f as _}from"./@react-router-DeDfXbUF.js";import{E as F}from"./EmptyState-CjrgDtVk.js";import{b as T,c as k}from"./@tanstack-5gTMR7G2.js";import{E as I}from"./Error-BG6f_WRd.js";import{t as V}from"./zod-XdS2h1ws.js";import{u as A,C as z}from"./index.esm-DhJo3mA6.js";import{S as q}from"./check-circle-C4tYvbtw.js";import"./@reactflow-B_iCtR7X.js";const B=d.object({device_id:d.string().optional(),user_code:d.string().optional()});function Y(){const[s]=_(),{device_id:t,user_code:i}=B.parse({device_id:s.get("device_id")||void 0,user_code:s.get("user_code")||void 0});return{user_code:i,device_id:t}}const K=d.object({trustDevice:d.boolean()});function L({deviceId:s,queryParams:t}){return["devices",s,t]}async function R({deviceId:s,queryParams:t}){const i=x(h.devices.detail(s)+"?"+N(t)),r=await j(i,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(!r.ok)throw new p({message:"Error while fetching Device details",status:r.status,statusText:r.statusText});return r.json()}function W(s,t){return T({queryKey:L(s),queryFn:async()=>R(s),...t})}function G({device:s}){var t,i,r,a,c,n;return e.jsx(m,{className:"w-full p-5",children:e.jsxs("dl",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("dt",{children:"IP Address"}),e.jsx("dd",{children:(t=s.body)==null?void 0:t.ip_address})]}),((i=s.metadata)==null?void 0:i.city)&&((r=s.metadata)==null?void 0:r.country)&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("dt",{children:"Location"}),e.jsxs("dd",{children:[(a=s.metadata)==null?void 0:a.city,", ",(c=s.metadata)==null?void 0:c.country]})]}),e.jsxs("div",{className:"flex min-w-0 items-center justify-between",children:[e.jsx("dt",{children:"Hostname"}),e.jsx("dd",{className:"truncate",children:(n=s.body)==null?void 0:n.hostname})]})]})})}async function H({deviceId:s,payload:t}){const i=x(h.devices.verify(s)),r=await j(i,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const a=await r.json().then(c=>c.detail).catch(()=>["","Failed to verify device."]);throw new p({status:r.status,statusText:r.statusText,message:a[1]||"Failed to verify device."})}return r.json()}function J(s){return k({mutationFn:async t=>H(t),...s})}function M({deviceId:s,user_code:t,setSuccess:i}){const r=f.useId(),{handleSubmit:a,formState:{isValid:c},control:n}=A({resolver:V(K),defaultValues:{trustDevice:!1}}),{toast:l}=S(),{mutate:v,isPending:y}=J({onSuccess:()=>{i(!0)},onError:o=>{o instanceof Error&&l({status:"error",emphasis:"subtle",icon:e.jsx(P,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:o.message,rounded:!0})}});function g(o){v({deviceId:s,payload:{user_code:t,trusted_device:o.trustDevice}})}return e.jsxs("form",{onSubmit:a(g),className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(z,{control:n,name:"trustDevice",render:({field:{onChange:o,value:b}})=>e.jsx(D,{checked:b,onCheckedChange:w=>o(!!w),id:r})}),e.jsxs("label",{htmlFor:r,children:[e.jsx("p",{children:"Trust this device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"We won't ask you again soon on this device."})]})]}),e.jsx(C,{disabled:y||!c,size:"md",className:"flex w-full justify-center",children:"Authorize this device"})]})}function O(){return e.jsxs(m,{className:"flex min-w-[540px] flex-col items-center justify-center space-y-7 px-7 py-9",children:[e.jsx(q,{className:"h-[120px] w-[120px] fill-theme-text-success"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"You successfully added your device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"You may close this screen and return to your CLI."})]})]})}function ae(){const{device_id:s,user_code:t}=Y(),[i,r]=f.useState(!1),{data:a,isPending:c,isError:n,error:l}=W({deviceId:s,queryParams:{user_code:t}},{enabled:!!s&&!!t});return!s||!t?e.jsx(F,{children:e.jsx("p",{children:"Invalid device verification link."})}):n?e.jsx(u,{children:e.jsx(I,{isAlertCircle:!0,err:l})}):c?e.jsx(u,{children:e.jsx(E,{})}):i?e.jsx(O,{}):e.jsx(u,{children:e.jsxs("div",{className:"w-full space-y-7",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-0.5 text-display-xs font-semibold",children:"Authorize a new device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"You are logging in from a new device."})]}),e.jsx(G,{device:a}),e.jsx(M,{setSuccess:r,deviceId:s,user_code:t})]})})}function u({children:s}){return e.jsx(m,{className:"flex w-full min-w-[540px] flex-col items-center justify-center gap-5 p-7",children:s})}export{ae as default};