zenml-nightly 0.68.1.dev20241106__py3-none-any.whl → 0.70.0.dev20241116__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.
- README.md +1 -1
- RELEASE_NOTES.md +77 -0
- zenml/VERSION +1 -1
- zenml/__init__.py +2 -0
- zenml/artifacts/external_artifact.py +2 -1
- zenml/artifacts/utils.py +138 -79
- zenml/cli/base.py +4 -4
- zenml/cli/model.py +1 -6
- zenml/cli/stack.py +1 -0
- zenml/client.py +29 -74
- zenml/config/server_config.py +17 -1
- zenml/constants.py +2 -7
- zenml/data_validators/base_data_validator.py +2 -2
- zenml/enums.py +20 -4
- zenml/exceptions.py +4 -0
- zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +20 -18
- zenml/integrations/azure/orchestrators/azureml_orchestrator.py +1 -1
- zenml/integrations/deepchecks/data_validators/deepchecks_data_validator.py +1 -1
- zenml/integrations/evidently/__init__.py +1 -1
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +1 -1
- zenml/integrations/lightning/orchestrators/lightning_orchestrator.py +29 -9
- zenml/integrations/tensorboard/visualizers/tensorboard_visualizer.py +60 -54
- zenml/integrations/vllm/services/vllm_deployment.py +16 -7
- zenml/metadata/lazy_load.py +20 -7
- zenml/model/model.py +17 -64
- zenml/model/utils.py +5 -0
- zenml/models/__init__.py +0 -12
- zenml/models/v2/base/filter.py +121 -8
- zenml/models/v2/core/artifact_version.py +42 -7
- zenml/models/v2/core/model_version.py +26 -5
- zenml/models/v2/core/pipeline_run.py +25 -6
- zenml/models/v2/core/run_metadata.py +2 -217
- zenml/models/v2/core/step_run.py +62 -24
- zenml/orchestrators/base_orchestrator.py +12 -1
- zenml/orchestrators/input_utils.py +44 -19
- zenml/orchestrators/step_launcher.py +4 -3
- zenml/orchestrators/step_run_utils.py +19 -15
- zenml/orchestrators/step_runner.py +21 -13
- zenml/orchestrators/utils.py +45 -26
- zenml/stack_deployments/aws_stack_deployment.py +23 -6
- zenml/stack_deployments/azure_stack_deployment.py +28 -5
- zenml/stack_deployments/gcp_stack_deployment.py +25 -8
- zenml/stack_deployments/stack_deployment.py +3 -5
- zenml/steps/base_step.py +1 -1
- zenml/steps/entrypoint_function_utils.py +3 -5
- zenml/steps/step_context.py +3 -2
- zenml/steps/utils.py +13 -2
- zenml/utils/metadata_utils.py +335 -0
- zenml/zen_server/auth.py +221 -3
- zenml/zen_server/cache.py +208 -0
- zenml/zen_server/dashboard/assets/{404-DT4QRUqN.js → 404-NVXKFp-x.js} +1 -1
- zenml/zen_server/dashboard/assets/{@radix-DP6vWzyx.js → @radix-DeK6qiuw.js} +1 -1
- zenml/zen_server/dashboard/assets/{@react-router-BMhZulnd.js → @react-router-B3Z5rLr2.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-8U9qNlMR.js → @reactflow-CK0KJUen.js} +2 -2
- zenml/zen_server/dashboard/assets/{@tanstack-BUCbhJyH.js → @tanstack-DT5WLu9C.js} +1 -1
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-DezXKmDf.js +1 -0
- zenml/zen_server/dashboard/assets/{CodeSnippet-CqybNv0k.js → CodeSnippet-JzR8CEtw.js} +2 -2
- zenml/zen_server/dashboard/assets/{CollapsibleCard-0r_8G2Lj.js → CollapsibleCard-DQW_ktMO.js} +1 -1
- zenml/zen_server/dashboard/assets/{Commands-BDjgBQKi.js → Commands-DL2kwkRd.js} +1 -1
- zenml/zen_server/dashboard/assets/ComponentBadge-D_g62Wv8.js +1 -0
- zenml/zen_server/dashboard/assets/{CopyButton-C745BrKi.js → CopyButton-LNcWaa14.js} +1 -1
- zenml/zen_server/dashboard/assets/{CsvVizualization-PpAq0CeZ.js → CsvVizualization-DknpE5ej.js} +5 -5
- zenml/zen_server/dashboard/assets/{DialogItem-DcVCZEew.js → DialogItem-Bxf8FuAT.js} +1 -1
- zenml/zen_server/dashboard/assets/{DisplayDate-BeXgUG_C.js → DisplayDate-CDMUcQHS.js} +1 -1
- zenml/zen_server/dashboard/assets/{EmptyState-DeK7H4pr.js → EmptyState-BzdlCwp3.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-BMlzibXj.js → Error-DYflYyps.js} +1 -1
- zenml/zen_server/dashboard/assets/ExecutionStatus-C7zyIQKZ.js +1 -0
- zenml/zen_server/dashboard/assets/{Helpbox-BLf40fLV.js → Helpbox-oYSGpLqd.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-BwisKifi.js → Infobox-Cx4xGoXR.js} +1 -1
- zenml/zen_server/dashboard/assets/{InlineAvatar-jEgodSgX.js → InlineAvatar-DiGOWNKF.js} +1 -1
- zenml/zen_server/dashboard/assets/{Lock-3lLt1ih0.js → Lock-CYYy18Mm.js} +1 -1
- zenml/zen_server/dashboard/assets/{MarkdownVisualization-8O9kTr-2.js → MarkdownVisualization-ylXaAxev.js} +1 -1
- zenml/zen_server/dashboard/assets/NestedCollapsible-DYbgyKxK.js +1 -0
- zenml/zen_server/dashboard/assets/{NumberBox-T9eELfLZ.js → NumberBox-Dtp3J6g5.js} +1 -1
- zenml/zen_server/dashboard/assets/Partials-03iZf8-N.js +1 -0
- zenml/zen_server/dashboard/assets/{PasswordChecker-CW0kqY0W.js → PasswordChecker-B0nadgh6.js} +1 -1
- zenml/zen_server/dashboard/assets/ProBadge-D_EB8HNo.js +1 -0
- zenml/zen_server/dashboard/assets/ProCta-DqNS4v3x.js +1 -0
- zenml/zen_server/dashboard/assets/ProviderIcon-Bki2aw8w.js +1 -0
- zenml/zen_server/dashboard/assets/{ProviderRadio-BROY1700.js → ProviderRadio-8f43sPD4.js} +1 -1
- zenml/zen_server/dashboard/assets/RunSelector-DkPiIiNr.js +1 -0
- zenml/zen_server/dashboard/assets/RunsBody-07YEO7qI.js +1 -0
- zenml/zen_server/dashboard/assets/SearchField-lp1KgU4e.js +1 -0
- zenml/zen_server/dashboard/assets/{SecretTooltip-C_qByGWB.js → SecretTooltip-CgnbyeOx.js} +1 -1
- zenml/zen_server/dashboard/assets/{SetPassword-7pRB00El.js → SetPassword-CpP418A2.js} +1 -1
- zenml/zen_server/dashboard/assets/StackList-WvuKQusZ.js +1 -0
- zenml/zen_server/dashboard/assets/Tabs-BktHkCJJ.js +1 -0
- zenml/zen_server/dashboard/assets/Tick-BlMoIlJT.js +1 -0
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DckMEkFf.js → UpdatePasswordSchemas-Sc0A0pP-.js} +1 -1
- zenml/zen_server/dashboard/assets/{UsageReason-DVceN14P.js → UsageReason-YYduL4fj.js} +1 -1
- zenml/zen_server/dashboard/assets/{WizardFooter-CW0Cvd70.js → WizardFooter-dgmizSJC.js} +1 -1
- zenml/zen_server/dashboard/assets/all-pipeline-runs-query-D-c2G6lV.js +1 -0
- zenml/zen_server/dashboard/assets/check-DloQpStc.js +1 -0
- zenml/zen_server/dashboard/assets/{check-circle-Dwxliy1Z.js → check-circle-jNbX5-sR.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-down-8wLBS5pQ.js → chevron-down-6JyMkfjR.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-right-double-DoD8iXWM.js → chevron-right-double-D7ojK9Co.js} +1 -1
- zenml/zen_server/dashboard/assets/{code-browser-CZUQs3Wa.js → code-browser-CUFUIHfp.js} +1 -1
- zenml/zen_server/dashboard/assets/{copy-CaSMXwiU.js → copy-C8XQA2Ug.js} +1 -1
- zenml/zen_server/dashboard/assets/create-stack-DM_JPgef.js +1 -0
- zenml/zen_server/dashboard/assets/delete-run-CJdh1P_h.js +1 -0
- zenml/zen_server/dashboard/assets/{docker-BFNgg-z3.js → docker-BdA9vrnW.js} +1 -1
- zenml/zen_server/dashboard/assets/{dots-horizontal-DK5Duzx4.js → dots-horizontal-otGBOSDJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{form-schemas-1AyOCx90.js → form-schemas-K6FYKjwa.js} +1 -1
- zenml/zen_server/dashboard/assets/{gcp-7M2Yf3ZK.js → gcp-CFtm4BA7.js} +1 -1
- zenml/zen_server/dashboard/assets/{help-Dam461dC.js → help-Cc9bBIJH.js} +1 -1
- zenml/zen_server/dashboard/assets/index-B1mVPYxf.js +1 -0
- zenml/zen_server/dashboard/assets/index-BAkC7FXi.js +1 -0
- zenml/zen_server/dashboard/assets/{index-QQb7wQEC.js → index-CCOPpudF.js} +8 -8
- zenml/zen_server/dashboard/assets/index-CEV4Cvaf.js +1 -0
- zenml/zen_server/dashboard/assets/index-DlGvJQPn.css +1 -0
- zenml/zen_server/dashboard/assets/{index-BVJ8n2-j.js → index-Uu49AX48.js} +1 -1
- zenml/zen_server/dashboard/assets/{index.esm-cuVep_NJ.js → index.esm-Dy6Z9Ung.js} +1 -1
- zenml/zen_server/dashboard/assets/{kubernetes--g7r02Zu.js → kubernetes-B2wmAJ1d.js} +1 -1
- zenml/zen_server/dashboard/assets/{layout-DCSYN7-C.js → layout-BtHBmE4w.js} +1 -1
- zenml/zen_server/dashboard/assets/{link-external-CBEk6kEG.js → link-external-b9AXw_sW.js} +1 -1
- zenml/zen_server/dashboard/assets/{login-mutation-DTcAFP1l.js → login-mutation-hf-lK87O.js} +1 -1
- zenml/zen_server/dashboard/assets/{logs-D5bdJGur.js → logs-WMSM52RF.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-Cc-JkRH2.js → not-found-BGirLjU-.js} +1 -1
- zenml/zen_server/dashboard/assets/{package-Cs35Szwh.js → package-C6uypY4h.js} +1 -1
- zenml/zen_server/dashboard/assets/page-0JE_-Ec1.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DH_Z7iW1.js → page-6m6yHHlE.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BDigxVpo.js +1 -0
- zenml/zen_server/dashboard/assets/page-BR68V0V1.js +1 -0
- zenml/zen_server/dashboard/assets/page-BRLpxOt0.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BQQKaabe.js → page-BU7huvKw.js} +3 -3
- zenml/zen_server/dashboard/assets/page-BvqLv2Ky.js +1 -0
- zenml/zen_server/dashboard/assets/page-C00YAkaB.js +1 -0
- zenml/zen_server/dashboard/assets/{page-N4qoPHKb.js → page-CD-DcWoy.js} +1 -1
- zenml/zen_server/dashboard/assets/page-COXXJj1k.js +1 -0
- zenml/zen_server/dashboard/assets/page-CbpvrsDL.js +1 -0
- zenml/zen_server/dashboard/assets/page-CdMWnQak.js +1 -0
- zenml/zen_server/dashboard/assets/{page-ClUVkl-O.js → page-CjGdWY13.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CwxrFarU.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DLixvR-7.js → page-D01JhjQB.js} +1 -1
- zenml/zen_server/dashboard/assets/page-D6uU2ax4.js +1 -0
- zenml/zen_server/dashboard/assets/page-D7S3aCbF.js +1 -0
- zenml/zen_server/dashboard/assets/{page-9yplj5JT.js → page-DLC-bNBP.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DXSTpqRD.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DzpVUZ8f.js → page-DakHVWXF.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DIOXwhiD.js → page-Df-Fw0aq.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B-y2XKIc.js → page-DfbXf_8s.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DjRJCGb3.js +1 -0
- zenml/zen_server/dashboard/assets/{page-C0N5q3l7.js → page-Djikxq_S.js} +1 -1
- zenml/zen_server/dashboard/assets/page-Dnovpa0i.js +3 -0
- zenml/zen_server/dashboard/assets/page-Dot3LPmL.js +1 -0
- zenml/zen_server/dashboard/assets/page-Vcxara9U.js +1 -0
- zenml/zen_server/dashboard/assets/page-Xynx4btY.js +14 -0
- zenml/zen_server/dashboard/assets/page-YpKAqVSa.js +1 -0
- zenml/zen_server/dashboard/assets/page-yYC9OI-E.js +1 -0
- zenml/zen_server/dashboard/assets/{persist-DNb5cdrU.js → persist-Coz7ZWvz.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-CP0JmYZ4.js → persist-GjC8PZoC.js} +1 -1
- zenml/zen_server/dashboard/assets/{plus-C9IxgN2M.js → plus-tf1V2hTJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{refresh-BVu22P_C.js → refresh-BjOeWlEq.js} +1 -1
- zenml/zen_server/dashboard/assets/{rocket-CONEmRmB.js → rocket-DjT2cDvG.js} +1 -1
- zenml/zen_server/dashboard/assets/sharedSchema-CQb14VSr.js +14 -0
- zenml/zen_server/dashboard/assets/stack-detail-query-OPEW-cDJ.js +1 -0
- zenml/zen_server/dashboard/assets/{tick-circle-CM1ZScbQ.js → tick-circle-BEX_Tp4v.js} +1 -1
- zenml/zen_server/dashboard/assets/{trash-DkJHMOg7.js → trash-arLUMWMS.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-DsU8cNVl.js → update-server-settings-mutation-LwuQfHYn.js} +1 -1
- zenml/zen_server/dashboard/assets/upgrade-form-CwRHBuXB.webp +0 -0
- zenml/zen_server/dashboard/assets/url-CkvKAnwF.js +1 -0
- zenml/zen_server/dashboard/assets/{zod-D89GC_vc.js → zod-BwEbpOxH.js} +1 -1
- zenml/zen_server/dashboard/index.html +7 -7
- zenml/zen_server/deploy/helm/Chart.yaml +1 -1
- zenml/zen_server/deploy/helm/README.md +2 -2
- zenml/zen_server/exceptions.py +2 -0
- zenml/zen_server/jwt.py +30 -13
- zenml/zen_server/rbac/endpoint_utils.py +43 -1
- zenml/zen_server/rbac/utils.py +0 -2
- zenml/zen_server/routers/artifact_version_endpoints.py +27 -1
- zenml/zen_server/routers/auth_endpoints.py +134 -102
- zenml/zen_server/routers/logs_endpoints.py +66 -0
- zenml/zen_server/routers/workspaces_endpoints.py +3 -4
- zenml/zen_server/template_execution/utils.py +14 -16
- zenml/zen_server/utils.py +27 -0
- zenml/zen_server/zen_server_api.py +6 -3
- zenml/zen_stores/migrations/versions/0.70.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/1cb6477f72d6_move_artifact_save_type.py +99 -0
- zenml/zen_stores/migrations/versions/904464ea4041_add_pipeline_model_run_unique_constraints.py +192 -0
- zenml/zen_stores/migrations/versions/b557b2871693_update_step_run_input_types.py +33 -0
- zenml/zen_stores/rest_zen_store.py +68 -64
- zenml/zen_stores/schemas/artifact_schemas.py +8 -1
- zenml/zen_stores/schemas/model_schemas.py +27 -3
- zenml/zen_stores/schemas/pipeline_run_schemas.py +6 -1
- zenml/zen_stores/schemas/pipeline_schemas.py +8 -2
- zenml/zen_stores/schemas/run_metadata_schemas.py +1 -48
- zenml/zen_stores/schemas/step_run_schemas.py +18 -10
- zenml/zen_stores/sql_zen_store.py +283 -219
- zenml/zen_stores/zen_store_interface.py +15 -42
- {zenml_nightly-0.68.1.dev20241106.dist-info → zenml_nightly-0.70.0.dev20241116.dist-info}/METADATA +2 -2
- {zenml_nightly-0.68.1.dev20241106.dist-info → zenml_nightly-0.70.0.dev20241116.dist-info}/RECORD +194 -179
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-C6N2rGrB.js +0 -1
- zenml/zen_server/dashboard/assets/ComponentBadge-DUiEYJHu.js +0 -1
- zenml/zen_server/dashboard/assets/ComponentFallbackDialog-BFoH5K4V.js +0 -1
- zenml/zen_server/dashboard/assets/ComponentIcon-CAIoUis2.js +0 -1
- zenml/zen_server/dashboard/assets/Partials-YPBB3V4q.js +0 -1
- zenml/zen_server/dashboard/assets/ProviderIcon-Bb3Xha5A.js +0 -1
- zenml/zen_server/dashboard/assets/RunSelector-DCiL3M1c.js +0 -1
- zenml/zen_server/dashboard/assets/SearchField-DfUiGFVd.js +0 -1
- zenml/zen_server/dashboard/assets/Tick-CykQFPj2.js +0 -1
- zenml/zen_server/dashboard/assets/cloud-only-B-s_HMDm.js +0 -1
- zenml/zen_server/dashboard/assets/codespaces-BitYDX9d.gif +0 -0
- zenml/zen_server/dashboard/assets/create-stack-CEmaPZ4c.js +0 -1
- zenml/zen_server/dashboard/assets/delete-run-D-LKbGyz.js +0 -1
- zenml/zen_server/dashboard/assets/index-Bpmj40BI.js +0 -1
- zenml/zen_server/dashboard/assets/index-CbU4Ln_E.css +0 -1
- zenml/zen_server/dashboard/assets/index-DKPhqP2B.js +0 -1
- zenml/zen_server/dashboard/assets/page-BBpOxVcY.js +0 -1
- zenml/zen_server/dashboard/assets/page-BRInM1Lg.js +0 -1
- zenml/zen_server/dashboard/assets/page-BjjlMk7s.js +0 -1
- zenml/zen_server/dashboard/assets/page-Bvd7YH2A.js +0 -1
- zenml/zen_server/dashboard/assets/page-CT3Nep8W.js +0 -1
- zenml/zen_server/dashboard/assets/page-C_f47pBf.js +0 -1
- zenml/zen_server/dashboard/assets/page-Cmv8C_yM.js +0 -3
- zenml/zen_server/dashboard/assets/page-CyN2bdWG.js +0 -1
- zenml/zen_server/dashboard/assets/page-CzzXH4fs.js +0 -1
- zenml/zen_server/dashboard/assets/page-DTlGjgnG.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dbpl86h0.js +0 -1
- zenml/zen_server/dashboard/assets/page-Ddgy6kDS.js +0 -1
- zenml/zen_server/dashboard/assets/page-DtCAfBLy.js +0 -9
- zenml/zen_server/dashboard/assets/page-Dx16z7nA.js +0 -1
- zenml/zen_server/dashboard/assets/page-McUyYbo1.js +0 -1
- zenml/zen_server/dashboard/assets/page-T1P3RyAR.js +0 -1
- zenml/zen_server/dashboard/assets/page-bKaULTGG.js +0 -1
- zenml/zen_server/dashboard/assets/page-sbXUJy9t.js +0 -1
- zenml/zen_server/dashboard/assets/sharedSchema-TMLu-nYQ.js +0 -14
- zenml/zen_server/dashboard/assets/stack-detail-query-xmYxSsUY.js +0 -1
- zenml/zen_server/dashboard/assets/url-D5le3J4q.js +0 -1
- zenml/zen_server/routers/run_metadata_endpoints.py +0 -96
- {zenml_nightly-0.68.1.dev20241106.dist-info → zenml_nightly-0.70.0.dev20241116.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.68.1.dev20241106.dist-info → zenml_nightly-0.70.0.dev20241116.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.68.1.dev20241106.dist-info → zenml_nightly-0.70.0.dev20241116.dist-info}/entry_points.txt +0 -0
@@ -1,9 +0,0 @@
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CsvVizualization-PpAq0CeZ.js","assets/@radix-DP6vWzyx.js","assets/index-QQb7wQEC.js","assets/@tanstack-BUCbhJyH.js","assets/@react-router-BMhZulnd.js","assets/@reactflow-8U9qNlMR.js","assets/@reactflow-C26Olbza.css","assets/index-CbU4Ln_E.css","assets/MarkdownVisualization-8O9kTr-2.js"])))=>i.map(i=>d[i]);
|
2
|
-
var as=Object.defineProperty;var is=(e,t,r)=>t in e?as(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var w=(e,t,r)=>is(e,typeof t!="symbol"?t+"":t,r);import{r as x,j as s,g as ls}from"./@radix-DP6vWzyx.js";import{O as Ve,k as ge,n as Oe,F as ee,l as ne,m as ae,Q as Jt,S as g,T as F,v as z,w as B,x as H,y as T,r as _e,t as rt,R as er,_ as tr,j as he,f as k,U as st,V as rr,e as xe,H as nt,J as at,K as L,W as fe,X as it,L as S,Y as sr,Z as nr,$ as ar,a0 as je,a1 as be,a2 as Ce,a3 as ye,a4 as os,a5 as cs,B as ir,A as ds,b as us,a6 as lt,a7 as hs,a8 as fs,a9 as ms,aa as ps,ab as xs,ac as lr,ad as gs,ae as js,af as bs,i as Cs,o as ys,D as Nt,q as vs,s as ws,ag as Ns,N as Es,P as _s,E as ks,z as Et,c as Os,ah as Ls,ai as Ss}from"./index-QQb7wQEC.js";import{S as Ts,a as Is}from"./ComponentIcon-CAIoUis2.js";import{S as or}from"./chevron-right-double-DoD8iXWM.js";import{a as te,c as cr,q as $s}from"./@tanstack-BUCbhJyH.js";import{E as ie}from"./Error-BMlzibXj.js";import{D as ke}from"./DisplayDate-BeXgUG_C.js";import{b as Ae,E as ce,c as dr,u as Ps,D as Ms,a as Rs,g as Ds}from"./delete-run-D-LKbGyz.js";import{I as ot}from"./InlineAvatar-jEgodSgX.js";import{L as Ie,g as P,b as ct,c as ur}from"./@react-router-BMhZulnd.js";import{C as I}from"./CodeSnippet-CqybNv0k.js";import{C as $}from"./CollapsibleCard-0r_8G2Lj.js";import{E as A}from"./EmptyState-DeK7H4pr.js";import{s as hr}from"./url-D5le3J4q.js";import{I as Le}from"./Infobox-BwisKifi.js";import{H as _t,P as kt,u as dt,a as fr,b as Vs,g as As,p as Fs,S as zs,B as Bs,c as Hs,d as Gs,e as Zs}from"./@reactflow-8U9qNlMR.js";import{S as qs}from"./plus-C9IxgN2M.js";import{S as Ws}from"./refresh-BVu22P_C.js";import{S as Ks}from"./code-browser-CZUQs3Wa.js";import{S as mr}from"./logs-D5bdJGur.js";import{S as ve}from"./chevron-down-8wLBS5pQ.js";import{S as Us}from"./docker-BFNgg-z3.js";import{C as Y}from"./CopyButton-C745BrKi.js";import{C as Ys}from"./ComponentBadge-DUiEYJHu.js";import{u as pr}from"./stack-detail-query-xmYxSsUY.js";import{S as Qs}from"./dots-horizontal-DK5Duzx4.js";import{S as Xs}from"./trash-DkJHMOg7.js";import{S as Js}from"./tick-circle-CM1ZScbQ.js";import"./layout-DCSYN7-C.js";import"./rocket-CONEmRmB.js";import"./zod-D89GC_vc.js";import"./index.esm-cuVep_NJ.js";import"./check-circle-Dwxliy1Z.js";import"./copy-CaSMXwiU.js";const en=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.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"})),tn=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.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"})),rn=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.77687 1.00001C2.78469 1.00001 2.79241 1.00001 2.80001 1.00001H6.20001C6.20762 1.00001 6.21533 1.00001 6.22315 1.00001C6.34227 0.999961 6.48452 0.999906 6.60984 1.01015C6.75506 1.02201 6.96305 1.05245 7.181 1.1635C7.46324 1.30731 7.69271 1.53678 7.83652 1.81903C7.94757 2.03697 7.97801 2.24496 7.98988 2.39018C8.00012 2.5155 8.00006 2.65776 8.00002 2.77687C8.00001 2.78469 8.00001 2.79241 8.00001 2.80001V6.20001C8.00001 6.20762 8.00001 6.21533 8.00002 6.22315C8.00006 6.34227 8.00012 6.48452 7.98988 6.60984C7.97801 6.75506 7.94757 6.96305 7.83652 7.181C7.69271 7.46324 7.46324 7.69271 7.181 7.83652C6.96305 7.94757 6.75506 7.97801 6.60984 7.98988C6.48452 8.00012 6.34227 8.00006 6.22315 8.00002C6.21533 8.00001 6.20762 8.00001 6.20001 8.00001H2.80001C2.79241 8.00001 2.78469 8.00001 2.77687 8.00002C2.65776 8.00006 2.5155 8.00012 2.39018 7.98988C2.24496 7.97801 2.03697 7.94757 1.81903 7.83652C1.53678 7.69271 1.30731 7.46324 1.1635 7.181C1.05245 6.96305 1.02201 6.75506 1.01015 6.60984C0.999906 6.48452 0.999961 6.34227 1.00001 6.22315C1.00001 6.21533 1.00001 6.20762 1.00001 6.20001V2.80001C1.00001 2.79241 1.00001 2.78469 1.00001 2.77687C0.999961 2.65776 0.999906 2.5155 1.01015 2.39018C1.02201 2.24496 1.05245 2.03697 1.1635 1.81903C1.30731 1.53678 1.53678 1.30731 1.81903 1.1635C2.03697 1.05245 2.24496 1.02201 2.39018 1.01015C2.5155 0.999906 2.65776 0.999961 2.77687 1.00001ZM3.00001 3.00001V6.00001H6.00001V3.00001H3.00001ZM19.5322 5.52394C19.2488 5.50079 18.8766 5.50001 18.3 5.50001H11C10.4477 5.50001 10 5.0523 10 4.50001C10 3.94773 10.4477 3.50001 11 3.50001L18.3386 3.50001C18.8657 3.49999 19.3205 3.49998 19.695 3.53058C20.0904 3.56288 20.4836 3.6342 20.862 3.82699C21.4265 4.11461 21.8854 4.57356 22.173 5.13804C22.3658 5.51642 22.4371 5.90964 22.4694 6.30498C22.5 6.67955 22.5 7.13431 22.5 7.66145V9.032C22.5 9.47065 22.5 9.84914 22.4787 10.1624C22.4562 10.4922 22.4067 10.8221 22.2717 11.1481C21.9672 11.8832 21.3831 12.4672 20.6481 12.7717C20.3221 12.9067 19.9922 12.9562 19.6624 12.9787C19.3491 13 18.9706 13 18.532 13H18.5C17.9477 13 17.5 12.5523 17.5 12C17.5 11.4477 17.9477 11 18.5 11C18.9796 11 19.2893 10.9995 19.5263 10.9833C19.7542 10.9677 19.8411 10.9411 19.8827 10.9239C20.1277 10.8224 20.3224 10.6277 20.4239 10.3827C20.4411 10.3411 20.4677 10.2543 20.4833 10.0263C20.4995 9.78927 20.5 9.47964 20.5 9.00001V7.70001C20.5 7.12346 20.4992 6.75118 20.4761 6.46785C20.4539 6.19618 20.4162 6.09547 20.391 6.04602C20.2951 5.85786 20.1422 5.70488 19.954 5.60901C19.9046 5.58381 19.8038 5.54613 19.5322 5.52394ZM10.2769 8.50001C10.2847 8.50001 10.2924 8.50001 10.3 8.50001H13.7C13.7076 8.50001 13.7153 8.50001 13.7232 8.50001C13.8423 8.49996 13.9845 8.49991 14.1098 8.51015C14.2551 8.52201 14.4631 8.55245 14.681 8.6635C14.9632 8.80731 15.1927 9.03678 15.3365 9.31903C15.4476 9.53697 15.478 9.74496 15.4899 9.89018C15.5001 10.0155 15.5001 10.1578 15.5 10.2769C15.5 10.2847 15.5 10.2924 15.5 10.3V13.7C15.5 13.7076 15.5 13.7153 15.5 13.7231C15.5001 13.8423 15.5001 13.9845 15.4899 14.1098C15.478 14.2551 15.4476 14.4631 15.3365 14.681C15.1927 14.9632 14.9632 15.1927 14.681 15.3365C14.4631 15.4476 14.2551 15.478 14.1098 15.4899C13.9845 15.5001 13.8423 15.5001 13.7231 15.5C13.7153 15.5 13.7076 15.5 13.7 15.5H10.3C10.2924 15.5 10.2847 15.5 10.2769 15.5C10.1578 15.5001 10.0155 15.5001 9.89018 15.4899C9.74496 15.478 9.53697 15.4476 9.31903 15.3365C9.03678 15.1927 8.80731 14.9632 8.6635 14.681C8.55245 14.4631 8.52201 14.2551 8.51015 14.1098C8.49991 13.9845 8.49996 13.8423 8.50001 13.7232C8.50001 13.7153 8.50001 13.7076 8.50001 13.7V10.3C8.50001 10.2924 8.50001 10.2847 8.50001 10.2769C8.49996 10.1578 8.49991 10.0155 8.51015 9.89018C8.52201 9.74496 8.55245 9.53697 8.6635 9.31903C8.80731 9.03678 9.03678 8.80731 9.31903 8.6635C9.53697 8.55245 9.74496 8.52201 9.89018 8.51015C10.0155 8.49991 10.1578 8.49996 10.2769 8.50001ZM10.5 10.5V13.5H13.5V10.5H10.5ZM5.46802 11H5.50001C6.0523 11 6.50001 11.4477 6.50001 12C6.50001 12.5523 6.0523 13 5.50001 13C5.02039 13 4.71075 13.0006 4.47377 13.0167C4.24577 13.0323 4.15894 13.0589 4.11733 13.0761C3.8723 13.1776 3.67763 13.3723 3.57613 13.6173C3.5589 13.6589 3.53228 13.7458 3.51672 13.9738C3.50055 14.2108 3.50001 14.5204 3.50001 15V16.3C3.50001 16.8766 3.50079 17.2488 3.52394 17.5322C3.54614 17.8038 3.58381 17.9046 3.60901 17.954C3.70488 18.1422 3.85786 18.2951 4.04602 18.391C4.09547 18.4162 4.19618 18.4539 4.46785 18.4761C4.75119 18.4992 5.12346 18.5 5.70001 18.5H13C13.5523 18.5 14 18.9477 14 19.5C14 20.0523 13.5523 20.5 13 20.5H5.66145C5.13431 20.5 4.67955 20.5 4.30498 20.4694C3.90964 20.4371 3.51642 20.3658 3.13804 20.173C2.57356 19.8854 2.11461 19.4265 1.82699 18.862C1.6342 18.4836 1.56288 18.0904 1.53058 17.695C1.49998 17.3205 1.49999 16.8657 1.50001 16.3386L1.50001 14.968C1.5 14.5294 1.49999 14.1509 1.52136 13.8376C1.54387 13.5078 1.59337 13.1779 1.72837 12.852C2.03286 12.1169 2.61688 11.5329 3.35196 11.2284C3.67789 11.0934 4.0078 11.0439 4.33763 11.0214C4.65089 11 5.02937 11 5.46802 11ZM17.7769 16H21.2231C21.3423 16 21.4845 15.9999 21.6098 16.0101C21.7551 16.022 21.9631 16.0525 22.181 16.1635C22.4632 16.3073 22.6927 16.5368 22.8365 16.819C22.9476 17.037 22.978 17.245 22.9899 17.3902C23.0001 17.5155 23.0001 17.6577 23 17.7769C23 17.7847 23 17.7924 23 17.8V21.2C23 21.2076 23 21.2153 23 21.2232C23.0001 21.3423 23.0001 21.4845 22.9899 21.6098C22.978 21.7551 22.9476 21.9631 22.8365 22.181C22.6927 22.4632 22.4632 22.6927 22.181 22.8365C21.9631 22.9476 21.7551 22.978 21.6098 22.9899C21.4845 23.0001 21.3423 23.0001 21.2232 23C21.2153 23 21.2076 23 21.2 23H17.8C17.7924 23 17.7847 23 17.7769 23C17.6577 23.0001 17.5155 23.0001 17.3902 22.9899C17.245 22.978 17.037 22.9476 16.819 22.8365C16.5368 22.6927 16.3073 22.4632 16.1635 22.181C16.0525 21.9631 16.022 21.7551 16.0101 21.6098C15.9999 21.4845 16 21.3423 16 21.2231V17.7769C16 17.6578 15.9999 17.5155 16.0101 17.3902C16.022 17.245 16.0525 17.037 16.1635 16.819C16.3073 16.5368 16.5368 16.3073 16.819 16.1635C17.037 16.0525 17.245 16.022 17.3902 16.0101C17.5155 15.9999 17.6578 16 17.7769 16ZM18 18V21H21V18H18Z"})),Ot=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.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 xr({artifactType:e,className:t}){switch(e){case"DataAnalysisArtifact":return s.jsx(tn,{className:t});case"DataArtifact":return s.jsx(Is,{className:t});case"ModelArtifact":return s.jsx(rn,{className:t});case"SchemaArtifact":return s.jsx(Ts,{className:t});case"ServiceArtifact":return s.jsx(Ot,{className:t});case"StatisticsArtifact":return s.jsx(Ot,{className:t});default:return s.jsx(Ve,{className:t})}}const $e=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.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.03755ZM12 6C12.5523 6 13 6.44772 13 7V17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17V7C11 6.44772 11.4477 6 12 6ZM16 10C16.5523 10 17 10.4477 17 11V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V11C15 10.4477 15.4477 10 16 10ZM8 12C8.55229 12 9 12.4477 9 13V17C9 17.5523 8.55229 18 8 18C7.44772 18 7 17.5523 7 17V13C7 12.4477 7.44772 12 8 12Z"})),gr=x.createContext(null);function sn({children:e}){const[t,r]=x.useState(!1);return s.jsx(gr.Provider,{value:{isVisualizationConfirmed:t,setVisualizationConfirmed:r},children:e})}function nn(){const e=x.useContext(gr);if(!e)throw new Error("useArtifactLoadConfirmationContext must be used within a VisualizationConfirmProvider");return e}function an({versionId:e}){return["artifact_versions",e]}async function ln({versionId:e}){const t=ne(ae.artifactVersions.detail(e)),r=await ge(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&Oe(),!r.ok)throw new ee({message:`Error while fetching artifact version ${e}`,status:r.status,statusText:r.statusText});return r.json()}function we(e,t){return te({queryKey:an(e),queryFn:()=>ln(e),...t})}const on=x.createContext(null),Ze={didCatch:!1,error:null};class cn extends x.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Ze}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,a=arguments.length,i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:i,reason:"imperative-api"}),this.setState(Ze)}}componentDidCatch(t,r){var n,a;(n=(a=this.props).onError)===null||n===void 0||n.call(a,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:a}=this.props;if(n&&r.error!==null&&dn(t.resetKeys,a)){var i,l;(i=(l=this.props).onReset)===null||i===void 0||i.call(l,{next:a,prev:t.resetKeys,reason:"keys"}),this.setState(Ze)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:a}=this.props,{didCatch:i,error:l}=this.state;let o=t;if(i){const c={error:l,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")o=r(c);else if(n)o=x.createElement(n,c);else if(a!==void 0)o=a;else throw l}return x.createElement(on.Provider,{value:{didCatch:i,error:l,resetErrorBoundary:this.resetErrorBoundary}},o)}}function dn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}const un=e=>x.createElement("svg",{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 2.22222C5.70445 2.22222 2.22222 5.70445 2.22222 10C2.22222 14.2955 5.70445 17.7778 10 17.7778C14.2955 17.7778 17.7778 14.2955 17.7778 10C17.7778 5.70445 14.2955 2.22222 10 2.22222ZM0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10Z",fill:"#D1D5DB"}),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.7778 10C17.7778 5.70445 14.2955 2.22222 10 2.22222V0C15.5228 0 20 4.47715 20 10H17.7778Z",fill:"#7A3EF4"})),hn=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.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.03755ZM6.29289 8.29289C6.68342 7.90237 7.31658 7.90237 7.70711 8.29289L10.7071 11.2929C11.0976 11.6834 11.0976 12.3166 10.7071 12.7071L7.70711 15.7071C7.31658 16.0976 6.68342 16.0976 6.29289 15.7071C5.90237 15.3166 5.90237 14.6834 6.29289 14.2929L8.58579 12L6.29289 9.70711C5.90237 9.31658 5.90237 8.68342 6.29289 8.29289ZM12 15C12 14.4477 12.4477 14 13 14H17C17.5523 14 18 14.4477 18 15C18 15.5523 17.5523 16 17 16H13C12.4477 16 12 15.5523 12 15Z"}));function D({children:e,className:t,...r}){return s.jsx("dt",{...r,className:Jt("col-span-1 flex min-w-0 items-center truncate text-theme-text-secondary",t),children:e})}function V({children:e,className:t,...r}){return s.jsx("dd",{...r,className:Jt("col-span-2 flex h-6 w-full min-w-0 items-center truncate text-neutral-700",t),children:e})}function j({label:e,value:t}){return s.jsxs(s.Fragment,{children:[s.jsx(D,{children:e}),s.jsx(V,{children:t})]})}function fn({componentId:e}){return["components",e]}async function mn({componentId:e}){const t=ne(ae.components.detail(e)),r=await ge(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&Oe(),!r.ok)throw new ee({message:`Error while fetching component ${e}`,status:r.status,statusText:r.statusText});return r.json()}function pn(e,t){return te({queryKey:fn(e),queryFn:()=>mn(e),...t})}function xn({runId:e}){return["runs",e]}async function gn({runId:e}){const t=ne(ae.runs.detail(e)),r=await ge(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&Oe(),!r.ok)throw new ee({message:`Error while fetching pipeline run ${e}`,status:r.status,statusText:r.statusText});return r.json()}function M(e,t){return te({queryKey:xn(e),queryFn:()=>gn(e),...t})}function jn({stepId:e}){return["steps",e]}async function bn({stepId:e}){const t=ne(ae.steps.detail(e)),r=await ge(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&Oe(),!r.ok)throw new ee({message:`Error while fetching step ${e}`,status:r.status,statusText:r.statusText});return r.json()}function Ne(e,t){return te({queryKey:jn(e),queryFn:()=>bn(e),...t})}function Cn({artifactVersionId:e}){var a,i,l,o,c,d,u,h,m,f,p;const t=we({versionId:e}),r=(i=(a=t.data)==null?void 0:a.body)==null?void 0:i.producer_pipeline_run_id,n=(o=(l=t.data)==null?void 0:l.metadata)==null?void 0:o.producer_step_run_id;return t.isPending?s.jsx(g,{className:"h-[500px] w-full"}):t.isError?s.jsx(ie,{err:t.error}):s.jsx($,{initialOpen:!0,title:"Details",children:s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[r&&s.jsx(vn,{producerRunId:r}),n&&s.jsx(yn,{producerStepId:n}),s.jsx(j,{label:"Materializer",value:s.jsx(F,{children:s.jsxs(z,{children:[s.jsx(B,{className:"cursor-default",children:(c=t.data.body)==null?void 0:c.materializer.attribute}),s.jsxs(H,{align:"start",children:[(d=t.data.body)==null?void 0:d.materializer.module,".",(u=t.data.body)==null?void 0:u.materializer.attribute]})]})})}),s.jsx(j,{label:"Type",value:(h=t.data.body)==null?void 0:h.type}),s.jsx(j,{label:"Author",value:s.jsx("div",{className:"inline-flex items-center gap-1",children:s.jsx(ot,{username:((f=(m=t.data.body)==null?void 0:m.user)==null?void 0:f.name)||""})})}),s.jsx(j,{label:"Updated",value:s.jsx(ke,{dateString:((p=t.data.body)==null?void 0:p.updated)||""})})]})})}function yn({producerStepId:e}){const t=Ne({stepId:e});return t.isPending?s.jsx(j,{label:"Producer Step",value:s.jsx(g,{className:"h-5 w-full"})}):t.isError?null:s.jsx(j,{label:"Producer Step",value:s.jsx(s.Fragment,{children:t.data?s.jsxs(T,{color:Ae("completed"),className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx(ce,{className:"mr-1 fill-current",status:"completed"}),t.data.name]}):s.jsx(g,{className:"h-full w-[150px]"})})})}function vn({producerRunId:e}){var r,n,a,i,l,o;const t=M({runId:e});return t.isPending?s.jsx(j,{label:s.jsx(g,{className:"h-5 w-full"}),value:s.jsx(g,{className:"h-5 w-full"})}):t.isError?null:s.jsxs(s.Fragment,{children:[s.jsx(j,{label:"Pipeline",value:s.jsx(Ie,{to:_e.pipelines.namespace(encodeURIComponent((n=(r=t.data.body)==null?void 0:r.pipeline)==null?void 0:n.name)),children:s.jsxs(T,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx(rt,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(i=(a=t.data.body)==null?void 0:a.pipeline)==null?void 0:i.name]})})}),s.jsx(j,{label:"Producer Run",value:s.jsx(Ie,{to:_e.runs.detail(e),children:s.jsxs(T,{color:Ae((l=t.data.body)==null?void 0:l.status),className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[((o=t.data.body)==null?void 0:o.status)==="running"?s.jsx(un,{className:"mr-1 h-4 w-4 border-[2px]"}):s.jsx(hn,{className:"mr-1 h-4 w-4 fill-current"}),e]})})})]})}function wn({artifactVersionId:e}){var c,d,u,h,m,f;const{data:t,isPending:r,isError:n,error:a}=we({versionId:e}),i=(c=t==null?void 0:t.metadata)==null?void 0:c.artifact_store_id,{data:l,isSuccess:o}=pn({componentId:i},{enabled:!!i});return n?s.jsx(ie,{err:a}):r?s.jsx(g,{className:"h-[500px] w-full"}):s.jsx($,{initialOpen:!0,title:"Data",children:s.jsxs("dl",{className:"grid w-full grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(D,{className:"col-span-3",children:"URI"}),s.jsx(V,{className:"col-span-3 h-auto",children:s.jsx(I,{fullWidth:!0,codeClasses:"truncate",code:((d=t.body)==null?void 0:d.uri)||""})}),((u=t.metadata)==null?void 0:u.artifact_store_id)&&s.jsx(j,{label:"Artifact Store",value:s.jsx(s.Fragment,{children:o?s.jsx(T,{emphasis:"subtle",rounded:!1,color:"grey",className:"text-theme-text-primary",children:l==null?void 0:l.name}):s.jsx(g,{className:"h-6 w-12"})})}),s.jsx(j,{label:"Data Type",value:s.jsx(T,{className:"flex w-fit items-center text-theme-text-primary",color:"grey",emphasis:"subtle",rounded:!1,children:s.jsx(F,{children:s.jsxs(z,{children:[s.jsx(B,{className:"cursor-auto",children:(h=t.body)==null?void 0:h.data_type.attribute}),s.jsxs(H,{children:[(m=t.body)==null?void 0:m.data_type.module,".",(f=t.body)==null?void 0:f.data_type.attribute," "]})]})})})})]})})}function Nn({artifactVersionId:e}){function t(r){return`from zenml.client import Client
|
3
|
-
|
4
|
-
artifact = Client().get_artifact_version('${r}')
|
5
|
-
loaded_artifact = artifact.load()`}return s.jsx($,{initialOpen:!0,title:"Code",children:s.jsx(I,{fullWidth:!0,highlightCode:!0,wrap:!0,code:t(e)})})}function En({artifactVersionId:e}){const{data:t,isError:r,error:n}=we({versionId:e});return r?s.jsx(ie,{err:n}):s.jsxs("div",{className:"space-y-5",children:[t?s.jsx(Cn,{artifactVersionId:t.id}):s.jsx(g,{className:"h-[500px] rounded-md lg:col-span-2"}),t?s.jsx(wn,{artifactVersionId:t.id}):s.jsx(g,{className:"h-[500px] rounded-md lg:col-span-2"}),t?s.jsx(Nn,{artifactVersionId:t.id}):s.jsx(g,{className:"h-[500px] rounded-md lg:col-span-2"})]})}function se({title:e,data:t,intent:r="primary",isInitialOpen:n=!1,contentClassName:a,children:i,className:l}){const o={},c={},d={},u=/^<class\s+'.*'>$/;for(const[m,f]of Object.entries(t||{}))typeof f=="object"&&f!==null&&!Array.isArray(f)?o[m]=f:Array.isArray(f)?d[m]=f:c[m]=f;const h=Object.entries(c);return h.sort((m,f)=>m[0].localeCompare(f[0])),s.jsxs($,{contentClassName:a,className:l,initialOpen:n,intent:r,title:e,children:[Object.keys(t||{}).length===0?s.jsx("p",{children:"Not available"}):s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:h.map(([m,f])=>s.jsx(j,{label:s.jsx(F,{children:s.jsxs(z,{children:[s.jsx(B,{className:"cursor-default truncate",children:m}),s.jsx(H,{className:"max-w-[480px]",children:m})]})}),value:s.jsx(s.Fragment,{children:typeof f=="boolean"?s.jsx("div",{className:"py-1",children:JSON.stringify(f)}):u.test(f)?s.jsx(I,{className:"py-1",highlightCode:!0,code:f}):f===null?s.jsx("div",{className:"overflow-x-auto",children:"null"}):s.jsx("div",{className:"overflow-x-auto py-1",children:f})})},m))}),Object.entries(d).map(([m,f])=>s.jsx(_n,{title:m,value:f},m)),Object.entries(o).map(([m,f])=>s.jsx(se,{intent:"secondary",title:m,data:f},m))]}),i]})}function _n({title:e,value:t}){const r=t.filter(a=>!Array.isArray(a)&&typeof a!="object"||a===null),n=t.filter(a=>Array.isArray(a)||typeof a=="object");return s.jsx(s.Fragment,{children:s.jsxs($,{intent:"secondary",title:e,children:[r.length>0&&s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 truncate md:grid-cols-3 md:gap-y-4",children:Object.entries(r).map(([a,i])=>s.jsx(j,{label:s.jsx(F,{children:s.jsxs(z,{children:[s.jsx(B,{className:"cursor-default truncate",children:a}),s.jsx(H,{className:"max-w-[480px]",children:a})]})}),value:s.jsx("div",{className:"py-1",children:er(i)})},a))}),n.length>0&&s.jsx("ul",{className:"space-y-4",children:n.map((a,i)=>s.jsx("li",{children:s.jsx(se,{intent:"secondary",title:i,data:a},i)},i))})]},e)})}function ut({metadata:e}){const t=Object.values(e||{}).filter(r=>r.body.type==="dict");return s.jsx(s.Fragment,{children:t.map(r=>s.jsx(se,{data:r.body.value,title:r.body.key},r.id))})}function Fe({metadata:e,title:t}){const r=Object.entries(e||{}),n=/^<class\s+'.*'>$/,a=r.filter(([l,o])=>o.body.type!=="dict");if(a.length===0)return null;a.sort((l,o)=>l[0].localeCompare(o[0]));const i=l=>l<1024?l+" bytes":l<Math.pow(1024,2)?(l/1024).toFixed(2)+" KB":l<Math.pow(1024,3)?(l/Math.pow(1024,2)).toFixed(2)+" MB":(l/Math.pow(1024,3)).toFixed(2)+" GB";return s.jsx("div",{children:s.jsx($,{initialOpen:!0,title:t||"Uncategorized",children:s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:a.map(([l,o])=>s.jsx(j,{label:s.jsx(F,{children:s.jsxs(z,{children:[s.jsx(B,{className:"cursor-default truncate",children:o.body.key}),s.jsx(H,{className:"max-w-[480px]",children:o.body.key})]})}),value:s.jsx(s.Fragment,{children:n.test(o.body.value)?s.jsx(I,{className:"py-1",highlightCode:!0,code:o.body.value}):o.body.type==="StorageSize"?s.jsx("div",{className:"py-1",children:i(o.body.value)}):o.body.type==="Uri"?s.jsx("a",{className:"py-1 underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:o.body.value,children:o.body.value}):s.jsx("div",{className:"py-1",children:o.body.value})})},o.id))})})})}function kn({artifactVersionId:e}){var a,i;const{data:t,isError:r,error:n}=we({versionId:e});return r?s.jsx(ie,{err:n}):t!=null&&t.metadata?s.jsxs("div",{className:"flex flex-col gap-5",children:[t?s.jsx(Fe,{metadata:(a=t.metadata)==null?void 0:a.run_metadata}):s.jsx(g,{className:"h-9 w-full"}),t?s.jsx(ut,{metadata:(i=t.metadata)==null?void 0:i.run_metadata}):s.jsx(g,{className:"h-9 w-full"})]}):s.jsx(A,{icon:s.jsx(Ve,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsx("div",{className:"text-center",children:s.jsx("h1",{className:"mb-2 text-display-xs font-semibold",children:"No Metadata Found for this Artifact"})})})}const On=5*1024*1024;function jr({versionId:e}){return["artifact_versions",e,"visualize"]}async function Ln({versionId:e},t){const r=ne(ae.artifactVersions.visualize(e)),n=await ge(r,{method:"GET",headers:{"Content-Type":"application/json"},signal:t});if(n.status===404){const a=await n.json().then(i=>i.detail).catch(()=>["","Failed to fetch artifact visualization"]);throw new ee({message:a[1]||"Failed to fetch artifact visualization",status:n.status,statusText:n.statusText})}if(!n.ok)throw new ee({message:`Error while fetching artifact visualization for version ${e}`,status:n.status,statusText:n.statusText});return n.json()}function Sn(e,t){return te({queryKey:jr(e),queryFn:({signal:r})=>Ln(e,r),...t})}function Tn({content:e}){const t=x.useRef(null),r=()=>{var n;if(t.current){const a=(n=t.current.contentWindow)==null?void 0:n.document.documentElement.scrollHeight;t.current.height=a?`${a}px`:"100%"}};return x.useEffect(()=>(r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}),[]),s.jsx("div",{children:s.jsx("iframe",{className:"w-full",title:"Secure HTML Content",ref:t,srcDoc:e,onLoad:r})})}function In({content:e}){return s.jsx("div",{className:"flex items-center justify-center",children:s.jsx("img",{src:hr("data:image/png;base64,"+e),alt:"Visualization for artifact"})})}const $n=x.lazy(()=>tr(()=>import("./CsvVizualization-PpAq0CeZ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),Pn=x.lazy(()=>tr(()=>import("./MarkdownVisualization-8O9kTr-2.js"),__vite__mapDeps([8,1])));function Mn({artifactVersionId:e,artifactName:t}){const[r,n]=x.useState(!1),{isVisualizationConfirmed:a,setVisualizationConfirmed:i}=nn(),l=cr(),{data:o,isError:c,error:d,isPending:u}=Sn({versionId:e},{retry:!1,enabled:!r});return r?s.jsx(A,{icon:s.jsx(he,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"flex flex-col items-center text-center",children:[s.jsx("p",{className:"mb-5 text-text-lg text-theme-text-secondary",children:"Loading the visualization cancelled"}),s.jsx(k,{size:"md",onClick:()=>n(!1),children:"Load Visualization"})]})}):c?d.status===501?s.jsxs(A,{icon:s.jsx(he,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:[s.jsx("p",{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"}),s.jsx("a",{rel:"noopener noreferrer",target:"_blank",href:"https://docs.zenml.io/stack-components/artifact-stores/custom",children:"docs"})]}):s.jsx(A,{icon:s.jsx(he,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsx("div",{className:"text-center",children:s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:d.message})})}):u?s.jsxs("div",{className:"flex flex-col items-center gap-7 py-12",children:[s.jsx(st,{}),s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("p",{className:"mb-5 text-display-xs",children:"Loading Visualization"}),s.jsx(k,{onClick:()=>{l.cancelQueries({queryKey:jr({versionId:e})}),n(!0)},intent:"secondary",size:"md",children:"Cancel"})]})]}):a?s.jsxs("div",{children:[s.jsx("div",{className:"flex justify-end",children:s.jsx(br,{artifactName:t,...o})}),s.jsxs("div",{children:[o.type==="image"&&s.jsx(In,{content:o.value}),o.type==="html"&&s.jsx(Tn,{content:o.value}),o.type==="markdown"&&s.jsx(Pn,{content:o.value}),o.type==="csv"&&s.jsx($n,{content:o.value})]})]}):s.jsx(Rn,{artifactName:t,setConfirmed:i,...o})}function Rn({artifactName:e,setConfirmed:t,...r}){return s.jsxs("div",{className:"flex flex-col items-center justify-center gap-8",children:[s.jsx(Le,{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."}),s.jsxs("div",{className:"flex justify-center gap-4",children:[s.jsx(k,{size:"md",onClick:()=>t(!0),children:"Load Preview"}),s.jsx(br,{...r,buttonIntent:"secondary",artifactName:e})]})]})}function br({type:e,value:t,artifactName:r,buttonIntent:n="primary"}){const a={image:"png",html:"html",markdown:"md",csv:"csv"},i={image:"image/png",html:"text/html",markdown:"text/markdown",csv:"text/csv"};function l(){const c=atob(t),d=new Array(c.length);for(let h=0;h<c.length;h++)d[h]=c.charCodeAt(h);return new Uint8Array(d)}function o(){try{const c=new Blob([e==="image"?l():t],{type:i[e]}),d=window.URL.createObjectURL(c),u=document.createElement("a");u.href=d,u.download=`${r}.`+a[e],u.click()}catch(c){console.error(c)}}return s.jsx(k,{intent:n,size:"md",className:"mb-4",onClick:o,children:"Download"})}function Dn({artifactVersionId:e}){var c,d,u,h,m,f;const[t,r]=x.useState(!1),{data:n,isPending:a,isError:i,error:l}=we({versionId:e});if(i)return s.jsx(A,{icon:s.jsx($e,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsx("div",{className:"text-center",children:s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:l.message})})});if(a)return s.jsx(g,{className:"h-[300px] w-full"});const o=(h=(u=(d=(c=n.metadata)==null?void 0:c.run_metadata)==null?void 0:d.storage_size)==null?void 0:u.body)==null?void 0:h.value;return(m=n.metadata)!=null&&m.visualizations&&n.metadata.visualizations.length<1?s.jsx(A,{icon:s.jsx($e,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No visualizations found"}),s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no visualizations available for this artifact version."})]})}):s.jsx("div",{children:o<On||t?s.jsx(Mn,{artifactName:((f=n.body)==null?void 0:f.artifact.name)||"artifact",artifactVersionId:e}):s.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center",children:[s.jsx("p",{className:"mb-4",children:"Artifact Visualization is larger than 5MB. Confirm to proceed:"}),s.jsx(k,{onClick:()=>r(!0),size:"md",children:"Confirm"})]})})}function Vn({error:e}){return s.jsx(A,{icon:s.jsx($e,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"Something went wrong"}),s.jsx("p",{className:"text-lg text-theme-text-secondary",children:e.message})]})})}function An({artifactVersionId:e}){var n,a,i;const{data:t}=we({versionId:e}),r=(n=t==null?void 0:t.body)==null?void 0:n.version;return s.jsxs("div",{children:[s.jsx("div",{className:"flex h-9 items-center border-b border-theme-border-moderate bg-theme-surface-primary px-4 py-3",children:s.jsxs(rr,{className:"focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(or,{className:"h-5 w-5 fill-neutral-500"}),s.jsx("span",{className:"sr-only",children:"Close"})]})}),s.jsxs("div",{className:"border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:[t?s.jsx("p",{className:"mb-0.5 text-text-sm text-theme-text-secondary",children:e}):s.jsx(g,{className:"w-9"}),t?s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(xr,{artifactType:((a=t.body)==null?void 0:a.type)||"BaseArtifact",className:"h-5 w-5 fill-theme-surface-strong"}),s.jsx("h2",{className:"text-display-xs font-semibold",children:(i=t.body)==null?void 0:i.artifact.name}),s.jsx(xe,{color:r?"light-purple":"light-grey",rounded:!1,children:r||"None"})]}):s.jsx(g,{className:"h-6 w-7"})]}),s.jsx("div",{className:"p-5",children:s.jsx(sn,{children:s.jsxs(nt,{defaultValue:"overview",children:[s.jsxs(at,{children:[s.jsxs(L,{className:"flex items-center gap-2 text-text-md",value:"overview",children:[s.jsx(fe,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Overview"})]}),s.jsxs(L,{className:"flex items-center gap-2 truncate text-text-md",value:"metadata",children:[s.jsx(it,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Metadata"})]}),s.jsxs(L,{className:"flex items-center gap-2 text-text-md",value:"visualization",children:[s.jsx($e,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Visualization"})]})]}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"overview",children:s.jsx(En,{artifactVersionId:e})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:s.jsx(kn,{artifactVersionId:e})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"visualization",children:s.jsx(cn,{FallbackComponent:Vn,children:s.jsx(Dn,{artifactVersionId:e})})})]})})})]})}function Fn({children:e,artifactVersionId:t,onOpenChange:r}){return s.jsxs(sr,{onOpenChange:r,children:[s.jsx(nr,{asChild:!0,children:e}),s.jsx(ar,{className:"w-[1000px] overflow-y-auto",children:s.jsx(An,{artifactVersionId:t})})]})}function ze({children:e}){return s.jsxs(s.Fragment,{children:[s.jsx(_t,{style:{border:"transparent",top:0,background:"transparent",width:0,height:0},type:"target",position:kt.Top}),s.jsx("div",{className:"flex w-[300px] items-center justify-center",children:e}),s.jsx(_t,{isConnectable:!1,type:"source",style:{border:"transparent",bottom:0,background:"transparent",width:0,height:0},position:kt.Bottom})]})}function zn({data:e,selected:t}){var i,l;const{unselectNodesAndEdges:r}=dt(o=>({unselectNodesAndEdges:o.unselectNodesAndEdges}));function n(o){o||setTimeout(()=>{r()},100)}function a(o){const c=o.split(".");return c[c.length-1]}return s.jsx(ze,{children:s.jsx(Fn,{onOpenChange:n,artifactVersionId:e.id,children:s.jsxs("button",{"data-selected":!!t,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:[s.jsx("div",{className:"rounded-rounded bg-primary-50 p-0.5 group-data-[selected=true]:bg-white/20",children:s.jsx(xr,{className:"h-4 w-4 fill-primary-400 group-data-[selected=true]:fill-theme-text-negative",artifactType:((i=e.body)==null?void 0:i.type)||"BaseArtifact"})}),s.jsxs("div",{className:"min-w-0 text-left",children:[s.jsx("p",{className:"truncate text-text-sm font-semibold text-theme-text-brand group-data-[selected=true]:text-theme-text-negative",children:e.name}),s.jsx("p",{className:"truncate text-text-xs text-theme-text-secondary group-data-[selected=true]:text-white/70",children:a(((l=e.body)==null?void 0:l.data_type.attribute)||"")})]})]})})})}const Bn=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.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"})),Hn=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.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 Gn({refetch:e}){const{fitView:t,zoomIn:r,zoomOut:n}=fr();return s.jsxs("div",{"aria-label":"Dag Controls",className:"absolute left-4 top-4 z-10 flex flex-col gap-1",children:[s.jsxs("div",{className:"divide-y divide-neutral-300 overflow-hidden rounded-md border border-neutral-300",children:[s.jsx("div",{children:s.jsx(k,{onClick:()=>r(),emphasis:"subtle",className:"rounded-sharp border-none p-0.5",intent:"secondary",children:s.jsx(qs,{className:"h-5 w-5 bg-theme-surface-primary fill-theme-text-primary"})})}),s.jsx("div",{children:s.jsx(k,{onClick:()=>n(),emphasis:"subtle",className:"rounded-sharp border-none bg-theme-surface-primary p-0.5",intent:"secondary",children:s.jsx(Hn,{className:"h-5 w-5 fill-theme-text-primary"})})})]}),s.jsx(k,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>t(),emphasis:"subtle",intent:"secondary",children:s.jsx(Bn,{className:"h-5 w-5 fill-theme-text-primary"})}),s.jsxs(k,{className:"h-6 w-6 bg-theme-surface-primary p-0.5",onClick:()=>{e()},emphasis:"subtle",intent:"secondary",children:[s.jsx("span",{className:"sr-only",children:"Refresh"}),s.jsx(Ws,{className:"h-5 w-5 fill-theme-text-primary"})]})]})}function Zn({data:e}){const t=e.status==="failed",r=e.status==="completed";return s.jsx(ze,{children:s.jsx(F,{children:s.jsxs(z,{children:[s.jsx(B,{children:s.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:[s.jsx("div",{className:"rounded-rounded bg-primary-50 p-0.5",children:s.jsx(ce,{status:t?"failed":r?"completed":"running",className:"h-4 w-4 fill-primary-400"})}),s.jsx("p",{className:"truncate",children:e.label})]})}),s.jsx(H,{className:"z-20 max-w-xs text-center",children:"This artifact is not generated yet. It will not be created if the preceding steps fail."})]})})})}function qn({data:e}){const t=e.status==="failed",r=e.status==="completed";return s.jsx(ze,{children:s.jsx(F,{children:s.jsxs(z,{children:[s.jsx(B,{children:s.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:[s.jsx("div",{className:"rounded-sm bg-warning-50 p-0.5",children:s.jsx(ce,{status:t?"failed":r?"completed":"running",className:"h-4 w-4 fill-theme-text-warning"})}),s.jsx("p",{className:"truncate",children:e.label})]})}),s.jsxs(H,{className:"z-20 max-w-xs text-center",children:["This is a future step with pending execution.",s.jsx("br",{}),"It may not run if preceding steps fail."]})]})})})}const Lt=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Wn(e,t,r,n){const a=Math.min(Lt(e,t)/2,Lt(t,r)/2,n),{x:i,y:l}=t;if(e.x===i&&i===r.x||e.y===l&&l===r.y)return`L${i} ${l}`;if(e.y===l){const d=e.x<r.x?-1:1,u=e.y<r.y?1:-1;return`L ${i+a*d},${l}Q ${i},${l} ${i},${l+a*u}`}const o=e.x<r.x?1:-1,c=e.y<r.y?-1:1;return`L ${i},${l+a*c}Q ${i},${l} ${i+a*o},${l}`}function qe(e){return{x:e[0],y:e[1]}}const Kn=e=>(t,r,n)=>{const a=e.borderRadius;let i=`M ${t.x}, ${t.y} `;const l=n.reduce((o,c,d)=>{let u="";if(d>0&&d<n.length-1)u=Wn(qe(n[d-1]),qe(c),qe(n[d+1]),a);else{const[h,m]=c;u=`${d===0?"M":"L"}${h} ${m}`}return o+=u,o},"");return i+=l,i+=`L ${r.x}, ${r.y} `,i};function Un(e){const t=Vs(),r=As({nodes:t,sourcePosition:e.sourcePosition,targetPosition:e.targetPosition,sourceX:e.sourceX,sourceY:e.sourceY,targetX:e.targetX,targetY:e.targetY,options:{drawEdge:Kn({borderRadius:10}),generatePath:Fs,gridRatio:t.length>20?6:t.length>10?3:2}});return r===null?s.jsx(zs,{...e}):s.jsx(Bs,{...e,path:r.svgPathString})}const Cr=e=>x.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.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 Yn({stepId:e}){var i;const{data:t,isPending:r,isError:n,error:a}=Ne({stepId:e});return n?s.jsx(ie,{err:a}):r?s.jsx(g,{className:"h-[300px] w-full"}):s.jsx($,{initialOpen:!0,title:"Code",children:s.jsx(I,{fullWidth:!0,highlightCode:!0,wrap:!0,code:((i=t==null?void 0:t.metadata)==null?void 0:i.source_code)||""})})}const Qn=e=>x.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.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 yr({data:e}){const[t,r]=x.useState(!0);return s.jsxs(je,{open:t,onOpenChange:r,children:[s.jsx(be,{intent:"primary",className:"flex items-center gap-[10px]",children:s.jsxs(Ce,{className:"flex w-full items-center gap-[10px]",children:[s.jsx(ve,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Docker Image"]})}),s.jsxs(ye,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(j,{label:"Docker Image",value:s.jsxs("div",{className:"flex justify-between",children:[s.jsxs(T,{className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx(Us,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),os(e.image)]}),s.jsxs("div",{className:"align-center mr-1 flex",children:[s.jsx("a",{className:"cursor-pointer",rel:"noopener noreferrer",target:"_blank",href:`https://${e.image}`,children:s.jsx(Qn,{className:"mr-1 mt-0.5 h-5 w-5 fill-theme-text-tertiary"})}),s.jsx(Y,{copyText:e.image,isVisible:!0,copyTitle:"Copy url"})]})]})}),s.jsx(j,{label:"Contains Code",value:s.jsx(T,{color:e.contains_code?"green":"grey",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:e.contains_code?"Available":"None"})})]}),e.dockerfile&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Dockerfile"}),s.jsx(I,{fullWidth:!0,wrap:!0,code:e.dockerfile})]}),e.requirements&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"mb-2 mt-5 text-theme-text-secondary",children:"Requirements"}),s.jsx(I,{fullWidth:!0,wrap:!0,code:e.requirements})]})]})]})}function Xn({buildId:e}){return["pipeline-builds",e]}async function Jn({buildId:e},t){const r=ne(ae.runs.detail(e)),n=await fetch(r,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",...t}});if(!n.ok)throw new ee({message:`Error while fetching pipeline build ${e}`,status:n.status,statusText:n.statusText});return n.json()}function vr(e,t){return te({queryKey:Xn(e),queryFn:()=>Jn(e),...t})}function ea({stepId:e}){var m,f,p,b,v,E,Z,q,W,K,U,C;const{data:t,isPending:r,isError:n,error:a}=Ne({stepId:e}),i=Object.values(((f=(m=t==null?void 0:t.metadata)==null?void 0:m.config)==null?void 0:f.extra)||{}),{runId:l}=P(),{data:o}=M({runId:l},{throwOnError:!0,enabled:!!l}),{data:c}=vr({buildId:(b=(p=o==null?void 0:o.body)==null?void 0:p.build)==null?void 0:b.id},{enabled:!!((E=(v=o==null?void 0:o.body)==null?void 0:v.build)!=null&&E.id)}),u=(()=>{var _;const y=(_=c==null?void 0:c.metadata)==null?void 0:_.images;if(!y)return null;if(Object.keys(y).length===1&&Object.keys(y)[0]!=="orchestrator")return Object.keys(y)[0];for(const R in y)if(R!=="orchestrator"&&R.split(".")[1]!=="orchestrator")return R;return"orchestrator"})(),h=u&&((q=(Z=c==null?void 0:c.metadata)==null?void 0:Z.images)==null?void 0:q[u]);return n?s.jsx(ie,{err:a}):r?s.jsxs("div",{className:"space-y-5",children:[s.jsx(g,{className:"h-[200]"}),s.jsx(g,{className:"h-[200px]"}),s.jsx(g,{className:"h-[200px]"})]}):s.jsxs("div",{className:"space-y-5",children:[((W=t.metadata)==null?void 0:W.run_metadata)&&s.jsx(Fe,{title:"Metadata",metadata:(K=t.metadata)==null?void 0:K.run_metadata}),s.jsx(St,{data:(C=(U=t.metadata)==null?void 0:U.config)==null?void 0:C.parameters,title:"Parameters"}),h?s.jsx(yr,{data:h}):null,s.jsx(ta,{id:t.id}),i.length>0?s.jsx(St,{data:i,title:"Extra"}):null]})}function St({data:e,title:t}){return Object.keys(e).length>0?s.jsx($,{initialOpen:!0,title:t,children:s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:Object.entries(e).map(([n,a])=>typeof a!="object"&&s.jsx(j,{label:s.jsx(F,{children:s.jsxs(z,{children:[s.jsx(B,{className:"cursor-default truncate",children:n}),s.jsx(H,{className:"max-w-[480px]",children:n})]})}),value:s.jsx("div",{children:er(a)})},n))})}):s.jsx($,{initialOpen:!0,title:t,children:s.jsx("p",{className:"text-theme-text-secondary",children:"No data available"})})}function ta({id:e}){function t(r){return`from zenml.client import Client
|
6
|
-
artifact = Client().get_pipeline_run('${r}')
|
7
|
-
config = run.config()`}return s.jsxs($,{initialOpen:!0,title:"Code",children:[s.jsx("h2",{className:"mb-2 text-text-md text-theme-text-secondary",children:"Get config programmatically"}),s.jsx(I,{fullWidth:!0,highlightCode:!0,wrap:!0,code:t(e)})]})}function wr(e,t){if(!e||!t)return"";const r=new Date(e),n=new Date(t);if(isNaN(r.getTime())||isNaN(n.getTime()))return"";const a=Math.abs(n.getTime()-r.getTime()),i=Math.floor(a/(1e3*60)),l=Math.floor(a%(1e3*60)/1e3);return`${i}min ${l}s`}const ra=e=>x.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.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"}));function sa({repositoryId:e}){return["code_repositories",e]}async function na({repositoryId:e}){const t=ne(ae.code_repositories.detail(e)),r=await fetch(t,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(r.status===404&&Oe(),!r.ok)throw new ee({message:`Error while fetching code repository ${e}`,status:r.status,statusText:r.statusText});return r.json()}function aa(e,t){return te({queryKey:sa(e),queryFn:()=>na(e),...t})}function Nr({repositoryId:e,commit:t}){var o;const{data:r,isPending:n,isError:a}=aa({repositoryId:e},{enabled:!!e}),i=(o=r==null?void 0:r.metadata)==null?void 0:o.config,l=()=>{var u,h,m,f;let c=r==null?void 0:r.name,d="";return((h=(u=r==null?void 0:r.body)==null?void 0:u.source)==null?void 0:h.attribute)==="GitHubCodeRepository"?(c=`${i==null?void 0:i.owner}/${i==null?void 0:i.repository}`,d=`https://www.github.com/${c}`):((f=(m=r==null?void 0:r.body)==null?void 0:m.source)==null?void 0:f.attribute)==="GitLabCodeRepository"&&(c=`${i==null?void 0:i.group}/${i==null?void 0:i.project}`,d=`https://www.gitlab.com/${c}`),s.jsxs("a",{target:"_blank",rel:"noopener noreferrer",className:`flex items-center ${d?"":"pointer-events-none"}`,onClick:p=>p.stopPropagation(),href:d,children:[s.jsx(ra,{className:"mr-1 h-5 w-5 fill-theme-text-brand"}),c]})};return!e||!t?s.jsx("p",{children:"Not available"}):n?s.jsx(g,{className:"h-6"}):a?null:s.jsxs("div",{className:"group/copybutton mr-1",children:[s.jsxs(T,{color:"grey",className:"inline-flex items-center font-semibold text-neutral-900",rounded:!1,emphasis:"subtle",children:[l(),s.jsx("div",{className:"ml-1 rounded-sm bg-neutral-200 px-1 py-0.25",children:cs(t,10)})]}),s.jsx(Y,{copyText:t})]})}function ia({stepId:e,runId:t}){var h,m,f,p,b,v,E,Z,q,W,K,U,C,y,_,R,le,O,X,J,oe,de,Ge,pe,Se,jt,bt,Ct,yt,vt,wt;const{data:r,isError:n,isPending:a,error:i}=Ne({stepId:e}),{data:l}=M({runId:t}),o=(f=(m=(h=l==null?void 0:l.body)==null?void 0:h.code_reference)==null?void 0:m.body)==null?void 0:f.code_repository;if(n)return s.jsx(ie,{err:i});if(a)return s.jsx(g,{className:"h-[300px] w-full"});const c=(b=(p=r.metadata)==null?void 0:p.config)==null?void 0:b.enable_cache,d=(E=(v=r.metadata)==null?void 0:v.config)==null?void 0:E.enable_artifact_metadata,u=(q=(Z=r.metadata)==null?void 0:Z.config)==null?void 0:q.enable_artifact_visualization;return s.jsx($,{initialOpen:!0,title:"Details",children:s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(j,{label:"Id",value:s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[r.id,s.jsx(Y,{copyText:r.id})]})}),s.jsx(j,{label:"Status",value:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsxs(T,{color:Ae((W=r.body)==null?void 0:W.status),rounded:!0,emphasis:"subtle",className:"flex w-fit items-center gap-1 capitalize",children:[s.jsx(ce,{className:"fill-current",status:(K=r.body)==null?void 0:K.status}),(U=r.body)==null?void 0:U.status]}),typeof c=="boolean"&&s.jsx(xe,{size:"sm",color:c?"green":"grey",children:c?"Enable cache":"Disabled cache"})]})}),l?s.jsxs(s.Fragment,{children:[s.jsx(j,{label:"Pipeline",value:s.jsx(Ie,{to:_e.pipelines.namespace(encodeURIComponent((y=(C=l.body)==null?void 0:C.pipeline)==null?void 0:y.name)),children:s.jsxs(T,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx(rt,{className:"mr-1 h-4 w-4 fill-theme-text-brand"}),(R=(_=l.body)==null?void 0:_.pipeline)==null?void 0:R.name]})})}),s.jsx(j,{label:s.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[s.jsx("span",{className:"truncate",children:"Repository/Commit"}),s.jsx(F,{children:s.jsxs(z,{children:[s.jsxs(B,{className:"cursor-default",children:[s.jsx(fe,{className:"h-3 w-3 fill-theme-text-secondary"}),s.jsx("span",{className:"sr-only",children:"Info"})]}),s.jsx(H,{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."})]})})]}),value:(le=l.body)!=null&&le.code_reference?s.jsx(Nr,{repositoryId:o==null?void 0:o.id,commit:(O=l.body.code_reference.body)==null?void 0:O.commit}):"Not available"}),s.jsx(D,{className:(X=l.metadata)!=null&&X.code_path?"col-span-3":"",children:s.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[s.jsx("span",{children:"Code Path"}),s.jsx(F,{children:s.jsxs(z,{children:[s.jsxs(B,{className:"cursor-default",children:[s.jsx(fe,{className:"h-3 w-3 fill-theme-text-secondary"}),s.jsx("span",{className:"sr-only",children:"Info"})]}),s.jsx(H,{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"})]})})]})}),s.jsx(V,{className:(J=l.metadata)!=null&&J.code_path?"col-span-3 h-auto":"",children:(oe=l.metadata)!=null&&oe.code_path?s.jsx(I,{code:l.metadata.code_path}):"Not available"})]}):s.jsx(g,{className:"h-6 w-full"}),s.jsx(j,{label:"Cache key",value:s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[(de=r.metadata)==null?void 0:de.cache_key,s.jsx(Y,{copyText:(Ge=r.metadata)==null?void 0:Ge.cache_key})]})}),s.jsx(j,{label:"Author",value:s.jsx("div",{className:"inline-flex items-center gap-1",children:s.jsx(ot,{username:(Se=(pe=r.body)==null?void 0:pe.user)==null?void 0:Se.name})})}),s.jsx(j,{label:"Start Time",value:(jt=r.metadata)!=null&&jt.start_time?s.jsx(ke,{dateString:(bt=r.metadata)==null?void 0:bt.start_time}):"Not available"}),s.jsx(j,{label:"End Time",value:(Ct=r.metadata)!=null&&Ct.end_time?s.jsx(ke,{dateString:(yt=r.metadata)==null?void 0:yt.end_time}):"Not available"}),s.jsx(j,{label:"Duration",value:wr(((vt=r.metadata)==null?void 0:vt.start_time)||"",((wt=r.metadata)==null?void 0:wt.end_time)||"")}),s.jsx(j,{label:"Artifact metadata",value:s.jsx(xe,{size:"sm",color:d?"green":"grey",children:d?"Enable":"Disabled"})}),s.jsx(j,{label:"Artifact visualization",value:s.jsx(xe,{size:"sm",color:u?"green":"grey",children:u?"Enable":"Disabled"})})]})})}function la({className:e}){var c,d,u,h,m;const{runId:t}=P(),{data:r,isPending:n,isError:a}=M({runId:t},{throwOnError:!0}),i=(d=(c=r==null?void 0:r.metadata)==null?void 0:c.run_metadata)==null?void 0:d.orchestrator_url,l=(h=(u=r==null?void 0:r.metadata)==null?void 0:u.run_metadata)==null?void 0:h.orchestrator_logs_url,o=(m=r==null?void 0:r.metadata)==null?void 0:m.orchestrator_run_id;return a?s.jsx("p",{children:"Failed to fetch Orchestrator Card"}):n?s.jsx(g,{className:"h-[150px] w-full"}):s.jsx($,{className:e,initialOpen:!0,title:"Orchestrator",children:s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(j,{label:"Orchestrator URL",value:i?s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[s.jsx("a",{className:"truncate underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:i.body.value,children:i.body.value}),s.jsx(Y,{copyText:i.body.value})]}):"Not available"}),s.jsx(j,{label:"Orchestrator Logs",value:l&&typeof l.body.value=="string"?s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[s.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:l.body.value,children:l.body.value}),s.jsx(Y,{copyText:l.body.value})]}):"Not available"}),s.jsx(j,{label:"Orchestrator Run ID",value:o?s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[o,s.jsx(Y,{copyText:o})]}):"Not available"})]})})}function oa({stepId:e}){return["logs",e]}async function ca({stepId:e}){const t=ne(ae.steps.logs(e)),r=await ge(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){const n=await r.json().catch(()=>({}));throw new ee({message:n.detail[1].includes("File")&&n.detail[1]||`The logs for step ${e} cannot be fetched or this pipeline run ran locally and logs were not tracked`,status:r.status,statusText:r.statusText})}return r.json()}function da(e,t){return te({queryKey:oa(e),queryFn:()=>ca(e),...t})}const ua=()=>s.jsx("section",{className:"flex h-[calc(100vh_-_270px)] items-center justify-center",children:s.jsxs("div",{className:"flex flex-col items-center justify-center",children:[s.jsxs("div",{className:"relative mb-2 flex items-center justify-center",children:[s.jsx(st,{className:"h-[120px] w-[120px]"}),s.jsx(fa,{})]}),s.jsx("h2",{className:"my-3 text-center text-display-xs font-semibold",children:"Loading the Logs"}),s.jsxs("p",{className:"text-center text-text-lg text-theme-text-secondary",children:["It can take up to a few minutes. ",s.jsx("br",{})," Please wait while we fetch logs from the artifact store."]})]})});function ha({stepId:e,stepDetail:t}){var o,c;const r=(c=(o=t==null?void 0:t.metadata)==null?void 0:o.config)==null?void 0:c.enable_step_logs,{data:n,isPending:a,isError:i,error:l}=da({stepId:e});return i?s.jsx(ie,{err:l}):a?s.jsx(ua,{}):s.jsx($,{initialOpen:!0,title:"Logs",children:typeof r=="boolean"&&r===!1?s.jsx("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:s.jsx(j,{label:"Enable logs",value:"Disabled"})}):s.jsx(I,{codeClasses:"whitespace-pre-line",fullWidth:!0,wrap:!0,code:n||""})})}function fa(){return s.jsx("div",{className:"absolute rounded-rounded bg-primary-25 p-3",children:s.jsx(mr,{className:"h-7 w-7 fill-primary-400"})})}function ma({stepId:e}){var i;const{data:t,isPending:r,isError:n,error:a}=Ne({stepId:e});return r?s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(g,{className:"h-9 w-full"}),s.jsx(g,{className:"h-9 w-full"})]}):n?s.jsx(ie,{err:a}):!((i=t.metadata)!=null&&i.run_metadata)||Object.keys(t.metadata.run_metadata).length===0?s.jsx(A,{icon:s.jsx(Ve,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available for this step."})]})}):s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(Fe,{metadata:t.metadata.run_metadata}),s.jsx(ut,{metadata:t.metadata.run_metadata})]})}function pa({stack:e}){return s.jsxs(ir,{className:"flex items-center justify-between gap-3 px-5 py-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ds,{type:"square",size:"md",children:s.jsx(us,{size:"md",children:e.name[0]})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-text-lg",children:e.name}),s.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),s.jsxs(T,{rounded:!1,className:"inline-flex shrink items-center gap-0.5 truncate",color:"turquoise",emphasis:"subtle",children:[s.jsx(lt,{className:"h-4 w-4 shrink-0 fill-current"}),s.jsx("div",{className:"truncate",children:"Stack"})]})]})}const Je=x.forwardRef(({name:e,children:t,type:r,...n},a)=>s.jsxs(hs,{children:[s.jsx(fs,{asChild:!0,children:t}),s.jsxs(ms,{className:"w-fit max-w-3xl",...n,ref:a,children:[s.jsx(ps,{children:s.jsx(xs,{children:lr(r||"")})}),s.jsxs("div",{className:"space-y-5 truncate p-7",children:[s.jsx(Le,{children:s.jsx("div",{className:"flex w-full flex-wrap justify-between gap-2",children:s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"truncate text-text-sm font-semibold",children:"We are working on the new Stacks experience."}),s.jsx("p",{className:"truncate text-text-sm",children:"Meanwhile you can use the CLI to check the details of your component."})]})})}),s.jsxs("div",{className:"space-y-1 truncate",children:[s.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Describe your ",gs(r)]}),s.jsx(I,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml ${js(r)} describe ${e}`})]})]})]})]}));Je.displayName="ComponentInfoDialog";function xa({component:e,run:t}){var a,i,l,o,c,d;const r=`${(a=e.body)==null?void 0:a.type}.${(i=e.body)==null?void 0:i.flavor}`,n=((o=(l=t.metadata)==null?void 0:l.config.settings)==null?void 0:o[r])??void 0;return!n||Object.keys(n).length===0?s.jsx(Je,{name:e.name,type:((c=e.body)==null?void 0:c.type)||"orchestrator",children:s.jsx("button",{className:"w-full",children:s.jsx(ir,{className:"flex items-center justify-between gap-3 px-5 py-3 text-left",children:s.jsx(Tt,{component:e})})})}):s.jsx(se,{intent:"primary",contentClassName:"pl-[60px]",className:"w-full",isInitialOpen:!1,title:s.jsx("div",{className:"flex w-full items-center justify-between gap-3 text-left",children:s.jsx(Tt,{component:e})}),data:n,children:s.jsx(Je,{name:e.name,type:((d=e.body)==null?void 0:d.type)||"orchestrator",children:s.jsx(k,{intent:"secondary",emphasis:"subtle",className:"mx-auto flex w-fit justify-center text-text-sm text-theme-text-secondary",children:"See Component Details"})})})}function Tt({component:e}){var t,r,n,a;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("img",{width:32,height:32,alt:`${(t=e.body)==null?void 0:t.flavor} logo`,src:hr(((r=e.body)==null?void 0:r.logo_url)||"")}),s.jsxs("div",{children:[s.jsx("p",{className:"text-text-lg",children:e.name}),s.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),s.jsx(Ys,{type:((n=e.body)==null?void 0:n.type)||"orchestrator",children:lr(((a=e.body)==null?void 0:a.type)||"")})]})}function Er({stack:e,run:t}){var r;return s.jsxs("div",{className:"space-y-5",children:[s.jsx(ga,{}),s.jsx(pa,{stack:e}),s.jsx("ul",{className:"space-y-5",children:Object.values(((r=e.metadata)==null?void 0:r.components)||{}).map(n=>s.jsx("li",{className:"w-full",children:s.jsx(xa,{component:n[0],run:t})},n[0].id))})]})}function ga(){return s.jsx(Le,{className:"truncate",children:s.jsx("p",{className:"truncate",children:"Current run-specific stack settings. Click on a component for full default settings."})})}function ja(){var n,a,i;const{runId:e}=P(),t=M({runId:e},{throwOnError:!0});if(t.isPending)return s.jsx(g,{className:"h-[250px] w-full"});if(t.isError)return s.jsx("p",{children:"Something went wrong fetching the run"});const r=(i=(a=(n=t.data)==null?void 0:n.body)==null?void 0:a.stack)==null?void 0:i.id;return r?s.jsx(ba,{run:t.data,stackId:r}):s.jsx(A,{icon:s.jsx(he,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-display-xs font-semibold",children:"No Stack"}),s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There is no stack associated with this run."})]})})}function ba({stackId:e,run:t}){const{data:r,isError:n,isPending:a}=pr({stackId:e});return a?s.jsx(g,{className:"h-[250px] w-full"}):n?s.jsx("p",{children:"Failed to fetch Stack"}):s.jsx(Er,{stack:r,run:t})}function Ca(e){if(!e)return"light-grey";switch(e){case"completed":return"green";default:return"light-grey"}}function ya({stepId:e}){var i,l,o;const{runId:t}=P(),{data:r}=Ne({stepId:e}),n=(i=r==null?void 0:r.body)==null?void 0:i.status,a=(o=(l=r==null?void 0:r.metadata)==null?void 0:l.config)==null?void 0:o.enable_cache;return s.jsxs("div",{children:[s.jsx("div",{className:"flex h-9 items-center border-b border-theme-border-moderate bg-theme-surface-primary px-4 py-3",children:s.jsxs(rr,{className:"focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(or,{className:"h-5 w-5 fill-neutral-500"}),s.jsx("span",{className:"sr-only",children:"Close"})]})}),s.jsx("div",{className:"flex justify-between border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:s.jsx("div",{children:r?s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:`rounded-sm p-0.5 ${dr(n)}`,children:s.jsx(ce,{status:n,className:"h-4 w-4"})}),s.jsx("h2",{className:"text-display-xs font-semibold",children:r.name}),s.jsx(xe,{size:"sm",color:Ca(n),children:n||"None"}),typeof a=="boolean"&&s.jsx(xe,{size:"sm",color:a?"green":"grey",children:a?"Enable cache":"Disabled cache"})]}):s.jsx(g,{className:"h-6 w-7"})})}),s.jsx("div",{className:"p-5",children:s.jsxs(nt,{defaultValue:"overview",children:[s.jsxs(at,{children:[s.jsxs(L,{className:"flex items-center gap-2 truncate text-text-md",value:"overview",children:[s.jsx(fe,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Overview"})]}),s.jsxs(L,{className:"flex items-center gap-2 truncate text-text-md",value:"stack",children:[s.jsx(lt,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Stack"})]}),s.jsxs(L,{className:"flex items-center gap-2 truncate text-text-md",value:"code",children:[s.jsx(Ks,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Code"})]}),s.jsxs(L,{className:"flex items-center gap-2 truncate text-text-md",value:"logs",children:[s.jsx(mr,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Logs"})]}),s.jsxs(L,{className:"flex items-center gap-2 truncate text-text-md",value:"config",children:[s.jsx(Cr,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Configuration"})]}),s.jsxs(L,{className:"flex items-center gap-2 text-text-md",value:"metadata",children:[s.jsx(it,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Metadata"})]})]}),s.jsxs(S,{className:"m-0 mt-5 space-y-5 border-0 bg-transparent p-0",value:"overview",children:[s.jsx(ia,{runId:t,stepId:e}),s.jsx(la,{})]}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"stack",children:s.jsx(ja,{})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"code",children:s.jsx(Yn,{stepId:e})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"logs",children:s.jsx(ha,{stepId:e,stepDetail:r})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"config",children:s.jsx(ea,{stepId:e})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:s.jsx(ma,{stepId:e})})]})})]})}function va({children:e,stepId:t,onOpenChange:r}){return s.jsxs(sr,{onOpenChange:r,children:[s.jsx(nr,{asChild:!0,children:e}),s.jsx(ar,{className:"w-[1000px] overflow-y-auto",children:s.jsx(ya,{stepId:t})})]})}const wa=e=>({unselectAll:e.unselectNodesAndEdges});function Na({data:e,selected:t}){var a,i,l,o;const{unselectAll:r}=dt(wa);function n(c){c||setTimeout(()=>{r()},100)}return s.jsx(ze,{children:s.jsx(va,{onOpenChange:n,stepId:e.id,children:s.jsx("button",{"data-selected":!!t,className:bs("h-[50px] max-w-[300px] 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":((a=e.body)==null?void 0:a.status)!=="failed","border-error-200":((i=e.body)==null?void 0:i.status)==="failed"}),children:s.jsxs("div",{className:"flex items-center gap-1 py-1 pl-1 pr-2",children:[s.jsx("div",{className:`rounded-sm p-0.5 ${dr((l=e.body)==null?void 0:l.status)}`,children:s.jsx(ce,{status:(o=e.body)==null?void 0:o.status,className:"h-4 w-4"})}),s.jsx("p",{className:"truncate font-semibold",children:e.name})]})})})})}function Ea(e,t,r,n){ka(t,e).forEach(i=>{var m,f;const[l,o]=i.id.split("--"),c=r[l];if(!c)return;const d=Oa(e,i),u=(m=c.body)==null?void 0:m.inputs,h=(f=c.body)==null?void 0:f.outputs;d?La(d,l,o,u,h,n):(e.push(i),Sa(i,l,o,u,h,n))})}function _a(e){return e.type==="artifact"||e.type==="step"}function Pe(e,t,r){return e.some(n=>n.source===t&&n.target===r)}function ka(e,t){return e.filter(r=>!t.some(n=>n.id===r.id))}function Oa(e,t){return e.find(r=>_a(r)&&r.data.id===t.data.id)}function La(e,t,r,n,a,i){n&&r in n&&!Pe(i,e.id,t)&&Me(i,e.id,t,`${t}--${r}`),a&&r in a&&!Pe(i,t,e.id)&&Me(i,t,e.id,`${t}--${r}`)}function Me(e,t,r,n){e.push({id:n,source:t,target:r})}function Sa(e,t,r,n,a,i){n&&r in n&&!Pe(i,e.id,t)&&Me(i,e.id,t,`${t}--${r}`),a&&r in a&&!Pe(i,t,e.id)&&Me(i,t,e.id,`${t}--${r}`)}function Ta(e){const t=[],r=[];function n(i,l,o){t.push({id:i,type:l,data:{label:o,status:"running"}})}function a(i,l){r.push({id:`${i}--${l}`,source:i,target:l})}return Object.keys(e).forEach(i=>{const l=e[i];t.push({id:i,type:"previewStep",data:{label:i,status:"running"}}),Object.keys(l.config.outputs||{}).forEach(f=>{const p=`${i}--${f}`;n(p,"previewArtifact",f),a(i,p)});const o=l.spec.inputs??{};Object.keys(o).forEach(f=>{const p=o[f],b=`${p.step_name}--${p.output_name}`;a(b,i)});const c=l.config.external_input_artifacts||{};Object.keys(c).forEach(f=>{const p=`${i}--${f}`;n(p,"previewArtifact",f),a(p,i)});const d=l.config.model_artifacts_or_metadata||{};Object.keys(d).forEach(f=>{const p=`${i}--${f}`;n(p,"previewArtifact",f),a(p,i)});const u=l.config.client_lazy_loaders||{};Object.keys(u).forEach(f=>{const p=`${i}--${f}`;n(p,"previewArtifact",f),a(p,i)}),(l.spec.upstream_steps||[]).filter(f=>!Object.values(o).some(p=>p.step_name===f)).forEach(f=>a(f,i))}),{nodes:t,edges:r}}function Ia(e){const t=[];return Object.keys(e).forEach(r=>{var l,o;const n=e[r];t.push({id:r,type:"step",data:n});const a=(l=n.body)==null?void 0:l.outputs;Object.entries(a||{}).forEach(([c,d])=>{const u=`${r}--${c}`;t.push({id:u,type:"artifact",data:{...d,name:c}})});const i=(o=n.body)==null?void 0:o.inputs;Object.entries(i||{}).forEach(([c,d])=>{const u=`${r}--${c}`;t.find(h=>h.id===u)||t.push({id:u,type:"artifact",data:{...d,name:c}})})}),t}var $a="\0",ue="\0",It="";let Pa=class{constructor(t){w(this,"_isDirected",!0);w(this,"_isMultigraph",!1);w(this,"_isCompound",!1);w(this,"_label");w(this,"_defaultNodeLabelFn",()=>{});w(this,"_defaultEdgeLabelFn",()=>{});w(this,"_nodes",{});w(this,"_in",{});w(this,"_preds",{});w(this,"_out",{});w(this,"_sucs",{});w(this,"_edgeObjs",{});w(this,"_edgeLabels",{});w(this,"_nodeCount",0);w(this,"_edgeCount",0);w(this,"_parent");w(this,"_children");t&&(this._isDirected=Object.hasOwn(t,"directed")?t.directed:!0,this._isMultigraph=Object.hasOwn(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.hasOwn(t,"compound")?t.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[ue]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return this._defaultNodeLabelFn=t,typeof t!="function"&&(this._defaultNodeLabelFn=()=>t),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var t=this;return this.nodes().filter(r=>Object.keys(t._in[r]).length===0)}sinks(){var t=this;return this.nodes().filter(r=>Object.keys(t._out[r]).length===0)}setNodes(t,r){var n=arguments,a=this;return t.forEach(function(i){n.length>1?a.setNode(i,r):a.setNode(i)}),this}setNode(t,r){return Object.hasOwn(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=ue,this._children[t]={},this._children[ue][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.hasOwn(this._nodes,t)}removeNode(t){var r=this;if(Object.hasOwn(this._nodes,t)){var n=a=>r.removeEdge(r._edgeObjs[a]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach(function(a){r.setParent(a)}),delete this._children[t]),Object.keys(this._in[t]).forEach(n),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r===void 0)r=ue;else{r+="";for(var n=r;n!==void 0;n=this.parent(n))if(n===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==ue)return r}}children(t=ue){if(this._isCompound){var r=this._children[t];if(r)return Object.keys(r)}else{if(t===ue)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Object.keys(r)}successors(t){var r=this._sucs[t];if(r)return Object.keys(r)}neighbors(t){var r=this.predecessors(t);if(r){const a=new Set(r);for(var n of this.successors(t))a.add(n);return Array.from(a.values())}}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach(function([l,o]){t(l)&&r.setNode(l,o)}),Object.values(this._edgeObjs).forEach(function(l){r.hasNode(l.v)&&r.hasNode(l.w)&&r.setEdge(l,n.edge(l))});var a={};function i(l){var o=n.parent(l);return o===void 0||r.hasNode(o)?(a[l]=o,o):o in a?a[o]:i(o)}return this._isCompound&&r.nodes().forEach(l=>r.setParent(l,i(l))),r}setDefaultEdgeLabel(t){return this._defaultEdgeLabelFn=t,typeof t!="function"&&(this._defaultEdgeLabelFn=()=>t),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,r){var n=this,a=arguments;return t.reduce(function(i,l){return a.length>1?n.setEdge(i,l,r):n.setEdge(i,l),l}),this}setEdge(){var t,r,n,a,i=!1,l=arguments[0];typeof l=="object"&&l!==null&&"v"in l?(t=l.v,r=l.w,n=l.name,arguments.length===2&&(a=arguments[1],i=!0)):(t=l,r=arguments[1],n=arguments[3],arguments.length>2&&(a=arguments[2],i=!0)),t=""+t,r=""+r,n!==void 0&&(n=""+n);var o=Ee(this._isDirected,t,r,n);if(Object.hasOwn(this._edgeLabels,o))return i&&(this._edgeLabels[o]=a),this;if(n!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[o]=i?a:this._defaultEdgeLabelFn(t,r,n);var c=Ma(this._isDirected,t,r,n);return t=c.v,r=c.w,Object.freeze(c),this._edgeObjs[o]=c,$t(this._preds[r],t),$t(this._sucs[t],r),this._in[r][o]=c,this._out[t][o]=c,this._edgeCount++,this}edge(t,r,n){var a=arguments.length===1?We(this._isDirected,arguments[0]):Ee(this._isDirected,t,r,n);return this._edgeLabels[a]}edgeAsObj(){const t=this.edge(...arguments);return typeof t!="object"?{label:t}:t}hasEdge(t,r,n){var a=arguments.length===1?We(this._isDirected,arguments[0]):Ee(this._isDirected,t,r,n);return Object.hasOwn(this._edgeLabels,a)}removeEdge(t,r,n){var a=arguments.length===1?We(this._isDirected,arguments[0]):Ee(this._isDirected,t,r,n),i=this._edgeObjs[a];return i&&(t=i.v,r=i.w,delete this._edgeLabels[a],delete this._edgeObjs[a],Pt(this._preds[r],t),Pt(this._sucs[t],r),delete this._in[r][a],delete this._out[t][a],this._edgeCount--),this}inEdges(t,r){var n=this._in[t];if(n){var a=Object.values(n);return r?a.filter(i=>i.v===r):a}}outEdges(t,r){var n=this._out[t];if(n){var a=Object.values(n);return r?a.filter(i=>i.w===r):a}}nodeEdges(t,r){var n=this.inEdges(t,r);if(n)return n.concat(this.outEdges(t,r))}};function $t(e,t){e[t]?e[t]++:e[t]=1}function Pt(e,t){--e[t]||delete e[t]}function Ee(e,t,r,n){var a=""+t,i=""+r;if(!e&&a>i){var l=a;a=i,i=l}return a+It+i+It+(n===void 0?$a:n)}function Ma(e,t,r,n){var a=""+t,i=""+r;if(!e&&a>i){var l=a;a=i,i=l}var o={v:a,w:i};return n&&(o.name=n),o}function We(e,t){return Ee(e,t.v,t.w,t.name)}var ht=Pa,Ra="2.2.4",Da={Graph:ht,version:Ra},Va=ht,Aa={write:Fa,read:Ha};function Fa(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:za(e),edges:Ba(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function za(e){return e.nodes().map(function(t){var r=e.node(t),n=e.parent(t),a={v:t};return r!==void 0&&(a.value=r),n!==void 0&&(a.parent=n),a})}function Ba(e){return e.edges().map(function(t){var r=e.edge(t),n={v:t.v,w:t.w};return t.name!==void 0&&(n.name=t.name),r!==void 0&&(n.value=r),n})}function Ha(e){var t=new Va(e.options).setGraph(e.value);return e.nodes.forEach(function(r){t.setNode(r.v,r.value),r.parent&&t.setParent(r.v,r.parent)}),e.edges.forEach(function(r){t.setEdge({v:r.v,w:r.w,name:r.name},r.value)}),t}var Ga=Za;function Za(e){var t={},r=[],n;function a(i){Object.hasOwn(t,i)||(t[i]=!0,n.push(i),e.successors(i).forEach(a),e.predecessors(i).forEach(a))}return e.nodes().forEach(function(i){n=[],a(i),n.length&&r.push(n)}),r}let qa=class{constructor(){w(this,"_arr",[]);w(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(t){return t.key})}has(t){return Object.hasOwn(this._keyIndices,t)}priority(t){var r=this._keyIndices[t];if(r!==void 0)return this._arr[r].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(t,r){var n=this._keyIndices;if(t=String(t),!Object.hasOwn(n,t)){var a=this._arr,i=a.length;return n[t]=i,a.push({key:t,priority:r}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key}decrease(t,r){var n=this._keyIndices[t];if(r>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+r);this._arr[n].priority=r,this._decrease(n)}_heapify(t){var r=this._arr,n=2*t,a=n+1,i=t;n<r.length&&(i=r[n].priority<r[i].priority?n:i,a<r.length&&(i=r[a].priority<r[i].priority?a:i),i!==t&&(this._swap(t,i),this._heapify(i)))}_decrease(t){for(var r=this._arr,n=r[t].priority,a;t!==0&&(a=t>>1,!(r[a].priority<n));)this._swap(t,a),t=a}_swap(t,r){var n=this._arr,a=this._keyIndices,i=n[t],l=n[r];n[t]=l,n[r]=i,a[l.key]=t,a[i.key]=r}};var _r=qa,Wa=_r,kr=Ua,Ka=()=>1;function Ua(e,t,r,n){return Ya(e,String(t),r||Ka,n||function(a){return e.outEdges(a)})}function Ya(e,t,r,n){var a={},i=new Wa,l,o,c=function(d){var u=d.v!==l?d.v:d.w,h=a[u],m=r(d),f=o.distance+m;if(m<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+d+" Weight: "+m);f<h.distance&&(h.distance=f,h.predecessor=l,i.decrease(u,f))};for(e.nodes().forEach(function(d){var u=d===t?0:Number.POSITIVE_INFINITY;a[d]={distance:u},i.add(d,u)});i.size()>0&&(l=i.removeMin(),o=a[l],o.distance!==Number.POSITIVE_INFINITY);)n(l).forEach(c);return a}var Qa=kr,Xa=Ja;function Ja(e,t,r){return e.nodes().reduce(function(n,a){return n[a]=Qa(e,a,t,r),n},{})}var Or=ei;function ei(e){var t=0,r=[],n={},a=[];function i(l){var o=n[l]={onStack:!0,lowlink:t,index:t++};if(r.push(l),e.successors(l).forEach(function(u){Object.hasOwn(n,u)?n[u].onStack&&(o.lowlink=Math.min(o.lowlink,n[u].index)):(i(u),o.lowlink=Math.min(o.lowlink,n[u].lowlink))}),o.lowlink===o.index){var c=[],d;do d=r.pop(),n[d].onStack=!1,c.push(d);while(l!==d);a.push(c)}}return e.nodes().forEach(function(l){Object.hasOwn(n,l)||i(l)}),a}var ti=Or,ri=si;function si(e){return ti(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}var ni=ii,ai=()=>1;function ii(e,t,r){return li(e,t||ai,r||function(n){return e.outEdges(n)})}function li(e,t,r){var n={},a=e.nodes();return a.forEach(function(i){n[i]={},n[i][i]={distance:0},a.forEach(function(l){i!==l&&(n[i][l]={distance:Number.POSITIVE_INFINITY})}),r(i).forEach(function(l){var o=l.v===i?l.w:l.v,c=t(l);n[i][o]={distance:c,predecessor:i}})}),a.forEach(function(i){var l=n[i];a.forEach(function(o){var c=n[o];a.forEach(function(d){var u=c[i],h=l[d],m=c[d],f=u.distance+h.distance;f<m.distance&&(m.distance=f,m.predecessor=h.predecessor)})})}),n}function Lr(e){var t={},r={},n=[];function a(i){if(Object.hasOwn(r,i))throw new et;Object.hasOwn(t,i)||(r[i]=!0,t[i]=!0,e.predecessors(i).forEach(a),delete r[i],n.push(i))}if(e.sinks().forEach(a),Object.keys(t).length!==e.nodeCount())throw new et;return n}class et extends Error{constructor(){super(...arguments)}}var Sr=Lr;Lr.CycleException=et;var Mt=Sr,oi=ci;function ci(e){try{Mt(e)}catch(t){if(t instanceof Mt.CycleException)return!1;throw t}return!0}var Tr=di;function di(e,t,r){Array.isArray(t)||(t=[t]);var n=e.isDirected()?o=>e.successors(o):o=>e.neighbors(o),a=r==="post"?ui:hi,i=[],l={};return t.forEach(o=>{if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);a(o,n,l,i)}),i}function ui(e,t,r,n){for(var a=[[e,!1]];a.length>0;){var i=a.pop();i[1]?n.push(i[0]):Object.hasOwn(r,i[0])||(r[i[0]]=!0,a.push([i[0],!0]),Ir(t(i[0]),l=>a.push([l,!1])))}}function hi(e,t,r,n){for(var a=[e];a.length>0;){var i=a.pop();Object.hasOwn(r,i)||(r[i]=!0,n.push(i),Ir(t(i),l=>a.push(l)))}}function Ir(e,t){for(var r=e.length;r--;)t(e[r],r,e);return e}var fi=Tr,mi=pi;function pi(e,t){return fi(e,t,"post")}var xi=Tr,gi=ji;function ji(e,t){return xi(e,t,"pre")}var bi=ht,Ci=_r,yi=vi;function vi(e,t){var r=new bi,n={},a=new Ci,i;function l(c){var d=c.v===i?c.w:c.v,u=a.priority(d);if(u!==void 0){var h=t(c);h<u&&(n[d]=i,a.decrease(d,h))}}if(e.nodeCount()===0)return r;e.nodes().forEach(function(c){a.add(c,Number.POSITIVE_INFINITY),r.setNode(c)}),a.decrease(e.nodes()[0],0);for(var o=!1;a.size()>0;){if(i=a.removeMin(),Object.hasOwn(n,i))r.setEdge(i,n[i]);else{if(o)throw new Error("Input graph is not connected: "+e);o=!0}e.nodeEdges(i).forEach(l)}return r}var wi={components:Ga,dijkstra:kr,dijkstraAll:Xa,findCycles:ri,floydWarshall:ni,isAcyclic:oi,postorder:mi,preorder:gi,prim:yi,tarjan:Or,topsort:Sr},Rt=Da,Q={Graph:Rt.Graph,json:Aa,alg:wi,version:Rt.version};let Ni=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,r=t._prev;if(r!==t)return Dt(r),r}enqueue(t){let r=this._sentinel;t._prev&&t._next&&Dt(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){let t=[],r=this._sentinel,n=r._prev;for(;n!==r;)t.push(JSON.stringify(n,Ei)),n=n._prev;return"["+t.join(", ")+"]"}};function Dt(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Ei(e,t){if(e!=="_next"&&e!=="_prev")return t}var _i=Ni;let ki=Q.Graph,Oi=_i;var Li=Ti;let Si=()=>1;function Ti(e,t){if(e.nodeCount()<=1)return[];let r=$i(e,t||Si);return Ii(r.graph,r.buckets,r.zeroIdx).flatMap(a=>e.outEdges(a.v,a.w))}function Ii(e,t,r){let n=[],a=t[t.length-1],i=t[0],l;for(;e.nodeCount();){for(;l=i.dequeue();)Ke(e,t,r,l);for(;l=a.dequeue();)Ke(e,t,r,l);if(e.nodeCount()){for(let o=t.length-2;o>0;--o)if(l=t[o].dequeue(),l){n=n.concat(Ke(e,t,r,l,!0));break}}}return n}function Ke(e,t,r,n,a){let i=a?[]:void 0;return e.inEdges(n.v).forEach(l=>{let o=e.edge(l),c=e.node(l.v);a&&i.push({v:l.v,w:l.w}),c.out-=o,tt(t,r,c)}),e.outEdges(n.v).forEach(l=>{let o=e.edge(l),c=l.w,d=e.node(c);d.in-=o,tt(t,r,d)}),e.removeNode(n.v),i}function $i(e,t){let r=new ki,n=0,a=0;e.nodes().forEach(o=>{r.setNode(o,{v:o,in:0,out:0})}),e.edges().forEach(o=>{let c=r.edge(o.v,o.w)||0,d=t(o),u=c+d;r.setEdge(o.v,o.w,u),a=Math.max(a,r.node(o.v).out+=d),n=Math.max(n,r.node(o.w).in+=d)});let i=Pi(a+n+3).map(()=>new Oi),l=n+1;return r.nodes().forEach(o=>{tt(i,l,r.node(o))}),{graph:r,buckets:i,zeroIdx:l}}function tt(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Pi(e){const t=[];for(let r=0;r<e;r++)t.push(r);return t}let $r=Q.Graph;var N={addBorderNode:Hi,addDummyNode:Pr,applyWithChunking:Be,asNonCompoundGraph:Ri,buildLayerMatrix:Fi,intersectRect:Ai,mapValues:Yi,maxRank:Rr,normalizeRanks:zi,notime:Wi,partition:Zi,pick:Ui,predecessorWeights:Vi,range:Vr,removeEmptyRanks:Bi,simplify:Mi,successorWeights:Di,time:qi,uniqueId:Dr,zipObject:ft};function Pr(e,t,r,n){let a;do a=Dr(n);while(e.hasNode(a));return r.dummy=t,e.setNode(a,r),a}function Mi(e){let t=new $r().setGraph(e.graph());return e.nodes().forEach(r=>t.setNode(r,e.node(r))),e.edges().forEach(r=>{let n=t.edge(r.v,r.w)||{weight:0,minlen:1},a=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+a.weight,minlen:Math.max(n.minlen,a.minlen)})}),t}function Ri(e){let t=new $r({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(r=>{e.children(r).length||t.setNode(r,e.node(r))}),e.edges().forEach(r=>{t.setEdge(r,e.edge(r))}),t}function Di(e){let t=e.nodes().map(r=>{let n={};return e.outEdges(r).forEach(a=>{n[a.w]=(n[a.w]||0)+e.edge(a).weight}),n});return ft(e.nodes(),t)}function Vi(e){let t=e.nodes().map(r=>{let n={};return e.inEdges(r).forEach(a=>{n[a.v]=(n[a.v]||0)+e.edge(a).weight}),n});return ft(e.nodes(),t)}function Ai(e,t){let r=e.x,n=e.y,a=t.x-r,i=t.y-n,l=e.width/2,o=e.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");let c,d;return Math.abs(i)*l>Math.abs(a)*o?(i<0&&(o=-o),c=o*a/i,d=o):(a<0&&(l=-l),c=l,d=l*i/a),{x:r+c,y:n+d}}function Fi(e){let t=Vr(Rr(e)+1).map(()=>[]);return e.nodes().forEach(r=>{let n=e.node(r),a=n.rank;a!==void 0&&(t[a][n.order]=r)}),t}function zi(e){let t=e.nodes().map(n=>{let a=e.node(n).rank;return a===void 0?Number.MAX_VALUE:a}),r=Be(Math.min,t);e.nodes().forEach(n=>{let a=e.node(n);Object.hasOwn(a,"rank")&&(a.rank-=r)})}function Bi(e){let t=e.nodes().map(l=>e.node(l).rank),r=Be(Math.min,t),n=[];e.nodes().forEach(l=>{let o=e.node(l).rank-r;n[o]||(n[o]=[]),n[o].push(l)});let a=0,i=e.graph().nodeRankFactor;Array.from(n).forEach((l,o)=>{l===void 0&&o%i!==0?--a:l!==void 0&&a&&l.forEach(c=>e.node(c).rank+=a)})}function Hi(e,t,r,n){let a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=n),Pr(e,"border",a,t)}function Gi(e,t=Mr){const r=[];for(let n=0;n<e.length;n+=t){const a=e.slice(n,n+t);r.push(a)}return r}const Mr=65535;function Be(e,t){if(t.length>Mr){const r=Gi(t);return e.apply(null,r.map(n=>e.apply(null,n)))}else return e.apply(null,t)}function Rr(e){const r=e.nodes().map(n=>{let a=e.node(n).rank;return a===void 0?Number.MIN_VALUE:a});return Be(Math.max,r)}function Zi(e,t){let r={lhs:[],rhs:[]};return e.forEach(n=>{t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function qi(e,t){let r=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-r)+"ms")}}function Wi(e,t){return t()}let Ki=0;function Dr(e){var t=++Ki;return toString(e)+t}function Vr(e,t,r=1){t==null&&(t=e,e=0);let n=i=>i<t;r<0&&(n=i=>t<i);const a=[];for(let i=e;n(i);i+=r)a.push(i);return a}function Ui(e,t){const r={};for(const n of t)e[n]!==void 0&&(r[n]=e[n]);return r}function Yi(e,t){let r=t;return typeof t=="string"&&(r=n=>n[t]),Object.entries(e).reduce((n,[a,i])=>(n[a]=r(i,a),n),{})}function ft(e,t){return e.reduce((r,n,a)=>(r[n]=t[a],r),{})}let Qi=Li,Xi=N.uniqueId;var Ji={run:el,undo:rl};function el(e){(e.graph().acyclicer==="greedy"?Qi(e,r(e)):tl(e)).forEach(n=>{let a=e.edge(n);e.removeEdge(n),a.forwardName=n.name,a.reversed=!0,e.setEdge(n.w,n.v,a,Xi("rev"))});function r(n){return a=>n.edge(a).weight}}function tl(e){let t=[],r={},n={};function a(i){Object.hasOwn(n,i)||(n[i]=!0,r[i]=!0,e.outEdges(i).forEach(l=>{Object.hasOwn(r,l.w)?t.push(l):a(l.w)}),delete r[i])}return e.nodes().forEach(a),t}function rl(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.reversed){e.removeEdge(t);let n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}let sl=N;var nl={run:al,undo:ll};function al(e){e.graph().dummyChains=[],e.edges().forEach(t=>il(e,t))}function il(e,t){let r=t.v,n=e.node(r).rank,a=t.w,i=e.node(a).rank,l=t.name,o=e.edge(t),c=o.labelRank;if(i===n+1)return;e.removeEdge(t);let d,u,h;for(h=0,++n;n<i;++h,++n)o.points=[],u={width:0,height:0,edgeLabel:o,edgeObj:t,rank:n},d=sl.addDummyNode(e,"edge",u,"_d"),n===c&&(u.width=o.width,u.height=o.height,u.dummy="edge-label",u.labelpos=o.labelpos),e.setEdge(r,d,{weight:o.weight},l),h===0&&e.graph().dummyChains.push(d),r=d;e.setEdge(r,a,{weight:o.weight},l)}function ll(e){e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeLabel,a;for(e.setEdge(r.edgeObj,n);r.dummy;)a=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=a,r=e.node(t)})}const{applyWithChunking:ol}=N;var He={longestPath:cl,slack:dl};function cl(e){var t={};function r(n){var a=e.node(n);if(Object.hasOwn(t,n))return a.rank;t[n]=!0;let i=e.outEdges(n).map(o=>o==null?Number.POSITIVE_INFINITY:r(o.w)-e.edge(o).minlen);var l=ol(Math.min,i);return l===Number.POSITIVE_INFINITY&&(l=0),a.rank=l}e.sources().forEach(r)}function dl(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var ul=Q.Graph,Re=He.slack,Ar=hl;function hl(e){var t=new ul({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var a,i;fl(t,e)<n;)a=ml(t,e),i=t.hasNode(a.v)?Re(e,a):-Re(e,a),pl(t,e,i);return t}function fl(e,t){function r(n){t.nodeEdges(n).forEach(a=>{var i=a.v,l=n===i?a.w:i;!e.hasNode(l)&&!Re(t,a)&&(e.setNode(l,{}),e.setEdge(n,l,{}),r(l))})}return e.nodes().forEach(r),e.nodeCount()}function ml(e,t){return t.edges().reduce((n,a)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(a.v)!==e.hasNode(a.w)&&(i=Re(t,a)),i<n[0]?[i,a]:n},[Number.POSITIVE_INFINITY,null])[1]}function pl(e,t,r){e.nodes().forEach(n=>t.node(n).rank+=r)}var xl=Ar,Vt=He.slack,gl=He.longestPath,jl=Q.alg.preorder,bl=Q.alg.postorder,Cl=N.simplify,yl=me;me.initLowLimValues=pt;me.initCutValues=mt;me.calcCutValue=Fr;me.leaveEdge=Br;me.enterEdge=Hr;me.exchangeEdges=Gr;function me(e){e=Cl(e),gl(e);var t=xl(e);pt(t),mt(t,e);for(var r,n;r=Br(t);)n=Hr(t,e,r),Gr(t,e,r,n)}function mt(e,t){var r=bl(e,e.nodes());r=r.slice(0,r.length-1),r.forEach(n=>vl(e,t,n))}function vl(e,t,r){var n=e.node(r),a=n.parent;e.edge(r,a).cutvalue=Fr(e,t,r)}function Fr(e,t,r){var n=e.node(r),a=n.parent,i=!0,l=t.edge(r,a),o=0;return l||(i=!1,l=t.edge(a,r)),o=l.weight,t.nodeEdges(r).forEach(c=>{var d=c.v===r,u=d?c.w:c.v;if(u!==a){var h=d===i,m=t.edge(c).weight;if(o+=h?m:-m,Nl(e,r,u)){var f=e.edge(r,u).cutvalue;o+=h?-f:f}}}),o}function pt(e,t){arguments.length<2&&(t=e.nodes()[0]),zr(e,{},1,t)}function zr(e,t,r,n,a){var i=r,l=e.node(n);return t[n]=!0,e.neighbors(n).forEach(o=>{Object.hasOwn(t,o)||(r=zr(e,t,r,o,n))}),l.low=i,l.lim=r++,a?l.parent=a:delete l.parent,r}function Br(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function Hr(e,t,r){var n=r.v,a=r.w;t.hasEdge(n,a)||(n=r.w,a=r.v);var i=e.node(n),l=e.node(a),o=i,c=!1;i.lim>l.lim&&(o=l,c=!0);var d=t.edges().filter(u=>c===At(e,e.node(u.v),o)&&c!==At(e,e.node(u.w),o));return d.reduce((u,h)=>Vt(t,h)<Vt(t,u)?h:u)}function Gr(e,t,r,n){var a=r.v,i=r.w;e.removeEdge(a,i),e.setEdge(n.v,n.w,{}),pt(e),mt(e,t),wl(e,t)}function wl(e,t){var r=e.nodes().find(a=>!t.node(a).parent),n=jl(e,r);n=n.slice(1),n.forEach(a=>{var i=e.node(a).parent,l=t.edge(a,i),o=!1;l||(l=t.edge(i,a),o=!0),t.node(a).rank=t.node(i).rank+(o?l.minlen:-l.minlen)})}function Nl(e,t,r){return e.hasEdge(t,r)}function At(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var El=He,Zr=El.longestPath,_l=Ar,kl=yl,Ol=Ll;function Ll(e){switch(e.graph().ranker){case"network-simplex":Ft(e);break;case"tight-tree":Tl(e);break;case"longest-path":Sl(e);break;default:Ft(e)}}var Sl=Zr;function Tl(e){Zr(e),_l(e)}function Ft(e){kl(e)}var Il=$l;function $l(e){let t=Ml(e);e.graph().dummyChains.forEach(r=>{let n=e.node(r),a=n.edgeObj,i=Pl(e,t,a.v,a.w),l=i.path,o=i.lca,c=0,d=l[c],u=!0;for(;r!==a.w;){if(n=e.node(r),u){for(;(d=l[c])!==o&&e.node(d).maxRank<n.rank;)c++;d===o&&(u=!1)}if(!u){for(;c<l.length-1&&e.node(d=l[c+1]).minRank<=n.rank;)c++;d=l[c]}e.setParent(r,d),r=e.successors(r)[0]}})}function Pl(e,t,r,n){let a=[],i=[],l=Math.min(t[r].low,t[n].low),o=Math.max(t[r].lim,t[n].lim),c,d;c=r;do c=e.parent(c),a.push(c);while(c&&(t[c].low>l||o>t[c].lim));for(d=c,c=n;(c=e.parent(c))!==d;)i.push(c);return{path:a.concat(i.reverse()),lca:d}}function Ml(e){let t={},r=0;function n(a){let i=r;e.children(a).forEach(n),t[a]={low:i,lim:r++}}return e.children().forEach(n),t}let De=N;var Rl={run:Dl,cleanup:Fl};function Dl(e){let t=De.addDummyNode(e,"root",{},"_root"),r=Vl(e),n=Object.values(r),a=De.applyWithChunking(Math.max,n)-1,i=2*a+1;e.graph().nestingRoot=t,e.edges().forEach(o=>e.edge(o).minlen*=i);let l=Al(e)+1;e.children().forEach(o=>qr(e,t,i,l,a,r,o)),e.graph().nodeRankFactor=i}function qr(e,t,r,n,a,i,l){let o=e.children(l);if(!o.length){l!==t&&e.setEdge(t,l,{weight:0,minlen:r});return}let c=De.addBorderNode(e,"_bt"),d=De.addBorderNode(e,"_bb"),u=e.node(l);e.setParent(c,l),u.borderTop=c,e.setParent(d,l),u.borderBottom=d,o.forEach(h=>{qr(e,t,r,n,a,i,h);let m=e.node(h),f=m.borderTop?m.borderTop:h,p=m.borderBottom?m.borderBottom:h,b=m.borderTop?n:2*n,v=f!==p?1:a-i[l]+1;e.setEdge(c,f,{weight:b,minlen:v,nestingEdge:!0}),e.setEdge(p,d,{weight:b,minlen:v,nestingEdge:!0})}),e.parent(l)||e.setEdge(t,c,{weight:0,minlen:a+i[l]})}function Vl(e){var t={};function r(n,a){var i=e.children(n);i&&i.length&&i.forEach(l=>r(l,a+1)),t[n]=a}return e.children().forEach(n=>r(n,1)),t}function Al(e){return e.edges().reduce((t,r)=>t+e.edge(r).weight,0)}function Fl(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(r=>{var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}let zl=N;var Bl=Hl;function Hl(e){function t(r){let n=e.children(r),a=e.node(r);if(n.length&&n.forEach(t),Object.hasOwn(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(let i=a.minRank,l=a.maxRank+1;i<l;++i)zt(e,"borderLeft","_bl",r,a,i),zt(e,"borderRight","_br",r,a,i)}}e.children().forEach(t)}function zt(e,t,r,n,a,i){let l={width:0,height:0,rank:i,borderType:t},o=a[t][i-1],c=zl.addDummyNode(e,"border",l,r);a[t][i]=c,e.setParent(c,n),o&&e.setEdge(o,c,{weight:1})}var Gl={adjust:Zl,undo:ql};function Zl(e){let t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Wr(e)}function ql(e){let t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&Wl(e),(t==="lr"||t==="rl")&&(Kl(e),Wr(e))}function Wr(e){e.nodes().forEach(t=>Bt(e.node(t))),e.edges().forEach(t=>Bt(e.edge(t)))}function Bt(e){let t=e.width;e.width=e.height,e.height=t}function Wl(e){e.nodes().forEach(t=>Ue(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);r.points.forEach(Ue),Object.hasOwn(r,"y")&&Ue(r)})}function Ue(e){e.y=-e.y}function Kl(e){e.nodes().forEach(t=>Ye(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);r.points.forEach(Ye),Object.hasOwn(r,"x")&&Ye(r)})}function Ye(e){let t=e.x;e.x=e.y,e.y=t}let Ht=N;var Ul=Yl;function Yl(e){let t={},r=e.nodes().filter(c=>!e.children(c).length),n=r.map(c=>e.node(c).rank),a=Ht.applyWithChunking(Math.max,n),i=Ht.range(a+1).map(()=>[]);function l(c){if(t[c])return;t[c]=!0;let d=e.node(c);i[d.rank].push(c),e.successors(c).forEach(l)}return r.sort((c,d)=>e.node(c).rank-e.node(d).rank).forEach(l),i}let Ql=N.zipObject;var Xl=Jl;function Jl(e,t){let r=0;for(let n=1;n<t.length;++n)r+=e1(e,t[n-1],t[n]);return r}function e1(e,t,r){let n=Ql(r,r.map((d,u)=>u)),a=t.flatMap(d=>e.outEdges(d).map(u=>({pos:n[u.w],weight:e.edge(u).weight})).sort((u,h)=>u.pos-h.pos)),i=1;for(;i<r.length;)i<<=1;let l=2*i-1;i-=1;let o=new Array(l).fill(0),c=0;return a.forEach(d=>{let u=d.pos+i;o[u]+=d.weight;let h=0;for(;u>0;)u%2&&(h+=o[u+1]),u=u-1>>1,o[u]+=d.weight;c+=d.weight*h}),c}var t1=r1;function r1(e,t=[]){return t.map(r=>{let n=e.inEdges(r);if(n.length){let a=n.reduce((i,l)=>{let o=e.edge(l),c=e.node(l.v);return{sum:i.sum+o.weight*c.order,weight:i.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}let s1=N;var n1=a1;function a1(e,t){let r={};e.forEach((a,i)=>{let l=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i};a.barycenter!==void 0&&(l.barycenter=a.barycenter,l.weight=a.weight)}),t.edges().forEach(a=>{let i=r[a.v],l=r[a.w];i!==void 0&&l!==void 0&&(l.indegree++,i.out.push(r[a.w]))});let n=Object.values(r).filter(a=>!a.indegree);return i1(n)}function i1(e){let t=[];function r(a){return i=>{i.merged||(i.barycenter===void 0||a.barycenter===void 0||i.barycenter>=a.barycenter)&&l1(a,i)}}function n(a){return i=>{i.in.push(a),--i.indegree===0&&e.push(i)}}for(;e.length;){let a=e.pop();t.push(a),a.in.reverse().forEach(r(a)),a.out.forEach(n(a))}return t.filter(a=>!a.merged).map(a=>s1.pick(a,["vs","i","barycenter","weight"]))}function l1(e,t){let r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}let o1=N;var c1=d1;function d1(e,t){let r=o1.partition(e,u=>Object.hasOwn(u,"barycenter")),n=r.lhs,a=r.rhs.sort((u,h)=>h.i-u.i),i=[],l=0,o=0,c=0;n.sort(u1(!!t)),c=Gt(i,a,c),n.forEach(u=>{c+=u.vs.length,i.push(u.vs),l+=u.barycenter*u.weight,o+=u.weight,c=Gt(i,a,c)});let d={vs:i.flat(!0)};return o&&(d.barycenter=l/o,d.weight=o),d}function Gt(e,t,r){let n;for(;t.length&&(n=t[t.length-1]).i<=r;)t.pop(),e.push(n.vs),r++;return r}function u1(e){return(t,r)=>t.barycenter<r.barycenter?-1:t.barycenter>r.barycenter?1:e?r.i-t.i:t.i-r.i}let h1=t1,f1=n1,m1=c1;var p1=Kr;function Kr(e,t,r,n){let a=e.children(t),i=e.node(t),l=i?i.borderLeft:void 0,o=i?i.borderRight:void 0,c={};l&&(a=a.filter(m=>m!==l&&m!==o));let d=h1(e,a);d.forEach(m=>{if(e.children(m.v).length){let f=Kr(e,m.v,r,n);c[m.v]=f,Object.hasOwn(f,"barycenter")&&g1(m,f)}});let u=f1(d,r);x1(u,c);let h=m1(u,n);if(l&&(h.vs=[l,h.vs,o].flat(!0),e.predecessors(l).length)){let m=e.node(e.predecessors(l)[0]),f=e.node(e.predecessors(o)[0]);Object.hasOwn(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+m.order+f.order)/(h.weight+2),h.weight+=2}return h}function x1(e,t){e.forEach(r=>{r.vs=r.vs.flatMap(n=>t[n]?t[n].vs:n)})}function g1(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}let j1=Q.Graph,b1=N;var C1=y1;function y1(e,t,r){let n=v1(e),a=new j1({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(i=>e.node(i));return e.nodes().forEach(i=>{let l=e.node(i),o=e.parent(i);(l.rank===t||l.minRank<=t&&t<=l.maxRank)&&(a.setNode(i),a.setParent(i,o||n),e[r](i).forEach(c=>{let d=c.v===i?c.w:c.v,u=a.edge(d,i),h=u!==void 0?u.weight:0;a.setEdge(d,i,{weight:e.edge(c).weight+h})}),Object.hasOwn(l,"minRank")&&a.setNode(i,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]}))}),a}function v1(e){for(var t;e.hasNode(t=b1.uniqueId("_root")););return t}var w1=N1;function N1(e,t,r){let n={},a;r.forEach(i=>{let l=e.parent(i),o,c;for(;l;){if(o=e.parent(l),o?(c=n[o],n[o]=l):(c=a,a=l),c&&c!==l){t.setEdge(c,l);return}l=o}})}let E1=Ul,_1=Xl,k1=p1,O1=C1,L1=w1,S1=Q.Graph,Te=N;var T1=Ur;function Ur(e,t){if(t&&typeof t.customOrder=="function"){t.customOrder(e,Ur);return}let r=Te.maxRank(e),n=Zt(e,Te.range(1,r+1),"inEdges"),a=Zt(e,Te.range(r-1,-1,-1),"outEdges"),i=E1(e);if(qt(e,i),t&&t.disableOptimalOrderHeuristic)return;let l=Number.POSITIVE_INFINITY,o;for(let c=0,d=0;d<4;++c,++d){I1(c%2?n:a,c%4>=2),i=Te.buildLayerMatrix(e);let u=_1(e,i);u<l&&(d=0,o=Object.assign({},i),l=u)}qt(e,o)}function Zt(e,t,r){return t.map(function(n){return O1(e,n,r)})}function I1(e,t){let r=new S1;e.forEach(function(n){let a=n.graph().root,i=k1(n,a,r,t);i.vs.forEach((l,o)=>n.node(l).order=o),L1(n,r,i.vs)})}function qt(e,t){Object.values(t).forEach(r=>r.forEach((n,a)=>e.node(n).order=a))}let $1=Q.Graph,re=N;var P1={positionX:D1,findType1Conflicts:Yr,findType2Conflicts:Qr,addConflict:xt,hasConflict:Xr,verticalAlignment:Jr,horizontalCompaction:es,alignCoordinates:rs,findSmallestWidthAlignment:ts,balance:ss};function Yr(e,t){let r={};function n(a,i){let l=0,o=0,c=a.length,d=i[i.length-1];return i.forEach((u,h)=>{let m=M1(e,u),f=m?e.node(m).order:c;(m||u===d)&&(i.slice(o,h+1).forEach(p=>{e.predecessors(p).forEach(b=>{let v=e.node(b),E=v.order;(E<l||f<E)&&!(v.dummy&&e.node(p).dummy)&&xt(r,b,p)})}),o=h+1,l=f)}),i}return t.length&&t.reduce(n),r}function Qr(e,t){let r={};function n(i,l,o,c,d){let u;re.range(l,o).forEach(h=>{u=i[h],e.node(u).dummy&&e.predecessors(u).forEach(m=>{let f=e.node(m);f.dummy&&(f.order<c||f.order>d)&&xt(r,m,u)})})}function a(i,l){let o=-1,c,d=0;return l.forEach((u,h)=>{if(e.node(u).dummy==="border"){let m=e.predecessors(u);m.length&&(c=e.node(m[0]).order,n(l,d,h,o,c),d=h,o=c)}n(l,d,l.length,c,i.length)}),l}return t.length&&t.reduce(a),r}function M1(e,t){if(e.node(t).dummy)return e.predecessors(t).find(r=>e.node(r).dummy)}function xt(e,t,r){if(t>r){let a=t;t=r,r=a}let n=e[t];n||(e[t]=n={}),n[r]=!0}function Xr(e,t,r){if(t>r){let n=t;t=r,r=n}return!!e[t]&&Object.hasOwn(e[t],r)}function Jr(e,t,r,n){let a={},i={},l={};return t.forEach(o=>{o.forEach((c,d)=>{a[c]=c,i[c]=c,l[c]=d})}),t.forEach(o=>{let c=-1;o.forEach(d=>{let u=n(d);if(u.length){u=u.sort((m,f)=>l[m]-l[f]);let h=(u.length-1)/2;for(let m=Math.floor(h),f=Math.ceil(h);m<=f;++m){let p=u[m];i[d]===d&&c<l[p]&&!Xr(r,d,p)&&(i[p]=d,i[d]=a[d]=a[p],c=l[p])}}})}),{root:a,align:i}}function es(e,t,r,n,a){let i={},l=R1(e,t,r,a),o=a?"borderLeft":"borderRight";function c(h,m){let f=l.nodes(),p=f.pop(),b={};for(;p;)b[p]?h(p):(b[p]=!0,f.push(p),f=f.concat(m(p))),p=f.pop()}function d(h){i[h]=l.inEdges(h).reduce((m,f)=>Math.max(m,i[f.v]+l.edge(f)),0)}function u(h){let m=l.outEdges(h).reduce((p,b)=>Math.min(p,i[b.w]-l.edge(b)),Number.POSITIVE_INFINITY),f=e.node(h);m!==Number.POSITIVE_INFINITY&&f.borderType!==o&&(i[h]=Math.max(i[h],m))}return c(d,l.predecessors.bind(l)),c(u,l.successors.bind(l)),Object.keys(n).forEach(h=>i[h]=i[r[h]]),i}function R1(e,t,r,n){let a=new $1,i=e.graph(),l=V1(i.nodesep,i.edgesep,n);return t.forEach(o=>{let c;o.forEach(d=>{let u=r[d];if(a.setNode(u),c){var h=r[c],m=a.edge(h,u);a.setEdge(h,u,Math.max(l(e,d,c),m||0))}c=d})}),a}function ts(e,t){return Object.values(t).reduce((r,n)=>{let a=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(n).forEach(([o,c])=>{let d=A1(e,o)/2;a=Math.max(c+d,a),i=Math.min(c-d,i)});const l=a-i;return l<r[0]&&(r=[l,n]),r},[Number.POSITIVE_INFINITY,null])[1]}function rs(e,t){let r=Object.values(t),n=re.applyWithChunking(Math.min,r),a=re.applyWithChunking(Math.max,r);["u","d"].forEach(i=>{["l","r"].forEach(l=>{let o=i+l,c=e[o];if(c===t)return;let d=Object.values(c),u=n-re.applyWithChunking(Math.min,d);l!=="l"&&(u=a-re.applyWithChunking(Math.max,d)),u&&(e[o]=re.mapValues(c,h=>h+u))})})}function ss(e,t){return re.mapValues(e.ul,(r,n)=>{if(t)return e[t.toLowerCase()][n];{let a=Object.values(e).map(i=>i[n]).sort((i,l)=>i-l);return(a[1]+a[2])/2}})}function D1(e){let t=re.buildLayerMatrix(e),r=Object.assign(Yr(e,t),Qr(e,t)),n={},a;["u","d"].forEach(l=>{a=l==="u"?t:Object.values(t).reverse(),["l","r"].forEach(o=>{o==="r"&&(a=a.map(h=>Object.values(h).reverse()));let c=(l==="u"?e.predecessors:e.successors).bind(e),d=Jr(e,a,r,c),u=es(e,a,d.root,d.align,o==="r");o==="r"&&(u=re.mapValues(u,h=>-h)),n[l+o]=u})});let i=ts(e,n);return rs(n,i),ss(n,e.graph().align)}function V1(e,t,r){return(n,a,i)=>{let l=n.node(a),o=n.node(i),c=0,d;if(c+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":d=-l.width/2;break;case"r":d=l.width/2;break}if(d&&(c+=r?d:-d),d=0,c+=(l.dummy?t:e)/2,c+=(o.dummy?t:e)/2,c+=o.width/2,Object.hasOwn(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":d=o.width/2;break;case"r":d=-o.width/2;break}return d&&(c+=r?d:-d),d=0,c}}function A1(e,t){return e.node(t).width}let ns=N,F1=P1.positionX;var z1=B1;function B1(e){e=ns.asNonCompoundGraph(e),H1(e),Object.entries(F1(e)).forEach(([t,r])=>e.node(t).x=r)}function H1(e){let t=ns.buildLayerMatrix(e),r=e.graph().ranksep,n=0;t.forEach(a=>{const i=a.reduce((l,o)=>{const c=e.node(o).height;return l>c?l:c},0);a.forEach(l=>e.node(l).y=n+i/2),n+=i+r})}let Wt=Ji,Kt=nl,G1=Ol,Z1=N.normalizeRanks,q1=Il,W1=N.removeEmptyRanks,Ut=Rl,K1=Bl,Yt=Gl,U1=T1,Y1=z1,G=N,Q1=Q.Graph;var X1=J1;function J1(e,t){let r=t&&t.debugTiming?G.time:G.notime;r("layout",()=>{let n=r(" buildLayoutGraph",()=>co(e));r(" runLayout",()=>eo(n,r,t)),r(" updateInputGraph",()=>to(e,n))})}function eo(e,t,r){t(" makeSpaceForEdgeLabels",()=>uo(e)),t(" removeSelfEdges",()=>Co(e)),t(" acyclic",()=>Wt.run(e)),t(" nestingGraph.run",()=>Ut.run(e)),t(" rank",()=>G1(G.asNonCompoundGraph(e))),t(" injectEdgeLabelProxies",()=>ho(e)),t(" removeEmptyRanks",()=>W1(e)),t(" nestingGraph.cleanup",()=>Ut.cleanup(e)),t(" normalizeRanks",()=>Z1(e)),t(" assignRankMinMax",()=>fo(e)),t(" removeEdgeLabelProxies",()=>mo(e)),t(" normalize.run",()=>Kt.run(e)),t(" parentDummyChains",()=>q1(e)),t(" addBorderSegments",()=>K1(e)),t(" order",()=>U1(e,r)),t(" insertSelfEdges",()=>yo(e)),t(" adjustCoordinateSystem",()=>Yt.adjust(e)),t(" position",()=>Y1(e)),t(" positionSelfEdges",()=>vo(e)),t(" removeBorderNodes",()=>bo(e)),t(" normalize.undo",()=>Kt.undo(e)),t(" fixupEdgeLabelCoords",()=>go(e)),t(" undoCoordinateSystem",()=>Yt.undo(e)),t(" translateGraph",()=>po(e)),t(" assignNodeIntersects",()=>xo(e)),t(" reversePoints",()=>jo(e)),t(" acyclic.undo",()=>Wt.undo(e))}function to(e,t){e.nodes().forEach(r=>{let n=e.node(r),a=t.node(r);n&&(n.x=a.x,n.y=a.y,n.rank=a.rank,t.children(r).length&&(n.width=a.width,n.height=a.height))}),e.edges().forEach(r=>{let n=e.edge(r),a=t.edge(r);n.points=a.points,Object.hasOwn(a,"x")&&(n.x=a.x,n.y=a.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}let ro=["nodesep","edgesep","ranksep","marginx","marginy"],so={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},no=["acyclicer","ranker","rankdir","align"],ao=["width","height"],Qt={width:0,height:0},io=["minlen","weight","width","height","labeloffset"],lo={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},oo=["labelpos"];function co(e){let t=new Q1({multigraph:!0,compound:!0}),r=Xe(e.graph());return t.setGraph(Object.assign({},so,Qe(r,ro),G.pick(r,no))),e.nodes().forEach(n=>{let a=Xe(e.node(n));const i=Qe(a,ao);Object.keys(Qt).forEach(l=>{i[l]===void 0&&(i[l]=Qt[l])}),t.setNode(n,i),t.setParent(n,e.parent(n))}),e.edges().forEach(n=>{let a=Xe(e.edge(n));t.setEdge(n,Object.assign({},lo,Qe(a,io),G.pick(a,oo)))}),t}function uo(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(r=>{let n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function ho(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.width&&r.height){let n=e.node(t.v),i={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};G.addDummyNode(e,"edge-proxy",i,"_ep")}})}function fo(e){let t=0;e.nodes().forEach(r=>{let n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=Math.max(t,n.maxRank))}),e.graph().maxRank=t}function mo(e){e.nodes().forEach(t=>{let r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function po(e){let t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,a=0,i=e.graph(),l=i.marginx||0,o=i.marginy||0;function c(d){let u=d.x,h=d.y,m=d.width,f=d.height;t=Math.min(t,u-m/2),r=Math.max(r,u+m/2),n=Math.min(n,h-f/2),a=Math.max(a,h+f/2)}e.nodes().forEach(d=>c(e.node(d))),e.edges().forEach(d=>{let u=e.edge(d);Object.hasOwn(u,"x")&&c(u)}),t-=l,n-=o,e.nodes().forEach(d=>{let u=e.node(d);u.x-=t,u.y-=n}),e.edges().forEach(d=>{let u=e.edge(d);u.points.forEach(h=>{h.x-=t,h.y-=n}),Object.hasOwn(u,"x")&&(u.x-=t),Object.hasOwn(u,"y")&&(u.y-=n)}),i.width=r-t+l,i.height=a-n+o}function xo(e){e.edges().forEach(t=>{let r=e.edge(t),n=e.node(t.v),a=e.node(t.w),i,l;r.points?(i=r.points[0],l=r.points[r.points.length-1]):(r.points=[],i=a,l=n),r.points.unshift(G.intersectRect(n,i)),r.points.push(G.intersectRect(a,l))})}function go(e){e.edges().forEach(t=>{let r=e.edge(t);if(Object.hasOwn(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function jo(e){e.edges().forEach(t=>{let r=e.edge(t);r.reversed&&r.points.reverse()})}function bo(e){e.nodes().forEach(t=>{if(e.children(t).length){let r=e.node(t),n=e.node(r.borderTop),a=e.node(r.borderBottom),i=e.node(r.borderLeft[r.borderLeft.length-1]),l=e.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(l.x-i.x),r.height=Math.abs(a.y-n.y),r.x=i.x+r.width/2,r.y=n.y+r.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function Co(e){e.edges().forEach(t=>{if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function yo(e){var t=G.buildLayerMatrix(e);t.forEach(r=>{var n=0;r.forEach((a,i)=>{var l=e.node(a);l.order=i+n,(l.selfEdges||[]).forEach(o=>{G.addDummyNode(e,"selfedge",{width:o.label.width,height:o.label.height,rank:l.rank,order:i+ ++n,e:o.e,label:o.label},"_se")}),delete l.selfEdges})})}function vo(e){e.nodes().forEach(t=>{var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),a=n.x+n.width/2,i=n.y,l=r.x-a,o=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:a+2*l/3,y:i-o},{x:a+5*l/6,y:i-o},{x:a+l,y:i},{x:a+5*l/6,y:i+o},{x:a+2*l/3,y:i+o}],r.label.x=r.x,r.label.y=r.y}})}function Qe(e,t){return G.mapValues(G.pick(e,t),Number)}function Xe(e){var t={};return e&&Object.entries(e).forEach(([r,n])=>{typeof r=="string"&&(r=r.toLowerCase()),t[r]=n}),t}let wo=N,No=Q.Graph;var Eo={debugOrdering:_o};function _o(e){let t=wo.buildLayerMatrix(e),r=new No({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(n=>{r.setNode(n,{label:n}),r.setParent(n,"layer"+e.node(n).rank)}),e.edges().forEach(n=>r.setEdge(n.v,n.w,{},n.name)),t.forEach((n,a)=>{let i="layer"+a;r.setNode(i,{rank:"same"}),n.reduce((l,o)=>(r.setEdge(l,o,{style:"invis"}),o))}),r}var ko="1.1.4",Oo={graphlib:Q,layout:X1,debug:Eo,util:{time:N.time,notime:N.notime},version:ko};const Xt=ls(Oo),Lo=300,So=50,To=50;function Io(e,t){const r=new Xt.graphlib.Graph().setDefaultEdgeLabel(()=>({}));return r.setGraph({rankdir:"TB",ranksep:25,nodesep:10}),!e||!t?{nodes:[],edges:[]}:e.length<1?{nodes:[],edges:[]}:(t.forEach(n=>{r.setEdge(n.source,n.target)}),e.forEach(n=>{r.setNode(n.id,{width:Lo,height:n.type==="step"?To:So})}),Xt.layout(r),{nodes:e.map(n=>{const{x:a,y:i}=r.node(n.id);return{...n,position:{x:a,y:i}}}),edges:t.map(n=>({...n,type:e.length>30?"smoothstep":"smart"}))})}async function $o({deploymentId:e},t){const r=ne(ae.pipeline_deployments.detail(e)),n=await fetch(r,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json",...t}});if(!n.ok){const a=await n.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>`Error while fetching pipeline deployment ${e}`);throw new ee({status:n.status,statusText:n.statusText,message:a})}return n.json()}const gt={all:["pipeline_deployments"],detail:e=>$s({queryKey:[...gt.all,e],queryFn:async()=>$o({deploymentId:e})})};function Po(){var b,v,E,Z,q,W,K,U;const{runId:e}=P(),t=M({runId:e},{refetchInterval:C=>{var y,_;return((_=(y=C.state.data)==null?void 0:y.body)==null?void 0:_.status)==="running"?3e3:!1}}),r=te({...gt.detail((v=(b=t.data)==null?void 0:b.body)==null?void 0:v.deployment_id),enabled:!!((Z=(E=t.data)==null?void 0:E.body)!=null&&Z.deployment_id)}),{fitView:n}=fr(),{width:a,height:i}=dt(C=>({width:C.width,height:C.height})),[l,o,c]=Hs([]),[d,u,h]=Gs([]),m=x.useMemo(()=>{var C,y;return Ta(((y=(C=r.data)==null?void 0:C.metadata)==null?void 0:y.step_configurations)??{})},[(W=(q=r.data)==null?void 0:q.metadata)==null?void 0:W.step_configurations]),f=x.useMemo(()=>{var C,y;return Ia(((y=(C=t.data)==null?void 0:C.metadata)==null?void 0:y.steps)??{})},[(U=(K=t.data)==null?void 0:K.metadata)==null?void 0:U.steps]),p=x.useCallback(()=>{var R,le;const C=m.nodes.map(O=>{var J,oe;const X=f.find(de=>de.id===O.id);return X?{...O,...X}:{...O,data:{...O.data,status:((oe=(J=t.data)==null?void 0:J.body)==null?void 0:oe.status)??"running"}}});Ea(C,f,(le=(R=t.data)==null?void 0:R.metadata)==null?void 0:le.steps,m.edges);const y=m.edges.map(O=>{const X=f.find(J=>J.id===O.target);return{...O,style:{stroke:X?"#9CA3AF":"#D1D5DB",strokeWidth:2}}}),_=Io(C,y);o([..._.nodes]),u([..._.edges]),window.requestAnimationFrame(()=>{n()})},[n,o,u,m,f,t.data]);return x.useEffect(()=>{n()},[a,i]),x.useEffect(()=>{const C=setTimeout(()=>{n({duration:200})},100);return()=>{clearTimeout(C)}},[r.data,t.data]),x.useLayoutEffect(()=>{p()},[p]),{pipelineRun:t,pipelineDeployment:r,nodes:l,edges:d,onNodesChange:c,onEdgesChange:h}}const Mo={step:Na,artifact:zn,previewStep:qn,previewArtifact:Zn},Ro={smart:Un};function Do(){const{pipelineDeployment:e,pipelineRun:t,nodes:r,edges:n,onEdgesChange:a,onNodesChange:i}=Po();return t.isError||e.isError?s.jsx(A,{icon:s.jsx(he,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsx("p",{className:"text-center",children:"There was an error loading the DAG visualization."})}):t.isPending||e.isPending?s.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[s.jsx(st,{}),s.jsx("div",{className:"mt-4 flex flex-col items-center",children:s.jsx("p",{className:"mb-5 text-display-xs",children:"Loading DAG Visualization"})})]}):s.jsx(Zs,{minZoom:-2,connectOnClick:!1,nodesDraggable:!1,nodesConnectable:!1,edgeTypes:Ro,nodeTypes:Mo,nodes:r,edges:n,edgesFocusable:!1,multiSelectionKeyCode:null,onNodesChange:i,onEdgesChange:a,fitView:!0,children:s.jsx(Gn,{refetch:()=>{t.refetch(),e.refetch()}})})}function Vo({open:e,setOpen:t}){const{toast:r}=Cs(),n=ct(),a=cr(),{runId:i}=P(),{mutate:l}=Ps({onSuccess:async()=>{a.invalidateQueries({queryKey:["runs"]}),r({status:"success",emphasis:"subtle",icon:s.jsx(Js,{className:"h-5 w-5 shrink-0 fill-success-700"}),description:"Run deleted successfully",rounded:!0}),t(!1),n(_e.pipelines.overview)},onError:c=>{r({status:"error",emphasis:"subtle",icon:s.jsx(he,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:c.message,rounded:!0})}});async function o(){l({runId:i})}return s.jsx(ys,{open:e,onOpenChange:t,children:s.jsx(Ms,{title:"Delete Run",handleDelete:()=>o(),children:s.jsxs(Rs,{children:[s.jsx("p",{children:"Are you sure?"}),s.jsx("p",{children:"This action cannot be undone."}),s.jsx("p",{children:"Deleting a run here does not guarantee that this run will get deleted in the underlying orchestrator."})]})})})}function Ao(){const[e,t]=x.useState(!1),[r,n]=x.useState(!1);return s.jsxs(s.Fragment,{children:[s.jsx(Vo,{setOpen:t,open:e}),s.jsx(Nt,{modal:r,open:r,onOpenChange:n,children:s.jsxs(Nt,{children:[s.jsxs(vs,{className:"z-10",children:[s.jsx(Qs,{className:"h-5 w-5 shrink-0 fill-theme-text-secondary"}),s.jsx("p",{className:"sr-only",children:"Run Actions"})]}),s.jsx(ws,{className:"z-10",align:"end",sideOffset:1,children:s.jsxs(Ns,{onClick:()=>t(!0),className:"space-x-2",children:[s.jsx(Xs,{className:"h-3 w-3 fill-neutral-400"}),s.jsx("p",{children:"Delete"})]})})]})})]})}function Fo(){var a,i;const{runId:e}=P(),{setCurrentBreadcrumbData:t}=Es(),{data:r,isSuccess:n}=M({runId:e},{throwOnError:!0});return x.useEffect(()=>{var l;r&&((l=r.body)!=null&&l.pipeline?t({segment:"runs",data:r}):t({segment:"runsNoPipelines",data:r}))},[r]),s.jsxs(_s,{className:"flex items-center justify-between",children:[s.jsx("div",{className:"flex items-center gap-1 truncate",children:n?s.jsxs(s.Fragment,{children:[s.jsx(ks,{className:`h-5 w-5 shrink-0 ${Ds((a=r==null?void 0:r.body)==null?void 0:a.status)}`}),s.jsx("h1",{className:"min-w-0 truncate text-display-xs font-semibold",children:r==null?void 0:r.name}),s.jsx(ce,{className:"h-5 w-5 shrink-0",status:(i=r==null?void 0:r.body)==null?void 0:i.status})]}):s.jsxs(s.Fragment,{children:[s.jsx(g,{className:"h-5 w-5"}),s.jsx(g,{className:"h-6 w-[250px]"}),s.jsx(g,{className:"h-5 w-5"})]})}),s.jsx(Ao,{})]})}const zo=e=>x.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},x.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 Bo({runId:e}){const[t,r]=x.useState(!0),n=`from zenml.client import Client
|
8
|
-
run = Client().get_pipeline_run('${e}')
|
9
|
-
config = run.config`;return s.jsxs(je,{open:t,onOpenChange:r,children:[s.jsx(be,{className:"flex items-center gap-[10px]",children:s.jsxs(Ce,{className:"flex w-full items-center gap-[10px]",children:[s.jsx(ve,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Code"]})}),s.jsxs(ye,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[s.jsx("p",{className:"mb-2 text-theme-text-secondary",children:"Get config programmatically"}),s.jsx(I,{fullWidth:!0,highlightCode:!0,wrap:!0,code:n})]})]})}function Ho({run:e}){var n,a;const[t,r]=x.useState(!0);return s.jsxs(je,{open:t,onOpenChange:r,children:[s.jsx(be,{intent:"primary",className:"flex items-center gap-[10px]",children:s.jsxs(Ce,{className:"flex w-full items-center gap-[10px]",children:[s.jsx(ve,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Environment"]})}),s.jsxs(ye,{className:"space-y-3 border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:[s.jsx(se,{isInitialOpen:!0,intent:"secondary",title:"Client Environment",data:(n=e.metadata)==null?void 0:n.client_environment}),s.jsx(se,{isInitialOpen:!0,intent:"secondary",title:"Orchestrator Environment",data:(a=e.metadata)==null?void 0:a.orchestrator_environment})]})]})}function Go({deploymentId:e}){var l,o;const[t,r]=x.useState(!0),{isLoading:n,isError:a,data:i}=te({...gt.detail(e),enabled:!!e});return e?n?s.jsx(g,{className:"h-[150px] w-full"}):a?null:s.jsx(se,{isInitialOpen:!0,title:"Pipeline Parameters",data:(o=(l=i==null?void 0:i.metadata)==null?void 0:l.pipeline_spec)==null?void 0:o.parameters}):s.jsxs(je,{open:t,onOpenChange:r,children:[s.jsxs(be,{intent:"primary",className:"flex items-center gap-[10px]",children:[s.jsx(Ce,{children:s.jsx(ve,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`})}),"Pipeline Parameters"]}),s.jsx(ye,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:"Not available"})]})}function Zo(){var i,l,o,c,d,u,h,m,f,p,b,v;const{runId:e}=P(),{data:t,isError:r,isPending:n}=M({runId:e},{throwOnError:!0}),{data:a}=vr({buildId:(l=(i=t==null?void 0:t.body)==null?void 0:i.build)==null?void 0:l.id},{enabled:!!((c=(o=t==null?void 0:t.body)==null?void 0:o.build)!=null&&c.id)});return r?null:n?s.jsxs("div",{className:"space-y-5",children:[s.jsx(g,{className:"h-[56px] w-full"}),s.jsx(g,{className:"h-[56px] w-full"}),s.jsx(g,{className:"h-[56px] w-full"}),s.jsx(g,{className:"h-[56px] w-full"})]}):s.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[s.jsx(Go,{deploymentId:((d=t.body)==null?void 0:d.deployment_id)??void 0}),((h=(u=a==null?void 0:a.metadata)==null?void 0:u.images)==null?void 0:h.orchestrator)&&s.jsx(yr,{data:(f=(m=a==null?void 0:a.metadata)==null?void 0:m.images)==null?void 0:f.orchestrator}),s.jsx(Bo,{runId:e}),s.jsx(Ho,{run:t}),s.jsx(se,{isInitialOpen:!0,title:"Resources",data:((b=(p=t.metadata)==null?void 0:p.config.settings)==null?void 0:b.resources)||{}}),s.jsx(se,{isInitialOpen:!0,title:"Extra",data:(v=t.metadata)==null?void 0:v.config.extra})]})}function qo(){var n,a,i;const{runId:e}=P(),{data:t,isError:r}=M({runId:e},{throwOnError:!0});return r?s.jsx("p",{children:"Failed to fetch pipeline run"}):t&&Object.entries(((n=t.metadata)==null?void 0:n.run_metadata)||{}).length<1?s.jsx(A,{icon:s.jsx(Ve,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"mb-2 text-display-xs font-semibold",children:"No metadata found"}),s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There are no metadata available."})]})}):s.jsxs("section",{className:"flex flex-col gap-5",children:[t?s.jsx(Fe,{metadata:(a=t.metadata)==null?void 0:a.run_metadata}):s.jsx(g,{className:"h-[200px] w-full"}),t?s.jsx(ut,{metadata:(i=t.metadata)==null?void 0:i.run_metadata}):s.jsx(g,{className:"h-[200px] w-full"})]})}function Wo(){return s.jsx(Le,{className:"truncate",intent:"error",children:s.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[s.jsx("p",{className:"truncate",children:"Pipeline run failed. Check orchestrator logs for error details and troubleshooting steps."}),s.jsx(k,{intent:"danger",asChild:!0,children:s.jsx("a",{href:"#orchestrator-collapsible",children:"Review"})})]})})}function Ko(){return s.jsx(Le,{className:"truncate",children:s.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[s.jsx("p",{children:"Pipeline run initializing. Check orchestrator URL and logs for real-time status updates."}),s.jsx(k,{asChild:!0,children:s.jsx("a",{href:"#orchestrator-collapsible",children:"Review"})})]})})}function Uo(){var o,c,d;const{runId:e}=P(),{data:t,isError:r,isPending:n}=M({runId:e}),a=(o=t==null?void 0:t.metadata)==null?void 0:o.run_metadata,i=a==null?void 0:a.orchestrator_url,l=a==null?void 0:a.orchestrator_logs_url;return r?null:n?s.jsx(g,{className:"h-[100px]"}):((c=t.body)==null?void 0:c.status)==="initializing"&&(l||i)?s.jsx(Ko,{}):((d=t.body)==null?void 0:d.status)==="failed"&&l?s.jsx(Wo,{}):null}function Yo(){var c,d,u,h,m,f,p,b,v,E,Z,q,W,K,U,C,y,_,R,le,O,X,J,oe,de;const{runId:e}=P(),[t,r]=x.useState(!0),[n]=ur(),a=ct(),{data:i,isError:l,isPending:o}=M({runId:e},{throwOnError:!0});return x.useEffect(()=>{if(!n.get("tab")){const pe=new URL(window.location.href);pe.searchParams.set("tab","overview");const Se=`${pe.pathname}${pe.search}`;a(Se,{replace:!0})}},[n,a]),l?null:o?s.jsx(g,{className:"h-[200px] w-full"}):s.jsxs(je,{open:t,onOpenChange:r,children:[s.jsx(be,{className:"flex items-center gap-[10px]",children:s.jsxs(Ce,{className:"flex w-full items-center gap-[10px]",children:[s.jsx(ve,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),s.jsx("span",{children:"Details"})]})}),s.jsx(ye,{className:"border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(D,{children:"Id"}),s.jsx(V,{children:s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[i.id,s.jsx(Y,{copyText:i.id})]})}),s.jsx(D,{children:"Status"}),s.jsx(V,{children:s.jsxs(T,{className:"inline-flex items-center gap-0.5",emphasis:"subtle",color:Ae((c=i.body)==null?void 0:c.status),children:[s.jsx(ce,{className:"fill-current",status:(d=i.body)==null?void 0:d.status}),(u=i.body)==null?void 0:u.status]})}),s.jsx(D,{children:"Pipeline"}),s.jsx(V,{children:(h=i.body)!=null&&h.pipeline?s.jsx(Ie,{to:_e.pipelines.namespace(encodeURIComponent((f=(m=i.body)==null?void 0:m.pipeline)==null?void 0:f.name)),children:s.jsxs(T,{color:"purple",className:"inline-flex items-center gap-0.5",rounded:!1,emphasis:"subtle",children:[s.jsx(rt,{className:"h-4 w-4 fill-theme-text-brand"}),(b=(p=i.body)==null?void 0:p.pipeline)==null?void 0:b.name]})}):"Not available"}),s.jsx(D,{children:s.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[s.jsx("span",{className:"truncate",children:"Repository/Commit"}),s.jsx(F,{children:s.jsxs(z,{children:[s.jsxs(B,{className:"cursor-default",children:[s.jsx(fe,{className:"h-3 w-3 fill-theme-text-secondary"}),s.jsx("span",{className:"sr-only",children:"Info"})]}),s.jsx(H,{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."})]})})]})}),s.jsx(V,{children:(v=i.body)!=null&&v.code_reference?s.jsx(Nr,{repositoryId:(Z=(E=i.body)==null?void 0:E.code_reference.body)==null?void 0:Z.code_repository.id,commit:(q=i.body.code_reference.body)==null?void 0:q.commit}):"Not available"}),s.jsx(D,{className:(W=i.metadata)!=null&&W.code_path?"col-span-3":"",children:s.jsxs("div",{className:"flex items-center space-x-0.5 truncate",children:[s.jsx("span",{children:"Code Path"}),s.jsx(F,{children:s.jsxs(z,{children:[s.jsxs(B,{className:"cursor-default",children:[s.jsx(fe,{className:"h-3 w-3 fill-theme-text-secondary"}),s.jsx("span",{className:"sr-only",children:"Info"})]}),s.jsx(H,{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"})]})})]})}),s.jsx(V,{className:(K=i.metadata)!=null&&K.code_path?"col-span-3 h-auto":"",children:(U=i.metadata)!=null&&U.code_path?s.jsx(I,{code:i.metadata.code_path}):"Not available"}),s.jsx(D,{children:"Author"}),s.jsx(V,{children:s.jsx("div",{className:"inline-flex items-center gap-1",children:s.jsx(ot,{username:((y=(C=i.body)==null?void 0:C.user)==null?void 0:y.name)||""})})}),s.jsx(D,{children:"Start Time"}),s.jsx(V,{children:(_=i.metadata)!=null&&_.start_time?s.jsx(ke,{dateString:(R=i.metadata)==null?void 0:R.start_time}):"Not available"}),s.jsx(D,{children:"End Time"}),s.jsx(V,{children:(le=i.metadata)!=null&&le.end_time?s.jsx(ke,{dateString:(O=i.metadata)==null?void 0:O.end_time}):"Not available"}),s.jsx(D,{children:"Duration"}),s.jsx(V,{children:(X=i.metadata)!=null&&X.start_time&&((J=i.metadata)!=null&&J.end_time)?wr((oe=i.metadata)==null?void 0:oe.start_time,(de=i.metadata)==null?void 0:de.end_time):"Not available"})]})})]})}function Qo(){var u,h;const{runId:e}=P(),[t,r]=x.useState(!0),{data:n,isError:a,isPending:i}=M({runId:e}),l=(u=n==null?void 0:n.metadata)==null?void 0:u.run_metadata,o=l==null?void 0:l.orchestrator_url,c=(h=n==null?void 0:n.metadata)==null?void 0:h.orchestrator_run_id,d=l==null?void 0:l.orchestrator_logs_url;return a?null:i?s.jsx(g,{className:"h-[200px]"}):s.jsxs(je,{open:t,onOpenChange:r,children:[s.jsx(be,{className:"flex items-center gap-[10px]",children:s.jsxs(Ce,{className:"flex w-full",children:[s.jsx(ve,{className:` ${t?"":"-rotate-90"} mr-2 h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),s.jsx("p",{id:"orchestrator-collapsible",children:"Orchestrator"})]})}),s.jsx(ye,{className:"space-y-3 border-t border-theme-border-moderate bg-theme-surface-primary px-5 py-3",children:s.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:grid-cols-3 md:gap-y-4",children:[s.jsx(j,{label:"Orchestrator URL",value:o&&typeof o.body.value=="string"?s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[s.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:o.body.value,children:o.body.value}),s.jsx(Y,{copyText:o.body.value})]}):"Not available"}),s.jsx(j,{label:"Orchestrator Logs",value:d&&typeof d.body.value=="string"?s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[s.jsx("a",{className:"truncate text-theme-text-brand underline transition-all duration-200 hover:decoration-transparent",rel:"noopener noreferrer",target:"_blank",href:d.body.value,children:d.body.value}),s.jsx(Y,{copyText:d.body.value})]}):"Not available"}),s.jsx(j,{label:"Orchestrator Run ID",value:c?s.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[c,s.jsx(Y,{copyText:c})]}):"Not available"})]})})]})}function Xo(){return s.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[s.jsx(Uo,{}),s.jsx(Yo,{}),s.jsx(Qo,{})]})}const Jo=Et.object({tab:Et.enum(["overview","configuration","metadata","stack"]).optional().default("overview").catch("overview")});function ec(){const[e]=ur(),{tab:t}=Jo.parse({tab:e.get("tab")||void 0});return t}function tc(){var n,a,i;const{runId:e}=P(),t=M({runId:e},{throwOnError:!0});if(t.isPending)return s.jsx(g,{className:"h-[250px] w-full"});if(t.isError)return s.jsx("p",{children:"Something went wrong fetching the run"});const r=(i=(a=(n=t.data)==null?void 0:n.body)==null?void 0:a.stack)==null?void 0:i.id;return r?s.jsx(rc,{run:t.data,stackId:r}):s.jsx(A,{icon:s.jsx(he,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-display-xs font-semibold",children:"No Stack"}),s.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"There is no stack associated with this run."})]})})}function rc({stackId:e,run:t}){const{data:r,isError:n,isPending:a}=pr({stackId:e});return a?s.jsx(g,{className:"h-[250px] w-full"}):n?s.jsx("p",{children:"Failed to fetch Stack"}):s.jsx(Er,{stack:r,run:t})}function sc({setIsPanelOpen:e}){return s.jsxs("div",{className:"flex items-center gap-4 border-b border-theme-border-moderate bg-theme-surface-primary px-5 py-4",children:[s.jsx(k,{className:"flex h-6 w-6 items-center justify-center bg-transparent p-0.5",intent:"secondary",onClick:()=>e(!1),children:s.jsx(zo,{className:"h-5 w-5 fill-theme-text-secondary"})}),s.jsx("span",{className:"text-text-xl",children:"Run Insights"})]})}function nc(){const e=ec(),t=ct();function r(n){const a=new URLSearchParams;a.set("tab",n),t(`?${a.toString()}`)}return s.jsx("div",{className:"flex flex-col gap-5 p-5",children:s.jsxs(nt,{value:e,onValueChange:r,children:[s.jsxs(at,{children:[s.jsxs(L,{className:"flex items-center gap-2 truncate text-text-md",value:"overview",children:[s.jsx(fe,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Overview"})]}),s.jsxs(L,{className:"flex items-center gap-2 truncate text-text-md",value:"stack",children:[s.jsx(lt,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Stack"})]}),s.jsxs(L,{className:"flex items-center gap-2 truncate text-text-md",value:"configuration",children:[s.jsx(Cr,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Configuration"})]}),s.jsxs(L,{className:"flex items-center gap-2 text-text-md",value:"metadata",children:[s.jsx(it,{className:"h-5 w-5 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong"}),s.jsx("span",{children:"Metadata"})]})]}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"overview",children:s.jsx(Xo,{})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"stack",children:s.jsx(tc,{})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"configuration",children:s.jsx(Zo,{})}),s.jsx(S,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"metadata",children:s.jsx(qo,{})})]})})}function Gc(){var a;const e=Os(),t=Ls(((a=e.data)==null?void 0:a.deployment_type)||"other"),[r,n]=x.useState(!0);return s.jsxs("div",{children:[s.jsx(Fo,{}),s.jsxs("div",{className:`flex ${t?"h-[calc(100vh_-_4rem_-_4rem_-_4rem_-_2px)]":"h-[calc(100vh_-_4rem_-_4rem_-_2px)]"} w-full`,children:[s.jsxs("div",{className:`relative bg-white/40 transition-all duration-500 ${r?"w-1/2":"w-full"}`,children:[s.jsx(Do,{}),s.jsx(ac,{isPanelOpen:r,setIsPanelOpen:n})]}),s.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:s.jsxs(Ss,{viewportClassName:"[&>*]:!block",children:[s.jsx(sc,{setIsPanelOpen:n}),s.jsx(nc,{})]})})]})]})}function ac({isPanelOpen:e,setIsPanelOpen:t}){return s.jsx(k,{intent:"secondary",className:`absolute right-4 top-4 h-7 w-7 items-center justify-center border border-neutral-300 bg-transparent p-0.5 ${e?"hidden":"flex"}`,onClick:()=>t(!0),children:s.jsx(en,{className:"h-5 w-5 fill-theme-text-primary"})})}export{Gc as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{j as e}from"./@radix-DP6vWzyx.js";import{B as r,P as o,e as i}from"./index-QQb7wQEC.js";import{C as n}from"./CodeSnippet-CqybNv0k.js";import{I as c}from"./Infobox-BwisKifi.js";import{c as l}from"./@react-router-BMhZulnd.js";import{C as m,a as f}from"./cloud-only-B-s_HMDm.js";import"./@tanstack-BUCbhJyH.js";import"./@reactflow-8U9qNlMR.js";import"./copy-CaSMXwiU.js";function x(){return e.jsx(c,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"This is a ZenML Pro feature. "}),e.jsx("p",{children:"Upgrade to ZenML Pro to access the Artifact Control Plane and interact with your artifacts in the Dashboard."})]})})}function d(){const[s]=l(),t=s.get("artifact");function a(){return t?`zenml artifact list --name='contains:${t}'`:"zenml artifact list"}return e.jsxs(r,{className:"flex flex-wrap justify-between p-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-text-xl font-semibold",children:"Staying Open Source? "}),e.jsx("p",{className:"text-theme-text-secondary",children:"No problem! Use this CLI command to list your artifacts"})]}),e.jsx(n,{code:a()})]})}const p="/assets/acp-DOsXjFc7.webp";function w(){return e.jsxs("div",{children:[e.jsxs(o,{className:"flex items-center gap-1",children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"Artifacts"}),e.jsx(i,{color:"purple",rounded:!0,size:"sm",children:e.jsx("span",{className:"font-semibold text-primary-500",children:"Pro"})})]}),e.jsxs("div",{className:"layout-container space-y-5 py-5",children:[e.jsx(x,{}),e.jsx(m,{feature:"artifact",image:{src:p,alt:"Screenshot of the ZenML Pro Artifact Control plane"},features:f}),e.jsx(d,{})]})]})}export{w as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as l,j as e}from"./@radix-DP6vWzyx.js";import{a9 as O,aa as F,ab as _,F as L,l as B,m as H,i as $,r as g,j as q,aj as M,al as U,at as W,an as Q,f as u,D as v,q as G,s as Y,V as K,Y as V,Z,$ as J,S as x,A as D,b as T,B as X,ac as ee,z as j,G as se,aG as te}from"./index-QQb7wQEC.js";import{S as ae}from"./plus-C9IxgN2M.js";import{S as re}from"./refresh-BVu22P_C.js";import{S as ne,P as ie}from"./SearchField-DfUiGFVd.js";import{s as p}from"./sharedSchema-TMLu-nYQ.js";import{b as ce,c as le,a as h}from"./@tanstack-BUCbhJyH.js";import{b as oe,L as b,c as de}from"./@react-router-BMhZulnd.js";import{C as w}from"./CopyButton-C745BrKi.js";import{D as me}from"./DisplayDate-BeXgUG_C.js";import{I as ue}from"./InlineAvatar-jEgodSgX.js";import{S as xe}from"./dots-horizontal-DK5Duzx4.js";import{D as pe,S as he}from"./DialogItem-DcVCZEew.js";import{S as fe}from"./trash-DkJHMOg7.js";import{I as k}from"./Infobox-BwisKifi.js";import{C as N}from"./CodeSnippet-CqybNv0k.js";import{A as je}from"./AlertDialogDropdownItem-C6N2rGrB.js";import{C as ge}from"./CollapsibleCard-0r_8G2Lj.js";import{S as ye}from"./chevron-right-double-DoD8iXWM.js";import{e as S}from"./components-Br2ezRib.js";import{s as Ne}from"./url-D5le3J4q.js";import{N as C}from"./NumberBox-T9eELfLZ.js";import{C as be}from"./ComponentBadge-DUiEYJHu.js";import{C as we}from"./ComponentFallbackDialog-BFoH5K4V.js";import{p as A,c as ke}from"./persist-DNb5cdrU.js";import{p as E,c as ve}from"./persist-CP0JmYZ4.js";import"./@reactflow-8U9qNlMR.js";import"./index-BVJ8n2-j.js";import"./stack-detail-query-xmYxSsUY.js";import"./copy-CaSMXwiU.js";import"./chevron-down-8wLBS5pQ.js";import"./ComponentIcon-CAIoUis2.js";import"./layout-DCSYN7-C.js";import"./rocket-CONEmRmB.js";const R=l.forwardRef(({closeModal:s,name:t,...a},r)=>e.jsxs(O,{...a,ref:r,children:[e.jsx(F,{children:e.jsx(_,{children:"Update Stack"})}),e.jsxs("div",{className:"space-y-5 p-7",children:[e.jsx(Se,{action:"update"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Update a stack"}),e.jsx(N,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml stack update ${t} -o NEW_ORCHESTRATOR_NAME`})]})]})]}));R.displayName="UpdateStackDialog";function Se({action:s}){function t(){switch(s){case"delete":return"delete";case"update":return"update";case"describe":return"get details of"}}return e.jsx(k,{children:e.jsx("div",{className:"flex w-full flex-wrap justify-between gap-2",children:e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-text-sm font-semibold",children:"We are working on the new Stacks experience."}),e.jsxs("p",{className:"truncate text-text-sm",children:["Meanwhile you can use the CLI to ",t()," your stack."]})]})})})}async function Ce({stackId:s},t){const a=B(H.stacks.detail(s)),r=await fetch(a,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!r.ok){const i=await r.json().then(n=>Array.isArray(n.detail)?n.detail[1]:n.detail).catch(()=>`Error while deleting stack ${s}`);throw new L({status:r.status,statusText:r.statusText,message:i})}return r.json()}function De(s){return ce({...s,mutationFn:async({stackId:t})=>Ce({stackId:t})})}function Te(s){const{toast:t}=$(),a=le(),r=oe(),i=De({onSuccess:async()=>{a.invalidateQueries({queryKey:p.all}),r(g.stacks.overview)},onError:c=>{t({status:"error",emphasis:"subtle",icon:e.jsx(q,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:c.message,rounded:!0})}});function n(){i.mutate({stackId:s})}return{handleDelete:n,deleteStack:i}}const P=l.forwardRef(({closeModal:s,name:t,stackId:a,...r},i)=>{const{handleDelete:n,deleteStack:c}=Te(a);return e.jsxs(M,{...r,className:"p-0",ref:i,children:[e.jsxs(U,{className:"m-0 py-2 pl-5 pr-3 text-text-lg font-semibold",children:["Delete ",t]}),e.jsx("div",{className:"border-y border-theme-border-moderate px-5 py-5",children:e.jsxs(W,{children:["Are you sure you want to delete this stack? ",e.jsx("br",{}),"This action cannot be undone."]})}),e.jsxs("div",{className:"flex justify-end gap-3 px-5 py-3",children:[e.jsx(Q,{onClick:()=>s==null?void 0:s(),asChild:!0,children:e.jsx(u,{intent:"secondary",children:"Cancel"})}),e.jsxs(u,{disabled:c.isPending,type:"button",onClick:()=>n(),intent:"danger",children:[c.isPending&&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-error"}),"Delete"]})]})]})});P.displayName="DeleteStackDialog";function Ae({name:s,id:t}){const[a,r]=l.useState(!1),[i,n]=l.useState(!1),c=l.useRef(null),d=l.useRef(null);function o(){d.current=c.current}function m(f){r(f),f===!1&&n(!1)}return e.jsx(v,{open:i,onOpenChange:n,children:e.jsxs(v,{children:[e.jsx(G,{className:"z-10",ref:c,children:e.jsx(xe,{className:"h-5 w-5 fill-theme-text-secondary"})}),e.jsxs(Y,{hidden:a,onCloseAutoFocus:f=>{d.current&&(d.current.focus(),d.current=null,f.preventDefault())},className:"z-10",align:"end",sideOffset:1,children:[e.jsx(pe,{onSelect:o,onOpenChange:m,icon:e.jsx(he,{className:"h-3 w-3 !fill-neutral-400"}),triggerChildren:"Update",children:e.jsx(R,{name:s,className:"lg:min-w-[600px]",closeModal:()=>m(!1)})}),e.jsx(je,{onSelect:o,onOpenChange:m,icon:e.jsx(fe,{className:"h-3 w-3 !fill-neutral-400"}),triggerChildren:"Delete",children:e.jsx(P,{stackId:t,name:s,className:"lg:min-w-[600px]",closeModal:()=>m(!1)})})]})]})})}function Ee(){return e.jsx("div",{className:"flex h-9 items-center border-b border-theme-border-moderate bg-theme-surface-primary px-4 py-3",children:e.jsxs(K,{className:"focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[e.jsx(ye,{className:"h-5 w-5 fill-neutral-500"}),e.jsx("span",{className:"sr-only",children:"Close"})]})})}const I=l.createContext(null);function Re({children:s}){const[t,a]=l.useState([]);return e.jsx(I.Provider,{value:{integrations:t,setIntegrations:a},children:s})}function z(){const s=l.useContext(I);if(s===null)throw new Error("useIntegrationsContext must be used within an AuthProvider");return s}function Pe({children:s,stackId:t,stackName:a}){return e.jsxs(V,{children:[e.jsx(Z,{children:s}),e.jsx(J,{className:"w-[1000px] overflow-y-auto",children:e.jsxs(Re,{children:[e.jsx(Ee,{}),e.jsx(Ie,{stackId:t}),e.jsx(Fe,{name:a}),e.jsx(ze,{stackId:t})]})})]})}function Ie({stackId:s}){const t=h({...p.stackDetail(s)});return t.isError?null:t.isPending?e.jsx("div",{className:"p-5",children:e.jsx(x,{className:"h-6 w-full"})}):e.jsxs("div",{className:"flex items-center space-x-2 border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:[e.jsx(D,{type:"square",size:"lg",children:e.jsx(T,{size:"lg",children:t.data.name[0]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[e.jsx("p",{className:"mb-0.5 text-text-sm text-theme-text-secondary",children:t.data.id}),e.jsx(w,{copyText:t.data.id})]}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx("h2",{className:"text-display-xs font-semibold",children:t.data.name})})]})]})}function ze({stackId:s}){var i;const{setIntegrations:t}=z(),a=h({...p.stackDetail(s)});if(l.useEffect(()=>{var d;if(!a.data)return;const c=S((d=a.data.metadata)==null?void 0:d.components).map(o=>{var m;return(m=o.body)==null?void 0:m.integration}).filter(o=>!!o&&o!=="built-in"&&o!=="custom");c.length>=1&&t(o=>Array.from(new Set([...o,...c])))},[a.data]),a.isError)return null;if(a.isPending)return e.jsx("div",{className:"p-5",children:e.jsx(x,{className:"h-[300px] w-full"})});const r=S((i=a.data.metadata)==null?void 0:i.components);return e.jsx("ul",{className:"space-y-5 p-5",children:r.map(n=>e.jsx("li",{children:e.jsx(Oe,{component:n})},n.id))})}function Oe({component:s}){var t,a,r,i,n;return e.jsxs(X,{className:"flex items-center justify-between p-5",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("img",{width:32,height:32,alt:`${(t=s.body)==null?void 0:t.flavor} logo`,src:Ne(((a=s.body)==null?void 0:a.logo_url)||"")}),e.jsxs("div",{children:[e.jsx(we,{type:((r=s.body)==null?void 0:r.type)||"orchestrator",name:s.name,children:e.jsx("button",{className:"text-text-xl",children:s.name})}),e.jsxs("div",{className:"group/copybutton flex items-center gap-0.5",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:s.id.split("-")[0]}),e.jsx(w,{copyText:s.id})]})]})]}),e.jsx(be,{type:((i=s.body)==null?void 0:i.type)||"orchestrator",children:ee(((n=s.body)==null?void 0:n.type)||"")})]})}function Fe({name:s}){const{integrations:t}=z();return e.jsx("section",{className:"px-5 pt-5",children:e.jsx(ge,{title:e.jsx("span",{className:"text-text-lg",children:"Set this stack"}),children:e.jsxs("ul",{className:"space-y-5",children:[e.jsxs("li",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{children:"1"}),e.jsx("p",{className:"font-semibold",children:"Set your stack"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Set the stack as active on your client"}),e.jsx(N,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml stack set ${s}`})]})]}),t.length>=1&&e.jsxs("li",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{children:"2"}),e.jsx("p",{className:"font-semibold",children:"Install the integrations"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Install the required integrations to run pipelines in your stack"}),e.jsx(N,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml integration install ${t.join(" ")}`})]})]})]})})})}function _e(){return[{id:"name",header:"Stack",accessorFn:s=>({name:s.name,id:s.id}),cell:({getValue:s})=>{const{name:t,id:a}=s();return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(D,{type:"square",size:"md",children:e.jsx(T,{size:"md",children:t[0]})}),e.jsxs("div",{children:[e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(Pe,{stackName:t,stackId:a,children:e.jsx("h2",{className:"text-text-md font-semibold",children:t})})}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:a.split("-")[0]}),e.jsx(w,{copyText:a})]})]})]})}},{id:"created",header:"Created at",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(me,{dateString:s()})})},{id:"author",header:"Author",accessorFn:s=>{var t;return{author:(t=s.body)==null?void 0:t.user}},cell:({getValue:s})=>{const{author:t}=s();return t?e.jsx(ue,{username:t.name}):null}},{id:"actions",header:"",accessorFn:s=>({name:s.name,id:s.id}),cell:({getValue:s})=>{const{id:t,name:a}=s();return e.jsx(Ae,{name:a,id:t})}}]}function Le({setHasResumeableStack:s}){const{success:t,data:a}=A(),r=h({...p.stackDeploymentStack({provider:(a==null?void 0:a.provider)||"aws",stack_name:(a==null?void 0:a.stackName)||"",date_start:a==null?void 0:a.timestamp}),enabled:t,throwOnError:!0});return l.useEffect(()=>{r.data&&(ke(),s(!1))},[r.data]),!t||r.isError?null:r.isPending?e.jsx(x,{className:"h-[70px] w-full"}):e.jsx(k,{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(u,{className:"w-fit bg-theme-surface-primary",intent:"primary",emphasis:"subtle",asChild:!0,children:e.jsx(b,{to:g.stacks.create.newInfra,children:e.jsx("span",{children:"Review Stack"})})})})]})})}const y=1,Be=j.object({page:j.coerce.number().min(y).optional().default(y).catch(y),name:j.string().optional(),operator:j.enum(["and","or"]).optional()});function He(){const[s]=de(),{page:t,name:a,operator:r}=Be.parse({page:s.get("page")||void 0,name:s.get("name")||void 0});return{page:t,name:a,logical_operator:r}}function $e({setHasResumeableTerraform:s}){const{success:t,data:a}=E(),r=h({...p.stackDeploymentStack({provider:(a==null?void 0:a.provider)||"aws",stack_name:(a==null?void 0:a.stackName)||"",date_start:a==null?void 0:a.timestamp}),enabled:t,throwOnError:!0});return l.useEffect(()=>{r.data&&(ve(),s(!1))},[r.data]),!t||r.isError?null:r.isPending?e.jsx(x,{className:"h-[70px] w-full"}):e.jsx(k,{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(u,{className:"w-fit bg-theme-surface-primary",intent:"primary",emphasis:"subtle",asChild:!0,children:e.jsx(b,{to:g.stacks.create.terraform,children:e.jsx("span",{children:"Review Stack"})})})})]})})}function qe(){const[s,t]=l.useState(A().success),[a,r]=l.useState(E().success),i=He(),{refetch:n,data:c}=h({...p.stackList({...i,sort_by:"desc:updated"}),throwOnError:!0});return e.jsx("section",{children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-y-4",children:[e.jsx(ne,{searchParams:i}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs(u,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>n(),children:[e.jsx(re,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]}),e.jsx(u,{size:"md",asChild:!0,children:e.jsxs(b,{to:g.stacks.create.index,children:[e.jsx(ae,{className:"h-5 w-5 shrink-0 fill-white"}),e.jsx("span",{children:"New Stack"})]})})]})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[s&&e.jsx(Le,{setHasResumeableStack:t}),a&&e.jsx($e,{setHasResumeableTerraform:r}),e.jsx("div",{className:"w-full",children:c?e.jsx(se,{columns:_e(),data:c.items}):e.jsx(x,{className:"h-[500px] w-full"})}),c?c.total_pages>1&&e.jsx(ie,{searchParams:i,paginate:c}):e.jsx(x,{className:"h-[36px] w-[300px]"})]})]})})}function ks(){const{setTourState:s,tourState:{tourActive:t}}=te();return l.useEffect(()=>{t&&s(a=>({...a,run:!0,stepIndex:a.stepIndex}))},[t]),e.jsx(qe,{})}export{ks as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as _,j as t}from"./@radix-DP6vWzyx.js";import{u as k,g as Je,S as Xe,C as oe,P as ie,W as et,L as tt}from"./ProviderRadio-BROY1700.js";import{W as O,H as D,B as T,S as E}from"./WizardFooter-CW0Cvd70.js";import{t as B}from"./zod-D89GC_vc.js";import{z as h,l as je,m as ge,k as _e,n as Ee,F as ve,S as Y,I as W,f as w,az as rt,aA as st,aB as nt,aC as ot,ai as it,aD as at,ap as ct,a7 as lt,a9 as ut,ab as dt,d as ft,U as mt,i as Me,j as ht,r as xt,A as pt,b as yt,ac as jt}from"./index-QQb7wQEC.js";import{b as y,C as b,u as $,F as V,a as gt}from"./index.esm-cuVep_NJ.js";import{C as Se,b as _t}from"./ComponentIcon-CAIoUis2.js";import{R as H,a as K,u as vt}from"./create-stack-CEmaPZ4c.js";import{q as Re,a as J,b as St,i as Le,c as bt}from"./@tanstack-BUCbhJyH.js";import{o as Ct,s as wt}from"./url-D5le3J4q.js";import{C as M}from"./ProviderIcon-Bb3Xha5A.js";import{a as Nt,s as qe}from"./sharedSchema-TMLu-nYQ.js";import{S as Ft}from"./Lock-3lLt1ih0.js";import{S as Pt}from"./plus-C9IxgN2M.js";import{S as kt}from"./trash-DkJHMOg7.js";import{S as At}from"./dots-horizontal-DK5Duzx4.js";import{T as be}from"./Tick-CykQFPj2.js";import{C as zt}from"./ComponentBadge-DUiEYJHu.js";import{e as It}from"./components-Br2ezRib.js";import{L as Ot}from"./@react-router-BMhZulnd.js";import"./persist-DNb5cdrU.js";import"./@reactflow-8U9qNlMR.js";import"./layout-DCSYN7-C.js";import"./rocket-CONEmRmB.js";import"./gcp-7M2Yf3ZK.js";import"./stack-detail-query-xmYxSsUY.js";const Be=_.createContext(null);function Dt({children:e}){const[r,s]=_.useState({stackName:null,createdStackId:null,connectorConfig:null,fullstackResources:null,artifactStoreConfig:null,registryConfig:null,orchestratorConfig:null});return t.jsx(Be.Provider,{value:{data:r,setData:s},children:e})}function C(){const e=_.useContext(Be);if(e===null)throw new Error("useExistingInfraContext must be used within an ExistingInfraProvider");return e}const We=_.createContext(null);function Pe({children:e,initialSchema:r}){const[s,n]=_.useState(r);return t.jsx(We.Provider,{value:{schema:s,setSchema:n},children:e})}function X(){const e=_.useContext(We);if(!e)throw new Error("useSchemaContext must be used within a SchemaProvider");return e}const Tt=h.object({resourceId:h.string().min(1),flavor:h.string()});function Et(){return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(Se,{type:"artifact_store",className:"h-5 w-5 fill-primary-400"}),"Select your Artifact Store"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Choose one of the storages for the new Artifact Store."})]})}var $e=Symbol.for("immer-nothing"),ke=Symbol.for("immer-draftable"),j=Symbol.for("immer-state");function v(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var A=Object.getPrototypeOf;function z(e){return!!e&&!!e[j]}function F(e){var r;return e?Ve(e)||Array.isArray(e)||!!e[ke]||!!((r=e.constructor)!=null&&r[ke])||te(e)||re(e):!1}var Mt=Object.prototype.constructor.toString();function Ve(e){if(!e||typeof e!="object")return!1;const r=A(e);if(r===null)return!0;const s=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return s===Object?!0:typeof s=="function"&&Function.toString.call(s)===Mt}function U(e,r){ee(e)===0?Reflect.ownKeys(e).forEach(s=>{r(s,e[s],e)}):e.forEach((s,n)=>r(n,s,e))}function ee(e){const r=e[j];return r?r.type_:Array.isArray(e)?1:te(e)?2:re(e)?3:0}function de(e,r){return ee(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function Ze(e,r,s){const n=ee(e);n===2?e.set(r,s):n===3?e.add(s):e[r]=s}function Rt(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function te(e){return e instanceof Map}function re(e){return e instanceof Set}function N(e){return e.copy_||e.base_}function fe(e,r){if(te(e))return new Map(e);if(re(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const s=Ve(e);if(r===!0||r==="class_only"&&!s){const n=Object.getOwnPropertyDescriptors(e);delete n[j];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const i=o[a],u=n[i];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[i]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[i]})}return Object.create(A(e),n)}else{const n=A(e);if(n!==null&&s)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function Ce(e,r=!1){return se(e)||z(e)||!F(e)||(ee(e)>1&&(e.set=e.add=e.clear=e.delete=Lt),Object.freeze(e),r&&Object.entries(e).forEach(([s,n])=>Ce(n,!0))),e}function Lt(){v(2)}function se(e){return Object.isFrozen(e)}var qt={};function P(e){const r=qt[e];return r||v(0,e),r}var R;function He(){return R}function Bt(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ae(e,r){r&&(P("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function me(e){he(e),e.drafts_.forEach(Wt),e.drafts_=null}function he(e){e===R&&(R=e.parent_)}function ze(e){return R=Bt(R,e)}function Wt(e){const r=e[j];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function Ie(e,r){r.unfinalizedDrafts_=r.drafts_.length;const s=r.drafts_[0];return e!==void 0&&e!==s?(s[j].modified_&&(me(r),v(4)),F(e)&&(e=Q(r,e),r.parent_||G(r,e)),r.patches_&&P("Patches").generateReplacementPatches_(s[j].base_,e,r.patches_,r.inversePatches_)):e=Q(r,s,[]),me(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==$e?e:void 0}function Q(e,r,s){if(se(r))return r;const n=r[j];if(!n)return U(r,(o,a)=>Oe(e,n,r,o,a,s)),r;if(n.scope_!==e)return r;if(!n.modified_)return G(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let a=o,i=!1;n.type_===3&&(a=new Set(o),o.clear(),i=!0),U(a,(u,f)=>Oe(e,n,o,u,f,s,i)),G(e,o,!1),s&&e.patches_&&P("Patches").generatePatches_(n,s,e.patches_,e.inversePatches_)}return n.copy_}function Oe(e,r,s,n,o,a,i){if(z(o)){const u=a&&r&&r.type_!==3&&!de(r.assigned_,n)?a.concat(n):void 0,f=Q(e,o,u);if(Ze(s,n,f),z(f))e.canAutoFreeze_=!1;else return}else i&&s.add(o);if(F(o)&&!se(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Q(e,o),(!r||!r.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(s,n)&&G(e,o)}}function G(e,r,s=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ce(r,s)}function $t(e,r){const s=Array.isArray(e),n={type_:s?1:0,scope_:r?r.scope_:He(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=we;s&&(o=[n],a=L);const{revoke:i,proxy:u}=Proxy.revocable(o,a);return n.draft_=u,n.revoke_=i,u}var we={get(e,r){if(r===j)return e;const s=N(e);if(!de(s,r))return Vt(e,s,r);const n=s[r];return e.finalized_||!F(n)?n:n===ae(e.base_,r)?(ce(e),e.copy_[r]=pe(n,e)):n},has(e,r){return r in N(e)},ownKeys(e){return Reflect.ownKeys(N(e))},set(e,r,s){const n=Ke(N(e),r);if(n!=null&&n.set)return n.set.call(e.draft_,s),!0;if(!e.modified_){const o=ae(N(e),r),a=o==null?void 0:o[j];if(a&&a.base_===s)return e.copy_[r]=s,e.assigned_[r]=!1,!0;if(Rt(s,o)&&(s!==void 0||de(e.base_,r)))return!0;ce(e),xe(e)}return e.copy_[r]===s&&(s!==void 0||r in e.copy_)||Number.isNaN(s)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=s,e.assigned_[r]=!0),!0},deleteProperty(e,r){return ae(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,ce(e),xe(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const s=N(e),n=Reflect.getOwnPropertyDescriptor(s,r);return n&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:n.enumerable,value:s[r]}},defineProperty(){v(11)},getPrototypeOf(e){return A(e.base_)},setPrototypeOf(){v(12)}},L={};U(we,(e,r)=>{L[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});L.deleteProperty=function(e,r){return L.set.call(this,e,r,void 0)};L.set=function(e,r,s){return we.set.call(this,e[0],r,s,e[0])};function ae(e,r){const s=e[j];return(s?N(s):e)[r]}function Vt(e,r,s){var o;const n=Ke(r,s);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Ke(e,r){if(!(r in e))return;let s=A(e);for(;s;){const n=Object.getOwnPropertyDescriptor(s,r);if(n)return n;s=A(s)}}function xe(e){e.modified_||(e.modified_=!0,e.parent_&&xe(e.parent_))}function ce(e){e.copy_||(e.copy_=fe(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Zt=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,s,n)=>{if(typeof r=="function"&&typeof s!="function"){const a=s;s=r;const i=this;return function(f=a,...d){return i.produce(f,c=>s.call(this,c,...d))}}typeof s!="function"&&v(6),n!==void 0&&typeof n!="function"&&v(7);let o;if(F(r)){const a=ze(this),i=pe(r,void 0);let u=!0;try{o=s(i),u=!1}finally{u?me(a):he(a)}return Ae(a,n),Ie(o,a)}else if(!r||typeof r!="object"){if(o=s(r),o===void 0&&(o=r),o===$e&&(o=void 0),this.autoFreeze_&&Ce(o,!0),n){const a=[],i=[];P("Patches").generateReplacementPatches_(r,o,a,i),n(a,i)}return o}else v(1,r)},this.produceWithPatches=(r,s)=>{if(typeof r=="function")return(i,...u)=>this.produceWithPatches(i,f=>r(f,...u));let n,o;return[this.produce(r,s,(i,u)=>{n=i,o=u}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){F(e)||v(8),z(e)&&(e=Ht(e));const r=ze(this),s=pe(e,void 0);return s[j].isManual_=!0,he(r),s}finishDraft(e,r){const s=e&&e[j];(!s||!s.isManual_)&&v(9);const{scope_:n}=s;return Ae(n,r),Ie(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,r){let s;for(s=r.length-1;s>=0;s--){const o=r[s];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}s>-1&&(r=r.slice(s+1));const n=P("Patches").applyPatches_;return z(e)?n(e,r):this.produce(e,o=>n(o,r))}};function pe(e,r){const s=te(e)?P("MapSet").proxyMap_(e,r):re(e)?P("MapSet").proxySet_(e,r):$t(e,r);return(r?r.scope_:He()).drafts_.push(s),s}function Ht(e){return z(e)||v(10,e),Ue(e)}function Ue(e){if(!F(e)||se(e))return e;const r=e[j];let s;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,s=fe(e,r.scope_.immer_.useStrictShallowCopy_)}else s=fe(e,!0);return U(s,(n,o)=>{Ze(s,n,Ue(o))}),r&&(r.finalized_=!1),s}var g=new Zt,I=g.produce;g.produceWithPatches.bind(g);g.setAutoFreeze.bind(g);g.setUseStrictShallowCopy.bind(g);g.applyPatches.bind(g);g.createDraft.bind(g);g.finishDraft.bind(g);function Kt(){const{data:e,setData:r}=C(),{setCurrentStep:s}=k();if(!e.fullstackResources)return s(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const n=e.fullstackResources.components_resources_info.artifact_store,o=n.flatMap(i=>i.accessible_by_service_connector.map(u=>({...i,value:u})));function a({flavor:i,resourceId:u}){const f=n.find(d=>d.flavor===i);f&&(r(d=>I(d,c=>{c.artifactStoreConfig={flavor:i,configuration:Object.fromEntries(Object.keys(f.required_configuration||{}).map(m=>[m,u])),service_connector_resource_id:u}})),s(d=>d+1))}return{handleFormSubmit:a,flattenedInstances:o}}async function Ut(e){const r=je(ge.flavors.all)+(e?`?${Ct(e)}`:""),s=await _e(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&Ee(),!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching flavors");throw new ve({status:s.status,statusText:s.statusText,message:n})}return s.json()}const Qe={all:["flavors"],flavorList:e=>Re({queryKey:[...Qe.all,e],queryFn:async()=>Ut(e)})};function q({flavor:e,type:r,width:s=32,height:n=32,...o}){var i;const a=J({...Qe.flavorList({name:e,type:r})});return a.isError?null:a.isPending?t.jsx(Y,{style:{height:`${n}px`,width:`${s}px`}}):t.jsx("img",{width:s,height:n,alt:`${e} logo`,...o,src:wt(((i=a.data.items[0].body)==null?void 0:i.logo_url)??"")})}const Qt="artifact_store";function Gt(){const[e,r]=_.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:i,trigger:u,reset:f}=y(),{flattenedInstances:d,handleFormSubmit:c}=Kt(),m=d.filter(l=>l.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(W,{placeholder:"Search...",onChange:l=>{f(),r(l.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...a("flavor")}),t.jsx("ul",{className:"space-y-1",children:m.map(l=>t.jsx("li",{children:t.jsx(b,{name:"resourceId",control:s,render:({field:{onChange:x,...p}})=>t.jsxs(H,{"data-state":i("resourceId")===l.value?"selected":"unselected",htmlFor:l.value,children:[t.jsx(K,{id:l.value,type:"radio",...p,onChange:S=>{n("flavor",l.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),x(S.target.value),u()},value:l.value,name:"connector-radio"}),t.jsx(q,{type:Qt,width:24,height:24,flavor:l.flavor})," ",t.jsx("span",{children:l.value})]})})},l.value))})]})]})}function Yt(){const e=$({resolver:B(Tt),shouldUnregister:!0});return t.jsx(V,{...e,children:t.jsxs(O,{children:[t.jsx(D,{children:"Artifact Store"}),t.jsx(T,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(Et,{}),t.jsx(Gt,{})]})}),t.jsx(E,{children:t.jsx(Jt,{})})]})})}function Jt(){const e=y();return t.jsx(w,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}function Xt(e,r){const s=Object.keys(e).reduce((n,o)=>{var d,c;const a=e[o];let i;const u=Ge(o,r);switch(a.type||((c=(d=a.anyOf)==null?void 0:d.find(m=>m.type!==null))==null?void 0:c.type)){case"string":i=h.string().trim();break;case"boolean":i=h.boolean();break;case"array":i=h.array(h.string());break;default:i=h.string();break}return u&&(i=i.optional()),!u&&a.type==="string"&&i instanceof h.ZodString&&(i=i.min(1,"Required")),n[o]=i,n},{});return h.object(s)}function Ge(e,r){return!r.includes(e)}async function er(e){const r=je(ge.serviceConnectors.types.detail(e)),s=await _e(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&Ee(),!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching service connector type");throw new ve({status:s.status,statusText:s.statusText,message:n})}return s.json()}const Ne={connectorTypes:["service_connector_types"],serviceConnectorTypeDetail:e=>Re({queryKey:[...Ne.connectorTypes,e],queryFn:async()=>er(e)})},Ye=h.object({authMethod:h.string().min(1),stackName:Nt});function tr(){var c,m;const{data:e}=C(),{setCurrentStep:r}=k(),{control:s,watch:n,resetField:o}=y(),{setSchema:a}=X(),i=J({...Ne.serviceConnectorTypeDetail(((c=e.connectorConfig)==null?void 0:c.type)||"")});if(i.isError)return null;if(i.isPending)return t.jsx(Y,{className:"h-[40px] w-[100px]"});const u=i.data.auth_methods.filter(l=>l.auth_method!=="implicit").map(l=>({name:l.name,auth_method:l.auth_method}));if(!((m=e.connectorConfig)!=null&&m.type)){r(1);return}function f(){var Fe;const l=n("authMethod"),x=(Fe=i.data)==null?void 0:Fe.auth_methods.find(ne=>ne.auth_method===l);if(!x)return;const p=Xt(x.config_schema.properties,x.config_schema.required);a(Ye.merge(p)),Object.keys(p.shape).forEach(ne=>o(ne))}const d=e.connectorConfig.type||"";return t.jsx(b,{control:s,name:"authMethod",render:({field:{onChange:l,ref:x,...p}})=>t.jsxs(rt,{...p,onValueChange:S=>{l(S),f()},children:[t.jsx(st,{className:"w-fit border border-neutral-300 text-left text-text-md",children:t.jsx(nt,{className:"flex items-center gap-2",placeholder:"Select your Auth Method"})}),t.jsx(ot,{children:t.jsx(it,{viewportClassName:"max-h-[300px]",children:u.map(S=>t.jsx(at,{className:"space-x-2",value:S.auth_method,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(M,{provider:d}),t.jsx("div",{children:S.name})]})},S.auth_method))})})]})})}function rr(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(_t,{className:"h-5 w-5 fill-primary-400"}),"Select an Authentication Method"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Connect ZenML to your resources for seamless integration of cloud services into your ML pipelines."})]}),t.jsx(tr,{})]})}function sr({schema:e,name:r,isOptional:s}){var o,a;const n=e.type||((a=(o=e.anyOf)==null?void 0:o.find(i=>i.type!==null))==null?void 0:a.type);if(!n)return null;switch(n){case"string":return t.jsx(nr,{isOptional:s,schema:e,name:r});case"array":return t.jsx(or,{isOptional:s,schema:e,name:r});case"boolean":return t.jsx(ir,{isOptional:s,schema:e,name:r});default:return null}}function nr({name:e,schema:r,isOptional:s}){const n=y(),o=r.format==="password";return t.jsxs("div",{children:[t.jsxs("label",{htmlFor:e,className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx(b,{defaultValue:"",control:n.control,name:e,render:({field:a})=>t.jsx(W,{inputSize:"md",className:"w-full",id:e,...a,type:o?"password":"text"})})]})}function or({name:e,schema:r,isOptional:s}){const{control:n}=y(),{fields:o,append:a,remove:i}=gt({name:e,control:n});return t.jsxs("div",{className:"space-y-3",children:[t.jsxs("label",{className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx("ul",{className:"space-y-5",children:o.map((u,f)=>t.jsxs("li",{className:"flex w-full items-center gap-4 [&>div]:w-full",children:[t.jsx(b,{defaultValue:"",name:`${e}.${f}`,render:({field:d})=>t.jsx(W,{className:"w-full flex-1",inputSize:"md",...d})}),t.jsxs(w,{className:"h-7 w-7",emphasis:"subtle",size:"sm",type:"button",onClick:()=>i(f),children:[t.jsx(kt,{className:"h-5 w-5 fill-primary-900"}),t.jsx("span",{className:"sr-only",children:"remove"})]})]},u.id))}),t.jsxs(w,{className:"h-7 w-7",emphasis:"subtle",type:"button",onClick:()=>a(""),children:[t.jsx(Pt,{className:"h-5 w-5 fill-primary-900"}),t.jsx("p",{className:"sr-only",children:"Add Item"})]})]})}function ir({name:e,schema:r,isOptional:s}){const n=y(),o=r.default||!1;return t.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[t.jsxs("label",{htmlFor:e,className:"text-text-sm",children:[r.title," ",s?"(optional)":""]}),t.jsx(b,{defaultValue:o,control:n.control,name:e,render:({field:{onChange:a,value:i,...u}})=>t.jsx(ct,{id:e,checked:i,onCheckedChange:f=>a(f),...u})})]})}function ar(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(Ft,{className:"h-5 w-5 fill-primary-400"}),"Add your Configuration"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Your credentials are securely stored and encrypted. ZenML uses these credentials to interact with your resources."})]}),t.jsx(cr,{})]})}function cr(){var f,d;const{data:e}=C(),{watch:r}=y(),s=J({...Ne.serviceConnectorTypeDetail(((f=e.connectorConfig)==null?void 0:f.type)||"")}),n=r("authMethod"),o=(d=s.data)==null?void 0:d.auth_methods.find(c=>c.auth_method===n);if(s.isError)return null;if(s.isPending)return t.jsx(Y,{className:"h-[200px] w-full"});if(!o)return null;const a=o.config_schema.properties,i=o.config_schema.required,u=Object.entries(a).sort(([c],[m])=>i.includes(c)&&!i.includes(m)?-1:!i.includes(c)&&i.includes(m)?1:0);return t.jsx("div",{className:"space-y-5",children:u.map(([c,m])=>t.jsx(sr,{isOptional:Ge(c,i),name:c,schema:m},c))})}function lr({open:e,loadingComponents:r}){var n,o;const{data:s}=C();return(n=s.connectorConfig)!=null&&n.type?t.jsx(lt,{open:e,children:t.jsxs(ut,{onPointerDownOutside:a=>a.preventDefault(),onEscapeKeyDown:a=>a.preventDefault(),className:"max-w-[600px]",children:[t.jsx("div",{className:"flex items-center justify-between border-b border-theme-border-moderate py-2 pl-5 pr-3",children:t.jsx(dt,{className:"text-text-lg",children:"Connecting and loading your components..."})}),t.jsxs("div",{className:"flex h-[200px] items-center justify-center gap-5 bg-primary-50",children:[t.jsx(ft,{className:"h-[60px] w-[60px]"}),t.jsx("div",{className:"flex h-[60px] w-[60px] items-center justify-center",children:t.jsx(At,{className:"h-5 w-5 fill-theme-text-tertiary"})}),t.jsx(M,{className:"h-[60px] w-[60px]",provider:s.connectorConfig.type})]}),t.jsxs("div",{className:"flex flex-col gap-1 px-7 pb-6 pt-5",children:[t.jsxs("p",{className:"text-theme-text-secondary",children:["We're securely connecting to ",Je(((o=s.connectorConfig)==null?void 0:o.type)||"aws")," ","and retrieving your custom components. This process typically takes about 30-60 seconds."]}),t.jsx(ur,{loadingComponents:r})]})]})}):null}function ur({loadingComponents:e}){const[r,s]=_.useState(!0),[n,o]=_.useState(!0);return _.useEffect(()=>{const a=setTimeout(()=>{s(!1)},Math.floor(Math.random()*1e3)+500),i=setTimeout(()=>{o(!1)},1500);return()=>{clearTimeout(a),clearTimeout(i)}},[]),t.jsxs("ul",{className:"mt-3 space-y-3 text-theme-text-secondary",children:[t.jsxs(ue,{children:[t.jsx(le,{loading:r}),"Establishing a secure connection"]}),t.jsxs(ue,{children:[t.jsx(le,{loading:n}),"Authenticating your account"]}),t.jsxs(ue,{children:[t.jsx(le,{loading:e}),"Fetching your existing components"]})]})}function le({loading:e}){return e?t.jsx(mt,{className:"h-5 w-5 border-2"}):t.jsx(be,{className:"h-5 w-5",tickClasses:"w-3 h-3"})}function ue({children:e}){return t.jsx("li",{className:"flex items-center gap-1",children:e})}async function dr({payload:e}){const r=je(ge.serviceConnectors.fullStackResources),s=await _e(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching service connector type");throw new ve({status:s.status,statusText:s.statusText,message:n})}return s.json()}function fr(e){return St({...e,mutationFn:async({payload:r})=>dr({payload:r})})}function mr(e){return new Promise(r=>setTimeout(r,e))}function hr(){const{setCurrentStep:e}=k(),[r,s]=_.useState(!0),{toast:n}=Me(),{setData:o,data:a}=C(),i=fr({onSuccess:async f=>{o(d=>I(d,c=>{c.fullstackResources=f})),s(!1),await mr(200),e(d=>d+1)},onError:f=>{n({status:"error",emphasis:"subtle",description:f.message,rounded:!0})}});return{handleFormSubmit:({authMethod:f,stackName:d,...c})=>{Object.keys(c).forEach(l=>{(c[l]===""||c[l]===null||c[l]===void 0||Array.isArray(c[l])&&c[l].length===0)&&delete c[l]});const m=I(a,l=>{l.stackName=d,l.connectorConfig&&(l.connectorConfig.auth_method=f,l.connectorConfig.configuration={...c})});o(m),m.connectorConfig&&i.mutate({payload:m.connectorConfig})},fullStackResources:i,loadingComponents:r}}function xr(){const{handleSubmit:e,formState:{isSubmitting:r}}=y(),{handleFormSubmit:s,fullStackResources:n,loadingComponents:o}=hr();return t.jsxs("form",{onSubmit:e(s),id:"connect-form",children:[t.jsx(lr,{loadingComponents:o,open:r||n.isPending}),t.jsx(rr,{}),t.jsx(Xe,{}),t.jsx(ar,{})]})}function pr(){const{schema:e}=X(),r=$({shouldUnregister:!0,mode:"onChange",resolver:B(e)});return t.jsx(V,{...r,children:t.jsxs(O,{children:[t.jsx(D,{children:"Connect to your Cloud"}),t.jsx(T,{children:t.jsx(xr,{})}),t.jsx(E,{children:t.jsx(yr,{})})]})})}function yr(){const{formState:{isValid:e,isSubmitting:r}}=y(),s=!!Le();return t.jsx(w,{className:"justify-center gap-2",disabled:!e||s||r,form:"connect-form",size:"md",children:s||r?"Loading...":"Next"})}function jr(){const{data:e,setData:r}=C(),s=bt(),{toast:n}=Me(),{setCurrentStep:o}=k(),{mutate:a}=vt({onError:d=>{d instanceof Error&&n({status:"error",emphasis:"subtle",icon:t.jsx(ht,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess:async d=>{r(c=>I(c,m=>{m.createdStackId=d.id})),o(c=>c+1),s.invalidateQueries({queryKey:qe.all})}});if(!e.fullstackResources)return o(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const i=e.fullstackResources.components_resources_info.container_registry,u=i.flatMap(d=>d.accessible_by_service_connector.map(c=>({...d,value:c})));function f({flavor:d,resourceId:c}){const m=i.find(x=>x.flavor===d);if(!m)return;const l=I(e,x=>{x.registryConfig={flavor:d,configuration:Object.fromEntries(Object.keys(m.required_configuration||{}).map(p=>[p,c])),service_connector_resource_id:c}});r(l),a({workspaceId:"default",payload:{name:l.stackName||Math.random().toString(36).substring(7),service_connectors:l.connectorConfig?[l.connectorConfig]:[],components:{orchestrator:[{...l.orchestratorConfig,service_connector_index:0}],artifact_store:[{...l.artifactStoreConfig,service_connector_index:0}],container_registry:[{...l.registryConfig,service_connector_index:0}]}}})}return{handleFormSubmit:f,flattenedInstances:u}}const gr="container_registry";function _r(){const[e,r]=_.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:i,trigger:u,reset:f}=y(),{flattenedInstances:d,handleFormSubmit:c}=jr(),m=d.filter(l=>l.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(W,{placeholder:"Search...",onChange:l=>{f(),r(l.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...a("flavor")}),t.jsx("ul",{className:"space-y-1",children:m.map(l=>t.jsx("li",{children:t.jsx(b,{name:"resourceId",control:s,render:({field:{onChange:x,...p}})=>t.jsxs(H,{"data-state":i("resourceId")===l.value?"selected":"unselected",htmlFor:l.value,children:[t.jsx(K,{id:l.value,type:"radio",...p,onChange:S=>{n("flavor",l.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),x(S.target.value),u()},value:l.value,name:"connector-radio"}),t.jsx(q,{width:24,height:24,type:gr,flavor:l.flavor})," ",t.jsx("span",{children:l.value})]})})},l.value))})]})]})}function vr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(Se,{type:"container_registry",className:"h-5 w-5 fill-primary-400"}),"Select your Container Registry"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the Container Registries for your new stack"})]})})}const Sr=h.object({flavor:h.string().min(1),resourceId:h.string().min(1)});function br(){const e=$({resolver:B(Sr),shouldUnregister:!0});return t.jsx(V,{...e,children:t.jsxs(O,{children:[t.jsx(D,{children:"Container Registry"}),t.jsx(T,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(vr,{}),t.jsx(_r,{})]})}),t.jsx(E,{children:t.jsx(Cr,{})})]})})}function Cr(){const e=y(),r=!!Le();return t.jsxs(w,{className:"justify-center gap-2",disabled:!e.formState.isValid||r,form:"artifact-store-form",size:"md",children:[r&&t.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),r?"Loading...":"Next"]})}function wr(){var a;const{data:e,setData:r}=C(),{setCurrentStep:s}=k();if(!e.fullstackResources)return s(2),{orchestrators:[],handleFormSubmit:()=>{}};const n=((a=e.fullstackResources.components_resources_info)==null?void 0:a.orchestrator)||[];function o({flavor:i,resourceId:u,...f}){const d=n.find(c=>c.flavor===i);d&&(r(c=>{const m=d!=null&&d.use_resource_value_as_fixed_config?Object.fromEntries(Object.keys(d.required_configuration||{}).map(l=>[l,u])):{...f};return I(c,l=>{l.orchestratorConfig={flavor:i,configuration:m,service_connector_resource_id:u}})}),s(c=>c+1))}return{orchestrators:n,handleFormSubmit:o}}const ye=h.object({flavor:h.string().min(1),resourceId:h.string().min(1)});function Nr(e){const r=Object.keys(e).reduce((s,n)=>(s[n]=h.string().trim().min(1),s),{});return h.object(r)}const Z="kubernetes",De="orchestrator";function Fr(){const{orchestrators:e,handleFormSubmit:r}=wr(),{setSchema:s}=X(),{control:n,watch:o,setValue:a,register:i,reset:u,handleSubmit:f}=y(),d=o("flavor");return t.jsxs("form",{onSubmit:f(r),id:"artifact-store-form",children:[d!==Z&&t.jsx("input",{...i("resourceId"),type:"hidden"}),t.jsx("ul",{className:"space-y-1",children:e.map((c,m)=>t.jsxs("li",{children:[t.jsx(b,{control:n,name:"flavor",render:({field:{onChange:l,...x}})=>t.jsxs(H,{"data-state":d===c.flavor?"selected":"unselected",htmlFor:c.flavor,children:[t.jsx(K,{onChange:p=>{u({flavor:c.flavor}),c.use_resource_value_as_fixed_config===!0&&s(ye),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&s(ye.merge(Nr(c.required_configuration))),c.flavor!==Z&&c.accessible_by_service_connector.length>0&&a("resourceId",c.accessible_by_service_connector[0]),l(p)},...x,id:c.flavor,type:"radio",value:c.flavor,name:"orchestrator-flavor-radio"}),t.jsx(q,{width:24,height:24,type:De,flavor:c.flavor}),t.jsx("span",{children:c.flavor_display_name})]})}),d===c.flavor&&(c.flavor===Z||c.use_resource_value_as_fixed_config===!1)&&t.jsxs("div",{className:"space-y-3 py-5 pl-8",children:[c.flavor===Z&&t.jsx("ul",{className:"space-y-1",children:c.accessible_by_service_connector.map(l=>t.jsx("li",{children:t.jsx(b,{control:n,name:"resourceId",render:({field:x})=>t.jsxs(H,{"data-state":o("resourceId")===l?"selected":"unselected",htmlFor:l,children:[t.jsx(K,{...x,id:l,type:"radio",value:l,name:"instance-radio"}),t.jsx(q,{type:De,width:24,height:24,flavor:c.flavor}),t.jsx("span",{children:l})]})})},l))}),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&Object.keys(c.required_configuration).length>=1&&t.jsx("div",{children:Object.entries(c.required_configuration).map(([l,x])=>t.jsx("div",{children:t.jsx(b,{name:l,control:n,render:({field:p})=>t.jsxs("div",{children:[t.jsx("label",{htmlFor:l,className:"text-text-sm",children:x}),t.jsx(W,{...p,inputSize:"md",required:!0,className:"w-full",id:l})]})})},l))})]})]},m))})]})}function Pr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(Se,{type:"orchestrator",className:"h-5 w-5 fill-primary-400"}),"Select your Orchestrator"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the connected orchestrators for your new stack"})]})})}function kr(){const{schema:e}=X(),r=$({resolver:B(e),shouldUnregister:!0,defaultValues:{resourceId:""}});return t.jsx(V,{...r,children:t.jsxs(O,{children:[t.jsx(D,{children:"Orchestrator"}),t.jsxs(T,{children:[t.jsx(Pr,{}),t.jsx(Fr,{})]}),t.jsx(E,{children:t.jsx(Ar,{})})]})})}function Ar(){const e=y();return t.jsx(w,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const zr=h.object({provider:h.string().min(1)});function Ir(){var a;const{setData:e,data:r}=C(),{setCurrentStep:s}=k(),n=$({resolver:B(zr),defaultValues:{provider:((a=r.connectorConfig)==null?void 0:a.type)||""}});function o(i){e(u=>({...u,connectorConfig:{type:i.provider,auth_method:""}})),s(u=>u+1)}return t.jsx(V,{...n,children:t.jsxs(O,{children:[t.jsx(D,{children:"Select Your Existing Cloud Infrastructure"}),t.jsx(T,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where you have existing infrastructure to connect with ZenML. This will allow you to integrate your current cloud resources with ZenML for model deployment and management."})]}),t.jsxs("form",{id:"provider-form",onSubmit:n.handleSubmit(o),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",children:[t.jsx(oe,{id:"aws-provider",...n.register("provider"),value:"aws",children:t.jsx(ie,{icon:t.jsx(M,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"Connect your existing S3, ECR, and Sagemaker components to ZenML"})}),t.jsx(oe,{id:"gcp-provider",...n.register("provider"),value:"gcp",children:t.jsx(ie,{icon:t.jsx(M,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Link your GCS, Artifact Registry, and Vertex AI components to ZenML"})}),t.jsx(oe,{id:"azure-provider",...n.register("provider"),value:"azure",children:t.jsx(ie,{icon:t.jsx(M,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Integrate ZenML with your Blob Storage, Container Registry, and Azure ML"})})]})]})}),t.jsx(E,{children:t.jsx(Or,{})})]})})}function Or(){const{formState:{isValid:e}}=y();return t.jsx(w,{form:"provider-form",disabled:!e,size:"md",children:"Next"})}function Dr(){var o;const{data:e}=C(),r=J({...qe.stackDetail(e.createdStackId||""),throwOnError:!0});if(r.isError)return null;if(r.isPending)return t.jsx(Y,{className:"h-[200px] w-full"});const s=r.data,n=It((o=r.data.metadata)==null?void 0:o.components);return t.jsxs(O,{children:[t.jsx(D,{children:"Your stack"}),t.jsx(T,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsx("p",{className:"text-theme-text-secondary",children:"Here you can review the created stack and stack components. Now you can start running pipelines using this new configuration."}),t.jsxs("div",{className:"divide-y divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[t.jsx(Er,{stack:s}),n.map(a=>t.jsx(Mr,{component:a},a.id))]})]})}),t.jsx(E,{displayCancel:!1,children:t.jsx(Tr,{})})]})}function Tr(){return t.jsx(w,{size:"md",asChild:!0,children:t.jsx(Ot,{to:xt.stacks.overview,children:"Finish"})})}function Er({stack:e}){return t.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 font-semibold",children:[t.jsx(be,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(pt,{type:"square",size:"lg",children:t.jsx(yt,{size:"lg",children:e.name[0]})}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]})}function Mr({component:e}){var r,s,n,o;return t.jsxs("div",{className:"flex items-center justify-between py-3 pl-9 pr-5",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(be,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(q,{width:24,height:24,flavor:((r=e.body)==null?void 0:r.flavor)||"",type:((s=e.body)==null?void 0:s.type)||"orchestrator"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg font-semibold",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),t.jsx(zt,{type:((n=e.body)==null?void 0:n.type)||"alerter",children:jt((o=e.body)==null?void 0:o.type)})]},e.id)}function Rr(){const{currentStep:e}=k();if(e===1)return t.jsx(Ir,{});if(e===2)return t.jsx(Pe,{initialSchema:Ye,children:t.jsx(pr,{})});if(e===3)return t.jsx(Yt,{});if(e===4)return t.jsx(Pe,{initialSchema:ye,children:t.jsx(kr,{})});if(e===5)return t.jsx(br,{});if(e===6)return t.jsx(Dr,{})}const Te=["Infrastructure Type","Cloud Provider","Connect your Cloud","Artifact Store","Orchestrator","Container Registry"];function ds(){return t.jsx(et,{maxSteps:Te.length+1,initialStep:1,children:t.jsx(Dt,{children:t.jsxs("section",{className:"layout-container flex flex-col gap-5 py-5 xl:flex-row",children:[t.jsx(tt,{entries:Te}),t.jsx("div",{className:"w-full",children:t.jsx(Rr,{})})]})})})}export{ds as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{j as e,r}from"./@radix-DP6vWzyx.js";import{B as a,aG as n,P as l,e as i}from"./index-QQb7wQEC.js";import{C as m}from"./CodeSnippet-CqybNv0k.js";import{I as c}from"./Infobox-BwisKifi.js";import{c as d}from"./@react-router-BMhZulnd.js";import{C as x,m as p}from"./cloud-only-B-s_HMDm.js";import"./@tanstack-BUCbhJyH.js";import"./@reactflow-8U9qNlMR.js";import"./copy-CaSMXwiU.js";function u(){return e.jsx(c,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"This is a ZenML Pro feature. "}),e.jsx("p",{children:"Upgrade to ZenML Pro to access the Model Control Plane and interact with your models in the Dashboard."})]})})}function f(){const[o]=d(),s=o.get("model");function t(){return s?`zenml model list --name='contains:${s}'`:"zenml model list"}return e.jsxs(a,{className:"flex flex-wrap justify-between p-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-text-xl font-semibold",children:"Staying Open Source? "}),e.jsx("p",{className:"text-theme-text-secondary",children:"No problem! Use this CLI command to list your models"})]}),e.jsx(m,{code:t()})]})}const h="/assets/mcp-Cb1aMeoq.webp";function w(){const{setTourState:o,tourState:{tourActive:s}}=n();return r.useEffect(()=>{s&&o(t=>({...t,run:!0,stepIndex:t.stepIndex}))},[s]),e.jsxs("div",{children:[e.jsxs(l,{className:"flex items-center gap-1",children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"Models"}),e.jsx(i,{color:"purple",rounded:!0,size:"sm",children:e.jsx("span",{className:"font-semibold text-primary-500",children:"Pro"})})]}),e.jsxs("div",{className:"layout-container space-y-5 py-5",children:[e.jsx(u,{}),e.jsx(x,{feature:"model",image:{src:h,alt:"Screenshot of the ZenML Pro Model Control plane"},features:p}),e.jsx(f,{})]})]})}export{w as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{j as e,r as j}from"./@radix-DP6vWzyx.js";import{P as f,t as g,z as o,E as b,r as c,T as y,v as N,w as v,x as P,y as p,f as R,G as S,S as u,N as T}from"./index-QQb7wQEC.js";import{c as k,L as l,g as h}from"./@react-router-BMhZulnd.js";import{S as C}from"./refresh-BVu22P_C.js";import{R as _,a as E,u as w,b as D,c as F,d as A}from"./RunSelector-DCiL3M1c.js";import{S as B,P as I}from"./SearchField-DfUiGFVd.js";import{C as x}from"./CopyButton-C745BrKi.js";import{D as z}from"./DisplayDate-BeXgUG_C.js";import{g as G,E as L}from"./delete-run-D-LKbGyz.js";import{I as U}from"./InlineAvatar-jEgodSgX.js";import"./@tanstack-BUCbhJyH.js";import"./@reactflow-8U9qNlMR.js";import"./url-D5le3J4q.js";import"./trash-DkJHMOg7.js";import"./dots-horizontal-DK5Duzx4.js";import"./AlertDialogDropdownItem-C6N2rGrB.js";import"./chevron-right-double-DoD8iXWM.js";import"./index-BVJ8n2-j.js";import"./copy-CaSMXwiU.js";import"./zod-D89GC_vc.js";import"./index.esm-cuVep_NJ.js";import"./check-circle-Dwxliy1Z.js";function H({namespace:s}){return e.jsx(f,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(g,{className:"h-5 w-5 fill-neutral-400"}),e.jsx("h1",{className:"text-display-xs font-semibold",children:decodeURIComponent(s)})]})})}const d=1,q=o.object({page:o.coerce.number().min(d).optional().default(d).catch(d),name:o.string().optional(),operator:o.enum(["and","or"]).optional()});function O(){const[s]=k(),{page:a,name:t,operator:r}=q.parse({page:s.get("page")||void 0,name:s.get("name")||void 0});return{page:a,name:t,logical_operator:r}}function $(){return[{id:"check",header:"",meta:{width:"1%"},accessorFn:s=>({id:s.id}),cell:({getValue:s})=>{const{id:a}=s();return e.jsx(_,{id:a})}},{id:"run",header:"Run",accessorFn:s=>{var a;return{name:s.name,id:s.id,status:(a=s.body)==null?void 0:a.status}},cell:({getValue:s})=>{const{name:a,status:t,id:r}=s();return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(b,{className:`h-5 w-5 shrink-0 ${G(t)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(l,{to:c.runs.detail(r),className:"flex items-center gap-1",children:e.jsx("h2",{className:"text-text-md font-semibold",children:a})}),e.jsx(y,{children:e.jsxs(N,{children:[e.jsx(v,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(L,{status:t})}),e.jsx(P,{className:"z-20 capitalize",children:t})]})}),e.jsx(x,{copyText:a})]}),e.jsxs(l,{to:c.runs.detail(r),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:r.split("-")[0]}),e.jsx(x,{copyText:r})]})]})]})}},{id:"stack",header:"Stack",accessorFn:s=>{var a,t,r,n;return{name:(t=(a=s.body)==null?void 0:a.stack)==null?void 0:t.name,id:(n=(r=s.body)==null?void 0:r.stack)==null?void 0:n.id}},cell:({getValue:s})=>{const{name:a,id:t}=s();return!a||!t?null:e.jsx(l,{to:c.stacks.overview,children:e.jsx(p,{rounded:!1,className:"inline-block",color:"turquoise",emphasis:"subtle",children:a})})}},{id:"repository",header:"Repository",accessorFn:s=>{var a,t,r,n,i,m;return{name:(r=(t=(a=s.body)==null?void 0:a.code_reference)==null?void 0:t.body)==null?void 0:r.code_repository.name,id:(m=(i=(n=s.body)==null?void 0:n.code_reference)==null?void 0:i.body)==null?void 0:m.code_repository.id}},cell:({getValue:s})=>{const{name:a,id:t}=s();return!a||!t?null:e.jsx("div",{children:e.jsx(p,{rounded:!1,className:"inline-block",color:"grey",emphasis:"subtle",children:a})})}},{id:"created",header:"Created at",accessorFn:s=>{var a;return(a=s.body)==null?void 0:a.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(z,{dateString:s()})})},{id:"author",header:"Author",accessorFn:s=>{var a;return{author:(a=s.body)==null?void 0:a.user}},cell:({getValue:s})=>{const{author:a}=s();return e.jsx(U,{username:a.name})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:s})=>e.jsx(E,{id:s.original.id})}]}function J(){const{namespace:s}=h(),a=O(),t=$(),{selectedRuns:r}=w(),{data:n,refetch:i}=D({params:{pipeline_name:decodeURIComponent(s),...a,sort_by:"desc:updated"}},{throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5 p-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[r.length?e.jsx(F,{}):e.jsx(B,{searchParams:a}),e.jsxs(R,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>i(),children:[e.jsx(C,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:n?e.jsx(S,{columns:t,data:n.items}):e.jsx(u,{className:"h-[500px] w-full"})}),n?n.total_pages>1&&e.jsx(I,{searchParams:a,paginate:n}):e.jsx(u,{className:"h-[36px] w-[300px]"})]})]})}function xe(){const{namespace:s}=h(),{setCurrentBreadcrumbData:a}=T();return j.useEffect(()=>{s&&a({segment:"pipeline_detail",data:{name:s}})},[s]),e.jsx("div",{children:e.jsxs(A,{children:[e.jsx(H,{namespace:s}),e.jsx(J,{})]})})}export{xe as default};
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import{q as u}from"./@tanstack-BUCbhJyH.js";import{l as m,m as p,k as d,n as y,F as g,z as A}from"./index-QQb7wQEC.js";import{o as v}from"./url-D5le3J4q.js";import{f as x}from"./stack-detail-query-xmYxSsUY.js";import{g as E}from"./@radix-DP6vWzyx.js";async function P(e){const n=m(p.stackDeployment.config)+(e?`?${v(e)}`:""),t=await d(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&y(),!t.ok){const a=await t.json().then(r=>Array.isArray(r.detail)?r.detail[1]:r.detail).catch(()=>"Error while fetching stack deployment config");throw new g({status:t.status,statusText:t.statusText,message:a})}return t.json()}async function O(e){const n=m(p.stackDeployment.info)+(e?`?${v(e)}`:""),t=await d(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&y(),!t.ok){const a=await t.json().then(r=>Array.isArray(r.detail)?r.detail[1]:r.detail).catch(()=>"Error while fetching stack deployment info");throw new g({status:t.status,statusText:t.statusText,message:a})}return t.json()}async function q(e){const n=m(p.stackDeployment.stack)+(e?`?${v(e)}`:""),t=await d(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&y(),!t.ok){const a=await t.json().then(r=>Array.isArray(r.detail)?r.detail[1]:r.detail).catch(()=>"Error while fetching the deployed stack");throw new g({status:t.status,statusText:t.statusText,message:a})}return t.json()}async function S(e){const n=m(p.stacks.all)+(e?`?${v(e)}`:""),t=await d(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&y(),!t.ok){const a=await t.json().then(r=>Array.isArray(r.detail)?r.detail[1]:r.detail).catch(()=>"Error while fetching stacks");throw new g({status:t.status,statusText:t.statusText,message:a})}return t.json()}const l={all:["stacks"],stackDeployment:["stack-deployment"],stackList:e=>u({queryKey:[...l.all,e],queryFn:async()=>S(e)}),stackDetail:e=>u({queryKey:[...l.all,e],queryFn:async()=>x({stackId:e})}),stackDeploymentInfo:e=>u({queryKey:[...l.stackDeployment,"info",e],queryFn:async()=>O(e)}),stackDeploymentStack:e=>u({queryKey:[...l.stackDeployment,"stack",e],queryFn:async()=>q(e)}),stackDeploymentConfig:e=>u({queryKey:[...l.stackDeployment,"config",e],queryFn:async()=>P(e)})};var K=function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=void 0,o=void 0,c=void 0,s=[];return function(){var b=$(t),T=new Date().getTime(),F=!r||T-r>b;r=T;for(var j=arguments.length,f=Array(j),h=0;h<j;h++)f[h]=arguments[h];if(F&&a.leading)return a.accumulate?Promise.resolve(n.call(this,[f])).then(function(D){return D[0]}):Promise.resolve(n.call.apply(n,[this].concat(f)));if(o?clearTimeout(c):o=G(),s.push(f),c=setTimeout(i.bind(this),b),a.accumulate){var C=s.length-1;return o.promise.then(function(D){return D[C]})}return o.promise};function i(){var k=o;clearTimeout(c),Promise.resolve(a.accumulate?n.call(this,s):n.apply(this,s[s.length-1])).then(k.resolve,k.reject),s=[],o=null}};function $(e){return typeof e=="function"?e():e}function G(){var e={};return e.promise=new Promise(function(n,t){e.resolve=n,e.reject=t}),e}const L=E(K);function R(e){var n=null,t=null,a=new Promise(function(r,o){n=r,t=o});return e&&e.then(function(r){n&&n(r)},function(r){t&&t(r)}),{promise:a,resolve:function(r){n&&n(r)},reject:function(r){t&&t(r)},cancel:function(){n=null,t=null}}}function W(e){var n=null,t=function(){for(var a=[],r=0;r<arguments.length;r++)a[r]=arguments[r];n&&n();var o=e.apply(void 0,a),c=R(o),s=c.promise,i=c.cancel;return n=i,s};return t}/*! *****************************************************************************
|
2
|
-
Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
4
|
-
this file except in compliance with the License. You may obtain a copy of the
|
5
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
6
|
-
|
7
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
8
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
9
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
10
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
11
|
-
|
12
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
13
|
-
and limitations under the License.
|
14
|
-
***************************************************************************** */var w=function(){return w=Object.assign||function(n){for(var t,a=1,r=arguments.length;a<r;a++){t=arguments[a];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o])}return n},w.apply(this,arguments)},z={key:function(){return null},onlyResolvesLast:!0},I=function(){function e(n){this.config=n,this.debounceSingleton=null,this.debounceCache={}}return e.prototype._createDebouncedFunction=function(){var n=L(this.config.func,this.config.wait,this.config.options);return this.config.options.onlyResolvesLast&&(n=W(n)),{func:n}},e.prototype.getDebouncedFunction=function(n){var t,a=(t=this.config.options).key.apply(t,n);return a===null||typeof a>"u"?(this.debounceSingleton||(this.debounceSingleton=this._createDebouncedFunction()),this.debounceSingleton):(this.debounceCache[a]||(this.debounceCache[a]=this._createDebouncedFunction()),this.debounceCache[a])},e}();function N(e,n,t){var a=w({},z,t),r=new I({func:e,wait:n,options:a}),o=function(){for(var c=[],s=0;s<arguments.length;s++)c[s]=arguments[s];var i=r.getDebouncedFunction(c).func;return i.apply(void 0,c)};return o}const Q=N(async e=>(await S({name:e})).total===0,500),U=A.string().trim().min(1,"Stack name is required").max(32,"Stack name must be less than 32 characters").regex(/^[a-zA-Z0-9-]+$/,"Stack name can only contain alphanumeric characters and hyphens").refine(e=>Q(e),"Stack name is already in use");export{U as a,l as s};
|