zenml-nightly 0.73.0.dev20250205__py3-none-any.whl → 0.74.0.dev20250207__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 (164) hide show
  1. zenml/VERSION +1 -1
  2. zenml/cli/utils.py +42 -53
  3. zenml/client.py +6 -2
  4. zenml/models/__init__.py +4 -2
  5. zenml/models/v2/base/filter.py +34 -11
  6. zenml/models/v2/base/scoped.py +4 -4
  7. zenml/models/v2/core/artifact.py +3 -3
  8. zenml/models/v2/core/artifact_version.py +22 -5
  9. zenml/models/v2/core/model.py +13 -3
  10. zenml/models/v2/core/model_version.py +13 -3
  11. zenml/models/v2/core/pipeline.py +11 -4
  12. zenml/models/v2/core/pipeline_run.py +20 -7
  13. zenml/models/v2/core/run_template.py +13 -3
  14. zenml/models/v2/core/step_run.py +9 -2
  15. zenml/pipelines/pipeline_definition.py +28 -12
  16. zenml/zen_server/dashboard/assets/{404-c8OuXDAT.js → 404-0leSZ7Vv.js} +1 -1
  17. zenml/zen_server/dashboard/assets/@radix-B7OY3d6N.js +85 -0
  18. zenml/zen_server/dashboard/assets/{@react-router-B3Z5rLr2.js → @react-router-CiF9laDg.js} +1 -1
  19. zenml/zen_server/dashboard/assets/@reactflow-DgwdIYyq.js +17 -0
  20. zenml/zen_server/dashboard/assets/@tanstack-W1pLDzVg.js +22 -0
  21. zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-8yPFDxEI.js → AlertDialogDropdownItem-BS4AoVte.js} +1 -1
  22. zenml/zen_server/dashboard/assets/CodeSnippet-CK2z-88v.js +9 -0
  23. zenml/zen_server/dashboard/assets/{CollapsibleCard-TiI4lId1.js → CollapsibleCard-BAuAdAje.js} +1 -1
  24. zenml/zen_server/dashboard/assets/{Commands-BcR2Arie.js → Commands-vjMqENS8.js} +1 -1
  25. zenml/zen_server/dashboard/assets/{ComponentBadge-BqQNUZgb.js → ComponentBadge-CNIM1NH_.js} +1 -1
  26. zenml/zen_server/dashboard/assets/{CopyButton-DCiXO3JC.js → CopyButton-BQf5nLgq.js} +1 -1
  27. zenml/zen_server/dashboard/assets/CsvVizualization-D77lRMYi.js +15 -0
  28. zenml/zen_server/dashboard/assets/{DeleteAlertDialog-DrPjHtXX.js → DeleteAlertDialog-CcDX1Hm_.js} +1 -1
  29. zenml/zen_server/dashboard/assets/{DialogItem-BYG7d_M2.js → DialogItem-L8-LNKgK.js} +1 -1
  30. zenml/zen_server/dashboard/assets/{DisplayDate-CDMUcQHS.js → DisplayDate-CZV8x8pB.js} +1 -1
  31. zenml/zen_server/dashboard/assets/{EmptyState-BzdlCwp3.js → EmptyState-C8-mkRwm.js} +1 -1
  32. zenml/zen_server/dashboard/assets/{Error-C1zbWr19.js → Error-DPRIglzA.js} +1 -1
  33. zenml/zen_server/dashboard/assets/{ExecutionStatus-Ct9srgHC.js → ExecutionStatus-DHmX6Vtj.js} +1 -1
  34. zenml/zen_server/dashboard/assets/{Helpbox-Bm_1Zx9f.js → Helpbox-DWOXAebr.js} +1 -1
  35. zenml/zen_server/dashboard/assets/{Infobox-OQdkCLSP.js → Infobox-Ls_918eD.js} +1 -1
  36. zenml/zen_server/dashboard/assets/{InlineAvatar-CQNjKoEQ.js → InlineAvatar-B9O7QxVo.js} +1 -1
  37. zenml/zen_server/dashboard/assets/{Lock-CYYy18Mm.js → Lock-6WGsAdiw.js} +1 -1
  38. zenml/zen_server/dashboard/assets/MarkdownVisualization-CPm4B45C.js +14 -0
  39. zenml/zen_server/dashboard/assets/{NestedCollapsible-DDgd2SGb.js → NestedCollapsible-CyUu7Vrm.js} +1 -1
  40. zenml/zen_server/dashboard/assets/{NumberBox-Dtp3J6g5.js → NumberBox-CqUodACv.js} +1 -1
  41. zenml/zen_server/dashboard/assets/{Partials-MD3e95Dk.js → Partials-CP_ZenWO.js} +1 -1
  42. zenml/zen_server/dashboard/assets/{PasswordChecker-B0nadgh6.js → PasswordChecker-Xh6Egpx9.js} +1 -1
  43. zenml/zen_server/dashboard/assets/ProBadge-DJCjz8Ox.js +1 -0
  44. zenml/zen_server/dashboard/assets/{ProCta-W2PEvNow.js → ProCta-BsYjjdUZ.js} +1 -1
  45. zenml/zen_server/dashboard/assets/{ProviderIcon-DfDUOeAy.js → ProviderIcon-C_XK4oaW.js} +1 -1
  46. zenml/zen_server/dashboard/assets/{ProviderRadio-B81Elxrc.js → ProviderRadio-C9z7SJnN.js} +1 -1
  47. zenml/zen_server/dashboard/assets/{RunSelector-DOXgdry5.js → RunSelector-C-YzhiVb.js} +1 -1
  48. zenml/zen_server/dashboard/assets/{RunsBody-Bnx2fxub.js → RunsBody-CNd_ej8-.js} +1 -1
  49. zenml/zen_server/dashboard/assets/{SearchField-Yjv-KRW4.js → SearchField-BYL1oNec.js} +1 -1
  50. zenml/zen_server/dashboard/assets/{SecretTooltip-EKpMlG2f.js → SecretTooltip-CYL2o5Gs.js} +1 -1
  51. zenml/zen_server/dashboard/assets/{SetPassword-CDLy57PZ.js → SetPassword-BnaLppIC.js} +1 -1
  52. zenml/zen_server/dashboard/assets/{StackList-DKQaLDo4.js → StackList-6XLpNMwt.js} +1 -1
  53. zenml/zen_server/dashboard/assets/{Tabs-B5E-o_h6.js → Tabs-BewshUAE.js} +1 -1
  54. zenml/zen_server/dashboard/assets/{Tick-DSYBiuXU.js → Tick-DHVI3HP0.js} +1 -1
  55. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-HBNOeyoP.js → UpdatePasswordSchemas-CtzucewX.js} +1 -1
  56. zenml/zen_server/dashboard/assets/{UsageReason-DXtPS5nE.js → UsageReason-Bwhjhrv_.js} +1 -1
  57. zenml/zen_server/dashboard/assets/{WizardFooter-_1VSMZ_c.js → WizardFooter-CPk11vwc.js} +1 -1
  58. zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-D0qDLdKB.js → all-pipeline-runs-query-Dh4L44hJ.js} +1 -1
  59. zenml/zen_server/dashboard/assets/{check-DloQpStc.js → check-BB0dVtdW.js} +1 -1
  60. zenml/zen_server/dashboard/assets/{check-circle-jNbX5-sR.js → check-circle-ByvKqRS_.js} +1 -1
  61. zenml/zen_server/dashboard/assets/{chevron-down-6JyMkfjR.js → chevron-down-DAWlSNuH.js} +1 -1
  62. zenml/zen_server/dashboard/assets/{chevron-right-double-D7ojK9Co.js → chevron-right-double-C5DtVuMS.js} +1 -1
  63. zenml/zen_server/dashboard/assets/clock-BWL9qBKt.js +1 -0
  64. zenml/zen_server/dashboard/assets/{code-browser-CUFUIHfp.js → code-browser-C6DP7a-M.js} +1 -1
  65. zenml/zen_server/dashboard/assets/{copy-C8XQA2Ug.js → copy-DmyMnHSy.js} +1 -1
  66. zenml/zen_server/dashboard/assets/{create-stack-7JzgAYAm.js → create-stack-BdNm_XEl.js} +1 -1
  67. zenml/zen_server/dashboard/assets/{delete-run-CUdtYFLl.js → delete-run-CUo7vxbD.js} +1 -1
  68. zenml/zen_server/dashboard/assets/{docker-BdA9vrnW.js → docker-C2dCztnc.js} +1 -1
  69. zenml/zen_server/dashboard/assets/{dots-horizontal-otGBOSDJ.js → dots-horizontal-C6QCz7jg.js} +1 -1
  70. zenml/zen_server/dashboard/assets/{form-schemas-B6PCV3Y4.js → form-schemas-B4cZxcUy.js} +1 -1
  71. zenml/zen_server/dashboard/assets/{gcp-CFtm4BA7.js → gcp-B1H0QrG5.js} +1 -1
  72. zenml/zen_server/dashboard/assets/{help-Cc9bBIJH.js → help-CgM5zwtY.js} +1 -1
  73. zenml/zen_server/dashboard/assets/index-4aOgYud0.js +1 -0
  74. zenml/zen_server/dashboard/assets/{index-CJ5IfeAl.js → index-6CSA2ij5.js} +1 -1
  75. zenml/zen_server/dashboard/assets/{index-Ceyzb1yI.js → index-BOeKQ3N4.js} +1 -1
  76. zenml/zen_server/dashboard/assets/{index-D4yoZ_gH.js → index-Cf1Ph5ra.js} +1 -1
  77. zenml/zen_server/dashboard/assets/index-D25WcEJJ.js +55 -0
  78. zenml/zen_server/dashboard/assets/index-apknmtn7.css +1 -0
  79. zenml/zen_server/dashboard/assets/index.esm-C5jC4e7W.js +1 -0
  80. zenml/zen_server/dashboard/assets/{key-icon-aH-QIa5R.js → key-icon-DuqxBBkq.js} +1 -1
  81. zenml/zen_server/dashboard/assets/{kubernetes-B2wmAJ1d.js → kubernetes-Bn54mlK-.js} +1 -1
  82. zenml/zen_server/dashboard/assets/{layout-BtHBmE4w.js → layout-Cj7MRWSi.js} +1 -1
  83. zenml/zen_server/dashboard/assets/{link-external-b9AXw_sW.js → link-external-CZxZlXqi.js} +1 -1
  84. zenml/zen_server/dashboard/assets/{login-mutation-BaeJ7MAg.js → login-mutation-EQPLh5Ne.js} +1 -1
  85. zenml/zen_server/dashboard/assets/{logs-WMSM52RF.js → logs-DYV_bf7Q.js} +1 -1
  86. zenml/zen_server/dashboard/assets/{not-found-MGptrNBk.js → not-found-DrxGMGNL.js} +1 -1
  87. zenml/zen_server/dashboard/assets/{package-C6uypY4h.js → package-MUwoWZFx.js} +1 -1
  88. zenml/zen_server/dashboard/assets/{page-C37IDa-Q.js → page-9AiMoKly.js} +1 -1
  89. zenml/zen_server/dashboard/assets/{page-yNh6PQKt.js → page-BF9z97Jf.js} +1 -1
  90. zenml/zen_server/dashboard/assets/{page-Aeu3v0MQ.js → page-BK6mVOKJ.js} +1 -1
  91. zenml/zen_server/dashboard/assets/{page-Ox-eC1ik.js → page-BK722dMv.js} +1 -1
  92. zenml/zen_server/dashboard/assets/{page-CbwI6emp.js → page-BNXv13PD.js} +1 -1
  93. zenml/zen_server/dashboard/assets/page-BmzgDMUV.js +1 -0
  94. zenml/zen_server/dashboard/assets/{page-Dv5lN2w7.js → page-BrUvz6Ag.js} +1 -1
  95. zenml/zen_server/dashboard/assets/{page-DyAuja95.js → page-Bt_6RgeM.js} +1 -1
  96. zenml/zen_server/dashboard/assets/{page-DKQ3wZgr.js → page-C2IJq-kV.js} +1 -1
  97. zenml/zen_server/dashboard/assets/{page-BhOXn-s9.js → page-C2KxJ-Cc.js} +1 -1
  98. zenml/zen_server/dashboard/assets/page-C9v0QDj8.js +2 -0
  99. zenml/zen_server/dashboard/assets/{page-CeNL9JWi.js → page-CHdCb7Xx.js} +1 -1
  100. zenml/zen_server/dashboard/assets/{page-CkPwPmLZ.js → page-CdQ_DdH1.js} +1 -1
  101. zenml/zen_server/dashboard/assets/page-ChFcVUFX.js +1 -0
  102. zenml/zen_server/dashboard/assets/{page-BXgXP-Qj.js → page-ChMOMdKd.js} +1 -1
  103. zenml/zen_server/dashboard/assets/{page-BbljjC-k.js → page-ChxtdsVY.js} +1 -1
  104. zenml/zen_server/dashboard/assets/{page-BXrtxEbw.js → page-Cj5NSnW5.js} +1 -1
  105. zenml/zen_server/dashboard/assets/{page-CXPc-HN1.js → page-Cz58X7s5.js} +2 -2
  106. zenml/zen_server/dashboard/assets/{page-D-KPzeQb.js → page-D-qjN5JP.js} +1 -1
  107. zenml/zen_server/dashboard/assets/{page-khp8QJ6b.js → page-D1jrbald.js} +1 -1
  108. zenml/zen_server/dashboard/assets/{page-CBiT2Ox9.js → page-DRYjt60M.js} +1 -1
  109. zenml/zen_server/dashboard/assets/{page-BKwwfTNy.js → page-De3oGQ3E.js} +1 -1
  110. zenml/zen_server/dashboard/assets/{page-BaUDR9Ri.js → page-DjO6yHuW.js} +1 -1
  111. zenml/zen_server/dashboard/assets/page-DzvVg_ZM.js +1 -0
  112. zenml/zen_server/dashboard/assets/{page-C4JpDeUM.js → page-JZ8WXQfh.js} +1 -1
  113. zenml/zen_server/dashboard/assets/{page-DbW8MfQ4.js → page-VUTBxySs.js} +1 -1
  114. zenml/zen_server/dashboard/assets/{page-CmJU3Gqo.js → page-YhLt4PLe.js} +1 -1
  115. zenml/zen_server/dashboard/assets/{page-CoFVtzhG.js → page-_ijqeiyw.js} +1 -1
  116. zenml/zen_server/dashboard/assets/page-ezpoc4vG.js +2 -0
  117. zenml/zen_server/dashboard/assets/{page-CB2_GdBA.js → page-fVsaiQi7.js} +1 -1
  118. zenml/zen_server/dashboard/assets/{page-Dvbq1BoF.js → page-q2kbm2x8.js} +1 -1
  119. zenml/zen_server/dashboard/assets/{page-BUjw8Tp1.js → page-qw7ivMVQ.js} +1 -1
  120. zenml/zen_server/dashboard/assets/{page-DzrdL2v1.js → page-y8flqx2D.js} +1 -1
  121. zenml/zen_server/dashboard/assets/{persist-K7AY0ju4.js → persist-CDPcIIlF.js} +1 -1
  122. zenml/zen_server/dashboard/assets/{persist-DBTFy--v.js → persist-Hxrm9o7f.js} +1 -1
  123. zenml/zen_server/dashboard/assets/{plus-tf1V2hTJ.js → plus-noRapLU5.js} +1 -1
  124. zenml/zen_server/dashboard/assets/react-error-boundary.esm-DOkSniBS.js +1 -0
  125. zenml/zen_server/dashboard/assets/{refresh-BjOeWlEq.js → refresh-Jr_advur.js} +1 -1
  126. zenml/zen_server/dashboard/assets/{rocket-DjT2cDvG.js → rocket-GOlMupOS.js} +1 -1
  127. zenml/zen_server/dashboard/assets/{service-BvOYLH5b.js → service-Db_ee3ql.js} +1 -1
  128. zenml/zen_server/dashboard/assets/sharedSchema-BE8kPXOv.js +14 -0
  129. zenml/zen_server/dashboard/assets/{stack-detail-query-DMJoxwgv.js → stack-detail-query-B2rvP4uR.js} +1 -1
  130. zenml/zen_server/dashboard/assets/{tick-circle-BEX_Tp4v.js → tick-circle-DKkiYi_R.js} +1 -1
  131. zenml/zen_server/dashboard/assets/{trash-arLUMWMS.js → trash-Dm8g1gZ8.js} +1 -1
  132. zenml/zen_server/dashboard/assets/{update-server-settings-mutation-ATZDNNZk.js → update-server-settings-mutation-Bgnr2Ssw.js} +1 -1
  133. zenml/zen_server/dashboard/assets/{url-BWJXzuI4.js → url-1R6qfphK.js} +1 -1
  134. zenml/zen_server/dashboard/assets/{zod-BwEbpOxH.js → zod-C2FdaFLe.js} +1 -1
  135. zenml/zen_server/dashboard/index.html +8 -8
  136. zenml/zen_stores/migrations/versions/0.74.0_release.py +23 -0
  137. zenml/zen_stores/schemas/artifact_schemas.py +31 -4
  138. zenml/zen_stores/schemas/model_schemas.py +31 -6
  139. zenml/zen_stores/schemas/pipeline_run_schemas.py +1 -1
  140. zenml/zen_stores/schemas/pipeline_schemas.py +35 -8
  141. zenml/zen_stores/schemas/run_template_schemas.py +42 -14
  142. {zenml_nightly-0.73.0.dev20250205.dist-info → zenml_nightly-0.74.0.dev20250207.dist-info}/METADATA +2 -2
  143. {zenml_nightly-0.73.0.dev20250205.dist-info → zenml_nightly-0.74.0.dev20250207.dist-info}/RECORD +148 -144
  144. zenml/zen_server/dashboard/assets/@radix-DeK6qiuw.js +0 -85
  145. zenml/zen_server/dashboard/assets/@reactflow-6JPoencd.js +0 -17
  146. zenml/zen_server/dashboard/assets/@tanstack-DT5WLu9C.js +0 -22
  147. zenml/zen_server/dashboard/assets/CodeSnippet-Qh1ae_DJ.js +0 -9
  148. zenml/zen_server/dashboard/assets/CsvVizualization-O9cVIaL8.js +0 -15
  149. zenml/zen_server/dashboard/assets/MarkdownVisualization-ylXaAxev.js +0 -14
  150. zenml/zen_server/dashboard/assets/ProBadge-D784iVNC.js +0 -1
  151. zenml/zen_server/dashboard/assets/index-B6U0OkEN.css +0 -1
  152. zenml/zen_server/dashboard/assets/index-CxO6541P.js +0 -55
  153. zenml/zen_server/dashboard/assets/index-Uu49AX48.js +0 -1
  154. zenml/zen_server/dashboard/assets/index.esm-Dy6Z9Ung.js +0 -1
  155. zenml/zen_server/dashboard/assets/page-BCgEdmhP.js +0 -1
  156. zenml/zen_server/dashboard/assets/page-DWWhxCoF.js +0 -1
  157. zenml/zen_server/dashboard/assets/page-I2B4Ocv8.js +0 -1
  158. zenml/zen_server/dashboard/assets/page-OdjGauvw.js +0 -2
  159. zenml/zen_server/dashboard/assets/sharedSchema-xJDsJNgJ.js +0 -14
  160. /zenml/zen_server/dashboard/assets/{@reactflow-C26Olbza.css → @reactflow-Fd0xVSp_.css} +0 -0
  161. /zenml/zen_server/dashboard/assets/{CodeSnippet-Bbx6fIb6.css → CodeSnippet-CK5CxKct.css} +0 -0
  162. {zenml_nightly-0.73.0.dev20250205.dist-info → zenml_nightly-0.74.0.dev20250207.dist-info}/LICENSE +0 -0
  163. {zenml_nightly-0.73.0.dev20250205.dist-info → zenml_nightly-0.74.0.dev20250207.dist-info}/WHEEL +0 -0
  164. {zenml_nightly-0.73.0.dev20250205.dist-info → zenml_nightly-0.74.0.dev20250207.dist-info}/entry_points.txt +0 -0
