zenml-nightly 0.84.2.dev20250827__py3-none-any.whl → 0.84.3.dev20250829__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.
- zenml/VERSION +1 -1
- zenml/cli/login.py +30 -19
- zenml/cli/server.py +6 -10
- zenml/login/credentials.py +27 -0
- zenml/login/credentials_store.py +80 -80
- zenml/login/pro/client.py +74 -54
- zenml/login/pro/utils.py +1 -3
- zenml/utils/package_utils.py +1 -1
- zenml/zen_server/dashboard/assets/{404-CMbwR10f.js → 404-JcbBcNWG.js} +1 -1
- zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-BpLj419i.js → AlertDialogDropdownItem-DuTp8JFP.js} +1 -1
- zenml/zen_server/dashboard/assets/{ButtonGroup-DVhzbQxV.js → ButtonGroup-B9_gfcC-.js} +1 -1
- zenml/zen_server/dashboard/assets/{CodeSnippet-B7Wd4R8u.js → CodeSnippet-D7OZMz7I.js} +1 -1
- zenml/zen_server/dashboard/assets/{CollapsibleCard-DSZzbjx5.js → CollapsibleCard-Aqd_AiGn.js} +1 -1
- zenml/zen_server/dashboard/assets/{ComponentBadge-MVT08kBV.js → ComponentBadge-BVRb7wgm.js} +1 -1
- zenml/zen_server/dashboard/assets/{ComponentIcon-C9AY8usJ.js → ComponentIcon-CWDJZO4Q.js} +1 -1
- zenml/zen_server/dashboard/assets/{DeleteAlertDialog-CzhTVQaC.js → DeleteAlertDialog-C5z9RupH.js} +1 -1
- zenml/zen_server/dashboard/assets/{DialogItem-DD_7v3UY.js → DialogItem-Ce3ugDgT.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-Cakgjexo.js → Error-BGej6F2q.js} +1 -1
- zenml/zen_server/dashboard/assets/{ExecutionStatus-CQbWovhV.js → ExecutionStatus-BhDlfndt.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-7FZpmsHB.js → Helpbox-CQjyNo0n.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-DnduZjNU.js → Infobox-CXOIY92f.js} +1 -1
- zenml/zen_server/dashboard/assets/{LeftSideMenu-D5UEs4vB.js → LeftSideMenu-DGICatl7.js} +1 -1
- zenml/zen_server/dashboard/assets/{NestedCollapsible-0yviIfaA.js → NestedCollapsible-DmryIMwk.js} +1 -1
- zenml/zen_server/dashboard/assets/{NumberBox-C2Pju4PR.js → NumberBox-7OIA56xe.js} +1 -1
- zenml/zen_server/dashboard/assets/{Pagination-C1sE5Nzn.js → Pagination-CVYIgR9l.js} +1 -1
- zenml/zen_server/dashboard/assets/{Partials-DosysQMU.js → Partials-NicibWrh.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProCta-CUkpV3PJ.js → ProCta-DspRnbtD.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderIcon-aQjTuTRX.js → ProviderIcon-DwKsXziU.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderRadio-C6pLVNxC.js → ProviderRadio-BixXi4GC.js} +1 -1
- zenml/zen_server/dashboard/assets/{RunsBody-CZAiSxYK.js → RunsBody-BSOSIxRG.js} +1 -1
- zenml/zen_server/dashboard/assets/{SearchField-Byv1PtST.js → SearchField-BbwrusMV.js} +1 -1
- zenml/zen_server/dashboard/assets/{SecretTooltip-CErfhVgF.js → SecretTooltip-BsFul9Oe.js} +1 -1
- zenml/zen_server/dashboard/assets/{SetPassword-C4OH-cn1.js → SetPassword-D-V7D0OR.js} +1 -1
- zenml/zen_server/dashboard/assets/{SheetHeader-Bb3v9rha.js → SheetHeader-xumE4haD.js} +1 -1
- zenml/zen_server/dashboard/assets/{StackComponentList-D85oab98.js → StackComponentList-CLnkE6-6.js} +1 -1
- zenml/zen_server/dashboard/assets/{StackList-DSAjbVb5.js → StackList-DhsbaNva.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tabs-2uwqXsdL.js → Tabs-CkY3GwhK.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tick-BQ7_xDBl.js → Tick-Bo7jwBjb.js} +1 -1
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DNkYgzN6.js → UpdatePasswordSchemas-BP4hg95A.js} +1 -1
- zenml/zen_server/dashboard/assets/{Wizard-2FIi8JNY.js → Wizard-0nbnAM1R.js} +1 -1
- zenml/zen_server/dashboard/assets/{WizardFooter-DQEnlDmZ.js → WizardFooter-CLPi4VBo.js} +1 -1
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-CdvWtiAY.js → all-pipeline-runs-query-mPYeJsKz.js} +1 -1
- zenml/zen_server/dashboard/assets/{bulk-delete-wdObjfps.js → bulk-delete-Bgf_MsSj.js} +1 -1
- zenml/zen_server/dashboard/assets/{configuration-form-BbcNBQTO.js → configuration-form-Bnyw4-V5.js} +1 -1
- zenml/zen_server/dashboard/assets/{constants-DfvsDtcH.js → constants-Ddhz1mpL.js} +1 -1
- zenml/zen_server/dashboard/assets/{create-stack-D4Sf7QpF.js → create-stack-BpTy7-E4.js} +1 -1
- zenml/zen_server/dashboard/assets/{delete-run-XSre8ru-.js → delete-run-MHYb1wuH.js} +1 -1
- zenml/zen_server/dashboard/assets/form-VRON3-kT.js +1 -0
- zenml/zen_server/dashboard/assets/{form-schemas-BjWDRvGd.js → form-schemas-CpTCEVoG.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-BYHxFvoG.js → index-BYCBKUXk.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-CO6UN3UX.js → index-Ci5z7q6x.js} +2 -2
- zenml/zen_server/dashboard/assets/{index-d_QrPL-8.js → index-D_-iUPTg.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-BYzR7YrM.js → index-rnWXXblA.js} +1 -1
- zenml/zen_server/dashboard/assets/{layout-Cyc-V16c.js → layout-DhFllShI.js} +1 -1
- zenml/zen_server/dashboard/assets/{login-mutation-CDgTlQBD.js → login-mutation-DOxF97JV.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Bncp08FW.js → page-62MHYKGv.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CMvcoaSZ.js → page-6YPAQ0BU.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CEHZzQ1Q.js → page-8ZbMMHB-.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-D654xHWd.js → page-AWVW_lra.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BnZEAhNn.js → page-B1rTgWkQ.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BbsvGfyi.js → page-B5YCjh4t.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DgOEl3Bc.js → page-BDawWKR9.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DOnAInjC.js → page-BFzVhfws.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BaQw51KO.js +1 -0
- zenml/zen_server/dashboard/assets/{page-C4Jnp1qP.js → page-Bh4TFAum.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CGtll3Jk.js → page-BjuIRasU.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-43SWdz4k.js → page-BoQ_Wheb.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Du6bFZTS.js → page-Bs6NTqHo.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B4QBxV0B.js → page-Bsiqb0ZN.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-AOVMuHDc.js → page-C09_xoEs.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-O5xnz_nW.js → page-CI0U7nE4.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-C9IsnFid.js → page-CId8DuKX.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CzDjN1wE.js → page-CJSSCJ58.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B8ict_cR.js → page-CJXxkmGx.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DgblJuXC.js → page-CS3tgRFg.js} +1 -1
- zenml/zen_server/dashboard/assets/page-Cd8VCEYG.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DsFXol8x.js → page-CicaAxfg.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CkFIY_Cg.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BnAMyQZb.js → page-CkX3R4er.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DerIbaqa.js → page-Cu-ZYOrj.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CyID6Sp5.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DZ5hcS1o.js → page-D0Z9wEBf.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-hX7NkNdA.js → page-D83H0IPX.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DgSu4pTE.js → page-DAF5ySum.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-ClqRvz_V.js → page-DMiWibIV.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Bi4I23Hs.js → page-DMtUDzEY.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BDre_qCO.js → page-DNLxVFH7.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DLrYW-Dn.js → page-Dfaj9bx6.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DznxxpKA.js → page-DhlhT_XT.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CKPkbOoE.js → page-DqXw1YhM.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-E9Mx9_rn.js → page-DtjangP-.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DQncGJeH.js → page-GJ63jkFi.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DSn1Jcvs.js → page-RtFcujP8.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-HrebZOAM.js → page-T1JEtrlC.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DQzNmXk3.js → page-cS5O9iLC.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Dpw-xP4q.js → page-s1bm6Xid.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-Dkbp9MFP.js → persist-C98EYq5I.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-B3Hb8HDW.js → persist-FuiGbvJD.js} +1 -1
- zenml/zen_server/dashboard/assets/{primary-role-CjkpP9fL.js → primary-role-Bsu7s76U.js} +1 -1
- zenml/zen_server/dashboard/assets/{resource-tyes-list-CugyWUAE.js → resource-tyes-list-C7I0VL8e.js} +1 -1
- zenml/zen_server/dashboard/assets/{resource-type-tooltip-V-zdiLKz.js → resource-type-tooltip-2vjL6Wh9.js} +1 -1
- zenml/zen_server/dashboard/assets/{service-FjqYTmBw.js → service-BPdLzxxT.js} +1 -1
- zenml/zen_server/dashboard/assets/{service-connectors-nF4-OXB9.js → service-connectors-BkE8Ol4i.js} +1 -1
- zenml/zen_server/dashboard/assets/{sharedSchema-Br1JPr8d.js → sharedSchema-CKFbjwmg.js} +1 -1
- zenml/zen_server/dashboard/assets/{stack-detail-query-DnyMCdVE.js → stack-detail-query-JsrqFo3U.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-current-user-mutation-B3Dpv3u6.js → update-current-user-mutation-C4CPf7vG.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-s7tlHN8s.js → update-server-settings-mutation-BYfIU-xU.js} +1 -1
- zenml/zen_server/dashboard/index.html +2 -2
- zenml/zen_server/routers/service_accounts_endpoints.py +24 -0
- zenml/zen_stores/migrations/versions/0.84.3_release.py +23 -0
- zenml/zen_stores/rest_zen_store.py +16 -5
- {zenml_nightly-0.84.2.dev20250827.dist-info → zenml_nightly-0.84.3.dev20250829.dist-info}/METADATA +2 -2
- {zenml_nightly-0.84.2.dev20250827.dist-info → zenml_nightly-0.84.3.dev20250829.dist-info}/RECORD +116 -115
- zenml/zen_server/dashboard/assets/form-C1jJgRy1.js +0 -1
- zenml/zen_server/dashboard/assets/page-1DXG7hp8.js +0 -1
- zenml/zen_server/dashboard/assets/page-C7Z2sDHE.js +0 -1
- zenml/zen_server/dashboard/assets/page-C8t9qLdV.js +0 -1
- zenml/zen_server/dashboard/assets/page-CVwTAlzd.js +0 -1
- {zenml_nightly-0.84.2.dev20250827.dist-info → zenml_nightly-0.84.3.dev20250829.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.84.2.dev20250827.dist-info → zenml_nightly-0.84.3.dev20250829.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.84.2.dev20250827.dist-info → zenml_nightly-0.84.3.dev20250829.dist-info}/entry_points.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
import{r as i,j as e}from"./@radix-B1sy0Lhr.js";import{u as d,d as c,bg as y,aw as m,L as N,M as w,B as x,N as L,O as b,r as u,bh as P,k as H,R as C,U as h,V as p,a5 as S,W as j,bi as f,l as k,ay as M,m as z,c as E,b9 as U}from"./index-CO6UN3UX.js";import{h as D,b as g}from"./@tanstack-Dwlisomv.js";import{L as v}from"./@react-router-CHjLNlgw.js";import{S as T}from"./pipeline-CDJSAXrb.js";import{S as R}from"./terminal-C2tAF2XG.js";import{u as B}from"./update-current-user-mutation-B3Dpv3u6.js";import{S as Z}from"./plus-DOrkJCmy.js";import"./@reactflow-gbyyU3kq.js";const _=s=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.66438 2.01352C10.2092 2.10431 10.5772 2.61954 10.4864 3.16431L9.84711 6.99991H15.8195L16.5136 2.83551C16.6044 2.29074 17.1196 1.92272 17.6644 2.01352C18.2091 2.10431 18.5772 2.61954 18.4864 3.16431L17.8471 6.99991H20.5C21.0523 6.99991 21.5 7.44763 21.5 7.99991C21.5 8.5522 21.0523 8.99991 20.5 8.99991H17.5138L16.5138 14.9999H19.5C20.0523 14.9999 20.5 15.4476 20.5 15.9999C20.5 16.5522 20.0523 16.9999 19.5 16.9999H16.1804L15.4864 21.1643C15.3956 21.7091 14.8803 22.0771 14.3356 21.9863C13.7908 21.8955 13.4228 21.3803 13.5136 20.8355L14.1528 16.9999H8.18045L7.48638 21.1643C7.39558 21.7091 6.88036 22.0771 6.33559 21.9863C5.79082 21.8955 5.4228 21.3803 5.51359 20.8355L6.15286 16.9999H2.5C1.94772 16.9999 1.5 16.5522 1.5 15.9999C1.5 15.4476 1.94772 14.9999 2.5 14.9999H6.48619L7.48619 8.99991H3.5C2.94772 8.99991 2.5 8.5522 2.5 7.99991C2.5 7.44763 2.94772 6.99991 3.5 6.99991H7.81953L8.51359 2.83551C8.60439 2.29074 9.11961 1.92272 9.66438 2.01352ZM9.51378 8.99991L8.51378 14.9999H14.4862L15.4862 8.99991H9.51378Z"})),I=s=>i.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...s},i.createElement("g",{id:"settings"},i.createElement("g",{id:"Icon (Stroke)"},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79084 8 7.99998 9.79086 7.99998 12C7.99998 14.2091 9.79084 16 12 16ZM14 12C14 13.1046 13.1046 14 12 14C10.8954 14 9.99998 13.1046 9.99998 12C9.99998 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12Z"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.3426 2.32757C13.1416 0.826354 10.8583 0.826356 9.65737 2.32758L7.8196 4.62479C7.62983 4.86201 7.34251 5.0001 7.03873 5.0001H5.23605C3.0059 5.0001 1.55541 7.34703 2.55277 9.34174L3.65834 11.5529C3.7991 11.8344 3.7991 12.1658 3.65834 12.4473L2.55277 14.6585C1.55542 16.6532 3.0059 19.0001 5.23605 19.0001H7.03873C7.34251 19.0001 7.62983 19.1382 7.8196 19.3754L9.65737 21.6726C10.8584 23.1738 13.1416 23.1738 14.3426 21.6726L16.1804 19.3754C16.3701 19.1382 16.6574 19.0001 16.9612 19.0001H18.7639C20.9941 19.0001 22.4445 16.6532 21.4472 14.6585L20.3416 12.4473C20.2009 12.1658 20.2009 11.8344 20.3416 11.5529L21.4472 9.34174C22.4445 7.34703 20.9941 5.0001 18.7639 5.0001H16.9612C16.6574 5.0001 16.3701 4.86201 16.1804 4.62479L14.3426 2.32757ZM11.2191 3.57697C11.6194 3.07656 12.3805 3.07656 12.7808 3.57696L14.6186 5.87418C15.1879 6.58583 16.0499 7.0001 16.9612 7.0001H18.7639C19.5073 7.0001 19.9908 7.78241 19.6583 8.44731L18.5528 10.6585C18.1305 11.503 18.1305 12.4972 18.5528 13.3417L19.6583 15.5529C19.9908 16.2178 19.5073 17.0001 18.7639 17.0001H16.9612C16.0499 17.0001 15.1879 17.4144 14.6186 18.126L12.7809 20.4232C12.3805 20.9236 11.6194 20.9236 11.2191 20.4232L9.38134 18.126C8.81202 17.4144 7.95008 17.0001 7.03873 17.0001H5.23605C4.49267 17.0001 4.00917 16.2178 4.34162 15.5529L5.44719 13.3417C5.86949 12.4972 5.86949 11.503 5.44719 10.6585L4.34162 8.44731C4.00917 7.78241 4.49267 7.0001 5.23605 7.0001H7.03873C7.95008 7.0001 8.81202 6.58583 9.38134 5.87418L11.2191 3.57697Z"})))),Q=s=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.32406 1C8.33723 1 8.35044 1 8.36368 1L15.6768 1C16.0385 0.999969 16.3745 0.999939 16.6496 1.02491C16.9375 1.05104 17.2968 1.11316 17.6284 1.33301C18.0677 1.62422 18.3743 2.07707 18.4816 2.5931C18.5625 2.98268 18.4868 3.33932 18.4041 3.61632C18.3251 3.88107 18.2003 4.19305 18.0659 4.52883L17.0433 7.0853C17.0204 7.1427 17.0092 7.17072 17.0015 7.1913C17.0014 7.19179 17.0012 7.19225 17.001 7.1927C17.001 7.19318 17.001 7.19368 17.001 7.19419C17.0005 7.21616 17.0004 7.24632 17.0004 7.30814V9.43876C17.0004 9.55027 17.0006 9.60549 17.0022 9.64564C17.0022 9.64665 17.0023 9.64763 17.0023 9.64856C17.0029 9.64932 17.0034 9.6501 17.0041 9.65092C17.0279 9.68326 17.0622 9.7265 17.1319 9.81357L18.7295 11.8106C19.0385 12.1968 19.3122 12.5388 19.504 12.829C19.6913 13.1123 19.9193 13.5133 19.9198 13.9978C19.9205 14.6069 19.6435 15.1831 19.1675 15.5631C18.7888 15.8654 18.3333 15.9379 17.995 15.9686C17.6486 16.0001 17.2106 16 16.7159 16L13.0004 16L13.0004 22C13.0004 22.5523 12.5527 23 12.0004 23C11.4481 23 11.0004 22.5523 11.0004 22L11.0004 16L7.28496 16C6.79028 16 6.35222 16.0001 6.00585 15.9686C5.66758 15.9379 5.21203 15.8654 4.83335 15.5631C4.35733 15.1831 4.0804 14.6069 4.08106 13.9978C4.08158 13.5133 4.30954 13.1123 4.49686 12.829C4.68867 12.5388 4.96234 12.1968 5.27138 11.8105L6.86895 9.81357C6.93861 9.7265 6.97297 9.68327 6.99681 9.65092C6.99741 9.6501 6.99799 9.64932 6.99854 9.64856C6.99858 9.64762 6.99862 9.64665 6.99866 9.64564C7.00025 9.60549 7.00043 9.55027 7.00043 9.43876V7.30814C7.00043 7.24632 7.00037 7.21617 6.99987 7.1942C6.99986 7.19368 6.99985 7.19318 6.99984 7.1927C6.99967 7.19225 6.9995 7.19179 6.99932 7.1913C6.99162 7.17072 6.98047 7.1427 6.95752 7.0853L5.94964 4.56562C5.94473 4.55333 5.93982 4.54107 5.93493 4.52884C5.80058 4.19306 5.67575 3.88107 5.59675 3.61632C5.51409 3.33932 5.43834 2.98268 5.51929 2.5931C5.62652 2.07707 5.93312 1.62422 6.37241 1.33301C6.70406 1.11316 7.06333 1.05104 7.35122 1.02491C7.62638 0.999939 7.9624 0.999969 8.32406 1ZM16.6714 14C17.2242 14 17.5695 13.999 17.8141 13.9768C17.8312 13.9752 17.847 13.9736 17.8615 13.972C17.8537 13.9596 17.8451 13.9463 17.8356 13.932C17.7002 13.7271 17.4853 13.4568 17.14 13.0252L15.5702 11.063C15.5614 11.052 15.5523 11.0407 15.5431 11.0292C15.4416 10.903 15.3139 10.744 15.2194 10.5591C15.1374 10.3987 15.0775 10.2278 15.0413 10.0513C14.9995 9.84793 15 9.64398 15.0004 9.48205C15.0004 9.46725 15.0004 9.45281 15.0004 9.43876V7.30814C15.0004 7.30039 15.0004 7.29243 15.0004 7.28429C15.0003 7.19422 15.0001 7.08077 15.0134 6.96478C15.025 6.86392 15.0442 6.76409 15.071 6.66615C15.1017 6.55352 15.144 6.44823 15.1775 6.36464C15.1806 6.35709 15.1835 6.34971 15.1864 6.34252L16.1943 3.82284C16.3484 3.43753 16.4378 3.21134 16.4876 3.04443C16.4903 3.03549 16.4927 3.02712 16.4949 3.01929C16.4868 3.01843 16.4781 3.01757 16.4689 3.01672C16.2954 3.00098 16.0522 3 15.6372 3H8.36368C7.94869 3 7.70547 3.00098 7.53199 3.01672C7.52271 3.01757 7.51404 3.01843 7.50595 3.01929C7.50815 3.02712 7.51057 3.03549 7.51324 3.04443C7.56305 3.21134 7.65247 3.43753 7.8066 3.82284L8.81447 6.34252C8.81735 6.34971 8.82031 6.35709 8.82334 6.36465C8.8569 6.44823 8.89917 6.55352 8.9299 6.66615C8.95662 6.76409 8.97585 6.86392 8.98741 6.96478C9.00071 7.08077 9.00057 7.19423 9.00045 7.2843C9.00044 7.29244 9.00043 7.30039 9.00043 7.30814V9.43876C9.00043 9.45281 9.00046 9.46725 9.0005 9.48205C9.00087 9.64398 9.00133 9.84793 8.95959 10.0513C8.92337 10.2278 8.86344 10.3987 8.78146 10.5591C8.68701 10.744 8.55923 10.903 8.45778 11.0292C8.44852 11.0407 8.43947 11.052 8.43069 11.063L6.86091 13.0252C6.51558 13.4568 6.30064 13.7271 6.16521 13.932C6.15573 13.9463 6.14712 13.9596 6.13932 13.972C6.15384 13.9736 6.16964 13.9752 6.18677 13.9768C6.43132 13.999 6.77664 14 7.32943 14H16.6714Z"}));function V({projectId:s}){var n;const t=d();if(t.isPending||t.isError)return e.jsxs(e.Fragment,{children:[e.jsx(c,{className:"h-[44px] w-full"}),e.jsx("div",{"aria-hidden":"true",className:"my-1 h-[1px] bg-theme-border-moderate"})]});const a=((n=t.data.body)==null?void 0:n.default_project_id)===s,l=t.data.id;return a?e.jsx(o,{userId:l}):e.jsx(o,{projectId:s,userId:l})}function o({projectId:s}){const t=D(),{mutate:r,isPending:a}=B({onSuccess:()=>{t.invalidateQueries({queryKey:y()})}});return e.jsx(m,{onSelect:()=>{r({default_project_id:s||null})},disabled:a,className:"hover:cursor-pointer",icon:e.jsx(Q,{}),children:s?"Set as default":"Unset as default"})}function q({projectId:s}){return e.jsxs(N,{children:[e.jsx(w,{asChild:!0,children:e.jsx(x,{className:"z-20 flex aspect-square size-6 shrink-0 items-center justify-center bg-white p-0",intent:"secondary",emphasis:"bold",size:"sm",children:e.jsx(L,{className:"h-5 w-5 fill-theme-text-secondary"})})}),e.jsxs(b,{className:"z-10",align:"end",sideOffset:1,children:[e.jsx(m,{asChild:!0,icon:e.jsx(I,{}),children:e.jsx(v,{className:"hover:cursor-pointer",to:u.projects.settings.repositories.overview,children:"Project Settings"})}),e.jsx("div",{"aria-hidden":"true",className:"my-1 h-[1px] bg-theme-border-moderate"}),e.jsx(V,{projectId:s})]})]})}function F({project:s,isDefault:t=!1}){var l;const r=(l=s.body)==null?void 0:l.display_name,a=`https://public-flavor-logos.s3.eu-central-1.amazonaws.com/projects/${P(s.name)}.jpg`;return e.jsxs(H,{className:"group relative h-full overflow-hidden transition-all duration-300 hover:shadow-md",children:[e.jsxs("div",{className:"relative h-[180px] w-full",children:[e.jsx("img",{alt:s.name,src:a,className:"h-full w-full object-cover"}),e.jsx("div",{className:"absolute right-2 top-2 z-10 opacity-0 transition-all duration-300 group-hover:opacity-100",children:e.jsx(q,{projectId:s.id})})]}),e.jsxs("div",{className:"space-y-5 p-5",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"truncate text-text-xl font-semibold",children:r}),t&&e.jsx($,{})]}),e.jsxs("div",{className:"flex items-center gap-0.5 text-text-sm text-theme-text-secondary",children:[e.jsx(_,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary"}),e.jsx("p",{className:"truncate",children:s.name})]})]}),e.jsx("div",{className:"space-y-4",children:e.jsx(K,{projectName:s.id})}),e.jsx(O,{projectId:s.name})]}),e.jsx(v,{to:u.projects.pipelines.overview,className:"absolute inset-0"})]})}function K({projectName:s}){const t=g({...f.projectStatistics(s)});if(t.isPending)return e.jsx(c,{className:"h-4 w-[120px]"});if(t.isError)return null;const r=t.data;return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx(T,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:[r.pipelines," pipelines"]})]}),e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx(R,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:[r.runs," runs"]})]})]})}function O({projectId:s}){const{copied:t,copyToClipboard:r}=k(),a=`zenml project set ${s}`;return e.jsx("div",{className:"flex items-center gap-2 truncate",children:e.jsxs("div",{className:"flex w-full items-center justify-between gap-1 truncate rounded-md border border-theme-border-moderate bg-theme-surface-secondary px-2 py-1 text-text-sm text-theme-text-secondary",children:[e.jsx("code",{className:"truncate",children:a}),t?e.jsxs(e.Fragment,{children:[e.jsx(M,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"}),e.jsx("p",{className:"sr-only",children:"copied successfully"})]}):e.jsxs("button",{className:"z-10",onClick:()=>r(a),children:[e.jsx(z,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"}),e.jsx("p",{className:"sr-only",children:"Copy tenantUrl"})]})]})})}function $(){return e.jsx(C,{children:e.jsxs(h,{children:[e.jsx(p,{className:"z-10",children:e.jsx(S,{size:"sm",rounded:!1,className:"font-semibold uppercase",color:"purple",children:"Default"})}),e.jsxs(j,{className:"max-w-[320px] space-y-0.5",children:[e.jsx("p",{className:"font-semibold",children:"This is your default project in this workspace"}),e.jsx("p",{children:"This project is used automatically when no specific project is selected"})]})]})})}function G(){var l,n;const s=g({...f.projectDetail("default")}),t=d();if(s.isPending||t.isPending)return e.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.jsx("div",{className:"h-full w-full",children:e.jsx(c,{className:"h-[400px] w-full"})})});if(s.isError)return e.jsx("p",{children:s.error.message});const r=s.data,a=(n=(l=t.data)==null?void 0:l.body)==null?void 0:n.default_project_id;return e.jsx("ul",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.jsx("li",{children:e.jsx(F,{project:r,isDefault:a===r.id})})})}function W(){return e.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2",children:e.jsx(C,{children:e.jsxs(h,{children:[e.jsx(p,{className:"z-10",children:e.jsxs("div",{className:E(U({size:"md"}),"pointer-events-none bg-primary-50"),children:[e.jsx(Z,{width:24,height:24,className:"shrink-0 fill-white"}),"New Project"]})}),e.jsxs(j,{side:"bottom",align:"end",className:"max-w-[320px] space-y-4 border border-theme-border-moderate bg-theme-surface-primary p-5 text-text-md text-theme-text-primary",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{children:"Upgrade to create Projects"}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Get access to additional projects and workspaces, manage users and permissions, and get advanced features with ZenML Pro"})]}),e.jsx(x,{asChild:!0,children:e.jsx("a",{target:"_blank",className:"block w-fit",rel:"noopener noreferrer",href:"https://zenml.io/book-your-demo",children:"Book a demo"})})]})]})})})}function i1(){return e.jsxs("div",{className:"layout-container space-y-4 py-5",children:[e.jsx(W,{}),e.jsx(G,{})]})}export{i1 as default};
|
1
|
+
import{r as i,j as e}from"./@radix-B1sy0Lhr.js";import{u as d,d as c,bg as y,aw as m,L as N,M as w,B as x,N as L,O as b,r as u,bh as P,k as H,R as C,U as h,V as p,a5 as S,W as j,bi as f,l as k,ay as M,m as z,c as E,b9 as U}from"./index-Ci5z7q6x.js";import{h as D,b as g}from"./@tanstack-Dwlisomv.js";import{L as v}from"./@react-router-CHjLNlgw.js";import{S as T}from"./pipeline-CDJSAXrb.js";import{S as R}from"./terminal-C2tAF2XG.js";import{u as B}from"./update-current-user-mutation-C4CPf7vG.js";import{S as Z}from"./plus-DOrkJCmy.js";import"./@reactflow-gbyyU3kq.js";const _=s=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.66438 2.01352C10.2092 2.10431 10.5772 2.61954 10.4864 3.16431L9.84711 6.99991H15.8195L16.5136 2.83551C16.6044 2.29074 17.1196 1.92272 17.6644 2.01352C18.2091 2.10431 18.5772 2.61954 18.4864 3.16431L17.8471 6.99991H20.5C21.0523 6.99991 21.5 7.44763 21.5 7.99991C21.5 8.5522 21.0523 8.99991 20.5 8.99991H17.5138L16.5138 14.9999H19.5C20.0523 14.9999 20.5 15.4476 20.5 15.9999C20.5 16.5522 20.0523 16.9999 19.5 16.9999H16.1804L15.4864 21.1643C15.3956 21.7091 14.8803 22.0771 14.3356 21.9863C13.7908 21.8955 13.4228 21.3803 13.5136 20.8355L14.1528 16.9999H8.18045L7.48638 21.1643C7.39558 21.7091 6.88036 22.0771 6.33559 21.9863C5.79082 21.8955 5.4228 21.3803 5.51359 20.8355L6.15286 16.9999H2.5C1.94772 16.9999 1.5 16.5522 1.5 15.9999C1.5 15.4476 1.94772 14.9999 2.5 14.9999H6.48619L7.48619 8.99991H3.5C2.94772 8.99991 2.5 8.5522 2.5 7.99991C2.5 7.44763 2.94772 6.99991 3.5 6.99991H7.81953L8.51359 2.83551C8.60439 2.29074 9.11961 1.92272 9.66438 2.01352ZM9.51378 8.99991L8.51378 14.9999H14.4862L15.4862 8.99991H9.51378Z"})),I=s=>i.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...s},i.createElement("g",{id:"settings"},i.createElement("g",{id:"Icon (Stroke)"},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79084 8 7.99998 9.79086 7.99998 12C7.99998 14.2091 9.79084 16 12 16ZM14 12C14 13.1046 13.1046 14 12 14C10.8954 14 9.99998 13.1046 9.99998 12C9.99998 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12Z"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.3426 2.32757C13.1416 0.826354 10.8583 0.826356 9.65737 2.32758L7.8196 4.62479C7.62983 4.86201 7.34251 5.0001 7.03873 5.0001H5.23605C3.0059 5.0001 1.55541 7.34703 2.55277 9.34174L3.65834 11.5529C3.7991 11.8344 3.7991 12.1658 3.65834 12.4473L2.55277 14.6585C1.55542 16.6532 3.0059 19.0001 5.23605 19.0001H7.03873C7.34251 19.0001 7.62983 19.1382 7.8196 19.3754L9.65737 21.6726C10.8584 23.1738 13.1416 23.1738 14.3426 21.6726L16.1804 19.3754C16.3701 19.1382 16.6574 19.0001 16.9612 19.0001H18.7639C20.9941 19.0001 22.4445 16.6532 21.4472 14.6585L20.3416 12.4473C20.2009 12.1658 20.2009 11.8344 20.3416 11.5529L21.4472 9.34174C22.4445 7.34703 20.9941 5.0001 18.7639 5.0001H16.9612C16.6574 5.0001 16.3701 4.86201 16.1804 4.62479L14.3426 2.32757ZM11.2191 3.57697C11.6194 3.07656 12.3805 3.07656 12.7808 3.57696L14.6186 5.87418C15.1879 6.58583 16.0499 7.0001 16.9612 7.0001H18.7639C19.5073 7.0001 19.9908 7.78241 19.6583 8.44731L18.5528 10.6585C18.1305 11.503 18.1305 12.4972 18.5528 13.3417L19.6583 15.5529C19.9908 16.2178 19.5073 17.0001 18.7639 17.0001H16.9612C16.0499 17.0001 15.1879 17.4144 14.6186 18.126L12.7809 20.4232C12.3805 20.9236 11.6194 20.9236 11.2191 20.4232L9.38134 18.126C8.81202 17.4144 7.95008 17.0001 7.03873 17.0001H5.23605C4.49267 17.0001 4.00917 16.2178 4.34162 15.5529L5.44719 13.3417C5.86949 12.4972 5.86949 11.503 5.44719 10.6585L4.34162 8.44731C4.00917 7.78241 4.49267 7.0001 5.23605 7.0001H7.03873C7.95008 7.0001 8.81202 6.58583 9.38134 5.87418L11.2191 3.57697Z"})))),Q=s=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.32406 1C8.33723 1 8.35044 1 8.36368 1L15.6768 1C16.0385 0.999969 16.3745 0.999939 16.6496 1.02491C16.9375 1.05104 17.2968 1.11316 17.6284 1.33301C18.0677 1.62422 18.3743 2.07707 18.4816 2.5931C18.5625 2.98268 18.4868 3.33932 18.4041 3.61632C18.3251 3.88107 18.2003 4.19305 18.0659 4.52883L17.0433 7.0853C17.0204 7.1427 17.0092 7.17072 17.0015 7.1913C17.0014 7.19179 17.0012 7.19225 17.001 7.1927C17.001 7.19318 17.001 7.19368 17.001 7.19419C17.0005 7.21616 17.0004 7.24632 17.0004 7.30814V9.43876C17.0004 9.55027 17.0006 9.60549 17.0022 9.64564C17.0022 9.64665 17.0023 9.64763 17.0023 9.64856C17.0029 9.64932 17.0034 9.6501 17.0041 9.65092C17.0279 9.68326 17.0622 9.7265 17.1319 9.81357L18.7295 11.8106C19.0385 12.1968 19.3122 12.5388 19.504 12.829C19.6913 13.1123 19.9193 13.5133 19.9198 13.9978C19.9205 14.6069 19.6435 15.1831 19.1675 15.5631C18.7888 15.8654 18.3333 15.9379 17.995 15.9686C17.6486 16.0001 17.2106 16 16.7159 16L13.0004 16L13.0004 22C13.0004 22.5523 12.5527 23 12.0004 23C11.4481 23 11.0004 22.5523 11.0004 22L11.0004 16L7.28496 16C6.79028 16 6.35222 16.0001 6.00585 15.9686C5.66758 15.9379 5.21203 15.8654 4.83335 15.5631C4.35733 15.1831 4.0804 14.6069 4.08106 13.9978C4.08158 13.5133 4.30954 13.1123 4.49686 12.829C4.68867 12.5388 4.96234 12.1968 5.27138 11.8105L6.86895 9.81357C6.93861 9.7265 6.97297 9.68327 6.99681 9.65092C6.99741 9.6501 6.99799 9.64932 6.99854 9.64856C6.99858 9.64762 6.99862 9.64665 6.99866 9.64564C7.00025 9.60549 7.00043 9.55027 7.00043 9.43876V7.30814C7.00043 7.24632 7.00037 7.21617 6.99987 7.1942C6.99986 7.19368 6.99985 7.19318 6.99984 7.1927C6.99967 7.19225 6.9995 7.19179 6.99932 7.1913C6.99162 7.17072 6.98047 7.1427 6.95752 7.0853L5.94964 4.56562C5.94473 4.55333 5.93982 4.54107 5.93493 4.52884C5.80058 4.19306 5.67575 3.88107 5.59675 3.61632C5.51409 3.33932 5.43834 2.98268 5.51929 2.5931C5.62652 2.07707 5.93312 1.62422 6.37241 1.33301C6.70406 1.11316 7.06333 1.05104 7.35122 1.02491C7.62638 0.999939 7.9624 0.999969 8.32406 1ZM16.6714 14C17.2242 14 17.5695 13.999 17.8141 13.9768C17.8312 13.9752 17.847 13.9736 17.8615 13.972C17.8537 13.9596 17.8451 13.9463 17.8356 13.932C17.7002 13.7271 17.4853 13.4568 17.14 13.0252L15.5702 11.063C15.5614 11.052 15.5523 11.0407 15.5431 11.0292C15.4416 10.903 15.3139 10.744 15.2194 10.5591C15.1374 10.3987 15.0775 10.2278 15.0413 10.0513C14.9995 9.84793 15 9.64398 15.0004 9.48205C15.0004 9.46725 15.0004 9.45281 15.0004 9.43876V7.30814C15.0004 7.30039 15.0004 7.29243 15.0004 7.28429C15.0003 7.19422 15.0001 7.08077 15.0134 6.96478C15.025 6.86392 15.0442 6.76409 15.071 6.66615C15.1017 6.55352 15.144 6.44823 15.1775 6.36464C15.1806 6.35709 15.1835 6.34971 15.1864 6.34252L16.1943 3.82284C16.3484 3.43753 16.4378 3.21134 16.4876 3.04443C16.4903 3.03549 16.4927 3.02712 16.4949 3.01929C16.4868 3.01843 16.4781 3.01757 16.4689 3.01672C16.2954 3.00098 16.0522 3 15.6372 3H8.36368C7.94869 3 7.70547 3.00098 7.53199 3.01672C7.52271 3.01757 7.51404 3.01843 7.50595 3.01929C7.50815 3.02712 7.51057 3.03549 7.51324 3.04443C7.56305 3.21134 7.65247 3.43753 7.8066 3.82284L8.81447 6.34252C8.81735 6.34971 8.82031 6.35709 8.82334 6.36465C8.8569 6.44823 8.89917 6.55352 8.9299 6.66615C8.95662 6.76409 8.97585 6.86392 8.98741 6.96478C9.00071 7.08077 9.00057 7.19423 9.00045 7.2843C9.00044 7.29244 9.00043 7.30039 9.00043 7.30814V9.43876C9.00043 9.45281 9.00046 9.46725 9.0005 9.48205C9.00087 9.64398 9.00133 9.84793 8.95959 10.0513C8.92337 10.2278 8.86344 10.3987 8.78146 10.5591C8.68701 10.744 8.55923 10.903 8.45778 11.0292C8.44852 11.0407 8.43947 11.052 8.43069 11.063L6.86091 13.0252C6.51558 13.4568 6.30064 13.7271 6.16521 13.932C6.15573 13.9463 6.14712 13.9596 6.13932 13.972C6.15384 13.9736 6.16964 13.9752 6.18677 13.9768C6.43132 13.999 6.77664 14 7.32943 14H16.6714Z"}));function V({projectId:s}){var n;const t=d();if(t.isPending||t.isError)return e.jsxs(e.Fragment,{children:[e.jsx(c,{className:"h-[44px] w-full"}),e.jsx("div",{"aria-hidden":"true",className:"my-1 h-[1px] bg-theme-border-moderate"})]});const a=((n=t.data.body)==null?void 0:n.default_project_id)===s,l=t.data.id;return a?e.jsx(o,{userId:l}):e.jsx(o,{projectId:s,userId:l})}function o({projectId:s}){const t=D(),{mutate:r,isPending:a}=B({onSuccess:()=>{t.invalidateQueries({queryKey:y()})}});return e.jsx(m,{onSelect:()=>{r({default_project_id:s||null})},disabled:a,className:"hover:cursor-pointer",icon:e.jsx(Q,{}),children:s?"Set as default":"Unset as default"})}function q({projectId:s}){return e.jsxs(N,{children:[e.jsx(w,{asChild:!0,children:e.jsx(x,{className:"z-20 flex aspect-square size-6 shrink-0 items-center justify-center bg-white p-0",intent:"secondary",emphasis:"bold",size:"sm",children:e.jsx(L,{className:"h-5 w-5 fill-theme-text-secondary"})})}),e.jsxs(b,{className:"z-10",align:"end",sideOffset:1,children:[e.jsx(m,{asChild:!0,icon:e.jsx(I,{}),children:e.jsx(v,{className:"hover:cursor-pointer",to:u.projects.settings.repositories.overview,children:"Project Settings"})}),e.jsx("div",{"aria-hidden":"true",className:"my-1 h-[1px] bg-theme-border-moderate"}),e.jsx(V,{projectId:s})]})]})}function F({project:s,isDefault:t=!1}){var l;const r=(l=s.body)==null?void 0:l.display_name,a=`https://public-flavor-logos.s3.eu-central-1.amazonaws.com/projects/${P(s.name)}.jpg`;return e.jsxs(H,{className:"group relative h-full overflow-hidden transition-all duration-300 hover:shadow-md",children:[e.jsxs("div",{className:"relative h-[180px] w-full",children:[e.jsx("img",{alt:s.name,src:a,className:"h-full w-full object-cover"}),e.jsx("div",{className:"absolute right-2 top-2 z-10 opacity-0 transition-all duration-300 group-hover:opacity-100",children:e.jsx(q,{projectId:s.id})})]}),e.jsxs("div",{className:"space-y-5 p-5",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"truncate text-text-xl font-semibold",children:r}),t&&e.jsx($,{})]}),e.jsxs("div",{className:"flex items-center gap-0.5 text-text-sm text-theme-text-secondary",children:[e.jsx(_,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary"}),e.jsx("p",{className:"truncate",children:s.name})]})]}),e.jsx("div",{className:"space-y-4",children:e.jsx(K,{projectName:s.id})}),e.jsx(O,{projectId:s.name})]}),e.jsx(v,{to:u.projects.pipelines.overview,className:"absolute inset-0"})]})}function K({projectName:s}){const t=g({...f.projectStatistics(s)});if(t.isPending)return e.jsx(c,{className:"h-4 w-[120px]"});if(t.isError)return null;const r=t.data;return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx(T,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:[r.pipelines," pipelines"]})]}),e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx(R,{width:16,height:16,className:"shrink-0 fill-theme-text-tertiary"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:[r.runs," runs"]})]})]})}function O({projectId:s}){const{copied:t,copyToClipboard:r}=k(),a=`zenml project set ${s}`;return e.jsx("div",{className:"flex items-center gap-2 truncate",children:e.jsxs("div",{className:"flex w-full items-center justify-between gap-1 truncate rounded-md border border-theme-border-moderate bg-theme-surface-secondary px-2 py-1 text-text-sm text-theme-text-secondary",children:[e.jsx("code",{className:"truncate",children:a}),t?e.jsxs(e.Fragment,{children:[e.jsx(M,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"}),e.jsx("p",{className:"sr-only",children:"copied successfully"})]}):e.jsxs("button",{className:"z-10",onClick:()=>r(a),children:[e.jsx(z,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"}),e.jsx("p",{className:"sr-only",children:"Copy tenantUrl"})]})]})})}function $(){return e.jsx(C,{children:e.jsxs(h,{children:[e.jsx(p,{className:"z-10",children:e.jsx(S,{size:"sm",rounded:!1,className:"font-semibold uppercase",color:"purple",children:"Default"})}),e.jsxs(j,{className:"max-w-[320px] space-y-0.5",children:[e.jsx("p",{className:"font-semibold",children:"This is your default project in this workspace"}),e.jsx("p",{children:"This project is used automatically when no specific project is selected"})]})]})})}function G(){var l,n;const s=g({...f.projectDetail("default")}),t=d();if(s.isPending||t.isPending)return e.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.jsx("div",{className:"h-full w-full",children:e.jsx(c,{className:"h-[400px] w-full"})})});if(s.isError)return e.jsx("p",{children:s.error.message});const r=s.data,a=(n=(l=t.data)==null?void 0:l.body)==null?void 0:n.default_project_id;return e.jsx("ul",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.jsx("li",{children:e.jsx(F,{project:r,isDefault:a===r.id})})})}function W(){return e.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2",children:e.jsx(C,{children:e.jsxs(h,{children:[e.jsx(p,{className:"z-10",children:e.jsxs("div",{className:E(U({size:"md"}),"pointer-events-none bg-primary-50"),children:[e.jsx(Z,{width:24,height:24,className:"shrink-0 fill-white"}),"New Project"]})}),e.jsxs(j,{side:"bottom",align:"end",className:"max-w-[320px] space-y-4 border border-theme-border-moderate bg-theme-surface-primary p-5 text-text-md text-theme-text-primary",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{children:"Upgrade to create Projects"}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Get access to additional projects and workspaces, manage users and permissions, and get advanced features with ZenML Pro"})]}),e.jsx(x,{asChild:!0,children:e.jsx("a",{target:"_blank",className:"block w-fit",rel:"noopener noreferrer",href:"https://zenml.io/book-your-demo",children:"Book a demo"})})]})]})})})}function i1(){return e.jsxs("div",{className:"layout-container space-y-4 py-5",children:[e.jsx(W,{}),e.jsx(G,{})]})}export{i1 as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e,r}from"./@radix-B1sy0Lhr.js";import{aH as m,aI as i,B as o,aJ as p,D as x,aN as h,aO as u,k as n,P as f}from"./index-
|
1
|
+
import{j as e,r}from"./@radix-B1sy0Lhr.js";import{aH as m,aI as i,B as o,aJ as p,D as x,aN as h,aO as u,k as n,P as f}from"./index-Ci5z7q6x.js";import{I as l}from"./Infobox-CXOIY92f.js";import{H as C}from"./Helpbox-CQjyNo0n.js";import{C as g}from"./CodeSnippet-D7OZMz7I.js";import"./@tanstack-Dwlisomv.js";import"./@react-router-CHjLNlgw.js";import"./@reactflow-gbyyU3kq.js";import"./info-CI2szPUG.js";import"./help-CRPfbPTO.js";const j=[{command:"zenml code-repository register <NAME> --type=<CODE_REPOSITORY_TYPE] [--CODE_REPOSITORY_OPTIONS]",description:"Register a code repository"},{command:"zenml code-repository register <NAME> --type=custom --source=<CODE_REPOSITORY_SOURCE> [--CODE_REPOSITORY_OPTIONS]",description:"Use a custom repository "},{command:"zenml code-repository list",description:"List your registered code repositories"},{command:"zenml code-repository delete <REPOSITORY_NAME_OR_ID>",description:"Delete a code repository that you have previously registered"}];function y(s){return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:s.description}),e.jsx(g,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:s.command})]})}const w=s=>r.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3ZM1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12ZM11.2451 7.43304C11.2546 7.43912 11.264 7.44517 11.2734 7.45121L15.994 10.4859C16.0026 10.4914 16.0112 10.497 16.02 10.5026C16.171 10.5996 16.3361 10.7057 16.4676 10.8083C16.6071 10.917 16.8273 11.1089 16.9571 11.4162C17.1148 11.7894 17.1148 12.2106 16.9571 12.5838C16.8273 12.8911 16.6071 13.083 16.4676 13.1917C16.3361 13.2943 16.171 13.4004 16.02 13.4974C16.0112 13.503 16.0026 13.5086 15.994 13.5141L11.2734 16.5488C11.264 16.5548 11.2545 16.5609 11.2451 16.567C11.0694 16.68 10.8846 16.7988 10.7219 16.8835C10.5582 16.9687 10.2611 17.1066 9.89314 17.0804C9.45914 17.0494 9.05999 16.8314 8.79923 16.4831C8.57813 16.1878 8.5335 15.8633 8.51664 15.6796C8.49989 15.4969 8.49995 15.2772 8.49999 15.0683C8.5 15.057 8.5 15.0458 8.5 15.0347V8.96533C8.5 8.95417 8.5 8.94296 8.49999 8.93173C8.49995 8.72279 8.49989 8.50311 8.51664 8.32042C8.5335 8.13665 8.57813 7.81219 8.79923 7.51687C9.05999 7.16856 9.45914 6.95064 9.89314 6.91964C10.2611 6.89336 10.5582 7.03127 10.7219 7.11647C10.8846 7.20117 11.0694 7.32001 11.2451 7.43304ZM10.5 9.33167V14.6683L14.6507 12L10.5 9.33167Z"}));function a({videoLink:s,isButton:t=!0,buttonText:c,fallbackImage:d}){return e.jsxs(m,{children:[t?e.jsx(i,{asChild:!0,children:e.jsxs(o,{className:"mt-5 h-auto gap-1 px-2 py-1 sm:h-7",size:"md",children:[e.jsx(w,{className:"h-5 w-5 shrink-0 fill-white"}),c??e.jsx(e.Fragment,{children:"Watch the Quickstart Guide (3 min)"})]})}):e.jsx(i,{children:d}),e.jsxs(p,{className:"max-w-[1000px]",children:[e.jsx("div",{className:"flex items-center justify-between border-b border-theme-border-moderate py-2 pl-5 pr-3",children:e.jsx(x,{className:"text-text-lg",children:"Get Started"})}),e.jsx("div",{className:"",children:e.jsx("iframe",{className:"aspect-video w-full overflow-hidden",src:s,allowFullScreen:!0,allow:"fullscreen"})}),e.jsx(h,{children:e.jsx(u,{asChild:!0,children:e.jsx(o,{size:"md",children:"Close"})})})]})]})}const N="/assets/repos-video-D8kpu60k.svg";function v(){return e.jsx(l,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"We are creating a new Repositories experience"}),e.jsx("p",{children:"In the meanwhile you can use the CLI to add and manage your repos."})]})})}function R(){const s="https://zenml.portal.trainn.co/share/koVfVubiXfXLXtVcDAqPyg/embed?autoplay=false";return e.jsxs(n,{className:"flex flex-col-reverse items-stretch overflow-hidden md:flex-row",children:[e.jsxs("div",{className:"w-full p-7 md:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Learn More about Repositories"}),e.jsx("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:"Get started with ZenML Repositories for streamlined pipeline versioning and faster Docker builds."}),e.jsx(a,{videoLink:s,buttonText:"Watch the Starter Guide (2 min)"})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx(a,{fallbackImage:e.jsx("img",{src:N,alt:"Purple squares with text indicating a starter guide for secrets",className:"h-full w-full"}),videoLink:s,isButton:!1})})]})}function O(){return e.jsxs("section",{className:"space-y-5 pl-8 pr-5",children:[e.jsx(l,{className:"text-text-md",intent:"neutral",children:"Code repositories enable ZenML to keep track of the code version that you use for your pipeline runs. Additionally, running a pipeline which is tracked in a registered code repository can decrease the time it takes Docker to build images for containerized stack components."}),j.map((s,t)=>e.jsx(e.Fragment,{children:y(s)},t)),e.jsx(C,{text:"Check all the commands and find more about Repositories in our Docs",link:"https://docs.zenml.io/how-to/setting-up-a-project-repository/connect-your-git-repository"})]})}function _(){return e.jsxs(n,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Repositories"}),e.jsx(v,{}),e.jsx(R,{}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(f,{}),"Administering your Code Repositories"]}),e.jsx(O,{})]})}export{_ as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as u,j as e}from"./@radix-B1sy0Lhr.js";import{v as g,aM as m,aY as p,aP as j,w as N,aU as b,k as v,d as S}from"./index-
|
1
|
+
import{r as u,j as e}from"./@radix-B1sy0Lhr.js";import{v as g,aM as m,aY as p,aP as j,w as N,aU as b,k as v,d as S}from"./index-Ci5z7q6x.js";import{u as k}from"./update-server-settings-mutation-BYfIU-xU.js";import{h as C}from"./@tanstack-Dwlisomv.js";import"./@react-router-CHjLNlgw.js";import"./@reactflow-gbyyU3kq.js";function w({settings:t}){var o,l;const a=u.useId(),n=u.useId(),{toast:r}=g(),i=C(),x=((o=t.body)==null?void 0:o.display_announcements)??!1,h=((l=t.body)==null?void 0:l.display_updates)??!1,{mutate:c,isPending:d}=k({onError:s=>{i.invalidateQueries({queryKey:p()}),j(s)&&r({status:"error",emphasis:"subtle",icon:e.jsx(N,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})},onSuccess:()=>{i.invalidateQueries({queryKey:p()}),r({status:"success",emphasis:"subtle",rounded:!0,description:"Settings updated successfully"})}}),f=s=>{c({display_announcements:s})},y=s=>{c({display_updates:s})};return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(m,{checked:x,onCheckedChange:f,id:a,disabled:d}),e.jsxs("label",{htmlFor:a,className:"text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"Announcements"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Enable Announcements for important ZenML updates, surveys, and feedback opportunities."})]})]}),e.jsx("hr",{}),e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(m,{checked:h,onCheckedChange:y,id:n,disabled:d}),e.jsxs("label",{htmlFor:n,className:"text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"Updates"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Activate Updates to receive the latest ZenML news and feature releases."})]})]})]})}function M(){const{data:t}=b({throwOnError:!0});return e.jsxs(v,{className:"flex flex-col gap-5 p-5",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Notifications"}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"ZenML comes equipped with default widgets designed to enhance your experience by analyzing usage patterns, gathering your feedback, and ensuring you stay informed about our latest updates and features."})]}),e.jsx("div",{className:"",children:t?e.jsx(w,{settings:t}):e.jsx(S,{className:"h-[250px] w-full"})})]})}export{M as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as d,j as e}from"./@radix-B1sy0Lhr.js";import{u as V,W as ie,L as ce}from"./LeftSideMenu-D5UEs4vB.js";import{$ as le,a$ as de,r as F,a1 as ue,z as y,B as b,c as L,d as N,b0 as me,T as he,aZ as S,x as H,F as O,G as Z,H as Q,b1 as xe,b2 as q,b3 as I,b4 as W,b5 as Y,aG as $,b6 as k,aM as pe,w as K,I as z,b7 as fe,u as je,v as ye,X as B,a2 as ge,Y as Ce}from"./index-CO6UN3UX.js";import{W as A,H as R,B as E,F as P}from"./Wizard-2FIi8JNY.js";import{t as U}from"./zod-D48zuELD.js";import{a as C,C as w,u as G,F as J}from"./index.esm-SBF9nn_P.js";import{S as X}from"./arrow-left-BFB2mgJo.js";import{L as ee}from"./@react-router-CHjLNlgw.js";import{R as ve}from"./resource-tyes-list-CugyWUAE.js";import{b as M,c as te,h as be}from"./@tanstack-Dwlisomv.js";import{S as Ne}from"./transform-S7omcvTm.js";import{g as Se,a as we,D as Te,b as Ve}from"./form-C1jJgRy1.js";import{A as Me}from"./index.es-CZMSrR6z.js";import{S as ke}from"./Lock-u8WOoTTd.js";import{S as _}from"./check-circle-CG6XAdk-.js";import{d as _e}from"./index-g7wOyc86.js";import{S as Fe}from"./package-pR4bbXJp.js";import{C as Ae,R as Re}from"./resource-type-tooltip-V-zdiLKz.js";import{e as Ee,R as Pe,E as ze}from"./service-connectors-nF4-OXB9.js";import"./Tick-BQ7_xDBl.js";import"./check-C9Nye5lR.js";import"./@reactflow-gbyyU3kq.js";import"./plus-DOrkJCmy.js";import"./trash-D9LA4VFD.js";import"./info-CI2szPUG.js";function Be(){const{setBreadcrumbs:t}=le();d.useEffect(()=>{t([...de,{label:"New Connector",href:F.settings.connectors.create}])},[t])}function De(){return Be(),e.jsx(ue,{children:e.jsx("p",{className:"text-display-xs font-semibold",children:"Register a Service Connector"})})}const se=d.createContext(null);function Le({children:t}){const[s,r]=d.useState(""),[n,a]=d.useState(null);return e.jsx(se.Provider,{value:{connectorType:s,setConnectorType:r,createdConnector:n,setCreatedConnector:a},children:t})}function v(){const t=d.useContext(se);if(!t)throw new Error("useRegisterConnectorContext must be used within a RegisterConnectorProvider");return t}const He=y.object({connectorType:y.string().trim().min(1)});function re(){return e.jsx(b,{size:"md",intent:"secondary",asChild:!0,children:e.jsx(ee,{to:F.settings.connectors.overview,children:"Cancel"})})}function ne({isPending:t,...s}){return e.jsxs(b,{type:"submit",size:"md",intent:"primary",...s,children:[!!t&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),e.jsx("span",{children:"Next"}),e.jsx(X,{width:24,height:24,className:"size-5 shrink-0 rotate-180 fill-white"})]})}function Oe(t){const{goToPreviousStep:s}=V();return e.jsxs(b,{onClick:()=>s(),type:"button",size:"md",intent:"primary",emphasis:"subtle",...t,children:[e.jsx(X,{width:24,height:24,className:"size-5 shrink-0 fill-primary-600"}),"Prev"]})}const Ze=t=>d.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.24923 9.14303C6.0632 6.17816 8.7764 4 12 4C15.2236 4 17.9368 6.17816 18.7508 9.14303C21.1861 9.70961 23 11.8925 23 14.5C23 17.5376 20.5376 20 17.5 20H6.5C3.46243 20 1 17.5376 1 14.5C1 11.8925 2.8139 9.70961 5.24923 9.14303ZM12 6C9.51785 6 7.45643 7.80968 7.0665 10.1816C6.99268 10.6306 6.62505 10.9731 6.17196 11.0151C4.39329 11.1798 3 12.6778 3 14.5C3 16.433 4.567 18 6.5 18H17.5C19.433 18 21 16.433 21 14.5C21 12.6778 19.6067 11.1798 17.828 11.0151C17.375 10.9731 17.0073 10.6306 16.9335 10.1816C16.5436 7.80968 14.4822 6 12 6Z"}));function Qe(){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ze,{className:"size-5 shrink-0 stroke-primary-400"}),e.jsx("p",{className:"font-sebmibold text-text-lg",children:"Select a Service Connector Type"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select the type of service connector you want to create. This will allow you to integrate your cloud resources with ZenML for model deployment and management."})]})}function qe(){const t=M(S.serviceConnectorTypeList()),{control:s}=C();if(t.isError)return e.jsx("p",{children:"Failed to fetch Connector Type List"});if(t.isPending)return e.jsx($e,{});const r=t.data;return e.jsx("ul",{className:"space-y-2",children:r.map(n=>e.jsx("li",{children:e.jsx(w,{control:s,name:"connectorType",render:({field:{onChange:a,value:i}})=>e.jsxs("label",{className:L("flex w-full cursor-pointer items-center gap-5 rounded-md border p-5 transition-colors",{"border-primary-400 bg-primary-25 shadow-sm":i===n.connector_type,"border-theme-border-moderate hover:border-theme-border-bold hover:shadow-sm":i!==n.connector_type}),children:[e.jsx("input",{type:"radio",name:"connectorType",onChange:()=>a(n.connector_type),checked:i===n.connector_type,value:n.name,className:"h-3 w-3 border !border-theme-border-bold text-theme-surface-primary focus:ring-2 focus:ring-theme-surface-strong"}),e.jsxs("div",{className:"grid grid-cols-1 items-center gap-5 xl:grid-cols-3",children:[e.jsx(Ie,{connectorType:n}),e.jsx(We,{resourceTypes:n.resource_types}),e.jsx(Ye,{authMethods:n.auth_methods})]})]})})},n.name))})}function Ie({connectorType:t}){return e.jsxs("div",{className:"flex items-center gap-3",children:[t.logo_url&&e.jsx("img",{src:t.logo_url,width:32,height:32,className:"size-6 shrink-0",alt:t.name}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("div",{className:"text-text-lg font-semibold",children:t.name}),t.description&&e.jsx("span",{className:"text-text-sm text-theme-text-secondary",children:me(t.description,70)})]})]})}function We({resourceTypes:t}){return e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:"Resource Types"}),e.jsx(ve,{iconSize:16,size:"xs",resourceTypes:t})]})}function Ye({authMethods:t}){return e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:"Auth Methods"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(s=>e.jsx(he,{className:"w-fit",color:"blue",emphasis:"subtle",size:"xs",rounded:!1,children:s.name},s.auth_method))})]})}function $e(){return e.jsx("div",{className:"w-full space-y-2",children:[...Array(4)].map((t,s)=>e.jsx(N,{className:"h-[110px] w-full"},s))})}function Ke(){const{goToNextStep:t}=V(),{setConnectorType:s,connectorType:r}=v(),n=G({resolver:U(He),defaultValues:{connectorType:r}});function a({connectorType:i}){s(i),t()}return e.jsx(A,{children:e.jsx(J,{...n,children:e.jsxs("form",{onSubmit:n.handleSubmit(a),children:[e.jsx(R,{children:"Select Your Implementation"}),e.jsx(E,{children:e.jsxs("div",{className:"space-y-5",children:[e.jsx(Qe,{}),e.jsx(qe,{})]})}),e.jsxs(P,{children:[e.jsx(re,{}),e.jsx(ne,{disabled:!n.formState.isValid})]})]})})})}async function Ue({body:t}){const s=O(Q.serviceConnectors.list),r=await H(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const n=await r.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Failed to create service connector");throw new Z({status:r.status,statusText:r.statusText,message:n})}return r.json()}function Ge(t){return te({...t,mutationFn:async({body:s})=>Ue({body:s})})}const Je=Me(async t=>{try{return!((await xe({name:t})).total>0)}catch(s){return console.error(s),!1}},500),Xe=y.object({description:y.string().trim(),authMethod:y.string().trim().min(1,"Auth method is required"),resourceType:y.string().trim().min(1,"Resource type is required"),isValid:y.boolean().nullable(),skipValidation:y.boolean()});function ae(t){const s=d.useRef(t),r=d.useRef(!0),n=d.useMemo(()=>y.object({name:y.string().trim().min(1,"Name is required").max(32,"Name can be at most 32 characters").regex(/^[a-zA-Z0-9-]+$/,"Name can only contain letters, numbers and dashes").refine(async a=>{if(!a)return!0;if(a!==s.current){s.current=a;const i=await Je(a);return r.current=i,i}return r.current},{message:"Service connector with this name already exists"})}),[]);return Xe.merge(n)}function et({setConfigDefaultValues:t,setSchema:s}){return e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ne,{width:24,height:24,className:"shrink-0 fill-primary-400"}),e.jsx("p",{className:"text-text-lg font-semibold",children:"Select an Authentication Method"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Connect ZenML to your cloud provider for seamless integration of cloud services into your ML pipelines."})]}),e.jsx(tt,{setConfigDefaultValues:t,setSchema:s})]})}function tt({setConfigDefaultValues:t,setSchema:s}){const{control:r,resetField:n}=C(),a=ae(""),{connectorType:i}=v(),u=M(S.serviceConnectorTypeDetail(i));if(u.isError)return e.jsxs("p",{children:["Failed to fetch Connector Type ",i]});if(u.isPending)return e.jsx(N,{className:"h-7 w-full"});const f=u.data,l=f.auth_methods.filter(x=>x.auth_method!=="implicit");function c(x){const o=l.find(p=>p.auth_method===x);if(!o)return;const h=o.config_schema,m=Se(h),j=we(h);t(j),s(a.merge(m)),Object.keys(m.shape).forEach(p=>n(p))}return e.jsx(w,{control:r,name:"authMethod",render:({field:x,formState:{errors:o}})=>{var h;return e.jsxs("div",{className:"space-y-1",children:[e.jsxs(q,{onValueChange:m=>{x.onChange(m),c(m)},defaultValue:x.value,children:[e.jsx(I,{"data-error":!!o.authMethod,className:"border border-theme-border-moderate data-[error=true]:border-error-500",children:e.jsx(W,{placeholder:"Select your Authentication Method"})}),e.jsx(Y,{className:"",children:e.jsx($,{viewportClassName:"max-h-[300px]",children:l.map(m=>e.jsx(k,{value:m.auth_method,children:e.jsxs("div",{className:"flex items-center gap-1",children:[f.logo_url&&e.jsx("img",{alt:m.name,width:24,height:24,className:"shrink-0 object-contain",src:f.logo_url}),m.name]})},m.name))})})]}),o.authMethod&&e.jsx("p",{className:"text-text-xs text-red-500",children:(h=o.authMethod.message)==null?void 0:h.toString()})]})}})}function st(){const{control:t}=C();return e.jsx(w,{name:"skipValidation",control:t,render:({field:s,fieldState:{error:r}})=>{var n;return e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"flex items-center gap-2",children:[e.jsx(pe,{checked:s.value,onCheckedChange:s.onChange}),e.jsx("span",{children:"Register without validation"})]}),r&&e.jsx("p",{className:"text-text-xs text-red-500",children:(n=r.message)==null?void 0:n.toString()})]})}})}function oe({name:t,authMethod:s,connectorType:r,user:n,workspace:a,resourceType:i,description:u,isValid:f,skipValidation:l,...c}){return Object.keys(c).forEach(o=>{(c[o]===""||c[o]===null||c[o]===void 0||Array.isArray(c[o])&&c[o].length===0||typeof c[o]=="object"&&!Array.isArray(c[o])&&Object.keys(c[o]).length===0)&&delete c[o]}),{name:t,auth_method:s,connector_type:r,resource_types:i==="all"?void 0:[i],description:u||void 0,configuration:c,user:n}}async function rt({payload:t}){const s=O(Q.serviceConnectors.verify),r=await H(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const n=await r.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Failed to verify connector");throw new Z({status:r.status,statusText:r.statusText,message:n})}return r.json()}function nt(t){return te({...t,mutationFn:async({payload:s})=>rt({payload:s})})}function at({mandatoryFields:t}){const s=d.useMemo(()=>[...t,"name","authMethod","resourceType"],[t]),[r,n]=d.useState(!0),[a,i]=d.useState(""),{setValue:u,clearErrors:f,watch:l,resetField:c}=C();d.useEffect(()=>{const o=l((h,{name:m})=>{m&&(m==="isValid"||m==="skipValidation"||h.isValid!==null&&c("isValid"))});return()=>o.unsubscribe()},[l,c]),d.useEffect(()=>{const h=_e(j=>{const T=s.every(p=>{const g=j[p];return g==null||g===""?!1:Array.isArray(g)?g.length>0:typeof g=="object"?Object.keys(g).length>0:!0});n(!T)},300),m=l(j=>{h(j)});return()=>{m.unsubscribe(),h.cancel()}},[l,s]);const x=nt({onMutate:()=>{i("")},onSuccess:o=>{if(o.error){u("isValid",!1),i(o.error);return}u("isValid",!0),f("skipValidation")},onError:()=>{u("isValid",!1)}});return{disabled:r,errorMsg:a,verifyConfig:x}}function ot({user:t,mandatoryFields:s}){const{connectorType:r}=v(),{control:n,getValues:a}=C(),{disabled:i,errorMsg:u,verifyConfig:f}=at({mandatoryFields:s});return e.jsx(w,{control:n,name:"isValid",render:({field:l})=>e.jsxs("div",{className:"space-y-5",children:[e.jsx(b,{disabled:i,size:"md",className:L("flex w-full items-center justify-center gap-3",{"border-success-500 bg-success-500 text-white":l.value===!0}),type:"button",intent:"primary",emphasis:"subtle",onClick:()=>{const c=oe({...a(),connectorType:r,user:t});f.mutate({payload:c})},children:e.jsx(it,{disabled:i,isValid:l.value,isPending:f.isPending})}),u&&e.jsx("p",{className:"max-h-[250px] overflow-auto rounded-md border border-theme-border-moderate bg-theme-surface-secondary p-1 text-left font-mono",children:u})]})})}function it({isValid:t,isPending:s,disabled:r}){return s?e.jsxs(e.Fragment,{children:[e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-5 w-5 animate-spin rounded-rounded border-2 border-neutral-300 border-b-theme-text-brand"}),"Validating Credentials..."]}):t===null?e.jsxs(e.Fragment,{children:[e.jsx(_,{width:24,height:24,"data-disabled":r,className:"fill-primary-600 data-[disabled=true]:fill-primary-100"}),"Validate Credentials"]}):t?e.jsxs(e.Fragment,{children:[e.jsx(_,{width:24,height:24,className:"fill-white"}),"Verified successfully"]}):e.jsxs(e.Fragment,{children:[e.jsx(K,{width:24,height:24,"data-disabled":r,className:"fill-primary-600 data-[disabled=true]:fill-primary-100"}),"Invalid Credentials"]})}function ct({user:t}){return e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ke,{width:24,height:24,className:"shrink-0 fill-primary-400"}),e.jsx("p",{className:"text-text-lg font-semibold",children:"Add your configuration"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Your credentials are securely stored and encrypted. ZenML uses these credentials to interact with your resources."})]}),e.jsx(lt,{user:t})]})}function lt({user:t}){const{getValues:s}=C(),{connectorType:r}=v(),n=M(S.serviceConnectorTypeDetail(r));if(n.isError)return e.jsxs("p",{children:["Failed to fetch Connector Type ",r]});if(n.isPending)return e.jsx(N,{className:"h-7 w-full"});const i=n.data.auth_methods.find(o=>o.auth_method===s("authMethod"));if(!i)return null;const u=i.config_schema,f=u.properties||{},l=u.required||[],c=u.$defs,x=Object.entries(f).sort(([o],[h])=>l.includes(o)&&!l.includes(h)?-1:!l.includes(o)&&l.includes(h)?1:0);return e.jsxs("div",{className:"space-y-5",children:[x.map(([o,h])=>e.jsx(Te,{definitions:c,isOptional:Ve(o,l),name:o,schema:h},o)),e.jsx(ot,{mandatoryFields:l,user:t}),e.jsx(st,{})]})}const dt=t=>d.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755ZM7 7C7 6.44772 7.44772 6 8 6H16C16.5523 6 17 6.44772 17 7C17 7.55229 16.5523 8 16 8H13V17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17V8H8C7.44772 8 7 7.55229 7 7Z"}));function ut(){var r,n;const{register:t,formState:{errors:s}}=C();return e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(dt,{width:24,height:24,className:"shrink-0 fill-primary-400"}),e.jsx("p",{className:"text-text-lg font-semibold",children:"Select a name and description for your Service Connector"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"You can keep the suggested name or create your own."})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"font-inter text-sm text-left font-medium leading-5",children:["Name",e.jsx("span",{className:"text-theme-text-error","aria-label":"required",children:"*"})]}),e.jsx(z,{"data-error":!!s.name,...t("name"),className:"w-full data-[error=true]:border-error-500",inputSize:"md"}),e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:"Only letters, numbers and dashes. It should be 32 characters max. You cannot use an existing name."}),s.name&&e.jsx("p",{className:"text-text-xs text-red-500",children:(r=s.name.message)==null?void 0:r.toString()})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Description"}),e.jsx(z,{...t("description"),className:"w-full",inputSize:"md"}),s.description&&e.jsx("p",{className:"text-text-xs text-red-500",children:(n=s.description.message)==null?void 0:n.toString()})]})]})}function mt(){return e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Fe,{width:24,height:24,className:"shrink-0 fill-primary-400"}),e.jsx("p",{className:"text-text-lg font-semibold",children:"Select your resource type"})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Select resource types your connector will provide access to. Choose a specific type or enable all available resources."," ",e.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/service-connectors-guide#resource-types",className:"link text-theme-text-brand",children:"Learn More"})]})]}),e.jsx(ht,{})]})}function ht(){const{control:t}=C(),{connectorType:s}=v(),r=M(S.serviceConnectorTypeDetail(s));if(r.isError)return e.jsxs("p",{children:["Failed to fetch Connector Type ",s]});if(r.isPending)return e.jsx(N,{className:"h-7 w-full"});const n=r.data;return e.jsx(w,{control:t,name:"resourceType",render:({field:a})=>e.jsxs(q,{onValueChange:a.onChange,defaultValue:a.value,children:[e.jsx(I,{className:"border border-theme-border-moderate",children:e.jsx(W,{placeholder:"Select your Resource Type"})}),e.jsx(Y,{className:"",children:e.jsxs($,{viewportClassName:"max-h-[300px]",children:[n.resource_types.map(i=>e.jsx(k,{value:i.resource_type,children:e.jsxs("div",{className:"flex items-center gap-1",children:[i.logo_url&&e.jsx("img",{alt:i.name,width:24,height:24,className:"shrink-0 object-contain",src:i.logo_url}),i.name]})},i.name)),e.jsx(k,{value:"all",children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(fe,{width:24,height:24,className:"shrink-0 fill-neutral-400 object-contain"}),"All resources types"]})})]})})]})})}function xt(){const t=je(),{connectorType:s,setCreatedConnector:r}=v(),{goToNextStep:n}=V(),a=ae(""),[i,u]=d.useState(a),{toast:f}=ye(),l=S.connectors,c=be(),x=Ge({onSuccess:p=>{c.invalidateQueries({queryKey:l}),r(p),n()},onError:p=>{f({status:"error",emphasis:"subtle",icon:e.jsx(K,{width:24,height:24,className:"shrink-0 fill-error-700"}),description:p.message,rounded:!0})}}),[o,h]=d.useState({}),m=i.refine(p=>p.isValid===!0||p.skipValidation===!0,{message:"Either verify the connector or register without validation",path:["skipValidation"]}),j=G({resolver:U(m),shouldUnregister:!0,mode:"onChange",defaultValues:{name:"",description:"",authMethod:"",isValid:null,resourceType:"all",skipValidation:!1,...o}});if(t.isPending)return e.jsx(N,{className:"h-[500px] w-full"});if(t.isError)return e.jsx("p",{children:"Error fetching user"});const T=p=>{const g=oe({...p,connectorType:s,user:t.data.id});x.mutate({body:g})};return e.jsx(A,{children:e.jsxs(J,{...j,children:[e.jsx(R,{children:"Configure your Service Connector"}),e.jsxs("form",{onSubmit:j.handleSubmit(T),children:[e.jsx(E,{children:e.jsxs("div",{className:"divide-y divide-theme-border-moderate *:py-5 first:*:pt-0 last:*:pb-0",children:[e.jsx(ut,{}),e.jsx(mt,{}),e.jsx(et,{setConfigDefaultValues:h,setSchema:u}),e.jsx(ct,{user:t.data.id})]})}),e.jsxs(P,{children:[e.jsx(re,{}),e.jsx(Oe,{}),e.jsx(ne,{isPending:j.formState.isSubmitting||x.isPending,disabled:j.formState.isSubmitting||x.isPending})]})]})]})})}function pt({connectorName:t}){return e.jsxs("div",{className:"flex w-full items-center gap-3 rounded-md border border-success-300 bg-success-50 px-4 py-3 text-text-sm text-success-900",children:[e.jsx(_,{width:24,height:24,className:"shrink-0 fill-success-900"}),e.jsxs("p",{children:["You successfully registered the service connector `",t,"` and can now create new resources"]})]})}function ft(){return d.useMemo(()=>[{id:"name",header:"Service Connector",accessorKey:"name",cell:({row:t})=>{var a;const s=t.original.id,r=t.original.name,n=(a=t.original.body)==null?void 0:a.connector_type;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[!!n&&typeof n!="string"&&e.jsx(Ae,{connectorType:n}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"block max-w-[200px] truncate text-text-md font-semibold",children:r}),e.jsx(B,{copyText:r})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{children:s.split("-")[0]}),e.jsx(B,{copyText:s})]})]})]})}},{id:"resource_types",header(){return e.jsx("p",{className:"whitespace-nowrap",children:"Resource Types"})},cell:({row:t})=>{const s=Ee(t.original);return e.jsx("div",{className:"flex items-center gap-0.5",children:s.map((r,n)=>e.jsx(Re,{resourceType:r},n))})}},{id:"resource-name",header(){return e.jsx("p",{className:"whitespace-nowrap",children:"Resource Name"})},cell:({row:t})=>e.jsx("div",{className:"max-w-[100px]",children:e.jsx(Pe,{connector:t.original})})},{id:"user",header:"Author",accessorFn:t=>{var s,r;return(r=(s=t.resources)==null?void 0:s.user)==null?void 0:r.name},cell:({row:t})=>{var r,n,a;const s=(r=t.original.resources)==null?void 0:r.user;return s?e.jsx(ge,{className:"max-w-[200px] truncate",avatarUrl:((n=s.body)==null?void 0:n.avatar_url)??void 0,username:s.name,isServiceAccount:!!((a=s.body)!=null&&a.is_service_account)}):null}},{id:"expires",header(){return e.jsx("p",{className:"whitespace-nowrap",children:"Expires in"})},accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.expires_at},cell:({row:t})=>{var r;const s=(r=t.original.body)==null?void 0:r.expires_at;return s?e.jsx(ze,{expires:s}):e.jsx("p",{children:"Never"})}}],[])}function jt({connector:t}){const s=ft();return e.jsx("section",{className:"flex flex-col gap-5",children:e.jsx("div",{className:"flex flex-col items-center gap-5",children:e.jsx("div",{className:"w-full",children:e.jsx(Ce,{columns:s,data:[t]})})})})}function yt(){const{createdConnector:t}=v();return t?e.jsxs(A,{children:[e.jsx(R,{children:"Your Service Connector"}),e.jsx(E,{children:e.jsxs("div",{className:"space-y-5",children:[e.jsx(pt,{connectorName:t.name}),e.jsx(jt,{connector:t})]})}),e.jsx(P,{children:e.jsx(gt,{connectorId:t.id})})]}):e.jsx("p",{children:"No connector created"})}function gt({connectorId:t}){return e.jsx(b,{asChild:!0,type:"submit",size:"md",intent:"primary",children:e.jsx(ee,{to:F.settings.connectors.detail.configuration(t),children:"Finish"})})}function Ct(){return e.jsx(Le,{children:e.jsx(vt,{})})}function vt(){const{currentStep:t}=V();if(t===0)return e.jsx(Ke,{});if(t===1)return e.jsx(xt,{});if(t===2)return e.jsx(yt,{})}const D=["Connector Type","Configuration"];function Yt(){return e.jsxs("div",{children:[e.jsx(De,{}),e.jsx("div",{className:"layout-container flex flex-col gap-5 px-3 py-5 xl:flex-row xl:px-0",children:e.jsxs(ie,{maxSteps:D.length,initialStep:0,children:[e.jsx("div",{className:"shrink-0",children:e.jsx(ce,{entries:D})}),e.jsx("div",{className:"w-full",children:e.jsx(Ct,{})})]})})]})}export{Yt as default};
|
1
|
+
import{r as d,j as e}from"./@radix-B1sy0Lhr.js";import{u as V,W as ie,L as ce}from"./LeftSideMenu-DGICatl7.js";import{$ as le,a$ as de,r as F,a1 as ue,z as y,B as b,c as L,d as N,b0 as me,T as he,aZ as S,x as H,F as O,G as Z,H as Q,b1 as xe,b2 as q,b3 as I,b4 as W,b5 as Y,aG as $,b6 as k,aM as pe,w as K,I as z,b7 as fe,u as je,v as ye,X as B,a2 as ge,Y as Ce}from"./index-Ci5z7q6x.js";import{W as A,H as R,B as E,F as P}from"./Wizard-0nbnAM1R.js";import{t as U}from"./zod-D48zuELD.js";import{a as C,C as w,u as G,F as J}from"./index.esm-SBF9nn_P.js";import{S as X}from"./arrow-left-BFB2mgJo.js";import{L as ee}from"./@react-router-CHjLNlgw.js";import{R as ve}from"./resource-tyes-list-C7I0VL8e.js";import{b as M,c as te,h as be}from"./@tanstack-Dwlisomv.js";import{S as Ne}from"./transform-S7omcvTm.js";import{g as Se,a as we,D as Te,b as Ve}from"./form-VRON3-kT.js";import{A as Me}from"./index.es-CZMSrR6z.js";import{S as ke}from"./Lock-u8WOoTTd.js";import{S as _}from"./check-circle-CG6XAdk-.js";import{d as _e}from"./index-g7wOyc86.js";import{S as Fe}from"./package-pR4bbXJp.js";import{C as Ae,R as Re}from"./resource-type-tooltip-2vjL6Wh9.js";import{e as Ee,R as Pe,E as ze}from"./service-connectors-BkE8Ol4i.js";import"./Tick-Bo7jwBjb.js";import"./check-C9Nye5lR.js";import"./@reactflow-gbyyU3kq.js";import"./plus-DOrkJCmy.js";import"./trash-D9LA4VFD.js";import"./info-CI2szPUG.js";function Be(){const{setBreadcrumbs:t}=le();d.useEffect(()=>{t([...de,{label:"New Connector",href:F.settings.connectors.create}])},[t])}function De(){return Be(),e.jsx(ue,{children:e.jsx("p",{className:"text-display-xs font-semibold",children:"Register a Service Connector"})})}const se=d.createContext(null);function Le({children:t}){const[s,r]=d.useState(""),[n,a]=d.useState(null);return e.jsx(se.Provider,{value:{connectorType:s,setConnectorType:r,createdConnector:n,setCreatedConnector:a},children:t})}function v(){const t=d.useContext(se);if(!t)throw new Error("useRegisterConnectorContext must be used within a RegisterConnectorProvider");return t}const He=y.object({connectorType:y.string().trim().min(1)});function re(){return e.jsx(b,{size:"md",intent:"secondary",asChild:!0,children:e.jsx(ee,{to:F.settings.connectors.overview,children:"Cancel"})})}function ne({isPending:t,...s}){return e.jsxs(b,{type:"submit",size:"md",intent:"primary",...s,children:[!!t&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),e.jsx("span",{children:"Next"}),e.jsx(X,{width:24,height:24,className:"size-5 shrink-0 rotate-180 fill-white"})]})}function Oe(t){const{goToPreviousStep:s}=V();return e.jsxs(b,{onClick:()=>s(),type:"button",size:"md",intent:"primary",emphasis:"subtle",...t,children:[e.jsx(X,{width:24,height:24,className:"size-5 shrink-0 fill-primary-600"}),"Prev"]})}const Ze=t=>d.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.24923 9.14303C6.0632 6.17816 8.7764 4 12 4C15.2236 4 17.9368 6.17816 18.7508 9.14303C21.1861 9.70961 23 11.8925 23 14.5C23 17.5376 20.5376 20 17.5 20H6.5C3.46243 20 1 17.5376 1 14.5C1 11.8925 2.8139 9.70961 5.24923 9.14303ZM12 6C9.51785 6 7.45643 7.80968 7.0665 10.1816C6.99268 10.6306 6.62505 10.9731 6.17196 11.0151C4.39329 11.1798 3 12.6778 3 14.5C3 16.433 4.567 18 6.5 18H17.5C19.433 18 21 16.433 21 14.5C21 12.6778 19.6067 11.1798 17.828 11.0151C17.375 10.9731 17.0073 10.6306 16.9335 10.1816C16.5436 7.80968 14.4822 6 12 6Z"}));function Qe(){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ze,{className:"size-5 shrink-0 stroke-primary-400"}),e.jsx("p",{className:"font-sebmibold text-text-lg",children:"Select a Service Connector Type"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select the type of service connector you want to create. This will allow you to integrate your cloud resources with ZenML for model deployment and management."})]})}function qe(){const t=M(S.serviceConnectorTypeList()),{control:s}=C();if(t.isError)return e.jsx("p",{children:"Failed to fetch Connector Type List"});if(t.isPending)return e.jsx($e,{});const r=t.data;return e.jsx("ul",{className:"space-y-2",children:r.map(n=>e.jsx("li",{children:e.jsx(w,{control:s,name:"connectorType",render:({field:{onChange:a,value:i}})=>e.jsxs("label",{className:L("flex w-full cursor-pointer items-center gap-5 rounded-md border p-5 transition-colors",{"border-primary-400 bg-primary-25 shadow-sm":i===n.connector_type,"border-theme-border-moderate hover:border-theme-border-bold hover:shadow-sm":i!==n.connector_type}),children:[e.jsx("input",{type:"radio",name:"connectorType",onChange:()=>a(n.connector_type),checked:i===n.connector_type,value:n.name,className:"h-3 w-3 border !border-theme-border-bold text-theme-surface-primary focus:ring-2 focus:ring-theme-surface-strong"}),e.jsxs("div",{className:"grid grid-cols-1 items-center gap-5 xl:grid-cols-3",children:[e.jsx(Ie,{connectorType:n}),e.jsx(We,{resourceTypes:n.resource_types}),e.jsx(Ye,{authMethods:n.auth_methods})]})]})})},n.name))})}function Ie({connectorType:t}){return e.jsxs("div",{className:"flex items-center gap-3",children:[t.logo_url&&e.jsx("img",{src:t.logo_url,width:32,height:32,className:"size-6 shrink-0",alt:t.name}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("div",{className:"text-text-lg font-semibold",children:t.name}),t.description&&e.jsx("span",{className:"text-text-sm text-theme-text-secondary",children:me(t.description,70)})]})]})}function We({resourceTypes:t}){return e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:"Resource Types"}),e.jsx(ve,{iconSize:16,size:"xs",resourceTypes:t})]})}function Ye({authMethods:t}){return e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:"Auth Methods"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(s=>e.jsx(he,{className:"w-fit",color:"blue",emphasis:"subtle",size:"xs",rounded:!1,children:s.name},s.auth_method))})]})}function $e(){return e.jsx("div",{className:"w-full space-y-2",children:[...Array(4)].map((t,s)=>e.jsx(N,{className:"h-[110px] w-full"},s))})}function Ke(){const{goToNextStep:t}=V(),{setConnectorType:s,connectorType:r}=v(),n=G({resolver:U(He),defaultValues:{connectorType:r}});function a({connectorType:i}){s(i),t()}return e.jsx(A,{children:e.jsx(J,{...n,children:e.jsxs("form",{onSubmit:n.handleSubmit(a),children:[e.jsx(R,{children:"Select Your Implementation"}),e.jsx(E,{children:e.jsxs("div",{className:"space-y-5",children:[e.jsx(Qe,{}),e.jsx(qe,{})]})}),e.jsxs(P,{children:[e.jsx(re,{}),e.jsx(ne,{disabled:!n.formState.isValid})]})]})})})}async function Ue({body:t}){const s=O(Q.serviceConnectors.list),r=await H(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const n=await r.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Failed to create service connector");throw new Z({status:r.status,statusText:r.statusText,message:n})}return r.json()}function Ge(t){return te({...t,mutationFn:async({body:s})=>Ue({body:s})})}const Je=Me(async t=>{try{return!((await xe({name:t})).total>0)}catch(s){return console.error(s),!1}},500),Xe=y.object({description:y.string().trim(),authMethod:y.string().trim().min(1,"Auth method is required"),resourceType:y.string().trim().min(1,"Resource type is required"),isValid:y.boolean().nullable(),skipValidation:y.boolean()});function ae(t){const s=d.useRef(t),r=d.useRef(!0),n=d.useMemo(()=>y.object({name:y.string().trim().min(1,"Name is required").max(32,"Name can be at most 32 characters").regex(/^[a-zA-Z0-9-]+$/,"Name can only contain letters, numbers and dashes").refine(async a=>{if(!a)return!0;if(a!==s.current){s.current=a;const i=await Je(a);return r.current=i,i}return r.current},{message:"Service connector with this name already exists"})}),[]);return Xe.merge(n)}function et({setConfigDefaultValues:t,setSchema:s}){return e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ne,{width:24,height:24,className:"shrink-0 fill-primary-400"}),e.jsx("p",{className:"text-text-lg font-semibold",children:"Select an Authentication Method"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Connect ZenML to your cloud provider for seamless integration of cloud services into your ML pipelines."})]}),e.jsx(tt,{setConfigDefaultValues:t,setSchema:s})]})}function tt({setConfigDefaultValues:t,setSchema:s}){const{control:r,resetField:n}=C(),a=ae(""),{connectorType:i}=v(),u=M(S.serviceConnectorTypeDetail(i));if(u.isError)return e.jsxs("p",{children:["Failed to fetch Connector Type ",i]});if(u.isPending)return e.jsx(N,{className:"h-7 w-full"});const f=u.data,l=f.auth_methods.filter(x=>x.auth_method!=="implicit");function c(x){const o=l.find(p=>p.auth_method===x);if(!o)return;const h=o.config_schema,m=Se(h),j=we(h);t(j),s(a.merge(m)),Object.keys(m.shape).forEach(p=>n(p))}return e.jsx(w,{control:r,name:"authMethod",render:({field:x,formState:{errors:o}})=>{var h;return e.jsxs("div",{className:"space-y-1",children:[e.jsxs(q,{onValueChange:m=>{x.onChange(m),c(m)},defaultValue:x.value,children:[e.jsx(I,{"data-error":!!o.authMethod,className:"border border-theme-border-moderate data-[error=true]:border-error-500",children:e.jsx(W,{placeholder:"Select your Authentication Method"})}),e.jsx(Y,{className:"",children:e.jsx($,{viewportClassName:"max-h-[300px]",children:l.map(m=>e.jsx(k,{value:m.auth_method,children:e.jsxs("div",{className:"flex items-center gap-1",children:[f.logo_url&&e.jsx("img",{alt:m.name,width:24,height:24,className:"shrink-0 object-contain",src:f.logo_url}),m.name]})},m.name))})})]}),o.authMethod&&e.jsx("p",{className:"text-text-xs text-red-500",children:(h=o.authMethod.message)==null?void 0:h.toString()})]})}})}function st(){const{control:t}=C();return e.jsx(w,{name:"skipValidation",control:t,render:({field:s,fieldState:{error:r}})=>{var n;return e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"flex items-center gap-2",children:[e.jsx(pe,{checked:s.value,onCheckedChange:s.onChange}),e.jsx("span",{children:"Register without validation"})]}),r&&e.jsx("p",{className:"text-text-xs text-red-500",children:(n=r.message)==null?void 0:n.toString()})]})}})}function oe({name:t,authMethod:s,connectorType:r,user:n,workspace:a,resourceType:i,description:u,isValid:f,skipValidation:l,...c}){return Object.keys(c).forEach(o=>{(c[o]===""||c[o]===null||c[o]===void 0||Array.isArray(c[o])&&c[o].length===0||typeof c[o]=="object"&&!Array.isArray(c[o])&&Object.keys(c[o]).length===0)&&delete c[o]}),{name:t,auth_method:s,connector_type:r,resource_types:i==="all"?void 0:[i],description:u||void 0,configuration:c,user:n}}async function rt({payload:t}){const s=O(Q.serviceConnectors.verify),r=await H(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const n=await r.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Failed to verify connector");throw new Z({status:r.status,statusText:r.statusText,message:n})}return r.json()}function nt(t){return te({...t,mutationFn:async({payload:s})=>rt({payload:s})})}function at({mandatoryFields:t}){const s=d.useMemo(()=>[...t,"name","authMethod","resourceType"],[t]),[r,n]=d.useState(!0),[a,i]=d.useState(""),{setValue:u,clearErrors:f,watch:l,resetField:c}=C();d.useEffect(()=>{const o=l((h,{name:m})=>{m&&(m==="isValid"||m==="skipValidation"||h.isValid!==null&&c("isValid"))});return()=>o.unsubscribe()},[l,c]),d.useEffect(()=>{const h=_e(j=>{const T=s.every(p=>{const g=j[p];return g==null||g===""?!1:Array.isArray(g)?g.length>0:typeof g=="object"?Object.keys(g).length>0:!0});n(!T)},300),m=l(j=>{h(j)});return()=>{m.unsubscribe(),h.cancel()}},[l,s]);const x=nt({onMutate:()=>{i("")},onSuccess:o=>{if(o.error){u("isValid",!1),i(o.error);return}u("isValid",!0),f("skipValidation")},onError:()=>{u("isValid",!1)}});return{disabled:r,errorMsg:a,verifyConfig:x}}function ot({user:t,mandatoryFields:s}){const{connectorType:r}=v(),{control:n,getValues:a}=C(),{disabled:i,errorMsg:u,verifyConfig:f}=at({mandatoryFields:s});return e.jsx(w,{control:n,name:"isValid",render:({field:l})=>e.jsxs("div",{className:"space-y-5",children:[e.jsx(b,{disabled:i,size:"md",className:L("flex w-full items-center justify-center gap-3",{"border-success-500 bg-success-500 text-white":l.value===!0}),type:"button",intent:"primary",emphasis:"subtle",onClick:()=>{const c=oe({...a(),connectorType:r,user:t});f.mutate({payload:c})},children:e.jsx(it,{disabled:i,isValid:l.value,isPending:f.isPending})}),u&&e.jsx("p",{className:"max-h-[250px] overflow-auto rounded-md border border-theme-border-moderate bg-theme-surface-secondary p-1 text-left font-mono",children:u})]})})}function it({isValid:t,isPending:s,disabled:r}){return s?e.jsxs(e.Fragment,{children:[e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-5 w-5 animate-spin rounded-rounded border-2 border-neutral-300 border-b-theme-text-brand"}),"Validating Credentials..."]}):t===null?e.jsxs(e.Fragment,{children:[e.jsx(_,{width:24,height:24,"data-disabled":r,className:"fill-primary-600 data-[disabled=true]:fill-primary-100"}),"Validate Credentials"]}):t?e.jsxs(e.Fragment,{children:[e.jsx(_,{width:24,height:24,className:"fill-white"}),"Verified successfully"]}):e.jsxs(e.Fragment,{children:[e.jsx(K,{width:24,height:24,"data-disabled":r,className:"fill-primary-600 data-[disabled=true]:fill-primary-100"}),"Invalid Credentials"]})}function ct({user:t}){return e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ke,{width:24,height:24,className:"shrink-0 fill-primary-400"}),e.jsx("p",{className:"text-text-lg font-semibold",children:"Add your configuration"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Your credentials are securely stored and encrypted. ZenML uses these credentials to interact with your resources."})]}),e.jsx(lt,{user:t})]})}function lt({user:t}){const{getValues:s}=C(),{connectorType:r}=v(),n=M(S.serviceConnectorTypeDetail(r));if(n.isError)return e.jsxs("p",{children:["Failed to fetch Connector Type ",r]});if(n.isPending)return e.jsx(N,{className:"h-7 w-full"});const i=n.data.auth_methods.find(o=>o.auth_method===s("authMethod"));if(!i)return null;const u=i.config_schema,f=u.properties||{},l=u.required||[],c=u.$defs,x=Object.entries(f).sort(([o],[h])=>l.includes(o)&&!l.includes(h)?-1:!l.includes(o)&&l.includes(h)?1:0);return e.jsxs("div",{className:"space-y-5",children:[x.map(([o,h])=>e.jsx(Te,{definitions:c,isOptional:Ve(o,l),name:o,schema:h},o)),e.jsx(ot,{mandatoryFields:l,user:t}),e.jsx(st,{})]})}const dt=t=>d.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755ZM7 7C7 6.44772 7.44772 6 8 6H16C16.5523 6 17 6.44772 17 7C17 7.55229 16.5523 8 16 8H13V17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17V8H8C7.44772 8 7 7.55229 7 7Z"}));function ut(){var r,n;const{register:t,formState:{errors:s}}=C();return e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(dt,{width:24,height:24,className:"shrink-0 fill-primary-400"}),e.jsx("p",{className:"text-text-lg font-semibold",children:"Select a name and description for your Service Connector"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"You can keep the suggested name or create your own."})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"font-inter text-sm text-left font-medium leading-5",children:["Name",e.jsx("span",{className:"text-theme-text-error","aria-label":"required",children:"*"})]}),e.jsx(z,{"data-error":!!s.name,...t("name"),className:"w-full data-[error=true]:border-error-500",inputSize:"md"}),e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:"Only letters, numbers and dashes. It should be 32 characters max. You cannot use an existing name."}),s.name&&e.jsx("p",{className:"text-text-xs text-red-500",children:(r=s.name.message)==null?void 0:r.toString()})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Description"}),e.jsx(z,{...t("description"),className:"w-full",inputSize:"md"}),s.description&&e.jsx("p",{className:"text-text-xs text-red-500",children:(n=s.description.message)==null?void 0:n.toString()})]})]})}function mt(){return e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Fe,{width:24,height:24,className:"shrink-0 fill-primary-400"}),e.jsx("p",{className:"text-text-lg font-semibold",children:"Select your resource type"})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Select resource types your connector will provide access to. Choose a specific type or enable all available resources."," ",e.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/service-connectors-guide#resource-types",className:"link text-theme-text-brand",children:"Learn More"})]})]}),e.jsx(ht,{})]})}function ht(){const{control:t}=C(),{connectorType:s}=v(),r=M(S.serviceConnectorTypeDetail(s));if(r.isError)return e.jsxs("p",{children:["Failed to fetch Connector Type ",s]});if(r.isPending)return e.jsx(N,{className:"h-7 w-full"});const n=r.data;return e.jsx(w,{control:t,name:"resourceType",render:({field:a})=>e.jsxs(q,{onValueChange:a.onChange,defaultValue:a.value,children:[e.jsx(I,{className:"border border-theme-border-moderate",children:e.jsx(W,{placeholder:"Select your Resource Type"})}),e.jsx(Y,{className:"",children:e.jsxs($,{viewportClassName:"max-h-[300px]",children:[n.resource_types.map(i=>e.jsx(k,{value:i.resource_type,children:e.jsxs("div",{className:"flex items-center gap-1",children:[i.logo_url&&e.jsx("img",{alt:i.name,width:24,height:24,className:"shrink-0 object-contain",src:i.logo_url}),i.name]})},i.name)),e.jsx(k,{value:"all",children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(fe,{width:24,height:24,className:"shrink-0 fill-neutral-400 object-contain"}),"All resources types"]})})]})})]})})}function xt(){const t=je(),{connectorType:s,setCreatedConnector:r}=v(),{goToNextStep:n}=V(),a=ae(""),[i,u]=d.useState(a),{toast:f}=ye(),l=S.connectors,c=be(),x=Ge({onSuccess:p=>{c.invalidateQueries({queryKey:l}),r(p),n()},onError:p=>{f({status:"error",emphasis:"subtle",icon:e.jsx(K,{width:24,height:24,className:"shrink-0 fill-error-700"}),description:p.message,rounded:!0})}}),[o,h]=d.useState({}),m=i.refine(p=>p.isValid===!0||p.skipValidation===!0,{message:"Either verify the connector or register without validation",path:["skipValidation"]}),j=G({resolver:U(m),shouldUnregister:!0,mode:"onChange",defaultValues:{name:"",description:"",authMethod:"",isValid:null,resourceType:"all",skipValidation:!1,...o}});if(t.isPending)return e.jsx(N,{className:"h-[500px] w-full"});if(t.isError)return e.jsx("p",{children:"Error fetching user"});const T=p=>{const g=oe({...p,connectorType:s,user:t.data.id});x.mutate({body:g})};return e.jsx(A,{children:e.jsxs(J,{...j,children:[e.jsx(R,{children:"Configure your Service Connector"}),e.jsxs("form",{onSubmit:j.handleSubmit(T),children:[e.jsx(E,{children:e.jsxs("div",{className:"divide-y divide-theme-border-moderate *:py-5 first:*:pt-0 last:*:pb-0",children:[e.jsx(ut,{}),e.jsx(mt,{}),e.jsx(et,{setConfigDefaultValues:h,setSchema:u}),e.jsx(ct,{user:t.data.id})]})}),e.jsxs(P,{children:[e.jsx(re,{}),e.jsx(Oe,{}),e.jsx(ne,{isPending:j.formState.isSubmitting||x.isPending,disabled:j.formState.isSubmitting||x.isPending})]})]})]})})}function pt({connectorName:t}){return e.jsxs("div",{className:"flex w-full items-center gap-3 rounded-md border border-success-300 bg-success-50 px-4 py-3 text-text-sm text-success-900",children:[e.jsx(_,{width:24,height:24,className:"shrink-0 fill-success-900"}),e.jsxs("p",{children:["You successfully registered the service connector `",t,"` and can now create new resources"]})]})}function ft(){return d.useMemo(()=>[{id:"name",header:"Service Connector",accessorKey:"name",cell:({row:t})=>{var a;const s=t.original.id,r=t.original.name,n=(a=t.original.body)==null?void 0:a.connector_type;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[!!n&&typeof n!="string"&&e.jsx(Ae,{connectorType:n}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"block max-w-[200px] truncate text-text-md font-semibold",children:r}),e.jsx(B,{copyText:r})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{children:s.split("-")[0]}),e.jsx(B,{copyText:s})]})]})]})}},{id:"resource_types",header(){return e.jsx("p",{className:"whitespace-nowrap",children:"Resource Types"})},cell:({row:t})=>{const s=Ee(t.original);return e.jsx("div",{className:"flex items-center gap-0.5",children:s.map((r,n)=>e.jsx(Re,{resourceType:r},n))})}},{id:"resource-name",header(){return e.jsx("p",{className:"whitespace-nowrap",children:"Resource Name"})},cell:({row:t})=>e.jsx("div",{className:"max-w-[100px]",children:e.jsx(Pe,{connector:t.original})})},{id:"user",header:"Author",accessorFn:t=>{var s,r;return(r=(s=t.resources)==null?void 0:s.user)==null?void 0:r.name},cell:({row:t})=>{var r,n,a;const s=(r=t.original.resources)==null?void 0:r.user;return s?e.jsx(ge,{className:"max-w-[200px] truncate",avatarUrl:((n=s.body)==null?void 0:n.avatar_url)??void 0,username:s.name,isServiceAccount:!!((a=s.body)!=null&&a.is_service_account)}):null}},{id:"expires",header(){return e.jsx("p",{className:"whitespace-nowrap",children:"Expires in"})},accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.expires_at},cell:({row:t})=>{var r;const s=(r=t.original.body)==null?void 0:r.expires_at;return s?e.jsx(ze,{expires:s}):e.jsx("p",{children:"Never"})}}],[])}function jt({connector:t}){const s=ft();return e.jsx("section",{className:"flex flex-col gap-5",children:e.jsx("div",{className:"flex flex-col items-center gap-5",children:e.jsx("div",{className:"w-full",children:e.jsx(Ce,{columns:s,data:[t]})})})})}function yt(){const{createdConnector:t}=v();return t?e.jsxs(A,{children:[e.jsx(R,{children:"Your Service Connector"}),e.jsx(E,{children:e.jsxs("div",{className:"space-y-5",children:[e.jsx(pt,{connectorName:t.name}),e.jsx(jt,{connector:t})]})}),e.jsx(P,{children:e.jsx(gt,{connectorId:t.id})})]}):e.jsx("p",{children:"No connector created"})}function gt({connectorId:t}){return e.jsx(b,{asChild:!0,type:"submit",size:"md",intent:"primary",children:e.jsx(ee,{to:F.settings.connectors.detail.configuration(t),children:"Finish"})})}function Ct(){return e.jsx(Le,{children:e.jsx(vt,{})})}function vt(){const{currentStep:t}=V();if(t===0)return e.jsx(Ke,{});if(t===1)return e.jsx(xt,{});if(t===2)return e.jsx(yt,{})}const D=["Connector Type","Configuration"];function Yt(){return e.jsxs("div",{children:[e.jsx(De,{}),e.jsx("div",{className:"layout-container flex flex-col gap-5 px-3 py-5 xl:flex-row xl:px-0",children:e.jsxs(ie,{maxSteps:D.length,initialStep:0,children:[e.jsx("div",{className:"shrink-0",children:e.jsx(ce,{entries:D})}),e.jsx("div",{className:"w-full",children:e.jsx(Ct,{})})]})})]})}export{Yt as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as m,j as e}from"./@radix-B1sy0Lhr.js";import{x as S,F as D,G as C,H as w,aH as _,aI as L,B as h,aJ as $,aK as J,D as V,v as K,I as k,Q as g,aN as G,aO as U,aP as A,J as P,K as Y,L as Z,M as W,N as X,O as ee,_ as te,az as se,aA as ne,aB as ae,aD as re,aE as ce,aM as ie,be as oe,r as T,k as I,Y as le,d as F}from"./index-CO6UN3UX.js";import{P as ue}from"./Pagination-C1sE5Nzn.js";import{S as de}from"./SearchField-Byv1PtST.js";import{s as f,c as me,A as xe,u as he,a as R,b as pe}from"./service-FjqYTmBw.js";import{c as b,h as N,b as fe}from"./@tanstack-Dwlisomv.js";import{t as je}from"./zod-D48zuELD.js";import{u as ye,F as ve,a as ge,C as v}from"./index.esm-SBF9nn_P.js";import{S as q}from"./trash-D9LA4VFD.js";import{D as E,a as z}from"./DeleteAlertDialog-CzhTVQaC.js";import{c as Ae,u as Se}from"./bulk-delete-wdObjfps.js";import{L as O}from"./@react-router-CHjLNlgw.js";import{A as De}from"./AlertDialogDropdownItem-BpLj419i.js";import"./@reactflow-gbyyU3kq.js";import"./chevron-right-double-CbMG1dOM.js";import"./index-g7wOyc86.js";import"./CodeSnippet-B7Wd4R8u.js";import"./Infobox-DnduZjNU.js";import"./info-CI2szPUG.js";import"./Tick-BQ7_xDBl.js";import"./check-C9Nye5lR.js";async function Ce({body:t}){const s=D(w.serviceAccounts.all),n=await S(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const r=await n.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Failed to create service account");throw new C({status:n.status,statusText:n.statusText,message:r})}return n.json()}function we(t){return b({...t,mutationFn:async s=>Ce({body:s})})}function H({isFallback:t}){const[s,n]=m.useState(!1),[r,a]=m.useState(""),i=N(),u=ye({resolver:je(me),defaultValues:{name:"",description:"",createDefault:!1}}),l=!!r&&u.watch("createDefault");function d(){return l?e.jsx(xe,{value:r}):e.jsx(be,{isFallback:t,setApiKeyValue:a,setOpen:n})}return e.jsx(ve,{...u,children:e.jsxs(_,{open:s,onOpenChange:o=>{t&&!o&&i.invalidateQueries({queryKey:f.serviceAccountsKey()}),n(o),a(""),u.reset()},children:[e.jsx(L,{asChild:!0,children:e.jsx(h,{className:"shrink-0",size:"sm",intent:"primary",children:"Add service account"})}),e.jsxs($,{"data-success":l,className:"mx-auto overflow-x-auto transition-none data-[success=true]:max-w-[800px]",children:[e.jsx(J,{children:e.jsx(V,{children:"Add service account"})}),d()]})]})})}function be({setApiKeyValue:t,setOpen:s,isFallback:n}){const{watch:r,handleSubmit:a,control:i,formState:{isValid:u}}=ge(),{toast:l}=K(),d=N(),{mutate:o}=we({onError(c){A(c)&&l({status:"error",emphasis:"subtle",description:c.message,rounded:!0})},async onSuccess(c){if(l({description:"The service account has been added successfully.",status:"success",emphasis:"subtle",rounded:!0}),r("createDefault")){x(c.id);return}d.invalidateQueries({queryKey:f.serviceAccountsKey()}),s(!1)}}),{mutate:p}=he({onSuccess(c){var y;n||d.invalidateQueries({queryKey:f.serviceAccountsKey()}),t(((y=c.body)==null?void 0:y.key)||"")},onError(c){A(c)&&l({status:"error",emphasis:"subtle",description:c.message,rounded:!0})}}),x=c=>{p({serviceAccountId:c,body:{name:"default",description:"Default api key"}})},Q=c=>{o({name:c.name,description:c.description,active:!0})};return e.jsxs(e.Fragment,{children:[e.jsxs("form",{id:"create-secret-form",className:"space-y-5 p-7",onSubmit:a(Q),children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Name:"}),e.jsx(v,{name:"name",control:i,render:({field:c})=>e.jsx(k,{...c,className:"w-full",required:!0,placeholder:"Add name"})})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Description:"}),e.jsx(v,{name:"description",control:i,render:({field:c})=>e.jsx(k,{...c,className:"w-full",placeholder:"Add description"})})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v,{control:i,name:"createDefault",render:({field:{onChange:c,value:y}})=>e.jsx(g,{checked:y,id:"default-key",onCheckedChange:B=>c(!!B)})}),e.jsx("label",{htmlFor:"default-key",children:"Create a default API Key"})]}),e.jsx("p",{className:"pl-[30px] text-text-xs text-theme-text-secondary",children:"This will include a default API Key for your service account."})]})]}),e.jsxs(G,{className:"gap-[10px]",children:[e.jsx(U,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"primary",size:"sm",disabled:!u,type:"submit",form:"create-secret-form",children:"Add service account"})]})]})}async function Ne(t){const s=D(w.serviceAccounts.detail(t)),n=await S(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!n.ok){const r=await n.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>`Failed to delete service account ${t}`);throw new C({status:n.status,statusText:n.statusText,message:r})}return n.json()}function ke(t){return b({...t,mutationFn:async s=>{await Ne(s)}})}const{ContextProvider:Te,useContext:j}=Ae();function M(){const{setRowSelection:t}=j(),{mutateAsync:s}=ke();async function n(r){await s(r)}return Se({deleteFn:n,queryKeyToInvalidate:f.serviceAccountsKey(),setRowSelection:t})}function Fe(){const[t,s]=m.useState(!1),{selectedRowCount:n,selectedRowIDs:r}=j(),{bulkDelete:a}=M();async function i(){await a(r),s(!1)}return e.jsxs(P,{open:t,onOpenChange:s,children:[e.jsx(Y,{asChild:!0,children:e.jsxs(h,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(q,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(E,{title:`Delete Service Account${n>=2?"s":""}`,handleDelete:i,children:e.jsxs(z,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Oe(){const{selectedRowCount:t}=j();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${t} Service Account${t>1?"s":""} selected`}),e.jsx(Fe,{})]})}function Ke({serviceAccountId:t}){const[s,n]=m.useState(!1),[r,a]=m.useState(!1),{bulkDelete:i}=M(),u=m.useRef(null),l=m.useRef(null);function d(){l.current=u.current}async function o(){await i([t]),p(!1)}function p(x){if(x===!1){n(!1),setTimeout(()=>{a(x)},200);return}a(x)}return e.jsxs(Z,{onOpenChange:n,open:s,children:[e.jsx(W,{ref:u,children:e.jsx(X,{className:"h-5 w-5 fill-theme-text-secondary"})}),e.jsx(ee,{hidden:r,onCloseAutoFocus:x=>{l.current&&(l.current.focus(),l.current=null,x.preventDefault())},align:"end",sideOffset:7,children:e.jsx(De,{onSelect:d,open:r,onOpenChange:p,triggerChildren:"Delete",icon:e.jsx(q,{fill:"red"}),children:e.jsx(E,{title:"Delete Service Account",handleDelete:o,children:e.jsxs(z,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}async function Pe({body:t,serviceAccountId:s}){const n=D(w.serviceAccounts.detail(s)),r=await S(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.status===404&&te(),!r.ok){const a=await r.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>`Failed to update service account ${s}`);throw new C({status:r.status,statusText:r.statusText,message:a})}return r.json()}function Ie(t){return b({...t,mutationFn:async({serviceAccountId:s,body:n})=>Pe({serviceAccountId:s,body:n})})}function Re({isActive:t,serviceAccountId:s}){const{toast:n}=K(),r=N(),[a,i]=m.useState(!1),{mutate:u}=Ie({onError(o){A(o)&&n({status:"error",emphasis:"subtle",description:o.message,rounded:!0})},onSuccess(){r.invalidateQueries({queryKey:f.serviceAccountsKey()})}});function l(o){o?d(o):i(!0)}async function d(o){u({serviceAccountId:s,body:{active:o}})}return e.jsxs(e.Fragment,{children:[e.jsx(P,{open:a,onOpenChange:i,children:e.jsxs(se,{children:[e.jsx(ne,{children:e.jsx(ae,{children:"Deactivate Service Account"})}),e.jsxs("div",{className:"p-5 text-text-md text-theme-text-secondary",children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"You won't be able to use any API keys of this service account to authenticate with the server anymore."})]}),e.jsxs(re,{className:"gap-[10px]",children:[e.jsx(ce,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{onClick:()=>d(!1).then(o=>i(!1)),intent:"primary",type:"button",children:"Deactivate"})]})]})}),e.jsx(ie,{checked:t,onCheckedChange:l})]})}function qe(){return[{id:"select",meta:{width:"1%"},header:({table:t})=>e.jsx(g,{id:"check-all",checked:t.getIsAllRowsSelected(),onCheckedChange:s=>t.toggleAllRowsSelected(s==="indeterminate"?!0:s)}),cell:({row:t})=>e.jsx(g,{id:`check-${t.id}`,checked:t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})},{id:"service-account",header:"Service Account",accessorFn:t=>t.name,cell:({row:t})=>{var s,n;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(oe,{className:"rounded-sm",size:"sm",serviceAccountName:t.original.name,serviceAccountAvatar:((s=t.original.body)==null?void 0:s.avatar_url)??void 0}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsx("div",{className:"flex flex-row items-center space-x-1",children:e.jsx("div",{className:"flex items-center space-x-1",children:e.jsx(O,{className:"text-text-md font-semibold text-theme-text-primary",to:T.settings.service_accounts.detail(t.original.id),children:t.original.name})})}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(O,{className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",to:T.settings.service_accounts.detail(t.original.id),children:(n=t.original.metadata)==null?void 0:n.description})})]})]})}},{id:"active",header:"Active",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.active},cell:({row:t})=>{var s;return e.jsx(Re,{isActive:!!((s=t.original.body)!=null&&s.active),serviceAccountId:t.original.id})}},{id:"actions",meta:{width:"5%"},header:"",cell:({row:t})=>e.jsx("div",{className:"flex items-center justify-end",children:e.jsx(Ke,{serviceAccountId:t.original.id})})}]}function Ee(){return e.jsxs(I,{className:"flex flex-col items-center justify-center space-y-4 p-9",children:[e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold text-theme-text-primary",children:"There are no service accounts yet."}),e.jsx("p",{className:"text-theme-text-secondary",children:"Create your first one now to automate your processes securely with ZenML."})]}),e.jsx(H,{isFallback:!0})]})}function ze(){const t=R(),{rowSelection:s,setRowSelection:n}=j(),r=m.useMemo(()=>qe(),[]),{data:a}=fe({...pe.serviceAccountList({...t,sort_by:"desc:created",hydrate:!0})});return a&&a.items.length<1&&!t.name?e.jsx(Ee,{}):e.jsxs(e.Fragment,{children:[e.jsx(He,{}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:a?e.jsx(le,{getRowId:i=>i.id,rowSelection:s,onRowSelectionChange:n,columns:r,data:a.items}):e.jsx(F,{className:"h-[500px] w-full"})}),a?a.total_pages>1&&e.jsx(ue,{searchParams:t,paginate:a}):e.jsx(F,{className:"h-[36px] w-[300px]"})]})]})}function He(){const t=R(),{selectedRowCount:s}=j();return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[s?e.jsx(Oe,{}):e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(de,{searchParams:t})}),e.jsx(H,{isFallback:!1})]})}function ot(){return e.jsxs(I,{className:"space-y-4 p-5",children:[e.jsx(Me,{}),e.jsx(Te,{children:e.jsx(ze,{})})]})}function Me(){return e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Service Accounts"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Configure automated access for background tasks and integrations."}),e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/project-setup-and-management/connecting-to-zenml/connect-with-a-service-account",className:"link text-text-sm text-primary-400",children:"Learn More"})]})]})}export{ot as default};
|
1
|
+
import{r as m,j as e}from"./@radix-B1sy0Lhr.js";import{x as S,F as D,G as C,H as w,aH as _,aI as L,B as h,aJ as $,aK as J,D as V,v as K,I as k,Q as g,aN as G,aO as U,aP as A,J as P,K as Y,L as Z,M as W,N as X,O as ee,_ as te,az as se,aA as ne,aB as ae,aD as re,aE as ce,aM as ie,be as oe,r as T,k as I,Y as le,d as F}from"./index-Ci5z7q6x.js";import{P as ue}from"./Pagination-CVYIgR9l.js";import{S as de}from"./SearchField-BbwrusMV.js";import{s as f,c as me,A as xe,u as he,a as R,b as pe}from"./service-BPdLzxxT.js";import{c as b,h as N,b as fe}from"./@tanstack-Dwlisomv.js";import{t as je}from"./zod-D48zuELD.js";import{u as ye,F as ve,a as ge,C as v}from"./index.esm-SBF9nn_P.js";import{S as q}from"./trash-D9LA4VFD.js";import{D as E,a as z}from"./DeleteAlertDialog-C5z9RupH.js";import{c as Ae,u as Se}from"./bulk-delete-Bgf_MsSj.js";import{L as O}from"./@react-router-CHjLNlgw.js";import{A as De}from"./AlertDialogDropdownItem-DuTp8JFP.js";import"./@reactflow-gbyyU3kq.js";import"./chevron-right-double-CbMG1dOM.js";import"./index-g7wOyc86.js";import"./CodeSnippet-D7OZMz7I.js";import"./Infobox-CXOIY92f.js";import"./info-CI2szPUG.js";import"./Tick-Bo7jwBjb.js";import"./check-C9Nye5lR.js";async function Ce({body:t}){const s=D(w.serviceAccounts.all),n=await S(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const r=await n.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Failed to create service account");throw new C({status:n.status,statusText:n.statusText,message:r})}return n.json()}function we(t){return b({...t,mutationFn:async s=>Ce({body:s})})}function H({isFallback:t}){const[s,n]=m.useState(!1),[r,a]=m.useState(""),i=N(),u=ye({resolver:je(me),defaultValues:{name:"",description:"",createDefault:!1}}),l=!!r&&u.watch("createDefault");function d(){return l?e.jsx(xe,{value:r}):e.jsx(be,{isFallback:t,setApiKeyValue:a,setOpen:n})}return e.jsx(ve,{...u,children:e.jsxs(_,{open:s,onOpenChange:o=>{t&&!o&&i.invalidateQueries({queryKey:f.serviceAccountsKey()}),n(o),a(""),u.reset()},children:[e.jsx(L,{asChild:!0,children:e.jsx(h,{className:"shrink-0",size:"sm",intent:"primary",children:"Add service account"})}),e.jsxs($,{"data-success":l,className:"mx-auto overflow-x-auto transition-none data-[success=true]:max-w-[800px]",children:[e.jsx(J,{children:e.jsx(V,{children:"Add service account"})}),d()]})]})})}function be({setApiKeyValue:t,setOpen:s,isFallback:n}){const{watch:r,handleSubmit:a,control:i,formState:{isValid:u}}=ge(),{toast:l}=K(),d=N(),{mutate:o}=we({onError(c){A(c)&&l({status:"error",emphasis:"subtle",description:c.message,rounded:!0})},async onSuccess(c){if(l({description:"The service account has been added successfully.",status:"success",emphasis:"subtle",rounded:!0}),r("createDefault")){x(c.id);return}d.invalidateQueries({queryKey:f.serviceAccountsKey()}),s(!1)}}),{mutate:p}=he({onSuccess(c){var y;n||d.invalidateQueries({queryKey:f.serviceAccountsKey()}),t(((y=c.body)==null?void 0:y.key)||"")},onError(c){A(c)&&l({status:"error",emphasis:"subtle",description:c.message,rounded:!0})}}),x=c=>{p({serviceAccountId:c,body:{name:"default",description:"Default api key"}})},Q=c=>{o({name:c.name,description:c.description,active:!0})};return e.jsxs(e.Fragment,{children:[e.jsxs("form",{id:"create-secret-form",className:"space-y-5 p-7",onSubmit:a(Q),children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Name:"}),e.jsx(v,{name:"name",control:i,render:({field:c})=>e.jsx(k,{...c,className:"w-full",required:!0,placeholder:"Add name"})})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Description:"}),e.jsx(v,{name:"description",control:i,render:({field:c})=>e.jsx(k,{...c,className:"w-full",placeholder:"Add description"})})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v,{control:i,name:"createDefault",render:({field:{onChange:c,value:y}})=>e.jsx(g,{checked:y,id:"default-key",onCheckedChange:B=>c(!!B)})}),e.jsx("label",{htmlFor:"default-key",children:"Create a default API Key"})]}),e.jsx("p",{className:"pl-[30px] text-text-xs text-theme-text-secondary",children:"This will include a default API Key for your service account."})]})]}),e.jsxs(G,{className:"gap-[10px]",children:[e.jsx(U,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"primary",size:"sm",disabled:!u,type:"submit",form:"create-secret-form",children:"Add service account"})]})]})}async function Ne(t){const s=D(w.serviceAccounts.detail(t)),n=await S(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!n.ok){const r=await n.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>`Failed to delete service account ${t}`);throw new C({status:n.status,statusText:n.statusText,message:r})}return n.json()}function ke(t){return b({...t,mutationFn:async s=>{await Ne(s)}})}const{ContextProvider:Te,useContext:j}=Ae();function M(){const{setRowSelection:t}=j(),{mutateAsync:s}=ke();async function n(r){await s(r)}return Se({deleteFn:n,queryKeyToInvalidate:f.serviceAccountsKey(),setRowSelection:t})}function Fe(){const[t,s]=m.useState(!1),{selectedRowCount:n,selectedRowIDs:r}=j(),{bulkDelete:a}=M();async function i(){await a(r),s(!1)}return e.jsxs(P,{open:t,onOpenChange:s,children:[e.jsx(Y,{asChild:!0,children:e.jsxs(h,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(q,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(E,{title:`Delete Service Account${n>=2?"s":""}`,handleDelete:i,children:e.jsxs(z,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Oe(){const{selectedRowCount:t}=j();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${t} Service Account${t>1?"s":""} selected`}),e.jsx(Fe,{})]})}function Ke({serviceAccountId:t}){const[s,n]=m.useState(!1),[r,a]=m.useState(!1),{bulkDelete:i}=M(),u=m.useRef(null),l=m.useRef(null);function d(){l.current=u.current}async function o(){await i([t]),p(!1)}function p(x){if(x===!1){n(!1),setTimeout(()=>{a(x)},200);return}a(x)}return e.jsxs(Z,{onOpenChange:n,open:s,children:[e.jsx(W,{ref:u,children:e.jsx(X,{className:"h-5 w-5 fill-theme-text-secondary"})}),e.jsx(ee,{hidden:r,onCloseAutoFocus:x=>{l.current&&(l.current.focus(),l.current=null,x.preventDefault())},align:"end",sideOffset:7,children:e.jsx(De,{onSelect:d,open:r,onOpenChange:p,triggerChildren:"Delete",icon:e.jsx(q,{fill:"red"}),children:e.jsx(E,{title:"Delete Service Account",handleDelete:o,children:e.jsxs(z,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}async function Pe({body:t,serviceAccountId:s}){const n=D(w.serviceAccounts.detail(s)),r=await S(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.status===404&&te(),!r.ok){const a=await r.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>`Failed to update service account ${s}`);throw new C({status:r.status,statusText:r.statusText,message:a})}return r.json()}function Ie(t){return b({...t,mutationFn:async({serviceAccountId:s,body:n})=>Pe({serviceAccountId:s,body:n})})}function Re({isActive:t,serviceAccountId:s}){const{toast:n}=K(),r=N(),[a,i]=m.useState(!1),{mutate:u}=Ie({onError(o){A(o)&&n({status:"error",emphasis:"subtle",description:o.message,rounded:!0})},onSuccess(){r.invalidateQueries({queryKey:f.serviceAccountsKey()})}});function l(o){o?d(o):i(!0)}async function d(o){u({serviceAccountId:s,body:{active:o}})}return e.jsxs(e.Fragment,{children:[e.jsx(P,{open:a,onOpenChange:i,children:e.jsxs(se,{children:[e.jsx(ne,{children:e.jsx(ae,{children:"Deactivate Service Account"})}),e.jsxs("div",{className:"p-5 text-text-md text-theme-text-secondary",children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"You won't be able to use any API keys of this service account to authenticate with the server anymore."})]}),e.jsxs(re,{className:"gap-[10px]",children:[e.jsx(ce,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{onClick:()=>d(!1).then(o=>i(!1)),intent:"primary",type:"button",children:"Deactivate"})]})]})}),e.jsx(ie,{checked:t,onCheckedChange:l})]})}function qe(){return[{id:"select",meta:{width:"1%"},header:({table:t})=>e.jsx(g,{id:"check-all",checked:t.getIsAllRowsSelected(),onCheckedChange:s=>t.toggleAllRowsSelected(s==="indeterminate"?!0:s)}),cell:({row:t})=>e.jsx(g,{id:`check-${t.id}`,checked:t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})},{id:"service-account",header:"Service Account",accessorFn:t=>t.name,cell:({row:t})=>{var s,n;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(oe,{className:"rounded-sm",size:"sm",serviceAccountName:t.original.name,serviceAccountAvatar:((s=t.original.body)==null?void 0:s.avatar_url)??void 0}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsx("div",{className:"flex flex-row items-center space-x-1",children:e.jsx("div",{className:"flex items-center space-x-1",children:e.jsx(O,{className:"text-text-md font-semibold text-theme-text-primary",to:T.settings.service_accounts.detail(t.original.id),children:t.original.name})})}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(O,{className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",to:T.settings.service_accounts.detail(t.original.id),children:(n=t.original.metadata)==null?void 0:n.description})})]})]})}},{id:"active",header:"Active",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.active},cell:({row:t})=>{var s;return e.jsx(Re,{isActive:!!((s=t.original.body)!=null&&s.active),serviceAccountId:t.original.id})}},{id:"actions",meta:{width:"5%"},header:"",cell:({row:t})=>e.jsx("div",{className:"flex items-center justify-end",children:e.jsx(Ke,{serviceAccountId:t.original.id})})}]}function Ee(){return e.jsxs(I,{className:"flex flex-col items-center justify-center space-y-4 p-9",children:[e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold text-theme-text-primary",children:"There are no service accounts yet."}),e.jsx("p",{className:"text-theme-text-secondary",children:"Create your first one now to automate your processes securely with ZenML."})]}),e.jsx(H,{isFallback:!0})]})}function ze(){const t=R(),{rowSelection:s,setRowSelection:n}=j(),r=m.useMemo(()=>qe(),[]),{data:a}=fe({...pe.serviceAccountList({...t,sort_by:"desc:created",hydrate:!0})});return a&&a.items.length<1&&!t.name?e.jsx(Ee,{}):e.jsxs(e.Fragment,{children:[e.jsx(He,{}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:a?e.jsx(le,{getRowId:i=>i.id,rowSelection:s,onRowSelectionChange:n,columns:r,data:a.items}):e.jsx(F,{className:"h-[500px] w-full"})}),a?a.total_pages>1&&e.jsx(ue,{searchParams:t,paginate:a}):e.jsx(F,{className:"h-[36px] w-[300px]"})]})]})}function He(){const t=R(),{selectedRowCount:s}=j();return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[s?e.jsx(Oe,{}):e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(de,{searchParams:t})}),e.jsx(H,{isFallback:!1})]})}function ot(){return e.jsxs(I,{className:"space-y-4 p-5",children:[e.jsx(Me,{}),e.jsx(Te,{children:e.jsx(ze,{})})]})}function Me(){return e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Service Accounts"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Configure automated access for background tasks and integrations."}),e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/project-setup-and-management/connecting-to-zenml/connect-with-a-service-account",className:"link text-text-sm text-primary-400",children:"Learn More"})]})]})}export{ot as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as i,j as s}from"./@radix-B1sy0Lhr.js";import{z as t,t as g,v as w,I as c,B as N,r as v,w as y,k as b}from"./index-
|
1
|
+
import{r as i,j as s}from"./@radix-B1sy0Lhr.js";import{z as t,t as g,v as w,I as c,B as N,r as v,w as y,k as b}from"./index-Ci5z7q6x.js";import{u as S}from"./login-mutation-DOxF97JV.js";import{t as I}from"./zod-D48zuELD.js";import{u as L}from"./index.esm-SBF9nn_P.js";import{c as F,f as P}from"./@react-router-CHjLNlgw.js";import"./@tanstack-Dwlisomv.js";import"./@reactflow-gbyyU3kq.js";const E=t.object({username:t.string().min(1),password:t.string().optional()});function A(){const l=F(),{setAuthState:m}=g(),{toast:u}=w(),a=i.useId(),r=i.useId(),[o]=P(),d=o.get("redirect"),x=o.get("username")??void 0,{register:n,handleSubmit:p,formState:{isValid:f}}=L({resolver:I(E),defaultValues:{username:x}}),h=S({onError:e=>{e instanceof Error&&u({status:"error",emphasis:"subtle",icon:s.jsx(y,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:e.message,rounded:!0})},onSuccess:async()=>{m("true"),l(d||v.projects.overview)}});function j(e){h.mutate({username:e.username.trim(),password:e.password})}return s.jsxs("form",{onSubmit:p(j),className:"space-y-5",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:a,className:"text-text-sm",children:"Username"}),s.jsx(c,{...n("username"),id:a,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:r,className:"text-text-sm",children:"Password"}),s.jsx(c,{...n("password"),id:r,type:"password",className:"w-full"})]})]}),s.jsx(N,{disabled:!f,className:"w-full text-center",size:"md",children:s.jsx("span",{className:"w-full",children:"Login"})})]})}function U(){return s.jsxs(b,{className:"flex w-full max-w-[540px] flex-col gap-5 p-7",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"mb-0.5 text-display-xs font-semibold",children:"Log in to your account"}),s.jsx("p",{className:"text-theme-text-secondary",children:"Please, fill in your details to log in to your ZenML account."})]}),s.jsx(A,{})]})}export{U as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{z as a}from"./index-
|
1
|
+
import{z as a}from"./index-Ci5z7q6x.js";import{s as i}from"./sharedSchema-CKFbjwmg.js";const o=a.enum(["aws","gcp","azure"]),p=a.object({provider:o}),g=a.object({region:a.string().trim().min(1),stackName:i}),r="new-infra-data",e=a.object({provider:o,stackName:a.string().min(1).trim(),location:a.string().min(1).trim(),timestamp:a.string().min(1).trim()});function d(t){localStorage.setItem(r,JSON.stringify(t))}function f(){try{const t=localStorage.getItem(r),s=t?JSON.parse(t):{};return e.safeParse(s)}catch{return c(),e.safeParse({})}}function c(){localStorage.removeItem(r)}export{o as a,g as b,c,p as d,f as p,d as s};
|
@@ -1 +1 @@
|
|
1
|
-
import{z as t}from"./index-
|
1
|
+
import{z as t}from"./index-Ci5z7q6x.js";import{a as s}from"./persist-C98EYq5I.js";const r="create-terraform-data",e=t.object({provider:s,stackName:t.string().min(1).trim(),location:t.string().min(1).trim(),timestamp:t.string().min(1).trim()});function n(a){localStorage.setItem(r,JSON.stringify(a))}function l(){try{const a=localStorage.getItem(r),o=a?JSON.parse(a):{};return e.safeParse(o)}catch{return i(),e.safeParse({})}}function i(){localStorage.removeItem(r)}export{i as c,l as p,n as s};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e,r as a}from"./@radix-B1sy0Lhr.js";import{u as V,d as Z,e as k,p as E}from"./form-schemas-BjWDRvGd.js";import{B as f,A as R,e as A,f as F,I as M,Q as j,av as u}from"./index-CO6UN3UX.js";import{t as L}from"./zod-D48zuELD.js";import{u as S,C as N}from"./index.esm-SBF9nn_P.js";import{S as B}from"./bar-chart-square-check-_m-oYysN.js";import{a as I,S as z}from"./dataflow-2-BLkaTH0Q.js";import{S as T}from"./credit-card-DfBA6dBb.js";import{S as P}from"./eye-BXcQevds.js";import{S as D}from"./file-text-TdPXNd7s.js";import{S as U}from"./layout-GIiNvS10.js";import{S as O}from"./message-chat-square-C3CRCQvD.js";import{S as W}from"./slash-circle-B0xMh8q6.js";import{S as G}from"./transform-S7omcvTm.js";const q="/assets/adam-e-y0WnB_.webp",J="/assets/alex-DcCuDHPg.webp",K="/assets/baris-C0ZrZ10g.webp",X="/assets/hamza-NKKOZz1I.webp",$="/assets/stefan-B08Ftbba.webp";function j1(){const{setSurveyStep:s}=V();function C(){window.open("https://zenml.io/slack","_blank"),s(l=>l+1)}return e.jsxs("div",{className:"max-w-[540px] space-y-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"Join The ZenML Slack Community"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Connect to our growing community and meet fellow ZenML enthusiasts, get support, and share your insights. Let's grow together!"})]}),e.jsx(Y,{}),e.jsx(f,{onClick:()=>C(),className:"h-auto min-h-8 w-full justify-center py-1",intent:"primary",emphasis:"bold",size:"lg",children:"Join the ZenML Community and Continue"}),e.jsx(f,{intent:"secondary",emphasis:"minimal",onClick:()=>s(l=>l+1),className:"mx-auto justify-center text-neutral-500",size:"sm",children:"Skip this step"})]})}const Q=[{name:"Adam",image:q},{name:"Hamza",image:X},{name:"Alex",image:J},{name:"Stefan",image:$},{name:"Baris",image:K}];function Y(){return e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"flex items-center justify-center -space-x-[7px]",children:Q.map(s=>e.jsxs(R,{size:"lg",type:"rounded",children:[e.jsx(A,{alt:`Portrait of ${s.name}`,src:s.image}),e.jsx(F,{size:"lg",children:s.name[0]})]},s.name))}),e.jsx("p",{className:"text-center text-text-xs text-theme-text-tertiary",children:"Adam Probst, Hamza Tahir, and +1,800 others have already joined"})]})}function N1({email:s,fullName:C,submitHandler:l}){const c=a.useId(),n=a.useId(),x=a.useId(),{register:p,handleSubmit:d,control:i,watch:t,formState:{isValid:m}}=S({resolver:L(Z),defaultValues:{fullName:C||"",getUpdates:!0,email:s||""}});return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"Add your account details"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Please, fill in your details to get started with ZenML."})]}),e.jsxs("form",{onSubmit:d(l),className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:c,className:"text-text-sm",children:"Name"}),e.jsx(M,{...p("fullName"),id:c,className:"w-full"})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{htmlFor:n,className:"text-text-sm",children:["Email ",!t("getUpdates")&&e.jsx(e.Fragment,{children:"(optional)"})]}),e.jsx(M,{placeholder:"example@company.inc",...p("email"),type:"email",id:n,className:"w-full"})]})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(N,{control:i,name:"getUpdates",render:({field:{onChange:o,value:g}})=>e.jsx(j,{checked:g,onCheckedChange:h=>o(!!h),id:x})}),e.jsx("label",{htmlFor:x,className:"text-text-sm",children:"I want to receive news and recommendations about how to use ZenML"})]}),e.jsx(f,{disabled:!m,className:"w-full text-center",size:"md",children:e.jsx("span",{className:"w-full",children:"Continue"})}),e.jsxs("p",{className:"text-center text-theme-text-secondary",children:["By continuing you agree to the"," ",e.jsx("a",{className:"link text-theme-text-brand",href:"https://www.zenml.io/privacy-policy",rel:"noopener noreferrer",target:"_blank",children:"Privacy Policy"})]})]})]})}const e1=s=>a.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},a.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"})),s1=s=>a.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1C9.55228 1 10 1.44772 10 2V4H14V2C14 1.44772 14.4477 1 15 1C15.5523 1 16 1.44772 16 2V4.02714C16.0868 4.03193 16.1707 4.03756 16.2518 4.04419C16.8139 4.09012 17.3306 4.18868 17.816 4.43597C18.5686 4.81947 19.1805 5.43139 19.564 6.18404C19.8113 6.66937 19.9099 7.18608 19.9558 7.74817C19.9624 7.82933 19.9681 7.91325 19.9729 8H22C22.5523 8 23 8.44772 23 9C23 9.55228 22.5523 10 22 10H20V13H22C22.5523 13 23 13.4477 23 14C23 14.5523 22.5523 15 22 15H19.9984C19.9951 15.4755 19.9853 15.891 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.9558C16.1707 19.9624 16.0868 19.9681 16 19.9729V22C16 22.5523 15.5523 23 15 23C14.4477 23 14 22.5523 14 22V20H10V22C10 22.5523 9.55228 23 9 23C8.44772 23 8 22.5523 8 22V19.9729C7.91325 19.9681 7.82933 19.9624 7.74817 19.9558C7.18608 19.9099 6.66937 19.8113 6.18404 19.564C5.43139 19.1805 4.81947 18.5686 4.43597 17.816C4.18868 17.3306 4.09012 16.8139 4.04419 16.2518C4.01471 15.891 4.00489 15.4755 4.00163 15H2C1.44772 15 1 14.5523 1 14C1 13.4477 1.44772 13 2 13H4V10H2C1.44772 10 1 9.55228 1 9C1 8.44772 1.44772 8 2 8H4.02714C4.03193 7.91325 4.03756 7.82933 4.04419 7.74817C4.09012 7.18608 4.18868 6.66937 4.43597 6.18404C4.81947 5.43139 5.43139 4.81947 6.18404 4.43597C6.66937 4.18868 7.18608 4.09012 7.74817 4.04419C7.82933 4.03756 7.91325 4.03193 8 4.02714V2C8 1.44772 8.44772 1 9 1ZM6 14.2C6 15.0566 6.00078 15.6389 6.03755 16.089C6.07337 16.5274 6.1383 16.7516 6.21799 16.908C6.40973 17.2843 6.71569 17.5903 7.09202 17.782C7.24842 17.8617 7.47262 17.9266 7.91104 17.9624C8.36113 17.9992 8.94342 18 9.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.2V9.8C18 8.94342 17.9992 8.36113 17.9624 7.91104C17.9266 7.47262 17.8617 7.24842 17.782 7.09202C17.5903 6.71569 17.2843 6.40973 16.908 6.21799C16.7516 6.1383 16.5274 6.07337 16.089 6.03755C15.6389 6.00078 15.0566 6 14.2 6H9.8C8.94342 6 8.36113 6.00078 7.91104 6.03755C7.47262 6.07337 7.24842 6.1383 7.09202 6.21799C6.71569 6.40973 6.40973 6.71569 6.21799 7.09202C6.1383 7.24842 6.07337 7.47262 6.03755 7.91104C6.00078 8.36113 6 8.94342 6 9.8V14.2Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.2929 8.79289C10.6834 8.40237 11.3166 8.40237 11.7071 8.79289L14.2071 11.2929C14.5976 11.6834 14.5976 12.3166 14.2071 12.7071L11.7071 15.2071C11.3166 15.5976 10.6834 15.5976 10.2929 15.2071C9.90237 14.8166 9.90237 14.1834 10.2929 13.7929L12.0858 12L10.2929 10.2071C9.90237 9.81658 9.90237 9.18342 10.2929 8.79289Z"})),a1=s=>a.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{d:"M7 12C7 9.63083 8.03052 7.50293 9.66699 6.03809C9.44795 6.01385 9.2255 6 9 6C5.68629 6 3 8.68629 3 12C3 15.3137 5.68629 18 9 18C9.22554 18 9.44791 17.9852 9.66699 17.9609C8.0308 16.4961 7 14.3689 7 12ZM9 12C9 14.2205 10.2071 16.1578 12 17.1953C13.7929 16.1578 15 14.2205 15 12C15 9.77934 13.7932 7.8412 12 6.80371C10.2068 7.8412 9 9.77934 9 12ZM17 12C17 14.3692 15.9685 16.4961 14.332 17.9609C14.5514 17.9852 14.7741 18 15 18C18.3137 18 21 15.3137 21 12C21 8.68629 18.3137 6 15 6C14.7742 6 14.5514 6.01378 14.332 6.03809C15.9688 7.50295 17 9.63057 17 12ZM23 12C23 16.4183 19.4183 20 15 20C13.9388 20 12.9267 19.7912 12 19.416C11.0733 19.7912 10.0612 20 9 20C4.58172 20 1 16.4183 1 12C1 7.58172 4.58172 4 9 4C10.0612 4 11.0733 4.20875 12 4.58398C12.9267 4.20875 13.9388 4 15 4C19.4183 4 23 7.58172 23 12Z"})),H=s=>a.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{d:"M20 12.7998C20 11.9434 19.9997 11.3612 19.9629 10.9111C19.9271 10.4727 19.8619 10.2482 19.7822 10.0918C19.5905 9.71554 19.2845 9.40951 18.9082 9.21777C18.7518 9.13808 18.5273 9.07293 18.0889 9.03711C17.6388 9.00035 17.0566 9 16.2002 9H7.79981C6.94342 9 6.36117 9.00035 5.91113 9.03711C5.47272 9.07293 5.2482 9.13808 5.0918 9.21777C4.71555 9.40951 4.40951 9.71554 4.21778 10.0918C4.13809 10.2482 4.07293 10.4727 4.03711 10.9111C4.00035 11.3612 4 11.9434 4 12.7998V16.2002C4 17.0566 4.00035 17.6388 4.03711 18.0889C4.07293 18.5273 4.13809 18.7518 4.21778 18.9082C4.40951 19.2845 4.71555 19.5905 5.0918 19.7822C5.2482 19.8619 5.47272 19.9271 5.91113 19.9629C6.36117 19.9997 6.94342 20 7.79981 20H16.2002C17.0566 20 17.6388 19.9997 18.0889 19.9629C18.5273 19.9271 18.7518 19.8619 18.9082 19.7822C19.2845 19.5905 19.5905 19.2845 19.7822 18.9082C19.8619 18.7518 19.9271 18.5273 19.9629 18.0889C19.9997 17.6388 20 17.0566 20 16.2002V12.7998ZM22 16.2002C22 17.0237 22.001 17.7016 21.9561 18.252C21.9101 18.814 21.8117 19.3311 21.5645 19.8164C21.181 20.5689 20.5689 21.181 19.8164 21.5645C19.3311 21.8117 18.814 21.9101 18.252 21.9561C17.7016 22.001 17.0237 22 16.2002 22H7.79981C6.97632 22 6.29843 22.001 5.74805 21.9561C5.18599 21.9101 4.6689 21.8117 4.1836 21.5645C3.43109 21.181 2.81902 20.5689 2.43555 19.8164C2.18827 19.3311 2.08988 18.814 2.04395 18.252C1.99898 17.7016 2 17.0237 2 16.2002V12.7998C2 11.9763 1.99898 11.2984 2.04395 10.748C2.08988 10.186 2.18827 9.6689 2.43555 9.18359C2.81902 8.43109 3.43109 7.81902 4.1836 7.43555C4.6689 7.18827 5.18599 7.08987 5.74805 7.04395C6.29843 6.99898 6.97632 7 7.79981 7H16.2002C17.0237 7 17.7016 6.99898 18.252 7.04395C18.814 7.08987 19.3311 7.18827 19.8164 7.43555C20.5689 7.81902 21.181 8.43109 21.5645 9.18359C21.8117 9.6689 21.9101 10.186 21.9561 10.748C22.001 11.2984 22 11.9763 22 12.7998V16.2002Z"}),a.createElement("path",{d:"M13 4V8H11V4H13Z"}),a.createElement("path",{d:"M15 16C15.5523 16 16 16.4477 16 17C16 17.5523 15.5523 18 15 18H9C8.44772 18 8 17.5523 8 17C8 16.4477 8.44772 16 9 16H15ZM9 10.5C9.82843 10.5 10.5 11.1716 10.5 12C10.5 12.8284 9.82843 13.5 9 13.5C8.17157 13.5 7.5 12.8284 7.5 12C7.5 11.1716 8.17157 10.5 9 10.5ZM15 10.5C15.8284 10.5 16.5 11.1716 16.5 12C16.5 12.8284 15.8284 13.5 15 13.5C14.1716 13.5 13.5 12.8284 13.5 12C13.5 11.1716 14.1716 10.5 15 10.5Z"}),a.createElement("path",{d:"M10 3C10 1.89543 10.8954 1 12 1C13.1046 1 14 1.89543 14 3C14 4.10457 13.1046 5 12 5C10.8954 5 10 4.10457 10 3Z"})),r="h-5 w-5 fill-primary-400 shrink-0",t1=[{key:"traditional_ml",name:"Traditional ML",icon:e.jsx(I,{className:r}),description:"(sklearn, XGBoost, etc.)"},{key:"deep_learning",name:"Deep Learning",icon:e.jsx(G,{className:r}),description:"(PyTorch, TensorFlow)"},{key:"computer_vision",name:"Computer Vision",icon:e.jsx(P,{className:r}),description:"(sklearn, XGBoost, etc.)"},{key:"llm_and_foundation_models",name:"LLMs / Foundation Models",icon:e.jsx(O,{className:r}),description:"(OpenAI, Anthropic, etc.)"},{key:"ai_agents_and_workflows",name:"AI Agents / Agentic workflows",icon:e.jsx(H,{className:r}),description:"(LangChain, AutoGen, CrewAI, etc.)"},{key:"hybrid_applications",name:"Hybrid applications",icon:e.jsx(a1,{className:r}),description:"(ML + LLMs together)"}],r1=[{name:"Prompt versioning and management",icon:e.jsx(D,{className:r}),key:"prompt_versioning_and_management"},{name:"Ochestrating LLM workflows / agents",icon:e.jsx(z,{className:r}),key:"orchestrating_llm_workflows_agents"},{icon:e.jsx(B,{className:r}),name:"Evaluating LLM outputs systematically",key:"evaluating_llm_outputs_systematically"},{icon:e.jsx(U,{className:r}),name:"Agent reliability and debugging",key:"agent_reliability_and_debugging"},{icon:e.jsx(s1,{className:r}),name:"Deploying agents",key:"deploying_agents"},{icon:e.jsx(T,{className:r}),name:"Cost monitoring across providers",key:"cost_monitoring_across_providers"},{icon:e.jsx(e1,{className:r}),name:"Combining traditional ML with LLMs",key:"combining_traditional_ml_with_llms"},{icon:e.jsx(W,{className:r}),name:"None of these are priorities yet",key:"none_of_these_are_priorities_yet"}];function L1({submitHandler:s}){const C=a.useRef(null),{watch:l,handleSubmit:c,control:n,formState:{isValid:x}}=S({resolver:L(k),defaultValues:{aiTypes:[]},shouldUnregister:!0}),p=l("aiTypes"),d=p.includes("llm_and_foundation_models")||p.includes("ai_agents_and_workflows");return a.useEffect(()=>{var i;d&&((i=C.current)==null||i.scrollIntoView({behavior:"smooth"}))},[d]),e.jsxs("div",{className:"flex flex-col justify-center gap-5 pb-5",children:[e.jsxs("div",{className:"w-fit self-center",children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"What types of AI are you working with?"}),e.jsx("p",{className:"text-left text-theme-text-secondary",children:"This helps us recommend compatible frameworks and workflows"})]}),e.jsxs("form",{onSubmit:c(s),className:"space-y-5",children:[e.jsx("div",{className:u("grid w-full grid-cols-1 gap-[20px] md:grid-cols-2 lg:min-w-[1050px]",{"opacity-60":d}),children:e.jsx(N,{control:n,name:"aiTypes",render:({field:{onChange:i,value:t}})=>e.jsx(e.Fragment,{children:t1.map(({description:m,icon:o,name:g,key:h},y)=>e.jsxs("label",{className:u("flex items-center gap-2 rounded-md border pl-3 transition-all duration-150",{"border-primary-400 bg-primary-25 shadow-sm":l("aiTypes").includes(h),"border-theme-border-minimal bg-theme-surface-primary hover:border-theme-border-bold hover:shadow-sm":!l("aiTypes").includes(h)}),children:[e.jsx(j,{onCheckedChange:w=>{i(w?[...t,h]:t.filter(v=>v!==h))},value:h,className:"h-3 w-3"}),e.jsxs("div",{className:"flex w-full items-center gap-2 py-3 pr-3 hover:cursor-pointer",children:[o,e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-theme-text-primary",children:g}),e.jsx("div",{className:"text-text-sm text-theme-text-secondary",children:m})]})]})]},y))})})}),d&&e.jsxs("div",{ref:C,id:"biggest-challenge",className:"w-full space-y-5",children:[e.jsx("h2",{className:"text-center text-display-xs font-semibold",children:"What's your biggest challenge right now?"}),e.jsx("div",{className:"grid w-full grid-cols-1 gap-[20px] md:grid-cols-2",children:e.jsx(N,{control:n,name:"biggestChallenge",render:({field:{onChange:i,value:t}})=>e.jsx(e.Fragment,{children:r1.map(({name:m,key:o,icon:g},h)=>{var y,w;return e.jsxs("label",{className:u("flex items-center gap-2 rounded-md border pl-3 transition-all duration-150",{"border-primary-400 bg-primary-25 shadow-sm":(y=l("biggestChallenge"))==null?void 0:y.includes(o),"border-theme-border-minimal bg-theme-surface-primary hover:border-theme-border-bold hover:shadow-sm":!((w=l("biggestChallenge"))!=null&&w.includes(o))}),children:[e.jsx(j,{onCheckedChange:v=>{i(v?[...t??[],o]:t==null?void 0:t.filter(_=>_!==o))},value:o,className:"h-3 w-3"}),e.jsxs("div",{className:"flex w-full items-center gap-2 py-3 pr-3 hover:cursor-pointer",children:[g,e.jsx("div",{className:"font-semibold text-theme-text-primary",children:m})]})]},h)})})})})]}),e.jsx(f,{disabled:!x,type:"submit",className:"mx-auto w-full max-w-[520px] text-center",size:"md",children:e.jsx("span",{className:"w-full",children:"Continue"})})]})]})}const l1=s=>a.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{d:"M1.00003 21C1.00003 19.6774 0.988833 18.7943 1.21487 18.0488C1.69962 16.4508 2.95085 15.1996 4.54886 14.7148C5.29431 14.4888 6.17743 14.5 7.50003 14.5H10C10.5523 14.5 11 14.9477 11 15.5C11 16.0523 10.5523 16.5 10 16.5H7.50003C6.03171 16.5 5.519 16.5106 5.12894 16.6289C4.17025 16.9198 3.4198 17.6702 3.12894 18.6289C3.01061 19.019 3.00003 19.5317 3.00003 21C3.00003 21.5523 2.55231 22 2.00003 22C1.44775 22 1.00003 21.5523 1.00003 21ZM13.5 7.5C13.5 5.567 11.933 4 10 4C8.06703 4 6.50003 5.567 6.50003 7.5C6.50003 9.433 8.06703 11 10 11C11.933 11 13.5 9.433 13.5 7.5ZM15.5 7.5C15.5 10.5376 13.0376 13 10 13C6.96246 13 4.50003 10.5376 4.50003 7.5C4.50003 4.46243 6.96246 2 10 2C13.0376 2 15.5 4.46243 15.5 7.5Z"}),a.createElement("path",{d:"M18 12.25C18.2908 12.25 18.5552 12.4184 18.6787 12.6816L19.7442 14.9521L22.1143 15.3164C22.3919 15.3592 22.6219 15.5539 22.711 15.8203C22.8 16.0868 22.7334 16.381 22.5371 16.582L20.8008 18.3594L21.2119 20.8789C21.2582 21.1623 21.139 21.4479 20.9043 21.6133C20.6696 21.7786 20.3607 21.7951 20.1094 21.6562L18 20.4893L15.8907 21.6562C15.6393 21.7951 15.3305 21.7786 15.0957 21.6133C14.861 21.4479 14.7419 21.1623 14.7881 20.8789L15.1983 18.3594L13.4629 16.582C13.2667 16.381 13.2001 16.0868 13.2891 15.8203C13.3781 15.5539 13.6081 15.3592 13.8858 15.3164L16.2549 14.9521L17.3213 12.6816L17.3741 12.5869C17.5115 12.3786 17.7457 12.25 18 12.25ZM17.4434 15.9521C17.3372 16.1782 17.1248 16.3361 16.878 16.374L15.5557 16.5771L16.5371 17.582C16.7033 17.7523 16.7785 17.9917 16.7403 18.2266L16.5166 19.5957L17.6367 18.9766C17.8626 18.8517 18.1375 18.8517 18.3633 18.9766L19.4825 19.5957L19.2598 18.2266C19.2216 17.9917 19.2967 17.7523 19.4629 17.582L20.4434 16.5771L19.1221 16.374C18.8752 16.3361 18.6629 16.1782 18.5567 15.9521L18 14.7646L17.4434 15.9521Z"})),n1=s=>a.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{d:"M1.00003 20C1.00003 18.6774 0.988833 17.7943 1.21487 17.0488C1.69962 15.4508 2.95085 14.1996 4.54886 13.7148C5.29431 13.4888 6.17743 13.5 7.50003 13.5H10C10.5523 13.5 11 13.9477 11 14.5C11 15.0523 10.5523 15.5 10 15.5H7.50003C6.03171 15.5 5.519 15.5106 5.12894 15.6289C4.17025 15.9198 3.4198 16.6702 3.12894 17.6289C3.01061 18.019 3.00003 18.5317 3.00003 20C3.00003 20.5523 2.55231 21 2.00003 21C1.44775 21 1.00003 20.5523 1.00003 20ZM13.5 6.5C13.5 4.567 11.933 3 10 3C8.06703 3 6.50003 4.567 6.50003 6.5C6.50003 8.433 8.06703 10 10 10C11.933 10 13.5 8.433 13.5 6.5ZM15.5 6.5C15.5 9.53757 13.0376 12 10 12C6.96246 12 4.50003 9.53757 4.50003 6.5C4.50003 3.46243 6.96246 1 10 1C13.0376 1 15.5 3.46243 15.5 6.5Z"}),a.createElement("path",{d:"M19.5489 10.25C20.1638 10.2501 20.75 10.3831 21.2784 10.6221C21.5026 10.7236 21.6629 10.9287 21.7071 11.1709C21.7511 11.413 21.6731 11.6609 21.4991 11.835L19.7461 13.5879C19.7798 13.6222 19.8186 13.6614 19.8662 13.709L20.291 14.1338C20.3382 14.1809 20.3771 14.2195 20.4112 14.2529C20.4454 14.2194 20.4849 14.1812 20.5323 14.1338L22.1651 12.501L22.2334 12.4395C22.4008 12.3088 22.6174 12.2545 22.8291 12.293C23.0713 12.3371 23.2765 12.4975 23.378 12.7217C23.6169 13.25 23.75 13.8362 23.75 14.4512C23.75 16.7715 21.8691 18.6531 19.5489 18.6533C19.2061 18.6533 18.8713 18.6122 18.5508 18.5342C18.4432 18.508 18.3673 18.4895 18.3096 18.4766L18.3067 18.4805C18.2792 18.5074 18.2479 18.5392 18.208 18.5791L14.6133 22.1729C13.8438 22.9422 12.5966 22.9423 11.8272 22.1729C11.0578 21.4034 11.0578 20.1562 11.8272 19.3867L15.4209 15.792C15.4608 15.7521 15.4926 15.7208 15.5196 15.6934L15.5225 15.6895C15.5096 15.6319 15.4919 15.5561 15.4659 15.4492C15.3878 15.1288 15.3467 14.7939 15.3467 14.4512C15.347 12.1309 17.2285 10.25 19.5489 10.25ZM16.8467 14.4512C16.8467 14.6734 16.8739 14.8887 16.9239 15.0938C16.9566 15.228 16.9858 15.3513 17.0059 15.4512C17.0241 15.5416 17.0504 15.683 17.0401 15.834C17.0267 16.0293 16.9846 16.1787 16.8946 16.3525C16.7864 16.5613 16.5962 16.7388 16.4825 16.8525L12.8877 20.4473C12.7042 20.631 12.7041 20.9287 12.8877 21.1123C13.0714 21.2959 13.3691 21.2959 13.5528 21.1123L17.1475 17.5176C17.2612 17.4038 17.4387 17.2137 17.6475 17.1055L17.7744 17.0469C17.8989 16.9965 18.0196 16.97 18.166 16.96C18.3171 16.9496 18.4585 16.976 18.5489 16.9941C18.6488 17.0142 18.7721 17.0435 18.9063 17.0762C19.1114 17.1261 19.3267 17.1533 19.5489 17.1533C21.0108 17.1531 22.1979 15.9915 22.2451 14.541L21.5928 15.1943C21.4876 15.2995 21.3766 15.4103 21.2744 15.4971C21.1656 15.5894 21.0176 15.6976 20.8203 15.7617C20.5544 15.848 20.2679 15.8481 20.002 15.7617C19.8047 15.6976 19.6567 15.5895 19.5479 15.4971C19.4458 15.4104 19.3356 15.2994 19.2305 15.1943L18.8057 14.7695C18.7006 14.6645 18.5896 14.5542 18.503 14.4521C18.4106 14.3433 18.3024 14.1954 18.2383 13.998C18.152 13.7321 18.152 13.4456 18.2383 13.1797L18.294 13.04C18.3556 12.9103 18.4337 12.8071 18.503 12.7256C18.5897 12.6234 18.7005 12.5124 18.8057 12.4072L19.458 11.7539C18.008 11.8016 16.847 12.9896 16.8467 14.4512Z"})),i1=s=>a.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 4C10.067 4 8.50002 5.567 8.50002 7.5C8.50002 9.433 10.067 11 12 11C13.933 11 15.5 9.433 15.5 7.5C15.5 5.567 13.933 4 12 4ZM6.50002 7.5C6.50002 4.46243 8.96246 2 12 2C15.0376 2 17.5 4.46243 17.5 7.5C17.5 10.5376 15.0376 13 12 13C8.96246 13 6.50002 10.5376 6.50002 7.5ZM9.32629 14.5C9.38335 14.5 9.44125 14.5 9.50003 14.5H14.5C14.5588 14.5 14.6167 14.5 14.6738 14.5C15.901 14.4995 16.739 14.4992 17.4514 14.7153C19.0495 15.2 20.3 16.4506 20.7847 18.0486C21.0008 18.761 21.0005 19.599 21.0001 20.8263C21 20.8833 21 20.9412 21 21C21 21.5523 20.5523 22 20 22C19.4477 22 19 21.5523 19 21C19 19.5317 18.9892 19.0192 18.8708 18.6291C18.58 17.6703 17.8297 16.92 16.8709 16.6292C16.4808 16.5108 15.9683 16.5 14.5 16.5H9.50003C8.03171 16.5 7.51923 16.5108 7.12917 16.6292C6.17036 16.92 5.42005 17.6703 5.1292 18.6291C5.01088 19.0192 5.00002 19.5317 5.00002 21C5.00002 21.5523 4.55231 22 4.00002 22C3.44774 22 3.00002 21.5523 3.00002 21C3.00002 20.9412 3 20.8833 2.99998 20.8263C2.99953 19.599 2.99922 18.761 3.21532 18.0486C3.70007 16.4506 4.95059 15.2 6.54859 14.7153C7.261 14.4992 8.09902 14.4995 9.32629 14.5Z"})),b="shrink-0 size-5 fill-primary-400",o1=[{name:"ML Engineer / Data Scientist",icon:e.jsx(i1,{className:b})},{name:"Platform Engineer / MLOps Engineer",icon:e.jsx(n1,{className:b})},{name:"AI Engineer",icon:e.jsx(H,{className:b})},{name:"Engineering Lead / Tech Lead",icon:e.jsx(l1,{className:b})}];function S1({submitHandler:s,user:C}){var d,i;const{handleSubmit:l,register:c,watch:n,formState:{isValid:x}}=S({defaultValues:{primaryRole:(i=(d=C==null?void 0:C.metadata)==null?void 0:d.user_metadata)==null?void 0:i.primary_role},resolver:L(E),shouldUnregister:!0}),p=a.useRef(null);return a.useEffect(()=>{var t;n("primaryRole")==="other"&&((t=p.current)==null||t.focus())},[n("primaryRole")]),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"What is your primary role?"}),e.jsx("p",{className:"text-theme-text-secondary",children:"This helps us understand your perspective and needs"})]}),e.jsxs("form",{onSubmit:l(s),className:"w-full gap-[20px] space-y-5 lg:min-w-[700px]",children:[e.jsxs("ul",{className:"space-y-2",children:[o1.map(({icon:t,name:m},o)=>e.jsxs("label",{className:u("flex items-center gap-1 rounded-md border pl-3 transition-all duration-150",{"border-primary-400 bg-primary-25 shadow-sm":n("primaryRole")===m,"border-theme-border-minimal bg-theme-surface-primary hover:border-theme-border-bold hover:shadow-sm":n("primaryRole")!==m}),children:[e.jsx("input",{type:"radio",...c("primaryRole"),value:m,name:"primaryRole",className:"h-3 w-3 border !border-theme-border-bold text-theme-surface-primary focus:ring-2 focus:ring-theme-surface-strong"}),e.jsxs("div",{className:"flex w-full items-center gap-1 py-3 pr-3 text-theme-text-secondary hover:cursor-pointer",children:[t,m]})]},o)),e.jsxs("li",{className:u("flex items-center gap-1 rounded-md border bg-theme-surface-primary p-3 transition duration-150",{"border-primary-400":n("primaryRole")==="other","border-theme-border-minimal hover:border-theme-border-bold":n("primaryRole")!=="other"}),children:[e.jsx("input",{id:"other",type:"radio",...c("primaryRole"),value:"other",name:"primaryRole",className:"h-3 w-3 border !border-theme-border-bold text-theme-surface-primary focus:ring-2 focus:ring-theme-surface-strong"}),n("primaryRole")==="other"?e.jsx("input",{...c("otherVal"),ref:t=>{c("otherVal").ref(t),p.current=t},placeholder:"Specify...",className:"w-full border-none p-0 pr-2 placeholder:text-theme-text-tertiary focus:outline-none focus:ring-0"}):e.jsx("label",{className:"w-full text-theme-text-secondary hover:cursor-pointer",htmlFor:"other",children:"Other"})]})]}),e.jsx(f,{disabled:!x,className:"w-full text-center",size:"md",children:e.jsx("span",{className:"w-full",children:"Continue"})})]})]})}export{N1 as A,S1 as P,j1 as S,L1 as a};
|
1
|
+
import{j as e,r as a}from"./@radix-B1sy0Lhr.js";import{u as V,d as Z,e as k,p as E}from"./form-schemas-CpTCEVoG.js";import{B as f,A as R,e as A,f as F,I as M,Q as j,av as u}from"./index-Ci5z7q6x.js";import{t as L}from"./zod-D48zuELD.js";import{u as S,C as N}from"./index.esm-SBF9nn_P.js";import{S as B}from"./bar-chart-square-check-_m-oYysN.js";import{a as I,S as z}from"./dataflow-2-BLkaTH0Q.js";import{S as T}from"./credit-card-DfBA6dBb.js";import{S as P}from"./eye-BXcQevds.js";import{S as D}from"./file-text-TdPXNd7s.js";import{S as U}from"./layout-GIiNvS10.js";import{S as O}from"./message-chat-square-C3CRCQvD.js";import{S as W}from"./slash-circle-B0xMh8q6.js";import{S as G}from"./transform-S7omcvTm.js";const q="/assets/adam-e-y0WnB_.webp",J="/assets/alex-DcCuDHPg.webp",K="/assets/baris-C0ZrZ10g.webp",X="/assets/hamza-NKKOZz1I.webp",$="/assets/stefan-B08Ftbba.webp";function j1(){const{setSurveyStep:s}=V();function C(){window.open("https://zenml.io/slack","_blank"),s(l=>l+1)}return e.jsxs("div",{className:"max-w-[540px] space-y-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"Join The ZenML Slack Community"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Connect to our growing community and meet fellow ZenML enthusiasts, get support, and share your insights. Let's grow together!"})]}),e.jsx(Y,{}),e.jsx(f,{onClick:()=>C(),className:"h-auto min-h-8 w-full justify-center py-1",intent:"primary",emphasis:"bold",size:"lg",children:"Join the ZenML Community and Continue"}),e.jsx(f,{intent:"secondary",emphasis:"minimal",onClick:()=>s(l=>l+1),className:"mx-auto justify-center text-neutral-500",size:"sm",children:"Skip this step"})]})}const Q=[{name:"Adam",image:q},{name:"Hamza",image:X},{name:"Alex",image:J},{name:"Stefan",image:$},{name:"Baris",image:K}];function Y(){return e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"flex items-center justify-center -space-x-[7px]",children:Q.map(s=>e.jsxs(R,{size:"lg",type:"rounded",children:[e.jsx(A,{alt:`Portrait of ${s.name}`,src:s.image}),e.jsx(F,{size:"lg",children:s.name[0]})]},s.name))}),e.jsx("p",{className:"text-center text-text-xs text-theme-text-tertiary",children:"Adam Probst, Hamza Tahir, and +1,800 others have already joined"})]})}function N1({email:s,fullName:C,submitHandler:l}){const c=a.useId(),n=a.useId(),x=a.useId(),{register:p,handleSubmit:d,control:i,watch:t,formState:{isValid:m}}=S({resolver:L(Z),defaultValues:{fullName:C||"",getUpdates:!0,email:s||""}});return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"Add your account details"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Please, fill in your details to get started with ZenML."})]}),e.jsxs("form",{onSubmit:d(l),className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:c,className:"text-text-sm",children:"Name"}),e.jsx(M,{...p("fullName"),id:c,className:"w-full"})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{htmlFor:n,className:"text-text-sm",children:["Email ",!t("getUpdates")&&e.jsx(e.Fragment,{children:"(optional)"})]}),e.jsx(M,{placeholder:"example@company.inc",...p("email"),type:"email",id:n,className:"w-full"})]})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(N,{control:i,name:"getUpdates",render:({field:{onChange:o,value:g}})=>e.jsx(j,{checked:g,onCheckedChange:h=>o(!!h),id:x})}),e.jsx("label",{htmlFor:x,className:"text-text-sm",children:"I want to receive news and recommendations about how to use ZenML"})]}),e.jsx(f,{disabled:!m,className:"w-full text-center",size:"md",children:e.jsx("span",{className:"w-full",children:"Continue"})}),e.jsxs("p",{className:"text-center text-theme-text-secondary",children:["By continuing you agree to the"," ",e.jsx("a",{className:"link text-theme-text-brand",href:"https://www.zenml.io/privacy-policy",rel:"noopener noreferrer",target:"_blank",children:"Privacy Policy"})]})]})]})}const e1=s=>a.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},a.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"})),s1=s=>a.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1C9.55228 1 10 1.44772 10 2V4H14V2C14 1.44772 14.4477 1 15 1C15.5523 1 16 1.44772 16 2V4.02714C16.0868 4.03193 16.1707 4.03756 16.2518 4.04419C16.8139 4.09012 17.3306 4.18868 17.816 4.43597C18.5686 4.81947 19.1805 5.43139 19.564 6.18404C19.8113 6.66937 19.9099 7.18608 19.9558 7.74817C19.9624 7.82933 19.9681 7.91325 19.9729 8H22C22.5523 8 23 8.44772 23 9C23 9.55228 22.5523 10 22 10H20V13H22C22.5523 13 23 13.4477 23 14C23 14.5523 22.5523 15 22 15H19.9984C19.9951 15.4755 19.9853 15.891 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.9558C16.1707 19.9624 16.0868 19.9681 16 19.9729V22C16 22.5523 15.5523 23 15 23C14.4477 23 14 22.5523 14 22V20H10V22C10 22.5523 9.55228 23 9 23C8.44772 23 8 22.5523 8 22V19.9729C7.91325 19.9681 7.82933 19.9624 7.74817 19.9558C7.18608 19.9099 6.66937 19.8113 6.18404 19.564C5.43139 19.1805 4.81947 18.5686 4.43597 17.816C4.18868 17.3306 4.09012 16.8139 4.04419 16.2518C4.01471 15.891 4.00489 15.4755 4.00163 15H2C1.44772 15 1 14.5523 1 14C1 13.4477 1.44772 13 2 13H4V10H2C1.44772 10 1 9.55228 1 9C1 8.44772 1.44772 8 2 8H4.02714C4.03193 7.91325 4.03756 7.82933 4.04419 7.74817C4.09012 7.18608 4.18868 6.66937 4.43597 6.18404C4.81947 5.43139 5.43139 4.81947 6.18404 4.43597C6.66937 4.18868 7.18608 4.09012 7.74817 4.04419C7.82933 4.03756 7.91325 4.03193 8 4.02714V2C8 1.44772 8.44772 1 9 1ZM6 14.2C6 15.0566 6.00078 15.6389 6.03755 16.089C6.07337 16.5274 6.1383 16.7516 6.21799 16.908C6.40973 17.2843 6.71569 17.5903 7.09202 17.782C7.24842 17.8617 7.47262 17.9266 7.91104 17.9624C8.36113 17.9992 8.94342 18 9.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.2V9.8C18 8.94342 17.9992 8.36113 17.9624 7.91104C17.9266 7.47262 17.8617 7.24842 17.782 7.09202C17.5903 6.71569 17.2843 6.40973 16.908 6.21799C16.7516 6.1383 16.5274 6.07337 16.089 6.03755C15.6389 6.00078 15.0566 6 14.2 6H9.8C8.94342 6 8.36113 6.00078 7.91104 6.03755C7.47262 6.07337 7.24842 6.1383 7.09202 6.21799C6.71569 6.40973 6.40973 6.71569 6.21799 7.09202C6.1383 7.24842 6.07337 7.47262 6.03755 7.91104C6.00078 8.36113 6 8.94342 6 9.8V14.2Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.2929 8.79289C10.6834 8.40237 11.3166 8.40237 11.7071 8.79289L14.2071 11.2929C14.5976 11.6834 14.5976 12.3166 14.2071 12.7071L11.7071 15.2071C11.3166 15.5976 10.6834 15.5976 10.2929 15.2071C9.90237 14.8166 9.90237 14.1834 10.2929 13.7929L12.0858 12L10.2929 10.2071C9.90237 9.81658 9.90237 9.18342 10.2929 8.79289Z"})),a1=s=>a.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{d:"M7 12C7 9.63083 8.03052 7.50293 9.66699 6.03809C9.44795 6.01385 9.2255 6 9 6C5.68629 6 3 8.68629 3 12C3 15.3137 5.68629 18 9 18C9.22554 18 9.44791 17.9852 9.66699 17.9609C8.0308 16.4961 7 14.3689 7 12ZM9 12C9 14.2205 10.2071 16.1578 12 17.1953C13.7929 16.1578 15 14.2205 15 12C15 9.77934 13.7932 7.8412 12 6.80371C10.2068 7.8412 9 9.77934 9 12ZM17 12C17 14.3692 15.9685 16.4961 14.332 17.9609C14.5514 17.9852 14.7741 18 15 18C18.3137 18 21 15.3137 21 12C21 8.68629 18.3137 6 15 6C14.7742 6 14.5514 6.01378 14.332 6.03809C15.9688 7.50295 17 9.63057 17 12ZM23 12C23 16.4183 19.4183 20 15 20C13.9388 20 12.9267 19.7912 12 19.416C11.0733 19.7912 10.0612 20 9 20C4.58172 20 1 16.4183 1 12C1 7.58172 4.58172 4 9 4C10.0612 4 11.0733 4.20875 12 4.58398C12.9267 4.20875 13.9388 4 15 4C19.4183 4 23 7.58172 23 12Z"})),H=s=>a.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{d:"M20 12.7998C20 11.9434 19.9997 11.3612 19.9629 10.9111C19.9271 10.4727 19.8619 10.2482 19.7822 10.0918C19.5905 9.71554 19.2845 9.40951 18.9082 9.21777C18.7518 9.13808 18.5273 9.07293 18.0889 9.03711C17.6388 9.00035 17.0566 9 16.2002 9H7.79981C6.94342 9 6.36117 9.00035 5.91113 9.03711C5.47272 9.07293 5.2482 9.13808 5.0918 9.21777C4.71555 9.40951 4.40951 9.71554 4.21778 10.0918C4.13809 10.2482 4.07293 10.4727 4.03711 10.9111C4.00035 11.3612 4 11.9434 4 12.7998V16.2002C4 17.0566 4.00035 17.6388 4.03711 18.0889C4.07293 18.5273 4.13809 18.7518 4.21778 18.9082C4.40951 19.2845 4.71555 19.5905 5.0918 19.7822C5.2482 19.8619 5.47272 19.9271 5.91113 19.9629C6.36117 19.9997 6.94342 20 7.79981 20H16.2002C17.0566 20 17.6388 19.9997 18.0889 19.9629C18.5273 19.9271 18.7518 19.8619 18.9082 19.7822C19.2845 19.5905 19.5905 19.2845 19.7822 18.9082C19.8619 18.7518 19.9271 18.5273 19.9629 18.0889C19.9997 17.6388 20 17.0566 20 16.2002V12.7998ZM22 16.2002C22 17.0237 22.001 17.7016 21.9561 18.252C21.9101 18.814 21.8117 19.3311 21.5645 19.8164C21.181 20.5689 20.5689 21.181 19.8164 21.5645C19.3311 21.8117 18.814 21.9101 18.252 21.9561C17.7016 22.001 17.0237 22 16.2002 22H7.79981C6.97632 22 6.29843 22.001 5.74805 21.9561C5.18599 21.9101 4.6689 21.8117 4.1836 21.5645C3.43109 21.181 2.81902 20.5689 2.43555 19.8164C2.18827 19.3311 2.08988 18.814 2.04395 18.252C1.99898 17.7016 2 17.0237 2 16.2002V12.7998C2 11.9763 1.99898 11.2984 2.04395 10.748C2.08988 10.186 2.18827 9.6689 2.43555 9.18359C2.81902 8.43109 3.43109 7.81902 4.1836 7.43555C4.6689 7.18827 5.18599 7.08987 5.74805 7.04395C6.29843 6.99898 6.97632 7 7.79981 7H16.2002C17.0237 7 17.7016 6.99898 18.252 7.04395C18.814 7.08987 19.3311 7.18827 19.8164 7.43555C20.5689 7.81902 21.181 8.43109 21.5645 9.18359C21.8117 9.6689 21.9101 10.186 21.9561 10.748C22.001 11.2984 22 11.9763 22 12.7998V16.2002Z"}),a.createElement("path",{d:"M13 4V8H11V4H13Z"}),a.createElement("path",{d:"M15 16C15.5523 16 16 16.4477 16 17C16 17.5523 15.5523 18 15 18H9C8.44772 18 8 17.5523 8 17C8 16.4477 8.44772 16 9 16H15ZM9 10.5C9.82843 10.5 10.5 11.1716 10.5 12C10.5 12.8284 9.82843 13.5 9 13.5C8.17157 13.5 7.5 12.8284 7.5 12C7.5 11.1716 8.17157 10.5 9 10.5ZM15 10.5C15.8284 10.5 16.5 11.1716 16.5 12C16.5 12.8284 15.8284 13.5 15 13.5C14.1716 13.5 13.5 12.8284 13.5 12C13.5 11.1716 14.1716 10.5 15 10.5Z"}),a.createElement("path",{d:"M10 3C10 1.89543 10.8954 1 12 1C13.1046 1 14 1.89543 14 3C14 4.10457 13.1046 5 12 5C10.8954 5 10 4.10457 10 3Z"})),r="h-5 w-5 fill-primary-400 shrink-0",t1=[{key:"traditional_ml",name:"Traditional ML",icon:e.jsx(I,{className:r}),description:"(sklearn, XGBoost, etc.)"},{key:"deep_learning",name:"Deep Learning",icon:e.jsx(G,{className:r}),description:"(PyTorch, TensorFlow)"},{key:"computer_vision",name:"Computer Vision",icon:e.jsx(P,{className:r}),description:"(sklearn, XGBoost, etc.)"},{key:"llm_and_foundation_models",name:"LLMs / Foundation Models",icon:e.jsx(O,{className:r}),description:"(OpenAI, Anthropic, etc.)"},{key:"ai_agents_and_workflows",name:"AI Agents / Agentic workflows",icon:e.jsx(H,{className:r}),description:"(LangChain, AutoGen, CrewAI, etc.)"},{key:"hybrid_applications",name:"Hybrid applications",icon:e.jsx(a1,{className:r}),description:"(ML + LLMs together)"}],r1=[{name:"Prompt versioning and management",icon:e.jsx(D,{className:r}),key:"prompt_versioning_and_management"},{name:"Ochestrating LLM workflows / agents",icon:e.jsx(z,{className:r}),key:"orchestrating_llm_workflows_agents"},{icon:e.jsx(B,{className:r}),name:"Evaluating LLM outputs systematically",key:"evaluating_llm_outputs_systematically"},{icon:e.jsx(U,{className:r}),name:"Agent reliability and debugging",key:"agent_reliability_and_debugging"},{icon:e.jsx(s1,{className:r}),name:"Deploying agents",key:"deploying_agents"},{icon:e.jsx(T,{className:r}),name:"Cost monitoring across providers",key:"cost_monitoring_across_providers"},{icon:e.jsx(e1,{className:r}),name:"Combining traditional ML with LLMs",key:"combining_traditional_ml_with_llms"},{icon:e.jsx(W,{className:r}),name:"None of these are priorities yet",key:"none_of_these_are_priorities_yet"}];function L1({submitHandler:s}){const C=a.useRef(null),{watch:l,handleSubmit:c,control:n,formState:{isValid:x}}=S({resolver:L(k),defaultValues:{aiTypes:[]},shouldUnregister:!0}),p=l("aiTypes"),d=p.includes("llm_and_foundation_models")||p.includes("ai_agents_and_workflows");return a.useEffect(()=>{var i;d&&((i=C.current)==null||i.scrollIntoView({behavior:"smooth"}))},[d]),e.jsxs("div",{className:"flex flex-col justify-center gap-5 pb-5",children:[e.jsxs("div",{className:"w-fit self-center",children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"What types of AI are you working with?"}),e.jsx("p",{className:"text-left text-theme-text-secondary",children:"This helps us recommend compatible frameworks and workflows"})]}),e.jsxs("form",{onSubmit:c(s),className:"space-y-5",children:[e.jsx("div",{className:u("grid w-full grid-cols-1 gap-[20px] md:grid-cols-2 lg:min-w-[1050px]",{"opacity-60":d}),children:e.jsx(N,{control:n,name:"aiTypes",render:({field:{onChange:i,value:t}})=>e.jsx(e.Fragment,{children:t1.map(({description:m,icon:o,name:g,key:h},y)=>e.jsxs("label",{className:u("flex items-center gap-2 rounded-md border pl-3 transition-all duration-150",{"border-primary-400 bg-primary-25 shadow-sm":l("aiTypes").includes(h),"border-theme-border-minimal bg-theme-surface-primary hover:border-theme-border-bold hover:shadow-sm":!l("aiTypes").includes(h)}),children:[e.jsx(j,{onCheckedChange:w=>{i(w?[...t,h]:t.filter(v=>v!==h))},value:h,className:"h-3 w-3"}),e.jsxs("div",{className:"flex w-full items-center gap-2 py-3 pr-3 hover:cursor-pointer",children:[o,e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold text-theme-text-primary",children:g}),e.jsx("div",{className:"text-text-sm text-theme-text-secondary",children:m})]})]})]},y))})})}),d&&e.jsxs("div",{ref:C,id:"biggest-challenge",className:"w-full space-y-5",children:[e.jsx("h2",{className:"text-center text-display-xs font-semibold",children:"What's your biggest challenge right now?"}),e.jsx("div",{className:"grid w-full grid-cols-1 gap-[20px] md:grid-cols-2",children:e.jsx(N,{control:n,name:"biggestChallenge",render:({field:{onChange:i,value:t}})=>e.jsx(e.Fragment,{children:r1.map(({name:m,key:o,icon:g},h)=>{var y,w;return e.jsxs("label",{className:u("flex items-center gap-2 rounded-md border pl-3 transition-all duration-150",{"border-primary-400 bg-primary-25 shadow-sm":(y=l("biggestChallenge"))==null?void 0:y.includes(o),"border-theme-border-minimal bg-theme-surface-primary hover:border-theme-border-bold hover:shadow-sm":!((w=l("biggestChallenge"))!=null&&w.includes(o))}),children:[e.jsx(j,{onCheckedChange:v=>{i(v?[...t??[],o]:t==null?void 0:t.filter(_=>_!==o))},value:o,className:"h-3 w-3"}),e.jsxs("div",{className:"flex w-full items-center gap-2 py-3 pr-3 hover:cursor-pointer",children:[g,e.jsx("div",{className:"font-semibold text-theme-text-primary",children:m})]})]},h)})})})})]}),e.jsx(f,{disabled:!x,type:"submit",className:"mx-auto w-full max-w-[520px] text-center",size:"md",children:e.jsx("span",{className:"w-full",children:"Continue"})})]})]})}const l1=s=>a.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{d:"M1.00003 21C1.00003 19.6774 0.988833 18.7943 1.21487 18.0488C1.69962 16.4508 2.95085 15.1996 4.54886 14.7148C5.29431 14.4888 6.17743 14.5 7.50003 14.5H10C10.5523 14.5 11 14.9477 11 15.5C11 16.0523 10.5523 16.5 10 16.5H7.50003C6.03171 16.5 5.519 16.5106 5.12894 16.6289C4.17025 16.9198 3.4198 17.6702 3.12894 18.6289C3.01061 19.019 3.00003 19.5317 3.00003 21C3.00003 21.5523 2.55231 22 2.00003 22C1.44775 22 1.00003 21.5523 1.00003 21ZM13.5 7.5C13.5 5.567 11.933 4 10 4C8.06703 4 6.50003 5.567 6.50003 7.5C6.50003 9.433 8.06703 11 10 11C11.933 11 13.5 9.433 13.5 7.5ZM15.5 7.5C15.5 10.5376 13.0376 13 10 13C6.96246 13 4.50003 10.5376 4.50003 7.5C4.50003 4.46243 6.96246 2 10 2C13.0376 2 15.5 4.46243 15.5 7.5Z"}),a.createElement("path",{d:"M18 12.25C18.2908 12.25 18.5552 12.4184 18.6787 12.6816L19.7442 14.9521L22.1143 15.3164C22.3919 15.3592 22.6219 15.5539 22.711 15.8203C22.8 16.0868 22.7334 16.381 22.5371 16.582L20.8008 18.3594L21.2119 20.8789C21.2582 21.1623 21.139 21.4479 20.9043 21.6133C20.6696 21.7786 20.3607 21.7951 20.1094 21.6562L18 20.4893L15.8907 21.6562C15.6393 21.7951 15.3305 21.7786 15.0957 21.6133C14.861 21.4479 14.7419 21.1623 14.7881 20.8789L15.1983 18.3594L13.4629 16.582C13.2667 16.381 13.2001 16.0868 13.2891 15.8203C13.3781 15.5539 13.6081 15.3592 13.8858 15.3164L16.2549 14.9521L17.3213 12.6816L17.3741 12.5869C17.5115 12.3786 17.7457 12.25 18 12.25ZM17.4434 15.9521C17.3372 16.1782 17.1248 16.3361 16.878 16.374L15.5557 16.5771L16.5371 17.582C16.7033 17.7523 16.7785 17.9917 16.7403 18.2266L16.5166 19.5957L17.6367 18.9766C17.8626 18.8517 18.1375 18.8517 18.3633 18.9766L19.4825 19.5957L19.2598 18.2266C19.2216 17.9917 19.2967 17.7523 19.4629 17.582L20.4434 16.5771L19.1221 16.374C18.8752 16.3361 18.6629 16.1782 18.5567 15.9521L18 14.7646L17.4434 15.9521Z"})),n1=s=>a.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{d:"M1.00003 20C1.00003 18.6774 0.988833 17.7943 1.21487 17.0488C1.69962 15.4508 2.95085 14.1996 4.54886 13.7148C5.29431 13.4888 6.17743 13.5 7.50003 13.5H10C10.5523 13.5 11 13.9477 11 14.5C11 15.0523 10.5523 15.5 10 15.5H7.50003C6.03171 15.5 5.519 15.5106 5.12894 15.6289C4.17025 15.9198 3.4198 16.6702 3.12894 17.6289C3.01061 18.019 3.00003 18.5317 3.00003 20C3.00003 20.5523 2.55231 21 2.00003 21C1.44775 21 1.00003 20.5523 1.00003 20ZM13.5 6.5C13.5 4.567 11.933 3 10 3C8.06703 3 6.50003 4.567 6.50003 6.5C6.50003 8.433 8.06703 10 10 10C11.933 10 13.5 8.433 13.5 6.5ZM15.5 6.5C15.5 9.53757 13.0376 12 10 12C6.96246 12 4.50003 9.53757 4.50003 6.5C4.50003 3.46243 6.96246 1 10 1C13.0376 1 15.5 3.46243 15.5 6.5Z"}),a.createElement("path",{d:"M19.5489 10.25C20.1638 10.2501 20.75 10.3831 21.2784 10.6221C21.5026 10.7236 21.6629 10.9287 21.7071 11.1709C21.7511 11.413 21.6731 11.6609 21.4991 11.835L19.7461 13.5879C19.7798 13.6222 19.8186 13.6614 19.8662 13.709L20.291 14.1338C20.3382 14.1809 20.3771 14.2195 20.4112 14.2529C20.4454 14.2194 20.4849 14.1812 20.5323 14.1338L22.1651 12.501L22.2334 12.4395C22.4008 12.3088 22.6174 12.2545 22.8291 12.293C23.0713 12.3371 23.2765 12.4975 23.378 12.7217C23.6169 13.25 23.75 13.8362 23.75 14.4512C23.75 16.7715 21.8691 18.6531 19.5489 18.6533C19.2061 18.6533 18.8713 18.6122 18.5508 18.5342C18.4432 18.508 18.3673 18.4895 18.3096 18.4766L18.3067 18.4805C18.2792 18.5074 18.2479 18.5392 18.208 18.5791L14.6133 22.1729C13.8438 22.9422 12.5966 22.9423 11.8272 22.1729C11.0578 21.4034 11.0578 20.1562 11.8272 19.3867L15.4209 15.792C15.4608 15.7521 15.4926 15.7208 15.5196 15.6934L15.5225 15.6895C15.5096 15.6319 15.4919 15.5561 15.4659 15.4492C15.3878 15.1288 15.3467 14.7939 15.3467 14.4512C15.347 12.1309 17.2285 10.25 19.5489 10.25ZM16.8467 14.4512C16.8467 14.6734 16.8739 14.8887 16.9239 15.0938C16.9566 15.228 16.9858 15.3513 17.0059 15.4512C17.0241 15.5416 17.0504 15.683 17.0401 15.834C17.0267 16.0293 16.9846 16.1787 16.8946 16.3525C16.7864 16.5613 16.5962 16.7388 16.4825 16.8525L12.8877 20.4473C12.7042 20.631 12.7041 20.9287 12.8877 21.1123C13.0714 21.2959 13.3691 21.2959 13.5528 21.1123L17.1475 17.5176C17.2612 17.4038 17.4387 17.2137 17.6475 17.1055L17.7744 17.0469C17.8989 16.9965 18.0196 16.97 18.166 16.96C18.3171 16.9496 18.4585 16.976 18.5489 16.9941C18.6488 17.0142 18.7721 17.0435 18.9063 17.0762C19.1114 17.1261 19.3267 17.1533 19.5489 17.1533C21.0108 17.1531 22.1979 15.9915 22.2451 14.541L21.5928 15.1943C21.4876 15.2995 21.3766 15.4103 21.2744 15.4971C21.1656 15.5894 21.0176 15.6976 20.8203 15.7617C20.5544 15.848 20.2679 15.8481 20.002 15.7617C19.8047 15.6976 19.6567 15.5895 19.5479 15.4971C19.4458 15.4104 19.3356 15.2994 19.2305 15.1943L18.8057 14.7695C18.7006 14.6645 18.5896 14.5542 18.503 14.4521C18.4106 14.3433 18.3024 14.1954 18.2383 13.998C18.152 13.7321 18.152 13.4456 18.2383 13.1797L18.294 13.04C18.3556 12.9103 18.4337 12.8071 18.503 12.7256C18.5897 12.6234 18.7005 12.5124 18.8057 12.4072L19.458 11.7539C18.008 11.8016 16.847 12.9896 16.8467 14.4512Z"})),i1=s=>a.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 4C10.067 4 8.50002 5.567 8.50002 7.5C8.50002 9.433 10.067 11 12 11C13.933 11 15.5 9.433 15.5 7.5C15.5 5.567 13.933 4 12 4ZM6.50002 7.5C6.50002 4.46243 8.96246 2 12 2C15.0376 2 17.5 4.46243 17.5 7.5C17.5 10.5376 15.0376 13 12 13C8.96246 13 6.50002 10.5376 6.50002 7.5ZM9.32629 14.5C9.38335 14.5 9.44125 14.5 9.50003 14.5H14.5C14.5588 14.5 14.6167 14.5 14.6738 14.5C15.901 14.4995 16.739 14.4992 17.4514 14.7153C19.0495 15.2 20.3 16.4506 20.7847 18.0486C21.0008 18.761 21.0005 19.599 21.0001 20.8263C21 20.8833 21 20.9412 21 21C21 21.5523 20.5523 22 20 22C19.4477 22 19 21.5523 19 21C19 19.5317 18.9892 19.0192 18.8708 18.6291C18.58 17.6703 17.8297 16.92 16.8709 16.6292C16.4808 16.5108 15.9683 16.5 14.5 16.5H9.50003C8.03171 16.5 7.51923 16.5108 7.12917 16.6292C6.17036 16.92 5.42005 17.6703 5.1292 18.6291C5.01088 19.0192 5.00002 19.5317 5.00002 21C5.00002 21.5523 4.55231 22 4.00002 22C3.44774 22 3.00002 21.5523 3.00002 21C3.00002 20.9412 3 20.8833 2.99998 20.8263C2.99953 19.599 2.99922 18.761 3.21532 18.0486C3.70007 16.4506 4.95059 15.2 6.54859 14.7153C7.261 14.4992 8.09902 14.4995 9.32629 14.5Z"})),b="shrink-0 size-5 fill-primary-400",o1=[{name:"ML Engineer / Data Scientist",icon:e.jsx(i1,{className:b})},{name:"Platform Engineer / MLOps Engineer",icon:e.jsx(n1,{className:b})},{name:"AI Engineer",icon:e.jsx(H,{className:b})},{name:"Engineering Lead / Tech Lead",icon:e.jsx(l1,{className:b})}];function S1({submitHandler:s,user:C}){var d,i;const{handleSubmit:l,register:c,watch:n,formState:{isValid:x}}=S({defaultValues:{primaryRole:(i=(d=C==null?void 0:C.metadata)==null?void 0:d.user_metadata)==null?void 0:i.primary_role},resolver:L(E),shouldUnregister:!0}),p=a.useRef(null);return a.useEffect(()=>{var t;n("primaryRole")==="other"&&((t=p.current)==null||t.focus())},[n("primaryRole")]),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"What is your primary role?"}),e.jsx("p",{className:"text-theme-text-secondary",children:"This helps us understand your perspective and needs"})]}),e.jsxs("form",{onSubmit:l(s),className:"w-full gap-[20px] space-y-5 lg:min-w-[700px]",children:[e.jsxs("ul",{className:"space-y-2",children:[o1.map(({icon:t,name:m},o)=>e.jsxs("label",{className:u("flex items-center gap-1 rounded-md border pl-3 transition-all duration-150",{"border-primary-400 bg-primary-25 shadow-sm":n("primaryRole")===m,"border-theme-border-minimal bg-theme-surface-primary hover:border-theme-border-bold hover:shadow-sm":n("primaryRole")!==m}),children:[e.jsx("input",{type:"radio",...c("primaryRole"),value:m,name:"primaryRole",className:"h-3 w-3 border !border-theme-border-bold text-theme-surface-primary focus:ring-2 focus:ring-theme-surface-strong"}),e.jsxs("div",{className:"flex w-full items-center gap-1 py-3 pr-3 text-theme-text-secondary hover:cursor-pointer",children:[t,m]})]},o)),e.jsxs("li",{className:u("flex items-center gap-1 rounded-md border bg-theme-surface-primary p-3 transition duration-150",{"border-primary-400":n("primaryRole")==="other","border-theme-border-minimal hover:border-theme-border-bold":n("primaryRole")!=="other"}),children:[e.jsx("input",{id:"other",type:"radio",...c("primaryRole"),value:"other",name:"primaryRole",className:"h-3 w-3 border !border-theme-border-bold text-theme-surface-primary focus:ring-2 focus:ring-theme-surface-strong"}),n("primaryRole")==="other"?e.jsx("input",{...c("otherVal"),ref:t=>{c("otherVal").ref(t),p.current=t},placeholder:"Specify...",className:"w-full border-none p-0 pr-2 placeholder:text-theme-text-tertiary focus:outline-none focus:ring-0"}):e.jsx("label",{className:"w-full text-theme-text-secondary hover:cursor-pointer",htmlFor:"other",children:"Other"})]})]}),e.jsx(f,{disabled:!x,className:"w-full text-center",size:"md",children:e.jsx("span",{className:"w-full",children:"Continue"})})]})]})}export{N1 as A,S1 as P,j1 as S,L1 as a};
|
zenml/zen_server/dashboard/assets/{resource-tyes-list-CugyWUAE.js → resource-tyes-list-C7I0VL8e.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
import{j as s}from"./@radix-B1sy0Lhr.js";import{T as i,c as o}from"./index-
|
1
|
+
import{j as s}from"./@radix-B1sy0Lhr.js";import{T as i,c as o}from"./index-Ci5z7q6x.js";function c({resourceTypes:m,className:t,size:r="sm",iconSize:a=20}){return s.jsx("div",{className:"flex flex-wrap gap-1",children:m.map(e=>s.jsxs(i,{size:r,rounded:!1,emphasis:"minimal",className:o("w-fit gap-0.5 text-theme-text-primary",t),color:"grey",children:[s.jsx("img",{width:a,height:a,className:"shrink-0 object-contain",src:e.logo_url??"",alt:`Logo of ${e.name}`}),s.jsx("p",{children:e.name})]},e.name))})}export{c as R};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as s}from"./@radix-B1sy0Lhr.js";import{R as e,U as n,V as l,W as t}from"./index-
|
1
|
+
import{j as s}from"./@radix-B1sy0Lhr.js";import{R as e,U as n,V as l,W as t}from"./index-Ci5z7q6x.js";function h({connectorType:o}){const r=o.logo_url,i=o.name;return s.jsx(e,{children:s.jsxs(n,{children:[s.jsx(l,{children:s.jsxs("div",{className:"size-5 shrink-0",children:[s.jsx("img",{width:24,height:24,className:"size-5 shrink-0",src:r??"",alt:`Logo of ${i}`}),s.jsx("p",{className:"sr-only",children:i})]})}),s.jsx(t,{children:i})]})})}function d({resourceType:o}){const r=o.logo_url,i=o.name;return s.jsx(e,{children:s.jsxs(n,{children:[s.jsx(l,{children:s.jsxs("div",{className:"size-5 shrink-0",children:[s.jsx("img",{width:24,height:24,className:"size-5 shrink-0",src:r??"",alt:`Logo of ${i}`}),s.jsx("p",{className:"sr-only",children:i})]})}),s.jsx(t,{children:i})]})})}export{h as C,d as R};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{q as y,c as w}from"./@tanstack-Dwlisomv.js";import{F as l,Z as f,x as u,_ as h,G as p,H as m,z as i,B as j,m as A}from"./index-
|
1
|
+
import{q as y,c as w}from"./@tanstack-Dwlisomv.js";import{F as l,Z as f,x as u,_ as h,G as p,H as m,z as i,B as j,m as A}from"./index-Ci5z7q6x.js";import{j as a,r as g}from"./@radix-B1sy0Lhr.js";import{C as x}from"./CodeSnippet-D7OZMz7I.js";import{I as v}from"./Infobox-CXOIY92f.js";import{T}from"./Tick-Bo7jwBjb.js";import{f as K}from"./@react-router-CHjLNlgw.js";async function b({params:e}){const r=l(m.serviceAccounts.all)+"?"+f(e),s=await u(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&h(),!s.ok){const t=await s.json().then(n=>Array.isArray(n.detail)?n.detail[1]:n.detail).catch(()=>"Failed to fetch service accounts");throw new p({status:s.status,statusText:s.statusText,message:t})}return s.json()}async function k({serviceAccountId:e}){const r=l(m.serviceAccounts.detail(e)),s=await u(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&h(),!s.ok){const t=await s.json().then(n=>Array.isArray(n.detail)?n.detail[1]:n.detail).catch(()=>`Failed to fetch service account ${e}`);throw new p({status:s.status,statusText:s.statusText,message:t})}return s.json()}async function N({serviceAccountId:e,params:r}){const s=l(m.serviceAccounts.apiKeys.all(e))+"?"+f(r),t=await u(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&h(),!t.ok){const n=await t.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Failed to list of api keys");throw new p({status:t.status,statusText:t.statusText,message:n})}return t.json()}async function S({serviceAccountId:e,apiKeyId:r}){const s=l(m.serviceAccounts.apiKeys.detail(e,r)),t=await u(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&h(),!t.ok){const n=await t.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>`Failed to fetch api key ${r}`);throw new p({status:t.status,statusText:t.statusText,message:n})}return t.json()}const $={serviceAccountList:e=>y({queryKey:[...c.serviceAccountsKey(),e],queryFn:async()=>b({params:e})}),serviceAccountDetail:e=>y({queryKey:[...c.serviceAccountsKey(),e],queryFn:async()=>k({serviceAccountId:e})}),serviceAccountApiKeys:(e,r)=>y({queryKey:[...c.apiKeysKey(e),r],queryFn:async()=>N({serviceAccountId:e,params:r})}),ApiKeysDetail:(e,r)=>y({queryKey:[...c.apiKeysKey(e),r],queryFn:async()=>S({serviceAccountId:e,apiKeyId:r})})},c={serviceAccountsKey:()=>["service_accounts"],apiKeysKey:e=>[...c.serviceAccountsKey(),e,"api_keys"]};async function C({body:e,serviceAccountId:r}){const s=l(m.serviceAccounts.apiKeys.all(r)),t=await u(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Failed to create service account");throw new p({status:t.status,statusText:t.statusText,message:n})}return t.json()}function I(e){return w({...e,mutationFn:async({serviceAccountId:r,body:s})=>C({body:s,serviceAccountId:r})})}const F=i.object({name:i.string().min(1,"Service Account Name is required"),description:i.string()}),R=F.extend({createDefault:i.boolean()});function Z({value:e}){return a.jsxs("div",{className:"space-y-3 overflow-x-hidden px-7 py-5 text-text-md text-theme-text-primary",children:[a.jsxs("div",{className:"space-y-0.5",children:[a.jsx("p",{className:"text-text-md font-semibold text-theme-text-primary",children:"Here is your new API Key"}),a.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Your key was created successfully"})]}),a.jsx(P,{}),a.jsx(E,{value:e}),a.jsx("div",{className:"h-[1px] bg-theme-border-moderate","aria-hidden":"true"}),a.jsxs("div",{className:"space-y-3 pt-5",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("p",{className:"text-text-md font-semibold text-theme-text-primary",children:"Using your API Key"}),a.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/project-setup-and-management/connecting-to-zenml/connect-with-a-service-account",className:"link text-text-sm text-primary-400",children:"Learn More"})]}),a.jsx("p",{className:"text-theme-text-secondary",children:"To log in to the ZenML server using the generated key, you can run the following CLI command and enter the API key when prompted:"}),a.jsx(x,{highlightCode:!0,wrap:!0,code:`zenml login --api-key ${window.location.origin}`}),a.jsx("p",{className:"text-theme-text-secondary",children:"Alternatively, you can set the following environment variables to configure workloads where CLI interaction is not possible:"}),a.jsx(x,{highlightCode:!0,wrap:!0,code:`ZENML_STORE_URL: ${window.location.origin}
|
2
2
|
ZENML_STORE_API_KEY: ${e}`})]})]})}function E({value:e}){const[r,s]=g.useState(!1);function t(n){navigator.clipboard&&(navigator.clipboard.writeText(n),s(!0),setTimeout(()=>{s(!1)},2e3))}return a.jsxs("section",{className:"flex w-full items-center justify-between gap-5 overflow-hidden py-5 text-text-md",children:[a.jsx("code",{className:"w-[3/4] min-w-0 flex-1 overflow-x-auto font-sans text-display-xs",children:e}),r?a.jsxs(a.Fragment,{children:[a.jsx(T,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"}),a.jsx("p",{className:"sr-only",children:"copied successfully"})]}):a.jsxs(j,{intent:"secondary",emphasis:"subtle",onClick:()=>t(e),size:"md",children:[a.jsx(A,{className:"h-4 w-4 shrink-0 fill-theme-text-primary"}),a.jsx("p",{children:"Copy"})]})]})}function P(){return a.jsx(v,{children:"Important: This key is your authentication for API access and will not be shown again. Please copy it and store it securely."})}const d=1,D=i.object({page:i.coerce.number().min(d).optional().default(d).catch(d),name:i.string().optional(),operator:i.enum(["and","or"]).optional()});function B(){const[e]=K(),{page:r,name:s,operator:t}=D.parse({page:e.get("page")||void 0,name:e.get("name")||void 0,operator:e.get("operator")||void 0});return{page:r,name:s,logical_operator:t}}export{Z as A,B as a,$ as b,R as c,F as d,c as s,I as u};
|