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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. zenml/VERSION +1 -1
  2. zenml/constants.py +1 -0
  3. zenml/enums.py +9 -0
  4. zenml/models/v2/core/logs.py +2 -1
  5. zenml/zen_server/dashboard/assets/{404-B5eko6XL.js → 404-B5cfnwZ1.js} +1 -1
  6. zenml/zen_server/dashboard/assets/{@radix-Cdvw4jJ8.js → @radix-C_LirfyT.js} +1 -1
  7. zenml/zen_server/dashboard/assets/{@react-router-DeDfXbUF.js → @react-router-BSsrkPOd.js} +1 -1
  8. zenml/zen_server/dashboard/assets/{@reactflow-B_iCtR7X.js → @reactflow-D9hglKLF.js} +2 -2
  9. zenml/zen_server/dashboard/assets/{@tanstack-5gTMR7G2.js → @tanstack-C0SeHZng.js} +1 -1
  10. zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-druRNuO2.js +1 -0
  11. zenml/zen_server/dashboard/assets/ButtonGroup-SF2DlzHV.js +1 -0
  12. zenml/zen_server/dashboard/assets/{CodeSnippet-Ctplhzdc.js → CodeSnippet-D8iBqOVv.js} +1 -1
  13. zenml/zen_server/dashboard/assets/CollapsibleCard-D0-pQi1n.js +1 -0
  14. zenml/zen_server/dashboard/assets/{ComponentBadge-Cnecw3qz.js → ComponentBadge-mw2Ja_ON.js} +1 -1
  15. zenml/zen_server/dashboard/assets/ComponentIcon-BXgpt-jw.js +1 -0
  16. zenml/zen_server/dashboard/assets/{DeleteAlertDialog-DEI0YDzP.js → DeleteAlertDialog-BbyFVnVI.js} +1 -1
  17. zenml/zen_server/dashboard/assets/DialogItem-DeME0oSt.js +1 -0
  18. zenml/zen_server/dashboard/assets/{DisplayDate-8RESqe5H.js → DisplayDate-v3KW7oez.js} +1 -1
  19. zenml/zen_server/dashboard/assets/{EmptyState-CjrgDtVk.js → EmptyState-DG0m-CGv.js} +1 -1
  20. zenml/zen_server/dashboard/assets/Error-DcVLcrLs.js +1 -0
  21. zenml/zen_server/dashboard/assets/ExecutionStatus-C4tlFnlh.js +1 -0
  22. zenml/zen_server/dashboard/assets/{Helpbox-DtUG2Bf_.js → Helpbox-C-RGHz3S.js} +1 -1
  23. zenml/zen_server/dashboard/assets/{Infobox-CSBRrM6r.js → Infobox-DFCWPbMb.js} +1 -1
  24. zenml/zen_server/dashboard/assets/{LeftSideMenu-DPsCCK3z.js → LeftSideMenu-Czev0KCA.js} +1 -1
  25. zenml/zen_server/dashboard/assets/{Lock-CrIAdQo6.js → Lock-CRP5J_su.js} +1 -1
  26. zenml/zen_server/dashboard/assets/NestedCollapsible-CN9scBUn.js +1 -0
  27. zenml/zen_server/dashboard/assets/{NumberBox-DtCv7jh3.js → NumberBox-CoQjQYDJ.js} +1 -1
  28. zenml/zen_server/dashboard/assets/{Pagination-CWnEpSpN.js → Pagination-CcDD5yHh.js} +1 -1
  29. zenml/zen_server/dashboard/assets/Partials-DlMzfKgs.js +1 -0
  30. zenml/zen_server/dashboard/assets/{PasswordChecker-B88WjuCe.js → PasswordChecker-BZwoeQIm.js} +1 -1
  31. zenml/zen_server/dashboard/assets/{ProCta-CNyp04C8.js → ProCta-CU2ycJDo.js} +1 -1
  32. zenml/zen_server/dashboard/assets/ProviderIcon-BMAn9Jld.js +1 -0
  33. zenml/zen_server/dashboard/assets/ProviderRadio-D_q9tE3G.js +1 -0
  34. zenml/zen_server/dashboard/assets/RunsBody-BToytB8e.js +1 -0
  35. zenml/zen_server/dashboard/assets/{SearchField-BtUi6cYl.js → SearchField-D_0-uAPj.js} +1 -1
  36. zenml/zen_server/dashboard/assets/SecretTooltip-BcWMKb9f.js +1 -0
  37. zenml/zen_server/dashboard/assets/{SetPassword-BmbgL_ed.js → SetPassword-CaKVSqAL.js} +1 -1
  38. zenml/zen_server/dashboard/assets/{SheetHeader-DkH7aG9K.js → SheetHeader-7vwlsY_i.js} +1 -1
  39. zenml/zen_server/dashboard/assets/StackComponentList-s7eSfm8o.js +1 -0
  40. zenml/zen_server/dashboard/assets/StackList-Dt0FrIkM.js +1 -0
  41. zenml/zen_server/dashboard/assets/Tabs-B27AHUfo.js +1 -0
  42. zenml/zen_server/dashboard/assets/Tick-DDeDgTuT.js +1 -0
  43. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-D_DCETSO.js → UpdatePasswordSchemas-Da5RndbV.js} +1 -1
  44. zenml/zen_server/dashboard/assets/{Wizard-BHvY75u_.js → Wizard-8aJzxUjb.js} +1 -1
  45. zenml/zen_server/dashboard/assets/WizardFooter-Bt7_UE14.js +1 -0
  46. zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-DpKw9WL9.js → all-pipeline-runs-query-gorNNEaT.js} +1 -1
  47. zenml/zen_server/dashboard/assets/{arrow-left-MRXv5pAH.js → arrow-left-hcj2H8HY.js} +1 -1
  48. zenml/zen_server/dashboard/assets/bar-chart-square-check-9siI9icm.js +1 -0
  49. zenml/zen_server/dashboard/assets/{bulk-delete-CzYA--cC.js → bulk-delete-B5RTlnD_.js} +1 -1
  50. zenml/zen_server/dashboard/assets/{check-B9QMTa3f.js → check-D1bHMJkL.js} +1 -1
  51. zenml/zen_server/dashboard/assets/{check-circle-C4tYvbtw.js → check-circle-mnEgPhPF.js} +1 -1
  52. zenml/zen_server/dashboard/assets/{chevron-down-jbbQh82s.js → chevron-down-Z3nUe-0U.js} +1 -1
  53. zenml/zen_server/dashboard/assets/{chevron-right-double-Dgp_gEsp.js → chevron-right-double-CbRQKN4Q.js} +1 -1
  54. zenml/zen_server/dashboard/assets/{clock-B_mTG8PH.js → clock-BMjHXT3f.js} +1 -1
  55. zenml/zen_server/dashboard/assets/{code-browser-CiD8qkBx.js → code-browser-DftoiCIg.js} +1 -1
  56. zenml/zen_server/dashboard/assets/configuration-form-Yz8m0QIG.js +1 -0
  57. zenml/zen_server/dashboard/assets/constants-DeV48DuZ.js +1 -0
  58. zenml/zen_server/dashboard/assets/{create-stack-BpZrmKDu.js → create-stack-BruqH_6X.js} +1 -1
  59. zenml/zen_server/dashboard/assets/credit-card-CH1BHrXY.js +1 -0
  60. zenml/zen_server/dashboard/assets/dataflow-2-qHjWt7zp.js +1 -0
  61. zenml/zen_server/dashboard/assets/{delete-run-BkyDsKQc.js → delete-run-ibBtciMR.js} +1 -1
  62. zenml/zen_server/dashboard/assets/{expand-full-BPiXpch2.js → expand-full-CD4fFvM-.js} +1 -1
  63. zenml/zen_server/dashboard/assets/{eye-CbVlAYty.js → eye-CLNgIh_K.js} +1 -1
  64. zenml/zen_server/dashboard/assets/{file-text-Cd8wVfq5.js → file-text-CltVhgwZ.js} +1 -1
  65. zenml/zen_server/dashboard/assets/form-6aSt3tIl.js +1 -0
  66. zenml/zen_server/dashboard/assets/form-schemas-B9XgTS1V.js +1 -0
  67. zenml/zen_server/dashboard/assets/gradient_bg-BH8t8fi6.webp +0 -0
  68. zenml/zen_server/dashboard/assets/{help-Co6aedki.js → help-B0CvBhCm.js} +1 -1
  69. zenml/zen_server/dashboard/assets/icon-hDriJUXY.js +1 -0
  70. zenml/zen_server/dashboard/assets/{index-eoDB_1XX.js → index-B7CRNU8l.js} +1 -1
  71. zenml/zen_server/dashboard/assets/index-BQWlHo1Y.js +1 -0
  72. zenml/zen_server/dashboard/assets/{index-DWpiv-Ft.js → index-BRhKF2z-.js} +1 -1
  73. zenml/zen_server/dashboard/assets/{index-BgEfQ3_G.js → index-BacoJBEQ.js} +11 -11
  74. zenml/zen_server/dashboard/assets/{index-BBt0LDtR.js → index-dCcVgFNl.js} +1 -1
  75. zenml/zen_server/dashboard/assets/index-eggipFZS.css +1 -0
  76. zenml/zen_server/dashboard/assets/index-mA8kL088.js +14 -0
  77. zenml/zen_server/dashboard/assets/{index.es-C1gfATPn.js → index.es-DcVFDpJU.js} +1 -1
  78. zenml/zen_server/dashboard/assets/{index.esm-DhJo3mA6.js → index.esm-COnaHLSh.js} +1 -1
  79. zenml/zen_server/dashboard/assets/{info-QkbQz4QU.js → info-CyMih3vQ.js} +1 -1
  80. zenml/zen_server/dashboard/assets/{key-icon-C07HKw8z.js → key-icon-HOx2gazv.js} +1 -1
  81. zenml/zen_server/dashboard/assets/{layout-DBbfEFBe.js → layout-C5dgIReC.js} +1 -1
  82. zenml/zen_server/dashboard/assets/layout-CFLL6-CM.js +1 -0
  83. zenml/zen_server/dashboard/assets/{login-mutation-C1hvP_cX.js → login-mutation-CidpsqyH.js} +1 -1
  84. zenml/zen_server/dashboard/assets/{logs-CQKlJjo0.js → logs-DoLoTEfj.js} +1 -1
  85. zenml/zen_server/dashboard/assets/mail-C160gvB0.js +1 -0
  86. zenml/zen_server/dashboard/assets/message-chat-square-DLz6XmPS.js +1 -0
  87. zenml/zen_server/dashboard/assets/{package-miExReQl.js → package-BhYXGPxF.js} +1 -1
  88. zenml/zen_server/dashboard/assets/page-6huxSHEu.js +1 -0
  89. zenml/zen_server/dashboard/assets/page-7CJ4Wq3O.js +1 -0
  90. zenml/zen_server/dashboard/assets/page-8U20Tu_8.js +1 -0
  91. zenml/zen_server/dashboard/assets/{page-4zc4xPv2.js → page-BByayrO-.js} +2 -2
  92. zenml/zen_server/dashboard/assets/page-BCRXJXC9.js +1 -0
  93. zenml/zen_server/dashboard/assets/page-BK59rZvf.js +1 -0
  94. zenml/zen_server/dashboard/assets/page-BMpXak4U.js +1 -0
  95. zenml/zen_server/dashboard/assets/page-BTDi81N3.js +1 -0
  96. zenml/zen_server/dashboard/assets/{page-D-tJ_Y0a.js → page-BX67x4iL.js} +1 -1
  97. zenml/zen_server/dashboard/assets/page-Bjmcdg64.js +1 -0
  98. zenml/zen_server/dashboard/assets/page-BsAn8p4m.js +1 -0
  99. zenml/zen_server/dashboard/assets/{page-C2i-C7jv.js → page-BwjPRuaY.js} +1 -1
  100. zenml/zen_server/dashboard/assets/page-CDtSVkNc.js +1 -0
  101. zenml/zen_server/dashboard/assets/page-CEDU0L2T.js +1 -0
  102. zenml/zen_server/dashboard/assets/page-COJK90rG.js +1 -0
  103. zenml/zen_server/dashboard/assets/page-CY0LPcAJ.js +1 -0
  104. zenml/zen_server/dashboard/assets/page-C_XMn4GU.js +1 -0
  105. zenml/zen_server/dashboard/assets/page-Cb3KGsPK.js +22 -0
  106. zenml/zen_server/dashboard/assets/page-Cc8owYXQ.js +1 -0
  107. zenml/zen_server/dashboard/assets/{page-C3JfJxuR.js → page-CeGBDh1Q.js} +1 -1
  108. zenml/zen_server/dashboard/assets/page-CiGOVsj3.js +1 -0
  109. zenml/zen_server/dashboard/assets/page-CmLSFMkW.js +1 -0
  110. zenml/zen_server/dashboard/assets/page-CnfCptXq.js +1 -0
  111. zenml/zen_server/dashboard/assets/page-CvllZMBF.js +1 -0
  112. zenml/zen_server/dashboard/assets/page-CxzglV3-.js +1 -0
  113. zenml/zen_server/dashboard/assets/{page-rVhXI5ZO.js → page-D6cvOG8w.js} +1 -1
  114. zenml/zen_server/dashboard/assets/{page-BxeZrG_t.js → page-DDWW21kl.js} +1 -1
  115. zenml/zen_server/dashboard/assets/{page-DiHZK-1w.js → page-DF4FVxxW.js} +2 -2
  116. zenml/zen_server/dashboard/assets/page-DSZfclXt.js +1 -0
  117. zenml/zen_server/dashboard/assets/page-DVLez4R1.js +1 -0
  118. zenml/zen_server/dashboard/assets/page-DcXrWWWh.js +1 -0
  119. zenml/zen_server/dashboard/assets/page-Dg7-H_9i.js +1 -0
  120. zenml/zen_server/dashboard/assets/{page-BPQ66vR-.js → page-DgldL5UB.js} +2 -2
  121. zenml/zen_server/dashboard/assets/page-Dw7XuiSo.js +18 -0
  122. zenml/zen_server/dashboard/assets/{page-DOCOmmKn.js → page-FQxi1Otg.js} +1 -1
  123. zenml/zen_server/dashboard/assets/page-XrmOHHg7.js +1 -0
  124. zenml/zen_server/dashboard/assets/page-YdWnx9MX.js +1 -0
  125. zenml/zen_server/dashboard/assets/page-oRm7D4TC.js +1 -0
  126. zenml/zen_server/dashboard/assets/{page-uxjMX8Iq.js → page-q41JNDWO.js} +1 -1
  127. zenml/zen_server/dashboard/assets/page-x2GXC8sI.js +1 -0
  128. zenml/zen_server/dashboard/assets/page-z2FXP4GY.js +1 -0
  129. zenml/zen_server/dashboard/assets/{persist-CFPbMcJX.js → persist-BKKcL1Kp.js} +1 -1
  130. zenml/zen_server/dashboard/assets/{persist-BsdEtCkd.js → persist-DxiyfAax.js} +1 -1
  131. zenml/zen_server/dashboard/assets/{pipeline-CSUlkd50.js → pipeline-BJ8liDnl.js} +1 -1
  132. zenml/zen_server/dashboard/assets/{plus-Cl0_rCVF.js → plus-cI8zD2xh.js} +1 -1
  133. zenml/zen_server/dashboard/assets/primary-role-CPGHymjN.js +1 -0
  134. zenml/zen_server/dashboard/assets/{react-error-boundary.esm-7_MuhCay.js → react-error-boundary.esm-DoXxY4pT.js} +1 -1
  135. zenml/zen_server/dashboard/assets/{refresh-BcTM09NW.js → refresh-3EF2R7ja.js} +1 -1
  136. zenml/zen_server/dashboard/assets/{resource-tyes-list-79FqS3LY.js → resource-tyes-list-B5rkZcbc.js} +1 -1
  137. zenml/zen_server/dashboard/assets/resource-type-tooltip-E97WGqfk.js +1 -0
  138. zenml/zen_server/dashboard/assets/service-B9aVzfAF.js +2 -0
  139. zenml/zen_server/dashboard/assets/service-connectors-DL2-k_E2.js +1 -0
  140. zenml/zen_server/dashboard/assets/{sharedSchema-C_HkejsG.js → sharedSchema-DyUO09BR.js} +1 -1
  141. zenml/zen_server/dashboard/assets/slash-circle-D2Lb2FyR.js +1 -0
  142. zenml/zen_server/dashboard/assets/stack-detail-query-Bc4QKlWg.js +1 -0
  143. zenml/zen_server/dashboard/assets/{terminal-XFL_4QN-.js → terminal-BObrvDlO.js} +1 -1
  144. zenml/zen_server/dashboard/assets/{terminal-square-XFL_4QN-.js → terminal-square-BObrvDlO.js} +1 -1
  145. zenml/zen_server/dashboard/assets/{transform-CeZdrxDZ.js → transform-DFpKTKgF.js} +1 -1
  146. zenml/zen_server/dashboard/assets/{trash-DP6Tpp_E.js → trash-HKxXWbSG.js} +1 -1
  147. zenml/zen_server/dashboard/assets/{update-current-user-mutation-Ca-Lmwuj.js → update-current-user-mutation-DSyUyHVj.js} +1 -1
  148. zenml/zen_server/dashboard/assets/update-server-settings-mutation-CdM-Sdds.js +1 -0
  149. zenml/zen_server/dashboard/assets/{zod-XdS2h1ws.js → zod-DgEcN9jD.js} +1 -1
  150. zenml/zen_server/dashboard/index.html +7 -7
  151. zenml/zen_stores/migrations/versions/0.84.0_release.py +23 -0
  152. zenml/zen_stores/sql_zen_store.py +9 -3
  153. {zenml_nightly-0.83.1.dev20250711.dist-info → zenml_nightly-0.84.0.dev20250712.dist-info}/METADATA +1 -1
  154. {zenml_nightly-0.83.1.dev20250711.dist-info → zenml_nightly-0.84.0.dev20250712.dist-info}/RECORD +157 -150
  155. zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-DsOmO1FH.js +0 -1
  156. zenml/zen_server/dashboard/assets/ButtonGroup-4sPZDv70.js +0 -1
  157. zenml/zen_server/dashboard/assets/CollapsibleCard-CBKenz9f.js +0 -1
  158. zenml/zen_server/dashboard/assets/ComponentIcon-CMiVW-O6.js +0 -1
  159. zenml/zen_server/dashboard/assets/DialogItem-CRCDpYU6.js +0 -1
  160. zenml/zen_server/dashboard/assets/Error-BG6f_WRd.js +0 -1
  161. zenml/zen_server/dashboard/assets/ExecutionStatus-BuhNAE9w.js +0 -1
  162. zenml/zen_server/dashboard/assets/NestedCollapsible-CMuDIJlp.js +0 -1
  163. zenml/zen_server/dashboard/assets/Partials-CfHD6OH5.js +0 -1
  164. zenml/zen_server/dashboard/assets/ProviderIcon-DHejyg7C.js +0 -1
  165. zenml/zen_server/dashboard/assets/ProviderRadio-tGtie8Gc.js +0 -1
  166. zenml/zen_server/dashboard/assets/RunsBody-mYwMcWWj.js +0 -1
  167. zenml/zen_server/dashboard/assets/SecretTooltip-B5u1UsQ9.js +0 -1
  168. zenml/zen_server/dashboard/assets/StackComponentList-Bi8BKqCu.js +0 -1
  169. zenml/zen_server/dashboard/assets/StackList-Cvxapo0p.js +0 -1
  170. zenml/zen_server/dashboard/assets/StackName-CFSZL8ec.js +0 -1
  171. zenml/zen_server/dashboard/assets/Tabs-D4dv48ry.js +0 -1
  172. zenml/zen_server/dashboard/assets/Tick-Qquvr4P3.js +0 -1
  173. zenml/zen_server/dashboard/assets/UsageReason-DhiUV1bu.js +0 -1
  174. zenml/zen_server/dashboard/assets/WizardFooter-FQm8y-jP.js +0 -1
  175. zenml/zen_server/dashboard/assets/configuration-form-DSoMMiPE.js +0 -1
  176. zenml/zen_server/dashboard/assets/constants-DTfsIqHy.js +0 -1
  177. zenml/zen_server/dashboard/assets/flyte-Cj-xy_8I.svg +0 -10
  178. zenml/zen_server/dashboard/assets/form-BgtamtJm.js +0 -1
  179. zenml/zen_server/dashboard/assets/form-schemas-dyDkAxXP.js +0 -1
  180. zenml/zen_server/dashboard/assets/gcp-B1I3Qvcx.js +0 -1
  181. zenml/zen_server/dashboard/assets/index-BfNISy0X.css +0 -1
  182. zenml/zen_server/dashboard/assets/layout-o1x87a3q.js +0 -1
  183. zenml/zen_server/dashboard/assets/metaflow-weOkWNyT.svg +0 -10
  184. zenml/zen_server/dashboard/assets/page-4xUZpMN0.js +0 -31
  185. zenml/zen_server/dashboard/assets/page-B0104V6C.js +0 -1
  186. zenml/zen_server/dashboard/assets/page-BNJsjvof.js +0 -1
  187. zenml/zen_server/dashboard/assets/page-BQgSZ2nH.js +0 -1
  188. zenml/zen_server/dashboard/assets/page-BXl2ZX6J.js +0 -1
  189. zenml/zen_server/dashboard/assets/page-C2A-2Cj_.js +0 -1
  190. zenml/zen_server/dashboard/assets/page-CESEqC2L.js +0 -1
  191. zenml/zen_server/dashboard/assets/page-CF8cTZ7l.js +0 -1
  192. zenml/zen_server/dashboard/assets/page-CKjsimVu.js +0 -1
  193. zenml/zen_server/dashboard/assets/page-COLzBwff.js +0 -1
  194. zenml/zen_server/dashboard/assets/page-COifg5fa.js +0 -1
  195. zenml/zen_server/dashboard/assets/page-CQeJuA8T.js +0 -1
  196. zenml/zen_server/dashboard/assets/page-CcjWEjre.js +0 -1
  197. zenml/zen_server/dashboard/assets/page-CefGLeWy.js +0 -1
  198. zenml/zen_server/dashboard/assets/page-CfxpV3j4.js +0 -1
  199. zenml/zen_server/dashboard/assets/page-ClcUzawe.js +0 -1
  200. zenml/zen_server/dashboard/assets/page-Ct_LB3zo.js +0 -1
  201. zenml/zen_server/dashboard/assets/page-D-ZWUMYY.js +0 -1
  202. zenml/zen_server/dashboard/assets/page-DHrvih9u.js +0 -1
  203. zenml/zen_server/dashboard/assets/page-DMhaHZDw.js +0 -1
  204. zenml/zen_server/dashboard/assets/page-DcQmxKLp.js +0 -1
  205. zenml/zen_server/dashboard/assets/page-Dh4GRWw5.js +0 -1
  206. zenml/zen_server/dashboard/assets/page-Dn7ZNapg.js +0 -1
  207. zenml/zen_server/dashboard/assets/page-Dy4vSQY7.js +0 -1
  208. zenml/zen_server/dashboard/assets/page-QrvWQwZb.js +0 -1
  209. zenml/zen_server/dashboard/assets/page-RF3Fup0q.js +0 -40
  210. zenml/zen_server/dashboard/assets/page-WuvCrN47.js +0 -1
  211. zenml/zen_server/dashboard/assets/page-_WnHBI1F.js +0 -1
  212. zenml/zen_server/dashboard/assets/page-ghjVNgVE.js +0 -1
  213. zenml/zen_server/dashboard/assets/page-iDsDiDXw.js +0 -1
  214. zenml/zen_server/dashboard/assets/resource-type-tooltip-BL9ZTRKi.js +0 -1
  215. zenml/zen_server/dashboard/assets/service-connectors-Q8h7-_rG.js +0 -1
  216. zenml/zen_server/dashboard/assets/service-k-9Vsb30.js +0 -2
  217. zenml/zen_server/dashboard/assets/stack-detail-query-CNmVZ0Bo.js +0 -1
  218. zenml/zen_server/dashboard/assets/type-guards-CNgPYg8l.js +0 -1
  219. zenml/zen_server/dashboard/assets/update-server-settings-mutation-Bwe3gUt4.js +0 -1
  220. {zenml_nightly-0.83.1.dev20250711.dist-info → zenml_nightly-0.84.0.dev20250712.dist-info}/LICENSE +0 -0
  221. {zenml_nightly-0.83.1.dev20250711.dist-info → zenml_nightly-0.84.0.dev20250712.dist-info}/WHEEL +0 -0
  222. {zenml_nightly-0.83.1.dev20250711.dist-info → zenml_nightly-0.84.0.dev20250712.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,18 @@
1
+ import{r as f,j as e,c as ss,g as Js}from"./@radix-C_LirfyT.js";import{a as tt,v as Pe,y as ge,Y as st,F as be,E as je,X as rt,s as ft,B,d as E,O as he,Q as me,R as fe,U as pe,a0 as bt,T as xe,r as Oe,a1 as Ys,a2 as rs,a3 as ze,a4 as Xs,a5 as ns,a6 as er,a7 as tr,a8 as Ht,a9 as sr,aa as rr,ab as nr,t as Ve,ac as wt,ad as as,ae as is,af as os,ag as ls,ah as cs,I as vt,ai as ds,aj as us,ak as hs,al as ms,am as ct,an as Nt,ao as kt,ap as de,aq as ue,f as fs,h as ps,i as xs,c as ar,l as _t,j as St,S as ir,C as Ke,n as Qe,o as We,p as Ge,ar as or,V as ve,as as lr,at as cr,A as dr,e as ur,b as Et,au as hr,J as dt,K as Lt,M as Tt,av as ut,Z as mr,_ as fr,aw as pr,G as xr,ax as gr,L as jr,$ as yr,z as qt,x as Cr,ay as br,az as wr}from"./index-BacoJBEQ.js";import{g as gs,a as js,b as vr}from"./code-snippets-CqONne41.js";import{S as Nr,a as kr,C as _r}from"./ComponentIcon-BXgpt-jw.js";import{S as Sr,a as ht}from"./dataflow-2-qHjWt7zp.js";import{S as ys,M as Er,a as Rt}from"./index-mA8kL088.js";import{S as He}from"./info-CyMih3vQ.js";import{b as Ee,c as Ot,h as nt,q as Lr}from"./@tanstack-C0SeHZng.js";import{E as Cs}from"./react-error-boundary.esm-DoXxY4pT.js";import{S as bs}from"./SheetHeader-7vwlsY_i.js";import{E as Ie}from"./Error-DcVLcrLs.js";import{S as Pt}from"./pipeline-BJ8liDnl.js";import{S as Tr}from"./terminal-square-BObrvDlO.js";import{D as et}from"./DisplayDate-v3KW7oez.js";import{a as pt,E as Fe,b as ws,c as Rr,S as Bt,g as Or}from"./ExecutionStatus-C4tlFnlh.js";import{K as q,N as ye,a as ke,V as _e,b as Pr}from"./NestedCollapsible-CN9scBUn.js";import{L as qe,a as le,c as It,f as vs}from"./@react-router-BSsrkPOd.js";import{C as Se}from"./CodeSnippet-D8iBqOVv.js";import{C as $e,a as Ir}from"./CollapsibleCard-D0-pQi1n.js";import{E as Ce}from"./EmptyState-DG0m-CGv.js";import{I as xt,S as Ar}from"./Infobox-DFCWPbMb.js";import{S as Ns}from"./check-D1bHMJkL.js";import{S as Ae}from"./chevron-down-Z3nUe-0U.js";import{H as Ut,P as Zt,u as ks,a as _s,B as Dr,b as Mr,c as zr,d as Fr}from"./@reactflow-D9hglKLF.js";import{S as $r}from"./plus-cI8zD2xh.js";import{S as Ss}from"./refresh-3EF2R7ja.js";import{S as mt}from"./arrow-left-hcj2H8HY.js";import{a as Vr,S as Hr}from"./SearchField-D_0-uAPj.js";import{d as qr}from"./index-BRhKF2z-.js";import{c as Es,s as Br}from"./dates-Buh6SMo7.js";import{S as Ur}from"./code-browser-DftoiCIg.js";import{S as at}from"./logs-DoLoTEfj.js";import{S as Zr}from"./expand-full-CD4fFvM-.js";import{C as Kr}from"./ComponentBadge-mw2Ja_ON.js";import{u as Ls}from"./stack-detail-query-Bc4QKlWg.js";import{S as Qr}from"./terminal-BObrvDlO.js";import{S as Wr}from"./trash-HKxXWbSG.js";import{D as Gr,a as Jr}from"./DeleteAlertDialog-BbyFVnVI.js";import{u as Yr}from"./delete-run-ibBtciMR.js";import"./bar-chart-square-check-9siI9icm.js";import"./layout-C5dgIReC.js";import"./transform-DFpKTKgF.js";import"./chevron-right-double-CbRQKN4Q.js";import"./check-circle-mnEgPhPF.js";import"./help-B0CvBhCm.js";import"./eye-CLNgIh_K.js";import"./zod-DgEcN9jD.js";import"./index.esm-COnaHLSh.js";const Xr=t=>f.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 2C3.55228 2 4 2.44772 4 3V21C4 21.5523 3.55228 22 3 22C2.44772 22 2 21.5523 2 21V3C2 2.44772 2.44772 2 3 2ZM14.7071 4.29289C15.0976 4.68342 15.0976 5.31658 14.7071 5.70711L9.41421 11H21C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H9.41421L14.7071 18.2929C15.0976 18.6834 15.0976 19.3166 14.7071 19.7071C14.3166 20.0976 13.6834 20.0976 13.2929 19.7071L6.29289 12.7071C5.90237 12.3166 5.90237 11.6834 6.29289 11.2929L13.2929 4.29289C13.6834 3.90237 14.3166 3.90237 14.7071 4.29289Z"})),en=t=>f.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.5971 1.18505C11.8629 1.13038 12.1371 1.13038 12.4029 1.18505C12.7102 1.24824 12.9848 1.40207 13.2032 1.52436C13.2235 1.53575 13.2433 1.54687 13.2627 1.55761L12.7846 2.41823L13.2627 1.55761L20.6627 5.66872C20.6831 5.68009 20.7042 5.6917 20.7258 5.70359C20.9569 5.8309 21.2476 5.99097 21.4707 6.23315L21.1563 6.52296L21.4707 6.23315C21.6637 6.44253 21.8097 6.6907 21.899 6.96105C22.0024 7.27375 22.0011 7.60553 22.0002 7.8694C22.0001 7.89406 22 7.91813 22 7.94153V12.0001C22 12.5524 21.5523 13.0001 21 13.0001C20.4477 13.0001 20 12.5524 20 12.0001V8.69955L17.0029 10.3646C16.992 10.3709 16.9811 10.377 16.9701 10.3829L13 12.5885L13 20.4443C13.3511 20.4447 13.6916 20.6302 13.8742 20.9589C14.1424 21.4417 13.9684 22.0505 13.4856 22.3187L13.2627 22.4426C13.2433 22.4533 13.2235 22.4644 13.2032 22.4758C12.9848 22.5981 12.7102 22.7519 12.4029 22.8151C12.1371 22.8698 11.8629 22.8698 11.5971 22.8151C11.2898 22.7519 11.0152 22.5981 10.7968 22.4758C10.7765 22.4644 10.7567 22.4533 10.7373 22.4426L3.33733 18.3314C3.31688 18.3201 3.2958 18.3085 3.27421 18.2966C3.04308 18.1693 2.75245 18.0092 2.52927 17.767C2.33632 17.5576 2.1903 17.3095 2.10097 17.0391C1.99765 16.7264 1.99886 16.3946 1.99982 16.1308C1.99991 16.1061 2 16.082 2 16.0586V7.94153C2 7.91813 1.99991 7.89406 1.99982 7.8694C1.99886 7.60553 1.99765 7.27375 2.10097 6.96105C2.1903 6.69069 2.33632 6.44253 2.52927 6.23315C2.75244 5.99098 3.04306 5.8309 3.27419 5.7036C3.29579 5.6917 3.31687 5.68009 3.33733 5.66872L3.33733 5.66872L6.99904 3.63444C7.00862 3.62891 7.01828 3.62354 7.02802 3.61834L10.7373 1.55761C10.7567 1.54687 10.7765 1.53575 10.7968 1.52437C11.0152 1.40207 11.2898 1.24824 11.5971 1.18505ZM7.5 5.64404L5.05914 7.00008L12 10.8561L14.4408 9.50006L7.5 5.64404ZM16.5 8.3561L9.55913 4.50008L11.7086 3.30592C11.8602 3.22174 11.9375 3.1792 11.9952 3.15136C11.9969 3.15056 11.9985 3.1498 12 3.14907C12.0015 3.1498 12.0031 3.15056 12.0048 3.15136C12.0625 3.1792 12.1398 3.22173 12.2914 3.30592L18.9408 7.00006L16.5 8.3561ZM11 12.5885L4 8.69959V16.0586C4 16.2416 4.00042 16.3353 4.0045 16.4031C4.00462 16.4051 4.00475 16.407 4.00487 16.4088C4.0064 16.4098 4.00802 16.4108 4.00971 16.4119C4.067 16.4484 4.14867 16.4943 4.30862 16.5831L3.82297 17.4573L4.30862 16.5831L11 20.3006L11 12.5885ZM19 16.0001C17.8954 16.0001 17 16.8955 17 18.0001C17 19.1047 17.8954 20.0001 19 20.0001C20.1046 20.0001 21 19.1047 21 18.0001C21 16.8955 20.1046 16.0001 19 16.0001ZM15 18.0001C15 15.7909 16.7909 14.0001 19 14.0001C21.2091 14.0001 23 15.7909 23 18.0001C23 18.8713 22.7215 19.6775 22.2486 20.3344L22.7071 20.793C23.0976 21.1835 23.0976 21.8167 22.7071 22.2072C22.3166 22.5977 21.6834 22.5977 21.2929 22.2072L20.7052 21.6195C20.1879 21.8636 19.6099 22.0001 19 22.0001C16.7909 22.0001 15 20.2092 15 18.0001Z"})),Kt=t=>f.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.16146 2H17.8385C18.3657 1.99998 18.8205 1.99997 19.195 2.03057C19.5904 2.06287 19.9836 2.13419 20.362 2.32698C20.9265 2.6146 21.3854 3.07354 21.673 3.63803C21.8658 4.01641 21.9371 4.40963 21.9694 4.80497C22 5.17954 22 5.6343 22 6.16144V17.8386C22 18.3657 22 18.8205 21.9694 19.195C21.9371 19.5904 21.8658 19.9836 21.673 20.362C21.3854 20.9265 20.9265 21.3854 20.362 21.673C19.9836 21.8658 19.5904 21.9371 19.195 21.9694C18.8205 22 18.3657 22 17.8386 22H6.16144C5.6343 22 5.17954 22 4.80497 21.9694C4.40963 21.9371 4.01641 21.8658 3.63803 21.673C3.07354 21.3854 2.6146 20.9265 2.32698 20.362C2.13419 19.9836 2.06287 19.5904 2.03057 19.195C1.99997 18.8205 1.99998 18.3657 2 17.8385V6.16146C1.99998 5.63431 1.99997 5.17955 2.03057 4.80497C2.06287 4.40963 2.13419 4.01641 2.32698 3.63803C2.6146 3.07354 3.07354 2.6146 3.63803 2.32698C4.01641 2.13419 4.40963 2.06287 4.80497 2.03057C5.17955 1.99997 5.63431 1.99998 6.16146 2ZM4 10.4649V17.8C4 18.3766 4.00078 18.7488 4.02393 19.0322C4.04612 19.3038 4.0838 19.4045 4.109 19.454C4.20487 19.6422 4.35785 19.7951 4.54601 19.891C4.59546 19.9162 4.69617 19.9539 4.96784 19.9761C5.25117 19.9992 5.62345 20 6.2 20H8L8 15.5681C7.99997 15.3157 7.99994 15.0699 8.01695 14.8618C8.03562 14.6332 8.07969 14.3634 8.21799 14.092C8.40974 13.7157 8.7157 13.4097 9.09202 13.218C9.36344 13.0797 9.63318 13.0356 9.86177 13.0169C10.0699 12.9999 10.3157 13 10.5681 13H13.4319C13.6843 13 13.9301 12.9999 14.1382 13.0169C14.3668 13.0356 14.6366 13.0797 14.908 13.218C15.2843 13.4097 15.5903 13.7157 15.782 14.092C15.9203 14.3634 15.9644 14.6332 15.9831 14.8618C16.0001 15.0699 16 15.3157 16 15.5681L16 20H17.8C18.3766 20 18.7488 19.9992 19.0322 19.9761C19.3038 19.9539 19.4045 19.9162 19.454 19.891C19.6422 19.7951 19.7951 19.6422 19.891 19.454C19.9162 19.4045 19.9539 19.3038 19.9761 19.0322C19.9992 18.7488 20 18.3766 20 17.8V10.4649C19.4117 10.8052 18.7286 11 18 11C16.8053 11 15.7329 10.4762 15 9.64583C14.2671 10.4762 13.1947 11 12 11C10.8053 11 9.73295 10.4762 9 9.64582C8.26706 10.4762 7.19469 11 6 11C5.27143 11 4.58835 10.8052 4 10.4649ZM10 7C10 8.10457 10.8954 9 12 9C13.1046 9 14 8.10457 14 7C14 6.44772 14.4477 6 15 6C15.5523 6 16 6.44772 16 7C16 8.10457 16.8954 9 18 9C19.1046 9 20 8.10457 20 7V6.2C20 5.62345 19.9992 5.25118 19.9761 4.96784C19.9539 4.69617 19.9162 4.59546 19.891 4.54601C19.7951 4.35785 19.6422 4.20487 19.454 4.109C19.4045 4.0838 19.3038 4.04612 19.0322 4.02393C18.7488 4.00078 18.3766 4 17.8 4H6.2C5.62345 4 5.25117 4.00078 4.96784 4.02393C4.69617 4.04612 4.59546 4.0838 4.54601 4.109C4.35785 4.20487 4.20487 4.35785 4.109 4.54601C4.0838 4.59546 4.04612 4.69617 4.02393 4.96784C4.00078 5.25117 4 5.62345 4 6.2V7C4 8.10457 4.89543 9 6 9C7.10457 9 8 8.10457 8 7C8 6.44772 8.44772 6 9 6C9.55229 6 10 6.44772 10 7ZM14 20V15.6C14 15.3035 13.9992 15.1412 13.9897 15.0246C13.9893 15.02 13.9889 15.0156 13.9886 15.0115C13.9844 15.0111 13.98 15.0107 13.9754 15.0103C13.8588 15.0008 13.6965 15 13.4 15H10.6C10.3035 15 10.1412 15.0008 10.0246 15.0103C10.02 15.0107 10.0156 15.0111 10.0114 15.0115C10.0111 15.0156 10.0107 15.02 10.0103 15.0246C10.0008 15.1412 10 15.3035 10 15.6V20H14Z"}));function Ts({artifactType:t,className:s}){switch(t){case"DataAnalysisArtifact":return e.jsx(en,{className:s});case"DataArtifact":return e.jsx(kr,{className:s});case"ModelArtifact":return e.jsx(Sr,{className:s});case"SchemaArtifact":return e.jsx(Nr,{className:s});case"ServiceArtifact":return e.jsx(Kt,{className:s});case"StatisticsArtifact":return e.jsx(Kt,{className:s});default:return e.jsx(tt,{className:s})}}const Rs=f.createContext(null);function tn({children:t}){const[s,r]=f.useState(new Set),n=a=>s.has(a),i=a=>{r(o=>{const d=new Set(o);return d.add(a),d})};return e.jsx(Rs.Provider,{value:{confirmedVisualizations:s,isVisualizationConfirmed:n,confirmVisualization:i},children:t})}function Os(){const t=f.useContext(Rs);if(!t)throw new Error("useArtifactLoadConfirmationContext must be used within a VisualizationConfirmProvider");return t}function sn({versionId:t}){return["artifact_versions",t]}async function rn({versionId:t}){const s=ge(je.artifactVersions.detail(t)),r=await Pe(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&st(),!r.ok)throw new be({message:`Error while fetching artifact version ${t}`,status:r.status,statusText:r.statusText});return r.json()}function Je(t,s){return Ee({queryKey:sn(t),queryFn:()=>rn(t),...s})}function nn({runId:t,queryParams:s={}}){return["runs",t,s]}async function an({runId:t,queryParams:s={}}){const r=rt(s),n=ge(je.runs.detail(t))+(r?`?${r}`:""),i=await Pe(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(i.status===404&&st(),!i.ok)throw new be({message:`Error while fetching pipeline run ${t}`,status:i.status,statusText:i.statusText});return i.json()}function oe(t,s){return Ee({queryKey:nn(t),queryFn:()=>an(t),...s})}function on({stepId:t}){return["steps",t]}async function ln({stepId:t}){const s=ge(je.steps.detail(t)),r=await Pe(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&st(),!r.ok)throw new be({message:`Error while fetching step ${t}`,status:r.status,statusText:r.statusText});return r.json()}function Be(t,s){return Ee({queryKey:on(t),queryFn:()=>ln(t),...s})}async function cn({artifactVersionId:t}){const s=ge(je.artifactVersions.downloadToken(t)),r=await Pe(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){const n=await r.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>"Error while fetching artifact download token");throw new be({status:r.status,statusText:r.statusText,message:n})}return r.json()}function dn(t){return Ot({...t,mutationFn:async s=>cn(s)})}function un({artifactVersionId:t}){const{toast:s}=ft(),r=ge(je.artifactVersions.data(t)),{mutate:n,isPending:i}=dn({onSuccess:o=>{window.open(`${r}?${new URLSearchParams({token:o})}`,"_blank")},onError:o=>{s({status:"error",emphasis:"subtle",rounded:!0,description:o.message})}});function a(){n({artifactVersionId:t})}return e.jsx(B,{onClick:a,disabled:i,type:"button",children:"Download"})}function hn({artifactVersionId:t}){var i,a,o,d,h,u,y,w,x,g,p;const s=Je({versionId:t}),r=(a=(i=s.data)==null?void 0:i.resources)==null?void 0:a.producer_pipeline_run_id,n=(d=(o=s.data)==null?void 0:o.resources)==null?void 0:d.producer_step_run_id;return s.isPending?e.jsx(E,{className:"h-[500px] w-full"}):s.isError?e.jsx(Ie,{err:s.error}):e.jsx($e,{initialOpen:!0,title:"Details",children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[r&&e.jsx(fn,{producerRunId:r}),n&&e.jsx(mn,{producerStepId:n}),e.jsx(q,{label:"Materializer",value:e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(fe,{className:"cursor-default",children:(h=s.data.body)==null?void 0:h.materializer.attribute}),e.jsxs(pe,{align:"start",children:[(u=s.data.body)==null?void 0:u.materializer.module,".",(y=s.data.body)==null?void 0:y.materializer.attribute]})]})})}),e.jsx(q,{label:"Type",value:(w=s.data.body)==null?void 0:w.type}),e.jsx(q,{label:"Author",value:e.jsx("div",{className:"inline-flex items-center gap-1",children:e.jsx(bt,{username:((g=(x=s.data.resources)==null?void 0:x.user)==null?void 0:g.name)||""})})}),e.jsx(q,{label:"Updated",value:e.jsx(et,{dateString:((p=s.data.body)==null?void 0:p.updated)||""})})]})})}function mn({producerStepId:t}){const s=Be({stepId:t});return s.isPending?e.jsx(q,{label:"Producer Step",value:e.jsx(E,{className:"h-5 w-full"})}):s.isError?null:e.jsx(q,{label:"Producer Step",value:e.jsx(e.Fragment,{children:s.data?e.jsxs(xe,{color:pt("completed"),className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[e.jsx(Fe,{className:"mr-1 fill-current",status:"completed"}),s.data.name]}):e.jsx(E,{className:"h-full w-[150px]"})})})}function fn({producerRunId:t}){var r,n,i,a,o;const s=oe({runId:t});return s.isPending?e.jsx(q,{label:e.jsx(E,{className:"h-5 w-full"}),value:e.jsx(E,{className:"h-5 w-full"})}):s.isError?null:e.jsxs(e.Fragment,{children:[e.jsx(q,{label:"Pipeline",value:e.jsx(qe,{to:Oe.projects.pipelines.namespace(encodeURIComponent((n=(r=s.data.body)==null?void 0:r.pipeline)==null?void 0:n.name)),children:e.jsxs(xe,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[e.jsx(Pt,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(a=(i=s.data.body)==null?void 0:i.pipeline)==null?void 0:a.name]})})}),e.jsx(q,{label:"Producer Run",value:t?e.jsx(qe,{to:Oe.projects.runs.detail(t),children:e.jsxs(xe,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:pt((o=s.data.body)==null?void 0:o.status),children:[e.jsx(Tr,{className:"mr-1 h-4 w-4 fill-current"}),t.split("-")[0]]})}):"Not available"})]})}function pn({artifactVersionId:t}){var o,d,h,u;const{data:s,isPending:r,isError:n,error:i}=Je({versionId:t}),a=(o=s==null?void 0:s.body)==null?void 0:o.artifact_store_id;return n?e.jsx(Ie,{err:i}):r?e.jsx(E,{className:"h-[500px] w-full"}):e.jsx($e,{initialOpen:!0,title:"Data",children:e.jsxs("dl",{className:"grid w-full grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[e.jsxs("dt",{className:"col-span-3 flex items-center justify-between text-theme-text-secondary",children:["Uri",e.jsx(un,{artifactVersionId:t})]}),e.jsx("dd",{className:"col-span-3 w-full truncate text-neutral-700",children:e.jsx("div",{className:"pb-2",children:e.jsx(Se,{fullWidth:!0,code:s.body.uri})})}),a&&e.jsx(q,{label:"Artifact Store",value:e.jsx(gn,{artifactStoreId:a})}),e.jsx(q,{label:"Data Type",value:e.jsx(xe,{className:"flex w-fit items-center text-theme-text-primary",color:"grey",emphasis:"subtle",rounded:!1,children:e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(fe,{className:"cursor-auto",children:(d=s.body)==null?void 0:d.data_type.attribute}),e.jsxs(pe,{children:[(h=s.body)==null?void 0:h.data_type.module,".",(u=s.body)==null?void 0:u.data_type.attribute," "]})]})})})})]})})}function xn({artifactVersionId:t}){return e.jsx($e,{initialOpen:!0,title:"Code",children:e.jsx(Se,{fullWidth:!0,highlightCode:!0,wrap:!0,code:gs(t)})})}function gn({artifactStoreId:t}){var o,d;const s=Ee({...Ys.componentDetail(t)});if(s.isPending)return e.jsx(E,{className:"h-6 w-12"});if(s.isError)return e.jsx("p",{children:"Error loading artifact store"});const r=s.data,n=Oe.components.detail(t),i=((o=r.body)==null?void 0:o.type)||"orchestrator",a=(d=r.body)==null?void 0:d.logo_url;return e.jsx(qe,{to:n,children:e.jsxs(xe,{emphasis:"subtle",rounded:!1,className:"flex w-fit items-center gap-0.5 text-theme-text-primary",color:"grey",children:[a?e.jsx("img",{alt:r.name,width:20,height:20,className:"shrink-0 object-contain",src:a}):e.jsx(_r,{className:"aspect-square h-4 w-4 fill-primary-400 object-contain",type:i}),r.name]})})}function jn({artifactVersionId:t}){const{data:s,isError:r,error:n}=Je({versionId:t});return r?e.jsx(Ie,{err:n}):e.jsxs("div",{className:"space-y-5",children:[s?e.jsx(hn,{artifactVersionId:s.id}):e.jsx(E,{className:"h-[500px] rounded-md lg:col-span-2"}),s?e.jsx(pn,{artifactVersionId:s.id}):e.jsx(E,{className:"h-[500px] rounded-md lg:col-span-2"}),s?e.jsx(xn,{artifactVersionId:s.id}):e.jsx(E,{className:"h-[500px] rounded-md lg:col-span-2"})]})}function At({metadata:t}){const s=Object.entries(t||{}).filter(([r,n])=>rs(n));return e.jsx(e.Fragment,{children:s.map(([r,n],i)=>e.jsx(ye,{data:n,title:r},i))})}function Dt({metadata:t,title:s}){const r=/^<class\s+'.*'>$/,n=Object.entries(t).filter(([a,o])=>!rs(o));if(n.length===0)return null;n.sort((a,o)=>a[0].localeCompare(o[0]));const i=n.reduce((a,[o,d])=>(a[o]=d,a),{});return e.jsx("div",{children:e.jsx($e,{headerClassName:"flex items-center gap-2",headerChildren:e.jsx(Ir,{copyText:JSON.stringify(i)}),initialOpen:!0,title:s||"Uncategorized",children:e.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:n.map(([a,o],d)=>e.jsx(q,{label:e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(fe,{className:"cursor-default truncate",children:a}),e.jsx(pe,{className:"max-w-[480px]",children:a})]})}),value:e.jsx(e.Fragment,{children:ze(o)&&r.test(o)?e.jsx(Se,{className:"py-1",highlightCode:!0,code:o}):ze(o)&&Xs(o)?e.jsx("a",{className:"underline transition-all duration-200 hover:decoration-transparent",href:o,target:"_blank",rel:"noopener noreferrer",children:o}):e.jsx("div",{className:"whitespace-normal",children:ze(o)?o:JSON.stringify(o)})})},d))})})})}function yn({artifactVersionId:t}){var i,a,o;const{data:s,isError:r,error:n}=Je({versionId:t});return r?e.jsx(Ie,{err:n}):!((i=s==null?void 0:s.metadata)!=null&&i.run_metadata)||Object.keys(s.metadata.run_metadata).length===0?e.jsx(Ce,{icon:e.jsx(tt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available for this artifact."})]})}):e.jsxs("div",{className:"flex flex-col gap-5",children:[s?e.jsx(Dt,{metadata:(a=s.metadata)==null?void 0:a.run_metadata}):e.jsx(E,{className:"h-9 w-full"}),s?e.jsx(At,{metadata:(o=s.metadata)==null?void 0:o.run_metadata}):e.jsx(E,{className:"h-9 w-full"})]})}function Ps({versionId:t,params:s}){return["artifact_versions",t,"visualize",s]}async function Cn({versionId:t,params:s={}},r){const n=rt(s).toString(),i=ge(je.artifactVersions.visualize(t)+(n?`?${n}`:"")),a=await Pe(i,{method:"GET",headers:{"Content-Type":"application/json"},signal:r});if(!a.ok){const o=await a.json().then(d=>Array.isArray(d.detail)?d.detail[1]:d.detail).catch(()=>`Error while fetching artifact visualization for ${t}`);throw new be({status:a.status,statusText:a.statusText,message:o})}return a.json()}function Is(t,s){return Ee({queryKey:Ps(t),queryFn:({signal:r})=>Cn(t,r),...s})}function bn({content:t}){const s=f.useRef(null),r=()=>{var n;if(s.current){const i=(n=s.current.contentWindow)==null?void 0:n.document.documentElement.scrollHeight;s.current.height=i?`${i}px`:"100%"}};return f.useEffect(()=>(r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}),[]),e.jsx("div",{children:e.jsx("iframe",{className:"w-full",title:"Secure HTML Content",ref:s,srcDoc:t,onLoad:r})})}function wn({content:t}){return e.jsx("div",{className:"flex items-center justify-center",children:e.jsx("img",{src:ns("data:image/png;base64,"+t),alt:"Visualization for artifact"})})}function vn({content:t}){const s=Nn(t);return e.jsx(Se,{fullWidth:!0,highlightCode:!0,code:ze(s)?s:JSON.stringify(s,null,2)})}function Nn(t){try{return JSON.parse(t)}catch{return t}}const kn={image:"png",html:"html",markdown:"md",csv:"csv",json:"json"},_n={image:"image/png",html:"text/html",markdown:"text/markdown",csv:"text/csv",json:"application/json"};function As({artifactVersionId:t,visualizationIndex:s,artifactName:r}){const n={index:s},{data:i,isSuccess:a}=Is({versionId:t,params:n},{retry:!1});if(!a)return null;const{type:o,value:d}=i;function h(){const y=atob(d),w=new Array(y.length);for(let g=0;g<y.length;g++)w[g]=y.charCodeAt(g);return new Uint8Array(w)}function u(){try{const y=new Blob([o==="image"?h():d],{type:_n[o]}),w=window.URL.createObjectURL(y),x=document.createElement("a");x.href=w,x.download=`${r}_${s}.`+kn[o],x.click()}catch(y){console.error(y)}}return e.jsxs(B,{intent:"secondary",emphasis:"subtle",size:"md",className:"flex items-center gap-1 bg-theme-surface-primary",onClick:u,children:[e.jsx(ys,{width:24,height:24,className:"shrink-0 fill-theme-text-primary"}),"Download"]})}function Sn({content:t}){return e.jsx(Er,{className:"!prose !max-w-none",children:t})}var lt={exports:{}};/* @license
2
+ Papa Parse
3
+ v5.5.2
4
+ https://github.com/mholt/PapaParse
5
+ License: MIT
6
+ */var En=lt.exports,Qt;function Ln(){return Qt||(Qt=1,function(t,s){((r,n)=>{t.exports=n()})(En,function r(){var n=typeof self<"u"?self:typeof window<"u"?window:n!==void 0?n:{},i,a=!n.document&&!!n.postMessage,o=n.IS_PAPA_WORKER||!1,d={},h=0,u={};function y(l){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(c){var m=$(c);m.chunkSize=parseInt(m.chunkSize),c.step||c.chunk||(m.chunkSize=null),this._handle=new j(m),(this._handle.streamer=this)._config=m}).call(this,l),this.parseChunk=function(c,m){var C=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<C){let T=this._config.newline;T||(b=this._config.quoteChar||'"',T=this._handle.guessLineEndings(c,b)),c=[...c.split(T).slice(C)].join(T)}this.isFirstChunk&&P(this._config.beforeFirstChunk)&&(b=this._config.beforeFirstChunk(c))!==void 0&&(c=b),this.isFirstChunk=!1,this._halted=!1;var C=this._partialLine+c,b=(this._partialLine="",this._handle.parse(C,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(c=b.meta.cursor,C=(this._finished||(this._partialLine=C.substring(c-this._baseIndex),this._baseIndex=c),b&&b.data&&(this._rowCount+=b.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),o)n.postMessage({results:b,workerId:u.WORKER_ID,finished:C});else if(P(this._config.chunk)&&!m){if(this._config.chunk(b,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=b=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(b.data),this._completeResults.errors=this._completeResults.errors.concat(b.errors),this._completeResults.meta=b.meta),this._completed||!C||!P(this._config.complete)||b&&b.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),C||b&&b.meta.paused||this._nextChunk(),b}this._halted=!0},this._sendError=function(c){P(this._config.error)?this._config.error(c):o&&this._config.error&&n.postMessage({workerId:u.WORKER_ID,error:c,finished:!1})}}function w(l){var c;(l=l||{}).chunkSize||(l.chunkSize=u.RemoteChunkSize),y.call(this,l),this._nextChunk=a?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(m){this._input=m,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(c=new XMLHttpRequest,this._config.withCredentials&&(c.withCredentials=this._config.withCredentials),a||(c.onload=V(this._chunkLoaded,this),c.onerror=V(this._chunkError,this)),c.open(this._config.downloadRequestBody?"POST":"GET",this._input,!a),this._config.downloadRequestHeaders){var m,C=this._config.downloadRequestHeaders;for(m in C)c.setRequestHeader(m,C[m])}var b;this._config.chunkSize&&(b=this._start+this._config.chunkSize-1,c.setRequestHeader("Range","bytes="+this._start+"-"+b));try{c.send(this._config.downloadRequestBody)}catch(T){this._chunkError(T.message)}a&&c.status===0&&this._chunkError()}},this._chunkLoaded=function(){c.readyState===4&&(c.status<200||400<=c.status?this._chunkError():(this._start+=this._config.chunkSize||c.responseText.length,this._finished=!this._config.chunkSize||this._start>=(m=>(m=m.getResponseHeader("Content-Range"))!==null?parseInt(m.substring(m.lastIndexOf("/")+1)):-1)(c),this.parseChunk(c.responseText)))},this._chunkError=function(m){m=c.statusText||m,this._sendError(new Error(m))}}function x(l){(l=l||{}).chunkSize||(l.chunkSize=u.LocalChunkSize),y.call(this,l);var c,m,C=typeof FileReader<"u";this.stream=function(b){this._input=b,m=b.slice||b.webkitSlice||b.mozSlice,C?((c=new FileReader).onload=V(this._chunkLoaded,this),c.onerror=V(this._chunkError,this)):c=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var b=this._input,T=(this._config.chunkSize&&(T=Math.min(this._start+this._config.chunkSize,this._input.size),b=m.call(b,this._start,T)),c.readAsText(b,this._config.encoding));C||this._chunkLoaded({target:{result:T}})},this._chunkLoaded=function(b){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(b.target.result)},this._chunkError=function(){this._sendError(c.error)}}function g(l){var c;y.call(this,l=l||{}),this.stream=function(m){return c=m,this._nextChunk()},this._nextChunk=function(){var m,C;if(!this._finished)return m=this._config.chunkSize,c=m?(C=c.substring(0,m),c.substring(m)):(C=c,""),this._finished=!c,this.parseChunk(C)}}function p(l){y.call(this,l=l||{});var c=[],m=!0,C=!1;this.pause=function(){y.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){y.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(b){this._input=b,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){C&&c.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),c.length?this.parseChunk(c.shift()):m=!0},this._streamData=V(function(b){try{c.push(typeof b=="string"?b:b.toString(this._config.encoding)),m&&(m=!1,this._checkIsFinished(),this.parseChunk(c.shift()))}catch(T){this._streamError(T)}},this),this._streamError=V(function(b){this._streamCleanUp(),this._sendError(b)},this),this._streamEnd=V(function(){this._streamCleanUp(),C=!0,this._streamData("")},this),this._streamCleanUp=V(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function j(l){var c,m,C,b,T=Math.pow(2,53),Q=-T,se=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,re=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,I=this,U=0,k=0,X=!1,R=!1,D=[],N={data:[],errors:[],meta:{}};function ee(z){return l.skipEmptyLines==="greedy"?z.join("").trim()==="":z.length===1&&z[0].length===0}function Y(){if(N&&C&&(we("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+u.DefaultDelimiter+"'"),C=!1),l.skipEmptyLines&&(N.data=N.data.filter(function(L){return!ee(L)})),ae()){let L=function(J,te){P(l.transformHeader)&&(J=l.transformHeader(J,te)),D.push(J)};if(N)if(Array.isArray(N.data[0])){for(var z=0;ae()&&z<N.data.length;z++)N.data[z].forEach(L);N.data.splice(0,1)}else N.data.forEach(L)}function H(L,J){for(var te=l.header?{}:[],Z=0;Z<L.length;Z++){var K=Z,F=L[Z],F=((Ne,A)=>(W=>(l.dynamicTypingFunction&&l.dynamicTyping[W]===void 0&&(l.dynamicTyping[W]=l.dynamicTypingFunction(W)),(l.dynamicTyping[W]||l.dynamicTyping)===!0))(Ne)?A==="true"||A==="TRUE"||A!=="false"&&A!=="FALSE"&&((W=>{if(se.test(W)&&(W=parseFloat(W),Q<W&&W<T))return 1})(A)?parseFloat(A):re.test(A)?new Date(A):A===""?null:A):A)(K=l.header?Z>=D.length?"__parsed_extra":D[Z]:K,F=l.transform?l.transform(F,K):F);K==="__parsed_extra"?(te[K]=te[K]||[],te[K].push(F)):te[K]=F}return l.header&&(Z>D.length?we("FieldMismatch","TooManyFields","Too many fields: expected "+D.length+" fields but parsed "+Z,k+J):Z<D.length&&we("FieldMismatch","TooFewFields","Too few fields: expected "+D.length+" fields but parsed "+Z,k+J)),te}var G;N&&(l.header||l.dynamicTyping||l.transform)&&(G=1,!N.data.length||Array.isArray(N.data[0])?(N.data=N.data.map(H),G=N.data.length):N.data=H(N.data,0),l.header&&N.meta&&(N.meta.fields=D),k+=G)}function ae(){return l.header&&D.length===0}function we(z,H,G,L){z={type:z,code:H,message:G},L!==void 0&&(z.row=L),N.errors.push(z)}P(l.step)&&(b=l.step,l.step=function(z){N=z,ae()?Y():(Y(),N.data.length!==0&&(U+=z.data.length,l.preview&&U>l.preview?m.abort():(N.data=N.data[0],b(N,I))))}),this.parse=function(z,H,G){var L=l.quoteChar||'"',L=(l.newline||(l.newline=this.guessLineEndings(z,L)),C=!1,l.delimiter?P(l.delimiter)&&(l.delimiter=l.delimiter(z),N.meta.delimiter=l.delimiter):((L=((J,te,Z,K,F)=>{var Ne,A,W,Me;F=F||[","," ","|",";",u.RECORD_SEP,u.UNIT_SEP];for(var Ue=0;Ue<F.length;Ue++){for(var Le,Ye=F[Ue],ie=0,Te=0,ne=0,ce=(W=void 0,new S({comments:K,delimiter:Ye,newline:te,preview:10}).parse(J)),De=0;De<ce.data.length;De++)Z&&ee(ce.data[De])?ne++:(Le=ce.data[De].length,Te+=Le,W===void 0?W=Le:0<Le&&(ie+=Math.abs(Le-W),W=Le));0<ce.data.length&&(Te/=ce.data.length-ne),(A===void 0||ie<=A)&&(Me===void 0||Me<Te)&&1.99<Te&&(A=ie,Ne=Ye,Me=Te)}return{successful:!!(l.delimiter=Ne),bestDelimiter:Ne}})(z,l.newline,l.skipEmptyLines,l.comments,l.delimitersToGuess)).successful?l.delimiter=L.bestDelimiter:(C=!0,l.delimiter=u.DefaultDelimiter),N.meta.delimiter=l.delimiter),$(l));return l.preview&&l.header&&L.preview++,c=z,m=new S(L),N=m.parse(c,H,G),Y(),X?{meta:{paused:!0}}:N||{meta:{paused:!1}}},this.paused=function(){return X},this.pause=function(){X=!0,m.abort(),c=P(l.chunk)?"":c.substring(m.getCharIndex())},this.resume=function(){I.streamer._halted?(X=!1,I.streamer.parseChunk(c,!0)):setTimeout(I.resume,3)},this.aborted=function(){return R},this.abort=function(){R=!0,m.abort(),N.meta.aborted=!0,P(l.complete)&&l.complete(N),c=""},this.guessLineEndings=function(J,L){J=J.substring(0,1048576);var L=new RegExp(v(L)+"([^]*?)"+v(L),"gm"),G=(J=J.replace(L,"")).split("\r"),L=J.split(`
7
+ `),J=1<L.length&&L[0].length<G[0].length;if(G.length===1||J)return`
8
+ `;for(var te=0,Z=0;Z<G.length;Z++)G[Z][0]===`
9
+ `&&te++;return te>=G.length/2?`\r
10
+ `:"\r"}}function v(l){return l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function S(l){var c=(l=l||{}).delimiter,m=l.newline,C=l.comments,b=l.step,T=l.preview,Q=l.fastMode,se=null,re=!1,I=l.quoteChar==null?'"':l.quoteChar,U=I;if(l.escapeChar!==void 0&&(U=l.escapeChar),(typeof c!="string"||-1<u.BAD_DELIMITERS.indexOf(c))&&(c=","),C===c)throw new Error("Comment character same as delimiter");C===!0?C="#":(typeof C!="string"||-1<u.BAD_DELIMITERS.indexOf(C))&&(C=!1),m!==`
11
+ `&&m!=="\r"&&m!==`\r
12
+ `&&(m=`
13
+ `);var k=0,X=!1;this.parse=function(R,D,N){if(typeof R!="string")throw new Error("Input must be a string");var ee=R.length,Y=c.length,ae=m.length,we=C.length,z=P(b),H=[],G=[],L=[],J=k=0;if(!R)return ie();if(Q||Q!==!1&&R.indexOf(I)===-1){for(var te=R.split(m),Z=0;Z<te.length;Z++){if(L=te[Z],k+=L.length,Z!==te.length-1)k+=m.length;else if(N)return ie();if(!C||L.substring(0,we)!==C){if(z){if(H=[],Me(L.split(c)),Te(),X)return ie()}else Me(L.split(c));if(T&&T<=Z)return H=H.slice(0,T),ie(!0)}}return ie()}for(var K=R.indexOf(c,k),F=R.indexOf(m,k),Ne=new RegExp(v(U)+v(I),"g"),A=R.indexOf(I,k);;)if(R[k]===I)for(A=k,k++;;){if((A=R.indexOf(I,A+1))===-1)return N||G.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:H.length,index:k}),Le();if(A===ee-1)return Le(R.substring(k,A).replace(Ne,I));if(I===U&&R[A+1]===U)A++;else if(I===U||A===0||R[A-1]!==U){K!==-1&&K<A+1&&(K=R.indexOf(c,A+1));var W=Ue((F=F!==-1&&F<A+1?R.indexOf(m,A+1):F)===-1?K:Math.min(K,F));if(R.substr(A+1+W,Y)===c){L.push(R.substring(k,A).replace(Ne,I)),R[k=A+1+W+Y]!==I&&(A=R.indexOf(I,k)),K=R.indexOf(c,k),F=R.indexOf(m,k);break}if(W=Ue(F),R.substring(A+1+W,A+1+W+ae)===m){if(L.push(R.substring(k,A).replace(Ne,I)),Ye(A+1+W+ae),K=R.indexOf(c,k),A=R.indexOf(I,k),z&&(Te(),X))return ie();if(T&&H.length>=T)return ie(!0);break}G.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:H.length,index:k}),A++}}else if(C&&L.length===0&&R.substring(k,k+we)===C){if(F===-1)return ie();k=F+ae,F=R.indexOf(m,k),K=R.indexOf(c,k)}else if(K!==-1&&(K<F||F===-1))L.push(R.substring(k,K)),k=K+Y,K=R.indexOf(c,k);else{if(F===-1)break;if(L.push(R.substring(k,F)),Ye(F+ae),z&&(Te(),X))return ie();if(T&&H.length>=T)return ie(!0)}return Le();function Me(ne){H.push(ne),J=k}function Ue(ne){var ce=0;return ce=ne!==-1&&(ne=R.substring(A+1,ne))&&ne.trim()===""?ne.length:ce}function Le(ne){return N||(ne===void 0&&(ne=R.substring(k)),L.push(ne),k=ee,Me(L),z&&Te()),ie()}function Ye(ne){k=ne,Me(L),L=[],F=R.indexOf(m,k)}function ie(ne){if(l.header&&!D&&H.length&&!re){var ce=H[0],De={},jt=new Set(ce);let $t=!1;for(let Ze=0;Ze<ce.length;Ze++){let Re=ce[Ze];if(De[Re=P(l.transformHeader)?l.transformHeader(Re,Ze):Re]){let Xe,Vt=De[Re];for(;Xe=Re+"_"+Vt,Vt++,jt.has(Xe););jt.add(Xe),ce[Ze]=Xe,De[Re]++,$t=!0,(se=se===null?{}:se)[Xe]=Re}else De[Re]=1,ce[Ze]=Re;jt.add(Re)}$t&&console.warn("Duplicate headers found and renamed."),re=!0}return{data:H,errors:G,meta:{delimiter:c,linebreak:m,aborted:X,truncated:!!ne,cursor:J+(D||0),renamedHeaders:se}}}function Te(){b(ie()),H=[],G=[]}},this.abort=function(){X=!0},this.getCharIndex=function(){return k}}function O(l){var c=l.data,m=d[c.workerId],C=!1;if(c.error)m.userError(c.error,c.file);else if(c.results&&c.results.data){var b={abort:function(){C=!0,_(c.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:M,resume:M};if(P(m.userStep)){for(var T=0;T<c.results.data.length&&(m.userStep({data:c.results.data[T],errors:c.results.errors,meta:c.results.meta},b),!C);T++);delete c.results}else P(m.userChunk)&&(m.userChunk(c.results,b,c.file),delete c.results)}c.finished&&!C&&_(c.workerId,c.results)}function _(l,c){var m=d[l];P(m.userComplete)&&m.userComplete(c),m.terminate(),delete d[l]}function M(){throw new Error("Not implemented.")}function $(l){if(typeof l!="object"||l===null)return l;var c,m=Array.isArray(l)?[]:{};for(c in l)m[c]=$(l[c]);return m}function V(l,c){return function(){l.apply(c,arguments)}}function P(l){return typeof l=="function"}return u.parse=function(l,c){var m=(c=c||{}).dynamicTyping||!1;if(P(m)&&(c.dynamicTypingFunction=m,m={}),c.dynamicTyping=m,c.transform=!!P(c.transform)&&c.transform,!c.worker||!u.WORKERS_SUPPORTED)return m=null,u.NODE_STREAM_INPUT,typeof l=="string"?(l=(C=>C.charCodeAt(0)!==65279?C:C.slice(1))(l),m=new(c.download?w:g)(c)):l.readable===!0&&P(l.read)&&P(l.on)?m=new p(c):(n.File&&l instanceof File||l instanceof Object)&&(m=new x(c)),m.stream(l);(m=(()=>{var C;return!!u.WORKERS_SUPPORTED&&(C=(()=>{var b=n.URL||n.webkitURL||null,T=r.toString();return u.BLOB_URL||(u.BLOB_URL=b.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",T,")();"],{type:"text/javascript"})))})(),(C=new n.Worker(C)).onmessage=O,C.id=h++,d[C.id]=C)})()).userStep=c.step,m.userChunk=c.chunk,m.userComplete=c.complete,m.userError=c.error,c.step=P(c.step),c.chunk=P(c.chunk),c.complete=P(c.complete),c.error=P(c.error),delete c.worker,m.postMessage({input:l,config:c,workerId:m.id})},u.unparse=function(l,c){var m=!1,C=!0,b=",",T=`\r
14
+ `,Q='"',se=Q+Q,re=!1,I=null,U=!1,k=((()=>{if(typeof c=="object"){if(typeof c.delimiter!="string"||u.BAD_DELIMITERS.filter(function(D){return c.delimiter.indexOf(D)!==-1}).length||(b=c.delimiter),typeof c.quotes!="boolean"&&typeof c.quotes!="function"&&!Array.isArray(c.quotes)||(m=c.quotes),typeof c.skipEmptyLines!="boolean"&&typeof c.skipEmptyLines!="string"||(re=c.skipEmptyLines),typeof c.newline=="string"&&(T=c.newline),typeof c.quoteChar=="string"&&(Q=c.quoteChar),typeof c.header=="boolean"&&(C=c.header),Array.isArray(c.columns)){if(c.columns.length===0)throw new Error("Option columns is empty");I=c.columns}c.escapeChar!==void 0&&(se=c.escapeChar+Q),c.escapeFormulae instanceof RegExp?U=c.escapeFormulae:typeof c.escapeFormulae=="boolean"&&c.escapeFormulae&&(U=/^[=+\-@\t\r].*$/)}})(),new RegExp(v(Q),"g"));if(typeof l=="string"&&(l=JSON.parse(l)),Array.isArray(l)){if(!l.length||Array.isArray(l[0]))return X(null,l,re);if(typeof l[0]=="object")return X(I||Object.keys(l[0]),l,re)}else if(typeof l=="object")return typeof l.data=="string"&&(l.data=JSON.parse(l.data)),Array.isArray(l.data)&&(l.fields||(l.fields=l.meta&&l.meta.fields||I),l.fields||(l.fields=Array.isArray(l.data[0])?l.fields:typeof l.data[0]=="object"?Object.keys(l.data[0]):[]),Array.isArray(l.data[0])||typeof l.data[0]=="object"||(l.data=[l.data])),X(l.fields||[],l.data||[],re);throw new Error("Unable to serialize unrecognized input");function X(D,N,ee){var Y="",ae=(typeof D=="string"&&(D=JSON.parse(D)),typeof N=="string"&&(N=JSON.parse(N)),Array.isArray(D)&&0<D.length),we=!Array.isArray(N[0]);if(ae&&C){for(var z=0;z<D.length;z++)0<z&&(Y+=b),Y+=R(D[z],z);0<N.length&&(Y+=T)}for(var H=0;H<N.length;H++){var G=(ae?D:N[H]).length,L=!1,J=ae?Object.keys(N[H]).length===0:N[H].length===0;if(ee&&!ae&&(L=ee==="greedy"?N[H].join("").trim()==="":N[H].length===1&&N[H][0].length===0),ee==="greedy"&&ae){for(var te=[],Z=0;Z<G;Z++){var K=we?D[Z]:Z;te.push(N[H][K])}L=te.join("").trim()===""}if(!L){for(var F=0;F<G;F++){0<F&&!J&&(Y+=b);var Ne=ae&&we?D[F]:F;Y+=R(N[H][Ne],F)}H<N.length-1&&(!ee||0<G&&!J)&&(Y+=T)}}return Y}function R(D,N){var ee,Y;return D==null?"":D.constructor===Date?JSON.stringify(D).slice(1,25):(Y=!1,U&&typeof D=="string"&&U.test(D)&&(D="'"+D,Y=!0),ee=D.toString().replace(k,se),(Y=Y||m===!0||typeof m=="function"&&m(D,N)||Array.isArray(m)&&m[N]||((ae,we)=>{for(var z=0;z<we.length;z++)if(-1<ae.indexOf(we[z]))return!0;return!1})(ee,u.BAD_DELIMITERS)||-1<ee.indexOf(b)||ee.charAt(0)===" "||ee.charAt(ee.length-1)===" ")?Q+ee+Q:ee)}},u.RECORD_SEP="",u.UNIT_SEP="",u.BYTE_ORDER_MARK="\uFEFF",u.BAD_DELIMITERS=["\r",`
15
+ `,'"',u.BYTE_ORDER_MARK],u.WORKERS_SUPPORTED=!a&&!!n.Worker,u.NODE_STREAM_INPUT=1,u.LocalChunkSize=10485760,u.RemoteChunkSize=5242880,u.DefaultDelimiter=",",u.Parser=S,u.ParserHandle=j,u.NetworkStreamer=w,u.FileStreamer=x,u.StringStreamer=g,u.ReadableStreamStreamer=p,n.jQuery&&((i=n.jQuery).fn.parse=function(l){var c=l.config||{},m=[];return this.each(function(T){if(!(i(this).prop("tagName").toUpperCase()==="INPUT"&&i(this).attr("type").toLowerCase()==="file"&&n.FileReader)||!this.files||this.files.length===0)return!0;for(var Q=0;Q<this.files.length;Q++)m.push({file:this.files[Q],inputElem:this,instanceConfig:i.extend({},c)})}),C(),this;function C(){if(m.length===0)P(l.complete)&&l.complete();else{var T,Q,se,re,I=m[0];if(P(l.before)){var U=l.before(I.file,I.inputElem);if(typeof U=="object"){if(U.action==="abort")return T="AbortError",Q=I.file,se=I.inputElem,re=U.reason,void(P(l.error)&&l.error({name:T},Q,se,re));if(U.action==="skip")return void b();typeof U.config=="object"&&(I.instanceConfig=i.extend(I.instanceConfig,U.config))}else if(U==="skip")return void b()}var k=I.instanceConfig.complete;I.instanceConfig.complete=function(X){P(k)&&k(X,I.file,I.inputElem),b()},u.parse(I.file,I.instanceConfig)}}function b(){m.splice(0,1),C()}}),o&&(n.onmessage=function(l){l=l.data,u.WORKER_ID===void 0&&l&&(u.WORKER_ID=l.workerId),typeof l.input=="string"?n.postMessage({workerId:u.WORKER_ID,results:u.parse(l.input,l.config),finished:!0}):(n.File&&l.input instanceof File||l.input instanceof Object)&&(l=u.parse(l.input,l.config))&&n.postMessage({workerId:u.WORKER_ID,results:l,finished:!0})}),(w.prototype=Object.create(y.prototype)).constructor=w,(x.prototype=Object.create(y.prototype)).constructor=x,(g.prototype=Object.create(g.prototype)).constructor=g,(p.prototype=Object.create(y.prototype)).constructor=p,u})}(lt)),lt.exports}var Tn=Ln();function Rn({content:t}){const[s,r]=f.useState([]),[n,i]=f.useState([]);return f.useEffect(()=>{Tn.parse(t,{header:!0,skipEmptyLines:!0,complete:a=>{const o=[],d=[];a.data.forEach(h=>{o.push(Object.keys(h)),d.push(Object.values(h))}),r(o[0]),i(d)}})},[t]),e.jsx("div",{className:"overflow-hidden overflow-x-auto rounded-md border",children:e.jsxs(er,{children:[e.jsx(tr,{className:"bg-theme-surface-tertiary",children:e.jsx(Ht,{children:s.map((a,o)=>e.jsx(sr,{className:"text-theme-text-secondary",children:a},o))})}),e.jsx(rr,{children:n.map((a,o)=>e.jsx(Ht,{children:a.map((d,h)=>e.jsx(nr,{className:"bg-theme-surface-primary",children:d},h))},o))})]})})}function On({artifactVersionId:t,artifactName:s,visualizationIndex:r=0}){const[n,i]=f.useState(!1),a={index:r},{isVisualizationConfirmed:o,confirmVisualization:d}=Os(),h=nt(),{data:u,isError:y,error:w,isPending:x}=Is({versionId:t,params:a},{retry:!1,enabled:!n});return n?e.jsx(Ce,{icon:e.jsx(Ve,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx("p",{className:"mb-5 text-text-lg text-theme-text-secondary",children:"Loading the visualization cancelled"}),e.jsx(B,{size:"md",onClick:()=>i(!1),children:"Load Visualization"})]})}):y?w.status===501?e.jsx(Ce,{icon:e.jsx(Ve,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("p",{className:"text-center text-text-lg text-theme-text-secondary",children:["This artifact cannot be visualized because it cannot be loaded from the artifact store. This might happen if your ZenML server does not have the artifact stores dependencies installed or if the server is not authenticated to access it. For more information, see our"," ",e.jsx("a",{className:"link",rel:"noopener noreferrer",target:"_blank",href:"https://docs.zenml.io/stack-components/artifact-stores/custom",children:"docs"})]})}):e.jsx(Ce,{icon:e.jsx(Ve,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsx("div",{className:"text-center",children:e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:w.message})})}):x?e.jsxs("div",{className:"flex flex-col items-center gap-7 py-12",children:[e.jsx(wt,{}),e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("p",{className:"mb-5 text-display-xs",children:"Loading Visualization"}),e.jsx(B,{onClick:()=>{h.cancelQueries({queryKey:Ps({versionId:t})}),i(!0)},intent:"secondary",size:"md",children:"Cancel"})]})]}):o(r)?e.jsxs("div",{children:[u.type==="image"&&e.jsx(wn,{content:u.value}),u.type==="html"&&e.jsx(bn,{content:u.value}),u.type==="markdown"&&e.jsx(Sn,{content:u.value}),u.type==="csv"&&e.jsx(Rn,{content:u.value}),u.type==="json"&&e.jsx(vn,{content:u.value})]}):e.jsx(Pn,{artifactVersionId:t,visualizationIndex:r,artifactName:s,confirmVisualization:()=>d(r),...u})}function Pn({artifactName:t,confirmVisualization:s,artifactVersionId:r,visualizationIndex:n}){return e.jsxs("div",{className:"flex flex-col items-center justify-center gap-8",children:[e.jsx(xt,{children:"This preview may contain harmful code. Only proceed if you trust the source. Loading content from untrusted sources can pose risks. If unsure, avoid loading."}),e.jsxs("div",{className:"flex justify-center gap-4",children:[e.jsx(B,{size:"md",onClick:()=>s(),children:"Load Preview"}),e.jsx(As,{artifactVersionId:r,visualizationIndex:n,artifactName:t})]})]})}function In({setIndex:t,visualizations:s,index:r}){var a;const[n,i]=f.useState(!1);return e.jsxs(as,{open:n,onOpenChange:i,children:[e.jsx(is,{asChild:!0,children:e.jsxs(B,{intent:"secondary",emphasis:"subtle",className:"flex items-center gap-0.5 bg-theme-surface-primary",size:"md",children:[(a=s[r].body)==null?void 0:a.uri.split("/").pop(),e.jsx(Ae,{width:24,height:24,className:"fill-text-primary shrink-0"})]})}),e.jsx(os,{className:"px-0",align:"start",children:e.jsxs(ls,{defaultValue:r.toString(),className:"rounded-sharp",children:[e.jsx(cs,{className:"m-0",placeholder:"Search visualizations...",children:e.jsx(vt,{className:"w-full",inputSize:"sm"})}),e.jsxs(ds,{children:[e.jsx(us,{children:"No visualization found."}),e.jsx(hs,{className:"max-h-[300px] overflow-y-auto",children:s.map((o,d)=>{var u;const h=(u=o.body)==null?void 0:u.uri.split("/").pop();return e.jsxs(ms,{keywords:[h??""],className:"group data-[selected=true]:rounded-sharp",value:d.toString(),onSelect:()=>{t(d),i(!1)},children:[d===r?e.jsx(Ns,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary group-data-[selected=true]:fill-theme-text-brand"}):e.jsx(tt,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary group-data-[selected=true]:fill-theme-text-brand"}),h]},o.id)})})]})]})})]})}function An({artifactVersionId:t}){var u,y,w;const[s,r]=f.useState(0),{isVisualizationConfirmed:n}=Os(),{data:i,isPending:a,isError:o,error:d}=Je({versionId:t});if(o)return e.jsx(Ce,{icon:e.jsx(ht,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsx("div",{className:"text-center",children:e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:d.message})})});if(a)return e.jsx(E,{className:"h-[300px] w-full"});const h=((u=i.metadata)==null?void 0:u.visualizations)||[];return h.length<1?e.jsx(Ce,{icon:e.jsx(ht,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No visualizations found"}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no visualizations available for this artifact version."})]})}):e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:`flex ${h.length>1?"justify-between":"justify-end"}`,children:[h.length>1&&e.jsx(In,{setIndex:r,visualizations:h,index:s}),n(s)&&e.jsx(As,{artifactName:((y=i.body)==null?void 0:y.artifact.name)||"artifact",artifactVersionId:t,visualizationIndex:s})]}),e.jsx(On,{artifactName:((w=i.body)==null?void 0:w.artifact.name)||"artifact",visualizationIndex:s,artifactVersionId:t})]})}function Dn({error:t}){return e.jsx(Ce,{icon:e.jsx(ht,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"Something went wrong"}),e.jsx("p",{className:"text-lg text-theme-text-secondary",children:t.message})]})})}function Mn({artifactVersionId:t}){var n,i,a;const{data:s}=Je({versionId:t}),r=(n=s==null?void 0:s.body)==null?void 0:n.version;return e.jsxs("div",{children:[e.jsx(bs,{}),e.jsxs("div",{className:"border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:[s?e.jsx("p",{className:"mb-0.5 text-text-sm text-theme-text-secondary",children:t}):e.jsx(E,{className:"w-9"}),s?e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ts,{artifactType:((i=s.body)==null?void 0:i.type)||"BaseArtifact",className:"h-5 w-5 fill-theme-surface-strong"}),e.jsx("h2",{className:"text-display-xs font-semibold",children:(a=s.body)==null?void 0:a.artifact.name}),e.jsx(ct,{color:r?"light-purple":"light-grey",rounded:!1,children:r||"None"})]}):e.jsx(E,{className:"h-6 w-7"})]}),e.jsx("div",{className:"p-5",children:e.jsx(tn,{children:e.jsxs(Nt,{defaultValue:"overview",children:[e.jsxs(kt,{children:[e.jsxs(de,{className:"flex items-center gap-2 text-text-md",value:"overview",children:[e.jsx(He,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Overview"})]}),e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"metadata",children:[e.jsx(Rt,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Metadata"})]}),e.jsxs(de,{className:"flex items-center gap-2 text-text-md",value:"visualization",children:[e.jsx(ht,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Visualization"})]})]}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"overview",children:e.jsx(jn,{artifactVersionId:t})}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:e.jsx(yn,{artifactVersionId:t})}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"visualization",children:e.jsx(Cs,{FallbackComponent:Dn,children:e.jsx(An,{artifactVersionId:t})})})]})})})]})}function zn({children:t,artifactVersionId:s,onOpenChange:r}){return e.jsxs(fs,{onOpenChange:r,children:[e.jsx(ps,{asChild:!0,children:t}),e.jsx(xs,{className:"w-[1000px] overflow-y-auto",children:e.jsx(Mn,{artifactVersionId:s})})]})}function gt({children:t}){return e.jsxs(e.Fragment,{children:[e.jsx(Ut,{style:{border:"transparent",top:0,background:"transparent",width:0,height:0},type:"target",position:Zt.Top}),e.jsx("div",{className:"flex w-[300px] items-center justify-center",children:t}),e.jsx(Ut,{isConnectable:!1,type:"source",style:{border:"transparent",bottom:0,background:"transparent",width:0,height:0},position:Zt.Bottom})]})}function Ds({className:t,code:s,type:r,...n}){const[i,a]=f.useState(!1),[o,d]=f.useState(!1);function h(u){navigator.clipboard&&(navigator.clipboard.writeText(u),a(!0),d(!0),setTimeout(()=>{d(!1),a(!1)},2e3))}return e.jsx(he,{children:e.jsxs(me,{open:o,onOpenChange:d,children:[e.jsx(fe,{asChild:!0,children:e.jsx("div",{...n,className:ar("hidden cursor-pointer items-center justify-center transition-all group-hover:flex",t),onClick:u=>{u.stopPropagation(),h(s)}})}),e.jsx(pe,{className:"w-full max-w-md whitespace-normal transition-opacity",children:i?"Copied!":`Copy code to load ${r}`})]})})}function Fn({data:t,selected:s}){const r=ks(),{addSelectedNodes:n}=r.getState();function i(o){o||setTimeout(()=>{n([])},100)}function a(o){const d=o.split(".");return d[d.length-1]}return e.jsx(gt,{children:e.jsx(zn,{onOpenChange:i,artifactVersionId:t.artifact_id,children:e.jsxs("button",{"data-selected":!!s,className:"group flex h-[50px] min-w-0 max-w-[300px] items-center justify-center gap-1 rounded-rounded border border-primary-100 bg-primary-25 py-1 pl-1 pr-2 transition-all duration-200 hover:border-primary-400 data-[selected=true]:border-primary-500 data-[selected=true]:bg-primary-500",children:[e.jsx("div",{className:"rounded-rounded bg-primary-50 p-0.5 group-data-[selected=true]:bg-white/20",children:e.jsx(Ts,{className:"h-4 w-4 fill-primary-400 group-data-[selected=true]:fill-theme-text-negative",artifactType:t.type})}),e.jsxs("div",{className:"min-w-0 text-left",children:[e.jsx("p",{className:"truncate text-text-sm font-semibold text-theme-text-brand group-data-[selected=true]:text-theme-text-negative",children:t.artifact_name}),e.jsx("p",{className:"truncate text-text-xs text-theme-text-secondary group-data-[selected=true]:text-white/70",children:a(t.data_type)})]}),e.jsxs(Ds,{className:"h-4 w-4 shrink-0 rounded-sm hover:bg-primary-100 active:bg-primary-200",code:gs(t.artifact_id),type:"artifact",children:[e.jsx(_t,{className:"h-3 w-3 fill-primary-400"}),e.jsx("div",{className:"sr-only",children:"Copy code to load artifact"})]})]})})})}const $n=t=>f.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2L8 2C8.55229 2 9 2.44772 9 3C9 3.55229 8.55229 4 8 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V8C4 8.55229 3.55229 9 3 9C2.44772 9 2 8.55229 2 8L2 7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H16C15.4477 4 15 3.55229 15 3C15 2.44772 15.4477 2 16 2L16.2413 2C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43598C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V8C22 8.55229 21.5523 9 21 9C20.4477 9 20 8.55229 20 8V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755ZM3 15C3.55229 15 4 15.4477 4 16V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H8C8.55229 20 9 20.4477 9 21C9 21.5523 8.55229 22 8 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413L2 16C2 15.4477 2.44772 15 3 15ZM21 15C21.5523 15 22 15.4477 22 16V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H16C15.4477 22 15 21.5523 15 21C15 20.4477 15.4477 20 16 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V16C20 15.4477 20.4477 15 21 15Z"})),Mt=t=>f.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z"}));function Vn(){const{getNodes:t,fitView:s,setViewport:r}=_s(),[n,i]=f.useState(""),[a,o]=f.useState(null),[d,h]=f.useState([]),u=f.useCallback(x=>{s({nodes:[x],maxZoom:1.2})},[s]);f.useEffect(()=>{if(!n){o(null),h([]);return}const g=t().filter(p=>{var j,v,S,O,_,M;return((v=(j=p.data)==null?void 0:j.step_name)==null?void 0:v.toLowerCase().includes(n.toLowerCase()))||((O=(S=p.data)==null?void 0:S.artifact_name)==null?void 0:O.toLowerCase().includes(n.toLowerCase()))||((M=(_=p.data)==null?void 0:_.node_name)==null?void 0:M.toLowerCase().includes(n.toLowerCase()))}).sort((p,j)=>{const v=p.position.y-j.position.y;return v!==0?v:p.position.x-j.position.x});h(g),o(null)},[n,t,r]);function y(){if(d.length===0)return;const x=(a??-1)+1;x>=d.length?o(0):o(x);const g=d[x>=d.length?0:x];u(g)}function w(){if(d.length===0)return;const x=(a??d.length)-1;x<0?o(d.length-1):o(x);const g=d[x<0?d.length-1:x];u(g)}return{search:n,setSearch:i,currentIndex:a,filteredNodes:d,zoomNext:y,zoomPrevious:w}}function Hn(t){f.useEffect(()=>{const s=r=>{(navigator.userAgent.toUpperCase().indexOf("MAC")!==-1?r.metaKey:r.ctrlKey)&&r.key.toLowerCase()==="k"&&(r.preventDefault(),t(a=>!a))};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}})}const Ms=f.forwardRef(({debounceMs:t=300,value:s,onChange:r,...n},i)=>{const[a,o]=f.useState(s);f.useEffect(()=>{o(s)},[s]);const d=f.useMemo(()=>qr(u=>{r==null||r(u)},t),[r,t]);f.useEffect(()=>()=>{d.cancel()},[d]);const h=f.useCallback(u=>{const y=u.target.value;o(y),d(y)},[d]);return e.jsx(vt,{...n,ref:i,value:a,onChange:h})});Ms.displayName="DebouncedInput";function qn(){const[t,s]=f.useState(!1),r=f.useRef(null);Hn(s);const{search:n,setSearch:i,currentIndex:a,filteredNodes:o,zoomNext:d,zoomPrevious:h}=Vn();f.useEffect(()=>{if(t&&r.current){const y=setTimeout(()=>{var w;(w=r.current)==null||w.focus()},200);return()=>clearTimeout(y)}},[t]);function u(y){y.preventDefault(),d()}return e.jsxs(St,{"data-state":t?"open":"closed",className:"flex h-7 w-7 items-center gap-1 overflow-hidden rounded-md border-neutral-300 transition-all duration-200 data-[state=open]:w-[350px]",children:[e.jsx(B,{intent:"secondary",emphasis:"subtle",onClick:()=>s(!t),className:"flex aspect-square h-full items-center justify-center border-none border-transparent bg-theme-surface-primary",children:e.jsx(Vr,{className:"size-4 shrink-0 fill-theme-text-primary"})}),t&&e.jsxs(e.Fragment,{children:[e.jsxs("form",{onSubmit:u,className:"relative",children:[e.jsx(Ms,{ref:r,className:"h-5 w-[150px] rounded-sm p-1 pr-5 text-text-xs",placeholder:"Search",value:n,onChange:y=>i(y)}),e.jsxs(B,{type:"button",onClick:()=>i(""),intent:"secondary",emphasis:"subtle",className:"absolute right-0.5 top-1/2 flex aspect-square size-3 -translate-y-1/2 items-center justify-center rounded-sm border-none p-0",children:[e.jsx("span",{className:"sr-only",children:"Clear search"}),e.jsx(ir,{className:"size-3 shrink-0 fill-theme-text-tertiary group-disabled:fill-theme-text-tertiary/40"})]})]}),e.jsx("p",{className:"whitespace-nowrap text-text-xs text-theme-text-secondary",children:o.length>0?a===null?`${o.length} ${o.length===1?"match":"matches"}`:`${a+1} of ${o.length}`:"No matches"}),e.jsxs("div",{className:"ml-auto flex items-center gap-1 pr-1",children:[e.jsx(B,{disabled:o.length===0,intent:"secondary",size:"sm",className:"group flex aspect-square size-3 items-center justify-center rounded-sm bg-theme-surface-primary",onClick:h,children:e.jsx(mt,{className:"size-3 shrink-0 rotate-90 fill-theme-text-tertiary group-disabled:fill-theme-text-tertiary/40"})}),e.jsx(B,{disabled:o.length===0,intent:"secondary",size:"sm",className:"group flex aspect-square size-3 items-center justify-center rounded-sm bg-theme-surface-primary",onClick:d,children:e.jsx(mt,{className:"size-3 shrink-0 -rotate-90 fill-theme-text-tertiary group-disabled:fill-theme-text-tertiary/40"})})]})]})]})}function Bn({refetch:t}){const{fitView:s,zoomIn:r,zoomOut:n}=_s();return e.jsxs("div",{"aria-label":"Dag Controls",className:"absolute left-4 top-4 z-10 flex flex-col gap-1",children:[e.jsx(qn,{}),e.jsxs("div",{className:"w-fit divide-y divide-neutral-300 overflow-hidden rounded-md border border-neutral-300 bg-theme-surface-primary",children:[e.jsx("div",{children:e.jsx(B,{onClick:()=>r(),emphasis:"subtle",className:"rounded-sharp border-none p-0.5",intent:"secondary",children:e.jsx($r,{className:"h-5 w-5 fill-theme-text-primary"})})}),e.jsx("div",{children:e.jsx(B,{onClick:()=>n(),emphasis:"subtle",className:"rounded-sharp border-none bg-theme-surface-primary p-0.5",intent:"secondary",children:e.jsx(Mt,{className:"h-5 w-5 fill-theme-text-primary"})})})]}),e.jsx(B,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>s(),emphasis:"subtle",intent:"secondary",children:e.jsx($n,{className:"h-5 w-5 fill-theme-text-primary"})}),e.jsxs(B,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>{t()},emphasis:"subtle",intent:"secondary",children:[e.jsx("span",{className:"sr-only",children:"Refresh"}),e.jsx(Ss,{className:"h-5 w-5 fill-theme-text-primary"})]})]})}const Un=4;function Zn(t){var n;const s=f.useMemo(()=>{var i;return((i=t.data)==null?void 0:i.points)??[]},[(n=t.data)==null?void 0:n.points]),r=f.useMemo(()=>s.reduce((i,a,o)=>{if(o===0)return`M ${a.x},${a.y}`;if(o===s.length-1)return`${i} L ${a.x},${a.y}`;{const d=s[o-1],h=s[o+1],u=a.x-d.x,y=a.y-d.y,w=h.x-a.x,x=h.y-a.y,g=Math.sqrt(u*u+y*y),p=Math.sqrt(w*w+x*x),j=Math.min(Un,g/2,p/2),v=a.x-u/g*j,S=a.y-y/g*j,O=a.x+w/p*j,_=a.y+x/p*j;return`${i} L ${v},${S} Q ${a.x},${a.y} ${O},${_}`}},""),[s]);return s.length?e.jsx(Dr,{...t,path:r}):null}function Kn({data:t}){const s=t.runStatus==="failed",r=t.runStatus==="completed",n=t.runStatus==="stopped";return e.jsx(gt,{children:e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(fe,{children:e.jsxs("div",{className:"flex h-[50px] min-w-0 max-w-[300px] items-center justify-center gap-1 rounded-rounded border border-primary-100 bg-primary-25 p-1 opacity-50",children:[e.jsx("div",{className:"rounded-rounded bg-primary-50 p-0.5",children:s?e.jsx(Mt,{className:"h-4 w-4 shrink-0 fill-primary-400"}):e.jsx(Fe,{status:r?"completed":n?"stopped":"running",className:"h-4 w-4 fill-primary-400"})}),e.jsx("p",{className:"truncate text-text-sm",children:t.node_name})]})}),e.jsx(pe,{className:"z-20 max-w-xs text-center",children:s?e.jsx(e.Fragment,{children:"This artifact was not generated because of an upstream error"}):n?e.jsx(e.Fragment,{children:"This artifact was not created because the run was stopped"}):e.jsx(e.Fragment,{children:"This artifact is not generated yet. It will not be created if the are upstream errors."})})]})})})}function Qn({data:t}){const s=t.runStatus==="failed",r=t.runStatus==="completed",n=t.runStatus==="stopped";return e.jsx(gt,{children:e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(fe,{children:e.jsxs("div",{className:"flex h-[50px] max-w-[300px] items-center gap-1 rounded-md border border-theme-border-moderate bg-theme-surface-primary p-1 pr-2 opacity-50",children:[e.jsx("div",{className:`rounded-sm ${s?"bg-blue-50":"bg-warning-50"} p-0.5`,children:s?e.jsx(Mt,{className:"h-4 w-4 shrink-0 fill-blue-500"}):e.jsx(Fe,{status:r?"completed":n?"stopped":"running",className:"h-4 w-4 fill-theme-text-warning"})}),e.jsx("p",{className:"truncate",children:t.node_name})]})}),e.jsx(pe,{className:"z-20 max-w-xs text-center",children:s?e.jsx(e.Fragment,{children:"This step will never start because of an upstream error"}):n?e.jsx(e.Fragment,{children:"This step was not executed because the run was stopped"}):e.jsxs(e.Fragment,{children:["This is a future step with pending execution.",e.jsx("br",{}),"It may not run if there are upstream errors."]})})]})})})}const zs=t=>f.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.29292 1.29292C2.56075 1.02509 2.95692 0.931566 3.31625 1.05134L6.31626 2.05134C6.7246 2.18746 7.00003 2.5696 7.00003 3.00003V5.58581L10.11 8.69574C10.0377 8.30745 10 7.9077 10 7.50003C10 3.91018 12.9102 1.00003 16.5 1.00003C17.6867 1.00003 18.8019 1.31894 19.7614 1.87638C20.0298 2.03232 20.2105 2.30406 20.2506 2.61187C20.2907 2.91968 20.1856 3.22865 19.9661 3.44815L17.3385 6.07576C17.1288 6.28544 17.0146 6.40072 16.9389 6.48989C16.9359 6.49344 16.9331 6.49682 16.9304 6.50003C16.9331 6.50323 16.9359 6.50661 16.9389 6.51016C17.0146 6.59933 17.1288 6.71461 17.3385 6.92429L17.5758 7.16155C17.7854 7.37123 17.9007 7.48541 17.9899 7.56111C17.9934 7.56412 17.9968 7.56696 18 7.56962C18.0032 7.56696 18.0066 7.56412 18.0102 7.56111C18.0993 7.48541 18.2146 7.37123 18.4243 7.16155L20.8822 4.70364C21.1187 4.46713 21.4578 4.36452 21.7858 4.43023C22.1137 4.49594 22.3871 4.72126 22.5142 5.03063C22.8277 5.7933 23 6.62779 23 7.50003C23 10.5046 20.9614 13.0331 18.1919 13.7777L21.2071 16.7928C22.4261 18.0117 22.4261 19.9881 21.2071 21.207C19.9882 22.426 18.0119 22.426 16.7929 21.207L12.0001 16.4142L7.20713 21.2071C5.98818 22.4261 4.01187 22.4261 2.79292 21.2071C1.57397 19.9882 1.57397 18.0119 2.79292 16.7929L9.08581 10.5L5.58581 7.00003H3.00003C2.5696 7.00003 2.18746 6.7246 2.05134 6.31626L1.05134 3.31625C0.931566 2.95692 1.02509 2.56075 1.29292 2.29292L2.29292 1.29292ZM5.00003 5.00003V3.72079L3.27012 3.14415L3.14415 3.27012L3.72079 5.00003H5.00003ZM11.2062 11.2081L4.20714 18.2071C3.76923 18.645 3.76923 19.355 4.20714 19.7929C4.64504 20.2308 5.35502 20.2308 5.79292 19.7929L12.9499 12.6359C12.9689 12.617 12.9882 12.5975 13.0079 12.5776C13.0487 12.5366 13.0913 12.4937 13.1355 12.4504L13.2326 12.3533C13.3452 12.2406 13.4665 12.1456 13.5937 12.0668C13.6314 12.0423 13.6697 12.0194 13.7087 11.9985C13.8064 11.9462 13.9249 11.8887 14.0691 11.8448C14.2133 11.8009 14.3438 11.7827 14.4541 11.7718C14.4756 11.7696 14.497 11.768 14.5184 11.7668C14.7885 11.7445 15.0574 11.7719 15.3055 11.84C15.4095 11.8686 15.515 11.8935 15.622 11.9146C15.6224 11.9147 15.6228 11.9148 15.6233 11.9149C15.6427 11.9187 15.6621 11.9224 15.6816 11.926C15.8091 11.9493 15.9384 11.9674 16.0696 11.9798C16.211 11.9932 16.3546 12 16.5 12C18.9853 12 21 9.98531 21 7.50003C21 7.47163 20.9998 7.44329 20.9992 7.41502L19.816 8.5983C19.6375 8.77679 19.4637 8.95062 19.3045 9.08579C19.1297 9.23422 18.9078 9.39379 18.6181 9.48793C18.2164 9.61844 17.7837 9.61844 17.382 9.48793C17.0923 9.39379 16.8704 9.23422 16.6955 9.08579C16.5363 8.95062 16.3625 8.7768 16.1841 8.59832L15.9017 8.31596C15.7233 8.13751 15.5494 7.96373 15.4143 7.80452C15.2658 7.62967 15.1063 7.40778 15.0121 7.11806C14.8816 6.71637 14.8816 6.28368 15.0121 5.88199C15.1063 5.59228 15.2658 5.37038 15.4143 5.19554C15.5494 5.03633 15.7232 4.86255 15.9017 4.68412L17.4792 3.10665C17.1643 3.03685 16.8367 3.00003 16.5 3.00003C14.0147 3.00003 12 5.01475 12 7.50003C12 7.80093 12.0294 8.09398 12.0852 8.37677L12.0888 8.39527C12.1337 8.62253 12.1727 8.82052 12.1978 8.97939C12.2214 9.12834 12.2493 9.33506 12.2283 9.54599C12.2173 9.65623 12.1991 9.78675 12.1552 9.93093C12.1114 10.0751 12.0538 10.1937 12.0015 10.2913C11.8581 10.5594 11.6197 10.7962 11.4224 10.9921C11.4025 11.0119 11.3831 11.0312 11.3642 11.0501L11.2081 11.2062C11.2078 11.2065 11.2074 11.2068 11.2071 11.2071C11.2068 11.2074 11.2065 11.2078 11.2062 11.2081ZM13.4143 15L18.2071 19.7928C18.645 20.2307 19.355 20.2307 19.7929 19.7928C20.2308 19.3549 20.2308 18.6449 19.7929 18.207L15.5109 13.9251C15.4187 13.911 15.3272 13.895 15.2363 13.8771C14.9852 13.8275 14.825 13.7961 14.7082 13.7777C14.6855 13.7741 14.667 13.7714 14.652 13.7694C14.6484 13.7726 14.6444 13.7762 14.64 13.7802C14.5816 13.8331 14.5053 13.9089 14.3727 14.0416C14.3699 14.0444 14.367 14.0472 14.3642 14.0501L13.4143 15Z"}));function Wn({stepId:t}){var a;const{data:s,isPending:r,isError:n,error:i}=Be({stepId:t});return n?e.jsx(Ie,{err:i}):r?e.jsx(E,{className:"h-[300px] w-full"}):e.jsx($e,{initialOpen:!0,title:"Code",children:e.jsx(Se,{fullWidth:!0,highlightCode:!0,wrap:!0,code:((a=s==null?void 0:s.metadata)==null?void 0:a.source_code)||""})})}const Gn=t=>f.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},f.createElement("path",{d:"M21.6613 9.95778C21.6071 9.9147 21.1007 9.53236 20.0329 9.53236C19.7509 9.53359 19.4695 9.55777 19.1914 9.60469C18.9848 8.18806 17.8136 7.49738 17.761 7.46639L17.4743 7.30103L17.2857 7.57317C17.0495 7.93875 16.8771 8.34175 16.7759 8.76504C16.5847 9.5737 16.7009 10.3332 17.1117 10.9826C16.6157 11.259 15.82 11.3271 15.6589 11.3331H2.48463C2.14053 11.3335 1.8613 11.6116 1.85942 11.9557C1.84406 13.1098 2.03959 14.2571 2.43641 15.341C2.89024 16.5311 3.56541 17.4078 4.44382 17.9443C5.42815 18.5472 7.02735 18.8916 8.84013 18.8916C9.65906 18.8942 10.4765 18.8201 11.2816 18.6703C12.4008 18.4648 13.4778 18.0736 14.4679 17.5129C15.2838 17.0404 16.0181 16.4393 16.6424 15.7328C17.6862 14.5513 18.308 13.2354 18.7704 12.0659C18.8324 12.0659 18.8944 12.0659 18.9547 12.0659C20.0975 12.0659 20.8002 11.6086 21.1877 11.2254C21.4453 10.981 21.6463 10.6833 21.7768 10.3531L21.8586 10.1137L21.6613 9.95778Z",fill:"#0091E2"}),f.createElement("path",{d:"M3.70578 10.9474H5.47119C5.55634 10.9474 5.62533 10.8783 5.62533 10.7932V9.22068C5.62581 9.13554 5.55717 9.06615 5.47206 9.06567C5.47178 9.06567 5.47147 9.06567 5.47119 9.06567H3.70578C3.62063 9.06567 3.55164 9.1347 3.55164 9.21981C3.55164 9.22009 3.55164 9.2204 3.55164 9.22068V10.7932C3.55164 10.8783 3.62063 10.9474 3.70578 10.9474Z",fill:"#0091E2"}),f.createElement("path",{d:"M6.13862 10.9474H7.90403C7.98918 10.9474 8.05817 10.8783 8.05817 10.7932V9.22068C8.05865 9.13554 7.99002 9.06615 7.90487 9.06567C7.90459 9.06567 7.90428 9.06567 7.904 9.06567H6.13859C6.05297 9.06567 5.98358 9.13506 5.98358 9.22068V10.7932C5.98409 10.8785 6.05333 10.9474 6.13862 10.9474Z",fill:"#0091E2"}),f.createElement("path",{d:"M8.60845 10.9474H10.3739C10.459 10.9474 10.528 10.8783 10.528 10.7932V9.22068C10.5285 9.13554 10.4599 9.06615 10.3747 9.06567C10.3744 9.06567 10.3741 9.06567 10.3738 9.06567H8.60843C8.52328 9.06567 8.45428 9.1347 8.45428 9.21981C8.45428 9.22009 8.45428 9.2204 8.45428 9.22068V10.7932C8.45431 10.8783 8.52334 10.9474 8.60845 10.9474Z",fill:"#0091E2"}),f.createElement("path",{d:"M11.049 10.9474H12.8145C12.8997 10.9474 12.969 10.8785 12.9695 10.7932V9.22068C12.9695 9.13506 12.9001 9.06567 12.8145 9.06567H11.049C10.9639 9.06567 10.8949 9.1347 10.8949 9.21981C10.8949 9.22009 10.8949 9.2204 10.8949 9.22068V10.7932C10.8949 10.8783 10.9639 10.9474 11.049 10.9474Z",fill:"#0091E2"}),f.createElement("path",{d:"M6.13859 8.685H7.904C7.98926 8.68452 8.05814 8.61525 8.05814 8.52999V6.95749C8.05814 6.87234 7.98912 6.80334 7.904 6.80334H6.13859C6.05333 6.80334 5.98406 6.8722 5.98358 6.95749V8.52999C5.98406 8.61542 6.05316 8.68452 6.13859 8.685Z",fill:"#0091E2"}),f.createElement("path",{d:"M8.60849 8.685H10.3739C10.4592 8.68452 10.528 8.61525 10.528 8.52999V6.95749C10.528 6.87234 10.459 6.80334 10.3739 6.80334H8.60849C8.52334 6.80334 8.45435 6.87237 8.45435 6.95749V8.52999C8.45435 8.61525 8.52323 8.68452 8.60849 8.685Z",fill:"#0091E2"}),f.createElement("path",{d:"M11.049 8.685H12.8145C12.8999 8.68452 12.969 8.61542 12.9695 8.52999V6.95749C12.969 6.8722 12.8997 6.80334 12.8145 6.80334H11.049C10.9639 6.80334 10.8949 6.87237 10.8949 6.95749V8.52999C10.8949 8.61525 10.9638 8.68452 11.049 8.685Z",fill:"#0091E2"}),f.createElement("path",{d:"M11.049 6.42184H12.8145C12.8997 6.42184 12.969 6.35296 12.9695 6.2677V4.6943C12.969 4.60902 12.8997 4.54016 12.8145 4.54016H11.049C10.9639 4.54016 10.8949 4.60916 10.8949 4.6943V6.26768C10.8949 6.35282 10.9639 6.42184 11.049 6.42184Z",fill:"#0091E2"}),f.createElement("path",{d:"M13.5111 10.9474H15.2765C15.3618 10.9474 15.4311 10.8785 15.4316 10.7932V9.22068C15.4316 9.13506 15.3622 9.06567 15.2765 9.06567H13.5111C13.426 9.06567 13.357 9.1347 13.357 9.21981C13.357 9.22009 13.357 9.2204 13.357 9.22068V10.7932C13.357 10.8783 13.426 10.9474 13.5111 10.9474Z",fill:"#0091E2"})),Jn=t=>f.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.7587 4.31292e-07L8 9.08129e-07C8.55229 9.08129e-07 9 0.447716 9 1C9 1.55229 8.55229 2 8 2H5.8C4.94342 2 4.36113 2.00078 3.91104 2.03755C3.47262 2.07337 3.24842 2.1383 3.09202 2.21799C2.7157 2.40973 2.40973 2.7157 2.21799 3.09202C2.1383 3.24842 2.07337 3.47262 2.03755 3.91104C2.00078 4.36113 2 4.94342 2 5.8V14.2C2 15.0566 2.00078 15.6389 2.03755 16.089C2.07337 16.5274 2.1383 16.7516 2.21799 16.908C2.40973 17.2843 2.7157 17.5903 3.09202 17.782C3.24842 17.8617 3.47262 17.9266 3.91104 17.9624C4.36113 17.9992 4.94342 18 5.8 18H14.2C15.0566 18 15.6389 17.9992 16.089 17.9624C16.5274 17.9266 16.7516 17.8617 16.908 17.782C17.2843 17.5903 17.5903 17.2843 17.782 16.908C17.8617 16.7516 17.9266 16.5274 17.9624 16.089C17.9992 15.6389 18 15.0566 18 14.2V12C18 11.4477 18.4477 11 19 11C19.5523 11 20 11.4477 20 12V14.2413C20 15.0463 20 15.7106 19.9558 16.2518C19.9099 16.8139 19.8113 17.3306 19.564 17.816C19.1805 18.5686 18.5686 19.1805 17.816 19.564C17.3306 19.8113 16.8139 19.9099 16.2518 19.9558C15.7106 20 15.0463 20 14.2413 20H5.75868C4.95372 20 4.28936 20 3.74817 19.9558C3.18608 19.9099 2.66937 19.8113 2.18404 19.564C1.43139 19.1805 0.819468 18.5686 0.435975 17.816C0.188684 17.3306 0.0901197 16.8139 0.0441945 16.2518C-2.28137e-05 15.7106 -1.23241e-05 15.0463 4.31292e-07 14.2413V5.7587C-1.23241e-05 4.95373 -2.28137e-05 4.28937 0.0441945 3.74817C0.0901197 3.18608 0.188684 2.66937 0.435975 2.18404C0.819468 1.43139 1.43139 0.819468 2.18404 0.435975C2.66937 0.188684 3.18608 0.0901197 3.74817 0.0441945C4.28937 -2.28137e-05 4.95373 -1.23241e-05 5.7587 4.31292e-07ZM12 1.00001C12 0.447726 12.4477 1.04449e-05 13 1.04449e-05H19C19.5523 1.04449e-05 20 0.447725 20 1.00001L20 7.00001C20 7.55229 19.5523 8.00001 19 8.00001C18.4477 8.00001 18 7.5523 18 7.00001L18 3.41422L10.7071 10.7071C10.3166 11.0976 9.68342 11.0976 9.29289 10.7071C8.90237 10.3166 8.90237 9.68342 9.29289 9.29289L16.5858 2.00001H13C12.4477 2.00001 12 1.5523 12 1.00001Z"}));function Fs({data:t}){const[s,r]=f.useState(!0);return e.jsxs(Ke,{open:s,onOpenChange:r,children:[e.jsx(Qe,{intent:"primary",className:"flex items-center gap-[10px]",children:e.jsxs(We,{className:"flex w-full items-center gap-[10px]",children:[e.jsx(Ae,{className:` ${s?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Docker Image"]})}),e.jsxs(Ge,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[e.jsx(q,{label:"Docker Image",value:e.jsxs("div",{className:"flex justify-between",children:[e.jsxs(xe,{className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[e.jsx(Gn,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),or(t.image)]}),e.jsxs("div",{className:"align-center mr-1 flex",children:[e.jsx("a",{className:"cursor-pointer",rel:"noopener noreferrer",target:"_blank",href:`https://${t.image}`,children:e.jsx(Jn,{className:"mr-1 mt-0.5 h-5 w-5 fill-theme-text-tertiary"})}),e.jsx(ve,{copyText:t.image,isVisible:!0,copyTitle:"Copy url"})]})]})}),e.jsx(q,{label:"Contains Code",value:e.jsx(xe,{color:t.contains_code?"green":"grey",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:t.contains_code?"Available":"None"})})]}),t.dockerfile&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Dockerfile"}),e.jsx(Se,{fullWidth:!0,wrap:!0,code:t.dockerfile})]}),t.requirements&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Requirements"}),e.jsx(Se,{fullWidth:!0,wrap:!0,code:t.requirements})]})]})]})}function Yn({buildId:t}){return["pipeline-builds",t]}async function Xn({buildId:t},s){const r=ge(je.runs.detail(t)),n=await fetch(r,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",...s}});if(!n.ok)throw new be({message:`Error while fetching pipeline build ${t}`,status:n.status,statusText:n.statusText});return n.json()}function $s(t,s){return Ee({queryKey:Yn(t),queryFn:()=>Xn(t),...s})}function ea({stepId:t}){var x,g,p,j,v,S,O,_,M,$,V,P;const{data:s,isPending:r,isError:n,error:i}=Be({stepId:t}),{runId:a}=le(),{data:o}=oe({runId:a},{throwOnError:!0,enabled:!!a}),{data:d}=$s({buildId:(g=(x=o==null?void 0:o.body)==null?void 0:x.build)==null?void 0:g.id},{enabled:!!((j=(p=o==null?void 0:o.body)==null?void 0:p.build)!=null&&j.id)}),h=s==null?void 0:s.name,y=(()=>{var c;const l=(c=d==null?void 0:d.metadata)==null?void 0:c.images;if(!l)return null;if(h){for(const m in l)if(m.startsWith(`${h}.`))return m;if(l[h])return h}return l.orchestrator?"orchestrator":null})(),w=y&&((S=(v=d==null?void 0:d.metadata)==null?void 0:v.images)==null?void 0:S[y]);return n?e.jsx(Ie,{err:i}):r?e.jsxs("div",{className:"space-y-5",children:[e.jsx(E,{className:"h-[200]"}),e.jsx(E,{className:"h-[200px]"}),e.jsx(E,{className:"h-[200px]"})]}):e.jsxs("div",{className:"space-y-5",children:[e.jsx(ye,{isInitialOpen:!0,data:(_=(O=s.metadata)==null?void 0:O.config)==null?void 0:_.parameters,title:"Parameters"}),w?e.jsx(Fs,{data:w}):null,e.jsx(ta,{id:s.id}),e.jsx(ye,{isInitialOpen:!0,title:"Resources",data:(($=(M=s.metadata)==null?void 0:M.config.settings)==null?void 0:$.resources)||{}}),e.jsx(ye,{isInitialOpen:!0,title:"Substitutions",data:(V=s.metadata)==null?void 0:V.config.substitutions}),e.jsx(ye,{isInitialOpen:!0,title:"Extra",data:(P=s.metadata)==null?void 0:P.config.extra})]})}function ta({id:t}){return e.jsxs($e,{initialOpen:!0,title:"Code",children:[e.jsx("h2",{className:"mb-2 text-text-md text-theme-text-secondary",children:"Get config programmatically"}),e.jsx(Se,{fullWidth:!0,highlightCode:!0,wrap:!0,code:js(t)})]})}function zt(t,s){return["initializing","running"].includes(t)&&s==="failed"}const sa=t=>f.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0083 2C6.47396 2 2 6.58331 2 12.2535C2 16.786 4.86662 20.6226 8.84338 21.9805C9.34058 22.0826 9.5227 21.7599 9.5227 21.4885C9.5227 21.2508 9.50631 20.436 9.50631 19.587C6.72225 20.1983 6.14249 18.3647 6.14249 18.3647C5.69508 17.1764 5.03215 16.871 5.03215 16.871C4.12092 16.2429 5.09852 16.2429 5.09852 16.2429C6.1093 16.3108 6.63969 17.2954 6.63969 17.2954C7.53432 18.857 8.97592 18.4158 9.55588 18.1441C9.63865 17.482 9.90394 17.0237 10.1856 16.7691C7.96514 16.5314 5.62891 15.6487 5.62891 11.7102C5.62891 10.5898 6.02634 9.67309 6.65608 8.96018C6.55672 8.7056 6.20866 7.65289 6.75564 6.24394C6.75564 6.24394 7.60069 5.97228 9.5061 7.29644C10.3219 7.07199 11.1632 6.95782 12.0083 6.95685C12.8533 6.95685 13.7148 7.07581 14.5102 7.29644C16.4159 5.97228 17.2609 6.24394 17.2609 6.24394C17.8079 7.65289 17.4596 8.7056 17.3603 8.96018C18.0066 9.67309 18.3876 10.5898 18.3876 11.7102C18.3876 15.6487 16.0514 16.5143 13.8143 16.7691C14.179 17.0916 14.4936 17.7026 14.4936 18.6703C14.4936 20.0453 14.4773 21.1489 14.4773 21.4883C14.4773 21.7599 14.6596 22.0826 15.1566 21.9808C19.1333 20.6224 22 16.786 22 12.2535C22.0163 6.58331 17.526 2 12.0083 2Z",fill:"#0D061D"})),ra=t=>f.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},f.createElement("path",{d:"M11.9993 21.4496L15.6838 10.0985H8.32019L11.9993 21.4496Z",fill:"#E24329"}),f.createElement("path",{d:"M3.1594 10.0985L2.03738 13.5471C1.93585 13.8603 2.0455 14.2059 2.31349 14.4011L11.9993 21.4496L3.1594 10.0985Z",fill:"#FCA326"}),f.createElement("path",{d:"M3.15942 10.0985H8.32019L6.09914 3.26231C5.98547 2.91256 5.49006 2.91256 5.3723 3.26231L3.15942 10.0985Z",fill:"#E24329"}),f.createElement("path",{d:"M20.8446 10.0985L21.9626 13.5471C22.0641 13.8603 21.9545 14.2059 21.6865 14.4011L11.9993 21.4496L20.8446 10.0985Z",fill:"#FCA326"}),f.createElement("path",{d:"M20.8446 10.0985H15.6838L17.9008 3.26231C18.0145 2.91256 18.5099 2.91256 18.6276 3.26231L20.8446 10.0985Z",fill:"#E24329"}),f.createElement("path",{d:"M11.9993 21.4496L15.6838 10.0985H20.8446L11.9993 21.4496Z",fill:"#FC6D26"}),f.createElement("path",{d:"M11.9993 21.4496L3.15942 10.0985H8.32019L11.9993 21.4496Z",fill:"#FC6D26"}));function na({repositoryId:t}){return["code_repositories",t]}async function aa({repositoryId:t}){const s=ge(je.code_repositories.detail(t)),r=await fetch(s,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(r.status===404&&st(),!r.ok)throw new be({message:`Error while fetching code repository ${t}`,status:r.status,statusText:r.statusText});return r.json()}function ia(t,s){return Ee({queryKey:na(t),queryFn:()=>aa(t),...s})}function Vs({repositoryId:t,commit:s}){var d;const{data:r,isPending:n,isError:i}=ia({repositoryId:t},{enabled:!!t});if(!t||!s)return e.jsx("p",{children:"Not available"});if(n)return e.jsx(E,{className:"h-6"});if(i)return null;const a=(d=r.metadata)==null?void 0:d.config,o=()=>{var w,x,g,p;let h=null,u=r==null?void 0:r.name,y;return((x=(w=r==null?void 0:r.body)==null?void 0:w.source)==null?void 0:x.attribute)==="GitHubCodeRepository"?(h=sa,u=`${a==null?void 0:a.owner}/${a==null?void 0:a.repository}`,y=`https://www.${(typeof(a==null?void 0:a.host)=="string"?a.host:"github.com").replace(/\/$/,"")}/${u}`+(s?`/commit/${s}`:"")):((p=(g=r==null?void 0:r.body)==null?void 0:g.source)==null?void 0:p.attribute)==="GitLabCodeRepository"&&(h=ra,u=`${a==null?void 0:a.group}/${a==null?void 0:a.project}`,y=`https://www.${(typeof(a==null?void 0:a.host)=="string"?a.host:"gitlab.com").replace(/\/$/,"")}/${u}`+(s?`/commit/${s}`:"")),e.jsxs("a",{target:"_blank",rel:"noopener noreferrer",className:`flex items-center ${y?"":"pointer-events-none"}`,onClick:j=>j.stopPropagation(),href:y,children:[h&&e.jsx(h,{className:"mr-1 h-5 w-5 fill-theme-text-brand"}),u]})};return e.jsxs("div",{className:"group/copybutton mr-1",children:[e.jsxs(xe,{color:"grey",className:"inline-flex items-center font-semibold text-neutral-900",rounded:!1,emphasis:"subtle",children:[o(),e.jsx("div",{className:"ml-1 rounded-sm bg-neutral-200 px-1 py-0.25",children:lr(s,10)})]}),e.jsx(ve,{copyText:s})]})}function Hs(){return e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(fe,{children:e.jsxs(xe,{color:"yellow",className:"flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[e.jsx(Ar,{className:"h-4 w-4 shrink-0 fill-current"}),"Login Required"]})}),e.jsx(pe,{children:e.jsxs("p",{children:["You must be logged in for this link to work.",e.jsx("br",{}),"Please ensure you're signed in before accessing."]})})]})})}function oa({stepStatus:t,isStatusUnknown:s}){function r(){return e.jsxs(xe,{color:pt(s?"unknown":t),rounded:!0,emphasis:"subtle",className:"flex w-fit items-center gap-1 capitalize",children:[e.jsx(Fe,{className:"fill-current",status:s?"unknown":t}),s?"Unknown - Last reported: "+t:t]})}return s?e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(fe,{className:"z-10 cursor-default",children:e.jsx(r,{})}),e.jsxs(pe,{className:"text-center",children:["Last reported as ",e.jsx("b",{children:t})," but current status unknown due to pipeline failure.",e.jsx("br",{}),"Communication may be lost."]})]})}):e.jsx(r,{})}function la({stepId:t,runId:s}){var w,x,g,p,j,v,S,O,_,M,$,V,P,l,c,m,C,b,T,Q,se,re,I,U,k,X,R,D,N;const{data:r,isError:n,isPending:i,error:a}=Be({stepId:t}),{data:o}=oe({runId:s}),d=(g=(x=(w=o==null?void 0:o.body)==null?void 0:w.code_reference)==null?void 0:x.body)==null?void 0:g.code_repository;if(n)return e.jsx(Ie,{err:a});if(i)return e.jsx(E,{className:"h-[300px] w-full"});const h=(j=(p=r.metadata)==null?void 0:p.config)==null?void 0:j.enable_artifact_metadata,u=(S=(v=r.metadata)==null?void 0:v.config)==null?void 0:S.enable_artifact_visualization,y=zt(((O=r.body)==null?void 0:O.status)??"running",((_=o==null?void 0:o.body)==null?void 0:_.status)??"running");return e.jsx($e,{initialOpen:!0,title:"Details",children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[e.jsx(q,{label:"Id",value:e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[r.id,e.jsx(ve,{copyText:r.id})]})}),e.jsx(q,{label:"Status",value:e.jsx("div",{className:"flex items-center gap-0.5 overflow-x-auto",children:e.jsx(oa,{stepStatus:((M=r.body)==null?void 0:M.status)??"running",isStatusUnknown:y})})}),o?e.jsxs(e.Fragment,{children:[e.jsx(q,{label:"Pipeline",value:e.jsx(qe,{to:Oe.projects.pipelines.namespace(encodeURIComponent((V=($=o.body)==null?void 0:$.pipeline)==null?void 0:V.name)),children:e.jsxs(xe,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[e.jsx(Pt,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(l=(P=o.body)==null?void 0:P.pipeline)==null?void 0:l.name]})})}),e.jsx(ke,{children:e.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[e.jsx("span",{className:"truncate",children:"Repository/Commit"}),e.jsx(he,{children:e.jsxs(me,{children:[e.jsxs(fe,{className:"cursor-default",children:[e.jsx(He,{className:"h-3 w-3 fill-theme-text-secondary"}),e.jsx("span",{className:"sr-only",children:"Info"})]}),e.jsx(pe,{className:"w-full max-w-md whitespace-normal",children:"Git hash of code repository. Only set if pipeline was run in a clean git repository connected to your ZenML server."})]})})]})}),e.jsx(_e,{className:"h-auto",children:(c=o.body)!=null&&c.code_reference?e.jsx(Vs,{repositoryId:d==null?void 0:d.id,commit:(m=o.body.code_reference.body)==null?void 0:m.commit}):"Not available"}),e.jsx(ke,{className:(C=o.metadata)!=null&&C.code_path?"col-span-3":"",children:e.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[e.jsx("span",{children:"Code Path"}),e.jsx(he,{children:e.jsxs(me,{children:[e.jsxs(fe,{className:"cursor-default",children:[e.jsx(He,{className:"h-3 w-3 fill-theme-text-secondary"}),e.jsx("span",{className:"sr-only",children:"Info"})]}),e.jsx(pe,{className:"w-full max-w-md whitespace-normal",children:"Path to where code was uploaded in the artifact store. Only set on a pipeline with a non-local orchestrator and if Repository/Commit is not set"})]})})]})}),e.jsx(_e,{className:(b=o.metadata)!=null&&b.code_path?"col-span-3 h-auto":"",children:(T=o.metadata)!=null&&T.code_path?e.jsx(Se,{code:o.metadata.code_path}):"Not available"})]}):e.jsx(E,{className:"h-6 w-full"}),e.jsx(q,{label:"Cache key",value:e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[(Q=r.metadata)==null?void 0:Q.cache_key,e.jsx(ve,{copyText:(se=r.metadata)==null?void 0:se.cache_key})]})}),e.jsx(q,{label:"Author",value:e.jsx("div",{className:"inline-flex items-center gap-1",children:e.jsx(bt,{username:(I=(re=r.resources)==null?void 0:re.user)==null?void 0:I.name})})}),e.jsx(q,{label:"Start Time",value:(U=r.body)!=null&&U.start_time?e.jsx(et,{dateString:(k=r.body)==null?void 0:k.start_time}):"Not available"}),e.jsx(q,{label:"End Time",value:(X=r.body)!=null&&X.end_time?e.jsx(et,{dateString:(R=r.body)==null?void 0:R.end_time}):"Not available"}),e.jsx(q,{label:"Duration",value:Es(((D=r.body)==null?void 0:D.start_time)||"",((N=r.body)==null?void 0:N.end_time)||"")}),e.jsx(q,{label:"Artifact metadata",value:e.jsx(ct,{size:"sm",color:h?"green":"grey",children:h?"Enable":"Disabled"})}),e.jsx(q,{label:"Artifact visualization",value:e.jsx(ct,{size:"sm",color:u?"green":"grey",children:u?"Enable":"Disabled"})})]})})}function ca({className:t}){var h,u,y,w,x;const{runId:s}=le(),{data:r,isPending:n,isError:i}=oe({runId:s},{throwOnError:!0}),a=(u=(h=r==null?void 0:r.metadata)==null?void 0:h.run_metadata)==null?void 0:u.orchestrator_url,o=(w=(y=r==null?void 0:r.metadata)==null?void 0:y.run_metadata)==null?void 0:w.orchestrator_logs_url,d=(x=r==null?void 0:r.metadata)==null?void 0:x.orchestrator_run_id;return i?e.jsx("p",{children:"Failed to fetch Orchestrator Card"}):n?e.jsx(E,{className:"h-[150px] w-full"}):e.jsx($e,{className:t,initialOpen:!0,title:"Orchestrator",children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[e.jsx(q,{label:"Orchestrator URL",value:a&&ze(a)?e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[e.jsx("a",{className:"truncate underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:a,children:a}),e.jsx(ve,{copyText:a})]}):"Not available"}),e.jsx(q,{label:"Orchestrator Logs",value:o&&ze(o)?e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Hs,{}),e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[e.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:o,children:o}),e.jsx(ve,{copyText:o})]})]}):"Not available"}),e.jsx(q,{label:"Orchestrator Run ID",value:d?e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[d,e.jsx(ve,{copyText:d})]}):"Not available"})]})})}function it({title:t,subtitle:s}){return e.jsx(Ce,{icon:e.jsx(at,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mb-2 text-display-xs font-semibold",children:t}),e.jsx("p",{className:"text-lg text-theme-text-secondary",children:s})]})})}const da=t=>f.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},f.createElement("path",{d:"M4 14H10M10 14V20M10 14L3 21M20 10H14M14 10V4M14 10L21 3",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ua=t=>{switch(t){case"INFO":return"bg-blue-500";case"ERROR":return"bg-error-500";case"WARN":return"bg-warning-500";case"DEBUG":return"bg-neutral-400";case"CRITICAL":return"bg-error-700";default:return"bg-neutral-400"}},ha=t=>new Date(t).toISOString().replace("T"," ").slice(0,19);function ma({entry:t,searchTerm:s,isCurrentMatch:r,textWrapEnabled:n,highlightedMessage:i}){const{timestamp:a,level:o,message:d,originalEntry:h}=t,u=a?ha(a):"",y=ua(o),w=x=>{if(!s)return x;const g=new RegExp(`(${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi");return x.split(g).map((j,v)=>j.toLowerCase()===s.toLowerCase()?e.jsx("span",{className:`${r?"bg-warning-200 text-warning-900":"bg-warning-100 text-warning-800"} inline-block rounded-sm px-1`,children:j},v):j)};return e.jsxs("div",{className:"group/copybutton flex w-full items-start space-x-3 border-b border-theme-border-minimal px-4 py-1 font-mono text-text-sm transition-colors hover:bg-theme-surface-secondary",children:[e.jsxs("div",{className:"flex max-h-6 w-8 flex-shrink-0 items-center",children:[e.jsx("div",{className:`h-4 w-[2px] rounded-sm ${y} mr-2`}),e.jsx("span",{className:"text-xs font-medium text-theme-text-tertiary",children:o})]}),e.jsx("div",{className:"w-[178px] flex-shrink-0 text-theme-text-secondary",children:u}),e.jsx("div",{className:`flex-1 text-theme-text-primary ${n?"min-w-0 whitespace-pre-wrap break-words":"whitespace-nowrap"}`,children:i||w(d)}),e.jsx("div",{className:"flex flex-shrink-0 items-center",children:e.jsx(ve,{copyText:h,copyTitle:"Copy log line"})})]})}function Wt({onSearchChange:t,onCopyAll:s,onDownload:r,searchQuery:n="",currentMatchIndex:i=0,totalMatches:a=0,onPreviousMatch:o,onNextMatch:d}){return e.jsx(e.Fragment,{children:e.jsx("div",{className:"bg-theme-surface-secondary",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Hr,{searchParams:{},inMemoryHandler:t,placeholder:"Search logs..."}),n&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-sm text-theme-text-secondary",children:a>0?`${i+1} of ${a}`:"No matches"}),e.jsx(B,{size:"sm",emphasis:"minimal",onClick:o,disabled:a===0,title:"Previous match",children:e.jsx(mt,{className:"h-4 w-4 shrink-0 rotate-90 fill-theme-text-tertiary"})}),e.jsx(B,{size:"sm",emphasis:"minimal",onClick:d,disabled:a===0,title:"Next match",children:e.jsx(mt,{className:"h-4 w-4 shrink-0 -rotate-90 fill-theme-text-tertiary"})})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(B,{size:"md",emphasis:"subtle",intent:"secondary",onClick:s,title:"Copy all displayed logs",className:"bg-theme-surface-primary",children:[e.jsx(_t,{className:"mr-1 h-4 w-4 fill-theme-text-secondary"}),"Copy All"]}),e.jsxs(B,{size:"md",emphasis:"subtle",intent:"secondary",onClick:r,title:"Download logs as file",className:"bg-theme-surface-primary",children:[e.jsx(ys,{className:"mr-1 h-5 w-5 fill-theme-text-tertiary"}),"Download"]})]})]})})})}function fa(t){const[s,r]=f.useState(""),[n,i]=f.useState(!1),[a,o]=f.useState(0),{filteredLogs:d,matches:h}=f.useMemo(()=>{if(!s.trim())return{filteredLogs:t,matches:[]};const p=n?s:s.toLowerCase(),j=[],v=[];return t.forEach(S=>{const O=n?S.message:S.message.toLowerCase(),_=[];let M=0;for(;M<O.length;){const $=O.indexOf(p,M);if($===-1)break;_.push($),M=$+1}_.length>0&&(j.push(S),_.forEach(($,V)=>{v.push({logIndex:j.length-1,matchIndex:V,startIndex:$,endIndex:$+p.length})}))}),{filteredLogs:j,matches:v}},[t,s,n]);f.useMemo(()=>{o(0)},[]);const u=h.length,y=f.useCallback(()=>{u>0&&o(p=>(p+1)%u)},[u]),w=f.useCallback(()=>{u>0&&o(p=>(p-1+u)%u)},[u]),x=f.useCallback(()=>{r(""),o(0)},[]),g=f.useCallback((p,j)=>{if(!s.trim())return p;const v=[];let S=0;return h.filter(_=>_.logIndex===j).forEach((_,M)=>{_.startIndex>S&&v.push(p.slice(S,_.startIndex));const V=h.findIndex(P=>P.logIndex===_.logIndex&&P.matchIndex===_.matchIndex)===a?"bg-warning-200 text-warning-900":"bg-warning-100 text-warning-800";v.push(ss.createElement("span",{key:`match-${j}-${M}`,className:`${V} inline-block rounded-sm px-1`},p.slice(_.startIndex,_.endIndex))),S=_.endIndex}),S<p.length&&v.push(p.slice(S)),v.length>0?v:p},[s,h,a]);return{searchQuery:s,setSearchQuery:r,caseSensitive:n,setCaseSensitive:i,filteredLogs:d,matches:h,currentMatchIndex:a,totalMatches:u,goToNextMatch:y,goToPreviousMatch:w,clearSearch:x,highlightText:g}}const pa=100;function qs({logs:t,itemsPerPage:s=pa}){const[r,n]=f.useState(1),[i,a]=f.useState(!0),{searchQuery:o,setSearchQuery:d,filteredLogs:h,currentMatchIndex:u,totalMatches:y,goToNextMatch:w,goToPreviousMatch:x,highlightText:g}=fa(t),p=h;ss.useEffect(()=>{n(1)},[o]);const j=Math.ceil(p.length/s),v=(r-1)*s,S=v+s,O=p.slice(v,S),_=()=>{n(l=>Math.max(l-1,1))},M=()=>{n(l=>Math.min(l+1,j))},$=()=>{const l=Gt(p);navigator.clipboard.writeText(l).catch(c=>{console.error("Failed to copy logs:",c)})},V=()=>{const l=Gt(p),c=new Blob([l],{type:"text/plain"}),m=URL.createObjectURL(c),C=document.createElement("a");C.href=m,C.download=`logs-${new Date().toISOString().split("T")[0]}.txt`,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(m)},P=()=>{a(l=>!l)};return t?e.jsxs("div",{className:"flex h-full flex-col space-y-5",children:[e.jsx(Wt,{onSearchChange:d,onCopyAll:$,onDownload:V,searchQuery:o,currentMatchIndex:u,totalMatches:y,onPreviousMatch:x,onNextMatch:w}),e.jsxs("div",{className:"flex-1 overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"sticky top-0 z-10 bg-theme-surface-tertiary",children:e.jsxs("div",{className:"flex w-full min-w-[600px] space-x-3 bg-theme-surface-tertiary px-4 py-1 font-medium text-theme-text-secondary",children:[e.jsx("div",{className:"flex w-8 flex-shrink-0 items-center",children:e.jsx("span",{className:"text-text-sm font-semibold",children:"Type"})}),e.jsx("div",{className:"w-[178px] flex-shrink-0",children:e.jsx("span",{className:"text-text-sm font-semibold",children:"Time"})}),e.jsx("div",{className:"flex min-w-0 flex-1 items-center justify-between",children:e.jsx("span",{className:"text-text-sm font-semibold",children:"Event"})}),e.jsxs("div",{className:"flex flex-shrink-0 items-center",children:[" ",e.jsx(B,{onClick:P,size:"sm",emphasis:"subtle",intent:"secondary",className:"ml-2 h-5 w-5 rounded-sm bg-theme-surface-primary p-0.25",title:i?"Collapse text":"Expand text",children:i?e.jsx(da,{className:"h-4 w-4 shrink-0 text-theme-text-tertiary hover:text-theme-text-secondary"}):e.jsx(Zr,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary hover:fill-theme-text-secondary"})})]})]})}),e.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-auto",children:e.jsx("div",{className:i?"min-w-full":"flex w-full min-w-full",children:e.jsx("div",{className:"flex-1 bg-theme-surface-primary",children:O.map((l,c)=>{const m=v+c;return e.jsx(ma,{entry:l,searchTerm:o,textWrapEnabled:i,highlightedMessage:g(l.message,m)},l.id)})})})}),j>1&&e.jsx("div",{className:"border-t border-theme-border-minimal bg-theme-surface-secondary px-4 py-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"text-sm text-theme-text-secondary",children:["Showing ",v+1," to"," ",Math.min(v+s,p.length)," of"," ",p.length," logs"]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("button",{onClick:_,disabled:r===1,className:"text-sm rounded-md border border-theme-border-moderate bg-theme-surface-primary px-3 py-1 font-medium text-theme-text-secondary hover:bg-theme-surface-tertiary disabled:cursor-not-allowed disabled:opacity-50",children:"Previous"}),e.jsxs("span",{className:"text-sm text-theme-text-secondary",children:["Page ",r," of ",j]}),e.jsx("button",{onClick:M,disabled:r===j,className:"text-sm rounded-md border border-theme-border-moderate bg-theme-surface-primary px-3 py-1 font-medium text-theme-text-secondary hover:bg-theme-surface-tertiary disabled:cursor-not-allowed disabled:opacity-50",children:"Next"})]})]})})]})]}):e.jsxs("div",{className:"flex h-full flex-col space-y-5",children:[e.jsx(Wt,{onSearchChange:d,onCopyAll:$,onDownload:V,searchQuery:o,currentMatchIndex:u,totalMatches:y,onPreviousMatch:x,onNextMatch:w}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx(it,{title:"No logs found",subtitle:"No logs available to display."})})]})}function Gt(t){return t.map(s=>s.originalEntry).join(`
16
+ `)}function Bs(){return e.jsx("section",{className:"flex h-[calc(100vh_-_270px)] items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center justify-center",children:[e.jsxs("div",{className:"relative mb-2 flex items-center justify-center",children:[e.jsx(wt,{className:"h-[120px] w-[120px]"}),e.jsx(xa,{})]}),e.jsx("h2",{className:"my-3 text-center text-display-xs font-semibold",children:"Loading the Logs"}),e.jsxs("p",{className:"text-center text-text-lg text-theme-text-secondary",children:["It can take up to a few minutes. ",e.jsx("br",{})," Please wait while we fetch logs from the artifact store."]})]})})}function xa(){return e.jsx("div",{className:"absolute rounded-rounded bg-primary-25 p-3",children:e.jsx(at,{className:"h-7 w-7 fill-primary-400"})})}function ga({stepId:t}){return["logs",t]}async function ja({stepId:t}){const s=ge(je.steps.logs(t)),r=await Pe(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){const n=await r.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>`Error while fetching logs for step ${t}`);throw new be({status:r.status,statusText:r.statusText,message:n})}return r.json()}function ya(t,s){return Ee({queryKey:ga(t),queryFn:()=>ja(t),...s})}function Us(t){if(!t||typeof t!="string")return[];const s=t.split(`
17
+ `).filter(n=>n.trim()!==""),r=[];return s.forEach((n,i)=>{const a=Ca(n,i);a&&a.message.trim()!==""&&r.push(a)}),r}function Ca(t,s){if(!t.trim())return null;const r=[/^\[(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})\s+UTC\]\s*(.*)$/,/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?)\s*\[(\w+)\]\s*(.*)$/,/^(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}(?:\.\d{3})?)\s+(\w+)\s+(.*)$/,/^(\w+)\s+(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?)\s+(.*)$/,/^\[(\w+)\]\s+(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z?)\s+(.*)$/,/^(\w+):\s*(.*)$/,/^\[(\w+)\]\s*(.*)$/];let n=null,i="INFO",a=t;for(const d of r){const h=t.match(d);if(h){if(d.source.includes("UTC")){n=h[1].replace(" ","T")+"Z",i="INFO",a=h[2]||"";break}else d.source.includes("\\d{4}-\\d{2}-\\d{2}")?h[1]&&Jt(h[1])?(n=h[1],i=yt(h[2]),a=h[3]||""):h[2]&&Jt(h[2])&&(i=yt(h[1]),n=h[2],a=h[3]||""):(i=yt(h[1]),a=h[2]||h[1]||"");break}}const o=a.trim();return o?{originalEntry:t,id:`log-${s}-${Date.now()}`,timestamp:n,level:i,message:o}:null}function Jt(t){return/^\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}\s+UTC$/.test(t)||/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(t)||/^\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}/.test(t)?!isNaN(Date.parse(t)):!1}function yt(t){if(!t)return"INFO";const s=t.toUpperCase().trim();switch(s){case"ERROR":case"ERR":return"ERROR";case"WARN":case"WARNING":return"WARN";case"INFO":case"INFORMATION":return"INFO";case"DEBUG":case"DBG":return"DEBUG";case"CRITICAL":case"CRIT":return"CRITICAL";default:return/^[A-Z]{3,8}$/.test(s),"INFO"}}function ba({stepId:t}){const{data:s,isPending:r,isError:n,error:i}=ya({stepId:t}),a=f.useMemo(()=>s?Us(s):[],[s]);return n?e.jsx(Ie,{err:i}):r?e.jsx(Bs,{}):a.length===0?e.jsx(it,{title:"This step has no logs",subtitle:"It looks like there are no logs associated with this step"}):e.jsx("div",{className:"space-y-5",children:e.jsx(qs,{logs:a})})}function wa({stepId:t}){var a;const{data:s,isPending:r,isError:n,error:i}=Be({stepId:t});return r?e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsx(E,{className:"h-9 w-full"}),e.jsx(E,{className:"h-9 w-full"})]}):n?e.jsx(Ie,{err:i}):!((a=s.metadata)!=null&&a.run_metadata)||Object.keys(s.metadata.run_metadata).length===0?e.jsx(Ce,{icon:e.jsx(tt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available for this step."})]})}):e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsx(Dt,{metadata:s.metadata.run_metadata}),e.jsx(At,{metadata:s.metadata.run_metadata})]})}function va({component:t,objectConfig:s}){var i,a;const r=`${(i=t.body)==null?void 0:i.type}.${(a=t.body)==null?void 0:a.flavor_name}`,n=(s==null?void 0:s[r])??void 0;return!n||Object.keys(n).length===0?e.jsx(qe,{to:Oe.components.detail(t.id),children:e.jsx(St,{className:"flex w-full items-center justify-between gap-3 px-5 py-3 text-left",children:e.jsx(Yt,{component:t})})}):e.jsx(ye,{intent:"primary",contentClassName:"pl-[60px]",className:"w-full",isInitialOpen:!1,title:e.jsx("div",{className:"flex w-full items-center justify-between gap-3 text-left",children:e.jsx(Yt,{component:t})}),data:n,children:e.jsx(B,{asChild:!0,intent:"secondary",emphasis:"subtle",className:"mx-auto flex w-fit justify-center text-text-sm text-theme-text-secondary",children:e.jsx(qe,{to:Oe.components.detail(t.id),children:"See Component Details"})})})}function Yt({component:t}){var s,r,n,i;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{width:32,height:32,alt:`${(s=t.body)==null?void 0:s.flavor_name} logo`,src:ns(((r=t.body)==null?void 0:r.logo_url)||"")}),e.jsxs("div",{children:[e.jsx("p",{className:"text-text-lg",children:t.name}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:t.id.split("-")[0]})]})]}),e.jsx(Kr,{type:((n=t.body)==null?void 0:n.type)||"orchestrator",children:cr(((i=t.body)==null?void 0:i.type)||"")})]})}function Na({stack:t}){return e.jsxs(St,{className:"flex items-center justify-between gap-3 px-5 py-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(dr,{type:"square",size:"md",children:e.jsx(ur,{size:"md",children:t.name[0]})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-text-lg",children:t.name}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:t.id.split("-")[0]})]})]}),e.jsxs(xe,{rounded:!1,className:"inline-flex shrink items-center gap-0.5 truncate",color:"turquoise",emphasis:"subtle",children:[e.jsx(Et,{className:"h-4 w-4 shrink-0 fill-current"}),e.jsx("div",{className:"truncate",children:"Stack"})]})]})}function Zs({stack:t,objectConfig:s}){var r;return e.jsxs("div",{className:"space-y-5",children:[e.jsx(ka,{}),e.jsx(Na,{stack:t}),e.jsx("ul",{className:"space-y-5",children:Object.values(((r=t.metadata)==null?void 0:r.components)||{}).map(n=>e.jsx("li",{className:"w-full",children:e.jsx(va,{component:n[0],objectConfig:s})},n[0].id))})]})}function ka(){return e.jsx(xt,{className:"truncate",children:e.jsx("p",{className:"truncate",children:"Current run-specific stack settings. Click on a component for full default settings."})})}function _a({stepId:t}){var o,d,h,u;const{runId:s}=le(),r=oe({runId:s}),n=Be({stepId:t});if(r.isPending||n.isPending)return e.jsx(E,{className:"h-[250px] w-full"});if(r.isError||n.isError)return e.jsx("p",{children:"Something went wrong fetching the run"});const i=(h=(d=(o=r.data)==null?void 0:o.body)==null?void 0:d.stack)==null?void 0:h.id,a=((u=n.data.metadata)==null?void 0:u.config.settings)||{};return i?e.jsx(Sa,{objectConfig:a,stackId:i}):e.jsx(Ce,{icon:e.jsx(Ve,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"No Stack"}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There is no stack associated with this run."})]})})}function Sa({stackId:t,objectConfig:s}){const{data:r,isError:n,isPending:i}=Ls({stackId:t});return i?e.jsx(E,{className:"h-[250px] w-full"}):n?e.jsx("p",{children:"Failed to fetch Stack"}):e.jsx(Zs,{stack:r,objectConfig:s})}function Ea({stepId:t}){var d,h;const{runId:s}=le(),r=Be({stepId:t}),n=oe({runId:s});if(r.isPending||n.isPending)return e.jsx(E,{className:"h-6 w-[200px]"});if(r.error||n.error)return null;const i=(d=r.data.body)==null?void 0:d.status,a=(h=n.data.body)==null?void 0:h.status,o=zt(i??"running",a??"running");return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:`rounded-sm p-0.5 ${o?"bg-blue-50":ws(i)}`,children:e.jsx(Fe,{status:o?"unknown":i,className:"h-4 w-4 shrink-0"})}),e.jsx("h2",{className:"text-display-xs font-semibold",children:r.data.name}),e.jsx(ct,{size:"sm",className:"capitalize",color:Rr(o?"unknown":i),children:o?`Unknown - Last reported: ${i}`:i||"None"})]})}function La({stepId:t}){const{runId:s}=le();return e.jsxs("div",{children:[e.jsx(bs,{}),e.jsx("div",{className:"flex justify-between border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:e.jsx(Ea,{stepId:t})}),e.jsx("div",{className:"p-5",children:e.jsxs(Nt,{defaultValue:"overview",children:[e.jsxs(kt,{children:[e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"overview",children:[e.jsx(He,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Overview"})]}),e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"stack",children:[e.jsx(Et,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Stack"})]}),e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"code",children:[e.jsx(Ur,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Code"})]}),e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"logs",children:[e.jsx(at,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Logs"})]}),e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"config",children:[e.jsx(zs,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Configuration"})]}),e.jsxs(de,{className:"flex items-center gap-2 text-text-md",value:"metadata",children:[e.jsx(Rt,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Metadata"})]})]}),e.jsxs(ue,{className:"m-0 mt-5 space-y-5 border-0 bg-transparent p-0",value:"overview",children:[e.jsx(la,{runId:s,stepId:t}),e.jsx(ca,{})]}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"stack",children:e.jsx(_a,{stepId:t})}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"code",children:e.jsx(Wn,{stepId:t})}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"logs",children:e.jsx(ba,{stepId:t})}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"config",children:e.jsx(ea,{stepId:t})}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:e.jsx(wa,{stepId:t})})]})})]})}function Ta({children:t,stepId:s,onOpenChange:r}){return e.jsxs(fs,{onOpenChange:r,children:[e.jsx(ps,{asChild:!0,children:t}),e.jsx(xs,{className:"w-[1000px] overflow-y-auto",children:e.jsx(La,{stepId:s})})]})}function Ra({data:t,selected:s}){const r=ks(),{addSelectedNodes:n}=r.getState(),i=t.status==="failed";function a(d){d||setTimeout(()=>{n([])},100)}const o=zt(t.status,t.runStatus);return e.jsx(gt,{children:e.jsx(Ta,{onOpenChange:a,stepId:t.step_id,children:e.jsxs("button",{"data-failed":i,"data-selected":!!s,className:hr("group max-h-[80px] max-w-[300px] overflow-hidden rounded-md border bg-theme-surface-primary transition-all duration-200 hover:shadow-md data-[selected=true]:shadow-md",{"border-theme-border-moderate hover:border-neutral-400 data-[selected=true]:border-theme-border-bold":!i,"border-error-200":i}),children:[e.jsxs("div",{className:"flex flex-1 items-center gap-1 py-1 pl-1 pr-2",children:[e.jsx("div",{className:`rounded-sm p-0.5 ${ws(o?"unknown":t.status)}`,children:e.jsx(Fe,{status:o?"unknown":t.status,className:"h-4 w-4 shrink-0"})}),e.jsx("p",{className:"truncate font-semibold",children:t.step_name}),e.jsxs(Ds,{className:"h-4 w-4 shrink-0 rounded-sm hover:bg-theme-surface-secondary active:bg-neutral-300",code:js(t.step_id),type:"step",children:[e.jsx(_t,{className:"h-3 w-3 fill-theme-text-tertiary"}),e.jsx("div",{className:"sr-only",children:"Copy code to load step"})]})]}),e.jsx("div",{"data-failed":i,className:"flex flex-1 justify-end border-t border-theme-border-moderate bg-theme-surface-tertiary px-2 py-0.5 text-text-xs data-[failed=true]:border-error-200 data-[failed=true]:bg-error-50 data-[failed=true]:text-theme-text-error",children:i?"Execution failed":t.duration===void 0||t.duration===null?"N/A":Br(t.duration)})]})})})}function ot(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ct={exports:{}},Xt;function Oa(){return Xt||(Xt=1,function(t,s){(function(r){t.exports=r()})(function(){return function(){function r(n,i,a){function o(u,y){if(!i[u]){if(!n[u]){var w=typeof ot=="function"&&ot;if(!y&&w)return w(u,!0);if(d)return d(u,!0);var x=new Error("Cannot find module '"+u+"'");throw x.code="MODULE_NOT_FOUND",x}var g=i[u]={exports:{}};n[u][0].call(g.exports,function(p){var j=n[u][1][p];return o(j||p)},g,g.exports,r,n,i,a)}return i[u].exports}for(var d=typeof ot=="function"&&ot,h=0;h<a.length;h++)o(a[h]);return o}return r}()({1:[function(r,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;function a(x){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},a(x)}function o(x,g){if(!(x instanceof g))throw new TypeError("Cannot call a class as a function")}function d(x,g){for(var p=0;p<g.length;p++){var j=g[p];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(x,u(j.key),j)}}function h(x,g,p){return g&&d(x.prototype,g),Object.defineProperty(x,"prototype",{writable:!1}),x}function u(x){var g=y(x,"string");return a(g)=="symbol"?g:g+""}function y(x,g){if(a(x)!="object"||!x)return x;var p=x[Symbol.toPrimitive];if(p!==void 0){var j=p.call(x,g);if(a(j)!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(x)}i.default=function(){function x(){var g=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},j=p.defaultLayoutOptions,v=j===void 0?{}:j,S=p.algorithms,O=S===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:S,_=p.workerFactory,M=p.workerUrl;if(o(this,x),this.defaultLayoutOptions=v,this.initialized=!1,typeof M>"u"&&typeof _>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var $=_;typeof M<"u"&&typeof _>"u"&&($=function(l){return new Worker(l)});var V=$(M);if(typeof V.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new w(V),this.worker.postMessage({cmd:"register",algorithms:O}).then(function(P){return g.initialized=!0}).catch(console.err)}return h(x,[{key:"layout",value:function(p){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=j.layoutOptions,S=v===void 0?this.defaultLayoutOptions:v,O=j.logging,_=O===void 0?!1:O,M=j.measureExecutionTime,$=M===void 0?!1:M;return p?this.worker.postMessage({cmd:"layout",graph:p,layoutOptions:S,options:{logging:_,measureExecutionTime:$}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker&&this.worker.terminate()}}])}();var w=function(){function x(g){var p=this;if(o(this,x),g===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=g,this.worker.onmessage=function(j){setTimeout(function(){p.receive(p,j)},0)}}return h(x,[{key:"postMessage",value:function(p){var j=this.id||0;this.id=j+1,p.id=j;var v=this;return new Promise(function(S,O){v.resolvers[j]=function(_,M){_?(v.convertGwtStyleError(_),O(_)):S(M)},v.worker.postMessage(p)})}},{key:"receive",value:function(p,j){var v=j.data,S=p.resolvers[v.id];S&&(delete p.resolvers[v.id],v.error?S(v.error):S(null,v.data))}},{key:"terminate",value:function(){this.worker&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(p){if(p){var j=p.__java$exception;j&&(j.cause&&j.cause.backingJsObject&&(p.cause=j.cause.backingJsObject,this.convertGwtStyleError(p.cause)),delete p.__java$exception)}}}])}()},{}],2:[function(r,n,i){var a=r("./elk-api.js").default;Object.defineProperty(n.exports,"__esModule",{value:!0}),n.exports=a,a.default=a},{"./elk-api.js":1}]},{},[2])(2)})}(Ct)),Ct.exports}var Pa=Oa();const Ia=Js(Pa),Aa="/assets/elk-worker.min-BdOC9sib.js",Da=300,Ma=50,za=70,Fa=new Ia({workerUrl:Aa});async function $a(t,s){if(!t||!s||t.length<1)return{nodes:[],edges:[]};const r=t.map(d=>({id:d.id,width:Da,height:d.type==="step"||d.type==="previewStep"?za:Ma})).sort((d,h)=>d.id.localeCompare(h.id)),n=s.map(d=>({id:qa(d),sources:[d.source],targets:[d.target]})).sort((d,h)=>d.id.localeCompare(h.id)),i={id:"root",layoutOptions:{"elk.algorithm":"layered","elk.direction":"DOWN","elk.layered.alignSiblings":"true","elk.spacing.nodeNode":"25","elk.layered.spacing.nodeNodeBetweenLayers":"60","elk.layered.spacing.edgeNodeBetweenLayers":"40","elk.layered.spacing.edgeEdgeBetweenLayers":"20","elk.layered.nodePlacement.strategy":"BRANDES_KOEPF","elk.layered.crossingMinimization.strategy":"LAYER_SWEEP","elk.layered.edgeRouting":"POLYLINE","elk.layered.nodePlacement.bk.fixedAlignment":"BALANCED","elk.layered.mergeEdges":"true","elk.layered.considerModelOrder.strategy":"PREFER_INPUT","elk.edgeRouting":"ORTHOGONAL","elk.separateConnectedComponents":"false"},children:r,edges:n},a=await Fa.layout(i);return{nodes:t.map(d=>{var u;const h=(u=a.children)==null?void 0:u.find(y=>y.id===d.id);return{...d,position:{x:(h==null?void 0:h.x)??0,y:(h==null?void 0:h.y)??0}}}),edges:Va(Ha(a.edges))}}function Va(t){const s=new Map;for(const r of t){const n=r.id;s.has(n)||s.set(n,{...r,style:{strokeWidth:2}})}return Array.from(s.values())}function Ha(t){return t.map(s=>{const r={id:s.id,source:s.sources[0],target:s.targets[0],type:"smoothstep"};if(s.sections&&s.sections.length>0){const n=s.sections[0],i=[{x:n.startPoint.x,y:n.startPoint.y}];n.bendPoints&&n.bendPoints.forEach(a=>{i.push({x:a.x,y:a.y})}),i.push({x:n.endPoint.x,y:n.endPoint.y}),r.type="elk",r.data={points:i}}return r})}function qa(t){return`${t.source}-${t.target}`}function Ba(t,s){const r=Ua(t,s),n=Za(t,s),i=Ka(t,s);return[...r,...n,...i]}function Ua(t,s){return t.filter(Ks).filter(n=>!Ft(n)).map(n=>{const i=n.metadata;return{id:n.node_id,type:"step",data:{...i,step_id:n.id,step_name:n.name,runStatus:s}}})}function Za(t,s){return t.filter(Qa).filter(n=>!Ft(n)).map(n=>{const i=n.metadata;return{id:n.node_id,type:"artifact",data:{...i,artifact_id:n.id,artifact_name:n.name,runStatus:s}}})}function Ka(t,s){return t.filter(n=>Ft(n)).map(n=>{const i=Ks(n);return{id:n.node_id,type:i?"previewStep":"previewArtifact",data:{node_name:n.name,runStatus:s}}})}function Ks(t){return t.type==="step"}function Qa(t){return t.type==="artifact"}function Ft(t){return!t.id}function Wa({runId:t}){return["runs",t,"dag"]}async function Ga({runId:t}){const s=ge(je.runs.dag(t)),r=await Pe(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&st(),!r.ok)throw new be({message:`Error while fetching pipeline run ${t}`,status:r.status,statusText:r.statusText});return r.json()}function Ja(t,s){return Ee({queryKey:Wa(t),queryFn:()=>Ga(t),...s})}function Ya(){const[t,s]=f.useState(!0),[r,n]=f.useState(null),{runId:i}=le(),a=f.useRef(null),o=f.useMemo(()=>["runs",i],[i]),d=nt(),h=Ja({runId:i},{refetchInterval:O=>{var _,M;return((_=O.state.data)==null?void 0:_.status)==="running"||((M=O.state.data)==null?void 0:M.status)==="initializing"?3e3:!1}});f.useEffect(()=>{if(h.data){const O=h.data.status;a.current!==null&&a.current!==O&&d.invalidateQueries({queryKey:o}),a.current=O}},[h.data,d,i,o]);const[u,y,w]=Mr([]),[x,g,p]=zr([]),j=f.useMemo(()=>h.data?Ba(h.data.nodes,h.data.status):[],[h.data]),v=f.useMemo(()=>h.data?h.data.edges:[],[h.data]),S=f.useCallback(async()=>{if(!(j.length<1))try{const{nodes:O,edges:_}=await $a(j,v),M=O.reduce(($,V)=>V.position.y<$.position.y||V.position.y===$.position.y&&V.position.x<$.position.x?V:$);n(M),y(O),g(_)}catch(O){console.error("Layout calculation failed:",O)}finally{s(!1)}},[j,v,y,g]);return f.useLayoutEffect(()=>{S()},[S]),{dagQuery:h,nodes:u,edges:x,onNodesChange:w,onEdgesChange:p,initialRender:t,topMostNode:r,shouldFitView:Xa(u)}}function Xa(t){const s=t.length;if(s===0||s<=10)return!0;if(s>40)return!1;if(t.length>0){const r=t.map(o=>o.position.x),n=Math.min(...r);return Math.max(...r)-n<=2e3}return!0}const ei={elk:Zn},ti={step:Ra,artifact:Fn,previewStep:Qn,previewArtifact:Kn};function si(){const{dagQuery:t,nodes:s,edges:r,onNodesChange:n,onEdgesChange:i,initialRender:a,topMostNode:o,shouldFitView:d}=Ya(),h=f.useMemo(()=>()=>t.refetch(),[t]);return t.isError?e.jsx(Ce,{icon:e.jsx(Ve,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsx("p",{className:"text-center",children:"There was an error loading the DAG visualization."})}):t.isPending||a?e.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[e.jsx(wt,{}),e.jsx("div",{className:"mt-4 flex flex-col items-center",children:e.jsx("p",{className:"mb-5 text-display-xs",children:"Loading DAG Visualization"})})]}):e.jsx(Fr,{minZoom:-2,connectOnClick:!1,nodesDraggable:!1,nodesConnectable:!1,edgeTypes:ei,nodeTypes:ti,nodes:s,edges:r,edgesFocusable:!1,onlyRenderVisibleElements:!0,multiSelectionKeyCode:null,onNodesChange:n,onEdgesChange:i,fitView:!0,fitViewOptions:d?void 0:o?{nodes:[o],maxZoom:1.2}:void 0,children:e.jsx(Bn,{refetch:h})})}async function ri({runId:t,queries:s={include_steps:!1}}){const r=rt(s).toString(),n=ge(je.runs.refresh(t))+(r?`?${r}`:""),i=await Pe(n,{method:"POST"});if(!i.ok){const a=await i.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>`Error while refreshing run ${t}`);throw new be({status:i.status,statusText:i.statusText,message:a})}return i.json()}function ni(t){return Ot({...t,mutationFn:async s=>ri({runId:s.runId,queries:s.queries})})}function ai(t){const{toast:s}=ft(),r=nt();return ni({onSuccess:async()=>{await r.invalidateQueries({queryKey:["runs"]}),s({rounded:!0,status:"success",emphasis:"subtle",description:"The run has been refreshed successfully"}),t(!1)},onError:i=>{s({rounded:!0,status:"error",emphasis:"subtle",description:i.message}),t(!1)}})}function ii({runId:t}){const[s,r]=f.useState(!1),{isPending:n,mutate:i}=ai(r);return e.jsxs(dt,{open:s,onOpenChange:r,children:[e.jsx(Lt,{asChild:!0,children:e.jsxs(B,{intent:"primary",emphasis:"subtle",size:"sm",className:"flex aspect-square items-center justify-center rounded-l-sharp border-l-0 p-0",children:[e.jsx(Ae,{width:20,height:20,className:"size-4 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Open run refresh menu"})]})}),e.jsxs(Tt,{align:"end",className:"max-w-[100px] lg:max-w-[320px]",children:[e.jsx(ut,{className:"hover:cursor-pointer",icon:e.jsx(Bt,{width:24,height:24,className:"size-5 shrink-0"}),onSelect:a=>{a.preventDefault(),i({runId:t,queries:{include_steps:!1}})},disabled:n,children:e.jsxs("div",{className:"space-y-0.25",children:[e.jsx("p",{children:"Deep Refresh"}),e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:"Queries the orchestrator directly. Takes longer but ensures most up-to-date data"})]})}),e.jsx(ut,{className:"hover:cursor-pointer",icon:e.jsx(Bt,{width:24,height:24,className:"size-5 shrink-0"}),onSelect:a=>{a.preventDefault(),i({runId:t,queries:{include_steps:!0}})},disabled:n,children:e.jsxs("div",{className:"space-y-0.25",children:[e.jsx("p",{children:"Step Refresh"}),e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:"Include steps in the refresh. Takes longer but ensures most up-to-date data"})]})})]})]})}function oi({runId:t}){const{refetch:s}=oe({runId:t});return e.jsxs("div",{className:"flex",children:[e.jsxs(B,{className:"rounded-r-sharp",intent:"primary",emphasis:"subtle",size:"sm",onClick:()=>s(),children:[e.jsx(Ss,{className:"size-4 shrink-0 fill-theme-text-brand"}),"Refresh"]}),e.jsx(ii,{runId:t})]})}function li(t){const{setBreadcrumbs:s}=mr();f.useEffect(()=>{var r;t&&((r=t.body)!=null&&r.pipeline?s([fr,{label:t.body.pipeline.name||"",href:Oe.projects.pipelines.namespace(encodeURIComponent(t.body.pipeline.name))},{label:t.name||"",href:"#"}]):s([pr,{label:t.name||"",href:Oe.projects.runs.detail(t.id)}]))},[s,t])}function ci({open:t,setOpen:s}){const{toast:r}=ft(),n=It(),i=nt(),{runId:a}=le(),{mutate:o}=Yr({onSuccess:async()=>{i.invalidateQueries({queryKey:["runs"]}),r({status:"success",emphasis:"subtle",icon:e.jsx(gr,{className:"h-5 w-5 shrink-0 fill-success-700"}),description:"Run deleted successfully",rounded:!0}),s(!1),n(Oe.projects.pipelines.overview)},onError:h=>{r({status:"error",emphasis:"subtle",icon:e.jsx(Ve,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:h.message,rounded:!0})}});async function d(){o({runId:a})}return e.jsx(xr,{open:t,onOpenChange:s,children:e.jsx(Gr,{title:"Delete Run",handleDelete:()=>d(),children:e.jsxs(Jr,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."}),e.jsx("p",{children:"Deleting a run here does not guarantee that this run will get deleted in the underlying orchestrator."})]})})})}function di(){const[t,s]=f.useState(!1),[r,n]=f.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(ci,{setOpen:s,open:t}),e.jsx(dt,{modal:r,open:r,onOpenChange:n,children:e.jsxs(dt,{children:[e.jsx(Lt,{asChild:!0,children:e.jsxs(B,{intent:"secondary",className:"flex aspect-square items-center justify-center p-0",emphasis:"minimal",size:"sm",children:[e.jsx(jr,{className:"h-5 w-5 shrink-0 fill-theme-text-secondary"}),e.jsx("p",{className:"sr-only",children:"Run Actions"})]})}),e.jsx(Tt,{className:"z-10",align:"end",sideOffset:1,children:e.jsxs(ut,{onClick:()=>s(!0),className:"space-x-2",children:[e.jsx(Wr,{className:"h-3 w-3 fill-neutral-400"}),e.jsx("p",{children:"Delete"})]})})]})})]})}const Qs=t=>f.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},f.createElement("path",{d:"M21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12ZM15 9.59961C15 9.30333 14.9988 9.14095 14.9893 9.02441C14.9889 9.01992 14.9877 9.01575 14.9873 9.01172C14.9836 9.01138 14.9797 9.01108 14.9756 9.01074C14.8591 9.00122 14.6967 9 14.4004 9H9.59961C9.30333 9 9.14095 9.00122 9.02441 9.01074C9.01996 9.01111 9.01572 9.01135 9.01172 9.01172C9.01135 9.01572 9.01111 9.01996 9.01074 9.02441C9.00122 9.14095 9 9.30333 9 9.59961V14.4004C9 14.6967 9.00122 14.8591 9.01074 14.9756C9.01108 14.9797 9.01138 14.9836 9.01172 14.9873C9.01575 14.9877 9.01992 14.9889 9.02441 14.9893C9.14095 14.9988 9.30333 15 9.59961 15H14.4004C14.6967 15 14.8591 14.9988 14.9756 14.9893C14.9797 14.9889 14.9836 14.9876 14.9873 14.9873C14.9876 14.9836 14.9889 14.9797 14.9893 14.9756C14.9988 14.8591 15 14.6967 15 14.4004V9.59961ZM23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12ZM17 14.4004C17 14.6638 17.0011 14.9219 16.9834 15.1387C16.9694 15.3099 16.9406 15.5042 16.8691 15.7051L16.7822 15.9082C16.6145 16.2374 16.3592 16.5129 16.0459 16.7051L15.9082 16.7822C15.6369 16.9204 15.3672 16.9647 15.1387 16.9834C14.9219 17.0011 14.6638 17 14.4004 17H9.59961C9.33622 17 9.07814 17.0011 8.86133 16.9834C8.69005 16.9694 8.49576 16.9406 8.29492 16.8691L8.0918 16.7822C7.76256 16.6145 7.48707 16.3592 7.29492 16.0459L7.21777 15.9082C7.07956 15.6369 7.0353 15.3672 7.0166 15.1387C6.99889 14.9219 7 14.6638 7 14.4004V9.59961C7 9.33622 6.99889 9.07814 7.0166 8.86133C7.0353 8.63282 7.07956 8.36306 7.21777 8.0918L7.29492 7.9541C7.48707 7.64085 7.76256 7.38555 8.0918 7.21777L8.29492 7.13086C8.49576 7.05937 8.69005 7.03062 8.86133 7.0166C9.07814 6.99889 9.33622 7 9.59961 7H14.4004C14.6638 7 14.9219 6.99889 15.1387 7.0166C15.3672 7.0353 15.6369 7.07956 15.9082 7.21777L16.0459 7.29492C16.3144 7.45963 16.5404 7.68558 16.7051 7.9541L16.7822 8.0918L16.8691 8.29492C16.9406 8.49576 16.9694 8.69005 16.9834 8.86133C17.0011 9.07814 17 9.33622 17 9.59961V14.4004Z"}));async function ui({runId:t,params:s}){const r=rt(s).toString(),n=await Pe(ge(je.runs.stop(t))+(r?`?${r}`:""),{method:"POST"});if(!n.ok){const i=await n.json().then(a=>a.detail).catch(()=>`Failed to delete run ${t}`);throw new be({status:n.status,statusText:n.statusText,message:i})}return n.json()}function hi(t){return Ot({mutationFn:ui,...t})}function Ws(){const{toast:t}=ft(),s=nt();return{stopRunQuery:hi({onSuccess:()=>{s.invalidateQueries({queryKey:["runs"]})},onError:n=>{t({rounded:!0,status:"error",emphasis:"subtle",description:e.jsx("div",{children:n.message})})}})}}function mi({runId:t,isActive:s}){const{stopRunQuery:{mutate:r,isPending:n}}=Ws();function i(){r({runId:t,params:{graceful:!1}})}return e.jsxs(B,{"data-tour-id":"stop-run-button",disabled:!s||n,intent:"secondary",size:"sm",className:"group whitespace-nowrap rounded-r-sharp",onClick:i,emphasis:"subtle",children:[e.jsx(Qs,{className:"h-4 w-4 shrink-0 fill-theme-text-primary transition-all duration-200 group-disabled:fill-neutral-300"}),"Stop"]})}function fi({runId:t,isActive:s}){const[r,n]=f.useState(!1),{stopRunQuery:{mutate:i,isPending:a}}=Ws();function o(){i({runId:t,params:{graceful:!0}})}return e.jsxs(dt,{open:r,onOpenChange:n,children:[e.jsx(Lt,{asChild:!0,children:e.jsxs(B,{disabled:!s||a,intent:"secondary",emphasis:"subtle",size:"sm",className:"group flex aspect-square items-center justify-center rounded-l-sharp border-l-0 p-0",children:[e.jsx(Ae,{width:20,height:20,className:"size-4 shrink-0 fill-theme-text-primary transition-all duration-200 group-disabled:fill-neutral-300"}),e.jsx("span",{className:"sr-only",children:"Open run refresh menu"})]})}),e.jsx(Tt,{className:"max-w-[100px] lg:max-w-[320px]",children:e.jsx(ut,{className:"hover:cursor-pointer",icon:e.jsx(Qs,{width:24,height:24,className:"size-5 shrink-0"}),onSelect:d=>{d.preventDefault(),o()},children:e.jsxs("div",{className:"space-y-0.25",children:[e.jsx("p",{children:"Stop gracefully"}),e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:"Stops the run gracefully. This will allow the current step to finish."})]})})})]})}function pi({runId:t}){var i,a;const s=oe({runId:t});if(s.isError)return null;if(s.isPending)return e.jsx(E,{className:"h-6 w-[100px]"});const r=(a=(i=s.data)==null?void 0:i.body)==null?void 0:a.status,n=r==="running"||r==="initializing";return e.jsxs("div",{className:"flex",children:[e.jsx(mi,{runId:t,isActive:n}),e.jsx(fi,{runId:t,isActive:n})]})}function xi(){var n,i;const{runId:t}=le(),{data:s,isSuccess:r}=oe({runId:t},{throwOnError:!0});return li(s),e.jsxs(yr,{className:"flex items-center justify-between",children:[e.jsx("div",{className:"flex items-center gap-1 truncate",children:r?e.jsxs(e.Fragment,{children:[e.jsx(Qr,{className:`h-5 w-5 shrink-0 ${Or((n=s==null?void 0:s.body)==null?void 0:n.status)}`}),e.jsx("h1",{className:"min-w-0 truncate text-display-xs font-semibold",children:s==null?void 0:s.name}),e.jsx(Fe,{className:"h-5 w-5 shrink-0",status:(i=s==null?void 0:s.body)==null?void 0:i.status})]}):e.jsxs(e.Fragment,{children:[e.jsx(E,{className:"h-5 w-5"}),e.jsx(E,{className:"h-6 w-[250px]"}),e.jsx(E,{className:"h-5 w-5"})]})}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(oi,{runId:t}),e.jsx(pi,{runId:t}),e.jsx(di,{})]})]})}const gi=t=>f.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 2C21.5523 2 22 2.44772 22 3V21C22 21.5523 21.5523 22 21 22C20.4477 22 20 21.5523 20 21V3C20 2.44772 20.4477 2 21 2ZM9.29289 4.29289C9.68342 3.90237 10.3166 3.90237 10.7071 4.29289L17.7071 11.2929C17.8946 11.4804 18 11.7348 18 12C18 12.2652 17.8946 12.5196 17.7071 12.7071L10.7071 19.7071C10.3166 20.0976 9.68342 20.0976 9.29289 19.7071C8.90237 19.3166 8.90237 18.6834 9.29289 18.2929L14.5858 13H3C2.44772 13 2 12.5523 2 12C2 11.4477 2.44772 11 3 11H14.5858L9.29289 5.70711C8.90237 5.31658 8.90237 4.68342 9.29289 4.29289Z"}));function ji({runId:t}){const[s,r]=f.useState(!0),n=vr(t);return e.jsxs(Ke,{open:s,onOpenChange:r,children:[e.jsx(Qe,{className:"flex items-center gap-[10px]",children:e.jsxs(We,{className:"flex w-full items-center gap-[10px]",children:[e.jsx(Ae,{className:` ${s?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Code"]})}),e.jsxs(Ge,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[e.jsx("p",{className:"mb-2 text-theme-text-secondary",children:"Get config programmatically"}),e.jsx(Se,{fullWidth:!0,highlightCode:!0,wrap:!0,code:n})]})]})}const es="python_packages";function yi({run:t}){var d,h;const[s,r]=f.useState(!0),n=(d=t.metadata)==null?void 0:d.orchestrator_environment,i=(h=t.metadata)==null?void 0:h.client_environment,a=ts(n??{}),o=ts(i??{});return e.jsxs(Ke,{open:s,onOpenChange:r,children:[e.jsx(Qe,{intent:"primary",className:"flex items-center gap-[10px]",children:e.jsxs(We,{className:"flex w-full items-center gap-[10px]",children:[e.jsx(Ae,{className:` ${s?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Environment"]})}),e.jsxs(Ge,{className:"space-y-3 border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[e.jsx(ye,{isInitialOpen:!0,intent:"secondary",title:e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(fe,{asChild:!0,children:e.jsx("span",{children:"Client Environment"})}),e.jsxs(pe,{className:"max-w-[200px] whitespace-normal xl:max-w-[300px]",children:["Environment where you start your pipeline run by calling the pipeline function."," ",e.jsx("a",{rel:"noopener noreferrer",className:"link",href:"https://docs.zenml.io/user-guides/best-practices/configure-python-environments#client-environment-or-the-runner-environment",target:"_blank",children:"Learn more about client environments"})]})]})}),data:o}),e.jsx(ye,{isInitialOpen:!0,intent:"secondary",title:e.jsx(he,{children:e.jsxs(me,{children:[e.jsx(fe,{asChild:!0,children:e.jsx("span",{children:"Execution Environment"})}),e.jsxs(pe,{className:"max-w-[200px] whitespace-normal xl:max-w-[300px]",children:["Environment where your ZenML steps get executed."," ",e.jsx("a",{rel:"noopener noreferrer",className:"link",href:"https://docs.zenml.io/user-guides/best-practices/configure-python-environments#execution-environments",target:"_blank",children:"Learn more about exectuion environments"})]})]})}),data:a})]})]})}function ts(t){const s=t[es];return typeof s=="string"?{...t,[es]:s.split(`
18
+ `).map(r=>r.trim())}:t}async function Ci({deploymentId:t},s){const r=ge(je.pipeline_deployments.detail(t)),n=await fetch(r,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",...s}});if(!n.ok){const i=await n.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>`Error while fetching pipeline deployment ${t}`);throw new be({status:n.status,statusText:n.statusText,message:i})}return n.json()}const Gs={all:["pipeline_deployments"],detail:t=>Lr({queryKey:[...Gs.all,t],queryFn:async()=>Ci({deploymentId:t})})};function bi({deploymentId:t}){var o,d;const[s,r]=f.useState(!0),{isLoading:n,isError:i,data:a}=Ee({...Gs.detail(t),enabled:!!t});return t?n?e.jsx(E,{className:"h-[150px] w-full"}):i?null:e.jsx(ye,{isInitialOpen:!0,title:"Pipeline Parameters",data:(d=(o=a==null?void 0:a.metadata)==null?void 0:o.pipeline_spec)==null?void 0:d.parameters}):e.jsxs(Ke,{open:s,onOpenChange:r,children:[e.jsxs(Qe,{intent:"primary",className:"flex items-center gap-[10px]",children:[e.jsx(We,{children:e.jsx(Ae,{className:` ${s?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`})}),"Pipeline Parameters"]}),e.jsx(Ge,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:e.jsx(Pr,{})})]})}function wi(){var a,o,d,h,u,y,w,x,g,p,j,v,S,O;const{runId:t}=le(),{data:s,isError:r,isPending:n}=oe({runId:t,queryParams:{include_python_packages:!0}},{throwOnError:!0}),{data:i}=$s({buildId:(o=(a=s==null?void 0:s.body)==null?void 0:a.build)==null?void 0:o.id},{enabled:!!((h=(d=s==null?void 0:s.body)==null?void 0:d.build)!=null&&h.id)});return r?null:n?e.jsxs("div",{className:"space-y-5",children:[e.jsx(E,{className:"h-[56px] w-full"}),e.jsx(E,{className:"h-[56px] w-full"}),e.jsx(E,{className:"h-[56px] w-full"}),e.jsx(E,{className:"h-[56px] w-full"})]}):e.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[e.jsx(bi,{deploymentId:((u=s.body)==null?void 0:u.deployment_id)??void 0}),((w=(y=i==null?void 0:i.metadata)==null?void 0:y.images)==null?void 0:w.orchestrator)&&e.jsx(Fs,{data:(g=(x=i==null?void 0:i.metadata)==null?void 0:x.images)==null?void 0:g.orchestrator}),e.jsx(ji,{runId:t}),e.jsx(yi,{run:s}),e.jsx(ye,{isInitialOpen:!0,title:"Resources",data:((j=(p=s.metadata)==null?void 0:p.config.settings)==null?void 0:j.resources)||{}}),e.jsx(ye,{isInitialOpen:!0,title:"Retry",data:((v=s.metadata)==null?void 0:v.config.retry)??void 0}),e.jsx(ye,{isInitialOpen:!0,title:"Substitutions",data:(S=s.metadata)==null?void 0:S.config.substitutions}),e.jsx(ye,{isInitialOpen:!0,title:"Extra",data:(O=s.metadata)==null?void 0:O.config.extra})]})}function vi(){var n,i,a;const{runId:t}=le(),{data:s,isError:r}=oe({runId:t},{throwOnError:!0});return r?e.jsx("p",{children:"Failed to fetch pipeline run"}):s&&Object.entries(((n=s.metadata)==null?void 0:n.run_metadata)||{}).length<1?e.jsx(Ce,{icon:e.jsx(tt,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available."})]})}):e.jsxs("section",{className:"flex flex-col gap-5",children:[s?e.jsx(Dt,{metadata:(i=s.metadata)==null?void 0:i.run_metadata}):e.jsx(E,{className:"h-[200px] w-full"}),s?e.jsx(At,{metadata:(a=s.metadata)==null?void 0:a.run_metadata}):e.jsx(E,{className:"h-[200px] w-full"})]})}function Ni(){return e.jsx(xt,{className:"truncate",intent:"error",children:e.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[e.jsx("p",{className:"truncate",children:"Pipeline run failed. Check orchestrator logs for error details and troubleshooting steps."}),e.jsx(B,{intent:"danger",asChild:!0,children:e.jsx("a",{href:"#orchestrator-collapsible",children:"Review"})})]})})}function ki(){return e.jsx(xt,{className:"truncate",children:e.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[e.jsx("p",{children:"Pipeline run initializing. Check orchestrator URL and logs for real-time status updates."}),e.jsx(B,{asChild:!0,children:e.jsx("a",{href:"#orchestrator-collapsible",children:"Review"})})]})})}function _i(){var d,h,u;const{runId:t}=le(),{data:s,isError:r,isPending:n}=oe({runId:t}),i=(d=s==null?void 0:s.metadata)==null?void 0:d.run_metadata,a=i==null?void 0:i.orchestrator_url,o=i==null?void 0:i.orchestrator_logs_url;return r?null:n?e.jsx(E,{className:"h-[100px]"}):((h=s.body)==null?void 0:h.status)==="initializing"&&(o||a)?e.jsx(ki,{}):((u=s.body)==null?void 0:u.status)==="failed"&&o?e.jsx(Ni,{}):null}function Si(){var h,u,y,w,x,g,p,j,v,S,O,_,M,$,V,P,l,c,m,C,b,T,Q,se,re;const{runId:t}=le(),[s,r]=f.useState(!0),[n]=vs(),i=It(),{data:a,isError:o,isPending:d}=oe({runId:t},{throwOnError:!0});return f.useEffect(()=>{if(!n.get("tab")){const U=new URL(window.location.href);U.searchParams.set("tab","overview");const k=`${U.pathname}${U.search}`;i(k,{replace:!0})}},[n,i]),o?null:d?e.jsx(E,{className:"h-[200px] w-full"}):e.jsxs(Ke,{open:s,onOpenChange:r,children:[e.jsx(Qe,{className:"flex items-center gap-[10px]",children:e.jsxs(We,{className:"flex w-full items-center gap-[10px]",children:[e.jsx(Ae,{className:` ${s?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),e.jsx("span",{children:"Details"})]})}),e.jsx(Ge,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[e.jsx(ke,{children:"Id"}),e.jsx(_e,{children:e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[a.id,e.jsx(ve,{copyText:a.id})]})}),e.jsx(ke,{children:"Status"}),e.jsx(_e,{children:e.jsxs(xe,{className:"inline-flex items-center gap-0.5",emphasis:"subtle",color:pt((h=a.body)==null?void 0:h.status),children:[e.jsx(Fe,{className:"fill-current",status:(u=a.body)==null?void 0:u.status}),(y=a.body)==null?void 0:y.status]})}),e.jsx(ke,{children:"Pipeline"}),e.jsx(_e,{children:(w=a.body)!=null&&w.pipeline?e.jsx(qe,{to:Oe.projects.pipelines.namespace(encodeURIComponent((g=(x=a.body)==null?void 0:x.pipeline)==null?void 0:g.name)),children:e.jsxs(xe,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[e.jsx(Pt,{className:"h-4 w-4 fill-theme-text-brand"}),(j=(p=a.body)==null?void 0:p.pipeline)==null?void 0:j.name]})}):"Not available"}),e.jsx(ke,{children:e.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[e.jsx("span",{className:"truncate",children:"Repository/Commit"}),e.jsx(he,{children:e.jsxs(me,{children:[e.jsxs(fe,{className:"cursor-default",children:[e.jsx(He,{className:"h-3 w-3 fill-theme-text-secondary"}),e.jsx("span",{className:"sr-only",children:"Info"})]}),e.jsx(pe,{className:"w-full max-w-md whitespace-normal",children:"Git hash of code repository. Only set if pipeline was run in a clean git repository connected to your ZenML server."})]})})]})}),e.jsx(_e,{className:"h-auto",children:(v=a.body)!=null&&v.code_reference?e.jsx(Vs,{repositoryId:(O=(S=a.body)==null?void 0:S.code_reference.body)==null?void 0:O.code_repository.id,commit:(_=a.body.code_reference.body)==null?void 0:_.commit}):"Not available"}),e.jsx(ke,{className:(M=a.metadata)!=null&&M.code_path?"col-span-3":"",children:e.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[e.jsx("span",{children:"Code Path"}),e.jsx(he,{children:e.jsxs(me,{children:[e.jsxs(fe,{className:"cursor-default",children:[e.jsx(He,{className:"h-3 w-3 fill-theme-text-secondary"}),e.jsx("span",{className:"sr-only",children:"Info"})]}),e.jsx(pe,{className:"w-full max-w-md whitespace-normal",children:"Path to where code was uploaded in the artifact store. Only set on a pipeline with a non-local orchestrator and if Repository/Commit is not set"})]})})]})}),e.jsx(_e,{className:($=a.metadata)!=null&&$.code_path?"col-span-3 h-auto":"",children:(V=a.metadata)!=null&&V.code_path?e.jsx(Se,{code:a.metadata.code_path}):"Not available"}),e.jsx(ke,{children:"Author"}),e.jsx(_e,{children:e.jsx("div",{className:"inline-flex items-center gap-1",children:e.jsx(bt,{username:((l=(P=a.resources)==null?void 0:P.user)==null?void 0:l.name)||""})})}),e.jsx(ke,{children:"Start Time"}),e.jsx(_e,{children:(c=a.metadata)!=null&&c.start_time?e.jsx(et,{dateString:(m=a.metadata)==null?void 0:m.start_time}):"Not available"}),e.jsx(ke,{children:"End Time"}),e.jsx(_e,{children:(C=a.metadata)!=null&&C.end_time?e.jsx(et,{dateString:(b=a.metadata)==null?void 0:b.end_time}):"Not available"}),e.jsx(ke,{children:"Duration"}),e.jsx(_e,{children:(T=a.metadata)!=null&&T.start_time&&((Q=a.metadata)!=null&&Q.end_time)?Es((se=a.metadata)==null?void 0:se.start_time,(re=a.metadata)==null?void 0:re.end_time):"Not available"})]})})]})}function Ei(){var y,w;const{runId:t}=le(),[s,r]=f.useState(!0),{data:n,isError:i,isPending:a}=oe({runId:t}),o=(y=n==null?void 0:n.metadata)==null?void 0:y.run_metadata,d=o==null?void 0:o.orchestrator_url,h=(w=n==null?void 0:n.metadata)==null?void 0:w.orchestrator_run_id,u=o==null?void 0:o.orchestrator_logs_url;return i?null:a?e.jsx(E,{className:"h-[200px]"}):e.jsxs(Ke,{open:s,onOpenChange:r,children:[e.jsx(Qe,{className:"flex items-center gap-[10px]",children:e.jsxs(We,{className:"flex w-full",children:[e.jsx(Ae,{className:` ${s?"":"-rotate-90"} mr-2 h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),e.jsx("p",{id:"orchestrator-collapsible",children:"Orchestrator"})]})}),e.jsx(Ge,{className:"space-y-3 border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[e.jsx(q,{label:"Orchestrator URL",value:d&&ze(d)?e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[e.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:d,children:d}),e.jsx(ve,{copyText:d})]}):"Not available"}),e.jsx(q,{label:"Orchestrator Logs",value:u&&ze(u)?e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Hs,{}),e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[e.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:u,children:u}),e.jsx(ve,{copyText:u})]})]}):"Not available"}),e.jsx(q,{label:"Orchestrator Run ID",value:h?e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[h,e.jsx(ve,{copyText:h})]}):"Not available"})]})})]})}function Li(){return e.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[e.jsx(_i,{}),e.jsx(Si,{}),e.jsx(Ei,{})]})}const Ti=qt.object({tab:qt.enum(["overview","configuration","metadata","stack","logs"]).optional().default("overview").catch("overview")});function Ri(){const[t]=vs(),{tab:s}=Ti.parse({tab:t.get("tab")||void 0});return s}function Oi(){var n,i,a;const{runId:t}=le(),s=oe({runId:t},{throwOnError:!0});if(s.isPending)return e.jsx(E,{className:"h-[250px] w-full"});if(s.isError)return e.jsx("p",{children:"Something went wrong fetching the run"});const r=(a=(i=(n=s.data)==null?void 0:n.body)==null?void 0:i.stack)==null?void 0:a.id;return r?e.jsx(Pi,{run:s.data,stackId:r}):e.jsx(Ce,{icon:e.jsx(Ve,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"No Stack"}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There is no stack associated with this run."})]})})}function Pi({stackId:t,run:s}){var o;const{data:r,isError:n,isPending:i}=Ls({stackId:t});if(i)return e.jsx(E,{className:"h-[250px] w-full"});if(n)return e.jsx("p",{children:"Failed to fetch Stack"});const a=((o=s.metadata)==null?void 0:o.config.settings)||{};return e.jsx(Zs,{stack:r,objectConfig:a})}function Ii({runId:t,queries:s}){return["runs",t,"logs",s]}async function Ai({runId:t,queries:s}){const r=rt(s).toString(),n=ge(je.runs.logs(t))+(r?`?${r}`:""),i=await Pe(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(!i.ok){const a=await i.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>`Error while fetching logs for run ${t}`);throw new be({status:i.status,statusText:i.statusText,message:a})}return i.json()}function Di(t,s){return Ee({queryKey:Ii(t),queryFn:()=>Ai(t),...s})}function Mi({sources:t,selectedSource:s,setSelectedSource:r}){const[n,i]=f.useState(!1);return e.jsxs(as,{modal:!0,open:n,onOpenChange:i,children:[e.jsx(is,{asChild:!0,children:e.jsxs(B,{intent:"secondary",emphasis:"subtle",className:"flex items-center gap-0.5 bg-theme-surface-primary capitalize",size:"md",children:[s,e.jsx(Ae,{width:24,height:24,className:"fill-text-primary shrink-0"})]})}),e.jsx(os,{className:"px-0",align:"start",children:e.jsxs(ls,{defaultValue:s,className:"rounded-sharp",children:[e.jsx(cs,{className:"m-0",placeholder:"Search sources...",children:e.jsx(vt,{className:"w-full",inputSize:"sm"})}),e.jsxs(ds,{children:[e.jsx(us,{children:"No source found."}),e.jsx(hs,{className:"max-h-[300px] overflow-y-auto",children:t.map(a=>{const o=a.split("/").pop();return e.jsxs(ms,{keywords:[o??""],className:"group capitalize data-[selected=true]:rounded-sharp",value:a,onSelect:()=>{r(a),i(!1)},children:[a===s?e.jsx(Ns,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary group-data-[selected=true]:fill-theme-text-brand"}):e.jsx(at,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary group-data-[selected=true]:fill-theme-text-brand"}),o]},a)})})]})]})})]})}function zi(){var o;const{runId:t}=le(),{data:s,isError:r,isPending:n}=oe({runId:t});if(n)return e.jsx(E,{className:"h-[200px] w-full"});if(r)return e.jsx("p",{children:"Error loading logs"});const i=(o=s.resources)==null?void 0:o.log_collection,a=(i==null?void 0:i.map(d=>{var h;return(h=d.body)==null?void 0:h.source}).filter(d=>d!=null&&d!=null))??[];return a.length<1?e.jsx(it,{title:"This pipeline run has no logs",subtitle:"It looks like there are no logs associated with this pipeline run"}):e.jsx(Fi,{sources:a,runId:t})}function Fi({sources:t,runId:s}){const[r,n]=f.useState(t[0]);return e.jsxs("section",{className:"space-y-5",children:[t.length>1&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-theme-text-secondary",children:"Logs source:"}),e.jsx(Mi,{sources:t,selectedSource:r,setSelectedSource:n})]}),e.jsx($i,{selectedSource:r,runId:s})]})}function $i({selectedSource:t,runId:s}){const r=Di({runId:s,queries:{source:t}}),n=f.useMemo(()=>r.data?Us(r.data):[],[r.data]);return r.isPending?e.jsx(Bs,{}):r.isError?e.jsx(Ie,{err:r.error}):r.data.length===0?e.jsx(it,{title:"This pipeline run has no logs",subtitle:"It looks like there are no logs associated with this pipeline run"}):e.jsx("div",{className:"h-full w-full",children:e.jsx(qs,{logs:n})})}function Vi({error:t}){if(!(t instanceof Error))throw t;return e.jsx(it,{title:"Error displaying logs",subtitle:t.message})}function Hi({setIsPanelOpen:t}){return e.jsxs("div",{className:"flex items-center gap-4 border-b border-theme-border-moderate bg-theme-surface-primary px-5 py-4",children:[e.jsx(B,{className:"flex h-6 w-6 items-center justify-center bg-transparent p-0.5",intent:"secondary",onClick:()=>t(!1),children:e.jsx(gi,{className:"h-5 w-5 fill-theme-text-secondary"})}),e.jsx("span",{className:"text-text-xl",children:"Run Insights"})]})}function qi(){const t=Ri(),s=It();function r(n){const i=new URLSearchParams;i.set("tab",n),s(`?${i.toString()}`)}return e.jsx("div",{className:"flex flex-col gap-5 p-5",children:e.jsxs(Nt,{value:t,onValueChange:r,children:[e.jsxs(kt,{children:[e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"overview",children:[e.jsx(He,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Overview"})]}),e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"stack",children:[e.jsx(Et,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Stack"})]}),e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"logs",children:[e.jsx(at,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Logs"})]}),e.jsxs(de,{className:"flex items-center gap-2 truncate text-text-md",value:"configuration",children:[e.jsx(zs,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Configuration"})]}),e.jsxs(de,{className:"flex items-center gap-2 text-text-md",value:"metadata",children:[e.jsx(Rt,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),e.jsx("span",{children:"Metadata"})]})]}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"overview",children:e.jsx(Li,{})}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"stack",children:e.jsx(Oi,{})}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"logs",children:e.jsx(Cs,{fallbackRender:Vi,children:e.jsx(zi,{})})}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"configuration",children:e.jsx(wi,{})}),e.jsx(ue,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:e.jsx(vi,{})})]})})}function $o(){var i;const t=Cr(),s=br(((i=t.data)==null?void 0:i.deployment_type)||"other"),[r,n]=f.useState(!0);return e.jsxs("div",{children:[e.jsx(xi,{}),e.jsxs("div",{className:`flex ${s?"h-[calc(100vh_-_4rem_-_4rem_-_4rem_-_2px)]":"h-[calc(100vh_-_4rem_-_4rem_-_2px)]"} w-full`,children:[e.jsxs("div",{className:`relative bg-white/40 transition-all duration-500 ${r?"w-1/2":"w-full"}`,children:[e.jsx(si,{}),e.jsx(Bi,{isPanelOpen:r,setIsPanelOpen:n})]}),e.jsx("div",{"aria-hidden":!r,className:`h-full min-w-0 overflow-x-hidden text-ellipsis whitespace-nowrap bg-theme-surface-secondary transition-all duration-500 ${r?"w-1/2 border-l border-theme-border-moderate":"w-0 border-transparent"}`,children:e.jsxs(wr,{viewportClassName:"[&>*]:!block",children:[e.jsx(Hi,{setIsPanelOpen:n}),e.jsx(qi,{})]})})]})]})}function Bi({isPanelOpen:t,setIsPanelOpen:s}){return e.jsx(B,{intent:"secondary",className:`absolute right-4 top-4 h-7 w-7 items-center justify-center border border-neutral-300 bg-theme-surface-primary p-0.5 ${t?"hidden":"flex"}`,onClick:()=>s(!0),children:e.jsx(Xr,{className:"h-5 w-5 fill-theme-text-primary"})})}export{$o as default};
@@ -1 +1 @@
1
- import{r as u,j as e}from"./@radix-Cdvw4jJ8.js";import{a as g,ay as m,aN as p,aB as j,S as N,aI as b,b as v,g as S}from"./index-BgEfQ3_G.js";import{u as C}from"./update-server-settings-mutation-Bwe3gUt4.js";import{h as k}from"./@tanstack-5gTMR7G2.js";import"./@react-router-DeDfXbUF.js";import"./@reactflow-B_iCtR7X.js";function w({settings:t}){var o,l;const a=u.useId(),n=u.useId(),{toast:r}=g(),i=k(),x=((o=t.body)==null?void 0:o.display_announcements)??!1,h=((l=t.body)==null?void 0:l.display_updates)??!1,{mutate:c,isPending:d}=C({onError:s=>{i.invalidateQueries({queryKey:p()}),j(s)&&r({status:"error",emphasis:"subtle",icon:e.jsx(N,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})},onSuccess:()=>{i.invalidateQueries({queryKey:p()}),r({status:"success",emphasis:"subtle",rounded:!0,description:"Settings updated successfully"})}}),f=s=>{c({display_announcements:s})},y=s=>{c({display_updates:s})};return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(m,{checked:x,onCheckedChange:f,id:a,disabled:d}),e.jsxs("label",{htmlFor:a,className:"text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"Announcements"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Enable Announcements for important ZenML updates, surveys, and feedback opportunities."})]})]}),e.jsx("hr",{}),e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(m,{checked:h,onCheckedChange:y,id:n,disabled:d}),e.jsxs("label",{htmlFor:n,className:"text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"Updates"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Activate Updates to receive the latest ZenML news and feature releases."})]})]})]})}function _(){const{data:t}=b({throwOnError:!0});return e.jsxs(v,{className:"flex flex-col gap-5 p-5",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Notifications"}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"ZenML comes equipped with default widgets designed to enhance your experience by analyzing usage patterns, gathering your feedback, and ensuring you stay informed about our latest updates and features."})]}),e.jsx("div",{className:"",children:t?e.jsx(w,{settings:t}):e.jsx(S,{className:"h-[250px] w-full"})})]})}export{_ as default};
1
+ import{r as u,j as e}from"./@radix-C_LirfyT.js";import{s as g,aF as m,aU as p,aI as j,t as N,aP as b,j as v,d as S}from"./index-BacoJBEQ.js";import{u as C}from"./update-server-settings-mutation-CdM-Sdds.js";import{h as k}from"./@tanstack-C0SeHZng.js";import"./@react-router-BSsrkPOd.js";import"./@reactflow-D9hglKLF.js";function w({settings:t}){var o,l;const a=u.useId(),n=u.useId(),{toast:r}=g(),i=k(),x=((o=t.body)==null?void 0:o.display_announcements)??!1,h=((l=t.body)==null?void 0:l.display_updates)??!1,{mutate:c,isPending:d}=C({onError:s=>{i.invalidateQueries({queryKey:p()}),j(s)&&r({status:"error",emphasis:"subtle",icon:e.jsx(N,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})},onSuccess:()=>{i.invalidateQueries({queryKey:p()}),r({status:"success",emphasis:"subtle",rounded:!0,description:"Settings updated successfully"})}}),f=s=>{c({display_announcements:s})},y=s=>{c({display_updates:s})};return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(m,{checked:x,onCheckedChange:f,id:a,disabled:d}),e.jsxs("label",{htmlFor:a,className:"text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"Announcements"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Enable Announcements for important ZenML updates, surveys, and feedback opportunities."})]})]}),e.jsx("hr",{}),e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(m,{checked:h,onCheckedChange:y,id:n,disabled:d}),e.jsxs("label",{htmlFor:n,className:"text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"Updates"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Activate Updates to receive the latest ZenML news and feature releases."})]})]})]})}function _(){const{data:t}=b({throwOnError:!0});return e.jsxs(v,{className:"flex flex-col gap-5 p-5",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Notifications"}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"ZenML comes equipped with default widgets designed to enhance your experience by analyzing usage patterns, gathering your feedback, and ensuring you stay informed about our latest updates and features."})]}),e.jsx("div",{className:"",children:t?e.jsx(w,{settings:t}):e.jsx(S,{className:"h-[250px] w-full"})})]})}export{_ as default};
@@ -0,0 +1 @@
1
+ import{r as d,j as e}from"./@radix-C_LirfyT.js";import{u as V,W as ie,L as ce}from"./LeftSideMenu-Czev0KCA.js";import{Z as le,aX as de,r as _,$ as ue,z as y,B as b,c as L,d as N,aY as me,T as he,aV as S,v as H,y as O,F as Z,E as Q,aZ as xe,a_ as q,a$ as I,b0 as W,b1 as Y,az as $,b2 as k,aF as pe,t as K,I as z,b3 as fe,u as je,s as ye,V as B,a0 as ge,g as Ce,W as ve}from"./index-BacoJBEQ.js";import{W as R,H as A,B as E,F as P}from"./Wizard-8aJzxUjb.js";import{t as U}from"./zod-DgEcN9jD.js";import{a as C,C as w,u as J,F as X}from"./index.esm-COnaHLSh.js";import{S as G}from"./arrow-left-hcj2H8HY.js";import{L as ee}from"./@react-router-BSsrkPOd.js";import{R as be}from"./resource-tyes-list-B5rkZcbc.js";import{b as M,c as se,h as Ne}from"./@tanstack-C0SeHZng.js";import{S as Se}from"./transform-DFpKTKgF.js";import{g as we,a as Te,D as Ve,b as Me}from"./form-6aSt3tIl.js";import{A as ke}from"./index.es-DcVFDpJU.js";import{S as Fe}from"./Lock-CRP5J_su.js";import{S as F}from"./check-circle-mnEgPhPF.js";import{d as _e}from"./index-BRhKF2z-.js";import{S as Re}from"./package-BhYXGPxF.js";import{e as Ae,R as Ee,E as Pe}from"./service-connectors-DL2-k_E2.js";import{C as ze,R as Be}from"./resource-type-tooltip-E97WGqfk.js";import"./Tick-DDeDgTuT.js";import"./check-D1bHMJkL.js";import"./@reactflow-D9hglKLF.js";import"./plus-cI8zD2xh.js";import"./trash-HKxXWbSG.js";import"./info-CyMih3vQ.js";function De(){const{setBreadcrumbs:s}=le();d.useEffect(()=>{s([...de,{label:"New Connector",href:_.settings.connectors.create}])},[s])}function Le(){return De(),e.jsx(ue,{children:e.jsx("p",{className:"text-display-xs font-semibold",children:"Register a Service Connector"})})}const te=d.createContext(null);function He({children:s}){const[t,r]=d.useState(""),[n,a]=d.useState(null);return e.jsx(te.Provider,{value:{connectorType:t,setConnectorType:r,createdConnector:n,setCreatedConnector:a},children:s})}function v(){const s=d.useContext(te);if(!s)throw new Error("useRegisterConnectorContext must be used within a RegisterConnectorProvider");return s}const Oe=y.object({connectorType:y.string().trim().min(1)});function re(){return e.jsx(b,{size:"md",intent:"secondary",asChild:!0,children:e.jsx(ee,{to:_.settings.connectors.overview,children:"Cancel"})})}function ne({isPending:s,...t}){return e.jsxs(b,{type:"submit",size:"md",intent:"primary",...t,children:[!!s&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),e.jsx("span",{children:"Next"}),e.jsx(G,{width:24,height:24,className:"size-5 shrink-0 rotate-180 fill-white"})]})}function Ze(s){const{goToPreviousStep:t}=V();return e.jsxs(b,{onClick:()=>t(),type:"button",size:"md",intent:"primary",emphasis:"subtle",...s,children:[e.jsx(G,{width:24,height:24,className:"size-5 shrink-0 fill-primary-600"}),"Prev"]})}const Qe=s=>d.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.24923 9.14303C6.0632 6.17816 8.7764 4 12 4C15.2236 4 17.9368 6.17816 18.7508 9.14303C21.1861 9.70961 23 11.8925 23 14.5C23 17.5376 20.5376 20 17.5 20H6.5C3.46243 20 1 17.5376 1 14.5C1 11.8925 2.8139 9.70961 5.24923 9.14303ZM12 6C9.51785 6 7.45643 7.80968 7.0665 10.1816C6.99268 10.6306 6.62505 10.9731 6.17196 11.0151C4.39329 11.1798 3 12.6778 3 14.5C3 16.433 4.567 18 6.5 18H17.5C19.433 18 21 16.433 21 14.5C21 12.6778 19.6067 11.1798 17.828 11.0151C17.375 10.9731 17.0073 10.6306 16.9335 10.1816C16.5436 7.80968 14.4822 6 12 6Z"}));function qe(){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Qe,{className:"size-5 shrink-0 stroke-primary-400"}),e.jsx("p",{className:"font-sebmibold text-text-lg",children:"Select a Service Connector Type"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select the type of service connector you want to create. This will allow you to integrate your cloud resources with ZenML for model deployment and management."})]})}function Ie(){const s=M(S.serviceConnectorTypeList()),{control:t}=C();if(s.isError)return e.jsx("p",{children:"Failed to fetch Connector Type List"});if(s.isPending)return e.jsx(Ke,{});const r=s.data;return e.jsx("ul",{className:"space-y-2",children:r.map(n=>e.jsx("li",{children:e.jsx(w,{control:t,name:"connectorType",render:({field:{onChange:a,value:i}})=>e.jsxs("label",{className:L("flex w-full cursor-pointer items-center gap-5 rounded-md border p-5 transition-colors",{"border-primary-400 bg-primary-25 shadow-sm":i===n.connector_type,"border-theme-border-moderate hover:border-theme-border-bold hover:shadow-sm":i!==n.connector_type}),children:[e.jsx("input",{type:"radio",name:"connectorType",onChange:()=>a(n.connector_type),checked:i===n.connector_type,value:n.name,className:"h-3 w-3 border !border-theme-border-bold text-theme-surface-primary focus:ring-2 focus:ring-theme-surface-strong"}),e.jsxs("div",{className:"grid grid-cols-1 items-center gap-5 xl:grid-cols-3",children:[e.jsx(We,{connectorType:n}),e.jsx(Ye,{resourceTypes:n.resource_types}),e.jsx($e,{authMethods:n.auth_methods})]})]})})},n.name))})}function We({connectorType:s}){return e.jsxs("div",{className:"flex items-center gap-3",children:[s.logo_url&&e.jsx("img",{src:s.logo_url,width:32,height:32,className:"size-6 shrink-0",alt:s.name}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("div",{className:"text-text-lg font-semibold",children:s.name}),s.description&&e.jsx("span",{className:"text-text-sm text-theme-text-secondary",children:me(s.description,70)})]})]})}function Ye({resourceTypes:s}){return e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:"Resource Types"}),e.jsx(be,{iconSize:16,size:"xs",resourceTypes:s})]})}function $e({authMethods:s}){return e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:"Auth Methods"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:s.map(t=>e.jsx(he,{className:"w-fit",color:"blue",emphasis:"subtle",size:"xs",rounded:!1,children:t.name},t.auth_method))})]})}function Ke(){return e.jsx("div",{className:"w-full space-y-2",children:[...Array(4)].map((s,t)=>e.jsx(N,{className:"h-[110px] w-full"},t))})}function Ue(){const{goToNextStep:s}=V(),{setConnectorType:t,connectorType:r}=v(),n=J({resolver:U(Oe),defaultValues:{connectorType:r}});function a({connectorType:i}){t(i),s()}return e.jsx(R,{children:e.jsx(X,{...n,children:e.jsxs("form",{onSubmit:n.handleSubmit(a),children:[e.jsx(A,{children:"Select Your Implementation"}),e.jsx(E,{children:e.jsxs("div",{className:"space-y-5",children:[e.jsx(qe,{}),e.jsx(Ie,{})]})}),e.jsxs(P,{children:[e.jsx(re,{}),e.jsx(ne,{disabled:!n.formState.isValid})]})]})})})}async function Je({body:s}){const t=O(Q.serviceConnectors.list),r=await H(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!r.ok){const n=await r.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Failed to create service connector");throw new Z({status:r.status,statusText:r.statusText,message:n})}return r.json()}function Xe(s){return se({...s,mutationFn:async({body:t})=>Je({body:t})})}const Ge=ke(async s=>{try{return!((await xe({name:s})).total>0)}catch(t){return console.error(t),!1}},500),es=y.object({description:y.string().trim(),authMethod:y.string().trim().min(1,"Auth method is required"),resourceType:y.string().trim().min(1,"Resource type is required"),isValid:y.boolean().nullable(),skipValidation:y.boolean()});function ae(s){const t=d.useRef(s),r=d.useRef(!0),n=d.useMemo(()=>y.object({name:y.string().trim().min(1,"Name is required").max(32,"Name can be at most 32 characters").regex(/^[a-zA-Z0-9-]+$/,"Name can only contain letters, numbers and dashes").refine(async a=>{if(!a)return!0;if(a!==t.current){t.current=a;const i=await Ge(a);return r.current=i,i}return r.current},{message:"Service connector with this name already exists"})}),[]);return es.merge(n)}function ss({setConfigDefaultValues:s,setSchema:t}){return e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Se,{width:24,height:24,className:"shrink-0 fill-primary-400"}),e.jsx("p",{className:"text-text-lg font-semibold",children:"Select an Authentication Method"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Connect ZenML to your cloud provider for seamless integration of cloud services into your ML pipelines."})]}),e.jsx(ts,{setConfigDefaultValues:s,setSchema:t})]})}function ts({setConfigDefaultValues:s,setSchema:t}){const{control:r,resetField:n}=C(),a=ae(""),{connectorType:i}=v(),u=M(S.serviceConnectorTypeDetail(i));if(u.isError)return e.jsxs("p",{children:["Failed to fetch Connector Type ",i]});if(u.isPending)return e.jsx(N,{className:"h-7 w-full"});const f=u.data,l=f.auth_methods.filter(x=>x.auth_method!=="implicit");function c(x){const o=l.find(p=>p.auth_method===x);if(!o)return;const h=o.config_schema,m=we(h),j=Te(h);s(j),t(a.merge(m)),Object.keys(m.shape).forEach(p=>n(p))}return e.jsx(w,{control:r,name:"authMethod",render:({field:x,formState:{errors:o}})=>{var h;return e.jsxs("div",{className:"space-y-1",children:[e.jsxs(q,{onValueChange:m=>{x.onChange(m),c(m)},defaultValue:x.value,children:[e.jsx(I,{"data-error":!!o.authMethod,className:"border border-theme-border-moderate data-[error=true]:border-error-500",children:e.jsx(W,{placeholder:"Select your Authentication Method"})}),e.jsx(Y,{className:"",children:e.jsx($,{viewportClassName:"max-h-[300px]",children:l.map(m=>e.jsx(k,{value:m.auth_method,children:e.jsxs("div",{className:"flex items-center gap-1",children:[f.logo_url&&e.jsx("img",{alt:m.name,width:24,height:24,className:"shrink-0 object-contain",src:f.logo_url}),m.name]})},m.name))})})]}),o.authMethod&&e.jsx("p",{className:"text-text-xs text-red-500",children:(h=o.authMethod.message)==null?void 0:h.toString()})]})}})}function rs(){const{control:s}=C();return e.jsx(w,{name:"skipValidation",control:s,render:({field:t,fieldState:{error:r}})=>{var n;return e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"flex items-center gap-2",children:[e.jsx(pe,{checked:t.value,onCheckedChange:t.onChange}),e.jsx("span",{children:"Register without validation"})]}),r&&e.jsx("p",{className:"text-text-xs text-red-500",children:(n=r.message)==null?void 0:n.toString()})]})}})}function oe({name:s,authMethod:t,connectorType:r,user:n,workspace:a,resourceType:i,description:u,isValid:f,skipValidation:l,...c}){return Object.keys(c).forEach(o=>{(c[o]===""||c[o]===null||c[o]===void 0||Array.isArray(c[o])&&c[o].length===0||typeof c[o]=="object"&&!Array.isArray(c[o])&&Object.keys(c[o]).length===0)&&delete c[o]}),{name:s,auth_method:t,connector_type:r,resource_types:i==="all"?void 0:[i],description:u||void 0,configuration:c,user:n}}async function ns({payload:s}){const t=O(Q.serviceConnectors.verify),r=await H(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!r.ok){const n=await r.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Failed to verify connector");throw new Z({status:r.status,statusText:r.statusText,message:n})}return r.json()}function as(s){return se({...s,mutationFn:async({payload:t})=>ns({payload:t})})}function os({mandatoryFields:s}){const t=d.useMemo(()=>[...s,"name","authMethod","resourceType"],[s]),[r,n]=d.useState(!0),[a,i]=d.useState(""),{setValue:u,clearErrors:f,watch:l,resetField:c}=C();d.useEffect(()=>{const o=l((h,{name:m})=>{m&&(m==="isValid"||m==="skipValidation"||h.isValid!==null&&c("isValid"))});return()=>o.unsubscribe()},[l,c]),d.useEffect(()=>{const h=_e(j=>{const T=t.every(p=>{const g=j[p];return g==null||g===""?!1:Array.isArray(g)?g.length>0:typeof g=="object"?Object.keys(g).length>0:!0});n(!T)},300),m=l(j=>{h(j)});return()=>{m.unsubscribe(),h.cancel()}},[l,t]);const x=as({onMutate:()=>{i("")},onSuccess:o=>{if(o.error){u("isValid",!1),i(o.error);return}u("isValid",!0),f("skipValidation")},onError:()=>{u("isValid",!1)}});return{disabled:r,errorMsg:a,verifyConfig:x}}function is({user:s,mandatoryFields:t}){const{connectorType:r}=v(),{control:n,getValues:a}=C(),{disabled:i,errorMsg:u,verifyConfig:f}=os({mandatoryFields:t});return e.jsx(w,{control:n,name:"isValid",render:({field:l})=>e.jsxs("div",{className:"space-y-5",children:[e.jsx(b,{disabled:i,size:"md",className:L("flex w-full items-center justify-center gap-3",{"border-success-500 bg-success-500 text-white":l.value===!0}),type:"button",intent:"primary",emphasis:"subtle",onClick:()=>{const c=oe({...a(),connectorType:r,user:s});f.mutate({payload:c})},children:e.jsx(cs,{disabled:i,isValid:l.value,isPending:f.isPending})}),u&&e.jsx("p",{className:"max-h-[250px] overflow-auto rounded-md border border-theme-border-moderate bg-theme-surface-secondary p-1 text-left font-mono",children:u})]})})}function cs({isValid:s,isPending:t,disabled:r}){return t?e.jsxs(e.Fragment,{children:[e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-5 w-5 animate-spin rounded-rounded border-2 border-neutral-300 border-b-theme-text-brand"}),"Validating Credentials..."]}):s===null?e.jsxs(e.Fragment,{children:[e.jsx(F,{width:24,height:24,"data-disabled":r,className:"fill-primary-600 data-[disabled=true]:fill-primary-100"}),"Validate Credentials"]}):s?e.jsxs(e.Fragment,{children:[e.jsx(F,{width:24,height:24,className:"fill-white"}),"Verified successfully"]}):e.jsxs(e.Fragment,{children:[e.jsx(K,{width:24,height:24,"data-disabled":r,className:"fill-primary-600 data-[disabled=true]:fill-primary-100"}),"Invalid Credentials"]})}function ls({user:s}){return e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Fe,{width:24,height:24,className:"shrink-0 fill-primary-400"}),e.jsx("p",{className:"text-text-lg font-semibold",children:"Add your configuration"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Your credentials are securely stored and encrypted. ZenML uses these credentials to interact with your resources."})]}),e.jsx(ds,{user:s})]})}function ds({user:s}){const{getValues:t}=C(),{connectorType:r}=v(),n=M(S.serviceConnectorTypeDetail(r));if(n.isError)return e.jsxs("p",{children:["Failed to fetch Connector Type ",r]});if(n.isPending)return e.jsx(N,{className:"h-7 w-full"});const i=n.data.auth_methods.find(o=>o.auth_method===t("authMethod"));if(!i)return null;const u=i.config_schema,f=u.properties||{},l=u.required||[],c=u.$defs,x=Object.entries(f).sort(([o],[h])=>l.includes(o)&&!l.includes(h)?-1:!l.includes(o)&&l.includes(h)?1:0);return e.jsxs("div",{className:"space-y-5",children:[x.map(([o,h])=>e.jsx(Ve,{definitions:c,isOptional:Me(o,l),name:o,schema:h},o)),e.jsx(is,{mandatoryFields:l,user:s}),e.jsx(rs,{})]})}const us=s=>d.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755ZM7 7C7 6.44772 7.44772 6 8 6H16C16.5523 6 17 6.44772 17 7C17 7.55229 16.5523 8 16 8H13V17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17V8H8C7.44772 8 7 7.55229 7 7Z"}));function ms(){var r,n;const{register:s,formState:{errors:t}}=C();return e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(us,{width:24,height:24,className:"shrink-0 fill-primary-400"}),e.jsx("p",{className:"text-text-lg font-semibold",children:"Select a name and description for your Service Connector"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"You can keep the suggested name or create your own."})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"font-inter text-sm text-left font-medium leading-5",children:["Name",e.jsx("span",{className:"text-theme-text-error","aria-label":"required",children:"*"})]}),e.jsx(z,{"data-error":!!t.name,...s("name"),className:"w-full data-[error=true]:border-error-500",inputSize:"md"}),e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:"Only letters, numbers and dashes. It should be 32 characters max. You cannot use an existing name."}),t.name&&e.jsx("p",{className:"text-text-xs text-red-500",children:(r=t.name.message)==null?void 0:r.toString()})]}),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(z,{...s("description"),className:"w-full",inputSize:"md"}),t.description&&e.jsx("p",{className:"text-text-xs text-red-500",children:(n=t.description.message)==null?void 0:n.toString()})]})]})}function hs(){return e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Re,{width:24,height:24,className:"shrink-0 fill-primary-400"}),e.jsx("p",{className:"text-text-lg font-semibold",children:"Select your resource type"})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Select resource types your connector will provide access to. Choose a specific type or enable all available resources."," ",e.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/service-connectors-guide#resource-types",className:"link text-theme-text-brand",children:"Learn More"})]})]}),e.jsx(xs,{})]})}function xs(){const{control:s}=C(),{connectorType:t}=v(),r=M(S.serviceConnectorTypeDetail(t));if(r.isError)return e.jsxs("p",{children:["Failed to fetch Connector Type ",t]});if(r.isPending)return e.jsx(N,{className:"h-7 w-full"});const n=r.data;return e.jsx(w,{control:s,name:"resourceType",render:({field:a})=>e.jsxs(q,{onValueChange:a.onChange,defaultValue:a.value,children:[e.jsx(I,{className:"border border-theme-border-moderate",children:e.jsx(W,{placeholder:"Select your Resource Type"})}),e.jsx(Y,{className:"",children:e.jsxs($,{viewportClassName:"max-h-[300px]",children:[n.resource_types.map(i=>e.jsx(k,{value:i.resource_type,children:e.jsxs("div",{className:"flex items-center gap-1",children:[i.logo_url&&e.jsx("img",{alt:i.name,width:24,height:24,className:"shrink-0 object-contain",src:i.logo_url}),i.name]})},i.name)),e.jsx(k,{value:"all",children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(fe,{width:24,height:24,className:"shrink-0 fill-neutral-400 object-contain"}),"All resources types"]})})]})})]})})}function ps(){const s=je(),{connectorType:t,setCreatedConnector:r}=v(),{goToNextStep:n}=V(),a=ae(""),[i,u]=d.useState(a),{toast:f}=ye(),l=S.connectors,c=Ne(),x=Xe({onSuccess:p=>{c.invalidateQueries({queryKey:l}),r(p),n()},onError:p=>{f({status:"error",emphasis:"subtle",icon:e.jsx(K,{width:24,height:24,className:"shrink-0 fill-error-700"}),description:p.message,rounded:!0})}}),[o,h]=d.useState({}),m=i.refine(p=>p.isValid===!0||p.skipValidation===!0,{message:"Either verify the connector or register without validation",path:["skipValidation"]}),j=J({resolver:U(m),shouldUnregister:!0,mode:"onChange",defaultValues:{name:"",description:"",authMethod:"",isValid:null,resourceType:"all",skipValidation:!1,...o}});if(s.isPending)return e.jsx(N,{className:"h-[500px] w-full"});if(s.isError)return e.jsx("p",{children:"Error fetching user"});const T=p=>{const g=oe({...p,connectorType:t,user:s.data.id});x.mutate({body:g})};return e.jsx(R,{children:e.jsxs(X,{...j,children:[e.jsx(A,{children:"Configure your Service Connector"}),e.jsxs("form",{onSubmit:j.handleSubmit(T),children:[e.jsx(E,{children:e.jsxs("div",{className:"divide-y divide-theme-border-moderate *:py-5 first:*:pt-0 last:*:pb-0",children:[e.jsx(ms,{}),e.jsx(hs,{}),e.jsx(ss,{setConfigDefaultValues:h,setSchema:u}),e.jsx(ls,{user:s.data.id})]})}),e.jsxs(P,{children:[e.jsx(re,{}),e.jsx(Ze,{}),e.jsx(ne,{isPending:j.formState.isSubmitting||x.isPending,disabled:j.formState.isSubmitting||x.isPending})]})]})]})})}function fs({connectorName:s}){return e.jsxs("div",{className:"flex w-full items-center gap-3 rounded-md border border-success-300 bg-success-50 px-4 py-3 text-text-sm text-success-900",children:[e.jsx(F,{width:24,height:24,className:"shrink-0 fill-success-900"}),e.jsxs("p",{children:["You successfully registered the service connector `",s,"` and can now create new resources"]})]})}function js(){return d.useMemo(()=>[{id:"name",header:"Service Connector",accessorKey:"name",cell:({row:s})=>{var a;const t=s.original.id,r=s.original.name,n=(a=s.original.body)==null?void 0:a.connector_type;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[!!n&&typeof n!="string"&&e.jsx(ze,{connectorType:n}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"block max-w-[200px] truncate text-text-md font-semibold",children:r}),e.jsx(B,{copyText:r})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{children:t.split("-")[0]}),e.jsx(B,{copyText:t})]})]})]})}},{id:"resource_types",header(){return e.jsx("p",{className:"whitespace-nowrap",children:"Resource Types"})},cell:({row:s})=>{const t=Ae(s.original);return e.jsx("div",{className:"flex items-center gap-0.5",children:t.map((r,n)=>e.jsx(Be,{resourceType:r},n))})}},{id:"resource-name",header(){return e.jsx("p",{className:"whitespace-nowrap",children:"Resource Name"})},cell:({row:s})=>e.jsx("div",{className:"max-w-[100px]",children:e.jsx(Ee,{connector:s.original})})},{id:"user",header:"Author",accessorFn:s=>{var t,r;return(r=(t=s.resources)==null?void 0:t.user)==null?void 0:r.name},cell:({row:s})=>{var r;const t=(r=s.original.resources)==null?void 0:r.user;return t?e.jsx(ge,{className:"max-w-[200px] truncate",username:Ce(t)}):null}},{id:"expires",header(){return e.jsx("p",{className:"whitespace-nowrap",children:"Expires in"})},accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.expires_at},cell:({row:s})=>{var r;const t=(r=s.original.body)==null?void 0:r.expires_at;return t?e.jsx(Pe,{expires:t}):e.jsx("p",{children:"Never"})}}],[])}function ys({connector:s}){const t=js();return e.jsx("section",{className:"flex flex-col gap-5",children:e.jsx("div",{className:"flex flex-col items-center gap-5",children:e.jsx("div",{className:"w-full",children:e.jsx(ve,{columns:t,data:[s]})})})})}function gs(){const{createdConnector:s}=v();return s?e.jsxs(R,{children:[e.jsx(A,{children:"Your Service Connector"}),e.jsx(E,{children:e.jsxs("div",{className:"space-y-5",children:[e.jsx(fs,{connectorName:s.name}),e.jsx(ys,{connector:s})]})}),e.jsx(P,{children:e.jsx(Cs,{connectorId:s.id})})]}):e.jsx("p",{children:"No connector created"})}function Cs({connectorId:s}){return e.jsx(b,{asChild:!0,type:"submit",size:"md",intent:"primary",children:e.jsx(ee,{to:_.settings.connectors.detail.configuration(s),children:"Finish"})})}function vs(){return e.jsx(He,{children:e.jsx(bs,{})})}function bs(){const{currentStep:s}=V();if(s===0)return e.jsx(Ue,{});if(s===1)return e.jsx(ps,{});if(s===2)return e.jsx(gs,{})}const D=["Connector Type","Configuration"];function $s(){return e.jsxs("div",{children:[e.jsx(Le,{}),e.jsx("div",{className:"layout-container flex flex-col gap-5 px-3 py-5 xl:flex-row xl:px-0",children:e.jsxs(ie,{maxSteps:D.length,initialStep:0,children:[e.jsx("div",{className:"shrink-0",children:e.jsx(ce,{entries:D})}),e.jsx("div",{className:"w-full",children:e.jsx(vs,{})})]})})]})}export{$s as default};
@@ -0,0 +1 @@
1
+ import{r as i,j as e}from"./@radix-C_LirfyT.js";import{d as o,B as n,r as c,bv as x}from"./index-BacoJBEQ.js";import{S as h}from"./StackList-Dt0FrIkM.js";import{p as m,c as j}from"./persist-DxiyfAax.js";import{p as l,c as k}from"./persist-BKKcL1Kp.js";import{I as p}from"./Infobox-DFCWPbMb.js";import{s as u}from"./index-dCcVgFNl.js";import{b as f}from"./@tanstack-C0SeHZng.js";import{L as d}from"./@react-router-BSsrkPOd.js";import"./@reactflow-D9hglKLF.js";import"./plus-cI8zD2xh.js";import"./refresh-3EF2R7ja.js";import"./Pagination-CcDD5yHh.js";import"./chevron-right-double-CbRQKN4Q.js";import"./SearchField-D_0-uAPj.js";import"./index-BRhKF2z-.js";import"./DisplayDate-v3KW7oez.js";import"./CodeSnippet-D8iBqOVv.js";import"./CollapsibleCard-D0-pQi1n.js";import"./chevron-down-Z3nUe-0U.js";import"./check-circle-mnEgPhPF.js";import"./SheetHeader-7vwlsY_i.js";import"./components-Br2ezRib.js";import"./NumberBox-CoQjQYDJ.js";import"./ComponentBadge-mw2Ja_ON.js";import"./ComponentIcon-BXgpt-jw.js";import"./bar-chart-square-check-9siI9icm.js";import"./layout-C5dgIReC.js";import"./transform-DFpKTKgF.js";import"./trash-HKxXWbSG.js";import"./DialogItem-DeME0oSt.js";import"./AlertDialogDropdownItem-druRNuO2.js";import"./sharedSchema-DyUO09BR.js";import"./index.es-DcVFDpJU.js";import"./info-CyMih3vQ.js";import"./stack-detail-query-Bc4QKlWg.js";function v({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(d,{to:c.stacks.create.newInfra,children:e.jsx("span",{children:"Review Stack"})})})})]})})}function w({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(d,{to:c.stacks.create.terraform,children:e.jsx("span",{children:"Review Stack"})})})})]})})}function b(){const[a,t]=i.useState(m().success),[s,r]=i.useState(l().success);return!a&&!s?null:e.jsxs("div",{className:"space-y-5",children:[a&&e.jsx(v,{setHasResumeableStack:t}),s&&e.jsx(w,{setHasResumeableTerraform:r})]})}function ae(){const{setTourState:a,tourState:{tourActive:t}}=x();return i.useEffect(()=>{t&&a(s=>({...s,run:!0,stepIndex:s.stepIndex}))},[t]),e.jsxs("div",{className:"space-y-5 py-5",children:[e.jsx(b,{}),e.jsx(h,{})]})}export{ae as default};
@@ -0,0 +1 @@
1
+ import{j as e,r as d,aF as N,aG as U,aH as P,aI as V}from"./@radix-C_LirfyT.js";import{O as q,Q as Z,R as G,U as K,aD as O,D as R,at as u,az as J,B as f,aG as W,aH as X,aA as Y,aB as ee,aC as te,bA as se,I as B,a1 as re,ac as ne,a5 as ae,a0 as ie,r as E,z as x,s as oe,t as ce,c as le}from"./index-BacoJBEQ.js";import{a as p,C as de,u as me,F as ue}from"./index.esm-COnaHLSh.js";import{C as H}from"./ComponentIcon-BXgpt-jw.js";import{D as pe}from"./DisplayDate-v3KW7oez.js";import{j as he,k as xe,h as fe}from"./@tanstack-C0SeHZng.js";import{d as ge}from"./index-BRhKF2z-.js";import{s as je,R as ke,a as be,u as ve}from"./create-stack-BruqH_6X.js";import{S as ye}from"./info-CyMih3vQ.js";import{S as Ne,s as b}from"./constants-DeV48DuZ.js";import{S as Se}from"./arrow-left-hcj2H8HY.js";import{C as we}from"./configuration-form-Yz8m0QIG.js";import{S as Ce}from"./check-circle-mnEgPhPF.js";import{L as Le,c as _e}from"./@react-router-BSsrkPOd.js";import{s as Fe}from"./index-dCcVgFNl.js";import{t as Te}from"./zod-DgEcN9jD.js";import{s as ze}from"./sharedSchema-DyUO09BR.js";import"./@reactflow-D9hglKLF.js";import"./bar-chart-square-check-9siI9icm.js";import"./layout-C5dgIReC.js";import"./transform-DFpKTKgF.js";import"./index-B7CRNU8l.js";import"./form-6aSt3tIl.js";import"./plus-cI8zD2xh.js";import"./trash-HKxXWbSG.js";import"./check-D1bHMJkL.js";import"./CodeSnippet-D8iBqOVv.js";import"./file-text-CltVhgwZ.js";import"./terminal-square-BObrvDlO.js";import"./stack-detail-query-Bc4QKlWg.js";import"./index.es-DcVFDpJU.js";const S={helpLink:"https://docs.zenml.io/stack-components/orchestrators",description:"An orchestrator is a special kind of backend that manages the running of each step of the pipeline. Orchestrators administer the actual pipeline runs. By default, ZenML initializes your repository with an orchestrator that runs everything on your local machine."},w={helpLink:"https://docs.zenml.io/stack-components/artifact-stores",description:"The Artifact Store is a central component in any MLOps stack. As the name suggests, it acts as a data persistence layer where artifacts (e.g. datasets, models) ingested or generated by the machine learning pipelines are stored."},C={helpLink:"https://docs.zenml.io/stack-components/container-registries",description:"Container registry is used to store container images that are built to run machine learning pipelines in remote environments. Containerization of the pipeline code creates a portable environment that allows code to run in an isolated manner."},L={description:"Step operators allow you to run individual steps in a custom environment different from the default one used by your active orchestrator.",helpLink:"https://docs.zenml.io/stack-components/step-operators"},_={description:"Model deployers are stack components responsible for online model serving. They are responsible for deploying models to a remote server. Model deployers also act as a registry for models that are served with ZenML.",helpLink:"https://docs.zenml.io/stack-components/model-deployers"},F={description:"ZenML supports connecting to a Redis-backed Feast feature store as a stack component integration.",helpLink:"https://docs.zenml.io/stack-components/feature-stores"},T={description:"Experiment trackers let you track your ML experiments by logging the parameters and allowing you to compare between different runs.",helpLink:"https://docs.zenml.io/stack-components/experiment-trackers"},z={description:"Alerters allow you to send messages to chat services (like Slack, Discord, Mattermost, etc.) from within your pipelines. This is useful to immediately get notified when failures happen, for general monitoring/reporting, and also for building human-in-the-loop ML.",helpLink:"https://docs.zenml.io/stack-components/alerters "},M={description:"Annotators are a stack component that enables the use of data annotation as part of your ZenML stack and pipelines.",helpLink:"https://docs.zenml.io/stack-components/annotators"},I={description:"Data Validators used in ZenML pipelines usually generate data profiles and data quality check reports that are versioned and stored in the Artifact Store and can be retrieved and visualized later.",helpLink:"https://docs.zenml.io/stack-components/data-validators"},D={description:"The image builder is an essential part of most remote MLOps stacks. It is used to build container images such that your machine-learning pipelines and steps can be executed in remote environments.",helpLink:"https://docs.zenml.io/stack-components/image-builders"},A={description:"Model registries are centralized storage solutions for managing and tracking machine learning models across various stages of development and deployment.",helpLink:"https://docs.zenml.io/stack-components/model-registries"};function Me({type:t}){const{description:s,link:r}=Ie(t);return e.jsx(q,{children:e.jsxs(Z,{delayDuration:200,children:[e.jsxs(G,{children:[e.jsx(ye,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"}),e.jsxs("div",{className:"sr-only",children:["Info for ",t]})]}),e.jsxs(K,{align:"start",side:"bottom",className:"flex max-w-xl flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:s}),e.jsx("a",{className:"link mt-2 text-primary-400",target:"_blank",href:r,children:"Learn more"})]})]})})}function Ie(t){switch(t){case"orchestrator":return{description:S.description,link:S.helpLink};case"alerter":return{description:z.description,link:z.helpLink};case"annotator":return{description:M.description,link:M.helpLink};case"artifact_store":return{description:w.description,link:w.helpLink};case"container_registry":return{description:C.description,link:C.helpLink};case"data_validator":return{description:I.description,link:I.helpLink};case"experiment_tracker":return{description:T.description,link:T.helpLink};case"feature_store":return{description:F.description,link:F.helpLink};case"image_builder":return{description:D.description,link:D.helpLink};case"model_deployer":return{description:_.description,link:_.helpLink};case"model_registry":return{description:A.description,link:A.helpLink};case"step_operator":return{description:L.description,link:L.helpLink}}}function De({type:t,setSelectedFlavor:s}){return e.jsxs(e.Fragment,{children:[e.jsx(O,{children:e.jsxs(R,{children:["Select ",u(t)," Flavor"]})}),e.jsx(J,{viewportClassName:"max-h-[70vh]",children:e.jsx("div",{className:"p-5",children:e.jsx(Ne,{setSelectedFlavor:s,type:t})})})]})}function Ae({name:t,id:s,backHandler:r,type:n,successHandler:a}){const o=d.useId();return e.jsxs(e.Fragment,{children:[e.jsx(O,{className:"w-full",children:e.jsxs("div",{className:"flex w-0 flex-1 items-center gap-2",children:[e.jsxs(f,{intent:"secondary",emphasis:"subtle",className:"flex aspect-square size-6 items-center justify-center",onClick:()=>r(),children:[e.jsx(Se,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs(R,{className:"truncate",children:["Configure your ",u(t)," ",u(n)]})]})}),e.jsx(we,{useMaxHeight:!0,flavorId:s,formId:o,successHandler:a,FooterComponent:$e})]})}function $e({formId:t,isPending:s}){return e.jsx(W,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(X,{asChild:!0,children:e.jsx(f,{size:"md",intent:"secondary",children:"Cancel"})}),e.jsxs(f,{size:"md",disabled:s,type:"submit",form:t,children:[s&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Component"]})]})})}function Oe({type:t}){const[s,r]=d.useState(!1),[n,a]=d.useState(0),[o,c]=d.useState(null);async function i(l){r(l),await je(100),l||(a(0),c(null))}function g(l){var m;c({id:l.id,name:l.name,logoUrl:((m=l.body)==null?void 0:m.logo_url)??void 0}),a(j=>j+1)}function h(){a(0),c(null)}return e.jsxs(Y,{open:s,onOpenChange:l=>i(l),children:[e.jsx(ee,{asChild:!0,children:e.jsxs("button",{className:"w-full rounded-md border border-dashed border-neutral-300 bg-theme-surface-tertiary py-5 text-theme-text-secondary",children:["New ",u(t)]})}),e.jsxs(te,{className:"w-full sm:max-w-[640px] md:max-w-3xl xl:max-w-[1080px]",children:[n===0&&e.jsx(De,{setSelectedFlavor:g,type:t}),n===1&&!!o&&e.jsx(Ae,{successHandler:()=>i(!1),backHandler:h,...o,type:t})]})]})}function Re(){return e.jsxs(e.Fragment,{children:[b.map(t=>e.jsx(N,{className:"h-full space-y-5 p-5",value:t,children:e.jsx(He,{type:t})},t)),e.jsx(N,{className:"h-full",value:"",children:e.jsx("div",{className:"flex h-full w-full items-center justify-center text-theme-text-tertiary",children:"Select a category to add a new component"})})]})}function Be({type:t,search:s}){const r=he({...re.componentListInfinite({sort_by:"desc:updated",type:t,...s?{name:`contains:${s}`}:{}})}),{control:n,watch:a,setValue:o}=p();return r.isError?e.jsx("p",{children:"Error while fetching Components"}):r.isPending?e.jsx("div",{className:"flex w-full flex-1 items-center justify-center",children:e.jsx(ne,{})}):e.jsxs("div",{className:"space-y-1",children:[e.jsx("ul",{className:"space-y-1",children:r.data.pages.map(c=>c.items.map(i=>e.jsx("li",{children:e.jsx(de,{name:`components.${t}.id`,control:n,render:({field:{onChange:g,...h}})=>{var l,m,j,v;return e.jsxs(ke,{className:"justify-between bg-theme-surface-primary font-medium","data-state":a(`components.${t}.id`)===i.id?"selected":"unselected",htmlFor:i.id,children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(be,{...h,id:i.id,type:"radio",value:i.id,onChange:Q=>{var y;o(`components.${t}.name`,i.name),o(`components.${t}.logoUrl`,((y=i.body)==null?void 0:y.logo_url)||""),g(Q)},checked:a(`components.${t}.id`)===i.id,name:t}),e.jsx("img",{alt:"flavor icon",src:ae(((l=i.body)==null?void 0:l.logo_url)||""),width:24,height:24}),e.jsxs("div",{className:"min-w-0 truncate",children:[e.jsx("div",{className:"truncate font-semibold",children:i.name}),e.jsx("div",{className:"truncate text-text-xs text-theme-text-secondary",children:i.id.split("-")[0]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-text-sm",children:[((j=(m=i.resources)==null?void 0:m.user)==null?void 0:j.name)&&e.jsx(ie,{username:i.resources.user.name}),((v=i.body)==null?void 0:v.updated)&&e.jsx("div",{className:"whitespace-nowrap text-theme-text-secondary",children:e.jsx(pe,{short:!0,dateString:i.body.updated})})]})]})}})},i.id)))}),e.jsx(Oe,{type:t}),r.hasNextPage&&e.jsx(f,{onClick:()=>r.fetchNextPage(),type:"button",size:"md",intent:"secondary",emphasis:"subtle",className:"flex w-full items-center justify-center bg-theme-surface-primary",children:e.jsxs("div",{className:"flex items-center gap-1",children:[r.isFetchingNextPage&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Load more"]})})]})}function Ee({type:t}){return e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(H,{className:"h-5 w-5 fill-primary-400",type:t}),e.jsx("h2",{className:"text-text-lg font-semibold",children:u(t)}),e.jsx(Me,{type:t})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Select a existing ",se(t)," from your server:"]})]})}function He({type:t}){const[s,r]=d.useState(""),{watch:n,setValue:a}=p(),o=n(`components.${t}`);return d.useEffect(()=>{o&&!o.id&&a(`components.${t}`,null)},[o,a,t]),e.jsxs(e.Fragment,{children:[e.jsx(Ee,{type:t}),e.jsx(Qe,{search:s,setSearch:r}),e.jsx(Be,{search:s,type:t})]})}function Qe({setSearch:t,search:s}){const[r,n]=d.useState(s),a=d.useCallback(ge(t,500),[]);d.useEffect(()=>()=>{a.cancel()},[a]);function o(c){n(c),a(c)}return e.jsx(B,{value:r,onChange:c=>o(c.target.value),placeholder:"Search..."})}function Ue({type:t}){const{watch:s,formState:{errors:r}}=p(),n=s(`components.${t}`),a=n&&n.id;return e.jsx("div",{"data-error":!a&&r.components&&r.components[t]?"true":"false","data-filled":a?"true":"false",className:"flex h-[110px] flex-col items-center justify-center space-y-2 truncate whitespace-nowrap rounded-md border border-theme-border-moderate bg-theme-surface-secondary py-5 text-center text-text-sm text-theme-text-secondary transition-all duration-150 hover:bg-theme-surface-primary hover:shadow-sm data-[error=true]:border-theme-text-error data-[filled=true]:border-success-400 data-[filled=true]:bg-theme-surface-primary data-[state=active]:bg-theme-surface-primary group-data-[state=active]/trigger:bg-theme-surface-primary group-data-[state=active]/trigger:shadow-md data-[error=false]:data-[filled=false]:group-data-[state=active]/trigger:border-theme-border-bold",children:a?e.jsx(Pe,{type:t}):e.jsx(Ve,{type:t})})}function Pe({type:t}){const{watch:s}=p(),r=s(`components.${t}`);return r&&r.id?e.jsxs("div",{className:"flex flex-col items-center gap-2 text-text-sm",children:[e.jsx("img",{width:24,height:24,src:r.logoUrl,alt:`Icon of ${r.name}`}),e.jsxs("div",{className:"space-y-0.25",children:[e.jsx("div",{className:"text-theme-text-primary",children:r.name}),e.jsx("div",{className:"text-text-xs text-theme-text-tertiary",children:u(t)})]})]}):null}function Ve({type:t}){return e.jsxs(e.Fragment,{children:[e.jsx(H,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong",type:t}),e.jsx("span",{children:u(t)})]})}function qe(){return e.jsxs("div",{className:"flex h-full flex-col justify-between space-y-5",children:[e.jsxs("div",{className:"space-y-5 p-5",children:[e.jsx(Ke,{}),e.jsx(Ze,{})]}),e.jsx(Ge,{})]})}function Ze(){const{watch:t,resetField:s}=p();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-text-lg font-semibold",children:"Add Components"}),e.jsxs("p",{className:"text-theme-text-secondary",children:["All stacks have at minimum an orchestrator and an artifact store."," ",e.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://docs.zenml.io/stack-components/component-guide",className:"link text-primary-400",children:"Learn more"})]})]}),e.jsx(U,{children:e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:b.map(r=>e.jsxs("div",{className:"relative",children:[e.jsx(P,{className:"group/trigger w-full",value:r,children:e.jsx(Ue,{type:r})}),t(`components.${r}.id`)&&e.jsx("button",{type:"button",onClick:n=>{n.preventDefault(),s(`components.${r}`)},className:"absolute right-[-12px] top-[-12px] flex aspect-square h-[28px] w-[28px] items-center justify-center rounded-rounded bg-theme-surface-primary",children:e.jsx(Ce,{className:"h-5 w-5 shrink-0 fill-success-400"})})]},r))})})]})}function Ge(){const{formState:{isSubmitting:t}}=p(),s=!!xe();return e.jsxs("div",{className:"flex items-center justify-end space-x-2 border-t border-theme-border-moderate p-5",children:[e.jsx(f,{asChild:!0,intent:"secondary",size:"md",children:e.jsx(Le,{to:E.stacks.create.index,children:"Cancel"})}),e.jsxs(f,{className:"flex items-center gap-1",disabled:t||s,size:"md",children:[(s||t)&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Stack"]})]})}function Ke(){var r;const{register:t,formState:{errors:s}}=p();return e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-text-sm",htmlFor:"stack-name",children:"Stack Name"}),e.jsx(B,{id:"stack-name",className:`${s.stackName?"border-red-500":""} w-full`,placeholder:"zenml-stack",...t("stackName")}),s.stackName&&e.jsx("p",{className:"text-text-xs text-red-500",children:(r=s.stackName.message)==null?void 0:r.toString()})]})}const k=x.object({id:x.string().trim().min(1),name:x.string().trim().min(1),logoUrl:x.string().trim().min(1)}),Je=b.reduce((t,s)=>(t[s]=k.nullable(),t),{}),We=x.object({stackName:ze,components:x.object({...Je,orchestrator:k,artifact_store:k})});function Xe(){const{toast:t}=oe(),s=_e(),r=fe(),n=ve({onSuccess:async()=>{r.invalidateQueries({queryKey:Fe.all}),s(E.stacks.overview)},onError:c=>{t({status:"error",emphasis:"subtle",icon:e.jsx(ce,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:c.message,rounded:!0})}});function a(c){const i=Object.entries(c.components).reduce((h,[l,m])=>(m&&(h[l]=[m.id]),h),{}),g={name:c.stackName,components:i};n.mutate({payload:g})}const o=me({resolver:Te(We),defaultValues:{components:{alerter:null,orchestrator:{},annotator:null,artifact_store:{},container_registry:null,data_validator:null,experiment_tracker:null,feature_store:null,model_registry:null,image_builder:null,model_deployer:null,step_operator:null},stackName:""}});return{createManualStack:a,form:o}}function Tt(){const[t,s]=d.useState(""),{createManualStack:r,form:n}=Xe();return e.jsx(ue,{...n,children:e.jsx(V,{value:t,onValueChange:s,className:"h-full",children:e.jsxs("form",{onSubmit:n.handleSubmit(r),className:"flex h-[calc(100vh_-_4rem_-_4rem_-_2px)] flex-1 flex-col divide-y divide-theme-border-moderate xl:flex-row-reverse xl:divide-x xl:divide-y-0 xl:divide-x-reverse",children:[e.jsx($,{className:"h-full flex-1 bg-theme-surface-primary",children:e.jsx(qe,{})}),e.jsx($,{children:e.jsx(Re,{})})]})})})}function $({className:t,...s}){return e.jsx("div",{className:le("w-full overflow-y-auto xl:w-1/2",t),...s})}export{Tt as default};
@@ -1 +1 @@
1
- import{j as e}from"./@radix-Cdvw4jJ8.js";import{b as t,B as a,r as n}from"./index-BgEfQ3_G.js";import{L as i}from"./@react-router-DeDfXbUF.js";import"./@tanstack-5gTMR7G2.js";import"./@reactflow-B_iCtR7X.js";const l="/assets/templates-1S_8WeSK.webp",o=["Run pipelines from the dashboard with Templates","Re-run a pipeline easily from the UI","Model and Artifact Control Plane Dashboard","Managed ZenML server on your VPC or hosted on our servers","Social SSO, RBAC, and User Management","CI/CD/CT, and more!"];function m(){return e.jsxs(t,{className:"relative overflow-hidden border border-warning-100 px-7 py-5",children:[e.jsxs("div",{className:"max-w-[450px] space-y-4",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Access Advanced Template Features with ZenML Pro"}),e.jsx("ul",{className:"space-y-2",children:o.map((r,s)=>e.jsx("li",{className:"text-text-md text-theme-text-secondary",children:r},s))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(a,{asChild:!0,className:"truncate bg-warning-600 hover:bg-warning-400 active:bg-warning-500 active:ring-warning-50",size:"md",children:e.jsx(i,{to:n.upgrade,children:"Try Pro Features"})}),e.jsx(a,{emphasis:"minimal",size:"md",children:e.jsx("a",{href:"https://www.zenml.io/pro",target:"_blank",rel:"noopener noreferrer",children:"Learn more"})})]})]}),e.jsx("img",{className:"absolute right-0 top-0 hidden translate-x-[30%] scale-75 md:translate-y-[30%] lg:block xl:-translate-y-[5%]",src:l,alt:"Screenshot of Zenml Pro Templates Feature"})]})}function u(){return e.jsx("div",{className:"layout-container space-y-5 pt-5",children:e.jsx(m,{})})}export{u as default};
1
+ import{j as e}from"./@radix-C_LirfyT.js";import{j as t,B as a,r as n}from"./index-BacoJBEQ.js";import{L as i}from"./@react-router-BSsrkPOd.js";import"./@tanstack-C0SeHZng.js";import"./@reactflow-D9hglKLF.js";const l="/assets/templates-1S_8WeSK.webp",o=["Run pipelines from the dashboard with Templates","Re-run a pipeline easily from the UI","Model and Artifact Control Plane Dashboard","Managed ZenML server on your VPC or hosted on our servers","Social SSO, RBAC, and User Management","CI/CD/CT, and more!"];function m(){return e.jsxs(t,{className:"relative overflow-hidden border border-warning-100 px-7 py-5",children:[e.jsxs("div",{className:"max-w-[450px] space-y-4",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Access Advanced Template Features with ZenML Pro"}),e.jsx("ul",{className:"space-y-2",children:o.map((r,s)=>e.jsx("li",{className:"text-text-md text-theme-text-secondary",children:r},s))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(a,{asChild:!0,className:"truncate bg-warning-600 hover:bg-warning-400 active:bg-warning-500 active:ring-warning-50",size:"md",children:e.jsx(i,{to:n.upgrade,children:"Try Pro Features"})}),e.jsx(a,{emphasis:"minimal",size:"md",children:e.jsx("a",{href:"https://www.zenml.io/pro",target:"_blank",rel:"noopener noreferrer",children:"Learn more"})})]})]}),e.jsx("img",{className:"absolute right-0 top-0 hidden translate-x-[30%] scale-75 md:translate-y-[30%] lg:block xl:-translate-y-[5%]",src:l,alt:"Screenshot of Zenml Pro Templates Feature"})]})}function u(){return e.jsx("div",{className:"layout-container space-y-5 pt-5",children:e.jsx(m,{})})}export{u as default};