@@ -1 +1 @@
1
- import{r as i,j as e}from"./@radix-DeK6qiuw.js";import{f as p,K as N,U as y,aU as j,c as C,S as d,ab as g,aV as w,e as b,m as S,as as k,n as v,a1 as L,aA as z,a3 as u,a4 as M,B as H,aR as f,r as R,aF as V}from"./index-CxO6541P.js";import{S as E}from"./package-C6uypY4h.js";import{S as Z}from"./help-Cc9bBIJH.js";import{S as _}from"./plus-tf1V2hTJ.js";import{C as o}from"./CodeSnippet-Qh1ae_DJ.js";import{H as h}from"./Helpbox-Bm_1Zx9f.js";import{S as D}from"./chevron-down-6JyMkfjR.js";import{T as I}from"./Tick-DSYBiuXU.js";import{S as P}from"./chevron-right-double-D7ojK9Co.js";import{g as O}from"./login-command-CkqxPtV3.js";import{L as B}from"./@react-router-B3Z5rLr2.js";import"./@tanstack-DT5WLu9C.js";import"./@reactflow-6JPoencd.js";import"./copy-C8XQA2Ug.js";import"./check-DloQpStc.js";const A=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.7587 1L14 1C14.2652 1 14.5196 1.10536 14.7071 1.29289L20.7071 7.29289C20.8946 7.48043 21 7.73478 21 8V17.2413C21 18.0463 21 18.7106 20.9558 19.2518C20.9099 19.8139 20.8113 20.3306 20.564 20.816C20.1805 21.5686 19.5686 22.1805 18.816 22.564C18.3306 22.8113 17.8139 22.9099 17.2518 22.9558C16.7106 23 16.0463 23 15.2413 23H8.75868C7.95372 23 7.28936 23 6.74817 22.9558C6.18608 22.9099 5.66937 22.8113 5.18404 22.564C4.43139 22.1805 3.81947 21.5686 3.43597 20.816C3.18868 20.3306 3.09012 19.8139 3.04419 19.2518C2.99998 18.7106 2.99999 18.0463 3 17.2413V6.7587C2.99999 5.95373 2.99998 5.28937 3.04419 4.74817C3.09012 4.18608 3.18868 3.66937 3.43597 3.18404C3.81947 2.43139 4.43139 1.81947 5.18404 1.43597C5.66937 1.18868 6.18608 1.09012 6.74817 1.04419C7.28937 0.999977 7.95373 0.999988 8.7587 1ZM6.91104 3.03755C6.47262 3.07337 6.24842 3.1383 6.09202 3.21799C5.7157 3.40973 5.40973 3.7157 5.21799 4.09202C5.1383 4.24842 5.07337 4.47262 5.03755 4.91104C5.00078 5.36113 5 5.94342 5 6.8V17.2C5 18.0566 5.00078 18.6389 5.03755 19.089C5.07337 19.5274 5.1383 19.7516 5.21799 19.908C5.40973 20.2843 5.7157 20.5903 6.09202 20.782C6.24842 20.8617 6.47262 20.9266 6.91104 20.9624C7.36113 20.9992 7.94342 21 8.8 21H15.2C16.0566 21 16.6389 20.9992 17.089 20.9624C17.5274 20.9266 17.7516 20.8617 17.908 20.782C18.2843 20.5903 18.5903 20.2843 18.782 19.908C18.8617 19.7516 18.9266 19.5274 18.9624 19.089C18.9992 18.6389 19 18.0566 19 17.2V9.00007L15.5681 9.00007C15.3157 9.0001 15.0699 9.00013 14.8618 8.98313C14.6332 8.96445 14.3634 8.92038 14.092 8.78208C13.7157 8.59034 13.4097 8.28438 13.218 7.90805C13.0797 7.63663 13.0356 7.3669 13.0169 7.1383C12.9999 6.93014 13 6.68434 13 6.43195L13 3H8.8C7.94342 3 7.36113 3.00078 6.91104 3.03755ZM15 4.41421L17.5859 7.00007H15.6C15.3035 7.00007 15.1412 6.99929 15.0246 6.98977C15.02 6.98939 15.0156 6.98901 15.0114 6.98862C15.0111 6.98447 15.0107 6.98008 15.0103 6.97544C15.0008 6.85885 15 6.6966 15 6.40007V4.41421ZM7 9C7 8.44772 7.44772 8 8 8H10C10.5523 8 11 8.44772 11 9C11 9.55229 10.5523 10 10 10H8C7.44772 10 7 9.55229 7 9ZM7 13C7 12.4477 7.44772 12 8 12H16C16.5523 12 17 12.4477 17 13C17 13.5523 16.5523 14 16 14H8C7.44772 14 7 13.5523 7 13ZM7 17C7 16.4477 7.44772 16 8 16H16C16.5523 16 17 16.4477 17 17C17 17.5523 16.5523 18 16 18H8C7.44772 18 7 17.5523 7 17Z"})),T=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:"M6.75873 3H17.2413C18.0463 2.99999 18.7107 2.99998 19.2519 3.04419C19.8139 3.09012 20.3307 3.18868 20.816 3.43597C21.5686 3.81947 22.1806 4.43139 22.5641 5.18404C22.8027 5.65238 22.9028 6.14994 22.9508 6.68931C23.0043 6.8527 23.0136 7.02505 22.9819 7.18959C23 7.63971 23 8.16035 23 8.75868V15.2413C23 16.0463 23 16.7106 22.9558 17.2518C22.9099 17.8139 22.8113 18.3306 22.5641 18.816C22.1806 19.5686 21.5686 20.1805 20.816 20.564C20.3307 20.8113 19.8139 20.9099 19.2519 20.9558C18.7107 21 18.0463 21 17.2413 21H6.7587C5.95374 21 5.28939 21 4.7482 20.9558C4.1861 20.9099 3.6694 20.8113 3.18406 20.564C2.43141 20.1805 1.81949 19.5686 1.436 18.816C1.18871 18.3306 1.09014 17.8139 1.04422 17.2518C1 16.7106 1.00001 16.0463 1.00002 15.2413V8.7587C1.00001 8.16037 1.00001 7.63972 1.01816 7.1896C0.986405 7.02505 0.995778 6.85269 1.04924 6.6893C1.09723 6.14993 1.19737 5.65238 1.436 5.18404C1.81949 4.43139 2.43141 3.81947 3.18406 3.43597C3.6694 3.18868 4.1861 3.09012 4.7482 3.04419C5.28939 2.99998 5.95376 2.99999 6.75873 3ZM3.00002 8.92066V15.2C3.00002 16.0566 3.0008 16.6389 3.03758 17.089C3.0734 17.5274 3.13832 17.7516 3.21801 17.908C3.40976 18.2843 3.71572 18.5903 4.09204 18.782C4.24844 18.8617 4.47265 18.9266 4.91106 18.9624C5.36115 18.9992 5.94345 19 6.80002 19H17.2C18.0566 19 18.6389 18.9992 19.089 18.9624C19.5274 18.9266 19.7516 18.8617 19.908 18.782C20.2843 18.5903 20.5903 18.2843 20.782 17.908C20.8617 17.7516 20.9267 17.5274 20.9625 17.089C20.9992 16.6389 21 16.0566 21 15.2V8.92066L14.4086 13.5347C14.3698 13.5618 14.3313 13.5888 14.2932 13.6156C13.7486 13.998 13.2703 14.3338 12.7256 14.4696C12.2492 14.5884 11.7509 14.5884 11.2744 14.4696C10.7297 14.3338 10.2515 13.998 9.70683 13.6156C9.66872 13.5888 9.63029 13.5618 9.59148 13.5347L3.00002 8.92066ZM20.9173 6.53728L13.2616 11.8962C12.5327 12.4065 12.3783 12.495 12.2419 12.529C12.0831 12.5686 11.917 12.5686 11.7582 12.529C11.6218 12.495 11.4673 12.4065 10.7384 11.8962L3.08279 6.53728C3.11852 6.33012 3.165 6.19607 3.21801 6.09202C3.40976 5.7157 3.71572 5.40973 4.09204 5.21799C4.24844 5.1383 4.47265 5.07337 4.91106 5.03755C5.36115 5.00078 5.94345 5 6.80002 5H17.2C18.0566 5 18.6389 5.00078 19.089 5.03755C19.5274 5.07337 19.7516 5.1383 19.908 5.21799C20.2843 5.40973 20.5903 5.7157 20.782 6.09202C20.8351 6.19607 20.8815 6.33012 20.9173 6.53728Z"})),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:"M6.75873 1H14.2413C15.0463 0.999988 15.7107 0.999977 16.2519 1.04419C16.814 1.09012 17.3307 1.18868 17.816 1.43597C18.5686 1.81947 19.1806 2.43139 19.5641 3.18404C19.8113 3.66937 19.9099 4.18608 19.9558 4.74817C20.0001 5.28936 20 5.95372 20 6.75868V10.0176C20.0673 10.0212 20.1323 10.0254 20.1951 10.0306C20.5904 10.0629 20.9836 10.1342 21.362 10.327C21.9265 10.6146 22.3854 11.0735 22.673 11.638C22.8658 12.0164 22.9372 12.4096 22.9695 12.805C23.0001 13.1795 23 13.6343 23 14.1614V16.9463C23 17.3849 23.0001 17.7634 22.9787 18.0767C22.9562 18.4065 22.9067 18.7364 22.7717 19.0623C22.4672 19.7974 21.8832 20.3814 21.1481 20.6859C20.8222 20.8209 20.4922 20.8704 20.1624 20.8929C20.1101 20.8965 20.056 20.8995 20 20.902V22C20 22.3723 19.7932 22.7138 19.4633 22.8862C19.1333 23.0587 18.7349 23.0336 18.4292 22.8211L16.2528 21.3079C15.9176 21.0749 15.8497 21.0324 15.7857 21.0034C15.7118 20.9699 15.6341 20.9455 15.5544 20.9308C15.4852 20.9181 15.4052 20.9143 14.9969 20.9143H13.1615C12.6343 20.9143 12.1796 20.9143 11.805 20.8837C11.4097 20.8514 11.0164 20.7801 10.6381 20.5873C10.0736 20.2997 9.61463 19.8407 9.32701 19.2763C9.13422 18.8979 9.0629 18.5047 9.0306 18.1093C9.01405 17.9068 9.00646 17.6808 9.00297 17.4326L7.61004 18.843C7.41849 19.037 7.23062 19.2272 7.06596 19.3669C6.91972 19.4909 6.61021 19.7413 6.17978 19.7771C5.69995 19.8169 5.23016 19.624 4.9168 19.2585C4.63567 18.9306 4.59142 18.5349 4.57452 18.3439C4.5555 18.1289 4.55554 17.8615 4.55558 17.5889L4.55559 16.0111C4.53636 15.9951 4.49179 15.9682 4.4203 15.9578C2.67169 15.7016 1.2984 14.3283 1.04226 12.5797C0.999782 12.2897 0.999881 11.9625 1.00001 11.5208C1.00002 11.4958 1.00003 11.4703 1.00003 11.4444L1.00003 6.7587C1.00002 5.95373 1.00001 5.28937 1.04422 4.74818C1.09015 4.18608 1.18871 3.66937 1.436 3.18404C1.8195 2.43139 2.43142 1.81947 3.18407 1.43597C3.6694 1.18868 4.18611 1.09012 4.7482 1.04419C5.2894 0.999977 5.95376 0.999988 6.75873 1ZM11 14.9994C11 14.9998 11 15.0003 11 15.0007V16.7143C11 17.2908 11.0008 17.6631 11.024 17.9465C11.0462 18.2181 11.0838 18.3188 11.109 18.3683C11.2049 18.5564 11.3579 18.7094 11.546 18.8053C11.5955 18.8305 11.6962 18.8682 11.9679 18.8904C12.2512 18.9135 12.6235 18.9143 13.2 18.9143H14.9969C15.0181 18.9143 15.0391 18.9143 15.06 18.9143C15.3707 18.914 15.6448 18.9138 15.9169 18.964C16.1561 19.0081 16.3892 19.0811 16.6108 19.1815C16.8628 19.2956 17.0878 19.4523 17.3428 19.6298C17.3598 19.6417 17.3771 19.6537 17.3945 19.6658L18 20.0868V19.9143C18 19.362 18.4477 18.9143 19 18.9143C19.4797 18.9143 19.7893 18.9137 20.0263 18.8976C20.2543 18.882 20.3411 18.8554 20.3827 18.8382C20.6277 18.7367 20.8224 18.542 20.9239 18.297C20.9411 18.2554 20.9678 18.1685 20.9833 17.9405C20.9995 17.7035 21 17.3939 21 16.9143V14.2C21 13.6234 20.9993 13.2512 20.9761 12.9678C20.9539 12.6962 20.9162 12.5955 20.891 12.546C20.7952 12.3578 20.6422 12.2049 20.454 12.109C20.4046 12.0838 20.3039 12.0461 20.0322 12.0239C19.7489 12.0008 19.3766 12 18.8 12H13.2C12.6235 12 12.2512 12.0008 11.9679 12.0239C11.6962 12.0461 11.5955 12.0838 11.546 12.109C11.3579 12.2049 11.2049 12.3578 11.109 12.546C11.0838 12.5955 11.0462 12.6962 11.024 12.9678C11.0008 13.2512 11 13.6234 11 14.2V14.9994ZM9.00003 14.5894L6.55559 17.0644V15.9916C6.55559 14.8142 5.59832 14.109 4.71017 13.9789C3.83586 13.8508 3.14921 13.1642 3.02115 12.2899C3.00269 12.1639 3.00003 11.9959 3.00003 11.4444V6.8C3.00003 5.94342 3.00081 5.36113 3.03758 4.91104C3.0734 4.47262 3.13833 4.24842 3.21802 4.09202C3.40976 3.7157 3.71572 3.40973 4.09205 3.21799C4.24845 3.1383 4.47265 3.07337 4.91107 3.03755C5.36116 3.00078 5.94345 3 6.80003 3H14.2C15.0566 3 15.6389 3.00078 16.089 3.03755C16.5274 3.07337 16.7516 3.1383 16.908 3.21799C17.2843 3.40973 17.5903 3.7157 17.782 4.09202C17.8617 4.24842 17.9267 4.47262 17.9625 4.91104C17.9993 5.36113 18 5.94342 18 6.8V10L13.1615 10C12.6343 9.99998 12.1796 9.99997 11.805 10.0306C11.4097 10.0629 11.0164 10.1342 10.6381 10.327C10.0736 10.6146 9.61463 11.0735 9.32701 11.638C9.13422 12.0164 9.0629 12.4096 9.0306 12.805C9 13.1795 9.00001 13.6343 9.00003 14.1615L9.00003 14.5894Z"}));function U(){const s=[{text:"Send us a message",href:"mailto:cloud@zenml.io",icon:e.jsx(T,{className:"h-5 w-5 fill-neutral-500"})},{text:"Join our Slack Community",href:"https://zenml.io/slack",icon:e.jsx(q,{className:"h-5 w-5 fill-neutral-500"})}];return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Support"}),e.jsx("ul",{className:"space-y-1",children:s.map((t,n)=>e.jsx("li",{children:e.jsx(p,{size:"md",className:"w-fit px-2 text-theme-text-secondary",intent:"secondary",emphasis:"minimal",asChild:!0,children:e.jsxs("a",{target:"_blank",rel:"noopener noreferrer",className:"flex gap-1",href:t.href,children:[t.icon,e.jsx("div",{children:t.text})]})})},n))})]})}function F(){const s=[{text:"Browse our docs",href:"https://docs.zenml.io",icon:e.jsx(A,{className:"h-5 w-5 fill-neutral-500"})},{text:"Discover projects",href:"https://github.com/zenml-io/zenml-projects",icon:e.jsx(E,{className:"h-5 w-5 fill-neutral-500"})},{text:"Navigate our examples",href:"https://github.com/zenml-io/zenml/tree/main/examples/",icon:e.jsx(N,{className:"h-5 w-5 fill-neutral-500"})},{text:"Read our blog",href:"https://zenml.io/blog",icon:e.jsx(y,{className:"h-5 w-5 fill-neutral-500"})}];return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"mb-0.5 text-text-lg font-semibold",children:"Resources"}),e.jsx("ul",{className:"space-y-1",children:s.map((t,n)=>e.jsx("li",{children:e.jsx(p,{size:"md",className:"w-fit px-2 text-theme-text-secondary",intent:"secondary",emphasis:"minimal",asChild:!0,children:e.jsxs("a",{rel:"noopener noreferrer",target:"_blank",className:"flex gap-1",href:t.href,children:[t.icon,e.jsx("div",{children:t.text})]})})},n))})]})}function $(){const s=j(),t=C();if(s.isPending||t.isPending)return e.jsx(d,{className:"h-[32px] w-[150px]"});if(s.isError||t.isError)return null;const n=g(t.data.deployment_type||"other"),r=w(s.data,n),a=r.itemsDone,l=r.totalItems;return e.jsxs(b,{rounded:!1,color:"light-purple",className:"text-text-sm font-semibold",children:[a,"/",l," steps completed"]})}function K(){return e.jsxs("div",{className:"space-between flex flex-col flex-wrap items-center gap-1 space-x-5 overflow-x-hidden lg:flex-row",children:[e.jsxs("div",{className:"flex-1 space-y-1 overflow-x-hidden",children:[e.jsxs("h2",{className:"truncate text-display-xs font-semibold",children:["Welcome to ZenML",e.jsx(J,{})]}),e.jsx("p",{className:"truncate text-display-xs text-theme-text-secondary",children:"You can start by following your quick setup."})]}),e.jsx($,{})]})}function J(){const s=S();if(s.isError)return null;if(s.isPending)return e.jsx(d,{className:"h-6 w-[70px]"});const t=k(s.data);return e.jsx(e.Fragment,{children:t?`, ${t}`:""})}function W({className:s,...t}){return e.jsx("div",{className:v("flex h-[28px] w-[28px] shrink-0 items-center justify-center rounded-rounded border-2 border-warning-300 bg-warning-50",s),...t,children:e.jsx(P,{className:"h-3 w-3 fill-warning-300"})})}function m({completed:s,title:t,children:n,hasDownstream:r,active:a=!1}){const[l,c]=i.useState(a);return i.useEffect(()=>{c(a)},[a]),e.jsxs(L,{disabled:!(r||a||s),open:l,onOpenChange:c,children:[e.jsx("div",{className:"flex w-full flex-col gap-3 bg-theme-surface-primary px-5 py-3",children:e.jsxs("div",{className:"flex w-full justify-between gap-2",children:[s?e.jsx(I,{className:"shrink-0"}):r?e.jsx(W,{}):e.jsx(z,{className:"shrink-0"}),e.jsx(u,{className:"w-full",children:e.jsx(Y,{active:a,skipped:r,title:t,completed:s})}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(u,{children:e.jsx(D,{className:` ${l?"":"-rotate-90"} h-5 w-5 shrink-0 rounded-md fill-neutral-500`})})})]})}),n&&e.jsx(M,{className:"border-t border-theme-border-moderate",children:e.jsxs("div",{className:"flex w-full items-center gap-2 bg-theme-surface-primary p-5",children:[e.jsx("div",{className:"w-[28px] shrink-0"}),e.jsx("div",{className:"w-full min-w-0 flex-1",children:n})]})})]})}function Y({completed:s,title:t,skipped:n,active:r}){return e.jsx("div",{className:"flex w-full items-center justify-between gap-2",children:e.jsx("div",{className:"flex w-full items-center",children:e.jsx("div",{className:v("text-text-xl",{"text-theme-text-tertiary line-through decoration-theme-text-tertiary":s||n,"font-semibold":r,"text-theme-text-secondary":!r&&!s}),children:t})})})}function G({completed:s,hasDownstreamStep:t,active:n}){const{data:r}=C({throwOnError:!0});return e.jsx(m,{active:n,hasDownstream:t,completed:s,title:"Install and log in to ZenML (5 min)",children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Install ZenML"}),e.jsx(o,{code:`pip install "zenml==${r?r.version:e.jsx(d,{className:"w-7"})}"`})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Log in to your ZenML Server"}),e.jsx(o,{code:O((r==null?void 0:r.deployment_type)||"other")})]}),e.jsx(h,{link:"https://docs.zenml.io/user-guide/production-guide/deploying-zenml#connecting-to-a-deployed-zenml"})]})})}function Q({active:s,completed:t,hasDownstreamStep:n}){return e.jsx(m,{active:s,hasDownstream:n,completed:t,title:"Run a pipeline (2 min)",children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Download the quickstart example to your local machine"}),e.jsx(o,{code:"git clone --depth 1 https://github.com/zenml-io/zenml.git && cd zenml/examples/quickstart"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Initialize ZenML in the current directory"}),e.jsx(o,{code:"zenml init"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Install the remaining requirements apart from ZenML"}),e.jsx(o,{code:"pip install -r requirements.txt"})]}),e.jsxs("div",{children:[e.jsxs("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:["Run the training pipeline.",e.jsx("br",{}),"Once it is running, your dashboard will show all the details of the associated run, models, and artifacts."]}),e.jsx(o,{code:"python run.py"})]}),e.jsxs(H,{className:"flex w-full flex-wrap items-center justify-between gap-y-1 p-2",children:[e.jsxs("div",{className:"flex items-center gap-[10px]",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-sm bg-teal-25",children:e.jsx(Z,{className:"h-5 w-5 fill-teal-400"})}),e.jsx("p",{children:"Do you need help?"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:f({intent:"secondary",emphasis:"subtle",size:"md"}),href:"https://github.com/zenml-io/zenml/blob/main/examples/quickstart/README.md",children:"Open the Readme"}),e.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:f({intent:"primary",emphasis:"subtle",size:"md"}),href:"https://docs.zenml.io/user-guide/starter-guide/create-an-ml-pipeline",children:"Browse our docs"})]})]})]})})}function X({completed:s,active:t,hasDownstreamStep:n}){const r=R.stacks.create.index+"?"+new URLSearchParams({origin:"onboarding"}).toString();return e.jsxs(m,{hasDownstream:n,completed:s,title:"Connect to a remote stack (5 min)",active:t,children:[e.jsxs("p",{className:"mb-3",children:["A stack configures how a pipeline is executed"," ",e.jsx(s1,{href:"https://docs.zenml.io/user-guide/production-guide/understand-stacks"})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Connect your Cloud to deploy your ZenML pipelines in a remote stack."}),e.jsx(p,{className:"w-fit",size:"md",asChild:!0,children:e.jsxs(B,{className:"flex",to:r,children:[e.jsx(_,{className:"h-5 w-5 shrink-0 fill-white"}),"Register a remote stack"]})})]}),e.jsx(h,{link:"https://docs.zenml.io/user-guide/production-guide/understand-stacks"})]})]})}function e1({active:s,completed:t,hasDownstreamStep:n}){return e.jsx(m,{hasDownstream:n,completed:t,title:"Run a pipeline in a remote stack (3 min)",active:s,children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Set the new stack"}),e.jsx(o,{wrap:!0,codeClasses:"whitespace-pre-wrap",code:"zenml stack set REMOTE_STACK"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Run the pipeline"}),e.jsx(o,{wrap:!0,codeClasses:"whitespace-pre-wrap",code:"python run.py"})]}),e.jsx("div",{children:e.jsx(h,{link:"https://docs.zenml.io/user-guide/production-guide/understand-stacks"})})]})})}function s1({href:s}){return e.jsx("a",{href:s,rel:"noopener noreferrer",target:"_blank",className:"link text-text-sm font-semibold text-theme-text-brand",children:"Learn more"})}function t1(){const s=j({refetchInterval:5e3}),t=C();if(s.isPending||t.isPending)return e.jsx(d,{className:"h-[200px] w-full"});if(s.isError||t.isError)return null;const n=g(t.data.deployment_type||"other"),{getItem:r}=w(s.data,n),a=r("device_verified"),l=r("pipeline_run"),c=r("stack_with_remote_orchestrator_created"),x=r("pipeline_run_with_remote_orchestrator");return e.jsxs("ul",{className:"space-y-5",children:[!n&&e.jsx("li",{children:e.jsx(G,{active:a.isActive,completed:a.isCompleted,hasDownstreamStep:a.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(Q,{active:l.isActive,completed:l.isCompleted,hasDownstreamStep:l.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(X,{active:c.isActive,completed:c.isCompleted,hasDownstreamStep:c.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(e1,{active:x.isActive,completed:x.isCompleted,hasDownstreamStep:x.hasDownStreamStep})})]})}function g1(){const{setTourState:s,tourState:{tourActive:t}}=V();return i.useEffect(()=>{t&&s(n=>({...n,run:!0,stepIndex:n.stepIndex}))},[t]),e.jsxs("div",{className:"layout-container grid grid-cols-4 gap-5 py-5",children:[e.jsxs("div",{className:"col-span-4 space-y-5 lg:col-span-3",children:[e.jsx(K,{}),e.jsx(t1,{})]}),e.jsxs("div",{className:"col-span-4 space-y-5 lg:col-span-1",children:[e.jsx(U,{}),e.jsx(F,{})]})]})}export{g1 as default};
1
+ import{r as i,j as e}from"./@radix-B7OY3d6N.js";import{f as p,K as N,U as y,aW as j,c as C,S as d,ab as g,aX as w,e as b,m as S,as as k,n as v,a1 as L,aA as z,a3 as u,a4 as H,B as M,aT as f,r as R,aH as E}from"./index-D25WcEJJ.js";import{S as V}from"./package-MUwoWZFx.js";import{S as Z}from"./help-CgM5zwtY.js";import{S as _}from"./plus-noRapLU5.js";import{C as o}from"./CodeSnippet-CK2z-88v.js";import{H as h}from"./Helpbox-DWOXAebr.js";import{S as D}from"./chevron-down-DAWlSNuH.js";import{T as I}from"./Tick-DHVI3HP0.js";import{S as P}from"./chevron-right-double-C5DtVuMS.js";import{g as O}from"./login-command-CkqxPtV3.js";import{L as B}from"./@react-router-CiF9laDg.js";import"./@tanstack-W1pLDzVg.js";import"./@reactflow-DgwdIYyq.js";import"./copy-DmyMnHSy.js";import"./check-BB0dVtdW.js";const T=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.7587 1L14 1C14.2652 1 14.5196 1.10536 14.7071 1.29289L20.7071 7.29289C20.8946 7.48043 21 7.73478 21 8V17.2413C21 18.0463 21 18.7106 20.9558 19.2518C20.9099 19.8139 20.8113 20.3306 20.564 20.816C20.1805 21.5686 19.5686 22.1805 18.816 22.564C18.3306 22.8113 17.8139 22.9099 17.2518 22.9558C16.7106 23 16.0463 23 15.2413 23H8.75868C7.95372 23 7.28936 23 6.74817 22.9558C6.18608 22.9099 5.66937 22.8113 5.18404 22.564C4.43139 22.1805 3.81947 21.5686 3.43597 20.816C3.18868 20.3306 3.09012 19.8139 3.04419 19.2518C2.99998 18.7106 2.99999 18.0463 3 17.2413V6.7587C2.99999 5.95373 2.99998 5.28937 3.04419 4.74817C3.09012 4.18608 3.18868 3.66937 3.43597 3.18404C3.81947 2.43139 4.43139 1.81947 5.18404 1.43597C5.66937 1.18868 6.18608 1.09012 6.74817 1.04419C7.28937 0.999977 7.95373 0.999988 8.7587 1ZM6.91104 3.03755C6.47262 3.07337 6.24842 3.1383 6.09202 3.21799C5.7157 3.40973 5.40973 3.7157 5.21799 4.09202C5.1383 4.24842 5.07337 4.47262 5.03755 4.91104C5.00078 5.36113 5 5.94342 5 6.8V17.2C5 18.0566 5.00078 18.6389 5.03755 19.089C5.07337 19.5274 5.1383 19.7516 5.21799 19.908C5.40973 20.2843 5.7157 20.5903 6.09202 20.782C6.24842 20.8617 6.47262 20.9266 6.91104 20.9624C7.36113 20.9992 7.94342 21 8.8 21H15.2C16.0566 21 16.6389 20.9992 17.089 20.9624C17.5274 20.9266 17.7516 20.8617 17.908 20.782C18.2843 20.5903 18.5903 20.2843 18.782 19.908C18.8617 19.7516 18.9266 19.5274 18.9624 19.089C18.9992 18.6389 19 18.0566 19 17.2V9.00007L15.5681 9.00007C15.3157 9.0001 15.0699 9.00013 14.8618 8.98313C14.6332 8.96445 14.3634 8.92038 14.092 8.78208C13.7157 8.59034 13.4097 8.28438 13.218 7.90805C13.0797 7.63663 13.0356 7.3669 13.0169 7.1383C12.9999 6.93014 13 6.68434 13 6.43195L13 3H8.8C7.94342 3 7.36113 3.00078 6.91104 3.03755ZM15 4.41421L17.5859 7.00007H15.6C15.3035 7.00007 15.1412 6.99929 15.0246 6.98977C15.02 6.98939 15.0156 6.98901 15.0114 6.98862C15.0111 6.98447 15.0107 6.98008 15.0103 6.97544C15.0008 6.85885 15 6.6966 15 6.40007V4.41421ZM7 9C7 8.44772 7.44772 8 8 8H10C10.5523 8 11 8.44772 11 9C11 9.55229 10.5523 10 10 10H8C7.44772 10 7 9.55229 7 9ZM7 13C7 12.4477 7.44772 12 8 12H16C16.5523 12 17 12.4477 17 13C17 13.5523 16.5523 14 16 14H8C7.44772 14 7 13.5523 7 13ZM7 17C7 16.4477 7.44772 16 8 16H16C16.5523 16 17 16.4477 17 17C17 17.5523 16.5523 18 16 18H8C7.44772 18 7 17.5523 7 17Z"})),A=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:"M6.75873 3H17.2413C18.0463 2.99999 18.7107 2.99998 19.2519 3.04419C19.8139 3.09012 20.3307 3.18868 20.816 3.43597C21.5686 3.81947 22.1806 4.43139 22.5641 5.18404C22.8027 5.65238 22.9028 6.14994 22.9508 6.68931C23.0043 6.8527 23.0136 7.02505 22.9819 7.18959C23 7.63971 23 8.16035 23 8.75868V15.2413C23 16.0463 23 16.7106 22.9558 17.2518C22.9099 17.8139 22.8113 18.3306 22.5641 18.816C22.1806 19.5686 21.5686 20.1805 20.816 20.564C20.3307 20.8113 19.8139 20.9099 19.2519 20.9558C18.7107 21 18.0463 21 17.2413 21H6.7587C5.95374 21 5.28939 21 4.7482 20.9558C4.1861 20.9099 3.6694 20.8113 3.18406 20.564C2.43141 20.1805 1.81949 19.5686 1.436 18.816C1.18871 18.3306 1.09014 17.8139 1.04422 17.2518C1 16.7106 1.00001 16.0463 1.00002 15.2413V8.7587C1.00001 8.16037 1.00001 7.63972 1.01816 7.1896C0.986405 7.02505 0.995778 6.85269 1.04924 6.6893C1.09723 6.14993 1.19737 5.65238 1.436 5.18404C1.81949 4.43139 2.43141 3.81947 3.18406 3.43597C3.6694 3.18868 4.1861 3.09012 4.7482 3.04419C5.28939 2.99998 5.95376 2.99999 6.75873 3ZM3.00002 8.92066V15.2C3.00002 16.0566 3.0008 16.6389 3.03758 17.089C3.0734 17.5274 3.13832 17.7516 3.21801 17.908C3.40976 18.2843 3.71572 18.5903 4.09204 18.782C4.24844 18.8617 4.47265 18.9266 4.91106 18.9624C5.36115 18.9992 5.94345 19 6.80002 19H17.2C18.0566 19 18.6389 18.9992 19.089 18.9624C19.5274 18.9266 19.7516 18.8617 19.908 18.782C20.2843 18.5903 20.5903 18.2843 20.782 17.908C20.8617 17.7516 20.9267 17.5274 20.9625 17.089C20.9992 16.6389 21 16.0566 21 15.2V8.92066L14.4086 13.5347C14.3698 13.5618 14.3313 13.5888 14.2932 13.6156C13.7486 13.998 13.2703 14.3338 12.7256 14.4696C12.2492 14.5884 11.7509 14.5884 11.2744 14.4696C10.7297 14.3338 10.2515 13.998 9.70683 13.6156C9.66872 13.5888 9.63029 13.5618 9.59148 13.5347L3.00002 8.92066ZM20.9173 6.53728L13.2616 11.8962C12.5327 12.4065 12.3783 12.495 12.2419 12.529C12.0831 12.5686 11.917 12.5686 11.7582 12.529C11.6218 12.495 11.4673 12.4065 10.7384 11.8962L3.08279 6.53728C3.11852 6.33012 3.165 6.19607 3.21801 6.09202C3.40976 5.7157 3.71572 5.40973 4.09204 5.21799C4.24844 5.1383 4.47265 5.07337 4.91106 5.03755C5.36115 5.00078 5.94345 5 6.80002 5H17.2C18.0566 5 18.6389 5.00078 19.089 5.03755C19.5274 5.07337 19.7516 5.1383 19.908 5.21799C20.2843 5.40973 20.5903 5.7157 20.782 6.09202C20.8351 6.19607 20.8815 6.33012 20.9173 6.53728Z"})),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:"M6.75873 1H14.2413C15.0463 0.999988 15.7107 0.999977 16.2519 1.04419C16.814 1.09012 17.3307 1.18868 17.816 1.43597C18.5686 1.81947 19.1806 2.43139 19.5641 3.18404C19.8113 3.66937 19.9099 4.18608 19.9558 4.74817C20.0001 5.28936 20 5.95372 20 6.75868V10.0176C20.0673 10.0212 20.1323 10.0254 20.1951 10.0306C20.5904 10.0629 20.9836 10.1342 21.362 10.327C21.9265 10.6146 22.3854 11.0735 22.673 11.638C22.8658 12.0164 22.9372 12.4096 22.9695 12.805C23.0001 13.1795 23 13.6343 23 14.1614V16.9463C23 17.3849 23.0001 17.7634 22.9787 18.0767C22.9562 18.4065 22.9067 18.7364 22.7717 19.0623C22.4672 19.7974 21.8832 20.3814 21.1481 20.6859C20.8222 20.8209 20.4922 20.8704 20.1624 20.8929C20.1101 20.8965 20.056 20.8995 20 20.902V22C20 22.3723 19.7932 22.7138 19.4633 22.8862C19.1333 23.0587 18.7349 23.0336 18.4292 22.8211L16.2528 21.3079C15.9176 21.0749 15.8497 21.0324 15.7857 21.0034C15.7118 20.9699 15.6341 20.9455 15.5544 20.9308C15.4852 20.9181 15.4052 20.9143 14.9969 20.9143H13.1615C12.6343 20.9143 12.1796 20.9143 11.805 20.8837C11.4097 20.8514 11.0164 20.7801 10.6381 20.5873C10.0736 20.2997 9.61463 19.8407 9.32701 19.2763C9.13422 18.8979 9.0629 18.5047 9.0306 18.1093C9.01405 17.9068 9.00646 17.6808 9.00297 17.4326L7.61004 18.843C7.41849 19.037 7.23062 19.2272 7.06596 19.3669C6.91972 19.4909 6.61021 19.7413 6.17978 19.7771C5.69995 19.8169 5.23016 19.624 4.9168 19.2585C4.63567 18.9306 4.59142 18.5349 4.57452 18.3439C4.5555 18.1289 4.55554 17.8615 4.55558 17.5889L4.55559 16.0111C4.53636 15.9951 4.49179 15.9682 4.4203 15.9578C2.67169 15.7016 1.2984 14.3283 1.04226 12.5797C0.999782 12.2897 0.999881 11.9625 1.00001 11.5208C1.00002 11.4958 1.00003 11.4703 1.00003 11.4444L1.00003 6.7587C1.00002 5.95373 1.00001 5.28937 1.04422 4.74818C1.09015 4.18608 1.18871 3.66937 1.436 3.18404C1.8195 2.43139 2.43142 1.81947 3.18407 1.43597C3.6694 1.18868 4.18611 1.09012 4.7482 1.04419C5.2894 0.999977 5.95376 0.999988 6.75873 1ZM11 14.9994C11 14.9998 11 15.0003 11 15.0007V16.7143C11 17.2908 11.0008 17.6631 11.024 17.9465C11.0462 18.2181 11.0838 18.3188 11.109 18.3683C11.2049 18.5564 11.3579 18.7094 11.546 18.8053C11.5955 18.8305 11.6962 18.8682 11.9679 18.8904C12.2512 18.9135 12.6235 18.9143 13.2 18.9143H14.9969C15.0181 18.9143 15.0391 18.9143 15.06 18.9143C15.3707 18.914 15.6448 18.9138 15.9169 18.964C16.1561 19.0081 16.3892 19.0811 16.6108 19.1815C16.8628 19.2956 17.0878 19.4523 17.3428 19.6298C17.3598 19.6417 17.3771 19.6537 17.3945 19.6658L18 20.0868V19.9143C18 19.362 18.4477 18.9143 19 18.9143C19.4797 18.9143 19.7893 18.9137 20.0263 18.8976C20.2543 18.882 20.3411 18.8554 20.3827 18.8382C20.6277 18.7367 20.8224 18.542 20.9239 18.297C20.9411 18.2554 20.9678 18.1685 20.9833 17.9405C20.9995 17.7035 21 17.3939 21 16.9143V14.2C21 13.6234 20.9993 13.2512 20.9761 12.9678C20.9539 12.6962 20.9162 12.5955 20.891 12.546C20.7952 12.3578 20.6422 12.2049 20.454 12.109C20.4046 12.0838 20.3039 12.0461 20.0322 12.0239C19.7489 12.0008 19.3766 12 18.8 12H13.2C12.6235 12 12.2512 12.0008 11.9679 12.0239C11.6962 12.0461 11.5955 12.0838 11.546 12.109C11.3579 12.2049 11.2049 12.3578 11.109 12.546C11.0838 12.5955 11.0462 12.6962 11.024 12.9678C11.0008 13.2512 11 13.6234 11 14.2V14.9994ZM9.00003 14.5894L6.55559 17.0644V15.9916C6.55559 14.8142 5.59832 14.109 4.71017 13.9789C3.83586 13.8508 3.14921 13.1642 3.02115 12.2899C3.00269 12.1639 3.00003 11.9959 3.00003 11.4444V6.8C3.00003 5.94342 3.00081 5.36113 3.03758 4.91104C3.0734 4.47262 3.13833 4.24842 3.21802 4.09202C3.40976 3.7157 3.71572 3.40973 4.09205 3.21799C4.24845 3.1383 4.47265 3.07337 4.91107 3.03755C5.36116 3.00078 5.94345 3 6.80003 3H14.2C15.0566 3 15.6389 3.00078 16.089 3.03755C16.5274 3.07337 16.7516 3.1383 16.908 3.21799C17.2843 3.40973 17.5903 3.7157 17.782 4.09202C17.8617 4.24842 17.9267 4.47262 17.9625 4.91104C17.9993 5.36113 18 5.94342 18 6.8V10L13.1615 10C12.6343 9.99998 12.1796 9.99997 11.805 10.0306C11.4097 10.0629 11.0164 10.1342 10.6381 10.327C10.0736 10.6146 9.61463 11.0735 9.32701 11.638C9.13422 12.0164 9.0629 12.4096 9.0306 12.805C9 13.1795 9.00001 13.6343 9.00003 14.1615L9.00003 14.5894Z"}));function U(){const s=[{text:"Send us a message",href:"mailto:cloud@zenml.io",icon:e.jsx(A,{className:"h-5 w-5 fill-neutral-500"})},{text:"Join our Slack Community",href:"https://zenml.io/slack",icon:e.jsx(q,{className:"h-5 w-5 fill-neutral-500"})}];return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Support"}),e.jsx("ul",{className:"space-y-1",children:s.map((t,n)=>e.jsx("li",{children:e.jsx(p,{size:"md",className:"w-fit px-2 text-theme-text-secondary",intent:"secondary",emphasis:"minimal",asChild:!0,children:e.jsxs("a",{target:"_blank",rel:"noopener noreferrer",className:"flex gap-1",href:t.href,children:[t.icon,e.jsx("div",{children:t.text})]})})},n))})]})}function F(){const s=[{text:"Browse our docs",href:"https://docs.zenml.io",icon:e.jsx(T,{className:"h-5 w-5 fill-neutral-500"})},{text:"Discover projects",href:"https://github.com/zenml-io/zenml-projects",icon:e.jsx(V,{className:"h-5 w-5 fill-neutral-500"})},{text:"Navigate our examples",href:"https://github.com/zenml-io/zenml/tree/main/examples/",icon:e.jsx(N,{className:"h-5 w-5 fill-neutral-500"})},{text:"Read our blog",href:"https://zenml.io/blog",icon:e.jsx(y,{className:"h-5 w-5 fill-neutral-500"})}];return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"mb-0.5 text-text-lg font-semibold",children:"Resources"}),e.jsx("ul",{className:"space-y-1",children:s.map((t,n)=>e.jsx("li",{children:e.jsx(p,{size:"md",className:"w-fit px-2 text-theme-text-secondary",intent:"secondary",emphasis:"minimal",asChild:!0,children:e.jsxs("a",{rel:"noopener noreferrer",target:"_blank",className:"flex gap-1",href:t.href,children:[t.icon,e.jsx("div",{children:t.text})]})})},n))})]})}function $(){const s=j(),t=C();if(s.isPending||t.isPending)return e.jsx(d,{className:"h-[32px] w-[150px]"});if(s.isError||t.isError)return null;const n=g(t.data.deployment_type||"other"),r=w(s.data,n),a=r.itemsDone,l=r.totalItems;return e.jsxs(b,{rounded:!1,color:"light-purple",className:"text-text-sm font-semibold",children:[a,"/",l," steps completed"]})}function K(){return e.jsxs("div",{className:"space-between flex flex-col flex-wrap items-center gap-1 space-x-5 overflow-x-hidden lg:flex-row",children:[e.jsxs("div",{className:"flex-1 space-y-1 overflow-x-hidden",children:[e.jsxs("h2",{className:"truncate text-display-xs font-semibold",children:["Welcome to ZenML",e.jsx(W,{})]}),e.jsx("p",{className:"truncate text-display-xs text-theme-text-secondary",children:"You can start by following your quick setup."})]}),e.jsx($,{})]})}function W(){const s=S();if(s.isError)return null;if(s.isPending)return e.jsx(d,{className:"h-6 w-[70px]"});const t=k(s.data);return e.jsx(e.Fragment,{children:t?`, ${t}`:""})}function J({className:s,...t}){return e.jsx("div",{className:v("flex h-[28px] w-[28px] shrink-0 items-center justify-center rounded-rounded border-2 border-warning-300 bg-warning-50",s),...t,children:e.jsx(P,{className:"h-3 w-3 fill-warning-300"})})}function m({completed:s,title:t,children:n,hasDownstream:r,active:a=!1}){const[l,c]=i.useState(a);return i.useEffect(()=>{c(a)},[a]),e.jsxs(L,{disabled:!(r||a||s),open:l,onOpenChange:c,children:[e.jsx("div",{className:"flex w-full flex-col gap-3 bg-theme-surface-primary px-5 py-3",children:e.jsxs("div",{className:"flex w-full justify-between gap-2",children:[s?e.jsx(I,{className:"shrink-0"}):r?e.jsx(J,{}):e.jsx(z,{className:"shrink-0"}),e.jsx(u,{className:"w-full",children:e.jsx(X,{active:a,skipped:r,title:t,completed:s})}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(u,{children:e.jsx(D,{className:` ${l?"":"-rotate-90"} h-5 w-5 shrink-0 rounded-md fill-neutral-500`})})})]})}),n&&e.jsx(H,{className:"border-t border-theme-border-moderate",children:e.jsxs("div",{className:"flex w-full items-center gap-2 bg-theme-surface-primary p-5",children:[e.jsx("div",{className:"w-[28px] shrink-0"}),e.jsx("div",{className:"w-full min-w-0 flex-1",children:n})]})})]})}function X({completed:s,title:t,skipped:n,active:r}){return e.jsx("div",{className:"flex w-full items-center justify-between gap-2",children:e.jsx("div",{className:"flex w-full items-center",children:e.jsx("div",{className:v("text-text-xl",{"text-theme-text-tertiary line-through decoration-theme-text-tertiary":s||n,"font-semibold":r,"text-theme-text-secondary":!r&&!s}),children:t})})})}function Y({completed:s,hasDownstreamStep:t,active:n}){const{data:r}=C({throwOnError:!0});return e.jsx(m,{active:n,hasDownstream:t,completed:s,title:"Install and log in to ZenML (5 min)",children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Install ZenML"}),e.jsx(o,{code:`pip install "zenml==${r?r.version:e.jsx(d,{className:"w-7"})}"`})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Log in to your ZenML Server"}),e.jsx(o,{code:O((r==null?void 0:r.deployment_type)||"other")})]}),e.jsx(h,{link:"https://docs.zenml.io/user-guide/production-guide/deploying-zenml#connecting-to-a-deployed-zenml"})]})})}function G({active:s,completed:t,hasDownstreamStep:n}){return e.jsx(m,{active:s,hasDownstream:n,completed:t,title:"Run a pipeline (2 min)",children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Download the quickstart example to your local machine"}),e.jsx(o,{code:"git clone --depth 1 https://github.com/zenml-io/zenml.git && cd zenml/examples/quickstart"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Initialize ZenML in the current directory"}),e.jsx(o,{code:"zenml init"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Install the remaining requirements apart from ZenML"}),e.jsx(o,{code:"pip install -r requirements.txt"})]}),e.jsxs("div",{children:[e.jsxs("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:["Run the training pipeline.",e.jsx("br",{}),"Once it is running, your dashboard will show all the details of the associated run, models, and artifacts."]}),e.jsx(o,{code:"python run.py"})]}),e.jsxs(M,{className:"flex w-full flex-wrap items-center justify-between gap-y-1 p-2",children:[e.jsxs("div",{className:"flex items-center gap-[10px]",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-sm bg-teal-25",children:e.jsx(Z,{className:"h-5 w-5 fill-teal-400"})}),e.jsx("p",{children:"Do you need help?"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:f({intent:"secondary",emphasis:"subtle",size:"md"}),href:"https://github.com/zenml-io/zenml/blob/main/examples/quickstart/README.md",children:"Open the Readme"}),e.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:f({intent:"primary",emphasis:"subtle",size:"md"}),href:"https://docs.zenml.io/user-guide/starter-guide/create-an-ml-pipeline",children:"Browse our docs"})]})]})]})})}function Q({completed:s,active:t,hasDownstreamStep:n}){const r=R.stacks.create.index+"?"+new URLSearchParams({origin:"onboarding"}).toString();return e.jsxs(m,{hasDownstream:n,completed:s,title:"Connect to a remote stack (5 min)",active:t,children:[e.jsxs("p",{className:"mb-3",children:["A stack configures how a pipeline is executed"," ",e.jsx(s1,{href:"https://docs.zenml.io/user-guide/production-guide/understand-stacks"})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Connect your Cloud to deploy your ZenML pipelines in a remote stack."}),e.jsx(p,{className:"w-fit",size:"md",asChild:!0,children:e.jsxs(B,{className:"flex",to:r,children:[e.jsx(_,{className:"h-5 w-5 shrink-0 fill-white"}),"Register a remote stack"]})})]}),e.jsx(h,{link:"https://docs.zenml.io/user-guide/production-guide/understand-stacks"})]})]})}function e1({active:s,completed:t,hasDownstreamStep:n}){return e.jsx(m,{hasDownstream:n,completed:t,title:"Run a pipeline in a remote stack (3 min)",active:s,children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Set the new stack"}),e.jsx(o,{wrap:!0,codeClasses:"whitespace-pre-wrap",code:"zenml stack set REMOTE_STACK"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Run the pipeline"}),e.jsx(o,{wrap:!0,codeClasses:"whitespace-pre-wrap",code:"python run.py"})]}),e.jsx("div",{children:e.jsx(h,{link:"https://docs.zenml.io/user-guide/production-guide/understand-stacks"})})]})})}function s1({href:s}){return e.jsx("a",{href:s,rel:"noopener noreferrer",target:"_blank",className:"link text-text-sm font-semibold text-theme-text-brand",children:"Learn more"})}function t1(){const s=j({refetchInterval:5e3}),t=C();if(s.isPending||t.isPending)return e.jsx(d,{className:"h-[200px] w-full"});if(s.isError||t.isError)return null;const n=g(t.data.deployment_type||"other"),{getItem:r}=w(s.data,n),a=r("device_verified"),l=r("pipeline_run"),c=r("stack_with_remote_orchestrator_created"),x=r("pipeline_run_with_remote_orchestrator");return e.jsxs("ul",{className:"space-y-5",children:[!n&&e.jsx("li",{children:e.jsx(Y,{active:a.isActive,completed:a.isCompleted,hasDownstreamStep:a.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(G,{active:l.isActive,completed:l.isCompleted,hasDownstreamStep:l.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(Q,{active:c.isActive,completed:c.isCompleted,hasDownstreamStep:c.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(e1,{active:x.isActive,completed:x.isCompleted,hasDownstreamStep:x.hasDownStreamStep})})]})}function g1(){const{setTourState:s,tourState:{tourActive:t}}=E();return i.useEffect(()=>{t&&s(n=>({...n,run:!0,stepIndex:n.stepIndex}))},[t]),e.jsxs("div",{className:"layout-container grid grid-cols-4 gap-5 py-5",children:[e.jsxs("div",{className:"col-span-4 space-y-5 lg:col-span-3",children:[e.jsx(K,{}),e.jsx(t1,{})]}),e.jsxs("div",{className:"col-span-4 space-y-5 lg:col-span-1",children:[e.jsx(U,{}),e.jsx(F,{})]})]})}export{g1 as default};
@@ -1 +1 @@
1
- import{r as i,j as e}from"./@radix-DeK6qiuw.js";import{S as o,f as n,r as c,aF as d}from"./index-CxO6541P.js";import{S as h}from"./StackList-DKQaLDo4.js";import{p as m,c as j}from"./persist-K7AY0ju4.js";import{p as l,c as k}from"./persist-DBTFy--v.js";import{I as p}from"./Infobox-OQdkCLSP.js";import{s as u}from"./index-Ceyzb1yI.js";import{a as f}from"./@tanstack-DT5WLu9C.js";import{L as x}from"./@react-router-B3Z5rLr2.js";import"./@reactflow-6JPoencd.js";import"./plus-tf1V2hTJ.js";import"./refresh-BjOeWlEq.js";import"./SearchField-Yjv-KRW4.js";import"./dots-horizontal-otGBOSDJ.js";import"./chevron-right-double-D7ojK9Co.js";import"./url-BWJXzuI4.js";import"./index-Uu49AX48.js";import"./CopyButton-DCiXO3JC.js";import"./copy-C8XQA2Ug.js";import"./DisplayDate-CDMUcQHS.js";import"./InlineAvatar-CQNjKoEQ.js";import"./CodeSnippet-Qh1ae_DJ.js";import"./CollapsibleCard-TiI4lId1.js";import"./chevron-down-6JyMkfjR.js";import"./components-Br2ezRib.js";import"./NumberBox-Dtp3J6g5.js";import"./ComponentBadge-BqQNUZgb.js";import"./stack-detail-query-DMJoxwgv.js";import"./layout-BtHBmE4w.js";import"./rocket-DjT2cDvG.js";import"./DialogItem-BYG7d_M2.js";import"./trash-arLUMWMS.js";import"./AlertDialogDropdownItem-8yPFDxEI.js";import"./sharedSchema-xJDsJNgJ.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 S({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 e.jsxs("div",{className:"space-y-5",children:[a&&e.jsx(w,{setHasResumeableStack:t}),s&&e.jsx(S,{setHasResumeableTerraform:r})]})}function re(){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",children:[e.jsx(v,{}),e.jsx(h,{})]})}export{re as default};
1
+ import{r as i,j as e}from"./@radix-B7OY3d6N.js";import{S as o,f as n,r as c,aH as d}from"./index-D25WcEJJ.js";import{S as h}from"./StackList-6XLpNMwt.js";import{p as m,c as j}from"./persist-CDPcIIlF.js";import{p as l,c as k}from"./persist-Hxrm9o7f.js";import{I as p}from"./Infobox-Ls_918eD.js";import{s as u}from"./index-BOeKQ3N4.js";import{a as f}from"./@tanstack-W1pLDzVg.js";import{L as x}from"./@react-router-CiF9laDg.js";import"./@reactflow-DgwdIYyq.js";import"./plus-noRapLU5.js";import"./refresh-Jr_advur.js";import"./SearchField-BYL1oNec.js";import"./dots-horizontal-C6QCz7jg.js";import"./chevron-right-double-C5DtVuMS.js";import"./url-1R6qfphK.js";import"./index-4aOgYud0.js";import"./CopyButton-BQf5nLgq.js";import"./copy-DmyMnHSy.js";import"./DisplayDate-CZV8x8pB.js";import"./InlineAvatar-B9O7QxVo.js";import"./CodeSnippet-CK2z-88v.js";import"./CollapsibleCard-BAuAdAje.js";import"./chevron-down-DAWlSNuH.js";import"./components-Br2ezRib.js";import"./NumberBox-CqUodACv.js";import"./ComponentBadge-CNIM1NH_.js";import"./stack-detail-query-B2rvP4uR.js";import"./layout-Cj7MRWSi.js";import"./rocket-GOlMupOS.js";import"./DialogItem-L8-LNKgK.js";import"./trash-Dm8g1gZ8.js";import"./AlertDialogDropdownItem-BS4AoVte.js";import"./sharedSchema-BE8kPXOv.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 S({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 e.jsxs("div",{className:"space-y-5",children:[a&&e.jsx(w,{setHasResumeableStack:t}),s&&e.jsx(S,{setHasResumeableTerraform:r})]})}function re(){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",children:[e.jsx(v,{}),e.jsx(h,{})]})}export{re as default};
@@ -1 +1 @@
1
- import{r as _,j as t}from"./@radix-DeK6qiuw.js";import{u as k,g as Je,S as Xe,C as oe,P as ie,W as et,L as tt}from"./ProviderRadio-B81Elxrc.js";import{W as O,H as T,B as D,S as E}from"./WizardFooter-_1VSMZ_c.js";import{t as B}from"./zod-BwEbpOxH.js";import{z as h,p as je,q as ge,k as _e,s as Ee,F as ve,S as Y,I as W,f as w,av as rt,aw as st,ax as nt,ay as ot,ac as it,az as at,aj as ct,ad as lt,af as ut,ah as dt,d as ft,V as mt,i as Me,j as ht,r as xt,A as pt,b as yt,a7 as jt}from"./index-CxO6541P.js";import{b as y,C as b,u as $,F as V,a as gt}from"./index.esm-Dy6Z9Ung.js";import{C as Se,b as _t}from"./stack-detail-query-DMJoxwgv.js";import{R as H,a as K,u as vt}from"./create-stack-7JzgAYAm.js";import{q as Re,a as J,b as St,i as Le,c as bt}from"./@tanstack-DT5WLu9C.js";import{o as Ct,s as wt}from"./url-BWJXzuI4.js";import{C as M}from"./ProviderIcon-DfDUOeAy.js";import{s as Nt}from"./sharedSchema-xJDsJNgJ.js";import{S as Ft}from"./Lock-CYYy18Mm.js";import{S as Pt}from"./plus-tf1V2hTJ.js";import{S as kt}from"./trash-arLUMWMS.js";import{S as At}from"./dots-horizontal-otGBOSDJ.js";import{T as be}from"./Tick-DSYBiuXU.js";import{s as qe}from"./index-Ceyzb1yI.js";import{C as zt}from"./ComponentBadge-BqQNUZgb.js";import{e as It}from"./components-Br2ezRib.js";import{L as Ot}from"./@react-router-B3Z5rLr2.js";import"./persist-K7AY0ju4.js";import"./@reactflow-6JPoencd.js";import"./layout-BtHBmE4w.js";import"./rocket-DjT2cDvG.js";import"./gcp-CFtm4BA7.js";import"./check-DloQpStc.js";const Be=_.createContext(null);function Tt({children:e}){const[r,s]=_.useState({stackName:null,createdStackId:null,connectorConfig:null,fullstackResources:null,artifactStoreConfig:null,registryConfig:null,orchestratorConfig:null});return t.jsx(Be.Provider,{value:{data:r,setData:s},children:e})}function C(){const e=_.useContext(Be);if(e===null)throw new Error("useExistingInfraContext must be used within an ExistingInfraProvider");return e}const We=_.createContext(null);function Pe({children:e,initialSchema:r}){const[s,n]=_.useState(r);return t.jsx(We.Provider,{value:{schema:s,setSchema:n},children:e})}function X(){const e=_.useContext(We);if(!e)throw new Error("useSchemaContext must be used within a SchemaProvider");return e}const Dt=h.object({resourceId:h.string().min(1),flavor:h.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(Se,{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 $e=Symbol.for("immer-nothing"),ke=Symbol.for("immer-draftable"),j=Symbol.for("immer-state");function v(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var A=Object.getPrototypeOf;function z(e){return!!e&&!!e[j]}function F(e){var r;return e?Ve(e)||Array.isArray(e)||!!e[ke]||!!((r=e.constructor)!=null&&r[ke])||te(e)||re(e):!1}var Mt=Object.prototype.constructor.toString();function Ve(e){if(!e||typeof e!="object")return!1;const r=A(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)===Mt}function U(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[j];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 Ze(e,r,s){const n=ee(e);n===2?e.set(r,s):n===3?e.add(s):e[r]=s}function Rt(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 N(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=Ve(e);if(r===!0||r==="class_only"&&!s){const n=Object.getOwnPropertyDescriptors(e);delete n[j];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const i=o[a],u=n[i];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[i]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[i]})}return Object.create(A(e),n)}else{const n=A(e);if(n!==null&&s)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function Ce(e,r=!1){return se(e)||z(e)||!F(e)||(ee(e)>1&&(e.set=e.add=e.clear=e.delete=Lt),Object.freeze(e),r&&Object.entries(e).forEach(([s,n])=>Ce(n,!0))),e}function Lt(){v(2)}function se(e){return Object.isFrozen(e)}var qt={};function P(e){const r=qt[e];return r||v(0,e),r}var R;function He(){return R}function Bt(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ae(e,r){r&&(P("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function me(e){he(e),e.drafts_.forEach(Wt),e.drafts_=null}function he(e){e===R&&(R=e.parent_)}function ze(e){return R=Bt(R,e)}function Wt(e){const r=e[j];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function Ie(e,r){r.unfinalizedDrafts_=r.drafts_.length;const s=r.drafts_[0];return e!==void 0&&e!==s?(s[j].modified_&&(me(r),v(4)),F(e)&&(e=Q(r,e),r.parent_||G(r,e)),r.patches_&&P("Patches").generateReplacementPatches_(s[j].base_,e,r.patches_,r.inversePatches_)):e=Q(r,s,[]),me(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==$e?e:void 0}function Q(e,r,s){if(se(r))return r;const n=r[j];if(!n)return U(r,(o,a)=>Oe(e,n,r,o,a,s)),r;if(n.scope_!==e)return r;if(!n.modified_)return G(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let a=o,i=!1;n.type_===3&&(a=new Set(o),o.clear(),i=!0),U(a,(u,f)=>Oe(e,n,o,u,f,s,i)),G(e,o,!1),s&&e.patches_&&P("Patches").generatePatches_(n,s,e.patches_,e.inversePatches_)}return n.copy_}function Oe(e,r,s,n,o,a,i){if(z(o)){const u=a&&r&&r.type_!==3&&!de(r.assigned_,n)?a.concat(n):void 0,f=Q(e,o,u);if(Ze(s,n,f),z(f))e.canAutoFreeze_=!1;else return}else i&&s.add(o);if(F(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)&&G(e,o)}}function G(e,r,s=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ce(r,s)}function $t(e,r){const s=Array.isArray(e),n={type_:s?1:0,scope_:r?r.scope_:He(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=we;s&&(o=[n],a=L);const{revoke:i,proxy:u}=Proxy.revocable(o,a);return n.draft_=u,n.revoke_=i,u}var we={get(e,r){if(r===j)return e;const s=N(e);if(!de(s,r))return Vt(e,s,r);const n=s[r];return e.finalized_||!F(n)?n:n===ae(e.base_,r)?(ce(e),e.copy_[r]=pe(n,e)):n},has(e,r){return r in N(e)},ownKeys(e){return Reflect.ownKeys(N(e))},set(e,r,s){const n=Ke(N(e),r);if(n!=null&&n.set)return n.set.call(e.draft_,s),!0;if(!e.modified_){const o=ae(N(e),r),a=o==null?void 0:o[j];if(a&&a.base_===s)return e.copy_[r]=s,e.assigned_[r]=!1,!0;if(Rt(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=N(e),n=Reflect.getOwnPropertyDescriptor(s,r);return n&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:n.enumerable,value:s[r]}},defineProperty(){v(11)},getPrototypeOf(e){return A(e.base_)},setPrototypeOf(){v(12)}},L={};U(we,(e,r)=>{L[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});L.deleteProperty=function(e,r){return L.set.call(this,e,r,void 0)};L.set=function(e,r,s){return we.set.call(this,e[0],r,s,e[0])};function ae(e,r){const s=e[j];return(s?N(s):e)[r]}function Vt(e,r,s){var o;const n=Ke(r,s);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Ke(e,r){if(!(r in e))return;let s=A(e);for(;s;){const n=Object.getOwnPropertyDescriptor(s,r);if(n)return n;s=A(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 Zt=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 i=this;return function(f=a,...d){return i.produce(f,c=>s.call(this,c,...d))}}typeof s!="function"&&v(6),n!==void 0&&typeof n!="function"&&v(7);let o;if(F(r)){const a=ze(this),i=pe(r,void 0);let u=!0;try{o=s(i),u=!1}finally{u?me(a):he(a)}return Ae(a,n),Ie(o,a)}else if(!r||typeof r!="object"){if(o=s(r),o===void 0&&(o=r),o===$e&&(o=void 0),this.autoFreeze_&&Ce(o,!0),n){const a=[],i=[];P("Patches").generateReplacementPatches_(r,o,a,i),n(a,i)}return o}else v(1,r)},this.produceWithPatches=(r,s)=>{if(typeof r=="function")return(i,...u)=>this.produceWithPatches(i,f=>r(f,...u));let n,o;return[this.produce(r,s,(i,u)=>{n=i,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){F(e)||v(8),z(e)&&(e=Ht(e));const r=ze(this),s=pe(e,void 0);return s[j].isManual_=!0,he(r),s}finishDraft(e,r){const s=e&&e[j];(!s||!s.isManual_)&&v(9);const{scope_:n}=s;return Ae(n,r),Ie(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 z(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):$t(e,r);return(r?r.scope_:He()).drafts_.push(s),s}function Ht(e){return z(e)||v(10,e),Ue(e)}function Ue(e){if(!F(e)||se(e))return e;const r=e[j];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 U(s,(n,o)=>{Ze(s,n,Ue(o))}),r&&(r.finalized_=!1),s}var g=new Zt,I=g.produce;g.produceWithPatches.bind(g);g.setAutoFreeze.bind(g);g.setUseStrictShallowCopy.bind(g);g.applyPatches.bind(g);g.createDraft.bind(g);g.finishDraft.bind(g);function Kt(){const{data:e,setData:r}=C(),{setCurrentStep:s}=k();if(!e.fullstackResources)return s(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const n=e.fullstackResources.components_resources_info.artifact_store,o=n.flatMap(i=>i.accessible_by_service_connector.map(u=>({...i,value:u})));function a({flavor:i,resourceId:u}){const f=n.find(d=>d.flavor===i);f&&(r(d=>I(d,c=>{c.artifactStoreConfig={flavor:i,configuration:Object.fromEntries(Object.keys(f.required_configuration||{}).map(m=>[m,u])),service_connector_resource_id:u}})),s(d=>d+1))}return{handleFormSubmit:a,flattenedInstances:o}}async function Ut(e){const r=je(ge.flavors.all)+(e?`?${Ct(e)}`:""),s=await _e(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&Ee(),!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching flavors");throw new ve({status:s.status,statusText:s.statusText,message:n})}return s.json()}const Qe={all:["flavors"],flavorList:e=>Re({queryKey:[...Qe.all,e],queryFn:async()=>Ut(e)})};function q({flavor:e,type:r,width:s=32,height:n=32,...o}){var i;const a=J({...Qe.flavorList({name:e,type:r})});return a.isError?null:a.isPending?t.jsx(Y,{style:{height:`${n}px`,width:`${s}px`}}):t.jsx("img",{width:s,height:n,alt:`${e} logo`,...o,src:wt(((i=a.data.items[0].body)==null?void 0:i.logo_url)??"")})}const Qt="artifact_store";function Gt(){const[e,r]=_.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:i,trigger:u,reset:f}=y(),{flattenedInstances:d,handleFormSubmit:c}=Kt(),m=d.filter(l=>l.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(W,{placeholder:"Search...",onChange:l=>{f(),r(l.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:m.map(l=>t.jsx("li",{children:t.jsx(b,{name:"resourceId",control:s,render:({field:{onChange:x,...p}})=>t.jsxs(H,{"data-state":i("resourceId")===l.value?"selected":"unselected",htmlFor:l.value,children:[t.jsx(K,{id:l.value,type:"radio",...p,onChange:S=>{n("flavor",l.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),x(S.target.value),u()},value:l.value,name:"connector-radio"}),t.jsx(q,{type:Qt,width:24,height:24,flavor:l.flavor})," ",t.jsx("span",{children:l.value})]})})},l.value))})]})]})}function Yt(){const e=$({resolver:B(Dt),shouldUnregister:!0});return t.jsx(V,{...e,children:t.jsxs(O,{children:[t.jsx(T,{children:"Artifact Store"}),t.jsx(D,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(Et,{}),t.jsx(Gt,{})]})}),t.jsx(E,{children:t.jsx(Jt,{})})]})})}function Jt(){const e=y();return t.jsx(w,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}function Xt(e,r){const s=Object.keys(e).reduce((n,o)=>{var d,c;const a=e[o];let i;const u=Ge(o,r);switch(a.type||((c=(d=a.anyOf)==null?void 0:d.find(m=>m.type!==null))==null?void 0:c.type)){case"string":i=h.string().trim();break;case"boolean":i=h.boolean();break;case"array":i=h.array(h.string());break;default:i=h.string();break}return u&&(i=i.optional()),!u&&a.type==="string"&&i instanceof h.ZodString&&(i=i.min(1,"Required")),n[o]=i,n},{});return h.object(s)}function Ge(e,r){return!r.includes(e)}async function er(e){const r=je(ge.serviceConnectors.types.detail(e)),s=await _e(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&Ee(),!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 ve({status:s.status,statusText:s.statusText,message:n})}return s.json()}const Ne={connectorTypes:["service_connector_types"],serviceConnectorTypeDetail:e=>Re({queryKey:[...Ne.connectorTypes,e],queryFn:async()=>er(e)})},Ye=h.object({authMethod:h.string().min(1),stackName:Nt});function tr(){var c,m;const{data:e}=C(),{setCurrentStep:r}=k(),{control:s,watch:n,resetField:o}=y(),{setSchema:a}=X(),i=J({...Ne.serviceConnectorTypeDetail(((c=e.connectorConfig)==null?void 0:c.type)||"")});if(i.isError)return null;if(i.isPending)return t.jsx(Y,{className:"h-[40px] w-[100px]"});const u=i.data.auth_methods.filter(l=>l.auth_method!=="implicit").map(l=>({name:l.name,auth_method:l.auth_method}));if(!((m=e.connectorConfig)!=null&&m.type)){r(1);return}function f(){var Fe;const l=n("authMethod"),x=(Fe=i.data)==null?void 0:Fe.auth_methods.find(ne=>ne.auth_method===l);if(!x)return;const p=Xt(x.config_schema.properties,x.config_schema.required);a(Ye.merge(p)),Object.keys(p.shape).forEach(ne=>o(ne))}const d=e.connectorConfig.type||"";return t.jsx(b,{control:s,name:"authMethod",render:({field:{onChange:l,ref:x,...p}})=>t.jsxs(rt,{...p,onValueChange:S=>{l(S),f()},children:[t.jsx(st,{className:"w-fit border border-neutral-300 text-left text-text-md",children:t.jsx(nt,{className:"flex items-center gap-2",placeholder:"Select your Auth Method"})}),t.jsx(ot,{children:t.jsx(it,{viewportClassName:"max-h-[300px]",children:u.map(S=>t.jsx(at,{className:"space-x-2",value:S.auth_method,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(M,{provider:d}),t.jsx("div",{children:S.name})]})},S.auth_method))})})]})})}function rr(){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(_t,{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(tr,{})]})}function sr({schema:e,name:r,isOptional:s}){var o,a;const n=e.type||((a=(o=e.anyOf)==null?void 0:o.find(i=>i.type!==null))==null?void 0:a.type);if(!n)return null;switch(n){case"string":return t.jsx(nr,{isOptional:s,schema:e,name:r});case"array":return t.jsx(or,{isOptional:s,schema:e,name:r});case"boolean":return t.jsx(ir,{isOptional:s,schema:e,name:r});default:return null}}function nr({name:e,schema:r,isOptional:s}){const n=y(),o=r.format==="password";return t.jsxs("div",{children:[t.jsxs("label",{htmlFor:e,className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx(b,{defaultValue:"",control:n.control,name:e,render:({field:a})=>t.jsx(W,{inputSize:"md",className:"w-full",id:e,...a,type:o?"password":"text"})})]})}function or({name:e,schema:r,isOptional:s}){const{control:n}=y(),{fields:o,append:a,remove:i}=gt({name:e,control:n});return t.jsxs("div",{className:"space-y-3",children:[t.jsxs("label",{className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx("ul",{className:"space-y-5",children:o.map((u,f)=>t.jsxs("li",{className:"flex w-full items-center gap-4 [&>div]:w-full",children:[t.jsx(b,{defaultValue:"",name:`${e}.${f}`,render:({field:d})=>t.jsx(W,{className:"w-full flex-1",inputSize:"md",...d})}),t.jsxs(w,{className:"h-7 w-7",emphasis:"subtle",size:"sm",type:"button",onClick:()=>i(f),children:[t.jsx(kt,{className:"h-5 w-5 fill-primary-900"}),t.jsx("span",{className:"sr-only",children:"remove"})]})]},u.id))}),t.jsxs(w,{className:"h-7 w-7",emphasis:"subtle",type:"button",onClick:()=>a(""),children:[t.jsx(Pt,{className:"h-5 w-5 fill-primary-900"}),t.jsx("p",{className:"sr-only",children:"Add Item"})]})]})}function ir({name:e,schema:r,isOptional:s}){const n=y(),o=r.default||!1;return t.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[t.jsxs("label",{htmlFor:e,className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx(b,{defaultValue:o,control:n.control,name:e,render:({field:{onChange:a,value:i,...u}})=>t.jsx(ct,{id:e,checked:i,onCheckedChange:f=>a(f),...u})})]})}function ar(){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(Ft,{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(cr,{})]})}function cr(){var f,d;const{data:e}=C(),{watch:r}=y(),s=J({...Ne.serviceConnectorTypeDetail(((f=e.connectorConfig)==null?void 0:f.type)||"")}),n=r("authMethod"),o=(d=s.data)==null?void 0:d.auth_methods.find(c=>c.auth_method===n);if(s.isError)return null;if(s.isPending)return t.jsx(Y,{className:"h-[200px] w-full"});if(!o)return null;const a=o.config_schema.properties,i=o.config_schema.required,u=Object.entries(a).sort(([c],[m])=>i.includes(c)&&!i.includes(m)?-1:!i.includes(c)&&i.includes(m)?1:0);return t.jsx("div",{className:"space-y-5",children:u.map(([c,m])=>t.jsx(sr,{isOptional:Ge(c,i),name:c,schema:m},c))})}function lr({open:e,loadingComponents:r}){var n,o;const{data:s}=C();return(n=s.connectorConfig)!=null&&n.type?t.jsx(lt,{open:e,children:t.jsxs(ut,{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(dt,{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(ft,{className:"h-[60px] w-[60px]"}),t.jsx("div",{className:"flex h-[60px] w-[60px] items-center justify-center",children:t.jsx(At,{className:"h-5 w-5 fill-theme-text-tertiary"})}),t.jsx(M,{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 ",Je(((o=s.connectorConfig)==null?void 0:o.type)||"aws")," ","and retrieving your custom components. This process typically takes about 30-60 seconds."]}),t.jsx(ur,{loadingComponents:r})]})]})}):null}function ur({loadingComponents:e}){const[r,s]=_.useState(!0),[n,o]=_.useState(!0);return _.useEffect(()=>{const a=setTimeout(()=>{s(!1)},Math.floor(Math.random()*1e3)+500),i=setTimeout(()=>{o(!1)},1500);return()=>{clearTimeout(a),clearTimeout(i)}},[]),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(mt,{className:"h-5 w-5 border-2"}):t.jsx(be,{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 dr({payload:e}){const r=je(ge.serviceConnectors.fullStackResources),s=await _e(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 ve({status:s.status,statusText:s.statusText,message:n})}return s.json()}function fr(e){return St({...e,mutationFn:async({payload:r})=>dr({payload:r})})}function mr(e){return new Promise(r=>setTimeout(r,e))}function hr(){const{setCurrentStep:e}=k(),[r,s]=_.useState(!0),{toast:n}=Me(),{setData:o,data:a}=C(),i=fr({onSuccess:async f=>{o(d=>I(d,c=>{c.fullstackResources=f})),s(!1),await mr(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(l=>{(c[l]===""||c[l]===null||c[l]===void 0||Array.isArray(c[l])&&c[l].length===0)&&delete c[l]});const m=I(a,l=>{l.stackName=d,l.connectorConfig&&(l.connectorConfig.auth_method=f,l.connectorConfig.configuration={...c})});o(m),m.connectorConfig&&i.mutate({payload:m.connectorConfig})},fullStackResources:i,loadingComponents:r}}function xr(){const{handleSubmit:e,formState:{isSubmitting:r}}=y(),{handleFormSubmit:s,fullStackResources:n,loadingComponents:o}=hr();return t.jsxs("form",{onSubmit:e(s),id:"connect-form",children:[t.jsx(lr,{loadingComponents:o,open:r||n.isPending}),t.jsx(rr,{}),t.jsx(Xe,{}),t.jsx(ar,{})]})}function pr(){const{schema:e}=X(),r=$({shouldUnregister:!0,mode:"onChange",resolver:B(e)});return t.jsx(V,{...r,children:t.jsxs(O,{children:[t.jsx(T,{children:"Connect to your Cloud"}),t.jsx(D,{children:t.jsx(xr,{})}),t.jsx(E,{children:t.jsx(yr,{})})]})})}function yr(){const{formState:{isValid:e,isSubmitting:r}}=y(),s=!!Le();return t.jsx(w,{className:"justify-center gap-2",disabled:!e||s||r,form:"connect-form",size:"md",children:s||r?"Loading...":"Next"})}function jr(){const{data:e,setData:r}=C(),s=bt(),{toast:n}=Me(),{setCurrentStep:o}=k(),{mutate:a}=vt({onError:d=>{d instanceof Error&&n({status:"error",emphasis:"subtle",icon:t.jsx(ht,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess:async d=>{r(c=>I(c,m=>{m.createdStackId=d.id})),o(c=>c+1),s.invalidateQueries({queryKey:qe.all})}});if(!e.fullstackResources)return o(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const i=e.fullstackResources.components_resources_info.container_registry,u=i.flatMap(d=>d.accessible_by_service_connector.map(c=>({...d,value:c})));function f({flavor:d,resourceId:c}){const m=i.find(x=>x.flavor===d);if(!m)return;const l=I(e,x=>{x.registryConfig={flavor:d,configuration:Object.fromEntries(Object.keys(m.required_configuration||{}).map(p=>[p,c])),service_connector_resource_id:c}});r(l),a({workspaceId:"default",payload:{name:l.stackName||Math.random().toString(36).substring(7),service_connectors:l.connectorConfig?[l.connectorConfig]:[],components:{orchestrator:[{...l.orchestratorConfig,service_connector_index:0}],artifact_store:[{...l.artifactStoreConfig,service_connector_index:0}],container_registry:[{...l.registryConfig,service_connector_index:0}]}}})}return{handleFormSubmit:f,flattenedInstances:u}}const gr="container_registry";function _r(){const[e,r]=_.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:i,trigger:u,reset:f}=y(),{flattenedInstances:d,handleFormSubmit:c}=jr(),m=d.filter(l=>l.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(W,{placeholder:"Search...",onChange:l=>{f(),r(l.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:m.map(l=>t.jsx("li",{children:t.jsx(b,{name:"resourceId",control:s,render:({field:{onChange:x,...p}})=>t.jsxs(H,{"data-state":i("resourceId")===l.value?"selected":"unselected",htmlFor:l.value,children:[t.jsx(K,{id:l.value,type:"radio",...p,onChange:S=>{n("flavor",l.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),x(S.target.value),u()},value:l.value,name:"connector-radio"}),t.jsx(q,{width:24,height:24,type:gr,flavor:l.flavor})," ",t.jsx("span",{children:l.value})]})})},l.value))})]})]})}function vr(){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(Se,{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 Sr=h.object({flavor:h.string().min(1),resourceId:h.string().min(1)});function br(){const e=$({resolver:B(Sr),shouldUnregister:!0});return t.jsx(V,{...e,children:t.jsxs(O,{children:[t.jsx(T,{children:"Container Registry"}),t.jsx(D,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(vr,{}),t.jsx(_r,{})]})}),t.jsx(E,{children:t.jsx(Cr,{})})]})})}function Cr(){const e=y(),r=!!Le();return t.jsxs(w,{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 wr(){var a;const{data:e,setData:r}=C(),{setCurrentStep:s}=k();if(!e.fullstackResources)return s(2),{orchestrators:[],handleFormSubmit:()=>{}};const n=((a=e.fullstackResources.components_resources_info)==null?void 0:a.orchestrator)||[];function o({flavor:i,resourceId:u,...f}){const d=n.find(c=>c.flavor===i);d&&(r(c=>{const m=d!=null&&d.use_resource_value_as_fixed_config?Object.fromEntries(Object.keys(d.required_configuration||{}).map(l=>[l,u])):{...f};return I(c,l=>{l.orchestratorConfig={flavor:i,configuration:m,service_connector_resource_id:u}})}),s(c=>c+1))}return{orchestrators:n,handleFormSubmit:o}}const ye=h.object({flavor:h.string().min(1),resourceId:h.string().min(1)});function Nr(e){const r=Object.keys(e).reduce((s,n)=>(s[n]=h.string().trim().min(1),s),{});return h.object(r)}const Z="kubernetes",Te="orchestrator";function Fr(){const{orchestrators:e,handleFormSubmit:r}=wr(),{setSchema:s}=X(),{control:n,watch:o,setValue:a,register:i,reset:u,handleSubmit:f}=y(),d=o("flavor");return t.jsxs("form",{onSubmit:f(r),id:"artifact-store-form",children:[d!==Z&&t.jsx("input",{...i("resourceId"),type:"hidden"}),t.jsx("ul",{className:"space-y-1",children:e.map((c,m)=>t.jsxs("li",{children:[t.jsx(b,{control:n,name:"flavor",render:({field:{onChange:l,...x}})=>t.jsxs(H,{"data-state":d===c.flavor?"selected":"unselected",htmlFor:c.flavor,children:[t.jsx(K,{onChange:p=>{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(Nr(c.required_configuration))),c.flavor!==Z&&c.accessible_by_service_connector.length>0&&a("resourceId",c.accessible_by_service_connector[0]),l(p)},...x,id:c.flavor,type:"radio",value:c.flavor,name:"orchestrator-flavor-radio"}),t.jsx(q,{width:24,height:24,type:Te,flavor:c.flavor}),t.jsx("span",{children:c.flavor_display_name})]})}),d===c.flavor&&(c.flavor===Z||c.use_resource_value_as_fixed_config===!1)&&t.jsxs("div",{className:"space-y-3 py-5 pl-8",children:[c.flavor===Z&&t.jsx("ul",{className:"space-y-1",children:c.accessible_by_service_connector.map(l=>t.jsx("li",{children:t.jsx(b,{control:n,name:"resourceId",render:({field:x})=>t.jsxs(H,{"data-state":o("resourceId")===l?"selected":"unselected",htmlFor:l,children:[t.jsx(K,{...x,id:l,type:"radio",value:l,name:"instance-radio"}),t.jsx(q,{type:Te,width:24,height:24,flavor:c.flavor}),t.jsx("span",{children:l})]})})},l))}),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(([l,x])=>t.jsx("div",{children:t.jsx(b,{name:l,control:n,render:({field:p})=>t.jsxs("div",{children:[t.jsx("label",{htmlFor:l,className:"text-text-sm",children:x}),t.jsx(W,{...p,inputSize:"md",required:!0,className:"w-full",id:l})]})})},l))})]})]},m))})]})}function Pr(){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(Se,{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 kr(){const{schema:e}=X(),r=$({resolver:B(e),shouldUnregister:!0,defaultValues:{resourceId:""}});return t.jsx(V,{...r,children:t.jsxs(O,{children:[t.jsx(T,{children:"Orchestrator"}),t.jsxs(D,{children:[t.jsx(Pr,{}),t.jsx(Fr,{})]}),t.jsx(E,{children:t.jsx(Ar,{})})]})})}function Ar(){const e=y();return t.jsx(w,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const zr=h.object({provider:h.string().min(1)});function Ir(){var a;const{setData:e,data:r}=C(),{setCurrentStep:s}=k(),n=$({resolver:B(zr),defaultValues:{provider:((a=r.connectorConfig)==null?void 0:a.type)||""}});function o(i){e(u=>({...u,connectorConfig:{type:i.provider,auth_method:""}})),s(u=>u+1)}return t.jsx(V,{...n,children:t.jsxs(O,{children:[t.jsx(T,{children:"Select Your Existing Cloud Infrastructure"}),t.jsx(D,{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(M,{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(M,{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(M,{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(E,{children:t.jsx(Or,{})})]})})}function Or(){const{formState:{isValid:e}}=y();return t.jsx(w,{form:"provider-form",disabled:!e,size:"md",children:"Next"})}function Tr(){var o;const{data:e}=C(),r=J({...qe.stackDetail(e.createdStackId||""),throwOnError:!0});if(r.isError)return null;if(r.isPending)return t.jsx(Y,{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(T,{children:"Your stack"}),t.jsx(D,{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(Er,{stack:s}),n.map(a=>t.jsx(Mr,{component:a},a.id))]})]})}),t.jsx(E,{displayCancel:!1,children:t.jsx(Dr,{})})]})}function Dr(){return t.jsx(w,{size:"md",asChild:!0,children:t.jsx(Ot,{to:xt.stacks.overview,children:"Finish"})})}function Er({stack:e}){return t.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 font-semibold",children:[t.jsx(be,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(pt,{type:"square",size:"lg",children:t.jsx(yt,{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 Mr({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(be,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(q,{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(zt,{type:((n=e.body)==null?void 0:n.type)||"alerter",children:jt((o=e.body)==null?void 0:o.type)})]},e.id)}function Rr(){const{currentStep:e}=k();if(e===1)return t.jsx(Ir,{});if(e===2)return t.jsx(Pe,{initialSchema:Ye,children:t.jsx(pr,{})});if(e===3)return t.jsx(Yt,{});if(e===4)return t.jsx(Pe,{initialSchema:ye,children:t.jsx(kr,{})});if(e===5)return t.jsx(br,{});if(e===6)return t.jsx(Tr,{})}const De=["Infrastructure Type","Cloud Provider","Connect your Cloud","Artifact Store","Orchestrator","Container Registry"];function fs(){return t.jsx(et,{maxSteps:De.length+1,initialStep:1,children:t.jsx(Tt,{children:t.jsxs("section",{className:"layout-container flex flex-col gap-5 py-5 xl:flex-row",children:[t.jsx(tt,{entries:De}),t.jsx("div",{className:"w-full",children:t.jsx(Rr,{})})]})})})}export{fs as default};
1
+ import{r as _,j as t}from"./@radix-B7OY3d6N.js";import{u as k,g as Je,S as Xe,C as oe,P as ie,W as et,L as tt}from"./ProviderRadio-C9z7SJnN.js";import{W as O,H as T,B as D,S as E}from"./WizardFooter-CPk11vwc.js";import{t as B}from"./zod-C2FdaFLe.js";import{z as h,p as je,q as ge,k as _e,s as Ee,F as ve,S as Y,I as W,f as w,av as rt,aw as st,ax as nt,ay as ot,ac as it,az as at,aj as ct,ad as lt,af as ut,ah as dt,d as ft,V as mt,i as Me,j as ht,r as xt,A as pt,b as yt,a7 as jt}from"./index-D25WcEJJ.js";import{b as y,C as b,u as $,F as V,a as gt}from"./index.esm-C5jC4e7W.js";import{C as Se,b as _t}from"./stack-detail-query-B2rvP4uR.js";import{R as H,a as K,u as vt}from"./create-stack-BdNm_XEl.js";import{q as Re,a as J,b as St,i as Le,c as bt}from"./@tanstack-W1pLDzVg.js";import{o as Ct,s as wt}from"./url-1R6qfphK.js";import{C as M}from"./ProviderIcon-C_XK4oaW.js";import{s as Nt}from"./sharedSchema-BE8kPXOv.js";import{S as Ft}from"./Lock-6WGsAdiw.js";import{S as Pt}from"./plus-noRapLU5.js";import{S as kt}from"./trash-Dm8g1gZ8.js";import{S as At}from"./dots-horizontal-C6QCz7jg.js";import{T as be}from"./Tick-DHVI3HP0.js";import{s as qe}from"./index-BOeKQ3N4.js";import{C as zt}from"./ComponentBadge-CNIM1NH_.js";import{e as It}from"./components-Br2ezRib.js";import{L as Ot}from"./@react-router-CiF9laDg.js";import"./persist-CDPcIIlF.js";import"./@reactflow-DgwdIYyq.js";import"./layout-Cj7MRWSi.js";import"./rocket-GOlMupOS.js";import"./gcp-B1H0QrG5.js";import"./check-BB0dVtdW.js";const Be=_.createContext(null);function Tt({children:e}){const[r,s]=_.useState({stackName:null,createdStackId:null,connectorConfig:null,fullstackResources:null,artifactStoreConfig:null,registryConfig:null,orchestratorConfig:null});return t.jsx(Be.Provider,{value:{data:r,setData:s},children:e})}function C(){const e=_.useContext(Be);if(e===null)throw new Error("useExistingInfraContext must be used within an ExistingInfraProvider");return e}const We=_.createContext(null);function Pe({children:e,initialSchema:r}){const[s,n]=_.useState(r);return t.jsx(We.Provider,{value:{schema:s,setSchema:n},children:e})}function X(){const e=_.useContext(We);if(!e)throw new Error("useSchemaContext must be used within a SchemaProvider");return e}const Dt=h.object({resourceId:h.string().min(1),flavor:h.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(Se,{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 $e=Symbol.for("immer-nothing"),ke=Symbol.for("immer-draftable"),j=Symbol.for("immer-state");function v(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var A=Object.getPrototypeOf;function z(e){return!!e&&!!e[j]}function F(e){var r;return e?Ve(e)||Array.isArray(e)||!!e[ke]||!!((r=e.constructor)!=null&&r[ke])||te(e)||re(e):!1}var Mt=Object.prototype.constructor.toString();function Ve(e){if(!e||typeof e!="object")return!1;const r=A(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)===Mt}function U(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[j];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 Ze(e,r,s){const n=ee(e);n===2?e.set(r,s):n===3?e.add(s):e[r]=s}function Rt(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 N(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=Ve(e);if(r===!0||r==="class_only"&&!s){const n=Object.getOwnPropertyDescriptors(e);delete n[j];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const i=o[a],u=n[i];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[i]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[i]})}return Object.create(A(e),n)}else{const n=A(e);if(n!==null&&s)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function Ce(e,r=!1){return se(e)||z(e)||!F(e)||(ee(e)>1&&(e.set=e.add=e.clear=e.delete=Lt),Object.freeze(e),r&&Object.entries(e).forEach(([s,n])=>Ce(n,!0))),e}function Lt(){v(2)}function se(e){return Object.isFrozen(e)}var qt={};function P(e){const r=qt[e];return r||v(0,e),r}var R;function He(){return R}function Bt(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ae(e,r){r&&(P("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function me(e){he(e),e.drafts_.forEach(Wt),e.drafts_=null}function he(e){e===R&&(R=e.parent_)}function ze(e){return R=Bt(R,e)}function Wt(e){const r=e[j];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function Ie(e,r){r.unfinalizedDrafts_=r.drafts_.length;const s=r.drafts_[0];return e!==void 0&&e!==s?(s[j].modified_&&(me(r),v(4)),F(e)&&(e=Q(r,e),r.parent_||G(r,e)),r.patches_&&P("Patches").generateReplacementPatches_(s[j].base_,e,r.patches_,r.inversePatches_)):e=Q(r,s,[]),me(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==$e?e:void 0}function Q(e,r,s){if(se(r))return r;const n=r[j];if(!n)return U(r,(o,a)=>Oe(e,n,r,o,a,s)),r;if(n.scope_!==e)return r;if(!n.modified_)return G(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let a=o,i=!1;n.type_===3&&(a=new Set(o),o.clear(),i=!0),U(a,(u,f)=>Oe(e,n,o,u,f,s,i)),G(e,o,!1),s&&e.patches_&&P("Patches").generatePatches_(n,s,e.patches_,e.inversePatches_)}return n.copy_}function Oe(e,r,s,n,o,a,i){if(z(o)){const u=a&&r&&r.type_!==3&&!de(r.assigned_,n)?a.concat(n):void 0,f=Q(e,o,u);if(Ze(s,n,f),z(f))e.canAutoFreeze_=!1;else return}else i&&s.add(o);if(F(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)&&G(e,o)}}function G(e,r,s=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ce(r,s)}function $t(e,r){const s=Array.isArray(e),n={type_:s?1:0,scope_:r?r.scope_:He(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=we;s&&(o=[n],a=L);const{revoke:i,proxy:u}=Proxy.revocable(o,a);return n.draft_=u,n.revoke_=i,u}var we={get(e,r){if(r===j)return e;const s=N(e);if(!de(s,r))return Vt(e,s,r);const n=s[r];return e.finalized_||!F(n)?n:n===ae(e.base_,r)?(ce(e),e.copy_[r]=pe(n,e)):n},has(e,r){return r in N(e)},ownKeys(e){return Reflect.ownKeys(N(e))},set(e,r,s){const n=Ke(N(e),r);if(n!=null&&n.set)return n.set.call(e.draft_,s),!0;if(!e.modified_){const o=ae(N(e),r),a=o==null?void 0:o[j];if(a&&a.base_===s)return e.copy_[r]=s,e.assigned_[r]=!1,!0;if(Rt(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=N(e),n=Reflect.getOwnPropertyDescriptor(s,r);return n&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:n.enumerable,value:s[r]}},defineProperty(){v(11)},getPrototypeOf(e){return A(e.base_)},setPrototypeOf(){v(12)}},L={};U(we,(e,r)=>{L[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});L.deleteProperty=function(e,r){return L.set.call(this,e,r,void 0)};L.set=function(e,r,s){return we.set.call(this,e[0],r,s,e[0])};function ae(e,r){const s=e[j];return(s?N(s):e)[r]}function Vt(e,r,s){var o;const n=Ke(r,s);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Ke(e,r){if(!(r in e))return;let s=A(e);for(;s;){const n=Object.getOwnPropertyDescriptor(s,r);if(n)return n;s=A(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 Zt=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 i=this;return function(f=a,...d){return i.produce(f,c=>s.call(this,c,...d))}}typeof s!="function"&&v(6),n!==void 0&&typeof n!="function"&&v(7);let o;if(F(r)){const a=ze(this),i=pe(r,void 0);let u=!0;try{o=s(i),u=!1}finally{u?me(a):he(a)}return Ae(a,n),Ie(o,a)}else if(!r||typeof r!="object"){if(o=s(r),o===void 0&&(o=r),o===$e&&(o=void 0),this.autoFreeze_&&Ce(o,!0),n){const a=[],i=[];P("Patches").generateReplacementPatches_(r,o,a,i),n(a,i)}return o}else v(1,r)},this.produceWithPatches=(r,s)=>{if(typeof r=="function")return(i,...u)=>this.produceWithPatches(i,f=>r(f,...u));let n,o;return[this.produce(r,s,(i,u)=>{n=i,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){F(e)||v(8),z(e)&&(e=Ht(e));const r=ze(this),s=pe(e,void 0);return s[j].isManual_=!0,he(r),s}finishDraft(e,r){const s=e&&e[j];(!s||!s.isManual_)&&v(9);const{scope_:n}=s;return Ae(n,r),Ie(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 z(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):$t(e,r);return(r?r.scope_:He()).drafts_.push(s),s}function Ht(e){return z(e)||v(10,e),Ue(e)}function Ue(e){if(!F(e)||se(e))return e;const r=e[j];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 U(s,(n,o)=>{Ze(s,n,Ue(o))}),r&&(r.finalized_=!1),s}var g=new Zt,I=g.produce;g.produceWithPatches.bind(g);g.setAutoFreeze.bind(g);g.setUseStrictShallowCopy.bind(g);g.applyPatches.bind(g);g.createDraft.bind(g);g.finishDraft.bind(g);function Kt(){const{data:e,setData:r}=C(),{setCurrentStep:s}=k();if(!e.fullstackResources)return s(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const n=e.fullstackResources.components_resources_info.artifact_store,o=n.flatMap(i=>i.accessible_by_service_connector.map(u=>({...i,value:u})));function a({flavor:i,resourceId:u}){const f=n.find(d=>d.flavor===i);f&&(r(d=>I(d,c=>{c.artifactStoreConfig={flavor:i,configuration:Object.fromEntries(Object.keys(f.required_configuration||{}).map(m=>[m,u])),service_connector_resource_id:u}})),s(d=>d+1))}return{handleFormSubmit:a,flattenedInstances:o}}async function Ut(e){const r=je(ge.flavors.all)+(e?`?${Ct(e)}`:""),s=await _e(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&Ee(),!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching flavors");throw new ve({status:s.status,statusText:s.statusText,message:n})}return s.json()}const Qe={all:["flavors"],flavorList:e=>Re({queryKey:[...Qe.all,e],queryFn:async()=>Ut(e)})};function q({flavor:e,type:r,width:s=32,height:n=32,...o}){var i;const a=J({...Qe.flavorList({name:e,type:r})});return a.isError?null:a.isPending?t.jsx(Y,{style:{height:`${n}px`,width:`${s}px`}}):t.jsx("img",{width:s,height:n,alt:`${e} logo`,...o,src:wt(((i=a.data.items[0].body)==null?void 0:i.logo_url)??"")})}const Qt="artifact_store";function Gt(){const[e,r]=_.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:i,trigger:u,reset:f}=y(),{flattenedInstances:d,handleFormSubmit:c}=Kt(),m=d.filter(l=>l.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(W,{placeholder:"Search...",onChange:l=>{f(),r(l.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:m.map(l=>t.jsx("li",{children:t.jsx(b,{name:"resourceId",control:s,render:({field:{onChange:x,...p}})=>t.jsxs(H,{"data-state":i("resourceId")===l.value?"selected":"unselected",htmlFor:l.value,children:[t.jsx(K,{id:l.value,type:"radio",...p,onChange:S=>{n("flavor",l.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),x(S.target.value),u()},value:l.value,name:"connector-radio"}),t.jsx(q,{type:Qt,width:24,height:24,flavor:l.flavor})," ",t.jsx("span",{children:l.value})]})})},l.value))})]})]})}function Yt(){const e=$({resolver:B(Dt),shouldUnregister:!0});return t.jsx(V,{...e,children:t.jsxs(O,{children:[t.jsx(T,{children:"Artifact Store"}),t.jsx(D,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(Et,{}),t.jsx(Gt,{})]})}),t.jsx(E,{children:t.jsx(Jt,{})})]})})}function Jt(){const e=y();return t.jsx(w,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}function Xt(e,r){const s=Object.keys(e).reduce((n,o)=>{var d,c;const a=e[o];let i;const u=Ge(o,r);switch(a.type||((c=(d=a.anyOf)==null?void 0:d.find(m=>m.type!==null))==null?void 0:c.type)){case"string":i=h.string().trim();break;case"boolean":i=h.boolean();break;case"array":i=h.array(h.string());break;default:i=h.string();break}return u&&(i=i.optional()),!u&&a.type==="string"&&i instanceof h.ZodString&&(i=i.min(1,"Required")),n[o]=i,n},{});return h.object(s)}function Ge(e,r){return!r.includes(e)}async function er(e){const r=je(ge.serviceConnectors.types.detail(e)),s=await _e(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&Ee(),!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 ve({status:s.status,statusText:s.statusText,message:n})}return s.json()}const Ne={connectorTypes:["service_connector_types"],serviceConnectorTypeDetail:e=>Re({queryKey:[...Ne.connectorTypes,e],queryFn:async()=>er(e)})},Ye=h.object({authMethod:h.string().min(1),stackName:Nt});function tr(){var c,m;const{data:e}=C(),{setCurrentStep:r}=k(),{control:s,watch:n,resetField:o}=y(),{setSchema:a}=X(),i=J({...Ne.serviceConnectorTypeDetail(((c=e.connectorConfig)==null?void 0:c.type)||"")});if(i.isError)return null;if(i.isPending)return t.jsx(Y,{className:"h-[40px] w-[100px]"});const u=i.data.auth_methods.filter(l=>l.auth_method!=="implicit").map(l=>({name:l.name,auth_method:l.auth_method}));if(!((m=e.connectorConfig)!=null&&m.type)){r(1);return}function f(){var Fe;const l=n("authMethod"),x=(Fe=i.data)==null?void 0:Fe.auth_methods.find(ne=>ne.auth_method===l);if(!x)return;const p=Xt(x.config_schema.properties,x.config_schema.required);a(Ye.merge(p)),Object.keys(p.shape).forEach(ne=>o(ne))}const d=e.connectorConfig.type||"";return t.jsx(b,{control:s,name:"authMethod",render:({field:{onChange:l,ref:x,...p}})=>t.jsxs(rt,{...p,onValueChange:S=>{l(S),f()},children:[t.jsx(st,{className:"w-fit border border-neutral-300 text-left text-text-md",children:t.jsx(nt,{className:"flex items-center gap-2",placeholder:"Select your Auth Method"})}),t.jsx(ot,{children:t.jsx(it,{viewportClassName:"max-h-[300px]",children:u.map(S=>t.jsx(at,{className:"space-x-2",value:S.auth_method,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(M,{provider:d}),t.jsx("div",{children:S.name})]})},S.auth_method))})})]})})}function rr(){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(_t,{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(tr,{})]})}function sr({schema:e,name:r,isOptional:s}){var o,a;const n=e.type||((a=(o=e.anyOf)==null?void 0:o.find(i=>i.type!==null))==null?void 0:a.type);if(!n)return null;switch(n){case"string":return t.jsx(nr,{isOptional:s,schema:e,name:r});case"array":return t.jsx(or,{isOptional:s,schema:e,name:r});case"boolean":return t.jsx(ir,{isOptional:s,schema:e,name:r});default:return null}}function nr({name:e,schema:r,isOptional:s}){const n=y(),o=r.format==="password";return t.jsxs("div",{children:[t.jsxs("label",{htmlFor:e,className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx(b,{defaultValue:"",control:n.control,name:e,render:({field:a})=>t.jsx(W,{inputSize:"md",className:"w-full",id:e,...a,type:o?"password":"text"})})]})}function or({name:e,schema:r,isOptional:s}){const{control:n}=y(),{fields:o,append:a,remove:i}=gt({name:e,control:n});return t.jsxs("div",{className:"space-y-3",children:[t.jsxs("label",{className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx("ul",{className:"space-y-5",children:o.map((u,f)=>t.jsxs("li",{className:"flex w-full items-center gap-4 [&>div]:w-full",children:[t.jsx(b,{defaultValue:"",name:`${e}.${f}`,render:({field:d})=>t.jsx(W,{className:"w-full flex-1",inputSize:"md",...d})}),t.jsxs(w,{className:"h-7 w-7",emphasis:"subtle",size:"sm",type:"button",onClick:()=>i(f),children:[t.jsx(kt,{className:"h-5 w-5 fill-primary-900"}),t.jsx("span",{className:"sr-only",children:"remove"})]})]},u.id))}),t.jsxs(w,{className:"h-7 w-7",emphasis:"subtle",type:"button",onClick:()=>a(""),children:[t.jsx(Pt,{className:"h-5 w-5 fill-primary-900"}),t.jsx("p",{className:"sr-only",children:"Add Item"})]})]})}function ir({name:e,schema:r,isOptional:s}){const n=y(),o=r.default||!1;return t.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[t.jsxs("label",{htmlFor:e,className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx(b,{defaultValue:o,control:n.control,name:e,render:({field:{onChange:a,value:i,...u}})=>t.jsx(ct,{id:e,checked:i,onCheckedChange:f=>a(f),...u})})]})}function ar(){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(Ft,{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(cr,{})]})}function cr(){var f,d;const{data:e}=C(),{watch:r}=y(),s=J({...Ne.serviceConnectorTypeDetail(((f=e.connectorConfig)==null?void 0:f.type)||"")}),n=r("authMethod"),o=(d=s.data)==null?void 0:d.auth_methods.find(c=>c.auth_method===n);if(s.isError)return null;if(s.isPending)return t.jsx(Y,{className:"h-[200px] w-full"});if(!o)return null;const a=o.config_schema.properties,i=o.config_schema.required,u=Object.entries(a).sort(([c],[m])=>i.includes(c)&&!i.includes(m)?-1:!i.includes(c)&&i.includes(m)?1:0);return t.jsx("div",{className:"space-y-5",children:u.map(([c,m])=>t.jsx(sr,{isOptional:Ge(c,i),name:c,schema:m},c))})}function lr({open:e,loadingComponents:r}){var n,o;const{data:s}=C();return(n=s.connectorConfig)!=null&&n.type?t.jsx(lt,{open:e,children:t.jsxs(ut,{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(dt,{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(ft,{className:"h-[60px] w-[60px]"}),t.jsx("div",{className:"flex h-[60px] w-[60px] items-center justify-center",children:t.jsx(At,{className:"h-5 w-5 fill-theme-text-tertiary"})}),t.jsx(M,{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 ",Je(((o=s.connectorConfig)==null?void 0:o.type)||"aws")," ","and retrieving your custom components. This process typically takes about 30-60 seconds."]}),t.jsx(ur,{loadingComponents:r})]})]})}):null}function ur({loadingComponents:e}){const[r,s]=_.useState(!0),[n,o]=_.useState(!0);return _.useEffect(()=>{const a=setTimeout(()=>{s(!1)},Math.floor(Math.random()*1e3)+500),i=setTimeout(()=>{o(!1)},1500);return()=>{clearTimeout(a),clearTimeout(i)}},[]),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(mt,{className:"h-5 w-5 border-2"}):t.jsx(be,{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 dr({payload:e}){const r=je(ge.serviceConnectors.fullStackResources),s=await _e(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 ve({status:s.status,statusText:s.statusText,message:n})}return s.json()}function fr(e){return St({...e,mutationFn:async({payload:r})=>dr({payload:r})})}function mr(e){return new Promise(r=>setTimeout(r,e))}function hr(){const{setCurrentStep:e}=k(),[r,s]=_.useState(!0),{toast:n}=Me(),{setData:o,data:a}=C(),i=fr({onSuccess:async f=>{o(d=>I(d,c=>{c.fullstackResources=f})),s(!1),await mr(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(l=>{(c[l]===""||c[l]===null||c[l]===void 0||Array.isArray(c[l])&&c[l].length===0)&&delete c[l]});const m=I(a,l=>{l.stackName=d,l.connectorConfig&&(l.connectorConfig.auth_method=f,l.connectorConfig.configuration={...c})});o(m),m.connectorConfig&&i.mutate({payload:m.connectorConfig})},fullStackResources:i,loadingComponents:r}}function xr(){const{handleSubmit:e,formState:{isSubmitting:r}}=y(),{handleFormSubmit:s,fullStackResources:n,loadingComponents:o}=hr();return t.jsxs("form",{onSubmit:e(s),id:"connect-form",children:[t.jsx(lr,{loadingComponents:o,open:r||n.isPending}),t.jsx(rr,{}),t.jsx(Xe,{}),t.jsx(ar,{})]})}function pr(){const{schema:e}=X(),r=$({shouldUnregister:!0,mode:"onChange",resolver:B(e)});return t.jsx(V,{...r,children:t.jsxs(O,{children:[t.jsx(T,{children:"Connect to your Cloud"}),t.jsx(D,{children:t.jsx(xr,{})}),t.jsx(E,{children:t.jsx(yr,{})})]})})}function yr(){const{formState:{isValid:e,isSubmitting:r}}=y(),s=!!Le();return t.jsx(w,{className:"justify-center gap-2",disabled:!e||s||r,form:"connect-form",size:"md",children:s||r?"Loading...":"Next"})}function jr(){const{data:e,setData:r}=C(),s=bt(),{toast:n}=Me(),{setCurrentStep:o}=k(),{mutate:a}=vt({onError:d=>{d instanceof Error&&n({status:"error",emphasis:"subtle",icon:t.jsx(ht,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess:async d=>{r(c=>I(c,m=>{m.createdStackId=d.id})),o(c=>c+1),s.invalidateQueries({queryKey:qe.all})}});if(!e.fullstackResources)return o(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const i=e.fullstackResources.components_resources_info.container_registry,u=i.flatMap(d=>d.accessible_by_service_connector.map(c=>({...d,value:c})));function f({flavor:d,resourceId:c}){const m=i.find(x=>x.flavor===d);if(!m)return;const l=I(e,x=>{x.registryConfig={flavor:d,configuration:Object.fromEntries(Object.keys(m.required_configuration||{}).map(p=>[p,c])),service_connector_resource_id:c}});r(l),a({workspaceId:"default",payload:{name:l.stackName||Math.random().toString(36).substring(7),service_connectors:l.connectorConfig?[l.connectorConfig]:[],components:{orchestrator:[{...l.orchestratorConfig,service_connector_index:0}],artifact_store:[{...l.artifactStoreConfig,service_connector_index:0}],container_registry:[{...l.registryConfig,service_connector_index:0}]}}})}return{handleFormSubmit:f,flattenedInstances:u}}const gr="container_registry";function _r(){const[e,r]=_.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:i,trigger:u,reset:f}=y(),{flattenedInstances:d,handleFormSubmit:c}=jr(),m=d.filter(l=>l.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(W,{placeholder:"Search...",onChange:l=>{f(),r(l.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:m.map(l=>t.jsx("li",{children:t.jsx(b,{name:"resourceId",control:s,render:({field:{onChange:x,...p}})=>t.jsxs(H,{"data-state":i("resourceId")===l.value?"selected":"unselected",htmlFor:l.value,children:[t.jsx(K,{id:l.value,type:"radio",...p,onChange:S=>{n("flavor",l.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),x(S.target.value),u()},value:l.value,name:"connector-radio"}),t.jsx(q,{width:24,height:24,type:gr,flavor:l.flavor})," ",t.jsx("span",{children:l.value})]})})},l.value))})]})]})}function vr(){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(Se,{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 Sr=h.object({flavor:h.string().min(1),resourceId:h.string().min(1)});function br(){const e=$({resolver:B(Sr),shouldUnregister:!0});return t.jsx(V,{...e,children:t.jsxs(O,{children:[t.jsx(T,{children:"Container Registry"}),t.jsx(D,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(vr,{}),t.jsx(_r,{})]})}),t.jsx(E,{children:t.jsx(Cr,{})})]})})}function Cr(){const e=y(),r=!!Le();return t.jsxs(w,{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 wr(){var a;const{data:e,setData:r}=C(),{setCurrentStep:s}=k();if(!e.fullstackResources)return s(2),{orchestrators:[],handleFormSubmit:()=>{}};const n=((a=e.fullstackResources.components_resources_info)==null?void 0:a.orchestrator)||[];function o({flavor:i,resourceId:u,...f}){const d=n.find(c=>c.flavor===i);d&&(r(c=>{const m=d!=null&&d.use_resource_value_as_fixed_config?Object.fromEntries(Object.keys(d.required_configuration||{}).map(l=>[l,u])):{...f};return I(c,l=>{l.orchestratorConfig={flavor:i,configuration:m,service_connector_resource_id:u}})}),s(c=>c+1))}return{orchestrators:n,handleFormSubmit:o}}const ye=h.object({flavor:h.string().min(1),resourceId:h.string().min(1)});function Nr(e){const r=Object.keys(e).reduce((s,n)=>(s[n]=h.string().trim().min(1),s),{});return h.object(r)}const Z="kubernetes",Te="orchestrator";function Fr(){const{orchestrators:e,handleFormSubmit:r}=wr(),{setSchema:s}=X(),{control:n,watch:o,setValue:a,register:i,reset:u,handleSubmit:f}=y(),d=o("flavor");return t.jsxs("form",{onSubmit:f(r),id:"artifact-store-form",children:[d!==Z&&t.jsx("input",{...i("resourceId"),type:"hidden"}),t.jsx("ul",{className:"space-y-1",children:e.map((c,m)=>t.jsxs("li",{children:[t.jsx(b,{control:n,name:"flavor",render:({field:{onChange:l,...x}})=>t.jsxs(H,{"data-state":d===c.flavor?"selected":"unselected",htmlFor:c.flavor,children:[t.jsx(K,{onChange:p=>{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(Nr(c.required_configuration))),c.flavor!==Z&&c.accessible_by_service_connector.length>0&&a("resourceId",c.accessible_by_service_connector[0]),l(p)},...x,id:c.flavor,type:"radio",value:c.flavor,name:"orchestrator-flavor-radio"}),t.jsx(q,{width:24,height:24,type:Te,flavor:c.flavor}),t.jsx("span",{children:c.flavor_display_name})]})}),d===c.flavor&&(c.flavor===Z||c.use_resource_value_as_fixed_config===!1)&&t.jsxs("div",{className:"space-y-3 py-5 pl-8",children:[c.flavor===Z&&t.jsx("ul",{className:"space-y-1",children:c.accessible_by_service_connector.map(l=>t.jsx("li",{children:t.jsx(b,{control:n,name:"resourceId",render:({field:x})=>t.jsxs(H,{"data-state":o("resourceId")===l?"selected":"unselected",htmlFor:l,children:[t.jsx(K,{...x,id:l,type:"radio",value:l,name:"instance-radio"}),t.jsx(q,{type:Te,width:24,height:24,flavor:c.flavor}),t.jsx("span",{children:l})]})})},l))}),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(([l,x])=>t.jsx("div",{children:t.jsx(b,{name:l,control:n,render:({field:p})=>t.jsxs("div",{children:[t.jsx("label",{htmlFor:l,className:"text-text-sm",children:x}),t.jsx(W,{...p,inputSize:"md",required:!0,className:"w-full",id:l})]})})},l))})]})]},m))})]})}function Pr(){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(Se,{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 kr(){const{schema:e}=X(),r=$({resolver:B(e),shouldUnregister:!0,defaultValues:{resourceId:""}});return t.jsx(V,{...r,children:t.jsxs(O,{children:[t.jsx(T,{children:"Orchestrator"}),t.jsxs(D,{children:[t.jsx(Pr,{}),t.jsx(Fr,{})]}),t.jsx(E,{children:t.jsx(Ar,{})})]})})}function Ar(){const e=y();return t.jsx(w,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const zr=h.object({provider:h.string().min(1)});function Ir(){var a;const{setData:e,data:r}=C(),{setCurrentStep:s}=k(),n=$({resolver:B(zr),defaultValues:{provider:((a=r.connectorConfig)==null?void 0:a.type)||""}});function o(i){e(u=>({...u,connectorConfig:{type:i.provider,auth_method:""}})),s(u=>u+1)}return t.jsx(V,{...n,children:t.jsxs(O,{children:[t.jsx(T,{children:"Select Your Existing Cloud Infrastructure"}),t.jsx(D,{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(M,{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(M,{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(M,{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(E,{children:t.jsx(Or,{})})]})})}function Or(){const{formState:{isValid:e}}=y();return t.jsx(w,{form:"provider-form",disabled:!e,size:"md",children:"Next"})}function Tr(){var o;const{data:e}=C(),r=J({...qe.stackDetail(e.createdStackId||""),throwOnError:!0});if(r.isError)return null;if(r.isPending)return t.jsx(Y,{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(T,{children:"Your stack"}),t.jsx(D,{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(Er,{stack:s}),n.map(a=>t.jsx(Mr,{component:a},a.id))]})]})}),t.jsx(E,{displayCancel:!1,children:t.jsx(Dr,{})})]})}function Dr(){return t.jsx(w,{size:"md",asChild:!0,children:t.jsx(Ot,{to:xt.stacks.overview,children:"Finish"})})}function Er({stack:e}){return t.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 font-semibold",children:[t.jsx(be,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(pt,{type:"square",size:"lg",children:t.jsx(yt,{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 Mr({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(be,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(q,{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(zt,{type:((n=e.body)==null?void 0:n.type)||"alerter",children:jt((o=e.body)==null?void 0:o.type)})]},e.id)}function Rr(){const{currentStep:e}=k();if(e===1)return t.jsx(Ir,{});if(e===2)return t.jsx(Pe,{initialSchema:Ye,children:t.jsx(pr,{})});if(e===3)return t.jsx(Yt,{});if(e===4)return t.jsx(Pe,{initialSchema:ye,children:t.jsx(kr,{})});if(e===5)return t.jsx(br,{});if(e===6)return t.jsx(Tr,{})}const De=["Infrastructure Type","Cloud Provider","Connect your Cloud","Artifact Store","Orchestrator","Container Registry"];function fs(){return t.jsx(et,{maxSteps:De.length+1,initialStep:1,children:t.jsx(Tt,{children:t.jsxs("section",{className:"layout-container flex flex-col gap-5 py-5 xl:flex-row",children:[t.jsx(tt,{entries:De}),t.jsx("div",{className:"w-full",children:t.jsx(Rr,{})})]})})})}export{fs as default};
@@ -0,0 +1 @@
1
+ import{r as i,j as e}from"./@radix-B7OY3d6N.js";import{S as Z}from"./code-browser-C6DP7a-M.js";import{S as x}from"./help-CgM5zwtY.js";import{B as T,n as B,aK as P,c as M,S as V,ab as E,r as d,T as a,E as l,G as n,X as m,H as c,aL as R}from"./index-D25WcEJJ.js";import{c as z,L as h}from"./@react-router-CiF9laDg.js";import{S as F}from"./clock-BWL9qBKt.js";import{C as L}from"./ProviderIcon-C_XK4oaW.js";import{S as _}from"./layout-Cj7MRWSi.js";import"./@tanstack-W1pLDzVg.js";import"./@reactflow-DgwdIYyq.js";import"./gcp-B1H0QrG5.js";const D=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:"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 U=s=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},i.createElement("path",{d:"M15.1636 8.68344V14.9934L20.644 11.8401V5.52344L15.1636 8.68344Z",fill:"#4040B2"}),i.createElement("path",{d:"M9.08185 5.52344L14.5622 8.68344V14.9934L9.08185 11.8368V5.52344Z",fill:"#5C4EE5"}),i.createElement("path",{d:"M3 2V8.31333L8.48033 11.47V5.15667L3 2ZM9.08183 18.8433L14.5622 22V15.6867L9.08183 12.53V18.8433Z",fill:"#5C4EE5"})),$=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.5 4C7.84315 4 6.5 5.34315 6.5 7C6.5 8.65685 7.84315 10 9.5 10C11.1569 10 12.5 8.65685 12.5 7C12.5 5.34315 11.1569 4 9.5 4ZM4.5 7C4.5 4.23858 6.73858 2 9.5 2C12.2614 2 14.5 4.23858 14.5 7C14.5 9.76142 12.2614 12 9.5 12C6.73858 12 4.5 9.76142 4.5 7ZM14.5731 2.91554C14.7803 2.40361 15.3633 2.1566 15.8752 2.36382C17.7058 3.10481 19 4.90006 19 7C19 9.09994 17.7058 10.8952 15.8752 11.6362C15.3633 11.8434 14.7803 11.5964 14.5731 11.0845C14.3658 10.5725 14.6129 9.98953 15.1248 9.7823C16.2261 9.33652 17 8.25744 17 7C17 5.74256 16.2261 4.66348 15.1248 4.2177C14.6129 4.01047 14.3658 3.42748 14.5731 2.91554ZM7.96448 14H11.0355C11.9373 14 12.6647 14 13.2567 14.0404C13.8654 14.0819 14.4037 14.1695 14.9134 14.3806C16.1386 14.8881 17.1119 15.8614 17.6194 17.0866C17.8305 17.5963 17.9181 18.1346 17.9596 18.7433C18 19.3353 18 20.0627 18 20.9645V21C18 21.5523 17.5523 22 17 22C16.4477 22 16 21.5523 16 21C16 20.0544 15.9995 19.3953 15.9643 18.8794C15.9297 18.3725 15.865 18.0773 15.7716 17.8519C15.4672 17.1169 14.8831 16.5328 14.1481 16.2284C13.9227 16.135 13.6275 16.0703 13.1206 16.0357C12.6047 16.0005 11.9456 16 11 16H8C7.05444 16 6.39534 16.0005 5.87945 16.0357C5.37254 16.0703 5.07733 16.135 4.85195 16.2284C4.11687 16.5328 3.53284 17.1169 3.22836 17.8519C3.135 18.0773 3.07033 18.3725 3.03574 18.8794C3.00054 19.3953 3 20.0544 3 21C3 21.5523 2.55229 22 2 22C1.44772 22 1 21.5523 1 21L1 20.9645C0.999993 20.0627 0.999988 19.3353 1.04038 18.7433C1.08191 18.1346 1.16948 17.5963 1.3806 17.0866C1.88807 15.8614 2.86144 14.8881 4.08658 14.3806C4.59628 14.1695 5.13456 14.0819 5.74331 14.0404C6.33531 14 7.06272 14 7.96448 14ZM18.0316 14.8768C18.1692 14.3419 18.7144 14.0199 19.2493 14.1576C21.4056 14.7126 23 16.6688 23 19V21C23 21.5523 22.5523 22 22 22C21.4477 22 21 21.5523 21 21V19C21 17.6035 20.0449 16.4275 18.7507 16.0945C18.2159 15.9568 17.8939 15.4116 18.0316 14.8768Z"}));function C({children:s,className:r,...t}){return e.jsx(T,{...t,className:B("h-full w-full space-y-1 px-6 py-5",r),children:s})}function u({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(U,{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 k({children:s}){return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-y-1 text-text-xs",children:s})}function b({recommendataion:s}){return e.jsxs("div",{className:"flex items-center gap-0.5 text-text-xs text-theme-text-success",children:[e.jsx($,{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 q(){const{isError:s,isPending:r,data:t}=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(t.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(O,{isLocalDeployment:o}),e.jsx(A,{isLocalDeployment:o})]})]})}function O({isLocalDeployment:s}){const[r]=z(),t=d.stacks.create.newInfra+(r.size>=1?`?${r.toString()}`:"");return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:t,children:e.jsxs(C,{children:[e.jsxs(y,{children:[e.jsx(u,{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(m,{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(b,{recommendataion:"data scientists"}),e.jsxs(k,{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(x,{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 A({isLocalDeployment:s}){const[r]=z(),t=d.stacks.create.terraform+(r.size>=1?`?${r.toString()}`:"");return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:t,children:e.jsxs(C,{className:"flex flex-col justify-between space-y-0",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(y,{children:[e.jsx(u,{children:e.jsx(D,{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(m,{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(b,{recommendataion:"infrastructure engineers"}),e.jsxs(k,{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(x,{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 I="https://docs.zenml.io/how-to/infrastructure-deployment/stack-deployment/deploy-a-cloud-stack";function G(){const{isError:s,isPending:r,data:t}=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(t.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(Q,{isLocalDeployment:o}),e.jsx(K,{})]})]})}function K(){const[s]=z(),r=d.stacks.create.manual+(s.size>=1?`?${s.toString()}`:"");return e.jsx("div",{className:"relative",children:e.jsx(h,{to:r,children:e.jsxs(C,{children:[e.jsxs(y,{children:[e.jsx(u,{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(m,{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(b,{recommendataion:"advanced users"}),e.jsxs(k,{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(x,{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 Q({isLocalDeployment:s}){return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:d.stacks.create.existingInfra,children:e.jsxs(C,{children:[e.jsxs(y,{children:[e.jsx(u,{children:e.jsx(R,{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(m,{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(b,{recommendataion:"infrastructure engineers"}),e.jsxs(k,{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(x,{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 n1(){return e.jsxs("section",{className:"layout-container space-y-5 py-5",children:[e.jsx(q,{}),e.jsx(G,{})]})}export{n1 as default};
@@ -1 +1 @@
1
- import{r as S,j as e}from"./@radix-DeK6qiuw.js";import{z as i,i as v,u as j,S as g,I as N,f as y,am as b,j as w,au as E,B as F}from"./index-CxO6541P.js";import{u as I}from"./update-server-settings-mutation-ATZDNNZk.js";import{t as P}from"./zod-BwEbpOxH.js";import{c as B}from"./@tanstack-DT5WLu9C.js";import{u as G}from"./index.esm-Dy6Z9Ung.js";import"./@react-router-B3Z5rLr2.js";import"./@reactflow-6JPoencd.js";const k=i.object({serverName:i.string().min(1)});function q(){var a;const r=S.useId(),{toast:t}=v(),n=B(),{isError:o,isPending:l,data:m}=j({throwOnError:!0}),{mutate:c,isPending:u}=I({onError(s){b(s)&&t({status:"error",emphasis:"subtle",icon:e.jsx(w,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})},onSuccess:async()=>{await n.invalidateQueries({queryKey:E()}),t({status:"success",emphasis:"subtle",rounded:!0,description:"Server Settings updated successfully"}),p()}}),{handleSubmit:d,register:x,reset:p,formState:{isValid:f}}=G({resolver:P(k)});function h(s){c({server_name:s.serverName})}return o?null:l?e.jsx(g,{className:"h-[150px] max-w-[600px]"}):e.jsx("div",{className:"w-full max-w-[600px]",children:e.jsxs("form",{className:"space-y-2",onSubmit:d(h),children:[e.jsx("div",{className:"space-y-2",children:e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:r,className:"text-text-sm",children:"Server Name"}),e.jsx(N,{placeholder:(a=m.body)==null?void 0:a.server_name,...x("serverName"),id:r,className:"w-full"})]})}),e.jsx("div",{className:"flex justify-end",children:e.jsx(y,{disabled:u||!f,size:"md",intent:"primary",children:"Update"})})]})})}function O(){return e.jsxs(F,{className:"flex flex-col gap-5 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"General"}),e.jsx(q,{})]})}export{O as default};
1
+ import{r as S,j as e}from"./@radix-B7OY3d6N.js";import{z as i,i as v,u as j,S as g,I as N,f as y,am as b,j as w,au as E,B as F}from"./index-D25WcEJJ.js";import{u as I}from"./update-server-settings-mutation-Bgnr2Ssw.js";import{t as P}from"./zod-C2FdaFLe.js";import{c as B}from"./@tanstack-W1pLDzVg.js";import{u as G}from"./index.esm-C5jC4e7W.js";import"./@react-router-CiF9laDg.js";import"./@reactflow-DgwdIYyq.js";const k=i.object({serverName:i.string().min(1)});function q(){var a;const r=S.useId(),{toast:t}=v(),n=B(),{isError:o,isPending:l,data:m}=j({throwOnError:!0}),{mutate:c,isPending:u}=I({onError(s){b(s)&&t({status:"error",emphasis:"subtle",icon:e.jsx(w,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})},onSuccess:async()=>{await n.invalidateQueries({queryKey:E()}),t({status:"success",emphasis:"subtle",rounded:!0,description:"Server Settings updated successfully"}),p()}}),{handleSubmit:d,register:x,reset:p,formState:{isValid:f}}=G({resolver:P(k)});function h(s){c({server_name:s.serverName})}return o?null:l?e.jsx(g,{className:"h-[150px] max-w-[600px]"}):e.jsx("div",{className:"w-full max-w-[600px]",children:e.jsxs("form",{className:"space-y-2",onSubmit:d(h),children:[e.jsx("div",{className:"space-y-2",children:e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:r,className:"text-text-sm",children:"Server Name"}),e.jsx(N,{placeholder:(a=m.body)==null?void 0:a.server_name,...x("serverName"),id:r,className:"w-full"})]})}),e.jsx("div",{className:"flex justify-end",children:e.jsx(y,{disabled:u||!f,size:"md",intent:"primary",children:"Update"})})]})})}function O(){return e.jsxs(F,{className:"flex flex-col gap-5 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"General"}),e.jsx(q,{})]})}export{O as default};
@@ -1 +1 @@
1
- import{r as l,j as e}from"./@radix-DeK6qiuw.js";import{u as c,S as x,a as y,b as v}from"./form-schemas-B6PCV3Y4.js";import{A as j,I as U,P as h,U as b,S as _}from"./UsageReason-DXtPS5nE.js";import{i as g,at as C,aT as P,j as w,m as A,S as E}from"./index-CxO6541P.js";import{c as F}from"./@tanstack-DT5WLu9C.js";import"./check-circle-jNbX5-sR.js";import"./url-BWJXzuI4.js";import"./@react-router-B3Z5rLr2.js";import"./UpdatePasswordSchemas-HBNOeyoP.js";import"./zod-BwEbpOxH.js";import"./index.esm-Dy6Z9Ung.js";import"./gcp-CFtm4BA7.js";import"./kubernetes-B2wmAJ1d.js";import"./rocket-DjT2cDvG.js";import"./@reactflow-6JPoencd.js";const S=l.createContext(null);function H({children:t,initialUser:a}){const[n,r]=l.useState(a||{});return e.jsx(S.Provider,{value:{user:n,setUser:r},children:t})}function d(){const t=l.useContext(S);if(t===null)throw new Error("useSurveyUserContext must be used within an SurveyUserProvider");return t}function D({user:t}){var u,i;const{setSurveyStep:a}=c(),{setUser:n}=d();function r({fullName:s,getUpdates:m,email:o}){n(p=>({...p,...o?{email:o}:{email:null},full_name:s,email_opted_in:m})),a(2)}return e.jsx(j,{email:(u=t.metadata)==null?void 0:u.email,fullName:(i=t.body)==null?void 0:i.full_name,submitHandler:r})}function I(){const{user:t}=d(),{setSurveyStep:a}=c(),{toast:n}=g(),r=F(),{mutate:u}=C({onSuccess:async()=>{await r.invalidateQueries({queryKey:P()}),a(s=>s+1)},onError:s=>{s instanceof Error&&n({status:"error",emphasis:"subtle",icon:e.jsx(w,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})}});function i({other:s,providers:m,otherVal:o}){const f={infra_providers:s?[...m,o]:m,finished_onboarding_survey:!0};u({...t,user_metadata:{...t.user_metadata,...f}})}return e.jsx(U,{submitHandler:i})}function R({user:t}){const{setSurveyStep:a}=c(),{setUser:n}=d();function r({primaryUse:u}){const i={primary_use:u};n(s=>({...s,user_metadata:{...s.user_metadata,...i}})),a(3)}return e.jsx(h,{user:t,submitHandler:r})}function k(){const{setSurveyStep:t}=c(),{setUser:a}=d();function n({usageReason:r,comparison_tools:u,otherTool:i,otherToolVal:s}){const m={usage_reason:r,...!!u&&{comparing_tools:i&&s?[...u,s]:u}};a(o=>({...o,user_metadata:{...o.user_metadata,...m}})),t(o=>o+1)}return e.jsx(b,{submitHandler:n})}function M(){const{data:t,isPending:a,isError:n}=A({throwOnError:!0}),{surveyStep:r}=c();return n?null:a?e.jsx(E,{className:"h-[300px]"}):e.jsx(e.Fragment,{children:e.jsxs(H,{children:[e.jsx(x,{stepAmount:5}),r===1&&e.jsx(D,{user:t}),r===2&&e.jsx(R,{user:t}),r===3&&e.jsx(k,{}),r===4&&e.jsx(I,{}),r===5&&e.jsx(_,{}),r===6&&e.jsx(y,{subHeader:"Your ZenML account is now updated",displayBody:!1,username:t.name})]})})}function $(){return e.jsx("div",{children:e.jsx(v,{children:e.jsx(M,{})})})}export{$ as default};
1
+ import{r as l,j as e}from"./@radix-B7OY3d6N.js";import{u as c,S as x,a as y,b as v}from"./form-schemas-B4cZxcUy.js";import{A as j,I as U,P as h,U as b,S as _}from"./UsageReason-Bwhjhrv_.js";import{i as g,at as C,aV as P,j as w,m as A,S as E}from"./index-D25WcEJJ.js";import{c as F}from"./@tanstack-W1pLDzVg.js";import"./check-circle-ByvKqRS_.js";import"./url-1R6qfphK.js";import"./@react-router-CiF9laDg.js";import"./UpdatePasswordSchemas-CtzucewX.js";import"./zod-C2FdaFLe.js";import"./index.esm-C5jC4e7W.js";import"./gcp-B1H0QrG5.js";import"./kubernetes-Bn54mlK-.js";import"./rocket-GOlMupOS.js";import"./@reactflow-DgwdIYyq.js";const S=l.createContext(null);function H({children:t,initialUser:a}){const[n,r]=l.useState(a||{});return e.jsx(S.Provider,{value:{user:n,setUser:r},children:t})}function d(){const t=l.useContext(S);if(t===null)throw new Error("useSurveyUserContext must be used within an SurveyUserProvider");return t}function D({user:t}){var u,i;const{setSurveyStep:a}=c(),{setUser:n}=d();function r({fullName:s,getUpdates:m,email:o}){n(p=>({...p,...o?{email:o}:{email:null},full_name:s,email_opted_in:m})),a(2)}return e.jsx(j,{email:(u=t.metadata)==null?void 0:u.email,fullName:(i=t.body)==null?void 0:i.full_name,submitHandler:r})}function I(){const{user:t}=d(),{setSurveyStep:a}=c(),{toast:n}=g(),r=F(),{mutate:u}=C({onSuccess:async()=>{await r.invalidateQueries({queryKey:P()}),a(s=>s+1)},onError:s=>{s instanceof Error&&n({status:"error",emphasis:"subtle",icon:e.jsx(w,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})}});function i({other:s,providers:m,otherVal:o}){const f={infra_providers:s?[...m,o]:m,finished_onboarding_survey:!0};u({...t,user_metadata:{...t.user_metadata,...f}})}return e.jsx(U,{submitHandler:i})}function R({user:t}){const{setSurveyStep:a}=c(),{setUser:n}=d();function r({primaryUse:u}){const i={primary_use:u};n(s=>({...s,user_metadata:{...s.user_metadata,...i}})),a(3)}return e.jsx(h,{user:t,submitHandler:r})}function k(){const{setSurveyStep:t}=c(),{setUser:a}=d();function n({usageReason:r,comparison_tools:u,otherTool:i,otherToolVal:s}){const m={usage_reason:r,...!!u&&{comparing_tools:i&&s?[...u,s]:u}};a(o=>({...o,user_metadata:{...o.user_metadata,...m}})),t(o=>o+1)}return e.jsx(b,{submitHandler:n})}function M(){const{data:t,isPending:a,isError:n}=A({throwOnError:!0}),{surveyStep:r}=c();return n?null:a?e.jsx(E,{className:"h-[300px]"}):e.jsx(e.Fragment,{children:e.jsxs(H,{children:[e.jsx(x,{stepAmount:5}),r===1&&e.jsx(D,{user:t}),r===2&&e.jsx(R,{user:t}),r===3&&e.jsx(k,{}),r===4&&e.jsx(I,{}),r===5&&e.jsx(_,{}),r===6&&e.jsx(y,{subHeader:"Your ZenML account is now updated",displayBody:!1,username:t.name})]})})}function X(){return e.jsx("div",{children:e.jsx(v,{children:e.jsx(M,{})})})}export{X as default};
@@ -1 +1 @@
1
- import{r as m,j as e}from"./@radix-DeK6qiuw.js";import{k as S,F as D,p as C,q as b,i as w,am as y,t as O,v as H,f as h,s as $,an as R,aC as V,ao as J,aD as U,aq as G,aj as Y,D as Z,w as W,x as X,C as K,r as k,ad as ee,ae as te,af as se,ag as ne,ah as re,I as F,ak as ce,al as ae,B as q,o as ie,L as oe,S as T}from"./index-CxO6541P.js";import{P as le,S as ue}from"./SearchField-Yjv-KRW4.js";import{s as f,c as de,A as me,u as xe,a as E,b as he}from"./service-BvOYLH5b.js";import{b as N,c as g,a as pe}from"./@tanstack-DT5WLu9C.js";import{S as I}from"./trash-arLUMWMS.js";import{D as Q,a as z}from"./DeleteAlertDialog-DrPjHtXX.js";import{S as fe}from"./Lock-CYYy18Mm.js";import{L as P}from"./@react-router-B3Z5rLr2.js";import{S as je}from"./dots-horizontal-otGBOSDJ.js";import{A as ve}from"./AlertDialogDropdownItem-8yPFDxEI.js";import{t as ye}from"./zod-BwEbpOxH.js";import{u as ge,F as Ae,b as Se,C as A}from"./index.esm-Dy6Z9Ung.js";import"./@reactflow-6JPoencd.js";import"./chevron-right-double-D7ojK9Co.js";import"./url-BWJXzuI4.js";import"./index-Uu49AX48.js";import"./copy-C8XQA2Ug.js";import"./CodeSnippet-Qh1ae_DJ.js";import"./Infobox-OQdkCLSP.js";import"./Tick-DSYBiuXU.js";import"./check-DloQpStc.js";async function De(t){const s=C(b.serviceAccounts.detail(t)),r=await S(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!r.ok){const n=await r.json().then(c=>Array.isArray(c.detail)?c.detail[1]:c.detail).catch(()=>`Failed to delete service account ${t}`);throw new D({status:r.status,statusText:r.statusText,message:n})}return r.json()}function Ce(t){return N({...t,mutationFn:async s=>{await De(s)}})}const L=m.createContext(null);function be({children:t}){const[s,r]=m.useState([]),n=g(),{toast:c}=w(),a=Ce(),u=async o=>{try{const d=o.map(l=>a.mutateAsync(l));await Promise.all(d),c({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),n.invalidateQueries({queryKey:f.serviceAccountsKey()}),r([])}catch(d){y(d)&&c({status:"error",emphasis:"subtle",description:d.message,rounded:!0}),console.error("Failed to delete some pipelines:",d)}};return e.jsx(L.Provider,{value:{selectedServiceAccounts:s,setSelectedServiceAccounts:r,bulkDeleteServiceAccounts:u},children:t})}function j(){const t=m.useContext(L);if(!t)throw new Error("useServiceAccountSelectorContext must be used within a ServiceAccountsSelectorProvider");return t}function we(){const[t,s]=m.useState(!1),{bulkDeleteServiceAccounts:r,selectedServiceAccounts:n}=j();async function c(){await r(n),s(!1)}return e.jsxs(O,{open:t,onOpenChange:s,children:[e.jsx(H,{asChild:!0,children:e.jsxs(h,{className:"rounded-sharp border-none bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(I,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(Q,{title:`Delete Service Account${n.length>=2?"s":""}`,handleDelete:c,children:e.jsxs(z,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Ne(){const{selectedServiceAccounts: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==null?void 0:t.length} Service Account${(t==null?void 0:t.length)>1?"s":""} selected`}),e.jsx(we,{})]})}async function ke({body:t,serviceAccountId:s}){const r=C(b.serviceAccounts.detail(s)),n=await S(r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(n.status===404&&$(),!n.ok){const c=await n.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>`Failed to update service account ${s}`);throw new D({status:n.status,statusText:n.statusText,message:c})}return n.json()}function Fe(t){return N({...t,mutationFn:async({serviceAccountId:s,body:r})=>ke({serviceAccountId:s,body:r})})}function Te({isActive:t,serviceAccountId:s}){const{toast:r}=w(),n=g(),[c,a]=m.useState(!1),{mutate:u}=Fe({onError(l){y(l)&&r({status:"error",emphasis:"subtle",description:l.message,rounded:!0})},onSuccess(){n.invalidateQueries({queryKey:f.serviceAccountsKey()})}});function o(l){l?d(l):a(!0)}async function d(l){u({serviceAccountId:s,body:{active:l}})}return e.jsxs(e.Fragment,{children:[e.jsx(O,{open:c,onOpenChange:a,children:e.jsxs(R,{children:[e.jsx(V,{children:e.jsx(J,{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(U,{className:"gap-[10px]",children:[e.jsx(G,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{onClick:()=>d(!1).then(l=>a(!1)),intent:"primary",type:"button",children:"Deactivate"})]})]})}),e.jsx(Y,{checked:t,onCheckedChange:o})]})}function Pe({serviceAccountId:t}){const[s,r]=m.useState(!1),[n,c]=m.useState(!1),{bulkDeleteServiceAccounts:a}=j(),u=m.useRef(null),o=m.useRef(null);function d(){o.current=u.current}async function l(){await a([t]),p(!1)}function p(x){if(x===!1){r(!1),setTimeout(()=>{c(x)},200);return}c(x)}return e.jsxs(Z,{onOpenChange:r,open:s,children:[e.jsx(W,{ref:u,children:e.jsx(je,{className:"h-5 w-5 fill-theme-text-secondary"})}),e.jsx(X,{hidden:n,onCloseAutoFocus:x=>{o.current&&(o.current.focus(),o.current=null,x.preventDefault())},align:"end",sideOffset:7,children:e.jsx(ve,{onSelect:d,open:n,onOpenChange:p,triggerChildren:"Delete",icon:e.jsx(I,{fill:"red"}),children:e.jsx(Q,{title:"Delete Service Account",handleDelete:l,children:e.jsxs(z,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}const Oe=({id:t})=>{const{selectedServiceAccounts:s,setSelectedServiceAccounts:r}=j(),n=(c,a)=>{r(u=>c?[...u,a]:u.filter(o=>o!==a))};return e.jsx(K,{id:t,onCheckedChange:c=>n(c,t),checked:s.includes(t),className:"h-3 w-3"})};function Ke(){return[{id:"check",header:"",meta:{width:"1%"},accessorFn:t=>t.id,cell:({row:t})=>e.jsx(Oe,{id:t.original.id})},{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(fe,{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(P,{className:"text-text-md font-semibold text-theme-text-primary",to:k.settings.service_accounts.detail(t.original.id),children:t.original.name})})}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(P,{className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",to:k.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(Te,{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(Pe,{serviceAccountId:t.original.id})})}]}async function qe({body:t}){const s=C(b.serviceAccounts.all),r=await S(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const n=await r.json().then(c=>Array.isArray(c.detail)?c.detail[1]:c.detail).catch(()=>"Failed to create service account");throw new D({status:r.status,statusText:r.statusText,message:n})}return r.json()}function Ee(t){return N({...t,mutationFn:async s=>qe({body:s})})}function M({isFallback:t}){const[s,r]=m.useState(!1),[n,c]=m.useState(""),a=g(),u=ge({resolver:ye(de),defaultValues:{name:"",description:"",createDefault:!1}}),o=!!n&&u.watch("createDefault");function d(){return o?e.jsx(me,{value:n}):e.jsx(Ie,{isFallback:t,setApiKeyValue:c,setOpen:r})}return e.jsx(Ae,{...u,children:e.jsxs(ee,{open:s,onOpenChange:l=>{t&&!l&&a.invalidateQueries({queryKey:f.serviceAccountsKey()}),r(l),c(""),u.reset()},children:[e.jsx(te,{asChild:!0,children:e.jsx(h,{className:"shrink-0",size:"sm",intent:"primary",children:"Add service account"})}),e.jsxs(se,{"data-success":o,className:"mx-auto overflow-x-auto transition-none data-[success=true]:max-w-[800px]",children:[e.jsx(ne,{children:e.jsx(re,{children:"Add service account"})}),d()]})]})})}function Ie({setApiKeyValue:t,setOpen:s,isFallback:r}){const{watch:n,handleSubmit:c,control:a,formState:{isValid:u}}=Se(),{toast:o}=w(),d=g(),{mutate:l}=Ee({onError(i){y(i)&&o({status:"error",emphasis:"subtle",description:i.message,rounded:!0})},async onSuccess(i){if(o({description:"The service account has been added successfully.",status:"success",emphasis:"subtle",rounded:!0}),n("createDefault")){x(i.id);return}d.invalidateQueries({queryKey:f.serviceAccountsKey()}),s(!1)}}),{mutate:p}=xe({onSuccess(i){var v;r||d.invalidateQueries({queryKey:f.serviceAccountsKey()}),t(((v=i.body)==null?void 0:v.key)||"")},onError(i){y(i)&&o({status:"error",emphasis:"subtle",description:i.message,rounded:!0})}}),x=i=>{p({serviceAccountId:i,body:{name:"default",description:"Default api key"}})},B=i=>{l({name:i.name,description:i.description,active:!0})};return e.jsxs(e.Fragment,{children:[e.jsxs("form",{id:"create-secret-form",className:"space-y-5 p-7",onSubmit:c(B),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(A,{name:"name",control:a,render:({field:i})=>e.jsx(F,{...i,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(A,{name:"description",control:a,render:({field:i})=>e.jsx(F,{...i,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(A,{control:a,name:"createDefault",render:({field:{onChange:i,value:v}})=>e.jsx(K,{checked:v,id:"default-key",onCheckedChange:_=>i(!!_)})}),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(ce,{className:"gap-[10px]",children:[e.jsx(ae,{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"})]})]})}function Qe(){return e.jsxs(q,{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(M,{isFallback:!0})]})}function ze(){const{setCurrentBreadcrumbData:t}=ie(),s=E();m.useEffect(()=>{t({segment:"service_accounts",data:null})},[]);const r=m.useMemo(()=>Ke(),[]),{data:n}=pe({...he.serviceAccountList({...s,sort_by:"desc:created",hydrate:!0})});return n&&n.items.length<1&&!s.name?e.jsx(Qe,{}):e.jsxs(be,{children:[e.jsx(Le,{}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:n?e.jsx(oe,{columns:r,data:n.items}):e.jsx(T,{className:"h-[500px] w-full"})}),n?n.total_pages>1&&e.jsx(le,{searchParams:s,paginate:n}):e.jsx(T,{className:"h-[36px] w-[300px]"})]})]})}function Le(){const t=E(),{selectedServiceAccounts:s}=j();return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[s.length?e.jsx(Ne,{}):e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(ue,{searchParams:t})}),e.jsx(M,{isFallback:!1})]})}function lt(){return e.jsxs(q,{className:"space-y-4 p-5",children:[e.jsx(Me,{}),e.jsx(ze,{})]})}function Me(){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
+ import{r as m,j as e}from"./@radix-B7OY3d6N.js";import{k as S,F as D,p as b,q as C,i as w,am as y,t as O,v as H,f as h,s as $,an as R,aE as V,ao as J,aF as U,aq as G,aj as Y,D as Z,w as W,x as X,C as K,r as k,ad as ee,ae as te,af as se,ag as ne,ah as re,I as F,ak as ce,al as ae,B as q,o as ie,L as oe,S as T}from"./index-D25WcEJJ.js";import{P as le,S as ue}from"./SearchField-BYL1oNec.js";import{s as f,c as de,A as me,u as xe,a as E,b as he}from"./service-Db_ee3ql.js";import{b as N,c as g,a as pe}from"./@tanstack-W1pLDzVg.js";import{S as I}from"./trash-Dm8g1gZ8.js";import{D as Q,a as z}from"./DeleteAlertDialog-CcDX1Hm_.js";import{S as fe}from"./Lock-6WGsAdiw.js";import{L as P}from"./@react-router-CiF9laDg.js";import{S as je}from"./dots-horizontal-C6QCz7jg.js";import{A as ve}from"./AlertDialogDropdownItem-BS4AoVte.js";import{t as ye}from"./zod-C2FdaFLe.js";import{u as ge,F as Ae,b as Se,C as A}from"./index.esm-C5jC4e7W.js";import"./@reactflow-DgwdIYyq.js";import"./chevron-right-double-C5DtVuMS.js";import"./url-1R6qfphK.js";import"./index-4aOgYud0.js";import"./copy-DmyMnHSy.js";import"./CodeSnippet-CK2z-88v.js";import"./Infobox-Ls_918eD.js";import"./Tick-DHVI3HP0.js";import"./check-BB0dVtdW.js";async function De(t){const s=b(C.serviceAccounts.detail(t)),r=await S(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!r.ok){const n=await r.json().then(c=>Array.isArray(c.detail)?c.detail[1]:c.detail).catch(()=>`Failed to delete service account ${t}`);throw new D({status:r.status,statusText:r.statusText,message:n})}return r.json()}function be(t){return N({...t,mutationFn:async s=>{await De(s)}})}const L=m.createContext(null);function Ce({children:t}){const[s,r]=m.useState([]),n=g(),{toast:c}=w(),a=be(),u=async o=>{try{const d=o.map(l=>a.mutateAsync(l));await Promise.all(d),c({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),n.invalidateQueries({queryKey:f.serviceAccountsKey()}),r([])}catch(d){y(d)&&c({status:"error",emphasis:"subtle",description:d.message,rounded:!0}),console.error("Failed to delete some pipelines:",d)}};return e.jsx(L.Provider,{value:{selectedServiceAccounts:s,setSelectedServiceAccounts:r,bulkDeleteServiceAccounts:u},children:t})}function j(){const t=m.useContext(L);if(!t)throw new Error("useServiceAccountSelectorContext must be used within a ServiceAccountsSelectorProvider");return t}function we(){const[t,s]=m.useState(!1),{bulkDeleteServiceAccounts:r,selectedServiceAccounts:n}=j();async function c(){await r(n),s(!1)}return e.jsxs(O,{open:t,onOpenChange:s,children:[e.jsx(H,{asChild:!0,children:e.jsxs(h,{className:"rounded-sharp border-none bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(I,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(Q,{title:`Delete Service Account${n.length>=2?"s":""}`,handleDelete:c,children:e.jsxs(z,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Ne(){const{selectedServiceAccounts: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==null?void 0:t.length} Service Account${(t==null?void 0:t.length)>1?"s":""} selected`}),e.jsx(we,{})]})}async function ke({body:t,serviceAccountId:s}){const r=b(C.serviceAccounts.detail(s)),n=await S(r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(n.status===404&&$(),!n.ok){const c=await n.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>`Failed to update service account ${s}`);throw new D({status:n.status,statusText:n.statusText,message:c})}return n.json()}function Fe(t){return N({...t,mutationFn:async({serviceAccountId:s,body:r})=>ke({serviceAccountId:s,body:r})})}function Te({isActive:t,serviceAccountId:s}){const{toast:r}=w(),n=g(),[c,a]=m.useState(!1),{mutate:u}=Fe({onError(l){y(l)&&r({status:"error",emphasis:"subtle",description:l.message,rounded:!0})},onSuccess(){n.invalidateQueries({queryKey:f.serviceAccountsKey()})}});function o(l){l?d(l):a(!0)}async function d(l){u({serviceAccountId:s,body:{active:l}})}return e.jsxs(e.Fragment,{children:[e.jsx(O,{open:c,onOpenChange:a,children:e.jsxs(R,{children:[e.jsx(V,{children:e.jsx(J,{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(U,{className:"gap-[10px]",children:[e.jsx(G,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{onClick:()=>d(!1).then(l=>a(!1)),intent:"primary",type:"button",children:"Deactivate"})]})]})}),e.jsx(Y,{checked:t,onCheckedChange:o})]})}function Pe({serviceAccountId:t}){const[s,r]=m.useState(!1),[n,c]=m.useState(!1),{bulkDeleteServiceAccounts:a}=j(),u=m.useRef(null),o=m.useRef(null);function d(){o.current=u.current}async function l(){await a([t]),p(!1)}function p(x){if(x===!1){r(!1),setTimeout(()=>{c(x)},200);return}c(x)}return e.jsxs(Z,{onOpenChange:r,open:s,children:[e.jsx(W,{ref:u,children:e.jsx(je,{className:"h-5 w-5 fill-theme-text-secondary"})}),e.jsx(X,{hidden:n,onCloseAutoFocus:x=>{o.current&&(o.current.focus(),o.current=null,x.preventDefault())},align:"end",sideOffset:7,children:e.jsx(ve,{onSelect:d,open:n,onOpenChange:p,triggerChildren:"Delete",icon:e.jsx(I,{fill:"red"}),children:e.jsx(Q,{title:"Delete Service Account",handleDelete:l,children:e.jsxs(z,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}const Oe=({id:t})=>{const{selectedServiceAccounts:s,setSelectedServiceAccounts:r}=j(),n=(c,a)=>{r(u=>c?[...u,a]:u.filter(o=>o!==a))};return e.jsx(K,{id:t,onCheckedChange:c=>n(c,t),checked:s.includes(t),className:"h-3 w-3"})};function Ke(){return[{id:"check",header:"",meta:{width:"1%"},accessorFn:t=>t.id,cell:({row:t})=>e.jsx(Oe,{id:t.original.id})},{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(fe,{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(P,{className:"text-text-md font-semibold text-theme-text-primary",to:k.settings.service_accounts.detail(t.original.id),children:t.original.name})})}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(P,{className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",to:k.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(Te,{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(Pe,{serviceAccountId:t.original.id})})}]}async function qe({body:t}){const s=b(C.serviceAccounts.all),r=await S(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const n=await r.json().then(c=>Array.isArray(c.detail)?c.detail[1]:c.detail).catch(()=>"Failed to create service account");throw new D({status:r.status,statusText:r.statusText,message:n})}return r.json()}function Ee(t){return N({...t,mutationFn:async s=>qe({body:s})})}function M({isFallback:t}){const[s,r]=m.useState(!1),[n,c]=m.useState(""),a=g(),u=ge({resolver:ye(de),defaultValues:{name:"",description:"",createDefault:!1}}),o=!!n&&u.watch("createDefault");function d(){return o?e.jsx(me,{value:n}):e.jsx(Ie,{isFallback:t,setApiKeyValue:c,setOpen:r})}return e.jsx(Ae,{...u,children:e.jsxs(ee,{open:s,onOpenChange:l=>{t&&!l&&a.invalidateQueries({queryKey:f.serviceAccountsKey()}),r(l),c(""),u.reset()},children:[e.jsx(te,{asChild:!0,children:e.jsx(h,{className:"shrink-0",size:"sm",intent:"primary",children:"Add service account"})}),e.jsxs(se,{"data-success":o,className:"mx-auto overflow-x-auto transition-none data-[success=true]:max-w-[800px]",children:[e.jsx(ne,{children:e.jsx(re,{children:"Add service account"})}),d()]})]})})}function Ie({setApiKeyValue:t,setOpen:s,isFallback:r}){const{watch:n,handleSubmit:c,control:a,formState:{isValid:u}}=Se(),{toast:o}=w(),d=g(),{mutate:l}=Ee({onError(i){y(i)&&o({status:"error",emphasis:"subtle",description:i.message,rounded:!0})},async onSuccess(i){if(o({description:"The service account has been added successfully.",status:"success",emphasis:"subtle",rounded:!0}),n("createDefault")){x(i.id);return}d.invalidateQueries({queryKey:f.serviceAccountsKey()}),s(!1)}}),{mutate:p}=xe({onSuccess(i){var v;r||d.invalidateQueries({queryKey:f.serviceAccountsKey()}),t(((v=i.body)==null?void 0:v.key)||"")},onError(i){y(i)&&o({status:"error",emphasis:"subtle",description:i.message,rounded:!0})}}),x=i=>{p({serviceAccountId:i,body:{name:"default",description:"Default api key"}})},B=i=>{l({name:i.name,description:i.description,active:!0})};return e.jsxs(e.Fragment,{children:[e.jsxs("form",{id:"create-secret-form",className:"space-y-5 p-7",onSubmit:c(B),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(A,{name:"name",control:a,render:({field:i})=>e.jsx(F,{...i,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(A,{name:"description",control:a,render:({field:i})=>e.jsx(F,{...i,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(A,{control:a,name:"createDefault",render:({field:{onChange:i,value:v}})=>e.jsx(K,{checked:v,id:"default-key",onCheckedChange:_=>i(!!_)})}),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(ce,{className:"gap-[10px]",children:[e.jsx(ae,{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"})]})]})}function Qe(){return e.jsxs(q,{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(M,{isFallback:!0})]})}function ze(){const{setCurrentBreadcrumbData:t}=ie(),s=E();m.useEffect(()=>{t({segment:"service_accounts",data:null})},[]);const r=m.useMemo(()=>Ke(),[]),{data:n}=pe({...he.serviceAccountList({...s,sort_by:"desc:created",hydrate:!0})});return n&&n.items.length<1&&!s.name?e.jsx(Qe,{}):e.jsxs(Ce,{children:[e.jsx(Le,{}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:n?e.jsx(oe,{columns:r,data:n.items}):e.jsx(T,{className:"h-[500px] w-full"})}),n?n.total_pages>1&&e.jsx(le,{searchParams:s,paginate:n}):e.jsx(T,{className:"h-[36px] w-[300px]"})]})]})}function Le(){const t=E(),{selectedServiceAccounts:s}=j();return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[s.length?e.jsx(Ne,{}):e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(ue,{searchParams:t})}),e.jsx(M,{isFallback:!1})]})}function lt(){return e.jsxs(q,{className:"space-y-4 p-5",children:[e.jsx(Me,{}),e.jsx(ze,{})]})}function Me(){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 +1 @@
1
- import{r as i,j as s}from"./@radix-DeK6qiuw.js";import{ad as D,ae as k,f,af as z,ag as E,ah as A,i as b,at as v,am as S,j as C,I as o,ak as T,al as q,z as a,m as B,B as M,S as P,A as Q,b as V,as as _}from"./index-CxO6541P.js";import{c as K}from"./@tanstack-DT5WLu9C.js";import{u as F}from"./index.esm-Dy6Z9Ung.js";import{S as O}from"./tick-circle-BEX_Tp4v.js";import{t as U}from"./zod-BwEbpOxH.js";import{P as H}from"./PasswordChecker-B0nadgh6.js";import{u as R}from"./UpdatePasswordSchemas-HBNOeyoP.js";import{D as G}from"./DisplayDate-CDMUcQHS.js";import"./@react-router-B3Z5rLr2.js";import"./@reactflow-6JPoencd.js";function J(){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(W,{}):s.jsx(L,{setSuccess:l})]})]})}function L({setSuccess:e}){var u;const l=i.useId(),d=i.useId(),n=i.useId(),{toast:x}=b(),{mutate:p,isPending:j}=v({onSuccess(){e(!0)},onError(t){S(t)&&x({status:"error",emphasis:"subtle",icon:s.jsx(C,{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:U(R),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(H,{val:w("newPassword"),errors:h||[]})]}),s.jsxs(T,{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 W(){return s.jsxs("div",{className:"space-y-5 p-7 text-center",children:[s.jsx(O,{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 X=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 Y({user:e}){var h,u,t;const l=K(),{toast:d}=b(),n=i.useId(),x=i.useId(),p=i.useId(),{isPending:j,mutate:c}=v({onError(r){S(r)&&d({status:"error",emphasis:"subtle",icon:s.jsx(C,{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:U(X),defaultValues:{email:void 0,fullName:void 0,username:void 0}});function g(r){const I={...r.fullName&&{full_name:r.fullName},...r.username&&{name:r.username},...r.email&&{email:r.email}};c(I)}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(J,{}),s.jsxs("p",{className:"mt-5 text-text-sm text-theme-text-secondary",children:["Created on ",s.jsx(G,{dateString:((t=e.body)==null?void 0:t.created)||""})]})]})}function ns(){const{data:e}=B();return s.jsxs(M,{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(Y,{user:e}):s.jsx(P,{className:"h-[350px] w-full"}),e?s.jsx(Q,{size:"xxl",className:"ml-5 h-[140px] w-[140px]",type:"rounded",children:s.jsx(V,{className:"text-display-lg",size:"xxl",children:_(e)[0]})}):s.jsx(P,{className:"h-[140px] w-[140px] rounded-rounded"})]})]})}export{ns as default};
1
+ import{r as i,j as s}from"./@radix-B7OY3d6N.js";import{ad as D,ae as k,f,af as z,ag as E,ah as A,i as b,at as v,am as S,j as C,I as o,ak as T,al as q,z as a,m as B,B as M,S as P,A as Q,b as V,as as _}from"./index-D25WcEJJ.js";import{c as K}from"./@tanstack-W1pLDzVg.js";import{u as F}from"./index.esm-C5jC4e7W.js";import{S as O}from"./tick-circle-DKkiYi_R.js";import{t as U}from"./zod-C2FdaFLe.js";import{P as H}from"./PasswordChecker-Xh6Egpx9.js";import{u as R}from"./UpdatePasswordSchemas-CtzucewX.js";import{D as G}from"./DisplayDate-CZV8x8pB.js";import"./@react-router-CiF9laDg.js";import"./@reactflow-DgwdIYyq.js";function J(){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(W,{}):s.jsx(L,{setSuccess:l})]})]})}function L({setSuccess:e}){var u;const l=i.useId(),d=i.useId(),n=i.useId(),{toast:x}=b(),{mutate:p,isPending:j}=v({onSuccess(){e(!0)},onError(t){S(t)&&x({status:"error",emphasis:"subtle",icon:s.jsx(C,{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:U(R),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(H,{val:w("newPassword"),errors:h||[]})]}),s.jsxs(T,{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 W(){return s.jsxs("div",{className:"space-y-5 p-7 text-center",children:[s.jsx(O,{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 X=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 Y({user:e}){var h,u,t;const l=K(),{toast:d}=b(),n=i.useId(),x=i.useId(),p=i.useId(),{isPending:j,mutate:c}=v({onError(r){S(r)&&d({status:"error",emphasis:"subtle",icon:s.jsx(C,{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:U(X),defaultValues:{email:void 0,fullName:void 0,username:void 0}});function g(r){const I={...r.fullName&&{full_name:r.fullName},...r.username&&{name:r.username},...r.email&&{email:r.email}};c(I)}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(J,{}),s.jsxs("p",{className:"mt-5 text-text-sm text-theme-text-secondary",children:["Created on ",s.jsx(G,{dateString:((t=e.body)==null?void 0:t.created)||""})]})]})}function ns(){const{data:e}=B();return s.jsxs(M,{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(Y,{user:e}):s.jsx(P,{className:"h-[350px] w-full"}),e?s.jsx(Q,{size:"xxl",className:"ml-5 h-[140px] w-[140px]",type:"rounded",children:s.jsx(V,{className:"text-display-lg",size:"xxl",children:_(e)[0]})}):s.jsx(P,{className:"h-[140px] w-[140px] rounded-rounded"})]})]})}export{ns as default};