zenml-nightly 0.80.1.dev20250407__py3-none-any.whl → 0.80.1.dev20250409__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/base.py +1 -1
- zenml/cli/integration.py +36 -0
- zenml/client.py +6 -0
- zenml/config/step_configurations.py +3 -2
- zenml/constants.py +1 -1
- zenml/entrypoints/step_entrypoint_configuration.py +2 -0
- zenml/integrations/airflow/orchestrators/airflow_orchestrator.py +7 -2
- zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +2 -0
- zenml/integrations/azure/orchestrators/azureml_orchestrator.py +2 -0
- zenml/integrations/databricks/orchestrators/databricks_orchestrator.py +3 -1
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +2 -0
- zenml/integrations/hyperai/orchestrators/hyperai_orchestrator.py +3 -1
- zenml/integrations/kubeflow/orchestrators/kubeflow_orchestrator.py +3 -1
- zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +12 -0
- zenml/integrations/kubernetes/orchestrators/kube_utils.py +3 -0
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +4 -1
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +164 -19
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint_configuration.py +8 -1
- zenml/integrations/lightning/orchestrators/lightning_orchestrator.py +3 -1
- zenml/integrations/mlflow/__init__.py +0 -27
- zenml/integrations/mlflow/services/mlflow_deployment.py +25 -7
- zenml/integrations/pandas/materializers/pandas_materializer.py +41 -2
- zenml/integrations/seldon/services/seldon_deployment.py +1 -1
- zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +3 -1
- zenml/integrations/tekton/orchestrators/tekton_orchestrator.py +3 -1
- zenml/integrations/vllm/services/vllm_deployment.py +1 -1
- zenml/model/model.py +3 -1
- zenml/models/__init__.py +5 -0
- zenml/models/v2/core/run_template.py +32 -1
- zenml/orchestrators/base_orchestrator.py +3 -0
- zenml/orchestrators/dag_runner.py +48 -15
- zenml/orchestrators/local/local_orchestrator.py +3 -1
- zenml/orchestrators/local_docker/local_docker_orchestrator.py +3 -1
- zenml/steps/base_step.py +11 -8
- zenml/utils/secret_utils.py +2 -2
- zenml/zen_server/dashboard/assets/{404-2I8egBQu.js → 404-CYPi9d8E.js} +1 -1
- zenml/zen_server/dashboard/assets/@radix-C7hRs6Kx.js +95 -0
- zenml/zen_server/dashboard/assets/{@react-router-BUo5vhN4.js → @react-router-BGgzhn5D.js} +5 -5
- zenml/zen_server/dashboard/assets/@reactflow-CQi1Z1Wq.js +17 -0
- zenml/zen_server/dashboard/assets/@tanstack-CSxjHCME.js +22 -0
- zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-D7KZcPFw.js → AlertDialogDropdownItem-Dn8bgaXG.js} +1 -1
- zenml/zen_server/dashboard/assets/{CodeSnippet-DUkCnBpQ.js → CodeSnippet-CSINAl3I.js} +1 -1
- zenml/zen_server/dashboard/assets/{CollapsibleCard-B5-5Plnd.js → CollapsibleCard-CQOb53t9.js} +1 -1
- zenml/zen_server/dashboard/assets/{Commands-CbOMmarC.js → Commands-CPleXvse.js} +1 -1
- zenml/zen_server/dashboard/assets/{ComponentBadge-FrujKBC6.js → ComponentBadge-CIFj0W7T.js} +1 -1
- zenml/zen_server/dashboard/assets/{ComponentIcon-Dx5fBrDX.js → ComponentIcon-D3JHFhJU.js} +1 -1
- zenml/zen_server/dashboard/assets/{CsvVizualization-B8E3p9we.js → CsvVizualization-Cklc1Vb5.js} +6 -6
- zenml/zen_server/dashboard/assets/{DeleteAlertDialog-BgTZbbAt.js → DeleteAlertDialog-Bzq-uSd7.js} +1 -1
- zenml/zen_server/dashboard/assets/{DialogItem-CNWLiJcc.js → DialogItem-zjMgCmCl.js} +1 -1
- zenml/zen_server/dashboard/assets/{DisplayDate-C5Aw-Yca.js → DisplayDate-CYVBBSgr.js} +1 -1
- zenml/zen_server/dashboard/assets/{EmptyState-DpbfQBDE.js → EmptyState-M1jafpg6.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-BkUP4Luv.js → Error-kdeNHm_o.js} +1 -1
- zenml/zen_server/dashboard/assets/{ExecutionStatus-CD8Vj7sp.js → ExecutionStatus-UE6Rbmtk.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-DIx6mDOH.js → Helpbox-CeM-FPQl.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-BHEdNmME.js → Infobox-CD0fDbYF.js} +1 -1
- zenml/zen_server/dashboard/assets/{InlineAvatar-Bin9UPKJ.js → InlineAvatar-CrHWwlf4.js} +1 -1
- zenml/zen_server/dashboard/assets/{Lock-tO9Z41I9.js → Lock-DW-0_M0o.js} +1 -1
- zenml/zen_server/dashboard/assets/{MarkdownVisualization-C3JLiPCY.js → MarkdownVisualization-URCyUPcZ.js} +2 -2
- zenml/zen_server/dashboard/assets/{NestedCollapsible-Da-k0Mff.js → NestedCollapsible-DfTTGG8u.js} +1 -1
- zenml/zen_server/dashboard/assets/{NumberBox-BvBJYxCu.js → NumberBox-D2A7ENHb.js} +1 -1
- zenml/zen_server/dashboard/assets/Partials-DggkUpWp.js +1 -0
- zenml/zen_server/dashboard/assets/{PasswordChecker-B4Uw6BJZ.js → PasswordChecker-lYTOtNom.js} +1 -1
- zenml/zen_server/dashboard/assets/ProBadge-BCdprj69.js +1 -0
- zenml/zen_server/dashboard/assets/{ProCta-7_FtpX3I.js → ProCta-szzPO0Y7.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderIcon-CxeziA5a.js → ProviderIcon-MdqWDO6-.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderRadio-DPmZHff_.js → ProviderRadio-B4CB4vzP.js} +1 -1
- zenml/zen_server/dashboard/assets/{RunSelector-BVKB4Z8F.js → RunSelector-Bhb83FyB.js} +1 -1
- zenml/zen_server/dashboard/assets/{RunsBody-Cj4sIqQB.js → RunsBody-Csn2VEOE.js} +1 -1
- zenml/zen_server/dashboard/assets/{SearchField-DjAOZic5.js → SearchField-Cce00eQL.js} +1 -1
- zenml/zen_server/dashboard/assets/{SecretTooltip-mMAAP4dM.js → SecretTooltip-DaDLBVj-.js} +1 -1
- zenml/zen_server/dashboard/assets/{SetPassword-B0o5kSJU.js → SetPassword-tX6fom1Y.js} +1 -1
- zenml/zen_server/dashboard/assets/{StackList-5UB8LoEq.js → StackList-CQt1xGRh.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tabs-AuhCyzle.js → Tabs-CCQyIqRb.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tick-CHW0jc8Y.js → Tick-D63_jhf1.js} +1 -1
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-Bauivjf-.js → UpdatePasswordSchemas-CbbvoGYV.js} +1 -1
- zenml/zen_server/dashboard/assets/{UsageReason-Dr5ca5M4.js → UsageReason-C2cNrUeS.js} +1 -1
- zenml/zen_server/dashboard/assets/{Wizard-XEp9rGmf.js → Wizard-BVkN2a2x.js} +1 -1
- zenml/zen_server/dashboard/assets/WizardFooter-Bk7gIKiS.js +1 -0
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-COvsm3bC.js → all-pipeline-runs-query-BLclwQSi.js} +1 -1
- zenml/zen_server/dashboard/assets/{arrow-left-B2hyhFky.js → arrow-left-CwgF2MEM.js} +1 -1
- zenml/zen_server/dashboard/assets/{check-DZ0KAh3W.js → check-DK77doTf.js} +1 -1
- zenml/zen_server/dashboard/assets/{check-circle-DyCCYTA0.js → check-circle-mvyzYvIW.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-down-A3PXOshS.js → chevron-down-A-rmltmI.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-right-double-zKz7rAaU.js → chevron-right-double-uNWbJT-C.js} +1 -1
- zenml/zen_server/dashboard/assets/{clock-k5T5tYrt.js → clock-CPA5cYxq.js} +1 -1
- zenml/zen_server/dashboard/assets/{code-browser-DvB0W2Ix.js → code-browser-j2EpcxIA.js} +1 -1
- zenml/zen_server/dashboard/assets/{configuration-form-BJUCr0wl.js → configuration-form-CjrAp0GS.js} +1 -1
- zenml/zen_server/dashboard/assets/{create-stack-B2c98UlP.js → create-stack-Bd2JdQer.js} +1 -1
- zenml/zen_server/dashboard/assets/delete-run-Cwpxu1-d.js +1 -0
- zenml/zen_server/dashboard/assets/{docker-B3Sqzd8J.js → docker-BuDBFEDL.js} +1 -1
- zenml/zen_server/dashboard/assets/{file-text-CgxVzNph.js → file-text-BdxZdjP_.js} +1 -1
- zenml/zen_server/dashboard/assets/{flavor-select-D8CranSY.js → flavor-select-c0w-6o9w.js} +1 -1
- zenml/zen_server/dashboard/assets/{form-schemas-Bm-dTV3L.js → form-schemas-B5Ax1SZf.js} +1 -1
- zenml/zen_server/dashboard/assets/{gcp-0u4le6mC.js → gcp-CHNvgEss.js} +1 -1
- zenml/zen_server/dashboard/assets/{help-CfT0tY2I.js → help-DyMolRxD.js} +1 -1
- zenml/zen_server/dashboard/assets/index-BW-KaQ2p.js +1 -0
- zenml/zen_server/dashboard/assets/{index-DPjvk73v.js → index-Be2jLIYM.js} +8 -8
- zenml/zen_server/dashboard/assets/{index-D-n6tspq.js → index-CjdtNrfJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-BVVKxTWC.js → index-DR30v9MZ.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-CzhJC6pc.js → index-d_40qKeY.js} +1 -1
- zenml/zen_server/dashboard/assets/index.esm-D7jFlf5N.js +1 -0
- zenml/zen_server/dashboard/assets/{key-icon-CjwWwoOU.js → key-icon-DO4DPJHZ.js} +1 -1
- zenml/zen_server/dashboard/assets/{kubernetes-eA-Y6gE7.js → kubernetes-D6OUjwSK.js} +1 -1
- zenml/zen_server/dashboard/assets/{layout-3_rgDUxf.js → layout-h3cbx8WZ.js} +1 -1
- zenml/zen_server/dashboard/assets/{link-external-BYm_zH_8.js → link-external-DUhCSKNm.js} +1 -1
- zenml/zen_server/dashboard/assets/{login-mutation-D6uiKsKk.js → login-mutation-DOajKct8.js} +1 -1
- zenml/zen_server/dashboard/assets/{logs-D6_diV2k.js → logs-B5n0U7tB.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-DFrksY0r.js → not-found-DolTp0dr.js} +1 -1
- zenml/zen_server/dashboard/assets/{package-BOms6B-A.js → package-D1Mhqeh8.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DBNBYSwq.js → page-48DMcIQw.js} +2 -2
- zenml/zen_server/dashboard/assets/{page-DOzFoJuo.js → page-B32kCGPe.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BAjhc2bs.js +1 -0
- zenml/zen_server/dashboard/assets/{page-D5GZlpKq.js → page-BBNrvxC1.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DF9q7ySu.js → page-BEAx6ZvH.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DDvwWgKP.js → page-BRfeowe0.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BJ15SGwt.js → page-BbRtQC2E.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-D2F0Rvak.js → page-BgUR_5z3.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-D0Zt2-7X.js → page-BiAjLLww.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B80TE04v.js → page-BkPPfNfG.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DkJfgcDi.js → page-BmTf1Lf1.js} +2 -2
- zenml/zen_server/dashboard/assets/{page-CAKBSE9f.js → page-BuZC8z6N.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BwAFqFCf.js → page-C4zMMcaH.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BnUwQBeg.js → page-CKVbEdX2.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BXh1mF-D.js → page-CPRymOIS.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BMZaECzB.js → page-CaTJVICi.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-NIWnUdVg.js → page-CmzmFF4S.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BIseZTJt.js → page-CwAbTnvK.js} +2 -2
- zenml/zen_server/dashboard/assets/{page-BeFiRx31.js → page-D-MjLTXS.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B1Un9vAU.js → page-D3m9-YWJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DhNnHHmX.js → page-DCpZju6a.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DEUeF3mO.js +1 -0
- zenml/zen_server/dashboard/assets/{page-B150LbzG.js → page-DWOAh8Pp.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-EhqRFAZc.js → page-DezabeEO.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BTvnIFGR.js → page-DivlNKt9.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BqQ6y8Hb.js → page-DmOcZO8U.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DnY59jOg.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DaHH2ZEF.js → page-Dv3qtvm8.js} +1 -1
- zenml/zen_server/dashboard/assets/page-P81CcE2L.js +1 -0
- zenml/zen_server/dashboard/assets/{page-Dd-0y3SU.js → page-a1c6o4vv.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BJrZsPSh.js → page-bS5tHLDW.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-C11vPVkH.js → page-gRfUvR0E.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BZUxCBoD.js → page-hNHJPQtK.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-kYlFrH53.js → page-ir7Scz2Y.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-ygCPGHAV.js → page-mtwS5oci.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-DHGuHP2H.js → persist-BUqILw7G.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-C5RlwSq6.js → persist-BbdfLc0W.js} +1 -1
- zenml/zen_server/dashboard/assets/{plus-CoKtHiA9.js → plus-COjQg3AG.js} +1 -1
- zenml/zen_server/dashboard/assets/{react-error-boundary.esm-BkGIR1Du.js → react-error-boundary.esm-fyoUBS25.js} +1 -1
- zenml/zen_server/dashboard/assets/{refresh-CupyU1Vs.js → refresh-CM5T3QeU.js} +1 -1
- zenml/zen_server/dashboard/assets/{rocket-k68ONPDS.js → rocket-Cf-B-XOR.js} +1 -1
- zenml/zen_server/dashboard/assets/{service-Do7yitqe.js → service-CV2zjc-p.js} +1 -1
- zenml/zen_server/dashboard/assets/{sharedSchema-i_9Y4WcA.js → sharedSchema-DpGc9kQg.js} +1 -1
- zenml/zen_server/dashboard/assets/stack-detail-query-BpzLZjvw.js +1 -0
- zenml/zen_server/dashboard/assets/{terminal-square-URAPn9DB.js → terminal-square-DMtel8mb.js} +1 -1
- zenml/zen_server/dashboard/assets/{tick-circle-AaVBszPn.js → tick-circle-m94Aa6Zt.js} +1 -1
- zenml/zen_server/dashboard/assets/{trash-B_JgTgqd.js → trash-BWSZ7NRK.js} +1 -1
- zenml/zen_server/dashboard/assets/update-server-settings-mutation-Dv6qHtK9.js +1 -0
- zenml/zen_server/dashboard/assets/{zod-CRNUMWWg.js → zod-C0xYeTvL.js} +1 -1
- zenml/zen_server/dashboard/index.html +6 -6
- zenml/zen_server/template_execution/utils.py +53 -33
- zenml/zen_stores/migrations/versions/6611d4bcc95b_add_hidden_option_for_templates.py +47 -0
- zenml/zen_stores/schemas/run_template_schemas.py +7 -0
- {zenml_nightly-0.80.1.dev20250407.dist-info → zenml_nightly-0.80.1.dev20250409.dist-info}/METADATA +2 -2
- {zenml_nightly-0.80.1.dev20250407.dist-info → zenml_nightly-0.80.1.dev20250409.dist-info}/RECORD +168 -167
- zenml/zen_server/dashboard/assets/@radix-AvWw-1nd.js +0 -95
- zenml/zen_server/dashboard/assets/@reactflow-BHoFKFSZ.js +0 -17
- zenml/zen_server/dashboard/assets/@tanstack-CcI3lvwB.js +0 -22
- zenml/zen_server/dashboard/assets/Partials-TNaYjHsV.js +0 -1
- zenml/zen_server/dashboard/assets/ProBadge-BfPp-B97.js +0 -1
- zenml/zen_server/dashboard/assets/WizardFooter-BtL1Gi1k.js +0 -1
- zenml/zen_server/dashboard/assets/delete-run-Do3XyF4W.js +0 -1
- zenml/zen_server/dashboard/assets/index-eIIP-0dQ.js +0 -1
- zenml/zen_server/dashboard/assets/index.esm-cf-8NBxV.js +0 -1
- zenml/zen_server/dashboard/assets/page-B-uHUFcm.js +0 -1
- zenml/zen_server/dashboard/assets/page-B0Llmzo_.js +0 -1
- zenml/zen_server/dashboard/assets/page-BzlVs5tC.js +0 -1
- zenml/zen_server/dashboard/assets/page-CPe9nQSo.js +0 -1
- zenml/zen_server/dashboard/assets/stack-detail-query-omCumL7U.js +0 -1
- zenml/zen_server/dashboard/assets/update-server-settings-mutation-B4eE33z-.js +0 -1
- {zenml_nightly-0.80.1.dev20250407.dist-info → zenml_nightly-0.80.1.dev20250409.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.80.1.dev20250407.dist-info → zenml_nightly-0.80.1.dev20250409.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.80.1.dev20250407.dist-info → zenml_nightly-0.80.1.dev20250409.dist-info}/entry_points.txt +0 -0
@@ -1,22 +0,0 @@
|
|
1
|
-
var Bt=e=>{throw TypeError(e)};var at=(e,t,n)=>t.has(e)||Bt("Cannot "+n);var u=(e,t,n)=>(at(e,t,"read from private field"),n?n.call(e):t.get(e)),R=(e,t,n)=>t.has(e)?Bt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),v=(e,t,n,i)=>(at(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),P=(e,t,n)=>(at(e,t,"access private method"),n);var Ye=(e,t,n,i)=>({set _(r){v(e,t,r,n)},get _(){return u(e,t,i)}});import{r as E,j as bn}from"./@radix-AvWw-1nd.js";var Qe=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Me=typeof window>"u"||"Deno"in globalThis;function U(){}function zn(e,t){return typeof e=="function"?e(t):e}function St(e){return typeof e=="number"&&e>=0&&e!==1/0}function hn(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $e(e,t){return typeof e=="function"?e(t):e}function K(e,t){return typeof e=="function"?e(t):e}function Nt(e,t){const{type:n="all",exact:i,fetchStatus:r,predicate:s,queryKey:o,stale:l}=e;if(o){if(i){if(t.queryHash!==bt(o,t.options))return!1}else if(!Be(t.queryKey,o))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||r&&r!==t.state.fetchStatus||s&&!s(t))}function Kt(e,t){const{exact:n,status:i,predicate:r,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(xe(t.options.mutationKey)!==xe(s))return!1}else if(!Be(t.options.mutationKey,s))return!1}return!(i&&t.state.status!==i||r&&!r(t))}function bt(e,t){return((t==null?void 0:t.queryKeyHashFn)||xe)(e)}function xe(e){return JSON.stringify(e,(t,n)=>Ct(n)?Object.keys(n).sort().reduce((i,r)=>(i[r]=n[r],i),{}):n)}function Be(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Be(e[n],t[n])):!1}function zt(e,t){if(e===t)return e;const n=Xt(e)&&Xt(t);if(n||Ct(e)&&Ct(t)){const i=n?e:Object.keys(e),r=i.length,s=n?t:Object.keys(t),o=s.length,l=n?[]:{};let a=0;for(let d=0;d<o;d++){const f=n?d:s[d];(!n&&i.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(l[f]=void 0,a++):(l[f]=zt(e[f],t[f]),l[f]===e[f]&&e[f]!==void 0&&a++)}return r===o&&a===r?e:l}return t}function rt(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Xt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ct(e){if(!Wt(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Wt(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Wt(e){return Object.prototype.toString.call(e)==="[object Object]"}function Tn(e){return new Promise(t=>{setTimeout(t,e)})}function Rt(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?zt(e,t):t}function qn(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function Qn(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var Tt=Symbol();function pn(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Tt?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ce,le,Ie,rn,jn=(rn=class extends Qe{constructor(){super();R(this,Ce);R(this,le);R(this,Ie);v(this,Ie,t=>{if(!Me&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){u(this,le)||this.setEventListener(u(this,Ie))}onUnsubscribe(){var t;this.hasListeners()||((t=u(this,le))==null||t.call(this),v(this,le,void 0))}setEventListener(t){var n;v(this,Ie,t),(n=u(this,le))==null||n.call(this),v(this,le,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){u(this,Ce)!==t&&(v(this,Ce,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof u(this,Ce)=="boolean"?u(this,Ce):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ce=new WeakMap,le=new WeakMap,Ie=new WeakMap,rn),qt=new jn,Ee,ae,Oe,sn,kn=(sn=class extends Qe{constructor(){super();R(this,Ee,!0);R(this,ae);R(this,Oe);v(this,Oe,t=>{if(!Me&&window.addEventListener){const n=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){u(this,ae)||this.setEventListener(u(this,Oe))}onUnsubscribe(){var t;this.hasListeners()||((t=u(this,ae))==null||t.call(this),v(this,ae,void 0))}setEventListener(t){var n;v(this,Oe,t),(n=u(this,ae))==null||n.call(this),v(this,ae,t(this.setOnline.bind(this)))}setOnline(t){u(this,Ee)!==t&&(v(this,Ee,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return u(this,Ee)}},Ee=new WeakMap,ae=new WeakMap,Oe=new WeakMap,sn),st=new kn;function yt(){let e,t;const n=new Promise((r,s)=>{e=r,t=s});n.status="pending",n.catch(()=>{});function i(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{i({status:"fulfilled",value:r}),e(r)},n.reject=r=>{i({status:"rejected",reason:r}),t(r)},n}function Un(e){return Math.min(1e3*2**e,3e4)}function mn(e){return(e??"online")==="online"?st.isOnline():!0}var vn=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ct(e){return e instanceof vn}function Sn(e){let t=!1,n=0,i=!1,r;const s=yt(),o=p=>{var S;i||(h(new vn(p)),(S=e.abort)==null||S.call(e))},l=()=>{t=!0},a=()=>{t=!1},d=()=>qt.isFocused()&&(e.networkMode==="always"||st.isOnline())&&e.canRun(),f=()=>mn(e.networkMode)&&e.canRun(),g=p=>{var S;i||(i=!0,(S=e.onSuccess)==null||S.call(e,p),r==null||r(),s.resolve(p))},h=p=>{var S;i||(i=!0,(S=e.onError)==null||S.call(e,p),r==null||r(),s.reject(p))},c=()=>new Promise(p=>{var S;r=C=>{(i||d())&&p(C)},(S=e.onPause)==null||S.call(e)}).then(()=>{var p;r=void 0,i||(p=e.onContinue)==null||p.call(e)}),m=()=>{if(i)return;let p;const S=n===0?e.initialPromise:void 0;try{p=S??e.fn()}catch(C){p=Promise.reject(C)}Promise.resolve(p).then(g).catch(C=>{var b;if(i)return;const M=e.retry??(Me?0:3),F=e.retryDelay??Un,$=typeof F=="function"?F(n,C):F,D=M===!0||typeof M=="number"&&n<M||typeof M=="function"&&M(n,C);if(t||!D){h(C);return}n++,(b=e.onFail)==null||b.call(e,n,C),Tn($).then(()=>d()?void 0:c()).then(()=>{t?h(C):m()})})};return{promise:s,cancel:o,continue:()=>(r==null||r(),s),cancelRetry:l,continueRetry:a,canStart:f,start:()=>(f()?m():c().then(m),s)}}function Bn(){let e=[],t=0,n=l=>{l()},i=l=>{l()},r=l=>setTimeout(l,0);const s=l=>{t?e.push(l):r(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&r(()=>{i(()=>{l.forEach(a=>{n(a)})})})};return{batch:l=>{let a;t++;try{a=l()}finally{t--,t||o()}return a},batchCalls:l=>(...a)=>{s(()=>{l(...a)})},schedule:s,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{i=l},setScheduler:l=>{r=l}}}var A=Bn(),Re,on,Cn=(on=class{constructor(){R(this,Re)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),St(this.gcTime)&&v(this,Re,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Me?1/0:5*60*1e3))}clearGcTimeout(){u(this,Re)&&(clearTimeout(u(this,Re)),v(this,Re,void 0))}},Re=new WeakMap,on),Ve,De,k,G,Ne,ye,B,te,un,Nn=(un=class extends Cn{constructor(t){super();R(this,B);R(this,Ve);R(this,De);R(this,k);R(this,G);R(this,Ne);R(this,ye);v(this,ye,!1),v(this,Ne,t.defaultOptions),this.setOptions(t.options),this.observers=[],v(this,k,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,v(this,Ve,Kn(this.options)),this.state=t.state??u(this,Ve),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=u(this,G))==null?void 0:t.promise}setOptions(t){this.options={...u(this,Ne),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&u(this,k).remove(this)}setData(t,n){const i=Rt(this.state.data,t,this.options);return P(this,B,te).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(t,n){P(this,B,te).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var i,r;const n=(i=u(this,G))==null?void 0:i.promise;return(r=u(this,G))==null||r.cancel(t),n?n.then(U).catch(U):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(u(this,Ve))}isActive(){return this.observers.some(t=>K(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tt||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!hn(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=u(this,G))==null||n.continue()}onOnline(){var n;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=u(this,G))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),u(this,k).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(u(this,G)&&(u(this,ye)?u(this,G).cancel({revert:!0}):u(this,G).cancelRetry()),this.scheduleGc()),u(this,k).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||P(this,B,te).call(this,{type:"invalidate"})}fetch(t,n){var a,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(u(this,G))return u(this,G).continueRetry(),u(this,G).promise}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(h=>h.options.queryFn);g&&this.setOptions(g.options)}const i=new AbortController,r=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(v(this,ye,!0),i.signal)})},s=()=>{const g=pn(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return r(h),v(this,ye,!1),this.options.persister?this.options.persister(g,h,this):g(h)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};r(o),(a=this.options.behavior)==null||a.onFetch(o,this),v(this,De,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=o.fetchOptions)==null?void 0:d.meta))&&P(this,B,te).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const l=g=>{var h,c,m,p;ct(g)&&g.silent||P(this,B,te).call(this,{type:"error",error:g}),ct(g)||((c=(h=u(this,k).config).onError)==null||c.call(h,g,this),(p=(m=u(this,k).config).onSettled)==null||p.call(m,this.state.data,g,this)),this.scheduleGc()};return v(this,G,Sn({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:i.abort.bind(i),onSuccess:g=>{var h,c,m,p;if(g===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(g)}catch(S){l(S);return}(c=(h=u(this,k).config).onSuccess)==null||c.call(h,g,this),(p=(m=u(this,k).config).onSettled)==null||p.call(m,g,this.state.error,this),this.scheduleGc()},onError:l,onFail:(g,h)=>{P(this,B,te).call(this,{type:"failed",failureCount:g,error:h})},onPause:()=>{P(this,B,te).call(this,{type:"pause"})},onContinue:()=>{P(this,B,te).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),u(this,G).start()}},Ve=new WeakMap,De=new WeakMap,k=new WeakMap,G=new WeakMap,Ne=new WeakMap,ye=new WeakMap,B=new WeakSet,te=function(t){const n=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Rn(i.data,this.options),fetchMeta:t.meta??null};case"success":return{...i,data:t.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=t.error;return ct(r)&&r.revert&&u(this,De)?{...u(this,De),fetchStatus:"idle"}:{...i,error:r,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=n(this.state),A.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),u(this,k).notify({query:this,type:"updated",action:t})})},un);function Rn(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mn(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Kn(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var W,ln,Xn=(ln=class extends Qe{constructor(t={}){super();R(this,W);this.config=t,v(this,W,new Map)}build(t,n,i){const r=n.queryKey,s=n.queryHash??bt(r,n);let o=this.get(s);return o||(o=new Nn({cache:this,queryKey:r,queryHash:s,options:t.defaultQueryOptions(n),state:i,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){u(this,W).has(t.queryHash)||(u(this,W).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=u(this,W).get(t.queryHash);n&&(t.destroy(),n===t&&u(this,W).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){A.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return u(this,W).get(t)}getAll(){return[...u(this,W).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(i=>Nt(n,i))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(i=>Nt(t,i)):n}notify(t){A.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){A.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){A.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},W=new WeakMap,ln),J,z,we,Y,ue,an,Wn=(an=class extends Cn{constructor(t){super();R(this,Y);R(this,J);R(this,z);R(this,we);this.mutationId=t.mutationId,v(this,z,t.mutationCache),v(this,J,[]),this.state=t.state||yn(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){u(this,J).includes(t)||(u(this,J).push(t),this.clearGcTimeout(),u(this,z).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){v(this,J,u(this,J).filter(n=>n!==t)),this.scheduleGc(),u(this,z).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){u(this,J).length||(this.state.status==="pending"?this.scheduleGc():u(this,z).remove(this))}continue(){var t;return((t=u(this,we))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var r,s,o,l,a,d,f,g,h,c,m,p,S,C,M,F,$,D,b,H;v(this,we,Sn({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(O,I)=>{P(this,Y,ue).call(this,{type:"failed",failureCount:O,error:I})},onPause:()=>{P(this,Y,ue).call(this,{type:"pause"})},onContinue:()=>{P(this,Y,ue).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>u(this,z).canRun(this)}));const n=this.state.status==="pending",i=!u(this,we).canStart();try{if(!n){P(this,Y,ue).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(r=u(this,z).config).onMutate)==null?void 0:s.call(r,t,this));const I=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));I!==this.state.context&&P(this,Y,ue).call(this,{type:"pending",context:I,variables:t,isPaused:i})}const O=await u(this,we).start();return await((d=(a=u(this,z).config).onSuccess)==null?void 0:d.call(a,O,t,this.state.context,this)),await((g=(f=this.options).onSuccess)==null?void 0:g.call(f,O,t,this.state.context)),await((c=(h=u(this,z).config).onSettled)==null?void 0:c.call(h,O,null,this.state.variables,this.state.context,this)),await((p=(m=this.options).onSettled)==null?void 0:p.call(m,O,null,t,this.state.context)),P(this,Y,ue).call(this,{type:"success",data:O}),O}catch(O){try{throw await((C=(S=u(this,z).config).onError)==null?void 0:C.call(S,O,t,this.state.context,this)),await((F=(M=this.options).onError)==null?void 0:F.call(M,O,t,this.state.context)),await((D=($=u(this,z).config).onSettled)==null?void 0:D.call($,void 0,O,this.state.variables,this.state.context,this)),await((H=(b=this.options).onSettled)==null?void 0:H.call(b,void 0,O,t,this.state.context)),O}finally{P(this,Y,ue).call(this,{type:"error",error:O})}}finally{u(this,z).runNext(this)}}},J=new WeakMap,z=new WeakMap,we=new WeakMap,Y=new WeakSet,ue=function(t){const n=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),A.batch(()=>{u(this,J).forEach(i=>{i.onMutationUpdate(t)}),u(this,z).notify({mutation:this,type:"updated",action:t})})},an);function yn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ie,N,Ke,cn,Jn=(cn=class extends Qe{constructor(t={}){super();R(this,ie);R(this,N);R(this,Ke);this.config=t,v(this,ie,new Set),v(this,N,new Map),v(this,Ke,0)}build(t,n,i){const r=new Wn({mutationCache:this,mutationId:++Ye(this,Ke)._,options:t.defaultMutationOptions(n),state:i});return this.add(r),r}add(t){u(this,ie).add(t);const n=Ze(t);if(typeof n=="string"){const i=u(this,N).get(n);i?i.push(t):u(this,N).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(u(this,ie).delete(t)){const n=Ze(t);if(typeof n=="string"){const i=u(this,N).get(n);if(i)if(i.length>1){const r=i.indexOf(t);r!==-1&&i.splice(r,1)}else i[0]===t&&u(this,N).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ze(t);if(typeof n=="string"){const i=u(this,N).get(n),r=i==null?void 0:i.find(s=>s.state.status==="pending");return!r||r===t}else return!0}runNext(t){var i;const n=Ze(t);if(typeof n=="string"){const r=(i=u(this,N).get(n))==null?void 0:i.find(s=>s!==t&&s.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){A.batch(()=>{u(this,ie).forEach(t=>{this.notify({type:"removed",mutation:t})}),u(this,ie).clear(),u(this,N).clear()})}getAll(){return Array.from(u(this,ie))}find(t){const n={exact:!0,...t};return this.getAll().find(i=>Kt(n,i))}findAll(t={}){return this.getAll().filter(n=>Kt(t,n))}notify(t){A.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return A.batch(()=>Promise.all(t.map(n=>n.continue().catch(U))))}},ie=new WeakMap,N=new WeakMap,Ke=new WeakMap,cn);function Ze(e){var t;return(t=e.options.scope)==null?void 0:t.id}function ot(e){return{onFetch:(t,n)=>{var f,g,h,c,m;const i=t.options,r=(h=(g=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:g.fetchMore)==null?void 0:h.direction,s=((c=t.state.data)==null?void 0:c.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let l={pages:[],pageParams:[]},a=0;const d=async()=>{let p=!1;const S=F=>{Object.defineProperty(F,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},C=pn(t.options,t.fetchOptions),M=async(F,$,D)=>{if(p)return Promise.reject();if($==null&&F.pages.length)return Promise.resolve(F);const b={queryKey:t.queryKey,pageParam:$,direction:D?"backward":"forward",meta:t.options.meta};S(b);const H=await C(b),{maxPages:O}=t.options,I=D?Qn:qn;return{pages:I(F.pages,H,O),pageParams:I(F.pageParams,$,O)}};if(r&&s.length){const F=r==="backward",$=F?wn:wt,D={pages:s,pageParams:o},b=$(i,D);l=await M(D,b,F)}else{const F=e??s.length;do{const $=a===0?o[0]??i.initialPageParam:wt(i,l);if(a>0&&$==null)break;l=await M(l,$),a++}while(a<F)}return l};t.options.persister?t.fetchFn=()=>{var p,S;return(S=(p=t.options).persister)==null?void 0:S.call(p,d,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function wt(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function wn(e,{pages:t,pageParams:n}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,n[0],n):void 0}function Yn(e,t){return t?wt(e,t)!=null:!1}function Zn(e,t){return!t||!e.getPreviousPageParam?!1:wn(e,t)!=null}var V,ce,de,Ae,He,ge,Le,Ge,dn,sr=(dn=class{constructor(e={}){R(this,V);R(this,ce);R(this,de);R(this,Ae);R(this,He);R(this,ge);R(this,Le);R(this,Ge);v(this,V,e.queryCache||new Xn),v(this,ce,e.mutationCache||new Jn),v(this,de,e.defaultOptions||{}),v(this,Ae,new Map),v(this,He,new Map),v(this,ge,0)}mount(){Ye(this,ge)._++,u(this,ge)===1&&(v(this,Le,qt.subscribe(async e=>{e&&(await this.resumePausedMutations(),u(this,V).onFocus())})),v(this,Ge,st.subscribe(async e=>{e&&(await this.resumePausedMutations(),u(this,V).onOnline())})))}unmount(){var e,t;Ye(this,ge)._--,u(this,ge)===0&&((e=u(this,Le))==null||e.call(this),v(this,Le,void 0),(t=u(this,Ge))==null||t.call(this),v(this,Ge,void 0))}isFetching(e){return u(this,V).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return u(this,ce).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=u(this,V).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=u(this,V).build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime($e(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return u(this,V).findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),r=u(this,V).get(i.queryHash),s=r==null?void 0:r.state.data,o=zn(t,s);if(o!==void 0)return u(this,V).build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return A.batch(()=>u(this,V).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=u(this,V).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=u(this,V);A.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=u(this,V),i={type:"active",...e};return A.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries(i,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=A.batch(()=>u(this,V).findAll(e).map(r=>r.cancel(n)));return Promise.all(i).then(U).catch(U)}invalidateQueries(e,t={}){return A.batch(()=>{if(u(this,V).findAll(e).forEach(i=>{i.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=A.batch(()=>u(this,V).findAll(e).filter(r=>!r.isDisabled()).map(r=>{let s=r.fetch(void 0,n);return n.throwOnError||(s=s.catch(U)),r.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(U)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=u(this,V).build(this,t);return n.isStaleByTime($e(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(U).catch(U)}fetchInfiniteQuery(e){return e.behavior=ot(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(U).catch(U)}ensureInfiniteQueryData(e){return e.behavior=ot(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return st.isOnline()?u(this,ce).resumePausedMutations():Promise.resolve()}getQueryCache(){return u(this,V)}getMutationCache(){return u(this,ce)}getDefaultOptions(){return u(this,de)}setDefaultOptions(e){v(this,de,e)}setQueryDefaults(e,t){u(this,Ae).set(xe(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...u(this,Ae).values()],n={};return t.forEach(i=>{Be(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){u(this,He).set(xe(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...u(this,He).values()];let n={};return t.forEach(i=>{Be(e,i.mutationKey)&&(n={...n,...i.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...u(this,de).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=bt(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Tt&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...u(this,de).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){u(this,V).clear(),u(this,ce).clear()}},V=new WeakMap,ce=new WeakMap,de=new WeakMap,Ae=new WeakMap,He=new WeakMap,ge=new WeakMap,Le=new WeakMap,Ge=new WeakMap,dn),q,_,Xe,T,Fe,be,fe,Z,We,ze,Te,Pe,_e,he,qe,x,ke,Ft,Pt,_t,Mt,xt,$t,It,Pn,gn,Fn=(gn=class extends Qe{constructor(t,n){super();R(this,x);R(this,q);R(this,_);R(this,Xe);R(this,T);R(this,Fe);R(this,be);R(this,fe);R(this,Z);R(this,We);R(this,ze);R(this,Te);R(this,Pe);R(this,_e);R(this,he);R(this,qe,new Set);this.options=n,v(this,q,t),v(this,Z,null),v(this,fe,yt()),this.options.experimental_prefetchInRender||u(this,fe).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(u(this,_).addObserver(this),Jt(u(this,_),this.options)?P(this,x,ke).call(this):this.updateResult(),P(this,x,Mt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Et(u(this,_),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Et(u(this,_),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,P(this,x,xt).call(this),P(this,x,$t).call(this),u(this,_).removeObserver(this)}setOptions(t,n){const i=this.options,r=u(this,_);if(this.options=u(this,q).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof K(this.options.enabled,u(this,_))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");P(this,x,It).call(this),u(this,_).setOptions(this.options),i._defaulted&&!rt(this.options,i)&&u(this,q).getQueryCache().notify({type:"observerOptionsUpdated",query:u(this,_),observer:this});const s=this.hasListeners();s&&Yt(u(this,_),r,this.options,i)&&P(this,x,ke).call(this),this.updateResult(n),s&&(u(this,_)!==r||K(this.options.enabled,u(this,_))!==K(i.enabled,u(this,_))||$e(this.options.staleTime,u(this,_))!==$e(i.staleTime,u(this,_)))&&P(this,x,Ft).call(this);const o=P(this,x,Pt).call(this);s&&(u(this,_)!==r||K(this.options.enabled,u(this,_))!==K(i.enabled,u(this,_))||o!==u(this,he))&&P(this,x,_t).call(this,o)}getOptimisticResult(t){const n=u(this,q).getQueryCache().build(u(this,q),t),i=this.createResult(n,t);return ti(this,i)&&(v(this,T,i),v(this,be,this.options),v(this,Fe,u(this,_).state)),i}getCurrentResult(){return u(this,T)}trackResult(t,n){const i={};return Object.keys(t).forEach(r=>{Object.defineProperty(i,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),n==null||n(r),t[r])})}),i}trackProp(t){u(this,qe).add(t)}getCurrentQuery(){return u(this,_)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=u(this,q).defaultQueryOptions(t),i=u(this,q).getQueryCache().build(u(this,q),n);return i.fetch().then(()=>this.createResult(i,n))}fetch(t){return P(this,x,ke).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),u(this,T)))}createResult(t,n){var O;const i=u(this,_),r=this.options,s=u(this,T),o=u(this,Fe),l=u(this,be),d=t!==i?t.state:u(this,Xe),{state:f}=t;let g={...f},h=!1,c;if(n._optimisticResults){const I=this.hasListeners(),oe=!I&&Jt(t,n),ee=I&&Yt(t,i,n,r);(oe||ee)&&(g={...g,...Rn(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:m,errorUpdatedAt:p,status:S}=g;if(n.select&&g.data!==void 0)if(s&&g.data===(o==null?void 0:o.data)&&n.select===u(this,We))c=u(this,ze);else try{v(this,We,n.select),c=n.select(g.data),c=Rt(s==null?void 0:s.data,c,n),v(this,ze,c),v(this,Z,null)}catch(I){v(this,Z,I)}else c=g.data;if(n.placeholderData!==void 0&&c===void 0&&S==="pending"){let I;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))I=s.data;else if(I=typeof n.placeholderData=="function"?n.placeholderData((O=u(this,Te))==null?void 0:O.state.data,u(this,Te)):n.placeholderData,n.select&&I!==void 0)try{I=n.select(I),v(this,Z,null)}catch(oe){v(this,Z,oe)}I!==void 0&&(S="success",c=Rt(s==null?void 0:s.data,I,n),h=!0)}u(this,Z)&&(m=u(this,Z),c=u(this,ze),p=Date.now(),S="error");const C=g.fetchStatus==="fetching",M=S==="pending",F=S==="error",$=M&&C,D=c!==void 0,H={status:S,fetchStatus:g.fetchStatus,isPending:M,isSuccess:S==="success",isError:F,isInitialLoading:$,isLoading:$,data:c,dataUpdatedAt:g.dataUpdatedAt,error:m,errorUpdatedAt:p,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:C,isRefetching:C&&!M,isLoadingError:F&&!D,isPaused:g.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:F&&D,isStale:Qt(t,n),refetch:this.refetch,promise:u(this,fe)};if(this.options.experimental_prefetchInRender){const I=Je=>{H.status==="error"?Je.reject(H.error):H.data!==void 0&&Je.resolve(H.data)},oe=()=>{const Je=v(this,fe,H.promise=yt());I(Je)},ee=u(this,fe);switch(ee.status){case"pending":t.queryHash===i.queryHash&&I(ee);break;case"fulfilled":(H.status==="error"||H.data!==ee.value)&&oe();break;case"rejected":(H.status!=="error"||H.error!==ee.reason)&&oe();break}}return H}updateResult(t){const n=u(this,T),i=this.createResult(u(this,_),this.options);if(v(this,Fe,u(this,_).state),v(this,be,this.options),u(this,Fe).data!==void 0&&v(this,Te,u(this,_)),rt(i,n))return;v(this,T,i);const r={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!u(this,qe).size)return!0;const a=new Set(l??u(this,qe));return this.options.throwOnError&&a.add("error"),Object.keys(u(this,T)).some(d=>{const f=d;return u(this,T)[f]!==n[f]&&a.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(r.listeners=!0),P(this,x,Pn).call(this,{...r,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&P(this,x,Mt).call(this)}},q=new WeakMap,_=new WeakMap,Xe=new WeakMap,T=new WeakMap,Fe=new WeakMap,be=new WeakMap,fe=new WeakMap,Z=new WeakMap,We=new WeakMap,ze=new WeakMap,Te=new WeakMap,Pe=new WeakMap,_e=new WeakMap,he=new WeakMap,qe=new WeakMap,x=new WeakSet,ke=function(t){P(this,x,It).call(this);let n=u(this,_).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(U)),n},Ft=function(){P(this,x,xt).call(this);const t=$e(this.options.staleTime,u(this,_));if(Me||u(this,T).isStale||!St(t))return;const i=hn(u(this,T).dataUpdatedAt,t)+1;v(this,Pe,setTimeout(()=>{u(this,T).isStale||this.updateResult()},i))},Pt=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(u(this,_)):this.options.refetchInterval)??!1},_t=function(t){P(this,x,$t).call(this),v(this,he,t),!(Me||K(this.options.enabled,u(this,_))===!1||!St(u(this,he))||u(this,he)===0)&&v(this,_e,setInterval(()=>{(this.options.refetchIntervalInBackground||qt.isFocused())&&P(this,x,ke).call(this)},u(this,he)))},Mt=function(){P(this,x,Ft).call(this),P(this,x,_t).call(this,P(this,x,Pt).call(this))},xt=function(){u(this,Pe)&&(clearTimeout(u(this,Pe)),v(this,Pe,void 0))},$t=function(){u(this,_e)&&(clearInterval(u(this,_e)),v(this,_e,void 0))},It=function(){const t=u(this,q).getQueryCache().build(u(this,q),this.options);if(t===u(this,_))return;const n=u(this,_);v(this,_,t),v(this,Xe,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Pn=function(t){A.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(u(this,T))}),u(this,q).getQueryCache().notify({query:u(this,_),type:"observerResultsUpdated"})})},gn);function ei(e,t){return K(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Jt(e,t){return ei(e,t)||e.state.data!==void 0&&Et(e,t,t.refetchOnMount)}function Et(e,t,n){if(K(t.enabled,e)!==!1){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&Qt(e,t)}return!1}function Yt(e,t,n,i){return(e!==t||K(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Qt(e,n)}function Qt(e,t){return K(t.enabled,e)!==!1&&e.isStaleByTime($e(t.staleTime,e))}function ti(e,t){return!rt(e.getCurrentResult(),t)}var ni=class extends Fn{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:ot()},t)}getOptimisticResult(e){return e.behavior=ot(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var m,p;const{state:n}=e,i=super.createResult(e,t),{isFetching:r,isRefetching:s,isError:o,isRefetchError:l}=i,a=(p=(m=n.fetchMeta)==null?void 0:m.fetchMore)==null?void 0:p.direction,d=o&&a==="forward",f=r&&a==="forward",g=o&&a==="backward",h=r&&a==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Yn(t,n.data),hasPreviousPage:Zn(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:g,isFetchingPreviousPage:h,isRefetchError:l&&!d&&!g,isRefetching:s&&!f&&!h}}},pe,me,Q,re,se,it,Ot,fn,ii=(fn=class extends Qe{constructor(t,n){super();R(this,se);R(this,pe);R(this,me);R(this,Q);R(this,re);v(this,pe,t),this.setOptions(n),this.bindMethods(),P(this,se,it).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var i;const n=this.options;this.options=u(this,pe).defaultMutationOptions(t),rt(this.options,n)||u(this,pe).getMutationCache().notify({type:"observerOptionsUpdated",mutation:u(this,Q),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&xe(n.mutationKey)!==xe(this.options.mutationKey)?this.reset():((i=u(this,Q))==null?void 0:i.state.status)==="pending"&&u(this,Q).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=u(this,Q))==null||t.removeObserver(this)}onMutationUpdate(t){P(this,se,it).call(this),P(this,se,Ot).call(this,t)}getCurrentResult(){return u(this,me)}reset(){var t;(t=u(this,Q))==null||t.removeObserver(this),v(this,Q,void 0),P(this,se,it).call(this),P(this,se,Ot).call(this)}mutate(t,n){var i;return v(this,re,n),(i=u(this,Q))==null||i.removeObserver(this),v(this,Q,u(this,pe).getMutationCache().build(u(this,pe),this.options)),u(this,Q).addObserver(this),u(this,Q).execute(t)}},pe=new WeakMap,me=new WeakMap,Q=new WeakMap,re=new WeakMap,se=new WeakSet,it=function(){var n;const t=((n=u(this,Q))==null?void 0:n.state)??yn();v(this,me,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Ot=function(t){A.batch(()=>{var n,i,r,s,o,l,a,d;if(u(this,re)&&this.hasListeners()){const f=u(this,me).variables,g=u(this,me).context;(t==null?void 0:t.type)==="success"?((i=(n=u(this,re)).onSuccess)==null||i.call(n,t.data,f,g),(s=(r=u(this,re)).onSettled)==null||s.call(r,t.data,null,f,g)):(t==null?void 0:t.type)==="error"&&((l=(o=u(this,re)).onError)==null||l.call(o,t.error,f,g),(d=(a=u(this,re)).onSettled)==null||d.call(a,void 0,t.error,f,g))}this.listeners.forEach(f=>{f(u(this,me))})})},fn),_n=E.createContext(void 0),ut=e=>{const t=E.useContext(_n);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},or=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),bn.jsx(_n.Provider,{value:e,children:t})),Mn=E.createContext(!1),ri=()=>E.useContext(Mn);Mn.Provider;function si(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var oi=E.createContext(si()),ui=()=>E.useContext(oi);function xn(e,t){return typeof e=="function"?e(...t):!!e}function Vt(){}var li=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},ai=e=>{E.useEffect(()=>{e.clearReset()},[e])},ci=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(r&&e.data===void 0||xn(n,[e.error,i])),di=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},gi=(e,t)=>e.isLoading&&e.isFetching&&!t,fi=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Zt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function $n(e,t,n){var g,h,c,m,p;const i=ut(n),r=ri(),s=ui(),o=i.defaultQueryOptions(e);(h=(g=i.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||h.call(g,o),o._optimisticResults=r?"isRestoring":"optimistic",di(o),li(o,s),ai(s);const l=!i.getQueryCache().get(o.queryHash),[a]=E.useState(()=>new t(i,o)),d=a.getOptimisticResult(o),f=!r&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(S=>{const C=f?a.subscribe(A.batchCalls(S)):Vt;return a.updateResult(),C},[a,f]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),E.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),fi(o,d))throw Zt(o,a,s);if(ci({result:d,errorResetBoundary:s,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw d.error;if((m=(c=i.getDefaultOptions().queries)==null?void 0:c._experimental_afterQuery)==null||m.call(c,o,d),o.experimental_prefetchInRender&&!Me&&gi(d,r)){const S=l?Zt(o,a,s):(p=i.getQueryCache().get(o.queryHash))==null?void 0:p.promise;S==null||S.catch(Vt).finally(()=>{a.updateResult()})}return o.notifyOnChangeProps?d:a.trackResult(d)}function ur(e,t){return $n(e,Fn,t)}function lr(e){return e}function ar(e){return e}function cr(e,t){const n=ut(t);return hi({filters:{...e,status:"pending"}},n).length}function en(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function hi(e={},t){const n=ut(t).getMutationCache(),i=E.useRef(e),r=E.useRef(null);return r.current||(r.current=en(n,e)),E.useEffect(()=>{i.current=e}),E.useSyncExternalStore(E.useCallback(s=>n.subscribe(()=>{const o=zt(r.current,en(n,i.current));r.current!==o&&(r.current=o,A.schedule(s))}),[n]),()=>r.current,()=>r.current)}function dr(e,t){const n=ut(t),[i]=E.useState(()=>new ii(n,e));E.useEffect(()=>{i.setOptions(e)},[i,e]);const r=E.useSyncExternalStore(E.useCallback(o=>i.subscribe(A.batchCalls(o)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),s=E.useCallback((o,l)=>{i.mutate(o,l).catch(Vt)},[i]);if(r.error&&xn(i.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:s,mutateAsync:r.mutate}}function gr(e,t){return $n(e,ni,t)}/**
|
2
|
-
* table-core
|
3
|
-
*
|
4
|
-
* Copyright (c) TanStack
|
5
|
-
*
|
6
|
-
* This source code is licensed under the MIT license found in the
|
7
|
-
* LICENSE.md file in the root directory of this source tree.
|
8
|
-
*
|
9
|
-
* @license MIT
|
10
|
-
*/function ve(e,t){return typeof e=="function"?e(t):e}function j(e,t){return n=>{t.setState(i=>({...i,[e]:ve(n,i[e])}))}}function lt(e){return e instanceof Function}function pi(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function mi(e,t){const n=[],i=r=>{r.forEach(s=>{n.push(s);const o=t(s);o!=null&&o.length&&i(o)})};return i(e),n}function y(e,t,n){let i=[],r;return s=>{let o;n.key&&n.debug&&(o=Date.now());const l=e(s);if(!(l.length!==i.length||l.some((f,g)=>i[g]!==f)))return r;i=l;let d;if(n.key&&n.debug&&(d=Date.now()),r=t(...l),n==null||n.onChange==null||n.onChange(r),n.key&&n.debug&&n!=null&&n.debug()){const f=Math.round((Date.now()-o)*100)/100,g=Math.round((Date.now()-d)*100)/100,h=g/16,c=(m,p)=>{for(m=String(m);m.length<p;)m=" "+m;return m};console.info(`%c⏱ ${c(g,5)} /${c(f,5)} ms`,`
|
11
|
-
font-size: .6rem;
|
12
|
-
font-weight: bold;
|
13
|
-
color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n==null?void 0:n.key)}return r}}function w(e,t,n,i){return{debug:()=>{var r;return(r=e==null?void 0:e.debugAll)!=null?r:e[t]},key:!1,onChange:i}}function vi(e,t,n,i){const r=()=>{var o;return(o=s.getValue())!=null?o:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:r,getContext:y(()=>[e,n,t,s],(o,l,a,d)=>({table:o,column:l,row:a,cell:d,getValue:d.getValue,renderValue:d.renderValue}),w(e.options,"debugCells"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(s,n,t,e)},{}),s}function Si(e,t,n,i){var r,s;const l={...e._getDefaultColumnDef(),...t},a=l.accessorKey;let d=(r=(s=l.id)!=null?s:a?typeof String.prototype.replaceAll=="function"?a.replaceAll(".","_"):a.replace(/\./g,"_"):void 0)!=null?r:typeof l.header=="string"?l.header:void 0,f;if(l.accessorFn?f=l.accessorFn:a&&(a.includes(".")?f=h=>{let c=h;for(const p of a.split(".")){var m;c=(m=c)==null?void 0:m[p]}return c}:f=h=>h[l.accessorKey]),!d)throw new Error;let g={id:`${String(d)}`,accessorFn:f,parent:i,depth:n,columnDef:l,columns:[],getFlatColumns:y(()=>[!0],()=>{var h;return[g,...(h=g.columns)==null?void 0:h.flatMap(c=>c.getFlatColumns())]},w(e.options,"debugColumns")),getLeafColumns:y(()=>[e._getOrderColumnsFn()],h=>{var c;if((c=g.columns)!=null&&c.length){let m=g.columns.flatMap(p=>p.getLeafColumns());return h(m)}return[g]},w(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(g,e);return g}const L="debugHeaders";function tn(e,t,n){var i;let s={id:(i=n.id)!=null?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const o=[],l=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(l),o.push(a)};return l(s),o},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(s,e)}),s}const Ci={createTable:e=>{e.getHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,r)=>{var s,o;const l=(s=i==null?void 0:i.map(g=>n.find(h=>h.id===g)).filter(Boolean))!=null?s:[],a=(o=r==null?void 0:r.map(g=>n.find(h=>h.id===g)).filter(Boolean))!=null?o:[],d=n.filter(g=>!(i!=null&&i.includes(g.id))&&!(r!=null&&r.includes(g.id)));return et(t,[...l,...d,...a],e)},w(e.options,L)),e.getCenterHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,r)=>(n=n.filter(s=>!(i!=null&&i.includes(s.id))&&!(r!=null&&r.includes(s.id))),et(t,n,e,"center")),w(e.options,L)),e.getLeftHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var r;const s=(r=i==null?void 0:i.map(o=>n.find(l=>l.id===o)).filter(Boolean))!=null?r:[];return et(t,s,e,"left")},w(e.options,L)),e.getRightHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var r;const s=(r=i==null?void 0:i.map(o=>n.find(l=>l.id===o)).filter(Boolean))!=null?r:[];return et(t,s,e,"right")},w(e.options,L)),e.getFooterGroups=y(()=>[e.getHeaderGroups()],t=>[...t].reverse(),w(e.options,L)),e.getLeftFooterGroups=y(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),w(e.options,L)),e.getCenterFooterGroups=y(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),w(e.options,L)),e.getRightFooterGroups=y(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),w(e.options,L)),e.getFlatHeaders=y(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),w(e.options,L)),e.getLeftFlatHeaders=y(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),w(e.options,L)),e.getCenterFlatHeaders=y(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),w(e.options,L)),e.getRightFlatHeaders=y(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),w(e.options,L)),e.getCenterLeafHeaders=y(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),w(e.options,L)),e.getLeftLeafHeaders=y(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),w(e.options,L)),e.getRightLeafHeaders=y(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),w(e.options,L)),e.getLeafHeaders=y(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,i)=>{var r,s,o,l,a,d;return[...(r=(s=t[0])==null?void 0:s.headers)!=null?r:[],...(o=(l=n[0])==null?void 0:l.headers)!=null?o:[],...(a=(d=i[0])==null?void 0:d.headers)!=null?a:[]].map(f=>f.getLeafHeaders()).flat()},w(e.options,L))}};function et(e,t,n,i){var r,s;let o=0;const l=function(h,c){c===void 0&&(c=1),o=Math.max(o,c),h.filter(m=>m.getIsVisible()).forEach(m=>{var p;(p=m.columns)!=null&&p.length&&l(m.columns,c+1)},0)};l(e);let a=[];const d=(h,c)=>{const m={depth:c,id:[i,`${c}`].filter(Boolean).join("_"),headers:[]},p=[];h.forEach(S=>{const C=[...p].reverse()[0],M=S.column.depth===m.depth;let F,$=!1;if(M&&S.column.parent?F=S.column.parent:(F=S.column,$=!0),C&&(C==null?void 0:C.column)===F)C.subHeaders.push(S);else{const D=tn(n,F,{id:[i,c,F.id,S==null?void 0:S.id].filter(Boolean).join("_"),isPlaceholder:$,placeholderId:$?`${p.filter(b=>b.column===F).length}`:void 0,depth:c,index:p.length});D.subHeaders.push(S),p.push(D)}m.headers.push(S),S.headerGroup=m}),a.push(m),c>0&&d(p,c-1)},f=t.map((h,c)=>tn(n,h,{depth:o,index:c}));d(f,o-1),a.reverse();const g=h=>h.filter(m=>m.column.getIsVisible()).map(m=>{let p=0,S=0,C=[0];m.subHeaders&&m.subHeaders.length?(C=[],g(m.subHeaders).forEach(F=>{let{colSpan:$,rowSpan:D}=F;p+=$,C.push(D)})):p=1;const M=Math.min(...C);return S=S+M,m.colSpan=p,m.rowSpan=S,{colSpan:p,rowSpan:S}});return g((r=(s=a[0])==null?void 0:s.headers)!=null?r:[]),a}const Ri=(e,t,n,i,r,s,o)=>{let l={id:t,index:i,original:n,depth:r,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:a=>{if(l._valuesCache.hasOwnProperty(a))return l._valuesCache[a];const d=e.getColumn(a);if(d!=null&&d.accessorFn)return l._valuesCache[a]=d.accessorFn(l.original,i),l._valuesCache[a]},getUniqueValues:a=>{if(l._uniqueValuesCache.hasOwnProperty(a))return l._uniqueValuesCache[a];const d=e.getColumn(a);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(l._uniqueValuesCache[a]=d.columnDef.getUniqueValues(l.original,i),l._uniqueValuesCache[a]):(l._uniqueValuesCache[a]=[l.getValue(a)],l._uniqueValuesCache[a])},renderValue:a=>{var d;return(d=l.getValue(a))!=null?d:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>mi(l.subRows,a=>a.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let a=[],d=l;for(;;){const f=d.getParentRow();if(!f)break;a.push(f),d=f}return a.reverse()},getAllCells:y(()=>[e.getAllLeafColumns()],a=>a.map(d=>vi(e,l,d,d.id)),w(e.options,"debugRows")),_getAllCellsByColumnId:y(()=>[l.getAllCells()],a=>a.reduce((d,f)=>(d[f.column.id]=f,d),{}),w(e.options,"debugRows"))};for(let a=0;a<e._features.length;a++){const d=e._features[a];d==null||d.createRow==null||d.createRow(l,e)}return l},yi={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},In=(e,t,n)=>{var i,r;const s=n==null||(i=n.toString())==null?void 0:i.toLowerCase();return!!(!((r=e.getValue(t))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(s))};In.autoRemove=e=>X(e);const En=(e,t,n)=>{var i;return!!(!((i=e.getValue(t))==null||(i=i.toString())==null)&&i.includes(n))};En.autoRemove=e=>X(e);const On=(e,t,n)=>{var i;return((i=e.getValue(t))==null||(i=i.toString())==null?void 0:i.toLowerCase())===(n==null?void 0:n.toLowerCase())};On.autoRemove=e=>X(e);const Vn=(e,t,n)=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)};Vn.autoRemove=e=>X(e);const Dn=(e,t,n)=>!n.some(i=>{var r;return!((r=e.getValue(t))!=null&&r.includes(i))});Dn.autoRemove=e=>X(e)||!(e!=null&&e.length);const An=(e,t,n)=>n.some(i=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(i)});An.autoRemove=e=>X(e)||!(e!=null&&e.length);const Hn=(e,t,n)=>e.getValue(t)===n;Hn.autoRemove=e=>X(e);const Ln=(e,t,n)=>e.getValue(t)==n;Ln.autoRemove=e=>X(e);const jt=(e,t,n)=>{let[i,r]=n;const s=e.getValue(t);return s>=i&&s<=r};jt.resolveFilterValue=e=>{let[t,n]=e,i=typeof t!="number"?parseFloat(t):t,r=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(i)?-1/0:i,o=n===null||Number.isNaN(r)?1/0:r;if(s>o){const l=s;s=o,o=l}return[s,o]};jt.autoRemove=e=>X(e)||X(e[0])&&X(e[1]);const ne={includesString:In,includesStringSensitive:En,equalsString:On,arrIncludes:Vn,arrIncludesAll:Dn,arrIncludesSome:An,equals:Hn,weakEquals:Ln,inNumberRange:jt};function X(e){return e==null||e===""}const wi={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:j("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n==null?void 0:n.getValue(e.id);return typeof i=="string"?ne.includesString:typeof i=="number"?ne.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?ne.equals:Array.isArray(i)?ne.arrIncludes:ne.weakEquals},e.getFilterFn=()=>{var n,i;return lt(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(i=t.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?n:ne[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,r;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((i=t.options.enableColumnFilters)!=null?i:!0)&&((r=t.options.enableFilters)!=null?r:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(i=>i.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,i;return(n=(i=t.getState().columnFilters)==null?void 0:i.findIndex(r=>r.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(i=>{const r=e.getFilterFn(),s=i==null?void 0:i.find(f=>f.id===e.id),o=ve(n,s?s.value:void 0);if(nn(r,o,e)){var l;return(l=i==null?void 0:i.filter(f=>f.id!==e.id))!=null?l:[]}const a={id:e.id,value:o};if(s){var d;return(d=i==null?void 0:i.map(f=>f.id===e.id?a:f))!=null?d:[]}return i!=null&&i.length?[...i,a]:[a]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),i=r=>{var s;return(s=ve(t,r))==null?void 0:s.filter(o=>{const l=n.find(a=>a.id===o.id);if(l){const a=l.getFilterFn();if(nn(a,o.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:(n=(i=e.initialState)==null?void 0:i.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function nn(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Fi=(e,t,n)=>n.reduce((i,r)=>{const s=r.getValue(e);return i+(typeof s=="number"?s:0)},0),Pi=(e,t,n)=>{let i;return n.forEach(r=>{const s=r.getValue(e);s!=null&&(i>s||i===void 0&&s>=s)&&(i=s)}),i},_i=(e,t,n)=>{let i;return n.forEach(r=>{const s=r.getValue(e);s!=null&&(i<s||i===void 0&&s>=s)&&(i=s)}),i},Mi=(e,t,n)=>{let i,r;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(i===void 0?o>=o&&(i=r=o):(i>o&&(i=o),r<o&&(r=o)))}),[i,r]},xi=(e,t)=>{let n=0,i=0;if(t.forEach(r=>{let s=r.getValue(e);s!=null&&(s=+s)>=s&&(++n,i+=s)}),n)return i/n},$i=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!pi(n))return;if(n.length===1)return n[0];const i=Math.floor(n.length/2),r=n.sort((s,o)=>s-o);return n.length%2!==0?r[i]:(r[i-1]+r[i])/2},Ii=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Ei=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Oi=(e,t)=>t.length,dt={sum:Fi,min:Pi,max:_i,extent:Mi,mean:xi,median:$i,unique:Ii,uniqueCount:Ei,count:Oi},Vi={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:j("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(i=>i!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,i;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((i=t.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n==null?void 0:n.getValue(e.id);if(typeof i=="number")return dt.sum;if(Object.prototype.toString.call(i)==="[object Date]")return dt.extent},e.getAggregationFn=()=>{var n,i;if(!e)throw new Error;return lt(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(i=t.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?n:dt[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:(n=(i=e.initialState)==null?void 0:i.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const i=t.getColumn(n);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var r;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((r=n.subRows)!=null&&r.length)}}};function Di(e,t,n){if(!(t!=null&&t.length)||!n)return e;const i=e.filter(s=>!t.includes(s.id));return n==="remove"?i:[...t.map(s=>e.find(o=>o.id===s)).filter(Boolean),...i]}const Ai={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:j("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=y(n=>[Ue(t,n)],n=>n.findIndex(i=>i.id===e.id),w(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var i;return((i=Ue(t,n)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;const r=Ue(t,n);return((i=r[r.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=y(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,i)=>r=>{let s=[];if(!(t!=null&&t.length))s=r;else{const o=[...t],l=[...r];for(;l.length&&o.length;){const a=o.shift(),d=l.findIndex(f=>f.id===a);d>-1&&s.push(l.splice(d,1)[0])}s=[...s,...l]}return Di(s,n,i)},w(e.options,"debugTable"))}},gt=()=>({left:[],right:[]}),Hi={getInitialState:e=>({columnPinning:gt(),...e}),getDefaultOptions:e=>({onColumnPinningChange:j("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map(r=>r.id).filter(Boolean);t.setColumnPinning(r=>{var s,o;if(n==="right"){var l,a;return{left:((l=r==null?void 0:r.left)!=null?l:[]).filter(g=>!(i!=null&&i.includes(g))),right:[...((a=r==null?void 0:r.right)!=null?a:[]).filter(g=>!(i!=null&&i.includes(g))),...i]}}if(n==="left"){var d,f;return{left:[...((d=r==null?void 0:r.left)!=null?d:[]).filter(g=>!(i!=null&&i.includes(g))),...i],right:((f=r==null?void 0:r.right)!=null?f:[]).filter(g=>!(i!=null&&i.includes(g)))}}return{left:((s=r==null?void 0:r.left)!=null?s:[]).filter(g=>!(i!=null&&i.includes(g))),right:((o=r==null?void 0:r.right)!=null?o:[]).filter(g=>!(i!=null&&i.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var r,s,o;return((r=i.columnDef.enablePinning)!=null?r:!0)&&((s=(o=t.options.enableColumnPinning)!=null?o:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:i,right:r}=t.getState().columnPinning,s=n.some(l=>i==null?void 0:i.includes(l)),o=n.some(l=>r==null?void 0:r.includes(l));return s?"left":o?"right":!1},e.getPinnedIndex=()=>{var n,i;const r=e.getIsPinned();return r?(n=(i=t.getState().columnPinning)==null||(i=i[r])==null?void 0:i.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=y(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,i,r)=>{const s=[...i??[],...r??[]];return n.filter(o=>!s.includes(o.column.id))},w(t.options,"debugRows")),e.getLeftVisibleCells=y(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,i)=>(i??[]).map(s=>n.find(o=>o.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),w(t.options,"debugRows")),e.getRightVisibleCells=y(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,i)=>(i??[]).map(s=>n.find(o=>o.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),w(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?gt():(n=(i=e.initialState)==null?void 0:i.columnPinning)!=null?n:gt())},e.getIsSomeColumnsPinned=t=>{var n;const i=e.getState().columnPinning;if(!t){var r,s;return!!((r=i.left)!=null&&r.length||(s=i.right)!=null&&s.length)}return!!((n=i[t])!=null&&n.length)},e.getLeftLeafColumns=y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(r=>r.id===i)).filter(Boolean),w(e.options,"debugColumns")),e.getRightLeafColumns=y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(r=>r.id===i)).filter(Boolean),w(e.options,"debugColumns")),e.getCenterLeafColumns=y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i)=>{const r=[...n??[],...i??[]];return t.filter(s=>!r.includes(s.id))},w(e.options,"debugColumns"))}},tt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ft=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Li={getDefaultColumnDef:()=>tt,getInitialState:e=>({columnSizing:{},columnSizingInfo:ft(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:j("columnSizing",e),onColumnSizingInfoChange:j("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,r;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:tt.minSize,(i=s??e.columnDef.size)!=null?i:tt.size),(r=e.columnDef.maxSize)!=null?r:tt.maxSize)},e.getStart=y(n=>[n,Ue(t,n),t.getState().columnSizing],(n,i)=>i.slice(0,e.getIndex(n)).reduce((r,s)=>r+s.getSize(),0),w(t.options,"debugColumns")),e.getAfter=y(n=>[n,Ue(t,n),t.getState().columnSizing],(n,i)=>i.slice(e.getIndex(n)+1).reduce((r,s)=>r+s.getSize(),0),w(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:i,...r}=n;return r})},e.getCanResize=()=>{var n,i;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((i=t.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const i=r=>{if(r.subHeaders.length)r.subHeaders.forEach(i);else{var s;n+=(s=r.column.getSize())!=null?s:0}};return i(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const i=t.getColumn(e.column.id),r=i==null?void 0:i.getCanResize();return s=>{if(!i||!r||(s.persist==null||s.persist(),ht(s)&&s.touches&&s.touches.length>1))return;const o=e.getSize(),l=e?e.getLeafHeaders().map(C=>[C.column.id,C.column.getSize()]):[[i.id,i.getSize()]],a=ht(s)?Math.round(s.touches[0].clientX):s.clientX,d={},f=(C,M)=>{typeof M=="number"&&(t.setColumnSizingInfo(F=>{var $,D;const b=t.options.columnResizeDirection==="rtl"?-1:1,H=(M-(($=F==null?void 0:F.startOffset)!=null?$:0))*b,O=Math.max(H/((D=F==null?void 0:F.startSize)!=null?D:0),-.999999);return F.columnSizingStart.forEach(I=>{let[oe,ee]=I;d[oe]=Math.round(Math.max(ee+ee*O,0)*100)/100}),{...F,deltaOffset:H,deltaPercentage:O}}),(t.options.columnResizeMode==="onChange"||C==="end")&&t.setColumnSizing(F=>({...F,...d})))},g=C=>f("move",C),h=C=>{f("end",C),t.setColumnSizingInfo(M=>({...M,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},c=n||typeof document<"u"?document:null,m={moveHandler:C=>g(C.clientX),upHandler:C=>{c==null||c.removeEventListener("mousemove",m.moveHandler),c==null||c.removeEventListener("mouseup",m.upHandler),h(C.clientX)}},p={moveHandler:C=>(C.cancelable&&(C.preventDefault(),C.stopPropagation()),g(C.touches[0].clientX),!1),upHandler:C=>{var M;c==null||c.removeEventListener("touchmove",p.moveHandler),c==null||c.removeEventListener("touchend",p.upHandler),C.cancelable&&(C.preventDefault(),C.stopPropagation()),h((M=C.touches[0])==null?void 0:M.clientX)}},S=Gi()?{passive:!1}:!1;ht(s)?(c==null||c.addEventListener("touchmove",p.moveHandler,S),c==null||c.addEventListener("touchend",p.upHandler,S)):(c==null||c.addEventListener("mousemove",m.moveHandler,S),c==null||c.addEventListener("mouseup",m.upHandler,S)),t.setColumnSizingInfo(C=>({...C,startOffset:a,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?ft():(n=e.initialState.columnSizingInfo)!=null?n:ft())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((i,r)=>i+r.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((i,r)=>i+r.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((i,r)=>i+r.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((i,r)=>i+r.getSize(),0))!=null?t:0}}};let nt=null;function Gi(){if(typeof nt=="boolean")return nt;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return nt=e,nt}function ht(e){return e.type==="touchstart"}const bi={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:j("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(i=>({...i,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;const r=e.columns;return(n=r.length?r.some(s=>s.getIsVisible()):(i=t.getState().columnVisibility)==null?void 0:i[e.id])!=null?n:!0},e.getCanHide=()=>{var n,i;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((i=t.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=y(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(i=>i.column.getIsVisible()),w(t.options,"debugRows")),e.getVisibleCells=y(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,i,r)=>[...n,...i,...r],w(t.options,"debugRows"))},createTable:e=>{const t=(n,i)=>y(()=>[i(),i().filter(r=>r.getIsVisible()).map(r=>r.id).join("_")],r=>r.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),w(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var i;e.setColumnVisibility(n?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=n=>{var i;n=(i=n)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((r,s)=>({...r,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var i;e.toggleAllColumnsVisible((i=n.target)==null?void 0:i.checked)}}};function Ue(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const zi={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Ti={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:j("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const i=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,r,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableGlobalFilter)!=null?i:!0)&&((r=t.options.enableFilters)!=null?r:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>ne.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:i}=e.options;return lt(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[i])!=null?t:ne[i]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},qi={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:j("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,r;if(!t){e._queue(()=>{t=!0});return}if((i=(r=e.options.autoResetAll)!=null?r:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var r,s;e.setExpanded(i?{}:(r=(s=e.initialState)==null?void 0:s.expanded)!=null?r:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(r=>!r.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const o=s.split(".");i=Math.max(i,o.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(i=>{var r;const s=i===!0?!0:!!(i!=null&&i[e.id]);let o={};if(i===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{o[l]=!0}):o=i,n=(r=n)!=null?r:!s,!s&&n)return{...o,[e.id]:!0};if(s&&!n){const{[e.id]:l,...a}=o;return a}return i})},e.getIsExpanded=()=>{var n;const i=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:i===!0||i!=null&&i[e.id])},e.getCanExpand=()=>{var n,i,r;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((i=t.options.enableExpanding)!=null?i:!0)&&!!((r=e.subRows)!=null&&r.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Dt=0,At=10,pt=()=>({pageIndex:Dt,pageSize:At}),Qi={getInitialState:e=>({...e,pagination:{...pt(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:j("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,r;if(!t){e._queue(()=>{t=!0});return}if((i=(r=e.options.autoResetAll)!=null?r:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=i=>{const r=s=>ve(i,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(r)},e.resetPagination=i=>{var r;e.setPagination(i?pt():(r=e.initialState.pagination)!=null?r:pt())},e.setPageIndex=i=>{e.setPagination(r=>{let s=ve(i,r.pageIndex);const o=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,o)),{...r,pageIndex:s}})},e.resetPageIndex=i=>{var r,s;e.setPageIndex(i?Dt:(r=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?r:Dt)},e.resetPageSize=i=>{var r,s;e.setPageSize(i?At:(r=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?r:At)},e.setPageSize=i=>{e.setPagination(r=>{const s=Math.max(1,ve(i,r.pageSize)),o=r.pageSize*r.pageIndex,l=Math.floor(o/s);return{...r,pageIndex:l,pageSize:s}})},e.setPageCount=i=>e.setPagination(r=>{var s;let o=ve(i,(s=e.options.pageCount)!=null?s:-1);return typeof o=="number"&&(o=Math.max(-1,o)),{...r,pageCount:o}}),e.getPageOptions=y(()=>[e.getPageCount()],i=>{let r=[];return i&&i>0&&(r=[...new Array(i)].fill(null).map((s,o)=>o)),r},w(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,r=e.getPageCount();return r===-1?!0:r===0?!1:i<r-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},mt=()=>({top:[],bottom:[]}),ji={getInitialState:e=>({rowPinning:mt(),...e}),getDefaultOptions:e=>({onRowPinningChange:j("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,r)=>{const s=i?e.getLeafRows().map(a=>{let{id:d}=a;return d}):[],o=r?e.getParentRows().map(a=>{let{id:d}=a;return d}):[],l=new Set([...o,e.id,...s]);t.setRowPinning(a=>{var d,f;if(n==="bottom"){var g,h;return{top:((g=a==null?void 0:a.top)!=null?g:[]).filter(p=>!(l!=null&&l.has(p))),bottom:[...((h=a==null?void 0:a.bottom)!=null?h:[]).filter(p=>!(l!=null&&l.has(p))),...Array.from(l)]}}if(n==="top"){var c,m;return{top:[...((c=a==null?void 0:a.top)!=null?c:[]).filter(p=>!(l!=null&&l.has(p))),...Array.from(l)],bottom:((m=a==null?void 0:a.bottom)!=null?m:[]).filter(p=>!(l!=null&&l.has(p)))}}return{top:((d=a==null?void 0:a.top)!=null?d:[]).filter(p=>!(l!=null&&l.has(p))),bottom:((f=a==null?void 0:a.bottom)!=null?f:[]).filter(p=>!(l!=null&&l.has(p)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:i,enablePinning:r}=t.options;return typeof i=="function"?i(e):(n=i??r)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:i,bottom:r}=t.getState().rowPinning,s=n.some(l=>i==null?void 0:i.includes(l)),o=n.some(l=>r==null?void 0:r.includes(l));return s?"top":o?"bottom":!1},e.getPinnedIndex=()=>{var n,i;const r=e.getIsPinned();if(!r)return-1;const s=(n=r==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(o=>{let{id:l}=o;return l});return(i=s==null?void 0:s.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?mt():(n=(i=e.initialState)==null?void 0:i.rowPinning)!=null?n:mt())},e.getIsSomeRowsPinned=t=>{var n;const i=e.getState().rowPinning;if(!t){var r,s;return!!((r=i.top)!=null&&r.length||(s=i.bottom)!=null&&s.length)}return!!((n=i[t])!=null&&n.length)},e._getPinnedRows=(t,n,i)=>{var r;return((r=e.options.keepPinnedRows)==null||r?(n??[]).map(o=>{const l=e.getRow(o,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(o=>t.find(l=>l.id===o))).filter(Boolean).map(o=>({...o,position:i}))},e.getTopRows=y(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),w(e.options,"debugRows")),e.getBottomRows=y(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),w(e.options,"debugRows")),e.getCenterRows=y(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,i)=>{const r=new Set([...n??[],...i??[]]);return t.filter(s=>!r.has(s.id))},w(e.options,"debugRows"))}},ki={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:j("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const i={...n},r=e.getPreGroupedRowModel().flatRows;return t?r.forEach(s=>{s.getCanSelect()&&(i[s.id]=!0)}):r.forEach(s=>{delete i[s.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const i=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),r={...n};return e.getRowModel().rows.forEach(s=>{Ht(r,s.id,i,!0,e)}),r}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=y(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?vt(e,n):{rows:[],flatRows:[],rowsById:{}},w(e.options,"debugTable")),e.getFilteredSelectedRowModel=y(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?vt(e,n):{rows:[],flatRows:[],rowsById:{}},w(e.options,"debugTable")),e.getGroupedSelectedRowModel=y(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?vt(e,n):{rows:[],flatRows:[],rowsById:{}},w(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let i=!!(t.length&&Object.keys(n).length);return i&&t.some(r=>r.getCanSelect()&&!n[r.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(r=>r.getCanSelect()),{rowSelection:n}=e.getState();let i=!!t.length;return i&&t.some(r=>!n[r.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,i)=>{const r=e.getIsSelected();t.setRowSelection(s=>{var o;if(n=typeof n<"u"?n:!r,e.getCanSelect()&&r===n)return s;const l={...s};return Ht(l,e.id,n,(o=i==null?void 0:i.selectChildren)!=null?o:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return kt(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Lt(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Lt(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return i=>{var r;n&&e.toggleSelected((r=i.target)==null?void 0:r.checked)}}}},Ht=(e,t,n,i,r)=>{var s;const o=r.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),o.getCanSelect()&&(e[t]=!0)):delete e[t],i&&(s=o.subRows)!=null&&s.length&&o.getCanSelectSubRows()&&o.subRows.forEach(l=>Ht(e,l.id,n,i,r))};function vt(e,t){const n=e.getState().rowSelection,i=[],r={},s=function(o,l){return o.map(a=>{var d;const f=kt(a,n);if(f&&(i.push(a),r[a.id]=a),(d=a.subRows)!=null&&d.length&&(a={...a,subRows:s(a.subRows)}),f)return a}).filter(Boolean)};return{rows:s(t.rows),flatRows:i,rowsById:r}}function kt(e,t){var n;return(n=t[e.id])!=null?n:!1}function Lt(e,t,n){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let r=!0,s=!1;return e.subRows.forEach(o=>{if(!(s&&!r)&&(o.getCanSelect()&&(kt(o,t)?s=!0:r=!1),o.subRows&&o.subRows.length)){const l=Lt(o,t);l==="all"?s=!0:(l==="some"&&(s=!0),r=!1)}}),r?"all":s?"some":!1}const Gt=/([0-9]+)/gm,Ui=(e,t,n)=>Gn(Se(e.getValue(n)).toLowerCase(),Se(t.getValue(n)).toLowerCase()),Bi=(e,t,n)=>Gn(Se(e.getValue(n)),Se(t.getValue(n))),Ni=(e,t,n)=>Ut(Se(e.getValue(n)).toLowerCase(),Se(t.getValue(n)).toLowerCase()),Ki=(e,t,n)=>Ut(Se(e.getValue(n)),Se(t.getValue(n))),Xi=(e,t,n)=>{const i=e.getValue(n),r=t.getValue(n);return i>r?1:i<r?-1:0},Wi=(e,t,n)=>Ut(e.getValue(n),t.getValue(n));function Ut(e,t){return e===t?0:e>t?1:-1}function Se(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Gn(e,t){const n=e.split(Gt).filter(Boolean),i=t.split(Gt).filter(Boolean);for(;n.length&&i.length;){const r=n.shift(),s=i.shift(),o=parseInt(r,10),l=parseInt(s,10),a=[o,l].sort();if(isNaN(a[0])){if(r>s)return 1;if(s>r)return-1;continue}if(isNaN(a[1]))return isNaN(o)?-1:1;if(o>l)return 1;if(l>o)return-1}return n.length-i.length}const je={alphanumeric:Ui,alphanumericCaseSensitive:Bi,text:Ni,textCaseSensitive:Ki,datetime:Xi,basic:Wi},Ji={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:j("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const r of n){const s=r==null?void 0:r.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return je.datetime;if(typeof s=="string"&&(i=!0,s.split(Gt).length>1))return je.alphanumeric}return i?je.text:je.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw new Error;return lt(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(i=t.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?n:je[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const r=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(o=>{const l=o==null?void 0:o.find(c=>c.id===e.id),a=o==null?void 0:o.findIndex(c=>c.id===e.id);let d=[],f,g=s?n:r==="desc";if(o!=null&&o.length&&e.getCanMultiSort()&&i?l?f="toggle":f="add":o!=null&&o.length&&a!==o.length-1?f="replace":l?f="toggle":f="replace",f==="toggle"&&(s||r||(f="remove")),f==="add"){var h;d=[...o,{id:e.id,desc:g}],d.splice(0,d.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else f==="toggle"?d=o.map(c=>c.id===e.id?{...c,desc:g}:c):f==="remove"?d=o.filter(c=>c.id!==e.id):d=[{id:e.id,desc:g}];return d})},e.getFirstSortDir=()=>{var n,i;return((n=(i=e.columnDef.sortDescFirst)!=null?i:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var i,r;const s=e.getFirstSortDir(),o=e.getIsSorted();return o?o!==s&&((i=t.options.enableSortingRemoval)==null||i)&&(!(n&&(r=t.options.enableMultiRemove)!=null)||r)?!1:o==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,i;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((i=t.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return(n=(i=e.columnDef.enableMultiSort)!=null?i:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const i=(n=t.getState().sorting)==null?void 0:n.find(r=>r.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,i;return(n=(i=t.getState().sorting)==null?void 0:i.findIndex(r=>r.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return i=>{n&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:(n=(i=e.initialState)==null?void 0:i.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Yi=[Ci,bi,Ai,Hi,yi,wi,zi,Ti,Ji,Vi,qi,Qi,ji,ki,Li];function Zi(e){var t,n;const i=[...Yi,...(t=e._features)!=null?t:[]];let r={_features:i};const s=r._features.reduce((h,c)=>Object.assign(h,c.getDefaultOptions==null?void 0:c.getDefaultOptions(r)),{}),o=h=>r.options.mergeOptions?r.options.mergeOptions(s,h):{...s,...h};let a={...{},...(n=e.initialState)!=null?n:{}};r._features.forEach(h=>{var c;a=(c=h.getInitialState==null?void 0:h.getInitialState(a))!=null?c:a});const d=[];let f=!1;const g={_features:i,options:{...s,...e},initialState:a,_queue:h=>{d.push(h),f||(f=!0,Promise.resolve().then(()=>{for(;d.length;)d.shift()();f=!1}).catch(c=>setTimeout(()=>{throw c})))},reset:()=>{r.setState(r.initialState)},setOptions:h=>{const c=ve(h,r.options);r.options=o(c)},getState:()=>r.options.state,setState:h=>{r.options.onStateChange==null||r.options.onStateChange(h)},_getRowId:(h,c,m)=>{var p;return(p=r.options.getRowId==null?void 0:r.options.getRowId(h,c,m))!=null?p:`${m?[m.id,c].join("."):c}`},getCoreRowModel:()=>(r._getCoreRowModel||(r._getCoreRowModel=r.options.getCoreRowModel(r)),r._getCoreRowModel()),getRowModel:()=>r.getPaginationRowModel(),getRow:(h,c)=>{let m=(c?r.getPrePaginationRowModel():r.getRowModel()).rowsById[h];if(!m&&(m=r.getCoreRowModel().rowsById[h],!m))throw new Error;return m},_getDefaultColumnDef:y(()=>[r.options.defaultColumn],h=>{var c;return h=(c=h)!=null?c:{},{header:m=>{const p=m.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null},cell:m=>{var p,S;return(p=(S=m.renderValue())==null||S.toString==null?void 0:S.toString())!=null?p:null},...r._features.reduce((m,p)=>Object.assign(m,p.getDefaultColumnDef==null?void 0:p.getDefaultColumnDef()),{}),...h}},w(e,"debugColumns")),_getColumnDefs:()=>r.options.columns,getAllColumns:y(()=>[r._getColumnDefs()],h=>{const c=function(m,p,S){return S===void 0&&(S=0),m.map(C=>{const M=Si(r,C,S,p),F=C;return M.columns=F.columns?c(F.columns,M,S+1):[],M})};return c(h)},w(e,"debugColumns")),getAllFlatColumns:y(()=>[r.getAllColumns()],h=>h.flatMap(c=>c.getFlatColumns()),w(e,"debugColumns")),_getAllFlatColumnsById:y(()=>[r.getAllFlatColumns()],h=>h.reduce((c,m)=>(c[m.id]=m,c),{}),w(e,"debugColumns")),getAllLeafColumns:y(()=>[r.getAllColumns(),r._getOrderColumnsFn()],(h,c)=>{let m=h.flatMap(p=>p.getLeafColumns());return c(m)},w(e,"debugColumns")),getColumn:h=>r._getAllFlatColumnsById()[h]};Object.assign(r,g);for(let h=0;h<r._features.length;h++){const c=r._features[h];c==null||c.createTable==null||c.createTable(r)}return r}function fr(){return e=>y(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(r,s,o){s===void 0&&(s=0);const l=[];for(let d=0;d<r.length;d++){const f=Ri(e,e._getRowId(r[d],d,o),r[d],d,s,void 0,o==null?void 0:o.id);if(n.flatRows.push(f),n.rowsById[f.id]=f,l.push(f),e.options.getSubRows){var a;f.originalSubRows=e.options.getSubRows(r[d],d),(a=f.originalSubRows)!=null&&a.length&&(f.subRows=i(f.originalSubRows,s+1,f))}}return l};return n.rows=i(t),n},w(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}/**
|
14
|
-
* react-table
|
15
|
-
*
|
16
|
-
* Copyright (c) TanStack
|
17
|
-
*
|
18
|
-
* This source code is licensed under the MIT license found in the
|
19
|
-
* LICENSE.md file in the root directory of this source tree.
|
20
|
-
*
|
21
|
-
* @license MIT
|
22
|
-
*/function hr(e,t){return e?er(e)?E.createElement(e,t):e:null}function er(e){return tr(e)||typeof e=="function"||nr(e)}function tr(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function nr(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function pr(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=E.useState(()=>({current:Zi(t)})),[i,r]=E.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...i,...e.state},onStateChange:o=>{r(o),e.onStateChange==null||e.onStateChange(o)}})),n.current}export{sr as Q,ur as a,dr as b,ut as c,Xn as d,or as e,hr as f,fr as g,gr as h,ar as i,cr as j,lr as q,pr as u};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as p,j as e}from"./@radix-AvWw-1nd.js";import{S as L}from"./package-BOms6B-A.js";import{I as v}from"./Infobox-BHEdNmME.js";import{b as R,C as T}from"./index.esm-cf-8NBxV.js";import{T as S}from"./Tick-CHW0jc8Y.js";import{b7 as O,b8 as H,b9 as V,aj as E,S as y,a0 as z,A as M,b as B,h as W,B as G,aC as F,aD as Y,aE as q,aF as Q,aG as $}from"./index-DPjvk73v.js";import{C as c}from"./ComponentBadge-FrujKBC6.js";import{s as w}from"./index-D-n6tspq.js";import{g as J}from"./ProviderRadio-DPmZHff_.js";import{a as N}from"./@tanstack-CcI3lvwB.js";import{S as D}from"./logs-D6_diV2k.js";import{C as k}from"./CodeSnippet-DUkCnBpQ.js";import{N as _}from"./NumberBox-BvBJYxCu.js";import{p as K,s as U}from"./persist-DHGuHP2H.js";import{S as X}from"./link-external-BYm_zH_8.js";import{C as ee}from"./ProviderIcon-CxeziA5a.js";const P=p.createContext(null);function Ee({children:a}){const{success:t,data:s}=K(),[r,n]=p.useState(!1),[l,i]=p.useState(!!t),[o,h]=p.useState(t?{location:s.location,provider:s.provider,stackName:s.stackName}:{}),[x,u]=p.useState(t?s.timestamp:""),m=p.useRef(null);return e.jsx(P.Provider,{value:{isNextButtonDisabled:r,setIsNextButtonDisabled:n,data:o,setData:h,isLoading:l,setIsLoading:i,formRef:m,timestamp:x,setTimestamp:u},children:a})}function A(){const a=p.useContext(P);if(a===null)throw new Error("useNewInfraFormContext must be used within an AuthProvider");return a}const re=a=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...a},p.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 12ZM12 4.5C12.5523 4.5 13 4.94772 13 5.5V6H13.1667C15.0076 6 16.5 7.49238 16.5 9.33333C16.5 9.88562 16.0523 10.3333 15.5 10.3333C14.9477 10.3333 14.5 9.88562 14.5 9.33333C14.5 8.59695 13.903 8 13.1667 8H11C10.1716 8 9.5 8.67157 9.5 9.5C9.5 10.3284 10.1716 11 11 11H13C14.933 11 16.5 12.567 16.5 14.5C16.5 16.433 14.933 18 13 18V18.5C13 19.0523 12.5523 19.5 12 19.5C11.4477 19.5 11 19.0523 11 18.5V18H10.8333C8.99238 18 7.5 16.5076 7.5 14.6667C7.5 14.1144 7.94772 13.6667 8.5 13.6667C9.05228 13.6667 9.5 14.1144 9.5 14.6667C9.5 15.403 10.097 16 10.8333 16H13C13.8284 16 14.5 15.3284 14.5 14.5C14.5 13.6716 13.8284 13 13 13H11C9.067 13 7.5 11.433 7.5 9.5C7.5 7.567 9.067 6 11 6V5.5C11 4.94772 11.4477 4.5 12 4.5Z"})),ae=a=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...a},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.16145 4L18.8385 4C19.3657 3.99998 19.8205 3.99997 20.195 4.03057C20.5904 4.06287 20.9836 4.13419 21.362 4.32698C21.9265 4.6146 22.3854 5.07354 22.673 5.63803C22.8658 6.01641 22.9371 6.40963 22.9694 6.80498C23 7.17954 23 7.6343 23 8.16144V15.8386C23 16.3657 23 16.8205 22.9694 17.195C22.9371 17.5904 22.8658 17.9836 22.673 18.362C22.3854 18.9265 21.9265 19.3854 21.362 19.673C20.9836 19.8658 20.5904 19.9371 20.195 19.9694C19.8205 20 19.3657 20 18.8386 20L5.16148 20C4.63432 20 4.17955 20 3.80497 19.9694C3.40963 19.9371 3.01641 19.8658 2.63803 19.673C2.07354 19.3854 1.6146 18.9265 1.32698 18.362C1.13419 17.9836 1.06287 17.5904 1.03057 17.195C0.999967 16.8205 0.999983 16.3657 1 15.8385L1 10.0006C1 10.0004 1 10.0008 1 10.0006C1 10.0004 1 9.99958 1 9.99937L1 8.16146C0.999983 7.63431 0.999968 7.17955 1.03057 6.80497C1.06287 6.40963 1.13419 6.01641 1.32698 5.63803C1.6146 5.07354 2.07354 4.6146 2.63803 4.32698C3.01641 4.13419 3.40963 4.06287 3.80497 4.03057C4.17955 3.99997 4.63431 3.99998 5.16145 4ZM3 11V15.8C3 16.3766 3.00078 16.7488 3.02393 17.0322C3.04612 17.3038 3.0838 17.4045 3.109 17.454C3.20487 17.6422 3.35785 17.7951 3.54601 17.891C3.59546 17.9162 3.69617 17.9539 3.96784 17.9761C4.25117 17.9992 4.62345 18 5.2 18L18.8 18C19.3766 18 19.7488 17.9992 20.0322 17.9761C20.3038 17.9539 20.4045 17.9162 20.454 17.891C20.6422 17.7951 20.7951 17.6422 20.891 17.454C20.9162 17.4045 20.9539 17.3038 20.9761 17.0322C20.9992 16.7488 21 16.3766 21 15.8V11H3ZM21 9H3V8.2C3 7.62345 3.00078 7.25117 3.02393 6.96784C3.04612 6.69617 3.0838 6.59546 3.109 6.54601C3.20487 6.35785 3.35785 6.20487 3.54601 6.109C3.59546 6.0838 3.69617 6.04612 3.96784 6.02393C4.25118 6.00078 4.62345 6 5.2 6L18.8 6C19.3766 6 19.7488 6.00078 20.0322 6.02393C20.3038 6.04613 20.4045 6.0838 20.454 6.109C20.6422 6.20487 20.7951 6.35785 20.891 6.54601C20.9162 6.59546 20.9539 6.69617 20.9761 6.96784C20.9992 7.25118 21 7.62345 21 8.2V9ZM5 14C5 13.4477 5.44772 13 6 13H11C11.5523 13 12 13.4477 12 14C12 14.5523 11.5523 15 11 15H6C5.44772 15 5 14.5523 5 14Z"}));function I({provider:a}){return e.jsxs(O,{children:[e.jsx(H,{className:"block",children:e.jsxs(v,{intent:"warning",children:["This will give ZenML permissions and create secret keys for secure ZenML -",">"," ",J(a)," communication. You can revoke these permissions at any time."]})}),e.jsx(V,{sideOffset:0,className:"w-auto p-5",children:e.jsx(E,{viewportClassName:"max-h-[300px]",children:e.jsx(te,{provider:a})})})]})}function te({provider:a}){const{isPending:t,isError:s,error:r,data:n}=N(w.stackDeploymentInfo({provider:a}));if(t)return e.jsx(y,{className:"h-[100px] w-full"});if(s)return e.jsx("p",{children:r.message});const l=Object.entries(n.permissions);return e.jsx("ul",{className:"space-y-2 pr-3 text-text-sm",children:l.map(([i,o])=>e.jsxs("li",{className:"flex flex-col gap-1",children:[e.jsx("p",{children:i}),e.jsx("ul",{className:"list-inside list-[square] pl-4 text-neutral-400 marker:text-primary-200",children:o.map((h,x)=>e.jsx("li",{children:h},x))})]},i))})}function se({stackName:a,isLoading:t,isSuccess:s,components:r,displayPermissions:n=!1}){var l,i,o,h,x,u,m,g,f,j,C,b;return e.jsxs("div",{className:"divide-y divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 text-text-lg font-semibold",children:[t&&e.jsx(z,{className:"h-5 w-5 shrink-0 border-[3px]"}),s&&e.jsx(S,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),e.jsx(M,{type:"square",size:"lg",children:e.jsx(B,{size:"lg",children:a[0]})}),a]}),e.jsxs("div",{className:"space-y-1 py-3 pl-9 pr-5",children:[e.jsx(d,{title:((l=r==null?void 0:r.connector)==null?void 0:l.name)||"IAM Role",isLoading:t,isSuccess:s,subtitle:((i=r==null?void 0:r.connector)==null?void 0:i.id)||"Manage access to AWS resources",badge:e.jsx(c,{type:"annotator",children:"Service Connector"}),img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/service_connector/iam.webp",alt:"IAM logo"}}),n&&e.jsx(I,{provider:"aws"})]}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(d,{title:((o=r==null?void 0:r.artifactStore)==null?void 0:o.name)||"S3 Bucket",subtitle:((h=r==null?void 0:r.artifactStore)==null?void 0:h.id)||"Artifact storage for ML pipelines",badge:e.jsx(c,{type:"artifact_store",children:"Artifact Store"}),isLoading:t,isSuccess:s,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/artifact_store/aws.png",alt:"S3 logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(d,{title:((x=r==null?void 0:r.registry)==null?void 0:x.name)||"ECR Repository",subtitle:((u=r==null?void 0:r.registry)==null?void 0:u.id)||"Container image storage",badge:e.jsx(c,{type:"container_registry",children:"Container Registry"}),isLoading:t,isSuccess:s,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/container_registry/aws.png",alt:"ECR logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(d,{title:((m=r==null?void 0:r.orchestrator)==null?void 0:m.name)||"SageMaker",isLoading:t,isSuccess:s,subtitle:((g=r==null?void 0:r.orchestrator)==null?void 0:g.id)||"ML Workflow orchestration",badge:e.jsx(c,{type:"orchestrator",children:"Orchestrator"}),img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/orchestrator/sagemaker.png",alt:"Sagemaker logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(d,{title:((f=r==null?void 0:r.operator)==null?void 0:f.name)||"Sagemaker Step Operator",subtitle:((j=r==null?void 0:r.operator)==null?void 0:j.id)||"Execute individual steps",badge:e.jsx(c,{type:"step_operator",children:"Step Operator"}),isLoading:t,isSuccess:s,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/step_operator/sagemaker.png",alt:"Sagemaker step operator logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(d,{title:((C=r==null?void 0:r.imageBuilder)==null?void 0:C.name)||"AWS Image Builder",subtitle:((b=r==null?void 0:r.imageBuilder)==null?void 0:b.id)||"Build and manage container images",badge:e.jsx(c,{type:"image_builder",children:"Image Builder"}),isLoading:t,isSuccess:s,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/image_builder/aws.png",alt:"AWS Image Builder logo"}})})]})}function le({stackName:a,isLoading:t,isSuccess:s,components:r,displayPermissions:n=!1}){var l,i,o,h,x,u,m,g,f,j,C,b;return e.jsxs("div",{className:"divide-y divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 text-text-lg font-semibold",children:[t&&e.jsx(z,{className:"h-5 w-5 shrink-0 border-[3px]"}),s&&e.jsx(S,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),e.jsx(M,{type:"square",size:"lg",children:e.jsx(B,{size:"lg",children:a[0]})}),a]}),e.jsxs("div",{className:"space-y-1 py-3 pl-9 pr-5",children:[e.jsx(d,{title:((l=r==null?void 0:r.connector)==null?void 0:l.name)||"Service Account",isLoading:t,isSuccess:s,subtitle:((i=r==null?void 0:r.connector)==null?void 0:i.id)||"Manage access to GCP resources",badge:e.jsx(c,{type:"annotator",children:"Service Connector"}),img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/service_connector/gcp-iam.webp",alt:"Service Account logo"}}),n&&e.jsx(I,{provider:"gcp"})]}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(d,{title:((o=r==null?void 0:r.artifactStore)==null?void 0:o.name)||"GCS Bucket",subtitle:((h=r==null?void 0:r.artifactStore)==null?void 0:h.id)||"Artifact storage for ML pipelines",badge:e.jsx(c,{type:"artifact_store",children:"Artifact Store"}),isLoading:t,isSuccess:s,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/artifact_store/gcp.png",alt:"GCS logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(d,{title:((x=r==null?void 0:r.registry)==null?void 0:x.name)||"Google Artifact Registry",subtitle:((u=r==null?void 0:r.registry)==null?void 0:u.id)||"Container image storage",badge:e.jsx(c,{type:"container_registry",children:"Container Registry"}),isLoading:t,isSuccess:s,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/container_registry/gcp.png",alt:"Google Artifact Registry logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(d,{title:((m=r==null?void 0:r.orchestrator)==null?void 0:m.name)||"Vertex AI",isLoading:t,isSuccess:s,subtitle:((g=r==null?void 0:r.orchestrator)==null?void 0:g.id)||"ML Workflow orchestration",badge:e.jsx(c,{type:"orchestrator",children:"Orchestrator"}),img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/orchestrator/vertexai.png",alt:"VertexAI logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(d,{title:((f=r==null?void 0:r.imageBuilder)==null?void 0:f.name)||"Cloud Build",isLoading:t,isSuccess:s,subtitle:((j=r==null?void 0:r.imageBuilder)==null?void 0:j.id)||"Build, test, and deploy images",badge:e.jsx(c,{type:"image_builder",children:"Image Builder"}),img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/image_builder/gcp.png",alt:"Cloud Build logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(d,{title:((C=r==null?void 0:r.operator)==null?void 0:C.name)||"Vertex Step Operator",subtitle:((b=r==null?void 0:r.operator)==null?void 0:b.id)||"Execute individual steps",badge:e.jsx(c,{type:"step_operator",children:"Step Operator"}),isLoading:t,isSuccess:s,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/step_operator/vertexai.png",alt:"Vertex step operator logo"}})})]})}function ie(){return e.jsx(v,{className:"border-warning-300 bg-warning-50",intent:"warning",children:'The Cloud Shell session will warn you that the ZenML GitHub repository is untrusted. We recommend that you review the contents of the repository and then check the "Trust repo" checkbox to proceed with the deployment, otherwise the Cloud Shell session will not be authenticated to access your GCP projects.'})}function ce(){const{data:a}=A(),t=N({...w.stackDeploymentConfig({provider:"gcp",stack_name:a.stackName,location:a.location})});return t.isError?null:t.isPending?e.jsx(y,{className:"h-[200px] w-full"}):e.jsxs("section",{className:"space-y-5 border-t border-theme-border-moderate pt-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(D,{className:"h-5 w-5 fill-primary-400"}),"Configuration"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"You will be asked to provide the following configuration values during the deployment process."})]}),e.jsx(k,{fullWidth:!0,highlightCode:!0,codeClasses:"whitespace-pre-wrap word-break-all",wrap:!0,code:t.data.configuration||""})]})}function De(){const{data:a}=A();return e.jsxs("div",{className:"space-y-5",children:[e.jsx(v,{children:"This will provision and register a basic ZenML stack with all the necessary resources and credentials required to run pipelines."}),a.provider!=="azure"&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[e.jsx(ee,{provider:a.provider,className:"h-5 w-5"}),e.jsx("p",{className:"text-text-lg font-semibold",children:"Deploy the Stack"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Deploy the stack from your browser by clicking the button below:"})]}),a.provider==="gcp"&&e.jsx(ie,{}),a.provider!=="azure"&&e.jsx(Z,{setTimestampBool:!0}),a.provider==="gcp"&&e.jsx(ce,{}),a.provider==="azure"&&e.jsx(oe,{displayInfobox:!0})]})}function Z({setTimestampBool:a,children:t}){const{data:s,setTimestamp:r,setIsLoading:n}=A(),l=N({...w.stackDeploymentConfig({provider:s.provider,location:s.location,stack_name:s.stackName})});if(l.isError)return null;if(l.isPending)return e.jsx(y,{className:"h-[48px] w-[100px]"});function i(){const o=new Date().toISOString().slice(0,-1);a&&r(o),U({location:s.location||"",provider:s.provider||"aws",stackName:s.stackName,timestamp:o}),n(!0)}return e.jsx(W,{asChild:!0,className:"w-fit gap-3 whitespace-nowrap",size:"lg",onClick:()=>i(),children:e.jsxs("a",{href:l.data.deployment_url,target:"_blank",rel:"noopener noreferrer",children:[t||e.jsxs("div",{children:["Deploy in ",e.jsx("span",{className:"uppercase",children:s.provider})]}),e.jsx(X,{className:"h-5 w-5 shrink-0 fill-white"})]})})}function de({stackName:a,isLoading:t,isSuccess:s,components:r,displayPermissions:n=!1}){var l,i,o,h,x,u,m,g,f,j;return e.jsxs("div",{className:"divide-y divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 text-text-lg font-semibold",children:[t&&e.jsx(z,{className:"h-5 w-5 shrink-0 border-[3px]"}),s&&e.jsx(S,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),e.jsx(M,{type:"square",size:"lg",children:e.jsx(B,{size:"lg",children:a[0]})}),a]}),e.jsxs("div",{className:"space-y-1 py-3 pl-9 pr-5",children:[e.jsx(d,{title:((l=r==null?void 0:r.connector)==null?void 0:l.name)||"Azure Service Principal",isLoading:t,isSuccess:s,subtitle:((i=r==null?void 0:r.connector)==null?void 0:i.id)||"Manage access to Azure resources",badge:e.jsx(c,{type:"annotator",children:"Service Connector"}),img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/service_connector/azure-service-principal.webp",alt:"Service Principal logo"}}),n&&e.jsx(I,{provider:"azure"})]}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(d,{title:((o=r==null?void 0:r.artifactStore)==null?void 0:o.name)||"Azure Blob Storage",subtitle:((h=r==null?void 0:r.artifactStore)==null?void 0:h.id)||"Artifact storage for ML pipelines",badge:e.jsx(c,{type:"artifact_store",children:"Artifact Store"}),isLoading:t,isSuccess:s,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/artifact_store/azure.png",alt:"Blob Storage logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(d,{title:((x=r==null?void 0:r.registry)==null?void 0:x.name)||"Azure Container Registry",subtitle:((u=r==null?void 0:r.registry)==null?void 0:u.id)||"Container image storage",badge:e.jsx(c,{type:"container_registry",children:"Container Registry"}),isLoading:t,isSuccess:s,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/container_registry/azure.png",alt:"Azure Container Registry logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(d,{title:((m=r==null?void 0:r.orchestrator)==null?void 0:m.name)||"Azure ML",isLoading:t,isSuccess:s,subtitle:((g=r==null?void 0:r.orchestrator)==null?void 0:g.id)||"ML Workflow orchestration",badge:e.jsx(c,{type:"orchestrator",children:"Orchestrator"}),img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/orchestrator/azureml.png",alt:"Azure ML logo"}})}),e.jsx("div",{className:"py-3 pl-9 pr-5",children:e.jsx(d,{title:((f=r==null?void 0:r.operator)==null?void 0:f.name)||"Azure Step Operator",subtitle:((j=r==null?void 0:r.operator)==null?void 0:j.id)||"Execute individual steps",badge:e.jsx(c,{type:"step_operator",children:"Step Operator"}),isLoading:t,isSuccess:s,img:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/step_operator/azureml.png",alt:"Azure Step Operator logo"}})})]})}function oe({displayInfobox:a=!1}){return e.jsxs("section",{className:"space-y-5",children:[e.jsx(pe,{}),e.jsx(ne,{displayInfobox:a}),e.jsx(xe,{}),e.jsx(he,{})]})}function ne({displayInfobox:a=!1}){return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(_,{children:"1"}),e.jsx("span",{className:"text-text-lg font-semibold",children:"Open the Azure Cloud Shell Console"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Deploy the stack using the Azure Cloud Shell console."})]}),e.jsx(Z,{setTimestampBool:!0,children:e.jsx("span",{className:"text-text-lg font-semibold",children:"Open the Azure Cloud Shell"})}),a&&e.jsx(v,{className:"border-warning-300 bg-warning-50",intent:"warning",children:"After the Terraform deployment is complete, you can close the Cloud Shell session and return to the dashboard to view details about the associated ZenML stack automatically registered with ZenML."})]})}function xe(){return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(_,{children:"2"}),e.jsx("span",{className:"text-text-lg font-semibold",children:"Create a file with the following configuration"})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Create a file named ",e.jsx("code",{className:"font-mono text-primary-400",children:"main.tf"})," in the Cloud Shell and copy and paste the Terraform configuration below into it."]})]}),e.jsx(ue,{})]})}function he(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"space-y-1",children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(_,{children:"3"}),e.jsx("span",{className:"text-text-lg font-semibold",children:"Run the following commands"})]})}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Initialize the Terraform configuration."}),e.jsx(k,{code:"terraform init --upgrade"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Run terraform apply to deploy the ZenML stack to Azure."}),e.jsx(k,{code:"terraform apply"})]})]})}function ue(){const{data:a}=A(),t=N({...w.stackDeploymentConfig({provider:"azure",stack_name:a.stackName,location:a.location}),enabled:!!a.stackName});return t.isError?null:t.isPending?e.jsx(y,{className:"h-[200px] w-full"}):e.jsx(k,{fullWidth:!0,highlightCode:!0,codeClasses:"whitespace-pre-wrap word-break-all",wrap:!0,code:t.data.configuration||""})}function pe(){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(D,{className:"h-5 w-5 fill-primary-400"}),"Configuration"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"You will be asked to provide the following configuration values during the deployment process."})]})}function me({componentProps:a,type:t}){switch(t){case"aws":return e.jsx(se,{...a});case"gcp":return e.jsx(le,{...a});case"azure":return e.jsx(de,{...a})}}function d({img:a,title:t,subtitle:s,badge:r,isSuccess:n,isLoading:l}){return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[l&&e.jsx(z,{className:"h-5 w-5 shrink-0 border-[3px]"}),n&&e.jsx(S,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),e.jsx("img",{width:"40",height:"40",alt:a.alt,src:a.src}),e.jsxs("div",{children:[e.jsx("p",{className:"text-text-lg font-semibold",children:t}),e.jsx("p",{className:"text-theme-text-secondary",children:s})]})]}),r]})}function Pe({provider:a}){function t(){let s="#";switch(a){case"aws":s="https://calculator.aws/#/";break;case"gcp":s="https://cloud.google.com/products/calculator";break;case"azure":s="https://azure.microsoft.com/en-us/pricing/calculator/";break}return e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"link",children:"official pricing calculator"})}return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(re,{className:"h-5 w-5 fill-primary-400"}),"Estimated Cost"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"These are rough estimates and actual costs may vary based on your usage."})]}),e.jsxs(G,{className:"flex items-start gap-[10px] p-3",children:[e.jsx("div",{className:"content-center rounded-sm bg-blue-25 p-1",children:e.jsx(ae,{className:"h-5 w-5 fill-blue-400"})}),e.jsxs("div",{children:[e.jsxs("p",{children:["A small training job would cost around:"," ",e.jsx("span",{className:"font-semibold text-theme-text-success",children:"$0.60"})]}),e.jsxs("p",{className:"text-text-xs text-theme-text-secondary",children:["Please use the ",e.jsx(t,{})," for a detailed estimate"]})]})]})]})}const ge=a=>p.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...a},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3C8.13401 3 5 6.13401 5 10C5 11.8921 5.85317 13.678 7.29228 15.5467C8.50741 17.1245 10.0627 18.6673 11.7323 20.3233C11.8212 20.4115 11.9105 20.5 12 20.5889C12.0895 20.5 12.1788 20.4115 12.2677 20.3233C13.9373 18.6673 15.4926 17.1245 16.7077 15.5467C18.1468 13.678 19 11.8921 19 10C19 6.13401 15.866 3 12 3ZM3 10C3 5.02944 7.02944 1 12 1C16.9706 1 21 5.02944 21 10C21 12.5262 19.8532 14.7402 18.2923 16.767C16.988 18.4607 15.3185 20.1156 13.6508 21.7689C13.3354 22.0816 13.02 22.3943 12.7071 22.7071C12.3166 23.0976 11.6834 23.0976 11.2929 22.7071C10.98 22.3943 10.6646 22.0816 10.3492 21.7689C8.68147 20.1156 7.01205 18.4607 5.70772 16.767C4.14683 14.7402 3 12.5262 3 10ZM12 8C10.8954 8 10 8.89543 10 10C10 11.1046 10.8954 12 12 12C13.1046 12 14 11.1046 14 10C14 8.89543 13.1046 8 12 8ZM8 10C8 7.79086 9.79086 6 12 6C14.2091 6 16 7.79086 16 10C16 12.2091 14.2091 14 12 14C9.79086 14 8 12.2091 8 10Z"}));function fe({provider:a}){const{control:t}=R(),{isPending:s,isError:r,data:n}=N({...w.stackDeploymentInfo({provider:a})});if(r)return null;if(s)return e.jsx(y,{className:"h-[40px] w-[100px]"});const l=Object.entries(n.locations);return e.jsx(T,{control:t,name:"region",render:({field:{onChange:i,ref:o,...h}})=>e.jsxs(F,{...h,onValueChange:i,children:[e.jsx(Y,{className:"border border-neutral-300 text-left text-text-md",children:e.jsx(q,{className:"flex items-center gap-2",placeholder:"Select your Location"})}),e.jsx(Q,{children:e.jsx(E,{viewportClassName:"max-h-[300px]",children:l.map(([x,u])=>e.jsxs($,{value:u,children:[x," - ",e.jsx("span",{className:"text-theme-text-secondary",children:u})]},x))})})]})})}function Ze({provider:a}){return e.jsxs("div",{className:"space-y-5 border-b border-theme-border-moderate pb-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(ge,{className:"h-5 w-5 fill-primary-400"}),"Choose Your Location"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select where you want to deploy your cloud infrastructure for optimal performance and compliance."})]}),e.jsx(fe,{provider:a})]})}function Le({provider:a}){const{watch:t}=R();return e.jsxs("div",{className:"space-y-5 border-b border-theme-border-moderate pb-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(L,{className:"h-5 w-5 fill-primary-400"}),"Review Your Stack Components"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"The following components will be created for your ZenML stack."})]}),e.jsx(me,{type:a,componentProps:{displayPermissions:!0,stackName:t("stackName")}}),e.jsx(v,{children:"These resources create a basic ZenML stack for ML workflow management. ZenML supports highly flexible stacks. You can build advanced stacks at any time, combining your preferred tools and components for more complex MLOps."})]})}export{oe as A,me as C,Z as D,Pe as E,ce as G,Ee as N,Ze as R,Le as a,De as b,A as u};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{j as e}from"./@radix-AvWw-1nd.js";import{R as o}from"./index-DPjvk73v.js";function a(){return e.jsx(o,{color:"yellow",rounded:!1,className:"rounded-md",children:e.jsx("span",{className:"font-semibold uppercase",children:"Pro"})})}export{a as P};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{j as r}from"./@radix-AvWw-1nd.js";import{F as s}from"./Wizard-XEp9rGmf.js";import{a}from"./ProviderRadio-DPmZHff_.js";function n({children:o,displayCancel:t=!0}){return r.jsxs(s,{children:[t&&r.jsx(a,{}),o]})}export{n as S};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{F as o,o as r,p as i}from"./index-DPjvk73v.js";import{b as u}from"./@tanstack-CcI3lvwB.js";async function c({runId:e}){const a=r(i.runs.detail(e)),t=await fetch(a,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!t.ok){const s=await t.json().then(n=>n.detail).catch(()=>`Failed to delete run ${e}`);throw new o({status:t.status,statusText:t.statusText,message:s})}return t.json()}function p(e){return u({mutationFn:c,...e})}export{p as u};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{q as o}from"./@tanstack-CcI3lvwB.js";import{s as n,F as i,o as c,p as u}from"./index-DPjvk73v.js";async function l({workspaceId:e}){const a=c(u.workspaces.detail(e)),t=await fetch(a,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(t.status===404&&n(),!t.ok){const r=await t.json().then(s=>Array.isArray(s.detail)?s.detail[1]:s.detail).catch(()=>`Error while fetching workspace ${e}`);throw new i({status:t.status,statusText:t.statusText,message:r})}return t.json()}const p={all:["workspaces"],workspaceDetail:e=>o({queryKey:[...p.all,e],queryFn:async()=>l({workspaceId:e})})};export{p as w};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{c as b}from"./@radix-AvWw-1nd.js";var ve=e=>e.type==="checkbox",le=e=>e instanceof Date,K=e=>e==null;const dr=e=>typeof e=="object";var U=e=>!K(e)&&!Array.isArray(e)&&dr(e)&&!le(e),fr=e=>U(e)&&e.target?ve(e.target)?e.target.checked:e.target.value:e,Lr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,yr=(e,t)=>e.has(Lr(t)),Rr=e=>{const t=e.constructor&&e.constructor.prototype;return U(t)&&t.hasOwnProperty("isPrototypeOf")},He=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function N(e){let t;const r=Array.isArray(e),i=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(He&&(e instanceof Blob||i))&&(r||U(e)))if(t=r?[]:{},!r&&!Rr(e))t=e;else for(const u in e)e.hasOwnProperty(u)&&(t[u]=N(e[u]));else return e;return t}var be=e=>Array.isArray(e)?e.filter(Boolean):[],C=e=>e===void 0,c=(e,t,r)=>{if(!t||!U(e))return r;const i=be(t.split(/[,[\].]+?/)).reduce((u,l)=>K(u)?u:u[l],e);return C(i)||i===e?C(e[t])?r:e[t]:i},Y=e=>typeof e=="boolean",$e=e=>/^\w*$/.test(e),_r=e=>be(e.replace(/["|']|\]/g,"").split(/\.|\[/)),k=(e,t,r)=>{let i=-1;const u=$e(t)?[t]:_r(t),l=u.length,f=l-1;for(;++i<l;){const _=u[i];let F=r;if(i!==f){const p=e[_];F=U(p)||Array.isArray(p)?p:isNaN(+u[i+1])?{}:[]}if(_==="__proto__"||_==="constructor"||_==="prototype")return;e[_]=F,e=e[_]}return e};const Fe={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},J={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},se={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},gr=b.createContext(null),pe=()=>b.useContext(gr),rt=e=>{const{children:t,...r}=e;return b.createElement(gr.Provider,{value:r},t)};var hr=(e,t,r,i=!0)=>{const u={defaultValues:t._defaultValues};for(const l in e)Object.defineProperty(u,l,{get:()=>{const f=l;return t._proxyFormState[f]!==J.all&&(t._proxyFormState[f]=!i||J.all),r&&(r[f]=!0),e[f]}});return u},$=e=>U(e)&&!Object.keys(e).length,vr=(e,t,r,i)=>{r(e);const{name:u,...l}=e;return $(l)||Object.keys(l).length>=Object.keys(t).length||Object.keys(l).find(f=>t[f]===(!i||J.all))},z=e=>Array.isArray(e)?e:[e],br=(e,t,r)=>!e||!t||e===t||z(e).some(i=>i&&(r?i===t:i.startsWith(t)||t.startsWith(i)));function Se(e){const t=b.useRef(e);t.current=e,b.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function Mr(e){const t=pe(),{control:r=t.control,disabled:i,name:u,exact:l}=e||{},[f,_]=b.useState(r._formState),F=b.useRef(!0),p=b.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),S=b.useRef(u);return S.current=u,Se({disabled:i,next:m=>F.current&&br(S.current,m.name,l)&&vr(m,p.current,r._updateFormState)&&_({...r._formState,...m}),subject:r._subjects.state}),b.useEffect(()=>(F.current=!0,p.current.isValid&&r._updateValid(!0),()=>{F.current=!1}),[r]),b.useMemo(()=>hr(f,r,p.current,!1),[f,r])}var te=e=>typeof e=="string",mr=(e,t,r,i,u)=>te(e)?(i&&t.watch.add(e),c(r,e,u)):Array.isArray(e)?e.map(l=>(i&&t.watch.add(l),c(r,l))):(i&&(t.watchAll=!0),r);function Nr(e){const t=pe(),{control:r=t.control,name:i,defaultValue:u,disabled:l,exact:f}=e||{},_=b.useRef(i);_.current=i,Se({disabled:l,subject:r._subjects.values,next:S=>{br(_.current,S.name,f)&&p(N(mr(_.current,r._names,S.values||r._formValues,!1,u)))}});const[F,p]=b.useState(r._getWatch(i,u));return b.useEffect(()=>r._removeUnmounted()),F}function Br(e){const t=pe(),{name:r,disabled:i,control:u=t.control,shouldUnregister:l}=e,f=yr(u._names.array,r),_=Nr({control:u,name:r,defaultValue:c(u._formValues,r,c(u._defaultValues,r,e.defaultValue)),exact:!0}),F=Mr({control:u,name:r,exact:!0}),p=b.useRef(u.register(r,{...e.rules,value:_,...Y(e.disabled)?{disabled:e.disabled}:{}})),S=b.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!c(F.errors,r)},isDirty:{enumerable:!0,get:()=>!!c(F.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!c(F.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!c(F.validatingFields,r)},error:{enumerable:!0,get:()=>c(F.errors,r)}}),[F,r]),m=b.useMemo(()=>({name:r,value:_,...Y(i)||F.disabled?{disabled:F.disabled||i}:{},onChange:L=>p.current.onChange({target:{value:fr(L),name:r},type:Fe.CHANGE}),onBlur:()=>p.current.onBlur({target:{value:c(u._formValues,r),name:r},type:Fe.BLUR}),ref:L=>{const E=c(u._fields,r);E&&L&&(E._f.ref={focus:()=>L.focus(),select:()=>L.select(),setCustomValidity:B=>L.setCustomValidity(B),reportValidity:()=>L.reportValidity()})}}),[r,u._formValues,i,F.disabled,_,u._fields]);return b.useEffect(()=>{const L=u._options.shouldUnregister||l,E=(B,W)=>{const H=c(u._fields,B);H&&H._f&&(H._f.mount=W)};if(E(r,!0),L){const B=N(c(u._options.defaultValues,r));k(u._defaultValues,r,B),C(c(u._formValues,r))&&k(u._formValues,r,B)}return!f&&u.register(r),()=>{(f?L&&!u._state.action:L)?u.unregister(r):E(r,!1)}},[r,u,f,l]),b.useEffect(()=>{u._updateDisabledField({disabled:i,fields:u._fields,name:r})},[i,r,u]),b.useMemo(()=>({field:m,formState:F,fieldState:S}),[m,F,S])}const tt=e=>e.render(Br(e));var Ir=(e,t,r,i,u)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:u||!0}}:{},ae=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Ce=(e,t,r={})=>r.shouldFocus||C(r.shouldFocus)?r.focusName||`${e}.${C(r.focusIndex)?t:r.focusIndex}.`:"",he=e=>({isOnSubmit:!e||e===J.onSubmit,isOnBlur:e===J.onBlur,isOnChange:e===J.onChange,isOnAll:e===J.all,isOnTouch:e===J.onTouched}),je=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const ce=(e,t,r,i)=>{for(const u of r||Object.keys(e)){const l=c(e,u);if(l){const{_f:f,..._}=l;if(f){if(f.refs&&f.refs[0]&&t(f.refs[0],u)&&!i)return!0;if(f.ref&&t(f.ref,f.name)&&!i)return!0;if(ce(_,t))break}else if(U(_)&&ce(_,t))break}}};var Fr=(e,t,r)=>{const i=z(c(e,r));return k(i,"root",t[r]),k(e,r,i),e},Ke=e=>e.type==="file",re=e=>typeof e=="function",Ae=e=>{if(!He)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},me=e=>te(e),ze=e=>e.type==="radio",Ve=e=>e instanceof RegExp;const ir={value:!1,isValid:!1},ar={value:!0,isValid:!0};var Ar=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!C(e[0].attributes.value)?C(e[0].value)||e[0].value===""?ar:{value:e[0].value,isValid:!0}:ar:ir}return ir};const ur={isValid:!1,value:null};var Vr=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,ur):ur;function nr(e,t,r="validate"){if(me(e)||Array.isArray(e)&&e.every(me)||Y(e)&&!e)return{type:r,message:me(e)?e:"",ref:t}}var oe=e=>U(e)&&!Ve(e)?e:{value:e,message:""},We=async(e,t,r,i,u,l)=>{const{ref:f,refs:_,required:F,maxLength:p,minLength:S,min:m,max:L,pattern:E,validate:B,name:W,valueAsNumber:H,mount:ee}=e._f,w=c(r,W);if(!ee||t.has(W))return{};const Q=_?_[0]:f,X=x=>{u&&Q.reportValidity&&(Q.setCustomValidity(Y(x)?"":x||""),Q.reportValidity())},T={},h=ze(f),v=ve(f),A=h||v,O=(H||Ke(f))&&C(f.value)&&C(w)||Ae(f)&&f.value===""||w===""||Array.isArray(w)&&!w.length,I=Ir.bind(null,W,i,T),ne=(x,D,M,q=se.maxLength,Z=se.minLength)=>{const G=x?D:M;T[W]={type:x?q:Z,message:G,ref:f,...I(x?q:Z,G)}};if(l?!Array.isArray(w)||!w.length:F&&(!A&&(O||K(w))||Y(w)&&!w||v&&!Ar(_).isValid||h&&!Vr(_).isValid)){const{value:x,message:D}=me(F)?{value:!!F,message:F}:oe(F);if(x&&(T[W]={type:se.required,message:D,ref:Q,...I(se.required,D)},!i))return X(D),T}if(!O&&(!K(m)||!K(L))){let x,D;const M=oe(L),q=oe(m);if(!K(w)&&!isNaN(w)){const Z=f.valueAsNumber||w&&+w;K(M.value)||(x=Z>M.value),K(q.value)||(D=Z<q.value)}else{const Z=f.valueAsDate||new Date(w),G=ye=>new Date(new Date().toDateString()+" "+ye),de=f.type=="time",fe=f.type=="week";te(M.value)&&w&&(x=de?G(w)>G(M.value):fe?w>M.value:Z>new Date(M.value)),te(q.value)&&w&&(D=de?G(w)<G(q.value):fe?w<q.value:Z<new Date(q.value))}if((x||D)&&(ne(!!x,M.message,q.message,se.max,se.min),!i))return X(T[W].message),T}if((p||S)&&!O&&(te(w)||l&&Array.isArray(w))){const x=oe(p),D=oe(S),M=!K(x.value)&&w.length>+x.value,q=!K(D.value)&&w.length<+D.value;if((M||q)&&(ne(M,x.message,D.message),!i))return X(T[W].message),T}if(E&&!O&&te(w)){const{value:x,message:D}=oe(E);if(Ve(x)&&!w.match(x)&&(T[W]={type:se.pattern,message:D,ref:f,...I(se.pattern,D)},!i))return X(D),T}if(B){if(re(B)){const x=await B(w,r),D=nr(x,Q);if(D&&(T[W]={...D,...I(se.validate,D.message)},!i))return X(D.message),T}else if(U(B)){let x={};for(const D in B){if(!$(x)&&!i)break;const M=nr(await B[D](w,r),Q,D);M&&(x={...M,...I(D,M.message)},X(M.message),i&&(T[W]=x))}if(!$(x)&&(T[W]={ref:Q,...x},!i))return T}}return X(!0),T},Oe=(e,t)=>[...e,...z(t)],Te=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Ue(e,t,r){return[...e.slice(0,t),...z(r),...e.slice(t)]}var Le=(e,t,r)=>Array.isArray(e)?(C(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Re=(e,t)=>[...z(t),...z(e)];function Pr(e,t){let r=0;const i=[...e];for(const u of t)i.splice(u-r,1),r++;return be(i).length?i:[]}var Me=(e,t)=>C(t)?[]:Pr(e,z(t).sort((r,i)=>r-i)),Ne=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]};function jr(e,t){const r=t.slice(0,-1).length;let i=0;for(;i<r;)e=C(e)?i++:e[t[i++]];return e}function Wr(e){for(const t in e)if(e.hasOwnProperty(t)&&!C(e[t]))return!1;return!0}function R(e,t){const r=Array.isArray(t)?t:$e(t)?[t]:_r(t),i=r.length===1?e:jr(e,r),u=r.length-1,l=r[u];return i&&delete i[l],u!==0&&(U(i)&&$(i)||Array.isArray(i)&&Wr(i))&&R(e,r.slice(0,-1)),e}var lr=(e,t,r)=>(e[t]=r,e);function st(e){const t=pe(),{control:r=t.control,name:i,keyName:u="id",shouldUnregister:l,rules:f}=e,[_,F]=b.useState(r._getFieldArray(i)),p=b.useRef(r._getFieldArray(i).map(ae)),S=b.useRef(_),m=b.useRef(i),L=b.useRef(!1);m.current=i,S.current=_,r._names.array.add(i),f&&r.register(i,f),Se({next:({values:h,name:v})=>{if(v===m.current||!v){const A=c(h,m.current);Array.isArray(A)&&(F(A),p.current=A.map(ae))}},subject:r._subjects.array});const E=b.useCallback(h=>{L.current=!0,r._updateFieldArray(i,h)},[r,i]),B=(h,v)=>{const A=z(N(h)),O=Oe(r._getFieldArray(i),A);r._names.focus=Ce(i,O.length-1,v),p.current=Oe(p.current,A.map(ae)),E(O),F(O),r._updateFieldArray(i,O,Oe,{argA:Te(h)})},W=(h,v)=>{const A=z(N(h)),O=Re(r._getFieldArray(i),A);r._names.focus=Ce(i,0,v),p.current=Re(p.current,A.map(ae)),E(O),F(O),r._updateFieldArray(i,O,Re,{argA:Te(h)})},H=h=>{const v=Me(r._getFieldArray(i),h);p.current=Me(p.current,h),E(v),F(v),!Array.isArray(c(r._fields,i))&&k(r._fields,i,void 0),r._updateFieldArray(i,v,Me,{argA:h})},ee=(h,v,A)=>{const O=z(N(v)),I=Ue(r._getFieldArray(i),h,O);r._names.focus=Ce(i,h,A),p.current=Ue(p.current,h,O.map(ae)),E(I),F(I),r._updateFieldArray(i,I,Ue,{argA:h,argB:Te(v)})},w=(h,v)=>{const A=r._getFieldArray(i);Ne(A,h,v),Ne(p.current,h,v),E(A),F(A),r._updateFieldArray(i,A,Ne,{argA:h,argB:v},!1)},Q=(h,v)=>{const A=r._getFieldArray(i);Le(A,h,v),Le(p.current,h,v),E(A),F(A),r._updateFieldArray(i,A,Le,{argA:h,argB:v},!1)},X=(h,v)=>{const A=N(v),O=lr(r._getFieldArray(i),h,A);p.current=[...O].map((I,ne)=>!I||ne===h?ae():p.current[ne]),E(O),F([...O]),r._updateFieldArray(i,O,lr,{argA:h,argB:A},!0,!1)},T=h=>{const v=z(N(h));p.current=v.map(ae),E([...v]),F([...v]),r._updateFieldArray(i,[...v],A=>A,{},!0,!1)};return b.useEffect(()=>{if(r._state.action=!1,je(i,r._names)&&r._subjects.state.next({...r._formState}),L.current&&(!he(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([i]).then(h=>{const v=c(h.errors,i),A=c(r._formState.errors,i);(A?!v&&A.type||v&&(A.type!==v.type||A.message!==v.message):v&&v.type)&&(v?k(r._formState.errors,i,v):R(r._formState.errors,i),r._subjects.state.next({errors:r._formState.errors}))});else{const h=c(r._fields,i);h&&h._f&&!(he(r._options.reValidateMode).isOnSubmit&&he(r._options.mode).isOnSubmit)&&We(h,r._names.disabled,r._formValues,r._options.criteriaMode===J.all,r._options.shouldUseNativeValidation,!0).then(v=>!$(v)&&r._subjects.state.next({errors:Fr(r._formState.errors,v,i)}))}r._subjects.values.next({name:i,values:{...r._formValues}}),r._names.focus&&ce(r._fields,(h,v)=>{if(r._names.focus&&v.startsWith(r._names.focus)&&h.focus)return h.focus(),1}),r._names.focus="",r._updateValid(),L.current=!1},[_,i,r]),b.useEffect(()=>(!c(r._formValues,i)&&r._updateFieldArray(i),()=>{(r._options.shouldUnregister||l)&&r.unregister(i)}),[i,r,u,l]),{swap:b.useCallback(w,[E,i,r]),move:b.useCallback(Q,[E,i,r]),prepend:b.useCallback(W,[E,i,r]),append:b.useCallback(B,[E,i,r]),remove:b.useCallback(H,[E,i,r]),insert:b.useCallback(ee,[E,i,r]),update:b.useCallback(X,[E,i,r]),replace:b.useCallback(T,[E,i,r]),fields:b.useMemo(()=>_.map((h,v)=>({...h,[u]:p.current[v]||ae()})),[_,u])}}var Be=()=>{let e=[];return{get observers(){return e},next:u=>{for(const l of e)l.next&&l.next(u)},subscribe:u=>(e.push(u),{unsubscribe:()=>{e=e.filter(l=>l!==u)}}),unsubscribe:()=>{e=[]}}},qe=e=>K(e)||!dr(e);function ue(e,t){if(qe(e)||qe(t))return e===t;if(le(e)&&le(t))return e.getTime()===t.getTime();const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(const u of r){const l=e[u];if(!i.includes(u))return!1;if(u!=="ref"){const f=t[u];if(le(l)&&le(f)||U(l)&&U(f)||Array.isArray(l)&&Array.isArray(f)?!ue(l,f):l!==f)return!1}}return!0}var xr=e=>e.type==="select-multiple",qr=e=>ze(e)||ve(e),Ie=e=>Ae(e)&&e.isConnected,pr=e=>{for(const t in e)if(re(e[t]))return!0;return!1};function xe(e,t={}){const r=Array.isArray(e);if(U(e)||r)for(const i in e)Array.isArray(e[i])||U(e[i])&&!pr(e[i])?(t[i]=Array.isArray(e[i])?[]:{},xe(e[i],t[i])):K(e[i])||(t[i]=!0);return t}function Sr(e,t,r){const i=Array.isArray(e);if(U(e)||i)for(const u in e)Array.isArray(e[u])||U(e[u])&&!pr(e[u])?C(t)||qe(r[u])?r[u]=Array.isArray(e[u])?xe(e[u],[]):{...xe(e[u])}:Sr(e[u],K(t)?{}:t[u],r[u]):r[u]=!ue(e[u],t[u]);return r}var _e=(e,t)=>Sr(e,t,xe(t)),wr=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:i})=>C(e)?e:t?e===""?NaN:e&&+e:r&&te(e)?new Date(e):i?i(e):e;function Pe(e){const t=e.ref;return Ke(t)?t.files:ze(t)?Vr(e.refs).value:xr(t)?[...t.selectedOptions].map(({value:r})=>r):ve(t)?Ar(e.refs).value:wr(C(t.value)?e.ref.value:t.value,e)}var Hr=(e,t,r,i)=>{const u={};for(const l of e){const f=c(t,l);f&&k(u,l,f._f)}return{criteriaMode:r,names:[...e],fields:u,shouldUseNativeValidation:i}},ge=e=>C(e)?e:Ve(e)?e.source:U(e)?Ve(e.value)?e.value.source:e.value:e;const or="AsyncFunction";var $r=e=>!!e&&!!e.validate&&!!(re(e.validate)&&e.validate.constructor.name===or||U(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===or)),Kr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function cr(e,t,r){const i=c(e,r);if(i||$e(r))return{error:i,name:r};const u=r.split(".");for(;u.length;){const l=u.join("."),f=c(t,l),_=c(e,l);if(f&&!Array.isArray(f)&&r!==l)return{name:r};if(_&&_.type)return{name:l,error:_};u.pop()}return{name:r}}var zr=(e,t,r,i,u)=>u.isOnAll?!1:!r&&u.isOnTouch?!(t||e):(r?i.isOnBlur:u.isOnBlur)?!e:(r?i.isOnChange:u.isOnChange)?e:!0,Gr=(e,t)=>!be(c(e,t)).length&&R(e,t);const Yr={mode:J.onSubmit,reValidateMode:J.onChange,shouldFocusError:!0};function Jr(e={}){let t={...Yr,...e},r={submitCount:0,isDirty:!1,isLoading:re(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},i={},u=U(t.defaultValues)||U(t.values)?N(t.defaultValues||t.values)||{}:{},l=t.shouldUnregister?{}:N(u),f={action:!1,mount:!1,watch:!1},_={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},F,p=0;const S={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={values:Be(),array:Be(),state:Be()},L=he(t.mode),E=he(t.reValidateMode),B=t.criteriaMode===J.all,W=s=>a=>{clearTimeout(p),p=setTimeout(s,a)},H=async s=>{if(!t.disabled&&(S.isValid||s)){const a=t.resolver?$((await A()).errors):await I(i,!0);a!==r.isValid&&m.state.next({isValid:a})}},ee=(s,a)=>{!t.disabled&&(S.isValidating||S.validatingFields)&&((s||Array.from(_.mount)).forEach(n=>{n&&(a?k(r.validatingFields,n,a):R(r.validatingFields,n))}),m.state.next({validatingFields:r.validatingFields,isValidating:!$(r.validatingFields)}))},w=(s,a=[],n,y,d=!0,o=!0)=>{if(y&&n&&!t.disabled){if(f.action=!0,o&&Array.isArray(c(i,s))){const g=n(c(i,s),y.argA,y.argB);d&&k(i,s,g)}if(o&&Array.isArray(c(r.errors,s))){const g=n(c(r.errors,s),y.argA,y.argB);d&&k(r.errors,s,g),Gr(r.errors,s)}if(S.touchedFields&&o&&Array.isArray(c(r.touchedFields,s))){const g=n(c(r.touchedFields,s),y.argA,y.argB);d&&k(r.touchedFields,s,g)}S.dirtyFields&&(r.dirtyFields=_e(u,l)),m.state.next({name:s,isDirty:x(s,a),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else k(l,s,a)},Q=(s,a)=>{k(r.errors,s,a),m.state.next({errors:r.errors})},X=s=>{r.errors=s,m.state.next({errors:r.errors,isValid:!1})},T=(s,a,n,y)=>{const d=c(i,s);if(d){const o=c(l,s,C(n)?c(u,s):n);C(o)||y&&y.defaultChecked||a?k(l,s,a?o:Pe(d._f)):q(s,o),f.mount&&H()}},h=(s,a,n,y,d)=>{let o=!1,g=!1;const V={name:s};if(!t.disabled){const P=!!(c(i,s)&&c(i,s)._f&&c(i,s)._f.disabled);if(!n||y){S.isDirty&&(g=r.isDirty,r.isDirty=V.isDirty=x(),o=g!==V.isDirty);const j=P||ue(c(u,s),a);g=!!(!P&&c(r.dirtyFields,s)),j||P?R(r.dirtyFields,s):k(r.dirtyFields,s,!0),V.dirtyFields=r.dirtyFields,o=o||S.dirtyFields&&g!==!j}if(n){const j=c(r.touchedFields,s);j||(k(r.touchedFields,s,n),V.touchedFields=r.touchedFields,o=o||S.touchedFields&&j!==n)}o&&d&&m.state.next(V)}return o?V:{}},v=(s,a,n,y)=>{const d=c(r.errors,s),o=S.isValid&&Y(a)&&r.isValid!==a;if(t.delayError&&n?(F=W(()=>Q(s,n)),F(t.delayError)):(clearTimeout(p),F=null,n?k(r.errors,s,n):R(r.errors,s)),(n?!ue(d,n):d)||!$(y)||o){const g={...y,...o&&Y(a)?{isValid:a}:{},errors:r.errors,name:s};r={...r,...g},m.state.next(g)}},A=async s=>{ee(s,!0);const a=await t.resolver(l,t.context,Hr(s||_.mount,i,t.criteriaMode,t.shouldUseNativeValidation));return ee(s),a},O=async s=>{const{errors:a}=await A(s);if(s)for(const n of s){const y=c(a,n);y?k(r.errors,n,y):R(r.errors,n)}else r.errors=a;return a},I=async(s,a,n={valid:!0})=>{for(const y in s){const d=s[y];if(d){const{_f:o,...g}=d;if(o){const V=_.array.has(o.name),P=d._f&&$r(d._f);P&&S.validatingFields&&ee([y],!0);const j=await We(d,_.disabled,l,B,t.shouldUseNativeValidation&&!a,V);if(P&&S.validatingFields&&ee([y]),j[o.name]&&(n.valid=!1,a))break;!a&&(c(j,o.name)?V?Fr(r.errors,j,o.name):k(r.errors,o.name,j[o.name]):R(r.errors,o.name))}!$(g)&&await I(g,a,n)}}return n.valid},ne=()=>{for(const s of _.unMount){const a=c(i,s);a&&(a._f.refs?a._f.refs.every(n=>!Ie(n)):!Ie(a._f.ref))&&we(s)}_.unMount=new Set},x=(s,a)=>!t.disabled&&(s&&a&&k(l,s,a),!ue(Ge(),u)),D=(s,a,n)=>mr(s,_,{...f.mount?l:C(a)?u:te(s)?{[s]:a}:a},n,a),M=s=>be(c(f.mount?l:u,s,t.shouldUnregister?c(u,s,[]):[])),q=(s,a,n={})=>{const y=c(i,s);let d=a;if(y){const o=y._f;o&&(!o.disabled&&k(l,s,wr(a,o)),d=Ae(o.ref)&&K(a)?"":a,xr(o.ref)?[...o.ref.options].forEach(g=>g.selected=d.includes(g.value)):o.refs?ve(o.ref)?o.refs.length>1?o.refs.forEach(g=>(!g.defaultChecked||!g.disabled)&&(g.checked=Array.isArray(d)?!!d.find(V=>V===g.value):d===g.value)):o.refs[0]&&(o.refs[0].checked=!!d):o.refs.forEach(g=>g.checked=g.value===d):Ke(o.ref)?o.ref.value="":(o.ref.value=d,o.ref.type||m.values.next({name:s,values:{...l}})))}(n.shouldDirty||n.shouldTouch)&&h(s,d,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&ye(s)},Z=(s,a,n)=>{for(const y in a){const d=a[y],o=`${s}.${y}`,g=c(i,o);(_.array.has(s)||U(d)||g&&!g._f)&&!le(d)?Z(o,d,n):q(o,d,n)}},G=(s,a,n={})=>{const y=c(i,s),d=_.array.has(s),o=N(a);k(l,s,o),d?(m.array.next({name:s,values:{...l}}),(S.isDirty||S.dirtyFields)&&n.shouldDirty&&m.state.next({name:s,dirtyFields:_e(u,l),isDirty:x(s,o)})):y&&!y._f&&!K(o)?Z(s,o,n):q(s,o,n),je(s,_)&&m.state.next({...r}),m.values.next({name:f.mount?s:void 0,values:{...l}})},de=async s=>{f.mount=!0;const a=s.target;let n=a.name,y=!0;const d=c(i,n),o=()=>a.type?Pe(d._f):fr(s),g=V=>{y=Number.isNaN(V)||le(V)&&isNaN(V.getTime())||ue(V,c(l,n,V))};if(d){let V,P;const j=o(),ie=s.type===Fe.BLUR||s.type===Fe.FOCUS_OUT,Or=!Kr(d._f)&&!t.resolver&&!c(r.errors,n)&&!d._f.deps||zr(ie,c(r.touchedFields,n),r.isSubmitted,E,L),ke=je(n,_,ie);k(l,n,j),ie?(d._f.onBlur&&d._f.onBlur(s),F&&F(0)):d._f.onChange&&d._f.onChange(s);const Ee=h(n,j,ie,!1),Tr=!$(Ee)||ke;if(!ie&&m.values.next({name:n,type:s.type,values:{...l}}),Or)return S.isValid&&(t.mode==="onBlur"&&ie?H():ie||H()),Tr&&m.state.next({name:n,...ke?{}:Ee});if(!ie&&ke&&m.state.next({...r}),t.resolver){const{errors:tr}=await A([n]);if(g(j),y){const Ur=cr(r.errors,i,n),sr=cr(tr,i,Ur.name||n);V=sr.error,n=sr.name,P=$(tr)}}else ee([n],!0),V=(await We(d,_.disabled,l,B,t.shouldUseNativeValidation))[n],ee([n]),g(j),y&&(V?P=!1:S.isValid&&(P=await I(i,!0)));y&&(d._f.deps&&ye(d._f.deps),v(n,P,V,Ee))}},fe=(s,a)=>{if(c(r.errors,a)&&s.focus)return s.focus(),1},ye=async(s,a={})=>{let n,y;const d=z(s);if(t.resolver){const o=await O(C(s)?s:d);n=$(o),y=s?!d.some(g=>c(o,g)):n}else s?(y=(await Promise.all(d.map(async o=>{const g=c(i,o);return await I(g&&g._f?{[o]:g}:g)}))).every(Boolean),!(!y&&!r.isValid)&&H()):y=n=await I(i);return m.state.next({...!te(s)||S.isValid&&n!==r.isValid?{}:{name:s},...t.resolver||!s?{isValid:n}:{},errors:r.errors}),a.shouldFocus&&!y&&ce(i,fe,s?d:_.mount),y},Ge=s=>{const a={...f.mount?l:u};return C(s)?a:te(s)?c(a,s):s.map(n=>c(a,n))},Ye=(s,a)=>({invalid:!!c((a||r).errors,s),isDirty:!!c((a||r).dirtyFields,s),error:c((a||r).errors,s),isValidating:!!c(r.validatingFields,s),isTouched:!!c((a||r).touchedFields,s)}),Dr=s=>{s&&z(s).forEach(a=>R(r.errors,a)),m.state.next({errors:s?r.errors:{}})},Je=(s,a,n)=>{const y=(c(i,s,{_f:{}})._f||{}).ref,d=c(r.errors,s)||{},{ref:o,message:g,type:V,...P}=d;k(r.errors,s,{...P,...a,ref:y}),m.state.next({name:s,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&y&&y.focus&&y.focus()},kr=(s,a)=>re(s)?m.values.subscribe({next:n=>s(D(void 0,a),n)}):D(s,a,!0),we=(s,a={})=>{for(const n of s?z(s):_.mount)_.mount.delete(n),_.array.delete(n),a.keepValue||(R(i,n),R(l,n)),!a.keepError&&R(r.errors,n),!a.keepDirty&&R(r.dirtyFields,n),!a.keepTouched&&R(r.touchedFields,n),!a.keepIsValidating&&R(r.validatingFields,n),!t.shouldUnregister&&!a.keepDefaultValue&&R(u,n);m.values.next({values:{...l}}),m.state.next({...r,...a.keepDirty?{isDirty:x()}:{}}),!a.keepIsValid&&H()},Qe=({disabled:s,name:a,field:n,fields:y})=>{(Y(s)&&f.mount||s||_.disabled.has(a))&&(s?_.disabled.add(a):_.disabled.delete(a),h(a,Pe(n?n._f:c(y,a)._f),!1,!1,!0))},De=(s,a={})=>{let n=c(i,s);const y=Y(a.disabled)||Y(t.disabled);return k(i,s,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:s}},name:s,mount:!0,...a}}),_.mount.add(s),n?Qe({field:n,disabled:Y(a.disabled)?a.disabled:t.disabled,name:s}):T(s,!0,a.value),{...y?{disabled:a.disabled||t.disabled}:{},...t.progressive?{required:!!a.required,min:ge(a.min),max:ge(a.max),minLength:ge(a.minLength),maxLength:ge(a.maxLength),pattern:ge(a.pattern)}:{},name:s,onChange:de,onBlur:de,ref:d=>{if(d){De(s,a),n=c(i,s);const o=C(d.value)&&d.querySelectorAll&&d.querySelectorAll("input,select,textarea")[0]||d,g=qr(o),V=n._f.refs||[];if(g?V.find(P=>P===o):o===n._f.ref)return;k(i,s,{_f:{...n._f,...g?{refs:[...V.filter(Ie),o,...Array.isArray(c(u,s))?[{}]:[]],ref:{type:o.type,name:s}}:{ref:o}}}),T(s,!1,void 0,o)}else n=c(i,s,{}),n._f&&(n._f.mount=!1),(t.shouldUnregister||a.shouldUnregister)&&!(yr(_.array,s)&&f.action)&&_.unMount.add(s)}}},Xe=()=>t.shouldFocusError&&ce(i,fe,_.mount),Er=s=>{Y(s)&&(m.state.next({disabled:s}),ce(i,(a,n)=>{const y=c(i,n);y&&(a.disabled=y._f.disabled||s,Array.isArray(y._f.refs)&&y._f.refs.forEach(d=>{d.disabled=y._f.disabled||s}))},0,!1))},Ze=(s,a)=>async n=>{let y;n&&(n.preventDefault&&n.preventDefault(),n.persist&&n.persist());let d=N(l);if(_.disabled.size)for(const o of _.disabled)k(d,o,void 0);if(m.state.next({isSubmitting:!0}),t.resolver){const{errors:o,values:g}=await A();r.errors=o,d=g}else await I(i);if(R(r.errors,"root"),$(r.errors)){m.state.next({errors:{}});try{await s(d,n)}catch(o){y=o}}else a&&await a({...r.errors},n),Xe(),setTimeout(Xe);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:$(r.errors)&&!y,submitCount:r.submitCount+1,errors:r.errors}),y)throw y},Cr=(s,a={})=>{c(i,s)&&(C(a.defaultValue)?G(s,N(c(u,s))):(G(s,a.defaultValue),k(u,s,N(a.defaultValue))),a.keepTouched||R(r.touchedFields,s),a.keepDirty||(R(r.dirtyFields,s),r.isDirty=a.defaultValue?x(s,N(c(u,s))):x()),a.keepError||(R(r.errors,s),S.isValid&&H()),m.state.next({...r}))},er=(s,a={})=>{const n=s?N(s):u,y=N(n),d=$(s),o=d?u:y;if(a.keepDefaultValues||(u=n),!a.keepValues){if(a.keepDirtyValues){const g=new Set([..._.mount,...Object.keys(_e(u,l))]);for(const V of Array.from(g))c(r.dirtyFields,V)?k(o,V,c(l,V)):G(V,c(o,V))}else{if(He&&C(s))for(const g of _.mount){const V=c(i,g);if(V&&V._f){const P=Array.isArray(V._f.refs)?V._f.refs[0]:V._f.ref;if(Ae(P)){const j=P.closest("form");if(j){j.reset();break}}}}i={}}l=t.shouldUnregister?a.keepDefaultValues?N(u):{}:N(o),m.array.next({values:{...o}}),m.values.next({values:{...o}})}_={mount:a.keepDirtyValues?_.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},f.mount=!S.isValid||!!a.keepIsValid||!!a.keepDirtyValues,f.watch=!!t.shouldUnregister,m.state.next({submitCount:a.keepSubmitCount?r.submitCount:0,isDirty:d?!1:a.keepDirty?r.isDirty:!!(a.keepDefaultValues&&!ue(s,u)),isSubmitted:a.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:d?{}:a.keepDirtyValues?a.keepDefaultValues&&l?_e(u,l):r.dirtyFields:a.keepDefaultValues&&s?_e(u,s):a.keepDirty?r.dirtyFields:{},touchedFields:a.keepTouched?r.touchedFields:{},errors:a.keepErrors?r.errors:{},isSubmitSuccessful:a.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},rr=(s,a)=>er(re(s)?s(l):s,a);return{control:{register:De,unregister:we,getFieldState:Ye,handleSubmit:Ze,setError:Je,_executeSchema:A,_getWatch:D,_getDirty:x,_updateValid:H,_removeUnmounted:ne,_updateFieldArray:w,_updateDisabledField:Qe,_getFieldArray:M,_reset:er,_resetDefaultValues:()=>re(t.defaultValues)&&t.defaultValues().then(s=>{rr(s,t.resetOptions),m.state.next({isLoading:!1})}),_updateFormState:s=>{r={...r,...s}},_disableForm:Er,_subjects:m,_proxyFormState:S,_setErrors:X,get _fields(){return i},get _formValues(){return l},get _state(){return f},set _state(s){f=s},get _defaultValues(){return u},get _names(){return _},set _names(s){_=s},get _formState(){return r},set _formState(s){r=s},get _options(){return t},set _options(s){t={...t,...s}}},trigger:ye,register:De,handleSubmit:Ze,watch:kr,setValue:G,getValues:Ge,reset:rr,resetField:Cr,clearErrors:Dr,unregister:we,setError:Je,setFocus:(s,a={})=>{const n=c(i,s),y=n&&n._f;if(y){const d=y.refs?y.refs[0]:y.ref;d.focus&&(d.focus(),a.shouldSelect&&re(d.select)&&d.select())}},getFieldState:Ye}}function it(e={}){const t=b.useRef(void 0),r=b.useRef(void 0),[i,u]=b.useState({isDirty:!1,isValidating:!1,isLoading:re(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:re(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Jr(e),formState:i});const l=t.current.control;return l._options=e,Se({subject:l._subjects.state,next:f=>{vr(f,l._proxyFormState,l._updateFormState,!0)&&u({...l._formState})}}),b.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),b.useEffect(()=>{if(l._proxyFormState.isDirty){const f=l._getDirty();f!==i.isDirty&&l._subjects.state.next({isDirty:f})}},[l,i.isDirty]),b.useEffect(()=>{e.values&&!ue(e.values,r.current)?(l._reset(e.values,l._options.resetOptions),r.current=e.values,u(f=>({...f}))):l._resetDefaultValues()},[e.values,l]),b.useEffect(()=>{e.errors&&l._setErrors(e.errors)},[e.errors,l]),b.useEffect(()=>{l._state.mount||(l._updateValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),b.useEffect(()=>{e.shouldUnregister&&l._subjects.values.next({values:l._getWatch()})},[e.shouldUnregister,l]),t.current.formState=hr(i,l),t.current}export{tt as C,rt as F,st as a,pe as b,Ir as c,c as g,k as s,it as u};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{j as e,r as d,aG as N,aH as P,aI as U,aJ as V}from"./@radix-AvWw-1nd.js";import{T as q,G as Z,H as G,a2 as J,J as K,an as O,ao as E,ae as u,aj as X,h as f,ar as Y,as as W,ak as ee,al as te,am as se,I as R,Y as re,a0 as ae,_ as ne,aX as ie,r as Q,z as x,f as oe,i as ce,m as le}from"./index-DPjvk73v.js";import{b as p,C as de,u as me,F as ue}from"./index.esm-cf-8NBxV.js";import{C as B}from"./ComponentIcon-Dx5fBrDX.js";import{D as pe}from"./DisplayDate-C5Aw-Yca.js";import{I as he}from"./InlineAvatar-Bin9UPKJ.js";import{h as xe,j as fe,a as ge,c as je}from"./@tanstack-CcI3lvwB.js";import{d as ke}from"./index-BVVKxTWC.js";import{s as be,R as ve,a as ye,u as Ne}from"./create-stack-B2c98UlP.js";import{S as Se}from"./flavor-select-D8CranSY.js";import{S as we}from"./arrow-left-B2hyhFky.js";import{C as Ce}from"./configuration-form-BJUCr0wl.js";import{s as v}from"./constants-DP3ZEnXH.js";import{S as Le}from"./check-circle-DyCCYTA0.js";import{L as _e,a as Te}from"./@react-router-BUo5vhN4.js";import{s as Fe}from"./index-D-n6tspq.js";import{w as ze}from"./index-eIIP-0dQ.js";import{t as Ie}from"./zod-CRNUMWWg.js";import{s as Me}from"./sharedSchema-i_9Y4WcA.js";import"./@reactflow-BHoFKFSZ.js";import"./layout-3_rgDUxf.js";import"./rocket-k68ONPDS.js";import"./index-CzhJC6pc.js";import"./plus-CoKtHiA9.js";import"./trash-B_JgTgqd.js";import"./type-guards-CaeD8wHO.js";import"./check-DZ0KAh3W.js";import"./CodeSnippet-DUkCnBpQ.js";import"./file-text-CgxVzNph.js";import"./terminal-square-URAPn9DB.js";import"./stack-detail-query-omCumL7U.js";const S={helpLink:"https://docs.zenml.io/stack-components/orchestrators",description:"An orchestrator is a special kind of backend that manages the running of each step of the pipeline. Orchestrators administer the actual pipeline runs. By default, ZenML initializes your repository with an orchestrator that runs everything on your local machine."},w={helpLink:"https://docs.zenml.io/stack-components/artifact-stores",description:"The Artifact Store is a central component in any MLOps stack. As the name suggests, it acts as a data persistence layer where artifacts (e.g. datasets, models) ingested or generated by the machine learning pipelines are stored."},C={helpLink:"https://docs.zenml.io/stack-components/container-registries",description:"Container registry is used to store container images that are built to run machine learning pipelines in remote environments. Containerization of the pipeline code creates a portable environment that allows code to run in an isolated manner."},L={description:"Step operators allow you to run individual steps in a custom environment different from the default one used by your active orchestrator.",helpLink:"https://docs.zenml.io/stack-components/step-operators"},_={description:"Model deployers are stack components responsible for online model serving. They are responsible for deploying models to a remote server. Model deployers also act as a registry for models that are served with ZenML.",helpLink:"https://docs.zenml.io/stack-components/model-deployers"},T={description:"ZenML supports connecting to a Redis-backed Feast feature store as a stack component integration.",helpLink:"https://docs.zenml.io/stack-components/feature-stores"},F={description:"Experiment trackers let you track your ML experiments by logging the parameters and allowing you to compare between different runs.",helpLink:"https://docs.zenml.io/stack-components/experiment-trackers"},z={description:"Alerters allow you to send messages to chat services (like Slack, Discord, Mattermost, etc.) from within your pipelines. This is useful to immediately get notified when failures happen, for general monitoring/reporting, and also for building human-in-the-loop ML.",helpLink:"https://docs.zenml.io/stack-components/alerters "},I={description:"Annotators are a stack component that enables the use of data annotation as part of your ZenML stack and pipelines.",helpLink:"https://docs.zenml.io/stack-components/annotators"},M={description:"Data Validators used in ZenML pipelines usually generate data profiles and data quality check reports that are versioned and stored in the Artifact Store and can be retrieved and visualized later.",helpLink:"https://docs.zenml.io/stack-components/data-validators"},D={description:"The image builder is an essential part of most remote MLOps stacks. It is used to build container images such that your machine-learning pipelines and steps can be executed in remote environments.",helpLink:"https://docs.zenml.io/stack-components/image-builders"},A={description:"Model registries are centralized storage solutions for managing and tracking machine learning models across various stages of development and deployment.",helpLink:"https://docs.zenml.io/stack-components/model-registries"};function De({type:t}){const{description:s,link:r}=Ae(t);return e.jsx(q,{children:e.jsxs(Z,{delayDuration:200,children:[e.jsxs(G,{children:[e.jsx(J,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"}),e.jsxs("div",{className:"sr-only",children:["Info for ",t]})]}),e.jsxs(K,{align:"start",side:"bottom",className:"flex max-w-xl flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:s}),e.jsx("a",{className:"link mt-2 text-primary-400",target:"_blank",href:r,children:"Learn more"})]})]})})}function Ae(t){switch(t){case"orchestrator":return{description:S.description,link:S.helpLink};case"alerter":return{description:z.description,link:z.helpLink};case"annotator":return{description:I.description,link:I.helpLink};case"artifact_store":return{description:w.description,link:w.helpLink};case"container_registry":return{description:C.description,link:C.helpLink};case"data_validator":return{description:M.description,link:M.helpLink};case"experiment_tracker":return{description:F.description,link:F.helpLink};case"feature_store":return{description:T.description,link:T.helpLink};case"image_builder":return{description:D.description,link:D.helpLink};case"model_deployer":return{description:_.description,link:_.helpLink};case"model_registry":return{description:A.description,link:A.helpLink};case"step_operator":return{description:L.description,link:L.helpLink}}}function $e({type:t,setSelectedFlavor:s}){return e.jsxs(e.Fragment,{children:[e.jsx(O,{children:e.jsxs(E,{children:["Select ",u(t)," Flavor"]})}),e.jsx(X,{viewportClassName:"max-h-[70vh]",children:e.jsx("div",{className:"p-5",children:e.jsx(Se,{setSelectedFlavor:s,type:t})})})]})}function Oe({name:t,id:s,backHandler:r,type:n,successHandler:i}){const o=d.useId();return e.jsxs(e.Fragment,{children:[e.jsx(O,{className:"w-full",children:e.jsxs("div",{className:"flex w-0 flex-1 items-center gap-2",children:[e.jsxs(f,{intent:"secondary",emphasis:"subtle",className:"flex aspect-square size-6 items-center justify-center",onClick:()=>r(),children:[e.jsx(we,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs(E,{className:"truncate",children:["Configure your ",u(t)," ",u(n)]})]})}),e.jsx(Ce,{useMaxHeight:!0,flavorId:s,formId:o,successHandler:i,FooterComponent:Ee})]})}function Ee({formId:t,isPending:s}){return e.jsx(Y,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{asChild:!0,children:e.jsx(f,{size:"md",intent:"secondary",children:"Cancel"})}),e.jsxs(f,{size:"md",disabled:s,type:"submit",form:t,children:[s&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Component"]})]})})}function Re({type:t}){const[s,r]=d.useState(!1),[n,i]=d.useState(0),[o,l]=d.useState(null);async function a(c){r(c),await be(100),c||(i(0),l(null))}function g(c){var m;l({id:c.id,name:c.name,logoUrl:((m=c.body)==null?void 0:m.logo_url)??void 0}),i(h=>h+1)}function j(){i(0),l(null)}return e.jsxs(ee,{open:s,onOpenChange:c=>a(c),children:[e.jsx(te,{asChild:!0,children:e.jsxs("button",{className:"w-full rounded-md border border-dashed border-neutral-300 bg-theme-surface-tertiary py-5 text-theme-text-secondary",children:["New ",u(t)]})}),e.jsxs(se,{className:"w-full sm:max-w-[640px] md:max-w-3xl xl:max-w-[1080px]",children:[n===0&&e.jsx($e,{setSelectedFlavor:g,type:t}),n===1&&!!o&&e.jsx(Oe,{successHandler:()=>a(!1),backHandler:j,...o,type:t})]})]})}function Qe(){return e.jsxs(e.Fragment,{children:[v.map(t=>e.jsx(N,{className:"h-full space-y-5 p-5",value:t,children:e.jsx(Pe,{type:t})},t)),e.jsx(N,{className:"h-full",value:"",children:e.jsx("div",{className:"flex h-full w-full items-center justify-center text-theme-text-tertiary",children:"Select a category to add a new component"})})]})}function Be({type:t,search:s}){const r=xe({...re.componentListInfinite({sort_by:"desc:updated",type:t,...s?{name:`contains:${s}`}:{}})}),{control:n,watch:i,setValue:o}=p();return r.isError?e.jsx("p",{children:"Error while fetching Components"}):r.isPending?e.jsx("div",{className:"flex w-full flex-1 items-center justify-center",children:e.jsx(ae,{})}):e.jsxs("div",{className:"space-y-1",children:[e.jsx("ul",{className:"space-y-1",children:r.data.pages.map(l=>l.items.map(a=>e.jsx("li",{children:e.jsx(de,{name:`components.${t}.id`,control:n,render:({field:{onChange:g,...j}})=>{var c,m,h,k;return e.jsxs(ve,{className:"justify-between bg-theme-surface-primary font-medium","data-state":i(`components.${t}.id`)===a.id?"selected":"unselected",htmlFor:a.id,children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(ye,{...j,id:a.id,type:"radio",value:a.id,onChange:H=>{var y;o(`components.${t}.name`,a.name),o(`components.${t}.logoUrl`,((y=a.body)==null?void 0:y.logo_url)||""),g(H)},checked:i(`components.${t}.id`)===a.id,name:t}),e.jsx("img",{alt:"flavor icon",src:ne(((c=a.body)==null?void 0:c.logo_url)||""),width:24,height:24}),e.jsxs("div",{className:"min-w-0 truncate",children:[e.jsx("div",{className:"truncate font-semibold",children:a.name}),e.jsx("div",{className:"truncate text-text-xs text-theme-text-secondary",children:a.id.split("-")[0]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-text-sm",children:[((h=(m=a.body)==null?void 0:m.user)==null?void 0:h.name)&&e.jsx(he,{username:a.body.user.name}),((k=a.body)==null?void 0:k.updated)&&e.jsx("div",{className:"whitespace-nowrap text-theme-text-secondary",children:e.jsx(pe,{short:!0,dateString:a.body.updated})})]})]})}})},a.id)))}),e.jsx(Re,{type:t}),r.hasNextPage&&e.jsx(f,{onClick:()=>r.fetchNextPage(),type:"button",size:"md",intent:"secondary",emphasis:"subtle",className:"flex w-full items-center justify-center bg-theme-surface-primary",children:e.jsxs("div",{className:"flex items-center gap-1",children:[r.isFetchingNextPage&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Load more"]})})]})}function He({type:t}){return e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(B,{className:"h-5 w-5 fill-primary-400",type:t}),e.jsx("h2",{className:"text-text-lg font-semibold",children:u(t)}),e.jsx(De,{type:t})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Select a existing ",ie(t)," from your server:"]})]})}function Pe({type:t}){const[s,r]=d.useState(""),{watch:n,setValue:i}=p(),o=n(`components.${t}`);return d.useEffect(()=>{o&&!o.id&&i(`components.${t}`,null)},[o,i,t]),e.jsxs(e.Fragment,{children:[e.jsx(He,{type:t}),e.jsx(Ue,{search:s,setSearch:r}),e.jsx(Be,{search:s,type:t})]})}function Ue({setSearch:t,search:s}){const[r,n]=d.useState(s),i=d.useCallback(ke(t,500),[]);d.useEffect(()=>()=>{i.cancel()},[i]);function o(l){n(l),i(l)}return e.jsx(R,{value:r,onChange:l=>o(l.target.value),placeholder:"Search..."})}function Ve({type:t}){const{watch:s,formState:{errors:r}}=p(),n=s(`components.${t}`),i=n&&n.id;return e.jsx("div",{"data-error":!i&&r.components&&r.components[t]?"true":"false","data-filled":i?"true":"false",className:"flex h-[110px] flex-col items-center justify-center space-y-2 truncate whitespace-nowrap rounded-md border border-theme-border-moderate bg-theme-surface-secondary py-5 text-center text-text-sm text-theme-text-secondary transition-all duration-150 hover:bg-theme-surface-primary hover:shadow-sm data-[error=true]:border-theme-text-error data-[filled=true]:border-success-400 data-[filled=true]:bg-theme-surface-primary data-[state=active]:bg-theme-surface-primary group-data-[state=active]/trigger:bg-theme-surface-primary group-data-[state=active]/trigger:shadow-md data-[error=false]:data-[filled=false]:group-data-[state=active]/trigger:border-theme-border-bold",children:i?e.jsx(qe,{type:t}):e.jsx(Ze,{type:t})})}function qe({type:t}){const{watch:s}=p(),r=s(`components.${t}`);return r&&r.id?e.jsxs("div",{className:"flex flex-col items-center gap-2 text-text-sm",children:[e.jsx("img",{width:24,height:24,src:r.logoUrl,alt:`Icon of ${r.name}`}),e.jsxs("div",{className:"space-y-0.25",children:[e.jsx("div",{className:"text-theme-text-primary",children:r.name}),e.jsx("div",{className:"text-text-xs text-theme-text-tertiary",children:u(t)})]})]}):null}function Ze({type:t}){return e.jsxs(e.Fragment,{children:[e.jsx(B,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong",type:t}),e.jsx("span",{children:u(t)})]})}function Ge(){return e.jsxs("div",{className:"flex h-full flex-col justify-between space-y-5",children:[e.jsxs("div",{className:"space-y-5 p-5",children:[e.jsx(Xe,{}),e.jsx(Je,{})]}),e.jsx(Ke,{})]})}function Je(){const{watch:t,resetField:s}=p();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-text-lg font-semibold",children:"Add Components"}),e.jsxs("p",{className:"text-theme-text-secondary",children:["All stacks have at minimum an orchestrator and an artifact store."," ",e.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://docs.zenml.io/stack-components/component-guide",className:"link text-primary-400",children:"Learn more"})]})]}),e.jsx(P,{children:e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:v.map(r=>e.jsxs("div",{className:"relative",children:[e.jsx(U,{className:"group/trigger w-full",value:r,children:e.jsx(Ve,{type:r})}),t(`components.${r}.id`)&&e.jsx("button",{type:"button",onClick:n=>{n.preventDefault(),s(`components.${r}`)},className:"absolute right-[-12px] top-[-12px] flex aspect-square h-[28px] w-[28px] items-center justify-center rounded-rounded bg-theme-surface-primary",children:e.jsx(Le,{className:"h-5 w-5 shrink-0 fill-success-400"})})]},r))})})]})}function Ke(){const{formState:{isSubmitting:t}}=p(),s=!!fe();return e.jsxs("div",{className:"flex items-center justify-end space-x-2 border-t border-theme-border-moderate p-5",children:[e.jsx(f,{asChild:!0,intent:"secondary",size:"md",children:e.jsx(_e,{to:Q.stacks.create.index,children:"Cancel"})}),e.jsxs(f,{className:"flex items-center gap-1",disabled:t||s,size:"md",children:[(s||t)&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Stack"]})]})}function Xe(){var r;const{register:t,formState:{errors:s}}=p();return e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-text-sm",htmlFor:"stack-name",children:"Stack Name"}),e.jsx(R,{id:"stack-name",className:`${s.stackName?"border-red-500":""} w-full`,placeholder:"zenml-stack",...t("stackName")}),s.stackName&&e.jsx("p",{className:"text-text-xs text-red-500",children:(r=s.stackName.message)==null?void 0:r.toString()})]})}const b=x.object({id:x.string().trim().min(1),name:x.string().trim().min(1),logoUrl:x.string().trim().min(1)}),Ye=v.reduce((t,s)=>(t[s]=b.nullable(),t),{}),We=x.object({stackName:Me,components:x.object({...Ye,orchestrator:b,artifact_store:b})});function et(){const t=ge({...ze.workspaceDetail("default")}),{toast:s}=oe(),r=Te(),n=je(),i=Ne({onSuccess:async()=>{n.invalidateQueries({queryKey:Fe.all}),r(Q.stacks.overview)},onError:a=>{s({status:"error",emphasis:"subtle",icon:e.jsx(ce,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:a.message,rounded:!0})}});function o(a){var c;const g=Object.entries(a.components).reduce((m,[h,k])=>(k&&(m[h]=[k.id]),m),{}),j={name:a.stackName,components:g};i.mutate({workspaceId:((c=t.data)==null?void 0:c.id)||"",payload:j})}const l=me({resolver:Ie(We),defaultValues:{components:{alerter:null,orchestrator:{},annotator:null,artifact_store:{},container_registry:null,data_validator:null,experiment_tracker:null,feature_store:null,model_registry:null,image_builder:null,model_deployer:null,step_operator:null},stackName:""}});return{createManualStack:o,form:l}}function It(){const[t,s]=d.useState(""),{createManualStack:r,form:n}=et();return e.jsx(ue,{...n,children:e.jsx(V,{value:t,onValueChange:s,className:"h-full",children:e.jsxs("form",{onSubmit:n.handleSubmit(r),className:"flex h-[calc(100vh_-_4rem_-_4rem_-_2px)] flex-1 flex-col divide-y divide-theme-border-moderate xl:flex-row-reverse xl:divide-x xl:divide-y-0 xl:divide-x-reverse",children:[e.jsx($,{className:"h-full flex-1 bg-theme-surface-primary",children:e.jsx(Ge,{})}),e.jsx($,{children:e.jsx(Qe,{})})]})})})}function $({className:t,...s}){return e.jsx("div",{className:le("w-full overflow-y-auto xl:w-1/2",t),...s})}export{It as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{j as o}from"./@radix-AvWw-1nd.js";import{S as r}from"./Tabs-AuhCyzle.js";import{R as m}from"./RunsBody-Cj4sIqQB.js";import{R as i}from"./RunSelector-BVKB4Z8F.js";import{S as p}from"./StackList-5UB8LoEq.js";import{b as s}from"./@react-router-BUo5vhN4.js";import"./index-DPjvk73v.js";import"./@tanstack-CcI3lvwB.js";import"./@reactflow-BHoFKFSZ.js";import"./chevron-down-A3PXOshS.js";import"./NestedCollapsible-Da-k0Mff.js";import"./type-guards-CaeD8wHO.js";import"./CodeSnippet-DUkCnBpQ.js";import"./CollapsibleCard-B5-5Plnd.js";import"./DisplayDate-C5Aw-Yca.js";import"./InlineAvatar-Bin9UPKJ.js";import"./refresh-CupyU1Vs.js";import"./SearchField-DjAOZic5.js";import"./chevron-right-double-zKz7rAaU.js";import"./index-BVVKxTWC.js";import"./all-pipeline-runs-query-COvsm3bC.js";import"./ExecutionStatus-CD8Vj7sp.js";import"./check-circle-DyCCYTA0.js";import"./trash-B_JgTgqd.js";import"./DeleteAlertDialog-BgTZbbAt.js";import"./zod-CRNUMWWg.js";import"./index.esm-cf-8NBxV.js";import"./AlertDialogDropdownItem-D7KZcPFw.js";import"./delete-run-Do3XyF4W.js";import"./plus-CoKtHiA9.js";import"./index-D-n6tspq.js";import"./stack-detail-query-omCumL7U.js";import"./components-Br2ezRib.js";import"./NumberBox-BvBJYxCu.js";import"./ComponentBadge-FrujKBC6.js";import"./ComponentIcon-Dx5fBrDX.js";import"./layout-3_rgDUxf.js";import"./rocket-k68ONPDS.js";import"./DialogItem-CNWLiJcc.js";import"./Infobox-BHEdNmME.js";function U(){const{componentId:t}=s();return o.jsx("div",{className:"@container",children:o.jsx(r,{isPanel:!1,stacksTabContent:o.jsx(p,{fixedQueryParams:{component_id:t}}),runsTabContent:o.jsx(i,{children:o.jsx(m,{fixedQueryParams:{stack_component:t}})}),componentId:t})})}export{U as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as p,j as t}from"./@radix-AvWw-1nd.js";import{u as F,g as Ze,S as Ue,C as oe,P as ie,W as Ke,L as Qe}from"./ProviderRadio-DPmZHff_.js";import{W as D,H as O,B as E}from"./Wizard-XEp9rGmf.js";import{t as q}from"./zod-CRNUMWWg.js";import{z as y,S as Y,_ as Ge,I as ge,h as M,aC as Ye,aD as Je,aE as Xe,aF as et,aj as tt,aG as rt,ak as st,am as nt,ao as ot,d as it,x as at,a0 as ct,j as lt,F as ut,o as dt,p as ft,f as Ie,i as mt,r as ht,A as xt,b as pt,ae as yt}from"./index-DPjvk73v.js";import{b as v,C as k,u as W,F as $}from"./index.esm-cf-8NBxV.js";import{S as R}from"./WizardFooter-BtL1Gi1k.js";import{C as je,b as gt}from"./ComponentIcon-Dx5fBrDX.js";import{R as Z,a as U,s as jt,u as _t}from"./create-stack-B2c98UlP.js";import{f as vt,s as De,g as St,a as Ct,D as bt,b as wt,z as Nt}from"./index-CzhJC6pc.js";import{a as J,b as Pt,j as Oe,c as Ft}from"./@tanstack-CcI3lvwB.js";import{C as L}from"./ProviderIcon-CxeziA5a.js";import{s as kt}from"./sharedSchema-i_9Y4WcA.js";import{S as zt}from"./Lock-tO9Z41I9.js";import{T as _e}from"./Tick-CHW0jc8Y.js";import{s as Ee}from"./index-D-n6tspq.js";import{C as At}from"./ComponentBadge-FrujKBC6.js";import{e as It}from"./components-Br2ezRib.js";import{L as Dt}from"./@react-router-BUo5vhN4.js";import"./persist-DHGuHP2H.js";import"./@reactflow-BHoFKFSZ.js";import"./layout-3_rgDUxf.js";import"./rocket-k68ONPDS.js";import"./plus-CoKtHiA9.js";import"./trash-B_JgTgqd.js";import"./type-guards-CaeD8wHO.js";import"./gcp-0u4le6mC.js";import"./check-DZ0KAh3W.js";import"./stack-detail-query-omCumL7U.js";const Me=p.createContext(null);function Ot({children:e}){const[r,s]=p.useState({stackName:null,createdStackId:null,connectorConfig:null,fullstackResources:null,artifactStoreConfig:null,registryConfig:null,orchestratorConfig:null});return t.jsx(Me.Provider,{value:{data:r,setData:s},children:e})}function S(){const e=p.useContext(Me);if(e===null)throw new Error("useExistingInfraContext must be used within an ExistingInfraProvider");return e}const Re=p.createContext(null);function be({children:e,initialSchema:r}){const[s,n]=p.useState(r),[o,a]=p.useState({});return t.jsx(Re.Provider,{value:{schema:s,setSchema:n,defaultValues:o,setDefaultValues:a},children:e})}function X(){const e=p.useContext(Re);if(!e)throw new Error("useSchemaContext must be used within a SchemaProvider");return e}const Et=y.object({resourceId:y.string().min(1),flavor:y.string()});function Mt(){return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"artifact_store",className:"h-5 w-5 fill-primary-400"}),"Select your Artifact Store"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Choose one of the storages for the new Artifact Store."})]})}var Le=Symbol.for("immer-nothing"),we=Symbol.for("immer-draftable"),g=Symbol.for("immer-state");function _(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var z=Object.getPrototypeOf;function A(e){return!!e&&!!e[g]}function N(e){var r;return e?Te(e)||Array.isArray(e)||!!e[we]||!!((r=e.constructor)!=null&&r[we])||te(e)||re(e):!1}var Rt=Object.prototype.constructor.toString();function Te(e){if(!e||typeof e!="object")return!1;const r=z(e);if(r===null)return!0;const s=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return s===Object?!0:typeof s=="function"&&Function.toString.call(s)===Rt}function K(e,r){ee(e)===0?Reflect.ownKeys(e).forEach(s=>{r(s,e[s],e)}):e.forEach((s,n)=>r(n,s,e))}function ee(e){const r=e[g];return r?r.type_:Array.isArray(e)?1:te(e)?2:re(e)?3:0}function de(e,r){return ee(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function Be(e,r,s){const n=ee(e);n===2?e.set(r,s):n===3?e.add(s):e[r]=s}function Lt(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function te(e){return e instanceof Map}function re(e){return e instanceof Set}function w(e){return e.copy_||e.base_}function fe(e,r){if(te(e))return new Map(e);if(re(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const s=Te(e);if(r===!0||r==="class_only"&&!s){const n=Object.getOwnPropertyDescriptors(e);delete n[g];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const l=o[a],u=n[l];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[l]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[l]})}return Object.create(z(e),n)}else{const n=z(e);if(n!==null&&s)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function ve(e,r=!1){return se(e)||A(e)||!N(e)||(ee(e)>1&&(e.set=e.add=e.clear=e.delete=Tt),Object.freeze(e),r&&Object.entries(e).forEach(([s,n])=>ve(n,!0))),e}function Tt(){_(2)}function se(e){return Object.isFrozen(e)}var Bt={};function P(e){const r=Bt[e];return r||_(0,e),r}var T;function Ve(){return T}function Vt(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ne(e,r){r&&(P("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function me(e){he(e),e.drafts_.forEach(qt),e.drafts_=null}function he(e){e===T&&(T=e.parent_)}function Pe(e){return T=Vt(T,e)}function qt(e){const r=e[g];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function Fe(e,r){r.unfinalizedDrafts_=r.drafts_.length;const s=r.drafts_[0];return e!==void 0&&e!==s?(s[g].modified_&&(me(r),_(4)),N(e)&&(e=Q(r,e),r.parent_||G(r,e)),r.patches_&&P("Patches").generateReplacementPatches_(s[g].base_,e,r.patches_,r.inversePatches_)):e=Q(r,s,[]),me(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==Le?e:void 0}function Q(e,r,s){if(se(r))return r;const n=r[g];if(!n)return K(r,(o,a)=>ke(e,n,r,o,a,s)),r;if(n.scope_!==e)return r;if(!n.modified_)return G(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let a=o,l=!1;n.type_===3&&(a=new Set(o),o.clear(),l=!0),K(a,(u,f)=>ke(e,n,o,u,f,s,l)),G(e,o,!1),s&&e.patches_&&P("Patches").generatePatches_(n,s,e.patches_,e.inversePatches_)}return n.copy_}function ke(e,r,s,n,o,a,l){if(A(o)){const u=a&&r&&r.type_!==3&&!de(r.assigned_,n)?a.concat(n):void 0,f=Q(e,o,u);if(Be(s,n,f),A(f))e.canAutoFreeze_=!1;else return}else l&&s.add(o);if(N(o)&&!se(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Q(e,o),(!r||!r.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(s,n)&&G(e,o)}}function G(e,r,s=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ve(r,s)}function Wt(e,r){const s=Array.isArray(e),n={type_:s?1:0,scope_:r?r.scope_:Ve(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=Se;s&&(o=[n],a=B);const{revoke:l,proxy:u}=Proxy.revocable(o,a);return n.draft_=u,n.revoke_=l,u}var Se={get(e,r){if(r===g)return e;const s=w(e);if(!de(s,r))return $t(e,s,r);const n=s[r];return e.finalized_||!N(n)?n:n===ae(e.base_,r)?(ce(e),e.copy_[r]=pe(n,e)):n},has(e,r){return r in w(e)},ownKeys(e){return Reflect.ownKeys(w(e))},set(e,r,s){const n=qe(w(e),r);if(n!=null&&n.set)return n.set.call(e.draft_,s),!0;if(!e.modified_){const o=ae(w(e),r),a=o==null?void 0:o[g];if(a&&a.base_===s)return e.copy_[r]=s,e.assigned_[r]=!1,!0;if(Lt(s,o)&&(s!==void 0||de(e.base_,r)))return!0;ce(e),xe(e)}return e.copy_[r]===s&&(s!==void 0||r in e.copy_)||Number.isNaN(s)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=s,e.assigned_[r]=!0),!0},deleteProperty(e,r){return ae(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,ce(e),xe(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const s=w(e),n=Reflect.getOwnPropertyDescriptor(s,r);return n&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:n.enumerable,value:s[r]}},defineProperty(){_(11)},getPrototypeOf(e){return z(e.base_)},setPrototypeOf(){_(12)}},B={};K(Se,(e,r)=>{B[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});B.deleteProperty=function(e,r){return B.set.call(this,e,r,void 0)};B.set=function(e,r,s){return Se.set.call(this,e[0],r,s,e[0])};function ae(e,r){const s=e[g];return(s?w(s):e)[r]}function $t(e,r,s){var o;const n=qe(r,s);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function qe(e,r){if(!(r in e))return;let s=z(e);for(;s;){const n=Object.getOwnPropertyDescriptor(s,r);if(n)return n;s=z(s)}}function xe(e){e.modified_||(e.modified_=!0,e.parent_&&xe(e.parent_))}function ce(e){e.copy_||(e.copy_=fe(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ht=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,s,n)=>{if(typeof r=="function"&&typeof s!="function"){const a=s;s=r;const l=this;return function(f=a,...d){return l.produce(f,c=>s.call(this,c,...d))}}typeof s!="function"&&_(6),n!==void 0&&typeof n!="function"&&_(7);let o;if(N(r)){const a=Pe(this),l=pe(r,void 0);let u=!0;try{o=s(l),u=!1}finally{u?me(a):he(a)}return Ne(a,n),Fe(o,a)}else if(!r||typeof r!="object"){if(o=s(r),o===void 0&&(o=r),o===Le&&(o=void 0),this.autoFreeze_&&ve(o,!0),n){const a=[],l=[];P("Patches").generateReplacementPatches_(r,o,a,l),n(a,l)}return o}else _(1,r)},this.produceWithPatches=(r,s)=>{if(typeof r=="function")return(l,...u)=>this.produceWithPatches(l,f=>r(f,...u));let n,o;return[this.produce(r,s,(l,u)=>{n=l,o=u}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){N(e)||_(8),A(e)&&(e=Zt(e));const r=Pe(this),s=pe(e,void 0);return s[g].isManual_=!0,he(r),s}finishDraft(e,r){const s=e&&e[g];(!s||!s.isManual_)&&_(9);const{scope_:n}=s;return Ne(n,r),Fe(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,r){let s;for(s=r.length-1;s>=0;s--){const o=r[s];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}s>-1&&(r=r.slice(s+1));const n=P("Patches").applyPatches_;return A(e)?n(e,r):this.produce(e,o=>n(o,r))}};function pe(e,r){const s=te(e)?P("MapSet").proxyMap_(e,r):re(e)?P("MapSet").proxySet_(e,r):Wt(e,r);return(r?r.scope_:Ve()).drafts_.push(s),s}function Zt(e){return A(e)||_(10,e),We(e)}function We(e){if(!N(e)||se(e))return e;const r=e[g];let s;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,s=fe(e,r.scope_.immer_.useStrictShallowCopy_)}else s=fe(e,!0);return K(s,(n,o)=>{Be(s,n,We(o))}),r&&(r.finalized_=!1),s}var j=new Ht,I=j.produce;j.produceWithPatches.bind(j);j.setAutoFreeze.bind(j);j.setUseStrictShallowCopy.bind(j);j.applyPatches.bind(j);j.createDraft.bind(j);j.finishDraft.bind(j);function Ut(){const{data:e,setData:r}=S(),{setCurrentStep:s}=F();if(!e.fullstackResources)return s(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const n=e.fullstackResources.components_resources_info.artifact_store,o=n.flatMap(l=>l.accessible_by_service_connector.map(u=>({...l,value:u})));function a({flavor:l,resourceId:u}){const f=n.find(d=>d.flavor===l);f&&(r(d=>I(d,c=>{c.artifactStoreConfig={flavor:l,configuration:Object.fromEntries(Object.keys(f.required_configuration||{}).map(h=>[h,u])),service_connector_resource_id:u}})),s(d=>d+1))}return{handleFormSubmit:a,flattenedInstances:o}}function V({flavor:e,type:r,width:s=32,height:n=32,...o}){var l;const a=J({...vt.flavorList({name:e,type:r})});return a.isError?null:a.isPending?t.jsx(Y,{style:{height:`${n}px`,width:`${s}px`}}):t.jsx("img",{width:s,height:n,alt:`${e} logo`,...o,src:Ge(((l=a.data.items[0].body)==null?void 0:l.logo_url)??"")})}const Kt="artifact_store";function Qt(){const[e,r]=p.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:l,trigger:u,reset:f}=v(),{flattenedInstances:d,handleFormSubmit:c}=Ut(),h=d.filter(i=>i.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(ge,{placeholder:"Search...",onChange:i=>{f(),r(i.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...a("flavor")}),t.jsx("ul",{className:"space-y-1",children:h.map(i=>t.jsx("li",{children:t.jsx(k,{name:"resourceId",control:s,render:({field:{onChange:m,...x}})=>t.jsxs(Z,{"data-state":l("resourceId")===i.value?"selected":"unselected",htmlFor:i.value,children:[t.jsx(U,{id:i.value,type:"radio",...x,onChange:C=>{n("flavor",i.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),m(C.target.value),u()},value:i.value,name:"connector-radio"}),t.jsx(V,{type:Kt,width:24,height:24,flavor:i.flavor})," ",t.jsx("span",{children:i.value})]})})},i.value))})]})]})}function Gt(){const e=W({resolver:q(Et),shouldUnregister:!0});return t.jsx($,{...e,children:t.jsxs(D,{children:[t.jsx(O,{children:"Artifact Store"}),t.jsx(E,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(Mt,{}),t.jsx(Qt,{})]})}),t.jsx(R,{children:t.jsx(Yt,{})})]})})}function Yt(){const e=v();return t.jsx(M,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const $e=y.object({authMethod:y.string().min(1),stackName:kt});function Jt(){var h,i;const{data:e}=S(),{setCurrentStep:r}=F(),{control:s,watch:n,resetField:o}=v(),{setSchema:a,setDefaultValues:l}=X(),u=J({...De.serviceConnectorTypeDetail(((h=e.connectorConfig)==null?void 0:h.type)||"")});if(u.isError)return null;if(u.isPending)return t.jsx(Y,{className:"h-[40px] w-[100px]"});const f=u.data.auth_methods.filter(m=>m.auth_method!=="implicit").map(m=>({name:m.name,auth_method:m.auth_method}));if(!((i=e.connectorConfig)!=null&&i.type)){r(1);return}function d(){var Ce;const m=n("authMethod"),x=(Ce=u.data)==null?void 0:Ce.auth_methods.find(ne=>ne.auth_method===m);if(!x)return;const C=x.config_schema,b=St(C),He=Ct(C);a($e.merge(b)),l(He),Object.keys(b.shape).forEach(ne=>o(ne))}const c=e.connectorConfig.type||"";return t.jsx(k,{control:s,name:"authMethod",render:({field:{onChange:m,ref:x,...C}})=>t.jsxs(Ye,{...C,onValueChange:b=>{m(b),d()},children:[t.jsx(Je,{className:"w-fit border border-neutral-300 text-left text-text-md",children:t.jsx(Xe,{className:"flex items-center gap-2",placeholder:"Select your Auth Method"})}),t.jsx(et,{children:t.jsx(tt,{viewportClassName:"max-h-[300px]",children:f.map(b=>t.jsx(rt,{className:"space-x-2",value:b.auth_method,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(L,{provider:c}),t.jsx("div",{children:b.name})]})},b.auth_method))})})]})})}function Xt(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(gt,{className:"h-5 w-5 fill-primary-400"}),"Select an Authentication Method"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Connect ZenML to your resources for seamless integration of cloud services into your ML pipelines."})]}),t.jsx(Jt,{})]})}function er(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(zt,{className:"h-5 w-5 fill-primary-400"}),"Add your Configuration"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Your credentials are securely stored and encrypted. ZenML uses these credentials to interact with your resources."})]}),t.jsx(tr,{})]})}function tr(){var c,h;const{data:e}=S(),{watch:r}=v(),s=J({...De.serviceConnectorTypeDetail(((c=e.connectorConfig)==null?void 0:c.type)||"")}),n=r("authMethod"),o=(h=s.data)==null?void 0:h.auth_methods.find(i=>i.auth_method===n);if(s.isError)return null;if(s.isPending)return t.jsx(Y,{className:"h-[200px] w-full"});if(!o)return null;const a=o.config_schema,l=a.properties||{},u=a.required||[],f=a.$defs,d=Object.entries(l).sort(([i],[m])=>u.includes(i)&&!u.includes(m)?-1:!u.includes(i)&&u.includes(m)?1:0);return t.jsx("div",{className:"space-y-5",children:d.map(([i,m])=>t.jsx(bt,{definitions:f,isOptional:wt(i,u),name:i,schema:m},i))})}function rr({open:e,loadingComponents:r}){var n,o;const{data:s}=S();return(n=s.connectorConfig)!=null&&n.type?t.jsx(st,{open:e,children:t.jsxs(nt,{onPointerDownOutside:a=>a.preventDefault(),onEscapeKeyDown:a=>a.preventDefault(),className:"max-w-[600px]",children:[t.jsx("div",{className:"flex items-center justify-between border-b border-theme-border-moderate py-2 pl-5 pr-3",children:t.jsx(ot,{className:"text-text-lg",children:"Connecting and loading your components..."})}),t.jsxs("div",{className:"flex h-[200px] items-center justify-center gap-5 bg-primary-50",children:[t.jsx(it,{className:"h-[60px] w-[60px]"}),t.jsx("div",{className:"flex h-[60px] w-[60px] items-center justify-center",children:t.jsx(at,{className:"h-5 w-5 fill-theme-text-tertiary"})}),t.jsx(L,{className:"h-[60px] w-[60px]",provider:s.connectorConfig.type})]}),t.jsxs("div",{className:"flex flex-col gap-1 px-7 pb-6 pt-5",children:[t.jsxs("p",{className:"text-theme-text-secondary",children:["We're securely connecting to ",Ze(((o=s.connectorConfig)==null?void 0:o.type)||"aws")," ","and retrieving your custom components. This process typically takes about 30-60 seconds."]}),t.jsx(sr,{loadingComponents:r})]})]})}):null}function sr({loadingComponents:e}){const[r,s]=p.useState(!0),[n,o]=p.useState(!0);return p.useEffect(()=>{const a=setTimeout(()=>{s(!1)},Math.floor(Math.random()*1e3)+500),l=setTimeout(()=>{o(!1)},1500);return()=>{clearTimeout(a),clearTimeout(l)}},[]),t.jsxs("ul",{className:"mt-3 space-y-3 text-theme-text-secondary",children:[t.jsxs(ue,{children:[t.jsx(le,{loading:r}),"Establishing a secure connection"]}),t.jsxs(ue,{children:[t.jsx(le,{loading:n}),"Authenticating your account"]}),t.jsxs(ue,{children:[t.jsx(le,{loading:e}),"Fetching your existing components"]})]})}function le({loading:e}){return e?t.jsx(ct,{className:"h-5 w-5 border-2"}):t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"})}function ue({children:e}){return t.jsx("li",{className:"flex items-center gap-1",children:e})}async function nr({payload:e}){const r=dt(ft.serviceConnectors.fullStackResources),s=await lt(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching service connector type");throw new ut({status:s.status,statusText:s.statusText,message:n})}return s.json()}function or(e){return Pt({...e,mutationFn:async({payload:r})=>nr({payload:r})})}function ir(){const{setCurrentStep:e}=F(),[r,s]=p.useState(!0),{toast:n}=Ie(),{setData:o,data:a}=S(),l=or({onSuccess:async f=>{o(d=>I(d,c=>{c.fullstackResources=f})),s(!1),await jt(200),e(d=>d+1)},onError:f=>{n({status:"error",emphasis:"subtle",description:f.message,rounded:!0})}});return{handleFormSubmit:({authMethod:f,stackName:d,...c})=>{Object.keys(c).forEach(i=>{(c[i]===""||c[i]===null||c[i]===void 0||Array.isArray(c[i])&&c[i].length===0)&&delete c[i]});const h=I(a,i=>{i.stackName=d,i.connectorConfig&&(i.connectorConfig.auth_method=f,i.connectorConfig.configuration={...c})});o(h),h.connectorConfig&&l.mutate({payload:h.connectorConfig})},fullStackResources:l,loadingComponents:r}}function ar(){const{handleSubmit:e,formState:{isSubmitting:r}}=v(),{handleFormSubmit:s,fullStackResources:n,loadingComponents:o}=ir();return t.jsxs("form",{onSubmit:e(s),id:"connect-form",children:[t.jsx(rr,{loadingComponents:o,open:r||n.isPending}),t.jsx(Xt,{}),t.jsx(Ue,{}),t.jsx(er,{})]})}function cr(){const{schema:e,defaultValues:r}=X(),s=W({shouldUnregister:!0,mode:"onChange",resolver:q(e),defaultValues:{stackName:"",authMethod:"",...r}});return t.jsx($,{...s,children:t.jsxs(D,{children:[t.jsx(O,{children:"Connect to your Cloud"}),t.jsx(E,{children:t.jsx(ar,{})}),t.jsx(R,{children:t.jsx(lr,{})})]})})}function lr(){const{formState:{isValid:e,isSubmitting:r}}=v(),s=!!Oe();return t.jsx(M,{className:"justify-center gap-2",disabled:!e||s||r,form:"connect-form",size:"md",children:s||r?"Loading...":"Next"})}function ur(){const{data:e,setData:r}=S(),s=Ft(),{toast:n}=Ie(),{setCurrentStep:o}=F(),{mutate:a}=_t({onError:d=>{d instanceof Error&&n({status:"error",emphasis:"subtle",icon:t.jsx(mt,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess:async d=>{r(c=>I(c,h=>{h.createdStackId=d.id})),o(c=>c+1),s.invalidateQueries({queryKey:Ee.all})}});if(!e.fullstackResources)return o(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const l=e.fullstackResources.components_resources_info.container_registry,u=l.flatMap(d=>d.accessible_by_service_connector.map(c=>({...d,value:c})));function f({flavor:d,resourceId:c}){const h=l.find(m=>m.flavor===d);if(!h)return;const i=I(e,m=>{m.registryConfig={flavor:d,configuration:Object.fromEntries(Object.keys(h.required_configuration||{}).map(x=>[x,c])),service_connector_resource_id:c}});r(i),a({workspaceId:"default",payload:{name:i.stackName||Math.random().toString(36).substring(7),service_connectors:i.connectorConfig?[i.connectorConfig]:[],components:{orchestrator:[{...i.orchestratorConfig,service_connector_index:0}],artifact_store:[{...i.artifactStoreConfig,service_connector_index:0}],container_registry:[{...i.registryConfig,service_connector_index:0}]}}})}return{handleFormSubmit:f,flattenedInstances:u}}const dr="container_registry";function fr(){const[e,r]=p.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:l,trigger:u,reset:f}=v(),{flattenedInstances:d,handleFormSubmit:c}=ur(),h=d.filter(i=>i.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(ge,{placeholder:"Search...",onChange:i=>{f(),r(i.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...a("flavor")}),t.jsx("ul",{className:"space-y-1",children:h.map(i=>t.jsx("li",{children:t.jsx(k,{name:"resourceId",control:s,render:({field:{onChange:m,...x}})=>t.jsxs(Z,{"data-state":l("resourceId")===i.value?"selected":"unselected",htmlFor:i.value,children:[t.jsx(U,{id:i.value,type:"radio",...x,onChange:C=>{n("flavor",i.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),m(C.target.value),u()},value:i.value,name:"connector-radio"}),t.jsx(V,{width:24,height:24,type:dr,flavor:i.flavor})," ",t.jsx("span",{children:i.value})]})})},i.value))})]})]})}function mr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"container_registry",className:"h-5 w-5 fill-primary-400"}),"Select your Container Registry"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the Container Registries for your new stack"})]})})}const hr=y.object({flavor:y.string().min(1),resourceId:y.string().min(1)});function xr(){const e=W({resolver:q(hr),shouldUnregister:!0});return t.jsx($,{...e,children:t.jsxs(D,{children:[t.jsx(O,{children:"Container Registry"}),t.jsx(E,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(mr,{}),t.jsx(fr,{})]})}),t.jsx(R,{children:t.jsx(pr,{})})]})})}function pr(){const e=v(),r=!!Oe();return t.jsxs(M,{className:"justify-center gap-2",disabled:!e.formState.isValid||r,form:"artifact-store-form",size:"md",children:[r&&t.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),r?"Loading...":"Next"]})}function yr(){var a;const{data:e,setData:r}=S(),{setCurrentStep:s}=F();if(!e.fullstackResources)return s(2),{orchestrators:[],handleFormSubmit:()=>{}};const n=((a=e.fullstackResources.components_resources_info)==null?void 0:a.orchestrator)||[];function o({flavor:l,resourceId:u,...f}){const d=n.find(c=>c.flavor===l);d&&(r(c=>{const h=d!=null&&d.use_resource_value_as_fixed_config?Object.fromEntries(Object.keys(d.required_configuration||{}).map(i=>[i,u])):{...f};return I(c,i=>{i.orchestratorConfig={flavor:l,configuration:h,service_connector_resource_id:u}})}),s(c=>c+1))}return{orchestrators:n,handleFormSubmit:o}}const ye=y.object({flavor:y.string().min(1),resourceId:y.string().min(1)}),H="kubernetes",ze="orchestrator";function gr(){const{orchestrators:e,handleFormSubmit:r}=yr(),{setSchema:s}=X(),{control:n,watch:o,setValue:a,register:l,reset:u,handleSubmit:f}=v(),d=o("flavor");return t.jsxs("form",{onSubmit:f(r),id:"artifact-store-form",children:[d!==H&&t.jsx("input",{...l("resourceId"),type:"hidden"}),t.jsx("ul",{className:"space-y-1",children:e.map((c,h)=>t.jsxs("li",{children:[t.jsx(k,{control:n,name:"flavor",render:({field:{onChange:i,...m}})=>t.jsxs(Z,{"data-state":d===c.flavor?"selected":"unselected",htmlFor:c.flavor,children:[t.jsx(U,{onChange:x=>{u({flavor:c.flavor}),c.use_resource_value_as_fixed_config===!0&&s(ye),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&s(ye.merge(Nt(c.required_configuration))),c.flavor!==H&&c.accessible_by_service_connector.length>0&&a("resourceId",c.accessible_by_service_connector[0]),i(x)},...m,id:c.flavor,type:"radio",value:c.flavor,name:"orchestrator-flavor-radio"}),t.jsx(V,{width:24,height:24,type:ze,flavor:c.flavor}),t.jsx("span",{children:c.flavor_display_name})]})}),d===c.flavor&&(c.flavor===H||c.use_resource_value_as_fixed_config===!1)&&t.jsxs("div",{className:"space-y-3 py-5 pl-8",children:[c.flavor===H&&t.jsx("ul",{className:"space-y-1",children:c.accessible_by_service_connector.map(i=>t.jsx("li",{children:t.jsx(k,{control:n,name:"resourceId",render:({field:m})=>t.jsxs(Z,{"data-state":o("resourceId")===i?"selected":"unselected",htmlFor:i,children:[t.jsx(U,{...m,id:i,type:"radio",value:i,name:"instance-radio"}),t.jsx(V,{type:ze,width:24,height:24,flavor:c.flavor}),t.jsx("span",{children:i})]})})},i))}),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&Object.keys(c.required_configuration).length>=1&&t.jsx("div",{children:Object.entries(c.required_configuration).map(([i,m])=>t.jsx("div",{children:t.jsx(k,{defaultValue:"",name:i,control:n,render:({field:x})=>t.jsxs("div",{children:[t.jsx("label",{htmlFor:i,className:"text-text-sm",children:m}),t.jsx(ge,{...x,inputSize:"md",required:!0,className:"w-full",id:i})]})})},i))})]})]},h))})]})}function jr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"orchestrator",className:"h-5 w-5 fill-primary-400"}),"Select your Orchestrator"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the connected orchestrators for your new stack"})]})})}function _r(){const{schema:e}=X(),r=W({resolver:q(e),shouldUnregister:!0,defaultValues:{resourceId:""}});return t.jsx($,{...r,children:t.jsxs(D,{children:[t.jsx(O,{children:"Orchestrator"}),t.jsxs(E,{children:[t.jsx(jr,{}),t.jsx(gr,{})]}),t.jsx(R,{children:t.jsx(vr,{})})]})})}function vr(){const e=v();return t.jsx(M,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const Sr=y.object({provider:y.string().min(1)});function Cr(){var a;const{setData:e,data:r}=S(),{setCurrentStep:s}=F(),n=W({resolver:q(Sr),defaultValues:{provider:((a=r.connectorConfig)==null?void 0:a.type)||""}});function o(l){e(u=>({...u,connectorConfig:{type:l.provider,auth_method:""}})),s(u=>u+1)}return t.jsx($,{...n,children:t.jsxs(D,{children:[t.jsx(O,{children:"Select Your Existing Cloud Infrastructure"}),t.jsx(E,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where you have existing infrastructure to connect with ZenML. This will allow you to integrate your current cloud resources with ZenML for model deployment and management."})]}),t.jsxs("form",{id:"provider-form",onSubmit:n.handleSubmit(o),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",children:[t.jsx(oe,{id:"aws-provider",...n.register("provider"),value:"aws",children:t.jsx(ie,{icon:t.jsx(L,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"Connect your existing S3, ECR, and Sagemaker components to ZenML"})}),t.jsx(oe,{id:"gcp-provider",...n.register("provider"),value:"gcp",children:t.jsx(ie,{icon:t.jsx(L,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Link your GCS, Artifact Registry, and Vertex AI components to ZenML"})}),t.jsx(oe,{id:"azure-provider",...n.register("provider"),value:"azure",children:t.jsx(ie,{icon:t.jsx(L,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Integrate ZenML with your Blob Storage, Container Registry, and Azure ML"})})]})]})}),t.jsx(R,{children:t.jsx(br,{})})]})})}function br(){const{formState:{isValid:e}}=v();return t.jsx(M,{form:"provider-form",disabled:!e,size:"md",children:"Next"})}function wr(){var o;const{data:e}=S(),r=J({...Ee.stackDetail(e.createdStackId||""),throwOnError:!0});if(r.isError)return null;if(r.isPending)return t.jsx(Y,{className:"h-[200px] w-full"});const s=r.data,n=It((o=r.data.metadata)==null?void 0:o.components);return t.jsxs(D,{children:[t.jsx(O,{children:"Your stack"}),t.jsx(E,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsx("p",{className:"text-theme-text-secondary",children:"Here you can review the created stack and stack components. Now you can start running pipelines using this new configuration."}),t.jsxs("div",{className:"divide-y divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[t.jsx(Pr,{stack:s}),n.map(a=>t.jsx(Fr,{component:a},a.id))]})]})}),t.jsx(R,{displayCancel:!1,children:t.jsx(Nr,{})})]})}function Nr(){return t.jsx(M,{size:"md",asChild:!0,children:t.jsx(Dt,{to:ht.stacks.overview,children:"Finish"})})}function Pr({stack:e}){return t.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 font-semibold",children:[t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(xt,{type:"square",size:"lg",children:t.jsx(pt,{size:"lg",children:e.name[0]})}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]})}function Fr({component:e}){var r,s,n,o;return t.jsxs("div",{className:"flex items-center justify-between py-3 pl-9 pr-5",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(V,{width:24,height:24,flavor:((r=e.body)==null?void 0:r.flavor_name)||"",type:((s=e.body)==null?void 0:s.type)||"orchestrator"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg font-semibold",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),t.jsx(At,{type:((n=e.body)==null?void 0:n.type)||"alerter",children:yt((o=e.body)==null?void 0:o.type)})]},e.id)}function kr(){const{currentStep:e}=F();if(e===1)return t.jsx(Cr,{});if(e===2)return t.jsx(be,{initialSchema:$e,children:t.jsx(cr,{})});if(e===3)return t.jsx(Gt,{});if(e===4)return t.jsx(be,{initialSchema:ye,children:t.jsx(_r,{})});if(e===5)return t.jsx(xr,{});if(e===6)return t.jsx(wr,{})}const Ae=["Infrastructure Type","Cloud Provider","Connect your Cloud","Artifact Store","Orchestrator","Container Registry"];function is(){return t.jsx(Ke,{maxSteps:Ae.length+1,initialStep:1,children:t.jsx(Ot,{children:t.jsxs("section",{className:"layout-container flex flex-col gap-5 py-5 xl:flex-row",children:[t.jsx(Qe,{entries:Ae}),t.jsx("div",{className:"w-full",children:t.jsx(kr,{})})]})})})}export{is as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{j as e,r as f}from"./@radix-AvWw-1nd.js";import{z as d,o as x,p as h,q as N,j,F as p,B as m,f as S,C as D,h as C,i as P,a0 as E}from"./index-DPjvk73v.js";import{d as _}from"./@react-router-BUo5vhN4.js";import{E as F}from"./EmptyState-DpbfQBDE.js";import{a as T,b as k}from"./@tanstack-CcI3lvwB.js";import{E as I}from"./Error-BkUP4Luv.js";import{t as A}from"./zod-CRNUMWWg.js";import{u as V,C as q}from"./index.esm-cf-8NBxV.js";import{S as z}from"./check-circle-DyCCYTA0.js";import"./@reactflow-BHoFKFSZ.js";const B=d.object({device_id:d.string().optional(),user_code:d.string().optional()});function Y(){const[s]=_(),{device_id:t,user_code:i}=B.parse({device_id:s.get("device_id")||void 0,user_code:s.get("user_code")||void 0});return{user_code:i,device_id:t}}const K=d.object({trustDevice:d.boolean()});function L({deviceId:s,queryParams:t}){return["devices",s,t]}async function R({deviceId:s,queryParams:t}){const i=x(h.devices.detail(s)+"?"+N(t)),r=await j(i,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(!r.ok)throw new p({message:"Error while fetching Device details",status:r.status,statusText:r.statusText});return r.json()}function W(s,t){return T({queryKey:L(s),queryFn:async()=>R(s),...t})}function G({device:s}){var t,i,r,a,c,n;return e.jsx(m,{className:"w-full p-5",children:e.jsxs("dl",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("dt",{children:"IP Address"}),e.jsx("dd",{children:(t=s.body)==null?void 0:t.ip_address})]}),((i=s.metadata)==null?void 0:i.city)&&((r=s.metadata)==null?void 0:r.country)&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("dt",{children:"Location"}),e.jsxs("dd",{children:[(a=s.metadata)==null?void 0:a.city,", ",(c=s.metadata)==null?void 0:c.country]})]}),e.jsxs("div",{className:"flex min-w-0 items-center justify-between",children:[e.jsx("dt",{children:"Hostname"}),e.jsx("dd",{className:"truncate",children:(n=s.body)==null?void 0:n.hostname})]})]})})}async function H({deviceId:s,payload:t}){const i=x(h.devices.verify(s)),r=await j(i,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const a=await r.json().then(c=>c.detail).catch(()=>["","Failed to verify device."]);throw new p({status:r.status,statusText:r.statusText,message:a[1]||"Failed to verify device."})}return r.json()}function J(s){return k({mutationFn:async t=>H(t),...s})}function M({deviceId:s,user_code:t,setSuccess:i}){const r=f.useId(),{handleSubmit:a,formState:{isValid:c},control:n}=V({resolver:A(K),defaultValues:{trustDevice:!1}}),{toast:l}=S(),{mutate:v,isPending:y}=J({onSuccess:()=>{i(!0)},onError:o=>{o instanceof Error&&l({status:"error",emphasis:"subtle",icon:e.jsx(P,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:o.message,rounded:!0})}});function g(o){v({deviceId:s,payload:{user_code:t,trusted_device:o.trustDevice}})}return e.jsxs("form",{onSubmit:a(g),className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(q,{control:n,name:"trustDevice",render:({field:{onChange:o,value:w}})=>e.jsx(D,{checked:w,onCheckedChange:b=>o(!!b),id:r})}),e.jsxs("label",{htmlFor:r,children:[e.jsx("p",{children:"Trust this device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"We won't ask you again soon on this device."})]})]}),e.jsx(C,{disabled:y||!c,size:"md",className:"flex w-full justify-center",children:"Authorize this device"})]})}function O(){return e.jsxs(m,{className:"flex min-w-[540px] flex-col items-center justify-center space-y-7 px-7 py-9",children:[e.jsx(z,{className:"h-[120px] w-[120px] fill-theme-text-success"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"You successfully added your device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"You may close this screen and return to your CLI."})]})]})}function ae(){const{device_id:s,user_code:t}=Y(),[i,r]=f.useState(!1),{data:a,isPending:c,isError:n,error:l}=W({deviceId:s,queryParams:{user_code:t}},{enabled:!!s&&!!t});return!s||!t?e.jsx(F,{children:e.jsx("p",{children:"Invalid device verification link."})}):n?e.jsx(u,{children:e.jsx(I,{isAlertCircle:!0,err:l})}):c?e.jsx(u,{children:e.jsx(E,{})}):i?e.jsx(O,{}):e.jsx(u,{children:e.jsxs("div",{className:"w-full space-y-7",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-0.5 text-display-xs font-semibold",children:"Authorize a new device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"You are logging in from a new device."})]}),e.jsx(G,{device:a}),e.jsx(M,{setSuccess:r,deviceId:s,user_code:t})]})})}function u({children:s}){return e.jsx(m,{className:"flex w-full min-w-[540px] flex-col items-center justify-center gap-5 p-7",children:s})}export{ae as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{j as a,s as r,F as n,o,p as u}from"./index-DPjvk73v.js";import{a as i}from"./@tanstack-CcI3lvwB.js";function c({stackId:t}){return["stacks",t]}async function f({stackId:t}){const s=o(u.stacks.detail(t)),e=await a(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(e.status===404&&r(),!e.ok)throw new n({message:`Error while fetching stack ${t}`,status:e.status,statusText:e.statusText});return e.json()}function y(t,s){return i({queryKey:c(t),queryFn:()=>f(t),...s})}export{f,y as u};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{j as n,F as i,o,p as u}from"./index-DPjvk73v.js";import{b as c}from"./@tanstack-CcI3lvwB.js";async function p(e){const r=o(u.settings),t=await n(r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const a=await t.json().then(s=>Array.isArray(s.detail)?s.detail[1]:s.detail).catch(()=>"Failed to update Server Settings");throw new i({status:t.status,statusText:t.statusText,message:a})}return t.json()}function f(e){return c({mutationFn:async r=>p(r),...e})}export{f as u};
|
{zenml_nightly-0.80.1.dev20250407.dist-info → zenml_nightly-0.80.1.dev20250409.dist-info}/LICENSE
RENAMED
File without changes
|
{zenml_nightly-0.80.1.dev20250407.dist-info → zenml_nightly-0.80.1.dev20250409.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|