zenml-nightly 0.55.0.dev20240124__py3-none-any.whl → 0.72.0.dev20250116__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1240) hide show
  1. zenml/VERSION +1 -1
  2. zenml/__init__.py +9 -12
  3. zenml/actions/__init__.py +14 -0
  4. zenml/actions/base_action.py +682 -0
  5. zenml/actions/pipeline_run/__init__.py +0 -0
  6. zenml/actions/pipeline_run/pipeline_run_action.py +223 -0
  7. zenml/analytics/context.py +70 -15
  8. zenml/analytics/enums.py +21 -17
  9. zenml/analytics/models.py +1 -0
  10. zenml/analytics/utils.py +19 -7
  11. zenml/annotators/base_annotator.py +4 -3
  12. zenml/artifact_stores/base_artifact_store.py +155 -72
  13. zenml/artifact_stores/local_artifact_store.py +3 -2
  14. zenml/artifacts/artifact_config.py +67 -58
  15. zenml/artifacts/external_artifact.py +24 -39
  16. zenml/artifacts/external_artifact_config.py +27 -37
  17. zenml/artifacts/preexisting_data_materializer.py +90 -0
  18. zenml/artifacts/unmaterialized_artifact.py +2 -12
  19. zenml/artifacts/utils.py +521 -220
  20. zenml/cli/__init__.py +1511 -456
  21. zenml/cli/annotator.py +48 -14
  22. zenml/cli/artifact.py +22 -4
  23. zenml/cli/authorized_device.py +1 -0
  24. zenml/cli/base.py +185 -22
  25. zenml/cli/code_repository.py +1 -0
  26. zenml/cli/formatter.py +1 -1
  27. zenml/cli/integration.py +119 -24
  28. zenml/cli/login.py +1053 -0
  29. zenml/cli/model.py +42 -15
  30. zenml/cli/model_registry.py +1 -2
  31. zenml/cli/pipeline.py +168 -82
  32. zenml/cli/secret.py +1 -2
  33. zenml/cli/served_model.py +56 -26
  34. zenml/cli/server.py +486 -619
  35. zenml/cli/service_accounts.py +55 -14
  36. zenml/cli/service_connectors.py +97 -6
  37. zenml/cli/stack.py +821 -531
  38. zenml/cli/stack_components.py +15 -598
  39. zenml/cli/tag.py +1 -0
  40. zenml/cli/text_utils.py +36 -2
  41. zenml/cli/user_management.py +204 -6
  42. zenml/cli/utils.py +411 -290
  43. zenml/client.py +1742 -298
  44. zenml/client_lazy_loader.py +224 -0
  45. zenml/code_repositories/base_code_repository.py +5 -4
  46. zenml/code_repositories/git/local_git_repository_context.py +1 -0
  47. zenml/code_repositories/local_repository_context.py +1 -0
  48. zenml/config/__init__.py +2 -0
  49. zenml/config/base_settings.py +6 -6
  50. zenml/config/build_configuration.py +43 -17
  51. zenml/config/compiler.py +82 -49
  52. zenml/config/docker_settings.py +139 -83
  53. zenml/config/global_config.py +260 -234
  54. zenml/config/pipeline_configurations.py +32 -11
  55. zenml/config/pipeline_run_configuration.py +15 -3
  56. zenml/config/pipeline_spec.py +6 -6
  57. zenml/config/resource_settings.py +8 -9
  58. zenml/config/retry_config.py +27 -0
  59. zenml/config/schedule.py +27 -18
  60. zenml/config/secret_reference_mixin.py +8 -4
  61. zenml/config/secrets_store_config.py +16 -24
  62. zenml/config/server_config.py +434 -51
  63. zenml/config/settings_resolver.py +2 -1
  64. zenml/config/source.py +97 -31
  65. zenml/config/step_configurations.py +83 -39
  66. zenml/config/step_run_info.py +3 -0
  67. zenml/config/store_config.py +20 -54
  68. zenml/config/strict_base_model.py +2 -6
  69. zenml/console.py +0 -1
  70. zenml/constants.py +232 -74
  71. zenml/container_registries/azure_container_registry.py +1 -0
  72. zenml/container_registries/base_container_registry.py +7 -3
  73. zenml/container_registries/default_container_registry.py +4 -3
  74. zenml/container_registries/dockerhub_container_registry.py +1 -0
  75. zenml/container_registries/gcp_container_registry.py +1 -0
  76. zenml/container_registries/github_container_registry.py +2 -10
  77. zenml/data_validators/base_data_validator.py +2 -2
  78. zenml/entrypoints/base_entrypoint_configuration.py +76 -17
  79. zenml/entrypoints/pipeline_entrypoint_configuration.py +1 -0
  80. zenml/entrypoints/step_entrypoint_configuration.py +21 -2
  81. zenml/enums.py +91 -9
  82. zenml/environment.py +52 -319
  83. zenml/{steps/base_parameters.py → event_hub/__init__.py} +5 -7
  84. zenml/event_hub/base_event_hub.py +196 -0
  85. zenml/event_hub/event_hub.py +181 -0
  86. zenml/event_sources/__init__.py +14 -0
  87. zenml/{lineage_graph/edge.py → event_sources/base_event.py} +5 -7
  88. zenml/event_sources/base_event_source.py +695 -0
  89. zenml/event_sources/webhooks/__init__.py +14 -0
  90. zenml/event_sources/webhooks/base_webhook_event_source.py +231 -0
  91. zenml/exceptions.py +40 -41
  92. zenml/feature_stores/base_feature_store.py +4 -6
  93. zenml/hooks/hook_validators.py +3 -11
  94. zenml/image_builders/base_image_builder.py +5 -2
  95. zenml/image_builders/build_context.py +24 -80
  96. zenml/image_builders/local_image_builder.py +14 -6
  97. zenml/integrations/__init__.py +16 -4
  98. zenml/integrations/airflow/__init__.py +3 -5
  99. zenml/integrations/airflow/flavors/airflow_orchestrator_flavor.py +15 -7
  100. zenml/integrations/airflow/orchestrators/airflow_orchestrator.py +15 -252
  101. zenml/integrations/airflow/orchestrators/dag_generator.py +5 -3
  102. zenml/integrations/argilla/__init__.py +46 -0
  103. zenml/integrations/argilla/annotators/__init__.py +20 -0
  104. zenml/integrations/argilla/annotators/argilla_annotator.py +443 -0
  105. zenml/{post_execution → integrations/argilla/flavors}/__init__.py +9 -13
  106. zenml/integrations/argilla/flavors/argilla_annotator_flavor.py +150 -0
  107. zenml/integrations/aws/__init__.py +7 -3
  108. zenml/integrations/aws/container_registries/aws_container_registry.py +44 -8
  109. zenml/integrations/aws/flavors/__init__.py +6 -0
  110. zenml/integrations/aws/flavors/aws_container_registry_flavor.py +3 -2
  111. zenml/integrations/aws/flavors/aws_image_builder_flavor.py +146 -0
  112. zenml/integrations/aws/flavors/sagemaker_orchestrator_flavor.py +104 -16
  113. zenml/integrations/aws/flavors/sagemaker_step_operator_flavor.py +6 -2
  114. zenml/integrations/aws/image_builders/__init__.py +20 -0
  115. zenml/integrations/aws/image_builders/aws_image_builder.py +307 -0
  116. zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +421 -133
  117. zenml/integrations/aws/service_connectors/aws_service_connector.py +175 -48
  118. zenml/integrations/aws/step_operators/sagemaker_step_operator.py +1 -1
  119. zenml/integrations/azure/__init__.py +14 -5
  120. zenml/integrations/azure/azureml_utils.py +201 -0
  121. zenml/integrations/azure/flavors/__init__.py +11 -0
  122. zenml/integrations/azure/flavors/azureml.py +139 -0
  123. zenml/integrations/azure/flavors/azureml_orchestrator_flavor.py +166 -0
  124. zenml/integrations/azure/flavors/azureml_step_operator_flavor.py +71 -18
  125. zenml/integrations/azure/orchestrators/__init__.py +19 -0
  126. zenml/integrations/azure/orchestrators/azureml_orchestrator.py +583 -0
  127. zenml/integrations/azure/orchestrators/azureml_orchestrator_entrypoint_config.py +82 -0
  128. zenml/integrations/azure/service_connectors/azure_service_connector.py +15 -6
  129. zenml/integrations/azure/step_operators/azureml_step_operator.py +78 -173
  130. zenml/integrations/bentoml/__init__.py +1 -1
  131. zenml/integrations/bentoml/constants.py +1 -1
  132. zenml/integrations/bentoml/materializers/bentoml_bento_materializer.py +19 -31
  133. zenml/integrations/bentoml/model_deployers/bentoml_model_deployer.py +128 -239
  134. zenml/integrations/bentoml/services/__init__.py +15 -4
  135. zenml/integrations/bentoml/services/bentoml_container_deployment.py +399 -0
  136. zenml/integrations/bentoml/services/{bentoml_deployment.py → bentoml_local_deployment.py} +85 -43
  137. zenml/integrations/bentoml/services/deployment_type.py +23 -0
  138. zenml/integrations/bentoml/steps/bento_builder.py +2 -0
  139. zenml/integrations/bentoml/steps/bentoml_deployer.py +97 -47
  140. zenml/integrations/bitbucket/__init__.py +42 -0
  141. zenml/integrations/bitbucket/plugins/__init__.py +20 -0
  142. zenml/integrations/bitbucket/plugins/bitbucket_webhook_event_source_flavor.py +43 -0
  143. zenml/integrations/bitbucket/plugins/event_sources/__init__.py +0 -0
  144. zenml/integrations/bitbucket/plugins/event_sources/bitbucket_webhook_event_source.py +486 -0
  145. zenml/integrations/comet/__init__.py +49 -0
  146. zenml/integrations/{kserve/services → comet/experiment_trackers}/__init__.py +5 -6
  147. zenml/integrations/comet/experiment_trackers/comet_experiment_tracker.py +175 -0
  148. zenml/integrations/comet/flavors/__init__.py +24 -0
  149. zenml/integrations/comet/flavors/comet_experiment_tracker_flavor.py +129 -0
  150. zenml/integrations/constants.py +14 -2
  151. zenml/integrations/databricks/__init__.py +70 -0
  152. zenml/{lineage_graph → integrations/databricks/flavors}/__init__.py +14 -18
  153. zenml/integrations/databricks/flavors/databricks_model_deployer_flavor.py +118 -0
  154. zenml/integrations/databricks/flavors/databricks_orchestrator_flavor.py +174 -0
  155. zenml/integrations/{kserve → databricks}/model_deployers/__init__.py +5 -5
  156. zenml/integrations/databricks/model_deployers/databricks_model_deployer.py +249 -0
  157. zenml/integrations/databricks/orchestrators/__init__.py +20 -0
  158. zenml/integrations/databricks/orchestrators/databricks_orchestrator.py +501 -0
  159. zenml/integrations/databricks/orchestrators/databricks_orchestrator_entrypoint_config.py +97 -0
  160. zenml/integrations/databricks/services/__init__.py +19 -0
  161. zenml/integrations/databricks/services/databricks_deployment.py +407 -0
  162. zenml/integrations/{gcp/orchestrators/vertex_scheduler → databricks/utils}/__init__.py +2 -2
  163. zenml/integrations/databricks/utils/databricks_utils.py +87 -0
  164. zenml/integrations/deepchecks/__init__.py +30 -10
  165. zenml/integrations/deepchecks/data_validators/deepchecks_data_validator.py +59 -18
  166. zenml/integrations/deepchecks/materializers/deepchecks_dataset_materializer.py +3 -1
  167. zenml/integrations/deepchecks/materializers/deepchecks_results_materializer.py +3 -3
  168. zenml/integrations/deepchecks/validation_checks.py +62 -35
  169. zenml/integrations/discord/__init__.py +1 -0
  170. zenml/integrations/discord/steps/discord_alerter_ask_step.py +1 -0
  171. zenml/integrations/discord/steps/discord_alerter_post_step.py +1 -0
  172. zenml/integrations/evidently/__init__.py +22 -4
  173. zenml/integrations/evidently/column_mapping.py +11 -3
  174. zenml/integrations/evidently/data_validators/evidently_data_validator.py +24 -6
  175. zenml/integrations/evidently/metrics.py +7 -8
  176. zenml/integrations/evidently/tests.py +7 -8
  177. zenml/integrations/facets/__init__.py +22 -5
  178. zenml/integrations/facets/models.py +2 -7
  179. zenml/integrations/feast/__init__.py +19 -3
  180. zenml/integrations/feast/feature_stores/feast_feature_store.py +13 -32
  181. zenml/integrations/gcp/__init__.py +6 -6
  182. zenml/integrations/gcp/artifact_stores/gcp_artifact_store.py +6 -0
  183. zenml/integrations/gcp/flavors/gcp_artifact_store_flavor.py +1 -0
  184. zenml/integrations/gcp/flavors/vertex_orchestrator_flavor.py +24 -2
  185. zenml/integrations/gcp/flavors/vertex_step_operator_flavor.py +14 -1
  186. zenml/integrations/gcp/google_credentials_mixin.py +1 -1
  187. zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +519 -296
  188. zenml/integrations/gcp/service_connectors/gcp_service_connector.py +788 -113
  189. zenml/integrations/gcp/step_operators/vertex_step_operator.py +9 -1
  190. zenml/integrations/github/__init__.py +15 -0
  191. zenml/integrations/github/code_repositories/github_code_repository.py +3 -2
  192. zenml/integrations/github/plugins/__init__.py +19 -0
  193. zenml/integrations/github/plugins/event_sources/__init__.py +0 -0
  194. zenml/integrations/github/plugins/event_sources/github_webhook_event_source.py +510 -0
  195. zenml/integrations/github/plugins/github_webhook_event_source_flavor.py +43 -0
  196. zenml/integrations/gitlab/code_repositories/gitlab_code_repository.py +7 -1
  197. zenml/integrations/great_expectations/__init__.py +22 -10
  198. zenml/integrations/great_expectations/data_validators/ge_data_validator.py +61 -57
  199. zenml/integrations/great_expectations/flavors/great_expectations_data_validator_flavor.py +35 -2
  200. zenml/integrations/great_expectations/ge_store_backend.py +24 -11
  201. zenml/integrations/great_expectations/materializers/ge_materializer.py +9 -9
  202. zenml/integrations/great_expectations/utils.py +5 -5
  203. zenml/integrations/huggingface/__init__.py +52 -1
  204. zenml/integrations/huggingface/flavors/__init__.py +26 -0
  205. zenml/integrations/huggingface/flavors/huggingface_model_deployer_flavor.py +130 -0
  206. zenml/integrations/huggingface/materializers/__init__.py +3 -0
  207. zenml/integrations/huggingface/materializers/huggingface_datasets_materializer.py +102 -19
  208. zenml/integrations/huggingface/materializers/huggingface_pt_model_materializer.py +18 -19
  209. zenml/integrations/huggingface/materializers/huggingface_t5_materializer.py +104 -0
  210. zenml/integrations/huggingface/materializers/huggingface_tf_model_materializer.py +18 -19
  211. zenml/integrations/huggingface/materializers/huggingface_tokenizer_materializer.py +13 -15
  212. zenml/integrations/huggingface/model_deployers/__init__.py +20 -0
  213. zenml/integrations/huggingface/model_deployers/huggingface_model_deployer.py +247 -0
  214. zenml/integrations/huggingface/services/__init__.py +19 -0
  215. zenml/integrations/huggingface/services/huggingface_deployment.py +292 -0
  216. zenml/integrations/huggingface/steps/__init__.py +21 -0
  217. zenml/integrations/huggingface/steps/accelerate_runner.py +166 -0
  218. zenml/integrations/huggingface/steps/huggingface_deployer.py +110 -0
  219. zenml/integrations/hyperai/__init__.py +53 -0
  220. zenml/integrations/hyperai/flavors/__init__.py +20 -0
  221. zenml/integrations/hyperai/flavors/hyperai_orchestrator_flavor.py +170 -0
  222. zenml/integrations/hyperai/orchestrators/__init__.py +21 -0
  223. zenml/integrations/hyperai/orchestrators/hyperai_orchestrator.py +510 -0
  224. zenml/integrations/hyperai/service_connectors/__init__.py +20 -0
  225. zenml/integrations/hyperai/service_connectors/hyperai_service_connector.py +375 -0
  226. zenml/integrations/integration.py +101 -47
  227. zenml/integrations/kaniko/flavors/kaniko_image_builder_flavor.py +6 -44
  228. zenml/integrations/kaniko/image_builders/kaniko_image_builder.py +9 -6
  229. zenml/integrations/kubeflow/__init__.py +4 -1
  230. zenml/integrations/kubeflow/flavors/kubeflow_orchestrator_flavor.py +67 -82
  231. zenml/integrations/kubeflow/orchestrators/kubeflow_orchestrator.py +306 -248
  232. zenml/integrations/kubernetes/__init__.py +6 -3
  233. zenml/integrations/kubernetes/flavors/__init__.py +8 -0
  234. zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +43 -2
  235. zenml/integrations/kubernetes/flavors/kubernetes_step_operator_flavor.py +166 -0
  236. zenml/integrations/kubernetes/orchestrators/kube_utils.py +67 -12
  237. zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +89 -21
  238. zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +39 -7
  239. zenml/integrations/kubernetes/orchestrators/manifest_utils.py +42 -19
  240. zenml/integrations/kubernetes/pod_settings.py +21 -31
  241. zenml/integrations/kubernetes/serialization_utils.py +3 -3
  242. zenml/integrations/kubernetes/service_connectors/kubernetes_service_connector.py +14 -11
  243. zenml/integrations/kubernetes/step_operators/__init__.py +22 -0
  244. zenml/integrations/kubernetes/step_operators/kubernetes_step_operator.py +236 -0
  245. zenml/integrations/label_studio/__init__.py +1 -3
  246. zenml/integrations/label_studio/annotators/label_studio_annotator.py +46 -14
  247. zenml/integrations/label_studio/flavors/__init__.py +2 -0
  248. zenml/integrations/label_studio/flavors/label_studio_annotator_flavor.py +20 -5
  249. zenml/integrations/langchain/__init__.py +7 -1
  250. zenml/integrations/langchain/materializers/document_materializer.py +44 -8
  251. zenml/integrations/langchain/materializers/openai_embedding_materializer.py +28 -2
  252. zenml/integrations/lightgbm/__init__.py +1 -0
  253. zenml/integrations/lightgbm/materializers/lightgbm_booster_materializer.py +8 -15
  254. zenml/integrations/lightgbm/materializers/lightgbm_dataset_materializer.py +11 -16
  255. zenml/integrations/lightning/__init__.py +48 -0
  256. zenml/integrations/lightning/flavors/__init__.py +23 -0
  257. zenml/integrations/lightning/flavors/lightning_orchestrator_flavor.py +168 -0
  258. zenml/integrations/lightning/orchestrators/__init__.py +23 -0
  259. zenml/integrations/lightning/orchestrators/lightning_orchestrator.py +617 -0
  260. zenml/integrations/lightning/orchestrators/lightning_orchestrator_entrypoint.py +303 -0
  261. zenml/integrations/lightning/orchestrators/lightning_orchestrator_entrypoint_configuration.py +77 -0
  262. zenml/integrations/lightning/orchestrators/utils.py +67 -0
  263. zenml/integrations/mlflow/__init__.py +55 -8
  264. zenml/integrations/mlflow/experiment_trackers/mlflow_experiment_tracker.py +31 -13
  265. zenml/integrations/mlflow/flavors/mlflow_experiment_tracker_flavor.py +32 -37
  266. zenml/integrations/mlflow/model_deployers/mlflow_model_deployer.py +42 -233
  267. zenml/integrations/mlflow/model_registries/mlflow_model_registry.py +42 -49
  268. zenml/integrations/mlflow/services/mlflow_deployment.py +30 -5
  269. zenml/integrations/mlflow/steps/mlflow_deployer.py +25 -27
  270. zenml/integrations/mlflow/steps/mlflow_registry.py +3 -1
  271. zenml/integrations/modal/__init__.py +46 -0
  272. zenml/integrations/modal/flavors/__init__.py +26 -0
  273. zenml/integrations/modal/flavors/modal_step_operator_flavor.py +125 -0
  274. zenml/integrations/modal/step_operators/__init__.py +22 -0
  275. zenml/integrations/modal/step_operators/modal_step_operator.py +242 -0
  276. zenml/integrations/neptune/experiment_trackers/neptune_experiment_tracker.py +7 -5
  277. zenml/integrations/neptune/experiment_trackers/run_state.py +71 -55
  278. zenml/integrations/neptune/flavors/neptune_experiment_tracker_flavor.py +1 -1
  279. zenml/integrations/neural_prophet/__init__.py +6 -1
  280. zenml/integrations/numpy/__init__.py +32 -0
  281. zenml/integrations/{kserve/constants.py → numpy/materializers/__init__.py} +5 -4
  282. zenml/integrations/numpy/materializers/numpy_materializer.py +246 -0
  283. zenml/integrations/openai/__init__.py +1 -1
  284. zenml/integrations/openai/hooks/open_ai_failure_hook.py +39 -14
  285. zenml/{steps/external_artifact.py → integrations/pandas/__init__.py} +17 -11
  286. zenml/integrations/{kserve/custom_deployer → pandas/materializers}/__init__.py +5 -5
  287. zenml/integrations/pandas/materializers/pandas_materializer.py +192 -0
  288. zenml/integrations/pigeon/__init__.py +44 -0
  289. zenml/integrations/pigeon/annotators/__init__.py +20 -0
  290. zenml/integrations/pigeon/annotators/pigeon_annotator.py +330 -0
  291. zenml/integrations/{kserve → pigeon}/flavors/__init__.py +7 -7
  292. zenml/integrations/pigeon/flavors/pigeon_annotator_flavor.py +104 -0
  293. zenml/integrations/pillow/materializers/pillow_image_materializer.py +17 -20
  294. zenml/integrations/polars/__init__.py +1 -0
  295. zenml/integrations/polars/materializers/dataframe_materializer.py +26 -39
  296. zenml/integrations/prodigy/__init__.py +48 -0
  297. zenml/integrations/prodigy/annotators/__init__.py +20 -0
  298. zenml/integrations/prodigy/annotators/prodigy_annotator.py +275 -0
  299. zenml/integrations/prodigy/flavors/__init__.py +24 -0
  300. zenml/integrations/prodigy/flavors/prodigy_annotator_flavor.py +101 -0
  301. zenml/integrations/pycaret/__init__.py +6 -0
  302. zenml/integrations/pycaret/materializers/model_materializer.py +7 -22
  303. zenml/integrations/pytorch/materializers/base_pytorch_materializer.py +8 -2
  304. zenml/integrations/pytorch/materializers/pytorch_module_materializer.py +4 -1
  305. zenml/integrations/registry.py +38 -1
  306. zenml/integrations/s3/__init__.py +2 -3
  307. zenml/integrations/s3/artifact_stores/s3_artifact_store.py +191 -9
  308. zenml/integrations/s3/flavors/s3_artifact_store_flavor.py +22 -45
  309. zenml/integrations/s3/utils.py +39 -0
  310. zenml/integrations/seldon/__init__.py +18 -2
  311. zenml/integrations/seldon/model_deployers/seldon_model_deployer.py +19 -141
  312. zenml/integrations/seldon/secret_schemas/secret_schemas.py +2 -2
  313. zenml/integrations/seldon/seldon_client.py +55 -70
  314. zenml/integrations/seldon/services/seldon_deployment.py +4 -5
  315. zenml/integrations/seldon/steps/seldon_deployer.py +21 -20
  316. zenml/integrations/sklearn/__init__.py +1 -1
  317. zenml/integrations/skypilot/flavors/skypilot_orchestrator_base_vm_config.py +29 -7
  318. zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +47 -28
  319. zenml/integrations/skypilot/orchestrators/skypilot_orchestrator_entrypoint.py +2 -2
  320. zenml/integrations/skypilot_aws/__init__.py +3 -2
  321. zenml/integrations/skypilot_aws/flavors/skypilot_orchestrator_aws_vm_flavor.py +1 -1
  322. zenml/integrations/skypilot_azure/__init__.py +2 -4
  323. zenml/integrations/skypilot_azure/flavors/skypilot_orchestrator_azure_vm_flavor.py +1 -1
  324. zenml/integrations/skypilot_gcp/__init__.py +3 -2
  325. zenml/integrations/skypilot_gcp/flavors/skypilot_orchestrator_gcp_vm_flavor.py +1 -1
  326. zenml/integrations/skypilot_kubernetes/__init__.py +52 -0
  327. zenml/integrations/skypilot_kubernetes/flavors/__init__.py +26 -0
  328. zenml/integrations/skypilot_kubernetes/flavors/skypilot_orchestrator_kubernetes_vm_flavor.py +125 -0
  329. zenml/integrations/skypilot_kubernetes/orchestrators/__init__.py +25 -0
  330. zenml/integrations/skypilot_kubernetes/orchestrators/skypilot_kubernetes_vm_orchestrator.py +74 -0
  331. zenml/integrations/skypilot_lambda/__init__.py +50 -0
  332. zenml/integrations/{kserve/secret_schemas → skypilot_lambda/flavors}/__init__.py +9 -12
  333. zenml/integrations/skypilot_lambda/flavors/skypilot_orchestrator_lambda_vm_flavor.py +130 -0
  334. zenml/{lineage_graph/node → integrations/skypilot_lambda/orchestrators}/__init__.py +8 -15
  335. zenml/integrations/skypilot_lambda/orchestrators/skypilot_lambda_vm_orchestrator.py +92 -0
  336. zenml/integrations/slack/__init__.py +1 -0
  337. zenml/integrations/slack/alerters/slack_alerter.py +22 -2
  338. zenml/integrations/slack/flavors/__init__.py +2 -0
  339. zenml/integrations/slack/flavors/slack_alerter_flavor.py +13 -4
  340. zenml/integrations/slack/steps/slack_alerter_ask_step.py +1 -0
  341. zenml/integrations/slack/steps/slack_alerter_post_step.py +1 -0
  342. zenml/integrations/spark/flavors/spark_step_operator_flavor.py +2 -39
  343. zenml/integrations/spark/step_operators/kubernetes_step_operator.py +1 -0
  344. zenml/integrations/spark/step_operators/spark_entrypoint_configuration.py +1 -0
  345. zenml/integrations/spark/step_operators/spark_step_operator.py +2 -0
  346. zenml/integrations/tekton/__init__.py +2 -1
  347. zenml/integrations/tekton/flavors/tekton_orchestrator_flavor.py +66 -23
  348. zenml/integrations/tekton/orchestrators/tekton_orchestrator.py +549 -235
  349. zenml/integrations/tensorboard/__init__.py +1 -13
  350. zenml/integrations/tensorboard/services/tensorboard_service.py +3 -4
  351. zenml/integrations/tensorboard/visualizers/tensorboard_visualizer.py +66 -59
  352. zenml/integrations/tensorflow/__init__.py +10 -15
  353. zenml/integrations/tensorflow/materializers/keras_materializer.py +24 -27
  354. zenml/integrations/tensorflow/materializers/tf_dataset_materializer.py +9 -16
  355. zenml/integrations/vllm/__init__.py +50 -0
  356. zenml/integrations/vllm/flavors/__init__.py +21 -0
  357. zenml/integrations/vllm/flavors/vllm_model_deployer_flavor.py +91 -0
  358. zenml/integrations/vllm/model_deployers/__init__.py +19 -0
  359. zenml/integrations/vllm/model_deployers/vllm_model_deployer.py +263 -0
  360. zenml/integrations/vllm/services/__init__.py +19 -0
  361. zenml/integrations/vllm/services/vllm_deployment.py +206 -0
  362. zenml/integrations/wandb/__init__.py +1 -0
  363. zenml/integrations/wandb/flavors/wandb_experiment_tracker_flavor.py +21 -18
  364. zenml/integrations/whylogs/__init__.py +18 -2
  365. zenml/integrations/whylogs/data_validators/whylogs_data_validator.py +3 -3
  366. zenml/integrations/whylogs/flavors/whylogs_data_validator_flavor.py +1 -1
  367. zenml/integrations/whylogs/materializers/whylogs_materializer.py +14 -21
  368. zenml/integrations/xgboost/materializers/xgboost_booster_materializer.py +11 -22
  369. zenml/integrations/xgboost/materializers/xgboost_dmatrix_materializer.py +10 -19
  370. zenml/io/fileio.py +1 -0
  371. zenml/io/filesystem.py +2 -2
  372. zenml/io/local_filesystem.py +3 -3
  373. zenml/logger.py +41 -17
  374. zenml/logging/__init__.py +5 -0
  375. zenml/logging/step_logging.py +280 -32
  376. zenml/{new/steps → login}/__init__.py +4 -1
  377. zenml/login/credentials.py +370 -0
  378. zenml/login/credentials_store.py +638 -0
  379. zenml/{new/pipelines → login/pro}/__init__.py +4 -1
  380. zenml/login/pro/client.py +492 -0
  381. zenml/login/pro/constants.py +28 -0
  382. zenml/{zen_stores/schemas/identity_schemas.py → login/pro/models.py} +9 -11
  383. zenml/login/pro/organization/__init__.py +14 -0
  384. zenml/login/pro/organization/client.py +79 -0
  385. zenml/{lineage_graph/node/base_node.py → login/pro/organization/models.py} +13 -12
  386. zenml/{_hub → login/pro/tenant}/__init__.py +2 -2
  387. zenml/login/pro/tenant/client.py +92 -0
  388. zenml/login/pro/tenant/models.py +176 -0
  389. zenml/login/pro/utils.py +107 -0
  390. zenml/login/server_info.py +52 -0
  391. zenml/{cli → login}/web_login.py +71 -21
  392. zenml/materializers/__init__.py +2 -4
  393. zenml/materializers/base_materializer.py +180 -51
  394. zenml/materializers/built_in_materializer.py +50 -23
  395. zenml/materializers/cloudpickle_materializer.py +4 -5
  396. zenml/materializers/numpy_materializer.py +23 -233
  397. zenml/materializers/pandas_materializer.py +22 -174
  398. zenml/materializers/pydantic_materializer.py +2 -2
  399. zenml/materializers/service_materializer.py +12 -10
  400. zenml/materializers/structured_string_materializer.py +12 -6
  401. zenml/materializers/uuid_materializer.py +79 -0
  402. zenml/metadata/lazy_load.py +33 -17
  403. zenml/metadata/metadata_types.py +112 -3
  404. zenml/model/lazy_load.py +85 -4
  405. zenml/model/model.py +236 -226
  406. zenml/model/utils.py +99 -141
  407. zenml/model_deployers/base_model_deployer.py +319 -47
  408. zenml/model_registries/base_model_registry.py +17 -15
  409. zenml/models/__init__.py +254 -175
  410. zenml/models/v2/base/base.py +254 -112
  411. zenml/models/v2/base/base_plugin_flavor.py +76 -0
  412. zenml/models/v2/base/filter.py +530 -199
  413. zenml/models/v2/base/page.py +2 -12
  414. zenml/models/v2/base/scoped.py +292 -22
  415. zenml/models/v2/core/action.py +276 -0
  416. zenml/models/v2/core/action_flavor.py +57 -0
  417. zenml/models/v2/core/api_key.py +35 -12
  418. zenml/models/v2/core/artifact.py +126 -6
  419. zenml/models/v2/core/artifact_version.py +289 -65
  420. zenml/models/v2/core/artifact_visualization.py +10 -4
  421. zenml/models/v2/core/code_reference.py +13 -4
  422. zenml/models/v2/core/code_repository.py +39 -16
  423. zenml/models/v2/core/component.py +113 -61
  424. zenml/models/v2/core/device.py +25 -5
  425. zenml/models/v2/core/event_source.py +244 -0
  426. zenml/models/v2/core/event_source_flavor.py +67 -0
  427. zenml/models/v2/core/flavor.py +90 -27
  428. zenml/models/v2/core/logs.py +81 -12
  429. zenml/models/v2/core/model.py +91 -42
  430. zenml/models/v2/core/model_version.py +100 -55
  431. zenml/models/v2/core/model_version_artifact.py +96 -89
  432. zenml/models/v2/core/model_version_pipeline_run.py +86 -53
  433. zenml/models/v2/core/pipeline.py +205 -80
  434. zenml/models/v2/core/pipeline_build.py +110 -21
  435. zenml/models/v2/core/pipeline_deployment.py +101 -36
  436. zenml/models/v2/core/pipeline_run.py +545 -33
  437. zenml/models/v2/core/run_metadata.py +23 -181
  438. zenml/models/v2/core/run_template.py +439 -0
  439. zenml/models/v2/core/schedule.py +66 -29
  440. zenml/models/v2/core/secret.py +33 -21
  441. zenml/models/v2/core/server_settings.py +224 -0
  442. zenml/models/v2/core/service.py +500 -0
  443. zenml/models/v2/core/service_account.py +40 -15
  444. zenml/models/v2/core/service_connector.py +247 -49
  445. zenml/models/v2/core/stack.py +163 -70
  446. zenml/models/v2/core/step_run.py +210 -48
  447. zenml/models/v2/core/tag.py +21 -8
  448. zenml/models/v2/core/tag_resource.py +13 -4
  449. zenml/models/v2/core/trigger.py +422 -0
  450. zenml/models/v2/core/trigger_execution.py +119 -0
  451. zenml/models/v2/core/user.py +136 -69
  452. zenml/models/v2/core/workspace.py +26 -7
  453. zenml/models/v2/misc/auth_models.py +11 -2
  454. zenml/models/v2/misc/build_item.py +3 -3
  455. zenml/models/v2/misc/external_user.py +3 -6
  456. zenml/models/v2/misc/info_models.py +78 -0
  457. zenml/models/v2/misc/loaded_visualization.py +2 -2
  458. zenml/models/v2/misc/run_metadata.py +38 -0
  459. zenml/models/v2/misc/server_models.py +100 -0
  460. zenml/models/v2/misc/service_connector_type.py +9 -17
  461. zenml/models/v2/misc/stack_deployment.py +96 -0
  462. zenml/models/v2/misc/user_auth.py +7 -9
  463. zenml/orchestrators/__init__.py +4 -0
  464. zenml/orchestrators/base_orchestrator.py +136 -25
  465. zenml/orchestrators/containerized_orchestrator.py +1 -0
  466. zenml/orchestrators/dag_runner.py +18 -3
  467. zenml/orchestrators/input_utils.py +109 -48
  468. zenml/orchestrators/local/local_orchestrator.py +10 -0
  469. zenml/orchestrators/local_docker/local_docker_orchestrator.py +14 -42
  470. zenml/orchestrators/output_utils.py +16 -6
  471. zenml/orchestrators/publish_utils.py +12 -5
  472. zenml/orchestrators/step_launcher.py +142 -194
  473. zenml/orchestrators/step_run_utils.py +386 -0
  474. zenml/orchestrators/step_runner.py +181 -270
  475. zenml/orchestrators/utils.py +219 -84
  476. zenml/orchestrators/wheeled_orchestrator.py +147 -0
  477. zenml/pipelines/__init__.py +3 -16
  478. zenml/{new/pipelines → pipelines}/build_utils.py +287 -47
  479. zenml/{new/pipelines → pipelines}/pipeline_context.py +6 -2
  480. zenml/pipelines/pipeline_decorator.py +40 -64
  481. zenml/{new/pipelines/pipeline.py → pipelines/pipeline_definition.py} +376 -440
  482. zenml/pipelines/run_utils.py +358 -0
  483. zenml/plugins/__init__.py +0 -0
  484. zenml/plugins/base_plugin_flavor.py +88 -0
  485. zenml/plugins/plugin_flavor_registry.py +342 -0
  486. zenml/secret/base_secret.py +7 -8
  487. zenml/secret/schemas/basic_auth_secret_schema.py +0 -1
  488. zenml/service_connectors/docker_service_connector.py +19 -4
  489. zenml/service_connectors/service_connector.py +12 -14
  490. zenml/service_connectors/service_connector_registry.py +71 -55
  491. zenml/service_connectors/service_connector_utils.py +418 -0
  492. zenml/services/__init__.py +0 -2
  493. zenml/services/container/container_service.py +9 -6
  494. zenml/services/container/container_service_endpoint.py +1 -1
  495. zenml/services/container/entrypoint.py +3 -2
  496. zenml/services/local/local_daemon_entrypoint.py +9 -6
  497. zenml/services/local/local_service.py +1 -1
  498. zenml/services/local/local_service_endpoint.py +1 -1
  499. zenml/services/service.py +222 -130
  500. zenml/services/service_status.py +2 -1
  501. zenml/services/service_type.py +6 -5
  502. zenml/stack/flavor.py +25 -18
  503. zenml/stack/flavor_registry.py +4 -4
  504. zenml/stack/stack.py +20 -131
  505. zenml/stack/stack_component.py +136 -110
  506. zenml/stack/utils.py +36 -15
  507. zenml/stack_deployments/__init__.py +14 -0
  508. zenml/stack_deployments/aws_stack_deployment.py +320 -0
  509. zenml/stack_deployments/azure_stack_deployment.py +315 -0
  510. zenml/stack_deployments/gcp_stack_deployment.py +315 -0
  511. zenml/stack_deployments/stack_deployment.py +232 -0
  512. zenml/stack_deployments/utils.py +48 -0
  513. zenml/step_operators/step_operator_entrypoint_configuration.py +2 -1
  514. zenml/steps/__init__.py +3 -9
  515. zenml/steps/base_step.py +172 -315
  516. zenml/{new/steps → steps}/decorated_step.py +1 -0
  517. zenml/steps/entrypoint_function_utils.py +33 -93
  518. zenml/{new/steps → steps}/step_context.py +70 -50
  519. zenml/steps/step_decorator.py +47 -93
  520. zenml/steps/step_invocation.py +22 -60
  521. zenml/steps/utils.py +161 -48
  522. zenml/types.py +14 -1
  523. zenml/utils/archivable.py +178 -0
  524. zenml/utils/callback_registry.py +71 -0
  525. zenml/utils/code_repository_utils.py +1 -0
  526. zenml/utils/code_utils.py +346 -0
  527. zenml/utils/cuda_utils.py +50 -0
  528. zenml/utils/dashboard_utils.py +67 -21
  529. zenml/utils/deprecation_utils.py +22 -24
  530. zenml/utils/dict_utils.py +22 -0
  531. zenml/utils/docker_utils.py +34 -5
  532. zenml/utils/downloaded_repository_context.py +1 -0
  533. zenml/utils/env_utils.py +55 -1
  534. zenml/utils/filesync_model.py +65 -28
  535. zenml/utils/function_utils.py +260 -0
  536. zenml/utils/integration_utils.py +1 -0
  537. zenml/utils/json_utils.py +131 -0
  538. zenml/utils/materializer_utils.py +1 -1
  539. zenml/utils/metadata_utils.py +368 -0
  540. zenml/utils/notebook_utils.py +136 -0
  541. zenml/utils/package_utils.py +89 -0
  542. zenml/utils/pagination_utils.py +9 -7
  543. zenml/utils/pipeline_docker_image_builder.py +152 -149
  544. zenml/utils/pydantic_utils.py +276 -66
  545. zenml/utils/requirements_utils.py +71 -0
  546. zenml/utils/secret_utils.py +66 -12
  547. zenml/utils/settings_utils.py +2 -1
  548. zenml/utils/singleton.py +15 -3
  549. zenml/utils/source_code_utils.py +1 -0
  550. zenml/utils/source_utils.py +236 -14
  551. zenml/utils/string_utils.py +140 -0
  552. zenml/utils/typed_model.py +5 -3
  553. zenml/utils/typing_utils.py +223 -0
  554. zenml/utils/visualization_utils.py +5 -3
  555. zenml/utils/yaml_utils.py +1 -1
  556. zenml/zen_server/auth.py +387 -55
  557. zenml/zen_server/cache.py +208 -0
  558. zenml/zen_server/cloud_utils.py +253 -0
  559. zenml/zen_server/csrf.py +91 -0
  560. zenml/zen_server/dashboard/assets/404-Dfq64Boz.js +1 -0
  561. zenml/zen_server/dashboard/assets/@radix-DeK6qiuw.js +85 -0
  562. zenml/zen_server/dashboard/assets/@react-router-B3Z5rLr2.js +29 -0
  563. zenml/zen_server/dashboard/assets/@reactflow-BUNIMFeC.js +17 -0
  564. zenml/zen_server/dashboard/assets/@reactflow-C26Olbza.css +1 -0
  565. zenml/zen_server/dashboard/assets/@tanstack-DT5WLu9C.js +22 -0
  566. zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-B73Vs10T.js +1 -0
  567. zenml/zen_server/dashboard/assets/CodeSnippet-Bbx6fIb6.css +1 -0
  568. zenml/zen_server/dashboard/assets/CodeSnippet-DIJRT2NT.js +9 -0
  569. zenml/zen_server/dashboard/assets/CollapsibleCard-BzUHGZOU.js +1 -0
  570. zenml/zen_server/dashboard/assets/Commands-BEGyld4c.js +1 -0
  571. zenml/zen_server/dashboard/assets/ComponentBadge-xyKiek1s.js +1 -0
  572. zenml/zen_server/dashboard/assets/CopyButton-DhW-mapu.js +2 -0
  573. zenml/zen_server/dashboard/assets/CsvVizualization-D8oazBiE.js +15 -0
  574. zenml/zen_server/dashboard/assets/DeleteAlertDialog-WkSIIgfy.js +1 -0
  575. zenml/zen_server/dashboard/assets/DialogItem-Bgroeg29.js +1 -0
  576. zenml/zen_server/dashboard/assets/DisplayDate-CDMUcQHS.js +1 -0
  577. zenml/zen_server/dashboard/assets/EmptyState-BzdlCwp3.js +1 -0
  578. zenml/zen_server/dashboard/assets/Error-CY5tlu17.js +1 -0
  579. zenml/zen_server/dashboard/assets/ExecutionStatus-G8mjIaeA.js +1 -0
  580. zenml/zen_server/dashboard/assets/Helpbox-Bb1ed--O.js +1 -0
  581. zenml/zen_server/dashboard/assets/Infobox-Da6-76M2.js +1 -0
  582. zenml/zen_server/dashboard/assets/InlineAvatar-DqnZaBNq.js +1 -0
  583. zenml/zen_server/dashboard/assets/Lock-CYYy18Mm.js +1 -0
  584. zenml/zen_server/dashboard/assets/MarkdownVisualization-ylXaAxev.js +14 -0
  585. zenml/zen_server/dashboard/assets/NestedCollapsible-aK5ojKoF.js +1 -0
  586. zenml/zen_server/dashboard/assets/NumberBox-Dtp3J6g5.js +1 -0
  587. zenml/zen_server/dashboard/assets/Partials-CqZp5NMX.js +1 -0
  588. zenml/zen_server/dashboard/assets/PasswordChecker-B0nadgh6.js +1 -0
  589. zenml/zen_server/dashboard/assets/ProBadge-B4tRUYve.js +1 -0
  590. zenml/zen_server/dashboard/assets/ProCta-CZuP29Qz.js +1 -0
  591. zenml/zen_server/dashboard/assets/ProviderIcon-Bd7GUQ1_.js +1 -0
  592. zenml/zen_server/dashboard/assets/ProviderRadio-mstdqzsS.js +1 -0
  593. zenml/zen_server/dashboard/assets/RunSelector-CsruSB4i.js +1 -0
  594. zenml/zen_server/dashboard/assets/RunsBody-DxxtWVYz.js +1 -0
  595. zenml/zen_server/dashboard/assets/SearchField-D6tPxyqw.js +1 -0
  596. zenml/zen_server/dashboard/assets/SecretTooltip-CLzJIYW_.js +1 -0
  597. zenml/zen_server/dashboard/assets/SetPassword-Yn50ooBC.js +1 -0
  598. zenml/zen_server/dashboard/assets/StackList-U537qoYd.js +1 -0
  599. zenml/zen_server/dashboard/assets/Tabs-CNv-eTYM.js +1 -0
  600. zenml/zen_server/dashboard/assets/Tick-jEIevzVf.js +1 -0
  601. zenml/zen_server/dashboard/assets/UpdatePasswordSchemas-C16GW-kX.js +1 -0
  602. zenml/zen_server/dashboard/assets/UsageReason-Bf2tzhv1.js +1 -0
  603. zenml/zen_server/dashboard/assets/WizardFooter-D6i-AP1K.js +1 -0
  604. zenml/zen_server/dashboard/assets/acp-DOsXjFc7.webp +0 -0
  605. zenml/zen_server/dashboard/assets/adam-e-y0WnB_.webp +0 -0
  606. zenml/zen_server/dashboard/assets/alex-DcCuDHPg.webp +0 -0
  607. zenml/zen_server/dashboard/assets/all-pipeline-runs-query-DUti43aF.js +1 -0
  608. zenml/zen_server/dashboard/assets/baris-C0ZrZ10g.webp +0 -0
  609. zenml/zen_server/dashboard/assets/check-DloQpStc.js +1 -0
  610. zenml/zen_server/dashboard/assets/check-circle-jNbX5-sR.js +1 -0
  611. zenml/zen_server/dashboard/assets/chevron-down-6JyMkfjR.js +1 -0
  612. zenml/zen_server/dashboard/assets/chevron-right-double-D7ojK9Co.js +1 -0
  613. zenml/zen_server/dashboard/assets/cloud-squares-DeRLMopf.svg +43 -0
  614. zenml/zen_server/dashboard/assets/code-browser-CUFUIHfp.js +1 -0
  615. zenml/zen_server/dashboard/assets/code-snippets-CqONne41.js +13 -0
  616. zenml/zen_server/dashboard/assets/components-Br2ezRib.js +1 -0
  617. zenml/zen_server/dashboard/assets/connectors-video-C9qY4syJ.svg +21 -0
  618. zenml/zen_server/dashboard/assets/copy-C8XQA2Ug.js +1 -0
  619. zenml/zen_server/dashboard/assets/create-stack-Ch2WPs9U.js +1 -0
  620. zenml/zen_server/dashboard/assets/dates-3pMLCNrD.js +1 -0
  621. zenml/zen_server/dashboard/assets/delete-run-Byf9hTjA.js +1 -0
  622. zenml/zen_server/dashboard/assets/docker-BdA9vrnW.js +1 -0
  623. zenml/zen_server/dashboard/assets/dots-horizontal-otGBOSDJ.js +1 -0
  624. zenml/zen_server/dashboard/assets/flyte-Cj-xy_8I.svg +10 -0
  625. zenml/zen_server/dashboard/assets/form-schemas-BZqKBPBF.js +1 -0
  626. zenml/zen_server/dashboard/assets/gcp-CFtm4BA7.js +1 -0
  627. zenml/zen_server/dashboard/assets/hamza-NKKOZz1I.webp +0 -0
  628. zenml/zen_server/dashboard/assets/help-Cc9bBIJH.js +1 -0
  629. zenml/zen_server/dashboard/assets/index-CE0aQlv8.js +55 -0
  630. zenml/zen_server/dashboard/assets/index-CtdYkjUi.js +1 -0
  631. zenml/zen_server/dashboard/assets/index-CyBKZcpO.js +1 -0
  632. zenml/zen_server/dashboard/assets/index-DXvT1_Um.css +1 -0
  633. zenml/zen_server/dashboard/assets/index-Uu49AX48.js +1 -0
  634. zenml/zen_server/dashboard/assets/index-v6gQjDEo.js +1 -0
  635. zenml/zen_server/dashboard/assets/index.esm-Dy6Z9Ung.js +1 -0
  636. zenml/zen_server/dashboard/assets/inter-cyrillic-400-normal-BLGc9T1a.woff2 +0 -0
  637. zenml/zen_server/dashboard/assets/inter-cyrillic-400-normal-ZzOtrSSW.woff +0 -0
  638. zenml/zen_server/dashboard/assets/inter-cyrillic-500-normal-D4Vwzodn.woff2 +0 -0
  639. zenml/zen_server/dashboard/assets/inter-cyrillic-500-normal-DH2hs3aW.woff +0 -0
  640. zenml/zen_server/dashboard/assets/inter-cyrillic-600-normal-BGBWG807.woff2 +0 -0
  641. zenml/zen_server/dashboard/assets/inter-cyrillic-600-normal-BuzJQFbW.woff +0 -0
  642. zenml/zen_server/dashboard/assets/inter-cyrillic-ext-400-normal-BPnxn4xp.woff +0 -0
  643. zenml/zen_server/dashboard/assets/inter-cyrillic-ext-400-normal-Dc4VJyIJ.woff2 +0 -0
  644. zenml/zen_server/dashboard/assets/inter-cyrillic-ext-500-normal-BShVwWPj.woff2 +0 -0
  645. zenml/zen_server/dashboard/assets/inter-cyrillic-ext-500-normal-CUiC4oBV.woff +0 -0
  646. zenml/zen_server/dashboard/assets/inter-cyrillic-ext-600-normal-Bt9VVOA-.woff +0 -0
  647. zenml/zen_server/dashboard/assets/inter-cyrillic-ext-600-normal-CaqZN2hq.woff2 +0 -0
  648. zenml/zen_server/dashboard/assets/inter-greek-400-normal-BZzXV7-1.woff +0 -0
  649. zenml/zen_server/dashboard/assets/inter-greek-400-normal-DxZsaF_h.woff2 +0 -0
  650. zenml/zen_server/dashboard/assets/inter-greek-500-normal-CeQXL5ds.woff2 +0 -0
  651. zenml/zen_server/dashboard/assets/inter-greek-500-normal-d_eO-yCQ.woff +0 -0
  652. zenml/zen_server/dashboard/assets/inter-greek-600-normal-CwicyhtI.woff +0 -0
  653. zenml/zen_server/dashboard/assets/inter-greek-600-normal-Dhlb-90d.woff2 +0 -0
  654. zenml/zen_server/dashboard/assets/inter-greek-ext-400-normal-Bput3-QP.woff2 +0 -0
  655. zenml/zen_server/dashboard/assets/inter-greek-ext-400-normal-DCpCPQOf.woff +0 -0
  656. zenml/zen_server/dashboard/assets/inter-greek-ext-500-normal-B6guLgqG.woff2 +0 -0
  657. zenml/zen_server/dashboard/assets/inter-greek-ext-500-normal-M2hEX8vc.woff +0 -0
  658. zenml/zen_server/dashboard/assets/inter-greek-ext-600-normal-C9WLioJ8.woff +0 -0
  659. zenml/zen_server/dashboard/assets/inter-greek-ext-600-normal-Cnui8OiR.woff2 +0 -0
  660. zenml/zen_server/dashboard/assets/inter-latin-400-normal-BOOGhInR.woff2 +0 -0
  661. zenml/zen_server/dashboard/assets/inter-latin-400-normal-gitzw0hO.woff +0 -0
  662. zenml/zen_server/dashboard/assets/inter-latin-500-normal-D2bGa7uu.woff2 +0 -0
  663. zenml/zen_server/dashboard/assets/inter-latin-500-normal-deR1Tlfd.woff +0 -0
  664. zenml/zen_server/dashboard/assets/inter-latin-600-normal-B5cFAncS.woff +0 -0
  665. zenml/zen_server/dashboard/assets/inter-latin-600-normal-D273HNI0.woff2 +0 -0
  666. zenml/zen_server/dashboard/assets/inter-latin-ext-400-normal-C1t-h-pH.woff +0 -0
  667. zenml/zen_server/dashboard/assets/inter-latin-ext-400-normal-hnt3BR84.woff2 +0 -0
  668. zenml/zen_server/dashboard/assets/inter-latin-ext-500-normal-CIS2RHJS.woff2 +0 -0
  669. zenml/zen_server/dashboard/assets/inter-latin-ext-500-normal-UMdmhHu2.woff +0 -0
  670. zenml/zen_server/dashboard/assets/inter-latin-ext-600-normal-BnYJhD27.woff2 +0 -0
  671. zenml/zen_server/dashboard/assets/inter-latin-ext-600-normal-CAF0vJDd.woff +0 -0
  672. zenml/zen_server/dashboard/assets/inter-vietnamese-400-normal-BUNmGMP1.woff +0 -0
  673. zenml/zen_server/dashboard/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
  674. zenml/zen_server/dashboard/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
  675. zenml/zen_server/dashboard/assets/inter-vietnamese-500-normal-DQPw2Hwd.woff +0 -0
  676. zenml/zen_server/dashboard/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
  677. zenml/zen_server/dashboard/assets/inter-vietnamese-600-normal-Cm6aH8_k.woff +0 -0
  678. zenml/zen_server/dashboard/assets/key-icon-aH-QIa5R.js +1 -0
  679. zenml/zen_server/dashboard/assets/kubernetes-B2wmAJ1d.js +1 -0
  680. zenml/zen_server/dashboard/assets/layout-BtHBmE4w.js +1 -0
  681. zenml/zen_server/dashboard/assets/link-external-b9AXw_sW.js +1 -0
  682. zenml/zen_server/dashboard/assets/login-command-CkqxPtV3.js +1 -0
  683. zenml/zen_server/dashboard/assets/login-mutation-DNDVp_2H.js +1 -0
  684. zenml/zen_server/dashboard/assets/logs-WMSM52RF.js +1 -0
  685. zenml/zen_server/dashboard/assets/mcp-Cb1aMeoq.webp +0 -0
  686. zenml/zen_server/dashboard/assets/metaflow-weOkWNyT.svg +10 -0
  687. zenml/zen_server/dashboard/assets/not-found-Bmup4ctE.js +1 -0
  688. zenml/zen_server/dashboard/assets/package-C6uypY4h.js +1 -0
  689. zenml/zen_server/dashboard/assets/page--XLMzHrn.js +1 -0
  690. zenml/zen_server/dashboard/assets/page-ANYGfEUL.js +1 -0
  691. zenml/zen_server/dashboard/assets/page-B5Sr8pib.js +1 -0
  692. zenml/zen_server/dashboard/assets/page-BC27C_OI.js +2 -0
  693. zenml/zen_server/dashboard/assets/page-BNxYrN0q.js +1 -0
  694. zenml/zen_server/dashboard/assets/page-BYJfqgLN.js +1 -0
  695. zenml/zen_server/dashboard/assets/page-B_0XkV48.js +1 -0
  696. zenml/zen_server/dashboard/assets/page-BrmJp1Wt.js +1 -0
  697. zenml/zen_server/dashboard/assets/page-C2nU3Gxn.js +1 -0
  698. zenml/zen_server/dashboard/assets/page-C70wZtV2.js +1 -0
  699. zenml/zen_server/dashboard/assets/page-CHRn1fQm.js +1 -0
  700. zenml/zen_server/dashboard/assets/page-CWr96ZKN.js +1 -0
  701. zenml/zen_server/dashboard/assets/page-CXAbSyp9.js +1 -0
  702. zenml/zen_server/dashboard/assets/page-CaeI9ptC.js +1 -0
  703. zenml/zen_server/dashboard/assets/page-Cc8ZEuj4.js +1 -0
  704. zenml/zen_server/dashboard/assets/page-CltCNL0T.js +1 -0
  705. zenml/zen_server/dashboard/assets/page-CmlYj7Nl.js +1 -0
  706. zenml/zen_server/dashboard/assets/page-D6Ev5P8V.js +1 -0
  707. zenml/zen_server/dashboard/assets/page-D9Oh05fl.js +1 -0
  708. zenml/zen_server/dashboard/assets/page-DGlm1RVc.js +1 -0
  709. zenml/zen_server/dashboard/assets/page-DN4BVIOL.js +1 -0
  710. zenml/zen_server/dashboard/assets/page-Dif8CWyZ.js +1 -0
  711. zenml/zen_server/dashboard/assets/page-DlIi5ThM.js +1 -0
  712. zenml/zen_server/dashboard/assets/page-DoW7YxTu.js +1 -0
  713. zenml/zen_server/dashboard/assets/page-Dth9X1Ih.js +1 -0
  714. zenml/zen_server/dashboard/assets/page-DweqqCkF.js +1 -0
  715. zenml/zen_server/dashboard/assets/page-DyOJ_pq3.js +1 -0
  716. zenml/zen_server/dashboard/assets/page-Hn8q9iJZ.js +1 -0
  717. zenml/zen_server/dashboard/assets/page-IhckKFnD.js +6 -0
  718. zenml/zen_server/dashboard/assets/page-LyZ_l8vR.js +1 -0
  719. zenml/zen_server/dashboard/assets/page-PamGpk0j.js +1 -0
  720. zenml/zen_server/dashboard/assets/page-PxOWfKgF.js +2 -0
  721. zenml/zen_server/dashboard/assets/persist-DeXRG61d.js +1 -0
  722. zenml/zen_server/dashboard/assets/persist-vP0-Xl4f.js +1 -0
  723. zenml/zen_server/dashboard/assets/plus-tf1V2hTJ.js +1 -0
  724. zenml/zen_server/dashboard/assets/refresh-BjOeWlEq.js +1 -0
  725. zenml/zen_server/dashboard/assets/repos-video-D8kpu60k.svg +9 -0
  726. zenml/zen_server/dashboard/assets/rocket-DjT2cDvG.js +1 -0
  727. zenml/zen_server/dashboard/assets/service-DH_oUqQj.js +2 -0
  728. zenml/zen_server/dashboard/assets/settings_preview-0JLrRgHP.webp +0 -0
  729. zenml/zen_server/dashboard/assets/sharedSchema-Bw1_Wa7l.js +14 -0
  730. zenml/zen_server/dashboard/assets/stack-detail-query-B_0R_fd6.js +1 -0
  731. zenml/zen_server/dashboard/assets/stefan-B08Ftbba.webp +0 -0
  732. zenml/zen_server/dashboard/assets/templates-1S_8WeSK.webp +0 -0
  733. zenml/zen_server/dashboard/assets/tick-circle-BEX_Tp4v.js +1 -0
  734. zenml/zen_server/dashboard/assets/tour-cover-BYfeen6M.webp +0 -0
  735. zenml/zen_server/dashboard/assets/trash-arLUMWMS.js +1 -0
  736. zenml/zen_server/dashboard/assets/update-server-settings-mutation-D9qYhfaN.js +1 -0
  737. zenml/zen_server/dashboard/assets/upgrade-form-CwRHBuXB.webp +0 -0
  738. zenml/zen_server/dashboard/assets/url-Dh93fvh0.js +1 -0
  739. zenml/zen_server/dashboard/assets/zod-BwEbpOxH.js +1 -0
  740. zenml/zen_server/dashboard/index.html +19 -1
  741. zenml/zen_server/deploy/__init__.py +7 -16
  742. zenml/zen_server/deploy/base_provider.py +49 -78
  743. zenml/zen_server/deploy/{local → daemon}/__init__.py +3 -3
  744. zenml/zen_server/deploy/{local/local_provider.py → daemon/daemon_provider.py} +48 -66
  745. zenml/zen_server/deploy/{local/local_zen_server.py → daemon/daemon_zen_server.py} +78 -62
  746. zenml/zen_server/deploy/deployer.py +94 -175
  747. zenml/zen_server/deploy/deployment.py +23 -17
  748. zenml/zen_server/deploy/docker/docker_provider.py +15 -31
  749. zenml/zen_server/deploy/docker/docker_zen_server.py +30 -35
  750. zenml/zen_server/deploy/helm/Chart.yaml +1 -1
  751. zenml/zen_server/deploy/helm/README.md +3 -13
  752. zenml/zen_server/deploy/helm/templates/NOTES.txt +23 -7
  753. zenml/zen_server/deploy/helm/templates/_environment.tpl +175 -23
  754. zenml/zen_server/deploy/helm/templates/server-db-job.yaml +45 -18
  755. zenml/zen_server/deploy/helm/templates/server-db-pvc.yaml +25 -0
  756. zenml/zen_server/deploy/helm/templates/server-deployment.yaml +22 -6
  757. zenml/zen_server/deploy/helm/templates/server-secret.yaml +11 -10
  758. zenml/zen_server/deploy/helm/values.yaml +210 -28
  759. zenml/zen_server/exceptions.py +20 -1
  760. zenml/zen_server/feature_gate/__init__.py +13 -0
  761. zenml/zen_server/feature_gate/endpoint_utils.py +61 -0
  762. zenml/zen_server/feature_gate/feature_gate_interface.py +49 -0
  763. zenml/zen_server/feature_gate/zenml_cloud_feature_gate.py +125 -0
  764. zenml/zen_server/jwt.py +64 -32
  765. zenml/zen_server/rate_limit.py +200 -0
  766. zenml/zen_server/rbac/endpoint_utils.py +92 -9
  767. zenml/zen_server/rbac/models.py +21 -17
  768. zenml/zen_server/rbac/rbac_sql_zen_store.py +175 -0
  769. zenml/zen_server/rbac/utils.py +71 -30
  770. zenml/zen_server/rbac/zenml_cloud_rbac.py +13 -188
  771. zenml/zen_server/routers/actions_endpoints.py +324 -0
  772. zenml/zen_server/routers/artifact_version_endpoints.py +28 -2
  773. zenml/zen_server/routers/auth_endpoints.py +249 -131
  774. zenml/zen_server/routers/code_repositories_endpoints.py +1 -0
  775. zenml/zen_server/routers/devices_endpoints.py +56 -49
  776. zenml/zen_server/routers/event_source_endpoints.py +327 -0
  777. zenml/zen_server/routers/logs_endpoints.py +66 -0
  778. zenml/zen_server/routers/model_versions_endpoints.py +59 -0
  779. zenml/zen_server/routers/models_endpoints.py +7 -1
  780. zenml/zen_server/routers/pipeline_builds_endpoints.py +6 -1
  781. zenml/zen_server/routers/pipeline_deployments_endpoints.py +35 -0
  782. zenml/zen_server/routers/pipelines_endpoints.py +19 -32
  783. zenml/zen_server/routers/plugin_endpoints.py +107 -0
  784. zenml/zen_server/routers/run_templates_endpoints.py +212 -0
  785. zenml/zen_server/routers/runs_endpoints.py +91 -32
  786. zenml/zen_server/routers/schedule_endpoints.py +1 -0
  787. zenml/zen_server/routers/secrets_endpoints.py +4 -2
  788. zenml/zen_server/routers/server_endpoints.py +186 -4
  789. zenml/zen_server/routers/service_connectors_endpoints.py +56 -0
  790. zenml/zen_server/routers/service_endpoints.py +180 -0
  791. zenml/zen_server/routers/stack_components_endpoints.py +2 -1
  792. zenml/zen_server/routers/stack_deployment_endpoints.py +164 -0
  793. zenml/zen_server/routers/steps_endpoints.py +21 -12
  794. zenml/zen_server/routers/triggers_endpoints.py +336 -0
  795. zenml/zen_server/routers/users_endpoints.py +280 -45
  796. zenml/zen_server/routers/webhook_endpoints.py +127 -0
  797. zenml/zen_server/routers/workspaces_endpoints.py +220 -185
  798. zenml/zen_server/secure_headers.py +120 -0
  799. zenml/{new → zen_server/template_execution}/__init__.py +1 -1
  800. zenml/zen_server/template_execution/runner_entrypoint_configuration.py +42 -0
  801. zenml/zen_server/template_execution/utils.py +474 -0
  802. zenml/zen_server/template_execution/workload_manager_interface.py +92 -0
  803. zenml/zen_server/utils.py +374 -74
  804. zenml/zen_server/zen_server_api.py +299 -52
  805. zenml/zen_stores/base_zen_store.py +90 -58
  806. zenml/zen_stores/migrations/alembic.py +22 -9
  807. zenml/zen_stores/migrations/env.py +2 -2
  808. zenml/zen_stores/migrations/utils.py +731 -0
  809. zenml/zen_stores/migrations/versions/0.21.0_release.py +0 -1
  810. zenml/zen_stores/migrations/versions/0.21.1_release.py +0 -1
  811. zenml/zen_stores/migrations/versions/0.22.0_release.py +0 -1
  812. zenml/zen_stores/migrations/versions/0.23.0_release.py +0 -1
  813. zenml/zen_stores/migrations/versions/0.30.0_release.py +0 -1
  814. zenml/zen_stores/migrations/versions/0.31.0_release.py +0 -1
  815. zenml/zen_stores/migrations/versions/0.31.1_release.py +0 -1
  816. zenml/zen_stores/migrations/versions/0.32.0_release.py +0 -1
  817. zenml/zen_stores/migrations/versions/0.32.1_release.py +0 -1
  818. zenml/zen_stores/migrations/versions/0.33.0_release.py +0 -1
  819. zenml/zen_stores/migrations/versions/0.34.0_release.py +0 -1
  820. zenml/zen_stores/migrations/versions/0.35.0_release.py +0 -1
  821. zenml/zen_stores/migrations/versions/0.35.1_release.py +0 -1
  822. zenml/zen_stores/migrations/versions/0.36.0_release.py +0 -1
  823. zenml/zen_stores/migrations/versions/0.36.1_release.py +0 -1
  824. zenml/zen_stores/migrations/versions/0.37.0_release.py +0 -1
  825. zenml/zen_stores/migrations/versions/0.38.0_release.py +0 -1
  826. zenml/zen_stores/migrations/versions/0.39.0_release.py +0 -1
  827. zenml/zen_stores/migrations/versions/0.39.1_release.py +0 -1
  828. zenml/zen_stores/migrations/versions/0.40.0_release.py +0 -1
  829. zenml/zen_stores/migrations/versions/0.40.1_release.py +0 -1
  830. zenml/zen_stores/migrations/versions/0.40.2_release.py +0 -1
  831. zenml/zen_stores/migrations/versions/0.40.3_release.py +0 -1
  832. zenml/zen_stores/migrations/versions/0.41.0_release.py +0 -1
  833. zenml/zen_stores/migrations/versions/0.42.0_release.py +0 -1
  834. zenml/zen_stores/migrations/versions/0.42.1_release.py +0 -1
  835. zenml/zen_stores/migrations/versions/0.43.0_release.py +0 -1
  836. zenml/zen_stores/migrations/versions/0.44.0_release.py +0 -1
  837. zenml/zen_stores/migrations/versions/0.44.1_release.py +0 -1
  838. zenml/zen_stores/migrations/versions/0.44.2_release.py +0 -1
  839. zenml/zen_stores/migrations/versions/0.44.3_release.py +0 -1
  840. zenml/zen_stores/migrations/versions/0.45.0_release.py +0 -1
  841. zenml/zen_stores/migrations/versions/0.45.1_release_0_45_1.py +0 -1
  842. zenml/zen_stores/migrations/versions/0.45.2_release.py +0 -1
  843. zenml/zen_stores/migrations/versions/0.45.3_release.py +0 -1
  844. zenml/zen_stores/migrations/versions/0.45.4_release.py +0 -1
  845. zenml/zen_stores/migrations/versions/0.45.5_release.py +0 -1
  846. zenml/zen_stores/migrations/versions/0.45.6_release.py +0 -1
  847. zenml/zen_stores/migrations/versions/0.46.0_release.py +0 -1
  848. zenml/zen_stores/migrations/versions/0.46.1_release.py +0 -1
  849. zenml/zen_stores/migrations/versions/0.47.0_release.py +0 -1
  850. zenml/zen_stores/migrations/versions/0.50.0_release.py +0 -1
  851. zenml/zen_stores/migrations/versions/0.51.0_release.py +0 -1
  852. zenml/zen_stores/migrations/versions/0.52.0_release.py +0 -1
  853. zenml/zen_stores/migrations/versions/0.53.0_release.py +0 -1
  854. zenml/zen_stores/migrations/versions/0.53.1_release.py +0 -1
  855. zenml/zen_stores/migrations/versions/0.54.0_release.py +0 -1
  856. zenml/zen_stores/migrations/versions/0.54.1_release.py +0 -1
  857. zenml/zen_stores/migrations/versions/0.55.0_release.py +0 -1
  858. zenml/zen_stores/migrations/versions/0.55.1_release.py +23 -0
  859. zenml/zen_stores/migrations/versions/0.55.2_release.py +23 -0
  860. zenml/zen_stores/migrations/versions/0.55.3_release.py +23 -0
  861. zenml/zen_stores/migrations/versions/0.55.4_release.py +23 -0
  862. zenml/zen_stores/migrations/versions/0.55.5_release.py +23 -0
  863. zenml/zen_stores/migrations/versions/0.56.0_release.py +23 -0
  864. zenml/zen_stores/migrations/versions/0.56.1_release.py +23 -0
  865. zenml/zen_stores/migrations/versions/0.56.2_release.py +23 -0
  866. zenml/zen_stores/migrations/versions/0.56.3_release.py +23 -0
  867. zenml/zen_stores/migrations/versions/0.56.4_release.py +23 -0
  868. zenml/zen_stores/migrations/versions/0.57.0.rc1_release.py +23 -0
  869. zenml/zen_stores/migrations/versions/0.57.0.rc2_release.py +23 -0
  870. zenml/zen_stores/migrations/versions/0.57.0_release.py +23 -0
  871. zenml/zen_stores/migrations/versions/0.57.1_release.py +23 -0
  872. zenml/zen_stores/migrations/versions/0.58.0_release.py +23 -0
  873. zenml/zen_stores/migrations/versions/0.58.1_release.py +23 -0
  874. zenml/zen_stores/migrations/versions/0.58.2_release.py +23 -0
  875. zenml/zen_stores/migrations/versions/0.60.0_release.py +23 -0
  876. zenml/zen_stores/migrations/versions/0.61.0_release.py +23 -0
  877. zenml/zen_stores/migrations/versions/0.62.0_release.py +23 -0
  878. zenml/zen_stores/migrations/versions/0.63.0_release.py +23 -0
  879. zenml/zen_stores/migrations/versions/0.64.0_release.py +23 -0
  880. zenml/zen_stores/migrations/versions/0.65.0_release.py +23 -0
  881. zenml/zen_stores/migrations/versions/0.66.0_release.py +23 -0
  882. zenml/zen_stores/migrations/versions/0.67.0_release.py +23 -0
  883. zenml/zen_stores/migrations/versions/0.68.0_release.py +23 -0
  884. zenml/zen_stores/migrations/versions/0.68.1_release.py +23 -0
  885. zenml/zen_stores/migrations/versions/0.70.0_release.py +23 -0
  886. zenml/zen_stores/migrations/versions/0.71.0_release.py +23 -0
  887. zenml/zen_stores/migrations/versions/0.72.0_release.py +23 -0
  888. zenml/zen_stores/migrations/versions/026d4577b6a0_add_code_path.py +39 -0
  889. zenml/zen_stores/migrations/versions/03742aa7fdd7_add_secrets.py +1 -0
  890. zenml/zen_stores/migrations/versions/0701da9951a0_added_service_table.py +94 -0
  891. zenml/zen_stores/migrations/versions/0b06faa59c93_add_service_connectors.py +1 -0
  892. zenml/zen_stores/migrations/versions/0d707865f404_adding_labels_to_stacks.py +30 -0
  893. zenml/zen_stores/migrations/versions/0e4735b23577_increase_pipeline_spec_field_length.py +1 -0
  894. zenml/zen_stores/migrations/versions/1041bc644e0d_remove_secrets_manager.py +6 -3
  895. zenml/zen_stores/migrations/versions/10a907dad202_delete_mlmd_tables.py +2 -1
  896. zenml/zen_stores/migrations/versions/14d687c8fa1c_rename_model_config_to_model_version.py +1 -0
  897. zenml/zen_stores/migrations/versions/19f27d5b234e_add_build_and_deployment_tables.py +1 -0
  898. zenml/zen_stores/migrations/versions/1a9a9d2a836d_admin_users.py +56 -0
  899. zenml/zen_stores/migrations/versions/1ac1b9c04da1_make_secrets_values_optional.py +1 -0
  900. zenml/zen_stores/migrations/versions/1cb6477f72d6_move_artifact_save_type.py +99 -0
  901. zenml/zen_stores/migrations/versions/1d74e596abb8_add_run_once_start_time_to_schedule.py +36 -0
  902. zenml/zen_stores/migrations/versions/1d8f30c54477_migrate_to_new_.py +124 -0
  903. zenml/zen_stores/migrations/versions/248dfd320b68_update_size_of_flavor_config_schema.py +1 -0
  904. zenml/zen_stores/migrations/versions/25155145c545_separate_actions_and_triggers.py +228 -0
  905. zenml/zen_stores/migrations/versions/26351d482b9e_add_step_run_unique_constraint.py +37 -0
  906. zenml/zen_stores/migrations/versions/26b776ad583e_redesign_artifacts.py +9 -10
  907. zenml/zen_stores/migrations/versions/2d201872e23c_remove_db_dependency_loop.py +29 -0
  908. zenml/zen_stores/migrations/versions/37835ce041d2_optimizing_database.py +4 -3
  909. zenml/zen_stores/migrations/versions/389046140cad_data_versioning.py +1 -0
  910. zenml/zen_stores/migrations/versions/3944116bbd56_rename_project_to_workspace.py +1 -0
  911. zenml/zen_stores/migrations/versions/3b68abe58f44_add_model_watchtower_entities.py +1 -0
  912. zenml/zen_stores/migrations/versions/3c5a367730c2_add_environment_info_to_runs.py +1 -0
  913. zenml/zen_stores/migrations/versions/3dcc5d20e82f_add_last_user_activity.py +51 -0
  914. zenml/zen_stores/migrations/versions/43a86093b60e_add_labels_for_stack_components.py +1 -0
  915. zenml/zen_stores/migrations/versions/46506f72f0ed_add_server_settings.py +123 -0
  916. zenml/zen_stores/migrations/versions/479103df60b6_add_triggers.py +162 -0
  917. zenml/zen_stores/migrations/versions/4a3087070f4e_add_step_source_code.py +1 -0
  918. zenml/zen_stores/migrations/versions/4c41c0ca42db_add_code_repository_table.py +1 -0
  919. zenml/zen_stores/migrations/versions/4d688d8f7aff_rename_model_version_to_model.py +1 -0
  920. zenml/zen_stores/migrations/versions/4e1972485075_endpoint_artifact_deployment_artifact.py +1 -0
  921. zenml/zen_stores/migrations/versions/4f66af55fbb9_rename_model_config_model_to_model_.py +1 -0
  922. zenml/zen_stores/migrations/versions/5330ba58bf20_rename_tables_and_foreign_keys.py +8 -9
  923. zenml/zen_stores/migrations/versions/5994f9ad0489_introduce_role_permissions.py +4 -2
  924. zenml/zen_stores/migrations/versions/5cc3f41cf048_add_save_models_to_registry.py +1 -0
  925. zenml/zen_stores/migrations/versions/6119cd9b93c2_tags_table.py +1 -0
  926. zenml/zen_stores/migrations/versions/623a234c11f5_add_sdk_docs_url_to_flavors.py +1 -0
  927. zenml/zen_stores/migrations/versions/6917bce75069_add_pipeline_run_unique_constraint.py +5 -4
  928. zenml/zen_stores/migrations/versions/6a28c4fd0ef2_add_caching_info.py +1 -0
  929. zenml/zen_stores/migrations/versions/6f707b385dc1_fix_model_artifacts.py +1 -0
  930. zenml/zen_stores/migrations/versions/722392c91006_make_is_service_account_mandatory.py +1 -0
  931. zenml/zen_stores/migrations/versions/72675226b2de_unique_users.py +31 -0
  932. zenml/zen_stores/migrations/versions/72722dee4686_track_server_version.py +1 -0
  933. zenml/zen_stores/migrations/versions/7280c14811d6_use_text_type.py +1 -0
  934. zenml/zen_stores/migrations/versions/728c6369cfaa_add_name_column_to_input_artifact_pk.py +4 -2
  935. zenml/zen_stores/migrations/versions/729263e47b55_fix_external_input_artifacts.py +1 -0
  936. zenml/zen_stores/migrations/versions/743ec82b1b3c_update_size_of_build_images.py +3 -2
  937. zenml/zen_stores/migrations/versions/7500f434b71c_remove_shared_columns.py +4 -2
  938. zenml/zen_stores/migrations/versions/76a7b9451ccd_add_build_template_deployment_id.py +52 -0
  939. zenml/zen_stores/migrations/versions/7834208cc3f6_artifact_project_scoping.py +9 -7
  940. zenml/zen_stores/migrations/versions/7b651bf6822e_track_secrets_in_db.py +7 -7
  941. zenml/zen_stores/migrations/versions/7d1919bb1ef0_add_run_templates.py +100 -0
  942. zenml/zen_stores/migrations/versions/7e4a481d17f7_add_identity_table.py +3 -2
  943. zenml/zen_stores/migrations/versions/7f603e583dd7_fixed_migration.py +2 -1
  944. zenml/zen_stores/migrations/versions/86fa52918b54_remove_teams_and_roles.py +1 -0
  945. zenml/zen_stores/migrations/versions/8a64fbfecda0_add_num_outputs_to_run_step.py +1 -0
  946. zenml/zen_stores/migrations/versions/8ed03137cacc_polymorthic_run_metadata.py +1 -0
  947. zenml/zen_stores/migrations/versions/904464ea4041_add_pipeline_model_run_unique_constraints.py +192 -0
  948. zenml/zen_stores/migrations/versions/909550c7c4da_remove_user_hub_token.py +36 -0
  949. zenml/zen_stores/migrations/versions/93cbda80a732_add_service_accounts.py +1 -0
  950. zenml/zen_stores/migrations/versions/979eff8fc4b1_add_code_repo_description_and_logo_url.py +1 -0
  951. zenml/zen_stores/migrations/versions/9971237fa937_artifact_visualizations.py +1 -0
  952. zenml/zen_stores/migrations/versions/9d8020441014_increase_step_configuration_length.py +1 -0
  953. zenml/zen_stores/migrations/versions/a1237ba94fd8_add_model_version_producer_run_unique_.py +68 -0
  954. zenml/zen_stores/migrations/versions/a39c4184c8ce_remove_secrets_manager_flavors.py +3 -2
  955. zenml/zen_stores/migrations/versions/a91762e6be36_artifact_version_table.py +5 -4
  956. zenml/zen_stores/migrations/versions/ade72effebaf_added_logs_table.py +1 -0
  957. zenml/zen_stores/migrations/versions/alembic_start.py +2 -1
  958. zenml/zen_stores/migrations/versions/b4eccf34dfa3_add_hub_token_to_user_model.py +1 -0
  959. zenml/zen_stores/migrations/versions/b4fca5241eea_migrate_onboarding_state.py +167 -0
  960. zenml/zen_stores/migrations/versions/b557b2871693_update_step_run_input_types.py +33 -0
  961. zenml/zen_stores/migrations/versions/b59aa68fdb1f_simplify_pipelines.py +139 -0
  962. zenml/zen_stores/migrations/versions/b73bc71f1106_remove_component_spec_path.py +36 -0
  963. zenml/zen_stores/migrations/versions/bf2120261b5a_add_configured_model_version_id.py +74 -0
  964. zenml/zen_stores/migrations/versions/c1b18cec3a48_increase_length_on_flavor_config_schema.py +1 -0
  965. zenml/zen_stores/migrations/versions/c22561cbb3a9_add_artifact_unique_constraints.py +86 -0
  966. zenml/zen_stores/migrations/versions/cc269488e5a9_separate_run_metadata.py +135 -0
  967. zenml/zen_stores/migrations/versions/cc9894cb58aa_add_user_metadata.py +41 -0
  968. zenml/zen_stores/migrations/versions/ccd68b7825ae_add_status_to_pipeline_and_step_run.py +1 -0
  969. zenml/zen_stores/migrations/versions/d02b3d3464cf_add_orchestrator_run_id_column.py +1 -0
  970. zenml/zen_stores/migrations/versions/d26471b6fe8f_update_build_filtering.py +1 -0
  971. zenml/zen_stores/migrations/versions/d7b3acf9aa46_create_schedule_table.py +1 -0
  972. zenml/zen_stores/migrations/versions/e1d66d91a099_add_stack_and_component_spec_paths_to_.py +1 -0
  973. zenml/zen_stores/migrations/versions/e5225281b4d3_add_connector_skew_tolerance.py +1 -0
  974. zenml/zen_stores/migrations/versions/e65aa6708ff7_pipeline_versioning.py +1 -0
  975. zenml/zen_stores/migrations/versions/ec0d785ca296_create_run_metadata_table.py +1 -0
  976. zenml/zen_stores/migrations/versions/ec6307720f92_simplify_model_version_links.py +119 -0
  977. zenml/zen_stores/migrations/versions/f3b3964e3a0f_add_oauth_devices.py +1 -0
  978. zenml/zen_stores/migrations/versions/f49904a80aa7_increase_length_of_artifact_table_sources.py +1 -0
  979. zenml/zen_stores/migrations/versions/fbd7f18ced1e_increase_step_run_field_lengths.py +5 -4
  980. zenml/zen_stores/rest_zen_store.py +1326 -305
  981. zenml/zen_stores/schemas/__init__.py +22 -3
  982. zenml/zen_stores/schemas/action_schemas.py +192 -0
  983. zenml/zen_stores/schemas/api_key_schemas.py +23 -10
  984. zenml/zen_stores/schemas/artifact_schemas.py +112 -49
  985. zenml/zen_stores/schemas/artifact_visualization_schemas.py +17 -8
  986. zenml/zen_stores/schemas/base_schemas.py +27 -0
  987. zenml/zen_stores/schemas/code_repository_schemas.py +25 -10
  988. zenml/zen_stores/schemas/component_schemas.py +74 -11
  989. zenml/zen_stores/schemas/constants.py +16 -0
  990. zenml/zen_stores/schemas/device_schemas.py +29 -15
  991. zenml/zen_stores/schemas/event_source_schemas.py +188 -0
  992. zenml/zen_stores/schemas/flavor_schemas.py +19 -9
  993. zenml/zen_stores/schemas/logs_schemas.py +12 -6
  994. zenml/zen_stores/schemas/model_schemas.py +192 -139
  995. zenml/zen_stores/schemas/pipeline_build_schemas.py +16 -16
  996. zenml/zen_stores/schemas/pipeline_deployment_schemas.py +58 -17
  997. zenml/zen_stores/schemas/pipeline_run_schemas.py +170 -35
  998. zenml/zen_stores/schemas/pipeline_schemas.py +51 -33
  999. zenml/zen_stores/schemas/run_metadata_schemas.py +28 -78
  1000. zenml/zen_stores/schemas/run_template_schemas.py +267 -0
  1001. zenml/zen_stores/schemas/schedule_schema.py +15 -5
  1002. zenml/zen_stores/schemas/secret_schemas.py +18 -10
  1003. zenml/zen_stores/schemas/server_settings_schemas.py +129 -0
  1004. zenml/zen_stores/schemas/service_connector_schemas.py +13 -6
  1005. zenml/zen_stores/schemas/service_schemas.py +258 -0
  1006. zenml/zen_stores/schemas/stack_schemas.py +23 -6
  1007. zenml/zen_stores/schemas/step_run_schemas.py +132 -41
  1008. zenml/zen_stores/schemas/tag_schemas.py +31 -50
  1009. zenml/zen_stores/schemas/trigger_schemas.py +316 -0
  1010. zenml/zen_stores/schemas/user_schemas.py +66 -23
  1011. zenml/zen_stores/schemas/utils.py +112 -0
  1012. zenml/zen_stores/schemas/workspace_schemas.py +36 -19
  1013. zenml/zen_stores/secrets_stores/aws_secrets_store.py +41 -32
  1014. zenml/zen_stores/secrets_stores/azure_secrets_store.py +20 -23
  1015. zenml/zen_stores/secrets_stores/base_secrets_store.py +80 -12
  1016. zenml/zen_stores/secrets_stores/gcp_secrets_store.py +42 -33
  1017. zenml/zen_stores/secrets_stores/hashicorp_secrets_store.py +7 -11
  1018. zenml/zen_stores/secrets_stores/secrets_store_interface.py +1 -0
  1019. zenml/zen_stores/secrets_stores/service_connector_secrets_store.py +15 -8
  1020. zenml/zen_stores/secrets_stores/sql_secrets_store.py +8 -9
  1021. zenml/zen_stores/sql_zen_store.py +4062 -799
  1022. zenml/zen_stores/template_utils.py +263 -0
  1023. zenml/zen_stores/zen_store_interface.py +614 -44
  1024. zenml_nightly-0.72.0.dev20250116.dist-info/METADATA +486 -0
  1025. zenml_nightly-0.72.0.dev20250116.dist-info/RECORD +1294 -0
  1026. {zenml_nightly-0.55.0.dev20240124.dist-info → zenml_nightly-0.72.0.dev20250116.dist-info}/WHEEL +1 -1
  1027. CLA.md +0 -110
  1028. CODE-OF-CONDUCT.md +0 -132
  1029. CONTRIBUTING.md +0 -260
  1030. README.md +0 -304
  1031. RELEASE_NOTES.md +0 -3919
  1032. ROADMAP.md +0 -5
  1033. SECURITY.md +0 -15
  1034. zenml/_hub/client.py +0 -285
  1035. zenml/_hub/constants.py +0 -21
  1036. zenml/_hub/utils.py +0 -80
  1037. zenml/api.py +0 -61
  1038. zenml/cli/hub.py +0 -1115
  1039. zenml/cli/stack_recipes.py +0 -469
  1040. zenml/integrations/gcp/google_cloud_function.py +0 -187
  1041. zenml/integrations/gcp/google_cloud_scheduler.py +0 -83
  1042. zenml/integrations/gcp/orchestrators/vertex_scheduler/main.py +0 -91
  1043. zenml/integrations/gcp/orchestrators/vertex_scheduler/requirements.txt +0 -2
  1044. zenml/integrations/kserve/__init__.py +0 -57
  1045. zenml/integrations/kserve/custom_deployer/zenml_custom_model.py +0 -175
  1046. zenml/integrations/kserve/flavors/kserve_model_deployer_flavor.py +0 -137
  1047. zenml/integrations/kserve/model_deployers/kserve_model_deployer.py +0 -1003
  1048. zenml/integrations/kserve/secret_schemas/secret_schemas.py +0 -65
  1049. zenml/integrations/kserve/services/kserve_deployment.py +0 -596
  1050. zenml/integrations/kserve/steps/__init__.py +0 -22
  1051. zenml/integrations/kserve/steps/kserve_deployer.py +0 -472
  1052. zenml/integrations/kserve/steps/kserve_step_utils.py +0 -293
  1053. zenml/integrations/kubeflow/utils.py +0 -96
  1054. zenml/lineage_graph/lineage_graph.py +0 -244
  1055. zenml/lineage_graph/node/artifact_node.py +0 -52
  1056. zenml/lineage_graph/node/step_node.py +0 -41
  1057. zenml/models/v2/base/internal.py +0 -37
  1058. zenml/models/v2/base/update.py +0 -40
  1059. zenml/models/v2/misc/hub_plugin_models.py +0 -79
  1060. zenml/new/pipelines/deserialization_utils.py +0 -291
  1061. zenml/new/pipelines/model_utils.py +0 -72
  1062. zenml/new/pipelines/pipeline_decorator.py +0 -109
  1063. zenml/new/steps/step_decorator.py +0 -160
  1064. zenml/pipelines/base_pipeline.py +0 -274
  1065. zenml/post_execution/pipeline.py +0 -58
  1066. zenml/post_execution/pipeline_run.py +0 -55
  1067. zenml/services/service_registry.py +0 -214
  1068. zenml/services/terraform/__init__.py +0 -14
  1069. zenml/services/terraform/terraform_service.py +0 -441
  1070. zenml/steps/step_environment.py +0 -108
  1071. zenml/steps/step_output.py +0 -36
  1072. zenml/utils/mlstacks_utils.py +0 -635
  1073. zenml/utils/terraform_utils.py +0 -42
  1074. zenml/zen_server/dashboard/_redirects +0 -1
  1075. zenml/zen_server/dashboard/asset-manifest.json +0 -131
  1076. zenml/zen_server/dashboard/manifest.json +0 -25
  1077. zenml/zen_server/dashboard/precache-manifest.c139638dcc4d9d3425353266447a2fad.js +0 -462
  1078. zenml/zen_server/dashboard/robots.txt +0 -2
  1079. zenml/zen_server/dashboard/service-worker.js +0 -39
  1080. zenml/zen_server/dashboard/static/css/2.5b37d44a.chunk.css +0 -16
  1081. zenml/zen_server/dashboard/static/css/2.5b37d44a.chunk.css.map +0 -1
  1082. zenml/zen_server/dashboard/static/css/main.77e46c35.chunk.css +0 -2
  1083. zenml/zen_server/dashboard/static/css/main.77e46c35.chunk.css.map +0 -1
  1084. zenml/zen_server/dashboard/static/js/2.bb4cef22.chunk.js +0 -3
  1085. zenml/zen_server/dashboard/static/js/2.bb4cef22.chunk.js.LICENSE.txt +0 -95
  1086. zenml/zen_server/dashboard/static/js/2.bb4cef22.chunk.js.map +0 -1
  1087. zenml/zen_server/dashboard/static/js/main.270838b4.chunk.js +0 -2
  1088. zenml/zen_server/dashboard/static/js/main.270838b4.chunk.js.map +0 -1
  1089. zenml/zen_server/dashboard/static/js/runtime-main.bfca2edd.js +0 -2
  1090. zenml/zen_server/dashboard/static/js/runtime-main.bfca2edd.js.map +0 -1
  1091. zenml/zen_server/dashboard/static/media/AlertTriangle.28aee535.svg +0 -5
  1092. zenml/zen_server/dashboard/static/media/ArrowSquareOut.abfb9bc7.svg +0 -5
  1093. zenml/zen_server/dashboard/static/media/Back.86c23a22.svg +0 -4
  1094. zenml/zen_server/dashboard/static/media/BookOpen.5cb101ff.svg +0 -4
  1095. zenml/zen_server/dashboard/static/media/BoundingBox.1eb98717.svg +0 -10
  1096. zenml/zen_server/dashboard/static/media/Burger.9b1c67d7.svg +0 -3
  1097. zenml/zen_server/dashboard/static/media/Cached.2381fb8d.svg +0 -1
  1098. zenml/zen_server/dashboard/static/media/Calendar.356e11c7.svg +0 -3
  1099. zenml/zen_server/dashboard/static/media/ChartBarHorizontal.0247447b.svg +0 -6
  1100. zenml/zen_server/dashboard/static/media/ChartLine.0d79e18d.svg +0 -4
  1101. zenml/zen_server/dashboard/static/media/ChatDots.2e1c9211.svg +0 -6
  1102. zenml/zen_server/dashboard/static/media/Check.dad6beb2.svg +0 -3
  1103. zenml/zen_server/dashboard/static/media/CheckCircleFilled.c19566d0.svg +0 -3
  1104. zenml/zen_server/dashboard/static/media/Checkbox.af50e31e.svg +0 -3
  1105. zenml/zen_server/dashboard/static/media/ChevronDown.f860ce32.svg +0 -3
  1106. zenml/zen_server/dashboard/static/media/ChevronDownLight.6642d756.svg +0 -3
  1107. zenml/zen_server/dashboard/static/media/ChevronLeft.f6edfcdb.svg +0 -3
  1108. zenml/zen_server/dashboard/static/media/CircleCheck.f98fd6ca.svg +0 -1
  1109. zenml/zen_server/dashboard/static/media/Clock.ffc9de95.svg +0 -3
  1110. zenml/zen_server/dashboard/static/media/Close.74e9efbc.svg +0 -5
  1111. zenml/zen_server/dashboard/static/media/CloseWithBorder.6960930a.svg +0 -3
  1112. zenml/zen_server/dashboard/static/media/CloseWithoutBorder.cd6f71df.svg +0 -3
  1113. zenml/zen_server/dashboard/static/media/CloudArrowUp.0aecb235.svg +0 -6
  1114. zenml/zen_server/dashboard/static/media/Code.ef0f33b5.svg +0 -3
  1115. zenml/zen_server/dashboard/static/media/Config.0be63f8a.svg +0 -1
  1116. zenml/zen_server/dashboard/static/media/Connector.9fd46ef1.svg +0 -10
  1117. zenml/zen_server/dashboard/static/media/Copy.36e2112a.svg +0 -1
  1118. zenml/zen_server/dashboard/static/media/Dashboard.d05787e0.svg +0 -3
  1119. zenml/zen_server/dashboard/static/media/Data.b1c3b5f8.svg +0 -3
  1120. zenml/zen_server/dashboard/static/media/Delete.3c361b28.svg +0 -8
  1121. zenml/zen_server/dashboard/static/media/Docs.7541d478.svg +0 -7
  1122. zenml/zen_server/dashboard/static/media/Download.fba04d87.svg +0 -5
  1123. zenml/zen_server/dashboard/static/media/Edit.490eb294.svg +0 -6
  1124. zenml/zen_server/dashboard/static/media/EmptyRightArrow.23749d01.svg +0 -3
  1125. zenml/zen_server/dashboard/static/media/Example.6396cd37.svg +0 -5
  1126. zenml/zen_server/dashboard/static/media/Extension.1394cd4a.svg +0 -3
  1127. zenml/zen_server/dashboard/static/media/Eye.d9e4ee62.svg +0 -4
  1128. zenml/zen_server/dashboard/static/media/Failed.0213c1a0.svg +0 -1
  1129. zenml/zen_server/dashboard/static/media/FileText.1f15bacd.svg +0 -7
  1130. zenml/zen_server/dashboard/static/media/Filter.ab6b9c0d.svg +0 -3
  1131. zenml/zen_server/dashboard/static/media/Folders.12b29887.svg +0 -5
  1132. zenml/zen_server/dashboard/static/media/FunnelFill.6df4c143.svg +0 -3
  1133. zenml/zen_server/dashboard/static/media/GitCommit.7dd9c2aa.svg +0 -5
  1134. zenml/zen_server/dashboard/static/media/GitHub_Logo.cefc2023.png +0 -0
  1135. zenml/zen_server/dashboard/static/media/Graph.2c63a892.svg +0 -11
  1136. zenml/zen_server/dashboard/static/media/History.08329240.svg +0 -3
  1137. zenml/zen_server/dashboard/static/media/Home.0843b0d5.svg +0 -3
  1138. zenml/zen_server/dashboard/static/media/ImageBuilder.ea762d9c.svg +0 -6
  1139. zenml/zen_server/dashboard/static/media/InProgress.304a0edc.svg +0 -1
  1140. zenml/zen_server/dashboard/static/media/Info.9fe10c5c.svg +0 -3
  1141. zenml/zen_server/dashboard/static/media/KeyboardReturn.491afbe3.svg +0 -3
  1142. zenml/zen_server/dashboard/static/media/Link.72bbb55d.svg +0 -4
  1143. zenml/zen_server/dashboard/static/media/Lock.30f5e1fe.svg +0 -5
  1144. zenml/zen_server/dashboard/static/media/Lock2.a769ea52.svg +0 -3
  1145. zenml/zen_server/dashboard/static/media/LockKey.92f21621.svg +0 -6
  1146. zenml/zen_server/dashboard/static/media/Logs.8bf4d005.svg +0 -5
  1147. zenml/zen_server/dashboard/static/media/MinusCircle.4188f418.svg +0 -4
  1148. zenml/zen_server/dashboard/static/media/ModelRegistry.f0de050a.svg +0 -6
  1149. zenml/zen_server/dashboard/static/media/MultiUser.a2ba7c67.svg +0 -10
  1150. zenml/zen_server/dashboard/static/media/PaginationFirst.92628634.svg +0 -4
  1151. zenml/zen_server/dashboard/static/media/PaginationLast.00d3c732.svg +0 -4
  1152. zenml/zen_server/dashboard/static/media/PaginationNext.86158845.svg +0 -3
  1153. zenml/zen_server/dashboard/static/media/PaginationPrev.60c18a88.svg +0 -3
  1154. zenml/zen_server/dashboard/static/media/Pen.f2d831d4.svg +0 -6
  1155. zenml/zen_server/dashboard/static/media/PhotoCamera.179d6d4c.svg +0 -3
  1156. zenml/zen_server/dashboard/static/media/Pipeline.30d298b0.svg +0 -7
  1157. zenml/zen_server/dashboard/static/media/Plus.5aa1c16b.svg +0 -3
  1158. zenml/zen_server/dashboard/static/media/PlusCircle.92d860dd.svg +0 -5
  1159. zenml/zen_server/dashboard/static/media/Repositories.71a36b8c.svg +0 -3
  1160. zenml/zen_server/dashboard/static/media/RightArrow.f30d3871.svg +0 -29
  1161. zenml/zen_server/dashboard/static/media/Rocket.63bf7b9d.svg +0 -3
  1162. zenml/zen_server/dashboard/static/media/RocketLaunch.1bff2b59.svg +0 -6
  1163. zenml/zen_server/dashboard/static/media/Rubik-Medium.c87313aa.ttf +0 -0
  1164. zenml/zen_server/dashboard/static/media/Rubik-Regular.b3d0902b.ttf +0 -0
  1165. zenml/zen_server/dashboard/static/media/Run.daec4fb2.svg +0 -6
  1166. zenml/zen_server/dashboard/static/media/Search.d1afcce5.svg +0 -4
  1167. zenml/zen_server/dashboard/static/media/Settings.59ca73ae.svg +0 -4
  1168. zenml/zen_server/dashboard/static/media/Share2.46c3ff66.svg +0 -3
  1169. zenml/zen_server/dashboard/static/media/SignOut.6aa718c5.svg +0 -3
  1170. zenml/zen_server/dashboard/static/media/SimplePlus.5cf7ec20.svg +0 -3
  1171. zenml/zen_server/dashboard/static/media/SingleUser.bef3a095.svg +0 -4
  1172. zenml/zen_server/dashboard/static/media/SourceCodePro-Regular.b484b32f.ttf +0 -0
  1173. zenml/zen_server/dashboard/static/media/Stack.19b604ac.svg +0 -5
  1174. zenml/zen_server/dashboard/static/media/StackComponent.b1ba90b5.svg +0 -4
  1175. zenml/zen_server/dashboard/static/media/Star.f0c25022.svg +0 -9
  1176. zenml/zen_server/dashboard/static/media/StarOutline.94ca8cd9.svg +0 -3
  1177. zenml/zen_server/dashboard/static/media/Storefront.4b4796fe.svg +0 -3
  1178. zenml/zen_server/dashboard/static/media/Stream.543e3039.svg +0 -3
  1179. zenml/zen_server/dashboard/static/media/SupportAgent.510ddf1f.svg +0 -8
  1180. zenml/zen_server/dashboard/static/media/Table.77033750.svg +0 -6
  1181. zenml/zen_server/dashboard/static/media/Tool.d5785486.svg +0 -3
  1182. zenml/zen_server/dashboard/static/media/UserPlus.741a99d7.svg +0 -6
  1183. zenml/zen_server/dashboard/static/media/Verified.0625b2a0.svg +0 -3
  1184. zenml/zen_server/dashboard/static/media/addNew.4fb6c939.svg +0 -8
  1185. zenml/zen_server/dashboard/static/media/arrowClose.cbd53f3f.svg +0 -3
  1186. zenml/zen_server/dashboard/static/media/arrowOpen.6ceef0af.svg +0 -3
  1187. zenml/zen_server/dashboard/static/media/check_small.30bc0138.svg +0 -3
  1188. zenml/zen_server/dashboard/static/media/circleArrowSideClose.98d6013e.svg +0 -18
  1189. zenml/zen_server/dashboard/static/media/circleArrowSideOpen.63653df6.svg +0 -18
  1190. zenml/zen_server/dashboard/static/media/image.104fd14b.png +0 -0
  1191. zenml/zen_server/dashboard/static/media/imageAddIcon.e83004a9.svg +0 -7
  1192. zenml/zen_server/dashboard/static/media/logo.93333e5c.svg +0 -1
  1193. zenml/zen_server/dashboard/static/media/logo_small.4204397d.svg +0 -3
  1194. zenml/zen_server/dashboard/static/media/logo_white.d4b4414e.svg +0 -20
  1195. zenml/zen_server/dashboard/static/media/notConnected.5e2c8ea7.svg +0 -8
  1196. zenml/zen_server/dashboard/static/media/plugin-fallback.72c294e6.svg +0 -6
  1197. zenml/zen_server/dashboard/static/media/share.bcd998b0.svg +0 -5
  1198. zenml/zen_server/dashboard/static/media/stars.08a9b19a.svg +0 -8
  1199. zenml/zen_server/deploy/terraform/__init__.py +0 -41
  1200. zenml/zen_server/deploy/terraform/providers/__init__.py +0 -14
  1201. zenml/zen_server/deploy/terraform/providers/aws_provider.py +0 -61
  1202. zenml/zen_server/deploy/terraform/providers/azure_provider.py +0 -59
  1203. zenml/zen_server/deploy/terraform/providers/gcp_provider.py +0 -59
  1204. zenml/zen_server/deploy/terraform/providers/terraform_provider.py +0 -332
  1205. zenml/zen_server/deploy/terraform/recipes/aws/.gitignore +0 -8
  1206. zenml/zen_server/deploy/terraform/recipes/aws/helm.tf +0 -20
  1207. zenml/zen_server/deploy/terraform/recipes/aws/ingress.tf +0 -30
  1208. zenml/zen_server/deploy/terraform/recipes/aws/outputs.tf +0 -14
  1209. zenml/zen_server/deploy/terraform/recipes/aws/printf.cmd +0 -2
  1210. zenml/zen_server/deploy/terraform/recipes/aws/sql.tf +0 -62
  1211. zenml/zen_server/deploy/terraform/recipes/aws/terraform.tf +0 -44
  1212. zenml/zen_server/deploy/terraform/recipes/aws/variables.tf +0 -179
  1213. zenml/zen_server/deploy/terraform/recipes/aws/vpc.tf +0 -47
  1214. zenml/zen_server/deploy/terraform/recipes/aws/zen_server.tf +0 -111
  1215. zenml/zen_server/deploy/terraform/recipes/azure/.gitignore +0 -8
  1216. zenml/zen_server/deploy/terraform/recipes/azure/helm.tf +0 -20
  1217. zenml/zen_server/deploy/terraform/recipes/azure/ingress.tf +0 -30
  1218. zenml/zen_server/deploy/terraform/recipes/azure/key_vault.tf +0 -73
  1219. zenml/zen_server/deploy/terraform/recipes/azure/outputs.tf +0 -14
  1220. zenml/zen_server/deploy/terraform/recipes/azure/printf.cmd +0 -2
  1221. zenml/zen_server/deploy/terraform/recipes/azure/rg.tf +0 -36
  1222. zenml/zen_server/deploy/terraform/recipes/azure/sql.tf +0 -65
  1223. zenml/zen_server/deploy/terraform/recipes/azure/terraform.tf +0 -52
  1224. zenml/zen_server/deploy/terraform/recipes/azure/variables.tf +0 -188
  1225. zenml/zen_server/deploy/terraform/recipes/azure/zen_server.tf +0 -111
  1226. zenml/zen_server/deploy/terraform/recipes/gcp/.gitignore +0 -8
  1227. zenml/zen_server/deploy/terraform/recipes/gcp/helm.tf +0 -20
  1228. zenml/zen_server/deploy/terraform/recipes/gcp/ingress.tf +0 -30
  1229. zenml/zen_server/deploy/terraform/recipes/gcp/outputs.tf +0 -14
  1230. zenml/zen_server/deploy/terraform/recipes/gcp/printf.cmd +0 -2
  1231. zenml/zen_server/deploy/terraform/recipes/gcp/sql.tf +0 -64
  1232. zenml/zen_server/deploy/terraform/recipes/gcp/terraform.tf +0 -44
  1233. zenml/zen_server/deploy/terraform/recipes/gcp/variables.tf +0 -183
  1234. zenml/zen_server/deploy/terraform/recipes/gcp/zen_server.tf +0 -122
  1235. zenml/zen_server/deploy/terraform/terraform_zen_server.py +0 -255
  1236. zenml/zen_server/routers/run_metadata_endpoints.py +0 -97
  1237. zenml_nightly-0.55.0.dev20240124.dist-info/METADATA +0 -438
  1238. zenml_nightly-0.55.0.dev20240124.dist-info/RECORD +0 -1072
  1239. {zenml_nightly-0.55.0.dev20240124.dist-info → zenml_nightly-0.72.0.dev20250116.dist-info}/LICENSE +0 -0
  1240. {zenml_nightly-0.55.0.dev20240124.dist-info → zenml_nightly-0.72.0.dev20250116.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,17 @@
1
+ import{r as $,g as ia,b as R,c as oa}from"./@radix-DeK6qiuw.js";function ht(t){if(typeof t=="string"||typeof t=="number")return""+t;let e="";if(Array.isArray(t))for(let n=0,r;n<t.length;n++)(r=ht(t[n]))!==""&&(e+=(e&&" ")+r);else for(let n in t)t[n]&&(e+=(e&&" ")+n);return e}var Hi={exports:{}},Oi={},Li={exports:{}},Vi={};/**
2
+ * @license React
3
+ * use-sync-external-store-shim.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var pe=$;function sa(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var aa=typeof Object.is=="function"?Object.is:sa,ca=pe.useState,la=pe.useEffect,ua=pe.useLayoutEffect,fa=pe.useDebugValue;function ha(t,e){var n=e(),r=ca({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return ua(function(){i.value=n,i.getSnapshot=e,zn(i)&&o({inst:i})},[t,n,e]),la(function(){return zn(i)&&o({inst:i}),t(function(){zn(i)&&o({inst:i})})},[t]),fa(n),n}function zn(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!aa(t,n)}catch{return!0}}function da(t,e){return e()}var pa=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?da:ha;Vi.useSyncExternalStore=pe.useSyncExternalStore!==void 0?pe.useSyncExternalStore:pa;Li.exports=Vi;var ga=Li.exports;/**
10
+ * @license React
11
+ * use-sync-external-store-shim/with-selector.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var En=$,ma=ga;function ya(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var va=typeof Object.is=="function"?Object.is:ya,wa=ma.useSyncExternalStore,xa=En.useRef,ba=En.useEffect,_a=En.useMemo,Sa=En.useDebugValue;Oi.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=xa(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=_a(function(){function c(p){if(!l){if(l=!0,u=p,p=r(p),i!==void 0&&s.hasValue){var x=s.value;if(i(x,p))return f=x}return f=p}if(x=f,va(u,p))return x;var m=r(p);return i!==void 0&&i(x,m)?x:(u=p,f=m)}var l=!1,u,f,d=n===void 0?null:n;return[function(){return c(e())},d===null?void 0:function(){return c(d())}]},[e,n,r,i]);var a=wa(t,o[0],o[1]);return ba(function(){s.hasValue=!0,s.value=a},[a]),Sa(a),a};Hi.exports=Oi;var Ea=Hi.exports;const Na=ia(Ea),Aa={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_API_BASE_URL:"/api/v1",VITE_FEATURE_OS_KEY:"4rE42v3X6L4k0UCiA-Ot7g",VITE_FRONTEND_VERSION:"v0.29.1"},Vr=t=>{let e;const n=new Set,r=(u,f)=>{const d=typeof u=="function"?u(e):u;if(!Object.is(d,e)){const p=e;e=f??(typeof d!="object"||d===null)?d:Object.assign({},e,d),n.forEach(x=>x(e,p))}},i=()=>e,c={setState:r,getState:i,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(Aa?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},l=e=t(r,i,c);return c},Ma=t=>t?Vr(t):Vr,{useDebugValue:ka}=R,{useSyncExternalStoreWithSelector:$a}=Na,Ca=t=>t;function Yi(t,e=Ca,n){const r=$a(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return ka(r),r}const Yr=(t,e)=>{const n=Ma(t),r=(i,o=e)=>Yi(n,i,o);return Object.assign(r,n),r},Ia=(t,e)=>t?Yr(t,e):Yr;function it(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[r,i]of t)if(!Object.is(i,e.get(r)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0}const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(e,r)||!Object.is(t[r],e[r]))return!1;return!0}var Ta={value:()=>{}};function Nn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new sn(n)}function sn(t){this._=t}function Da(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}sn.prototype=Nn.prototype={constructor:sn,on:function(t,e){var n=this._,r=Da(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=Pa(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(i=(t=r[o]).type)n[i]=Xr(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Xr(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new sn(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function Pa(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Xr(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ta,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Qn="http://www.w3.org/1999/xhtml";const Ur={svg:"http://www.w3.org/2000/svg",xhtml:Qn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function An(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ur.hasOwnProperty(e)?{space:Ur[e],local:t}:t}function Fa(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Qn&&e.documentElement.namespaceURI===Qn?e.createElement(t):e.createElementNS(n,t)}}function za(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Xi(t){var e=An(t);return(e.local?za:Fa)(e)}function Ra(){}function mr(t){return t==null?Ra:function(){return this.querySelector(t)}}function Wa(t){typeof t!="function"&&(t=mr(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=new Array(s),c,l,u=0;u<s;++u)(c=o[u])&&(l=t.call(c,c.__data__,u,o))&&("__data__"in c&&(l.__data__=c.__data__),a[u]=l);return new at(r,this._parents)}function Ba(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Ha(){return[]}function Ui(t){return t==null?Ha:function(){return this.querySelectorAll(t)}}function Oa(t){return function(){return Ba(t.apply(this,arguments))}}function La(t){typeof t=="function"?t=Oa(t):t=Ui(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var s=e[o],a=s.length,c,l=0;l<a;++l)(c=s[l])&&(r.push(t.call(c,c.__data__,l,s)),i.push(c));return new at(r,i)}function Gi(t){return function(){return this.matches(t)}}function qi(t){return function(e){return e.matches(t)}}var Va=Array.prototype.find;function Ya(t){return function(){return Va.call(this.children,t)}}function Xa(){return this.firstElementChild}function Ua(t){return this.select(t==null?Xa:Ya(typeof t=="function"?t:qi(t)))}var Ga=Array.prototype.filter;function qa(){return Array.from(this.children)}function Za(t){return function(){return Ga.call(this.children,t)}}function Ka(t){return this.selectAll(t==null?qa:Za(typeof t=="function"?t:qi(t)))}function Ja(t){typeof t!="function"&&(t=Gi(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],c,l=0;l<s;++l)(c=o[l])&&t.call(c,c.__data__,l,o)&&a.push(c);return new at(r,this._parents)}function Zi(t){return new Array(t.length)}function Qa(){return new at(this._enter||this._groups.map(Zi),this._parents)}function un(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}un.prototype={constructor:un,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ja(t){return function(){return t}}function tc(t,e,n,r,i,o){for(var s=0,a,c=e.length,l=o.length;s<l;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new un(t,o[s]);for(;s<c;++s)(a=e[s])&&(i[s]=a)}function ec(t,e,n,r,i,o,s){var a,c,l=new Map,u=e.length,f=o.length,d=new Array(u),p;for(a=0;a<u;++a)(c=e[a])&&(d[a]=p=s.call(c,c.__data__,a,e)+"",l.has(p)?i[a]=c:l.set(p,c));for(a=0;a<f;++a)p=s.call(t,o[a],a,o)+"",(c=l.get(p))?(r[a]=c,c.__data__=o[a],l.delete(p)):n[a]=new un(t,o[a]);for(a=0;a<u;++a)(c=e[a])&&l.get(d[a])===c&&(i[a]=c)}function nc(t){return t.__data__}function rc(t,e){if(!arguments.length)return Array.from(this,nc);var n=e?ec:tc,r=this._parents,i=this._groups;typeof t!="function"&&(t=ja(t));for(var o=i.length,s=new Array(o),a=new Array(o),c=new Array(o),l=0;l<o;++l){var u=r[l],f=i[l],d=f.length,p=ic(t.call(u,u&&u.__data__,l,r)),x=p.length,m=a[l]=new Array(x),g=s[l]=new Array(x),h=c[l]=new Array(d);n(u,f,m,g,h,p,e);for(var v=0,b=0,w,_;v<x;++v)if(w=m[v]){for(v>=b&&(b=v+1);!(_=g[b])&&++b<x;);w._next=_||null}}return s=new at(s,r),s._enter=a,s._exit=c,s}function ic(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function oc(){return new at(this._exit||this._groups.map(Zi),this._parents)}function sc(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function ac(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),c=0;c<s;++c)for(var l=n[c],u=r[c],f=l.length,d=a[c]=new Array(f),p,x=0;x<f;++x)(p=l[x]||u[x])&&(d[x]=p);for(;c<i;++c)a[c]=n[c];return new at(a,this._parents)}function cc(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function lc(t){t||(t=uc);function e(f,d){return f&&d?t(f.__data__,d.__data__):!f-!d}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],a=s.length,c=i[o]=new Array(a),l,u=0;u<a;++u)(l=s[u])&&(c[u]=l);c.sort(e)}return new at(i,this._parents).order()}function uc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function fc(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function hc(){return Array.from(this)}function dc(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function pc(){let t=0;for(const e of this)++t;return t}function gc(){return!this.node()}function mc(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,s=i.length,a;o<s;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this}function yc(t){return function(){this.removeAttribute(t)}}function vc(t){return function(){this.removeAttributeNS(t.space,t.local)}}function wc(t,e){return function(){this.setAttribute(t,e)}}function xc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function bc(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function _c(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Sc(t,e){var n=An(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?vc:yc:typeof e=="function"?n.local?_c:bc:n.local?xc:wc)(n,e))}function Ki(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ec(t){return function(){this.style.removeProperty(t)}}function Nc(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ac(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Mc(t,e,n){return arguments.length>1?this.each((e==null?Ec:typeof e=="function"?Ac:Nc)(t,e,n??"")):ge(this.node(),t)}function ge(t,e){return t.style.getPropertyValue(e)||Ki(t).getComputedStyle(t,null).getPropertyValue(e)}function kc(t){return function(){delete this[t]}}function $c(t,e){return function(){this[t]=e}}function Cc(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Ic(t,e){return arguments.length>1?this.each((e==null?kc:typeof e=="function"?Cc:$c)(t,e)):this.node()[t]}function Ji(t){return t.trim().split(/^|\s+/)}function yr(t){return t.classList||new Qi(t)}function Qi(t){this._node=t,this._names=Ji(t.getAttribute("class")||"")}Qi.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ji(t,e){for(var n=yr(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function to(t,e){for(var n=yr(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Tc(t){return function(){ji(this,t)}}function Dc(t){return function(){to(this,t)}}function Pc(t,e){return function(){(e.apply(this,arguments)?ji:to)(this,t)}}function Fc(t,e){var n=Ji(t+"");if(arguments.length<2){for(var r=yr(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Pc:e?Tc:Dc)(n,e))}function zc(){this.textContent=""}function Rc(t){return function(){this.textContent=t}}function Wc(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Bc(t){return arguments.length?this.each(t==null?zc:(typeof t=="function"?Wc:Rc)(t)):this.node().textContent}function Hc(){this.innerHTML=""}function Oc(t){return function(){this.innerHTML=t}}function Lc(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Vc(t){return arguments.length?this.each(t==null?Hc:(typeof t=="function"?Lc:Oc)(t)):this.node().innerHTML}function Yc(){this.nextSibling&&this.parentNode.appendChild(this)}function Xc(){return this.each(Yc)}function Uc(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Gc(){return this.each(Uc)}function qc(t){var e=typeof t=="function"?t:Xi(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Zc(){return null}function Kc(t,e){var n=typeof t=="function"?t:Xi(t),r=e==null?Zc:typeof e=="function"?e:mr(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Jc(){var t=this.parentNode;t&&t.removeChild(this)}function Qc(){return this.each(Jc)}function jc(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function tl(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function el(t){return this.select(t?tl:jc)}function nl(t){return arguments.length?this.property("__data__",t):this.node().__data__}function rl(t){return function(e){t.call(this,e,this.__data__)}}function il(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function ol(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function sl(t,e,n){return function(){var r=this.__on,i,o=rl(e);if(r){for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function al(t,e,n){var r=il(t+""),i,o=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,l=a.length,u;c<l;++c)for(i=0,u=a[c];i<o;++i)if((s=r[i]).type===u.type&&s.name===u.name)return u.value}return}for(a=e?sl:ol,i=0;i<o;++i)this.each(a(r[i],e,n));return this}function eo(t,e,n){var r=Ki(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function cl(t,e){return function(){return eo(this,t,e)}}function ll(t,e){return function(){return eo(this,t,e.apply(this,arguments))}}function ul(t,e){return this.each((typeof e=="function"?ll:cl)(t,e))}function*fl(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var no=[null];function at(t,e){this._groups=t,this._parents=e}function He(){return new at([[document.documentElement]],no)}function hl(){return this}at.prototype=He.prototype={constructor:at,select:Wa,selectAll:La,selectChild:Ua,selectChildren:Ka,filter:Ja,data:rc,enter:Qa,exit:oc,join:sc,merge:ac,selection:hl,order:cc,sort:lc,call:fc,nodes:hc,node:dc,size:pc,empty:gc,each:mc,attr:Sc,style:Mc,property:Ic,classed:Fc,text:Bc,html:Vc,raise:Xc,lower:Gc,append:qc,insert:Kc,remove:Qc,clone:el,datum:nl,on:al,dispatch:ul,[Symbol.iterator]:fl};function yt(t){return typeof t=="string"?new at([[document.querySelector(t)]],[document.documentElement]):new at([[t]],no)}function dl(t){let e;for(;e=t.sourceEvent;)t=e;return t}function _t(t,e){if(t=dl(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}const pl={passive:!1},De={capture:!0,passive:!1};function Rn(t){t.stopImmediatePropagation()}function le(t){t.preventDefault(),t.stopImmediatePropagation()}function ro(t){var e=t.document.documentElement,n=yt(t).on("dragstart.drag",le,De);"onselectstart"in e?n.on("selectstart.drag",le,De):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function io(t,e){var n=t.document.documentElement,r=yt(t).on("dragstart.drag",null);e&&(r.on("click.drag",le,De),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Ye=t=>()=>t;function jn(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:s,y:a,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}jn.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function gl(t){return!t.ctrlKey&&!t.button}function ml(){return this.parentNode}function yl(t,e){return e??{x:t.x,y:t.y}}function vl(){return navigator.maxTouchPoints||"ontouchstart"in this}function wl(){var t=gl,e=ml,n=yl,r=vl,i={},o=Nn("start","drag","end"),s=0,a,c,l,u,f=0;function d(w){w.on("mousedown.drag",p).filter(r).on("touchstart.drag",g).on("touchmove.drag",h,pl).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(w,_){if(!(u||!t.call(this,w,_))){var N=b(this,e.call(this,w,_),w,_,"mouse");N&&(yt(w.view).on("mousemove.drag",x,De).on("mouseup.drag",m,De),ro(w.view),Rn(w),l=!1,a=w.clientX,c=w.clientY,N("start",w))}}function x(w){if(le(w),!l){var _=w.clientX-a,N=w.clientY-c;l=_*_+N*N>f}i.mouse("drag",w)}function m(w){yt(w.view).on("mousemove.drag mouseup.drag",null),io(w.view,l),le(w),i.mouse("end",w)}function g(w,_){if(t.call(this,w,_)){var N=w.changedTouches,M=e.call(this,w,_),C=N.length,k,D;for(k=0;k<C;++k)(D=b(this,M,w,_,N[k].identifier,N[k]))&&(Rn(w),D("start",w,N[k]))}}function h(w){var _=w.changedTouches,N=_.length,M,C;for(M=0;M<N;++M)(C=i[_[M].identifier])&&(le(w),C("drag",w,_[M]))}function v(w){var _=w.changedTouches,N=_.length,M,C;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),M=0;M<N;++M)(C=i[_[M].identifier])&&(Rn(w),C("end",w,_[M]))}function b(w,_,N,M,C,k){var D=o.copy(),W=_t(k||N,_),H,B,y;if((y=n.call(w,new jn("beforestart",{sourceEvent:N,target:d,identifier:C,active:s,x:W[0],y:W[1],dx:0,dy:0,dispatch:D}),M))!=null)return H=y.x-W[0]||0,B=y.y-W[1]||0,function A(E,T,P){var S=W,I;switch(E){case"start":i[C]=A,I=s++;break;case"end":delete i[C],--s;case"drag":W=_t(P||T,_),I=s;break}D.call(E,w,new jn(E,{sourceEvent:T,subject:y,target:d,identifier:C,active:I,x:W[0]+H,y:W[1]+B,dx:W[0]-S[0],dy:W[1]-S[1],dispatch:D}),M)}}return d.filter=function(w){return arguments.length?(t=typeof w=="function"?w:Ye(!!w),d):t},d.container=function(w){return arguments.length?(e=typeof w=="function"?w:Ye(w),d):e},d.subject=function(w){return arguments.length?(n=typeof w=="function"?w:Ye(w),d):n},d.touchable=function(w){return arguments.length?(r=typeof w=="function"?w:Ye(!!w),d):r},d.on=function(){var w=o.on.apply(o,arguments);return w===o?d:w},d.clickDistance=function(w){return arguments.length?(f=(w=+w)*w,d):Math.sqrt(f)},d}function vr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function oo(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Oe(){}var Pe=.7,fn=1/Pe,ue="\\s*([+-]?\\d+)\\s*",Fe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",St="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xl=/^#([0-9a-f]{3,8})$/,bl=new RegExp(`^rgb\\(${ue},${ue},${ue}\\)$`),_l=new RegExp(`^rgb\\(${St},${St},${St}\\)$`),Sl=new RegExp(`^rgba\\(${ue},${ue},${ue},${Fe}\\)$`),El=new RegExp(`^rgba\\(${St},${St},${St},${Fe}\\)$`),Nl=new RegExp(`^hsl\\(${Fe},${St},${St}\\)$`),Al=new RegExp(`^hsla\\(${Fe},${St},${St},${Fe}\\)$`),Gr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};vr(Oe,ze,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:qr,formatHex:qr,formatHex8:Ml,formatHsl:kl,formatRgb:Zr,toString:Zr});function qr(){return this.rgb().formatHex()}function Ml(){return this.rgb().formatHex8()}function kl(){return so(this).formatHsl()}function Zr(){return this.rgb().formatRgb()}function ze(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=xl.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Kr(e):n===3?new ot(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Xe(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Xe(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=bl.exec(t))?new ot(e[1],e[2],e[3],1):(e=_l.exec(t))?new ot(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Sl.exec(t))?Xe(e[1],e[2],e[3],e[4]):(e=El.exec(t))?Xe(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Nl.exec(t))?jr(e[1],e[2]/100,e[3]/100,1):(e=Al.exec(t))?jr(e[1],e[2]/100,e[3]/100,e[4]):Gr.hasOwnProperty(t)?Kr(Gr[t]):t==="transparent"?new ot(NaN,NaN,NaN,0):null}function Kr(t){return new ot(t>>16&255,t>>8&255,t&255,1)}function Xe(t,e,n,r){return r<=0&&(t=e=n=NaN),new ot(t,e,n,r)}function $l(t){return t instanceof Oe||(t=ze(t)),t?(t=t.rgb(),new ot(t.r,t.g,t.b,t.opacity)):new ot}function tr(t,e,n,r){return arguments.length===1?$l(t):new ot(t,e,n,r??1)}function ot(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}vr(ot,tr,oo(Oe,{brighter(t){return t=t==null?fn:Math.pow(fn,t),new ot(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Pe:Math.pow(Pe,t),new ot(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ot(Zt(this.r),Zt(this.g),Zt(this.b),hn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Jr,formatHex:Jr,formatHex8:Cl,formatRgb:Qr,toString:Qr}));function Jr(){return`#${Gt(this.r)}${Gt(this.g)}${Gt(this.b)}`}function Cl(){return`#${Gt(this.r)}${Gt(this.g)}${Gt(this.b)}${Gt((isNaN(this.opacity)?1:this.opacity)*255)}`}function Qr(){const t=hn(this.opacity);return`${t===1?"rgb(":"rgba("}${Zt(this.r)}, ${Zt(this.g)}, ${Zt(this.b)}${t===1?")":`, ${t})`}`}function hn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Zt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Gt(t){return t=Zt(t),(t<16?"0":"")+t.toString(16)}function jr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new vt(t,e,n,r)}function so(t){if(t instanceof vt)return new vt(t.h,t.s,t.l,t.opacity);if(t instanceof Oe||(t=ze(t)),!t)return new vt;if(t instanceof vt)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,c=(o+i)/2;return a?(e===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-e)/a+2:s=(e-n)/a+4,a/=c<.5?o+i:2-o-i,s*=60):a=c>0&&c<1?0:s,new vt(s,a,c,t.opacity)}function Il(t,e,n,r){return arguments.length===1?so(t):new vt(t,e,n,r??1)}function vt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}vr(vt,Il,oo(Oe,{brighter(t){return t=t==null?fn:Math.pow(fn,t),new vt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Pe:Math.pow(Pe,t),new vt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ot(Wn(t>=240?t-240:t+120,i,r),Wn(t,i,r),Wn(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new vt(ti(this.h),Ue(this.s),Ue(this.l),hn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=hn(this.opacity);return`${t===1?"hsl(":"hsla("}${ti(this.h)}, ${Ue(this.s)*100}%, ${Ue(this.l)*100}%${t===1?")":`, ${t})`}`}}));function ti(t){return t=(t||0)%360,t<0?t+360:t}function Ue(t){return Math.max(0,Math.min(1,t||0))}function Wn(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const ao=t=>()=>t;function Tl(t,e){return function(n){return t+n*e}}function Dl(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Pl(t){return(t=+t)==1?co:function(e,n){return n-e?Dl(e,n,t):ao(isNaN(e)?n:e)}}function co(t,e){var n=e-t;return n?Tl(t,n):ao(isNaN(t)?e:t)}const ei=function t(e){var n=Pl(e);function r(i,o){var s=n((i=tr(i)).r,(o=tr(o)).r),a=n(i.g,o.g),c=n(i.b,o.b),l=co(i.opacity,o.opacity);return function(u){return i.r=s(u),i.g=a(u),i.b=c(u),i.opacity=l(u),i+""}}return r.gamma=t,r}(1);function Dt(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var er=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bn=new RegExp(er.source,"g");function Fl(t){return function(){return t}}function zl(t){return function(e){return t(e)+""}}function Rl(t,e){var n=er.lastIndex=Bn.lastIndex=0,r,i,o,s=-1,a=[],c=[];for(t=t+"",e=e+"";(r=er.exec(t))&&(i=Bn.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,c.push({i:s,x:Dt(r,i)})),n=Bn.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?c[0]?zl(c[0].x):Fl(e):(e=c.length,function(l){for(var u=0,f;u<e;++u)a[(f=c[u]).i]=f.x(l);return a.join("")})}var ni=180/Math.PI,nr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function lo(t,e,n,r,i,o){var s,a,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,c/=a),t*r<e*n&&(t=-t,e=-e,c=-c,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*ni,skewX:Math.atan(c)*ni,scaleX:s,scaleY:a}}var Ge;function Wl(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?nr:lo(e.a,e.b,e.c,e.d,e.e,e.f)}function Bl(t){return t==null||(Ge||(Ge=document.createElementNS("http://www.w3.org/2000/svg","g")),Ge.setAttribute("transform",t),!(t=Ge.transform.baseVal.consolidate()))?nr:(t=t.matrix,lo(t.a,t.b,t.c,t.d,t.e,t.f))}function uo(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,u,f,d,p,x){if(l!==f||u!==d){var m=p.push("translate(",null,e,null,n);x.push({i:m-4,x:Dt(l,f)},{i:m-2,x:Dt(u,d)})}else(f||d)&&p.push("translate("+f+e+d+n)}function s(l,u,f,d){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),d.push({i:f.push(i(f)+"rotate(",null,r)-2,x:Dt(l,u)})):u&&f.push(i(f)+"rotate("+u+r)}function a(l,u,f,d){l!==u?d.push({i:f.push(i(f)+"skewX(",null,r)-2,x:Dt(l,u)}):u&&f.push(i(f)+"skewX("+u+r)}function c(l,u,f,d,p,x){if(l!==f||u!==d){var m=p.push(i(p)+"scale(",null,",",null,")");x.push({i:m-4,x:Dt(l,f)},{i:m-2,x:Dt(u,d)})}else(f!==1||d!==1)&&p.push(i(p)+"scale("+f+","+d+")")}return function(l,u){var f=[],d=[];return l=t(l),u=t(u),o(l.translateX,l.translateY,u.translateX,u.translateY,f,d),s(l.rotate,u.rotate,f,d),a(l.skewX,u.skewX,f,d),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,f,d),l=u=null,function(p){for(var x=-1,m=d.length,g;++x<m;)f[(g=d[x]).i]=g.x(p);return f.join("")}}}var Hl=uo(Wl,"px, ","px)","deg)"),Ol=uo(Bl,", ",")",")"),Ll=1e-12;function ri(t){return((t=Math.exp(t))+1/t)/2}function Vl(t){return((t=Math.exp(t))-1/t)/2}function Yl(t){return((t=Math.exp(2*t))-1)/(t+1)}const Xl=function t(e,n,r){function i(o,s){var a=o[0],c=o[1],l=o[2],u=s[0],f=s[1],d=s[2],p=u-a,x=f-c,m=p*p+x*x,g,h;if(m<Ll)h=Math.log(d/l)/e,g=function(M){return[a+M*p,c+M*x,l*Math.exp(e*M*h)]};else{var v=Math.sqrt(m),b=(d*d-l*l+r*m)/(2*l*n*v),w=(d*d-l*l-r*m)/(2*d*n*v),_=Math.log(Math.sqrt(b*b+1)-b),N=Math.log(Math.sqrt(w*w+1)-w);h=(N-_)/e,g=function(M){var C=M*h,k=ri(_),D=l/(n*v)*(k*Yl(e*C+_)-Vl(_));return[a+D*p,c+D*x,l*k/ri(e*C+_)]}}return g.duration=h*1e3*e/Math.SQRT2,g}return i.rho=function(o){var s=Math.max(.001,+o),a=s*s,c=a*a;return t(s,a,c)},i}(Math.SQRT2,2,4);var me=0,Ie=0,Ae=0,fo=1e3,dn,Te,pn=0,Kt=0,Mn=0,Re=typeof performance=="object"&&performance.now?performance:Date,ho=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function wr(){return Kt||(ho(Ul),Kt=Re.now()+Mn)}function Ul(){Kt=0}function gn(){this._call=this._time=this._next=null}gn.prototype=po.prototype={constructor:gn,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?wr():+n)+(e==null?0:+e),!this._next&&Te!==this&&(Te?Te._next=this:dn=this,Te=this),this._call=t,this._time=n,rr()},stop:function(){this._call&&(this._call=null,this._time=1/0,rr())}};function po(t,e,n){var r=new gn;return r.restart(t,e,n),r}function Gl(){wr(),++me;for(var t=dn,e;t;)(e=Kt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--me}function ii(){Kt=(pn=Re.now())+Mn,me=Ie=0;try{Gl()}finally{me=0,Zl(),Kt=0}}function ql(){var t=Re.now(),e=t-pn;e>fo&&(Mn-=e,pn=t)}function Zl(){for(var t,e=dn,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:dn=n);Te=t,rr(r)}function rr(t){if(!me){Ie&&(Ie=clearTimeout(Ie));var e=t-Kt;e>24?(t<1/0&&(Ie=setTimeout(ii,t-Re.now()-Mn)),Ae&&(Ae=clearInterval(Ae))):(Ae||(pn=Re.now(),Ae=setInterval(ql,fo)),me=1,ho(ii))}}function oi(t,e,n){var r=new gn;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var Kl=Nn("start","end","cancel","interrupt"),Jl=[],go=0,si=1,ir=2,an=3,ai=4,or=5,cn=6;function kn(t,e,n,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;Ql(t,n,{name:e,index:r,group:i,on:Kl,tween:Jl,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:go})}function xr(t,e){var n=wt(t,e);if(n.state>go)throw new Error("too late; already scheduled");return n}function Et(t,e){var n=wt(t,e);if(n.state>an)throw new Error("too late; already running");return n}function wt(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ql(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=po(o,0,n.time);function o(l){n.state=si,n.timer.restart(s,n.delay,n.time),n.delay<=l&&s(l-n.delay)}function s(l){var u,f,d,p;if(n.state!==si)return c();for(u in r)if(p=r[u],p.name===n.name){if(p.state===an)return oi(s);p.state===ai?(p.state=cn,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[u]):+u<e&&(p.state=cn,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[u])}if(oi(function(){n.state===an&&(n.state=ai,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=ir,n.on.call("start",t,t.__data__,n.index,n.group),n.state===ir){for(n.state=an,i=new Array(d=n.tween.length),u=0,f=-1;u<d;++u)(p=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function a(l){for(var u=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=or,1),f=-1,d=i.length;++f<d;)i[f].call(t,u);n.state===or&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=cn,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function ln(t,e){var n=t.__transition,r,i,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((r=n[s]).name!==e){o=!1;continue}i=r.state>ir&&r.state<or,r.state=cn,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[s]}o&&delete t.__transition}}function jl(t){return this.each(function(){ln(this,t)})}function tu(t,e){var n,r;return function(){var i=Et(this,t),o=i.tween;if(o!==n){r=n=o;for(var s=0,a=r.length;s<a;++s)if(r[s].name===e){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function eu(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Et(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:e,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===e){i[c]=a;break}c===l&&i.push(a)}o.tween=i}}function nu(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=wt(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===t)return s.value;return null}return this.each((e==null?tu:eu)(n,t,e))}function br(t,e,n){var r=t._id;return t.each(function(){var i=Et(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return wt(i,r).value[e]}}function mo(t,e){var n;return(typeof e=="number"?Dt:e instanceof ze?ei:(n=ze(e))?(e=n,ei):Rl)(t,e)}function ru(t){return function(){this.removeAttribute(t)}}function iu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ou(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttribute(t);return s===i?null:s===r?o:o=e(r=s,n)}}function su(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===r?o:o=e(r=s,n)}}function au(t,e,n){var r,i,o;return function(){var s,a=n(this),c;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),c=a+"",s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,a)))}}function cu(t,e,n){var r,i,o;return function(){var s,a=n(this),c;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),c=a+"",s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,a)))}}function lu(t,e){var n=An(t),r=n==="transform"?Ol:mo;return this.attrTween(t,typeof e=="function"?(n.local?cu:au)(n,r,br(this,"attr."+t,e)):e==null?(n.local?iu:ru)(n):(n.local?su:ou)(n,r,e))}function uu(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function fu(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function hu(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&fu(t,o)),n}return i._value=e,i}function du(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&uu(t,o)),n}return i._value=e,i}function pu(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=An(t);return this.tween(n,(r.local?hu:du)(r,e))}function gu(t,e){return function(){xr(this,t).delay=+e.apply(this,arguments)}}function mu(t,e){return e=+e,function(){xr(this,t).delay=e}}function yu(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?gu:mu)(e,t)):wt(this.node(),e).delay}function vu(t,e){return function(){Et(this,t).duration=+e.apply(this,arguments)}}function wu(t,e){return e=+e,function(){Et(this,t).duration=e}}function xu(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?vu:wu)(e,t)):wt(this.node(),e).duration}function bu(t,e){if(typeof e!="function")throw new Error;return function(){Et(this,t).ease=e}}function _u(t){var e=this._id;return arguments.length?this.each(bu(e,t)):wt(this.node(),e).ease}function Su(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Et(this,t).ease=n}}function Eu(t){if(typeof t!="function")throw new Error;return this.each(Su(this._id,t))}function Nu(t){typeof t!="function"&&(t=Gi(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],c,l=0;l<s;++l)(c=o[l])&&t.call(c,c.__data__,l,o)&&a.push(c);return new $t(r,this._parents,this._name,this._id)}function Au(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var c=e[a],l=n[a],u=c.length,f=s[a]=new Array(u),d,p=0;p<u;++p)(d=c[p]||l[p])&&(f[p]=d);for(;a<r;++a)s[a]=e[a];return new $t(s,this._parents,this._name,this._id)}function Mu(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function ku(t,e,n){var r,i,o=Mu(e)?xr:Et;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}function $u(t,e){var n=this._id;return arguments.length<2?wt(this.node(),n).on.on(t):this.each(ku(n,t,e))}function Cu(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Iu(){return this.on("end.remove",Cu(this._id))}function Tu(t){var e=this._name,n=this._id;typeof t!="function"&&(t=mr(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a=r[s],c=a.length,l=o[s]=new Array(c),u,f,d=0;d<c;++d)(u=a[d])&&(f=t.call(u,u.__data__,d,a))&&("__data__"in u&&(f.__data__=u.__data__),l[d]=f,kn(l[d],e,n,d,l,wt(u,n)));return new $t(o,this._parents,e,n)}function Du(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ui(t));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var c=r[a],l=c.length,u,f=0;f<l;++f)if(u=c[f]){for(var d=t.call(u,u.__data__,f,c),p,x=wt(u,n),m=0,g=d.length;m<g;++m)(p=d[m])&&kn(p,e,n,m,d,x);o.push(d),s.push(u)}return new $t(o,s,e,n)}var Pu=He.prototype.constructor;function Fu(){return new Pu(this._groups,this._parents)}function zu(t,e){var n,r,i;return function(){var o=ge(this,t),s=(this.style.removeProperty(t),ge(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}function yo(t){return function(){this.style.removeProperty(t)}}function Ru(t,e,n){var r,i=n+"",o;return function(){var s=ge(this,t);return s===i?null:s===r?o:o=e(r=s,n)}}function Wu(t,e,n){var r,i,o;return function(){var s=ge(this,t),a=n(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(t),ge(this,t))),s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,a))}}function Bu(t,e){var n,r,i,o="style."+e,s="end."+o,a;return function(){var c=Et(this,t),l=c.on,u=c.value[o]==null?a||(a=yo(e)):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(s,i=u),c.on=r}}function Hu(t,e,n){var r=(t+="")=="transform"?Hl:mo;return e==null?this.styleTween(t,zu(t,r)).on("end.style."+t,yo(t)):typeof e=="function"?this.styleTween(t,Wu(t,r,br(this,"style."+t,e))).each(Bu(this._id,t)):this.styleTween(t,Ru(t,r,e),n).on("end.style."+t,null)}function Ou(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Lu(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&Ou(t,s,n)),r}return o._value=e,o}function Vu(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,Lu(t,e,n??""))}function Yu(t){return function(){this.textContent=t}}function Xu(t){return function(){var e=t(this);this.textContent=e??""}}function Uu(t){return this.tween("text",typeof t=="function"?Xu(br(this,"text",t)):Yu(t==null?"":t+""))}function Gu(t){return function(e){this.textContent=t.call(this,e)}}function qu(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&Gu(i)),e}return r._value=t,r}function Zu(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,qu(t))}function Ku(){for(var t=this._name,e=this._id,n=vo(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,c,l=0;l<a;++l)if(c=s[l]){var u=wt(c,e);kn(c,t,n,l,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new $t(r,this._parents,t,n)}function Ju(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var a={value:s},c={value:function(){--i===0&&o()}};n.each(function(){var l=Et(this,r),u=l.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(c)),l.on=e}),i===0&&o()})}var Qu=0;function $t(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function vo(){return++Qu}var Mt=He.prototype;$t.prototype={constructor:$t,select:Tu,selectAll:Du,selectChild:Mt.selectChild,selectChildren:Mt.selectChildren,filter:Nu,merge:Au,selection:Fu,transition:Ku,call:Mt.call,nodes:Mt.nodes,node:Mt.node,size:Mt.size,empty:Mt.empty,each:Mt.each,on:$u,attr:lu,attrTween:pu,style:Hu,styleTween:Vu,text:Uu,textTween:Zu,remove:Iu,tween:nu,delay:yu,duration:xu,ease:_u,easeVarying:Eu,end:Ju,[Symbol.iterator]:Mt[Symbol.iterator]};function ju(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var tf={time:null,delay:0,duration:250,ease:ju};function ef(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function nf(t){var e,n;t instanceof $t?(e=t._id,t=t._name):(e=vo(),(n=tf).time=wr(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,c,l=0;l<a;++l)(c=s[l])&&kn(c,t,e,l,s,n||ef(c,e));return new $t(r,this._parents,t,e)}He.prototype.interrupt=jl;He.prototype.transition=nf;const qe=t=>()=>t;function rf(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function kt(t,e,n){this.k=t,this.x=e,this.y=n}kt.prototype={constructor:kt,scale:function(t){return t===1?this:new kt(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new kt(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Rt=new kt(1,0,0);kt.prototype;function Hn(t){t.stopImmediatePropagation()}function Me(t){t.preventDefault(),t.stopImmediatePropagation()}function of(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function sf(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function ci(){return this.__zoom||Rt}function af(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function cf(){return navigator.maxTouchPoints||"ontouchstart"in this}function lf(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function uf(){var t=of,e=sf,n=lf,r=af,i=cf,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,c=Xl,l=Nn("start","zoom","end"),u,f,d,p=500,x=150,m=0,g=10;function h(y){y.property("__zoom",ci).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",W).on("touchmove.zoom",H).on("touchend.zoom touchcancel.zoom",B).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}h.transform=function(y,A,E,T){var P=y.selection?y.selection():y;P.property("__zoom",ci),y!==P?_(y,A,E,T):P.interrupt().each(function(){N(this,arguments).event(T).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},h.scaleBy=function(y,A,E,T){h.scaleTo(y,function(){var P=this.__zoom.k,S=typeof A=="function"?A.apply(this,arguments):A;return P*S},E,T)},h.scaleTo=function(y,A,E,T){h.transform(y,function(){var P=e.apply(this,arguments),S=this.__zoom,I=E==null?w(P):typeof E=="function"?E.apply(this,arguments):E,F=S.invert(I),z=typeof A=="function"?A.apply(this,arguments):A;return n(b(v(S,z),I,F),P,s)},E,T)},h.translateBy=function(y,A,E,T){h.transform(y,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof E=="function"?E.apply(this,arguments):E),e.apply(this,arguments),s)},null,T)},h.translateTo=function(y,A,E,T,P){h.transform(y,function(){var S=e.apply(this,arguments),I=this.__zoom,F=T==null?w(S):typeof T=="function"?T.apply(this,arguments):T;return n(Rt.translate(F[0],F[1]).scale(I.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof E=="function"?-E.apply(this,arguments):-E),S,s)},T,P)};function v(y,A){return A=Math.max(o[0],Math.min(o[1],A)),A===y.k?y:new kt(A,y.x,y.y)}function b(y,A,E){var T=A[0]-E[0]*y.k,P=A[1]-E[1]*y.k;return T===y.x&&P===y.y?y:new kt(y.k,T,P)}function w(y){return[(+y[0][0]+ +y[1][0])/2,(+y[0][1]+ +y[1][1])/2]}function _(y,A,E,T){y.on("start.zoom",function(){N(this,arguments).event(T).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(T).end()}).tween("zoom",function(){var P=this,S=arguments,I=N(P,S).event(T),F=e.apply(P,S),z=E==null?w(F):typeof E=="function"?E.apply(P,S):E,L=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),O=P.__zoom,X=typeof A=="function"?A.apply(P,S):A,G=c(O.invert(z).concat(L/O.k),X.invert(z).concat(L/X.k));return function(q){if(q===1)q=X;else{var Z=G(q),Q=L/Z[2];q=new kt(Q,z[0]-Z[0]*Q,z[1]-Z[1]*Q)}I.zoom(null,q)}})}function N(y,A,E){return!E&&y.__zooming||new M(y,A)}function M(y,A){this.that=y,this.args=A,this.active=0,this.sourceEvent=null,this.extent=e.apply(y,A),this.taps=0}M.prototype={event:function(y){return y&&(this.sourceEvent=y),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(y,A){return this.mouse&&y!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&y!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&y!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(y){var A=yt(this.that).datum();l.call(y,this.that,new rf(y,{sourceEvent:this.sourceEvent,target:h,type:y,transform:this.that.__zoom,dispatch:l}),A)}};function C(y,...A){if(!t.apply(this,arguments))return;var E=N(this,A).event(y),T=this.__zoom,P=Math.max(o[0],Math.min(o[1],T.k*Math.pow(2,r.apply(this,arguments)))),S=_t(y);if(E.wheel)(E.mouse[0][0]!==S[0]||E.mouse[0][1]!==S[1])&&(E.mouse[1]=T.invert(E.mouse[0]=S)),clearTimeout(E.wheel);else{if(T.k===P)return;E.mouse=[S,T.invert(S)],ln(this),E.start()}Me(y),E.wheel=setTimeout(I,x),E.zoom("mouse",n(b(v(T,P),E.mouse[0],E.mouse[1]),E.extent,s));function I(){E.wheel=null,E.end()}}function k(y,...A){if(d||!t.apply(this,arguments))return;var E=y.currentTarget,T=N(this,A,!0).event(y),P=yt(y.view).on("mousemove.zoom",z,!0).on("mouseup.zoom",L,!0),S=_t(y,E),I=y.clientX,F=y.clientY;ro(y.view),Hn(y),T.mouse=[S,this.__zoom.invert(S)],ln(this),T.start();function z(O){if(Me(O),!T.moved){var X=O.clientX-I,G=O.clientY-F;T.moved=X*X+G*G>m}T.event(O).zoom("mouse",n(b(T.that.__zoom,T.mouse[0]=_t(O,E),T.mouse[1]),T.extent,s))}function L(O){P.on("mousemove.zoom mouseup.zoom",null),io(O.view,T.moved),Me(O),T.event(O).end()}}function D(y,...A){if(t.apply(this,arguments)){var E=this.__zoom,T=_t(y.changedTouches?y.changedTouches[0]:y,this),P=E.invert(T),S=E.k*(y.shiftKey?.5:2),I=n(b(v(E,S),T,P),e.apply(this,A),s);Me(y),a>0?yt(this).transition().duration(a).call(_,I,T,y):yt(this).call(h.transform,I,T,y)}}function W(y,...A){if(t.apply(this,arguments)){var E=y.touches,T=E.length,P=N(this,A,y.changedTouches.length===T).event(y),S,I,F,z;for(Hn(y),I=0;I<T;++I)F=E[I],z=_t(F,this),z=[z,this.__zoom.invert(z),F.identifier],P.touch0?!P.touch1&&P.touch0[2]!==z[2]&&(P.touch1=z,P.taps=0):(P.touch0=z,S=!0,P.taps=1+!!u);u&&(u=clearTimeout(u)),S&&(P.taps<2&&(f=z[0],u=setTimeout(function(){u=null},p)),ln(this),P.start())}}function H(y,...A){if(this.__zooming){var E=N(this,A).event(y),T=y.changedTouches,P=T.length,S,I,F,z;for(Me(y),S=0;S<P;++S)I=T[S],F=_t(I,this),E.touch0&&E.touch0[2]===I.identifier?E.touch0[0]=F:E.touch1&&E.touch1[2]===I.identifier&&(E.touch1[0]=F);if(I=E.that.__zoom,E.touch1){var L=E.touch0[0],O=E.touch0[1],X=E.touch1[0],G=E.touch1[1],q=(q=X[0]-L[0])*q+(q=X[1]-L[1])*q,Z=(Z=G[0]-O[0])*Z+(Z=G[1]-O[1])*Z;I=v(I,Math.sqrt(q/Z)),F=[(L[0]+X[0])/2,(L[1]+X[1])/2],z=[(O[0]+G[0])/2,(O[1]+G[1])/2]}else if(E.touch0)F=E.touch0[0],z=E.touch0[1];else return;E.zoom("touch",n(b(I,F,z),E.extent,s))}}function B(y,...A){if(this.__zooming){var E=N(this,A).event(y),T=y.changedTouches,P=T.length,S,I;for(Hn(y),d&&clearTimeout(d),d=setTimeout(function(){d=null},p),S=0;S<P;++S)I=T[S],E.touch0&&E.touch0[2]===I.identifier?delete E.touch0:E.touch1&&E.touch1[2]===I.identifier&&delete E.touch1;if(E.touch1&&!E.touch0&&(E.touch0=E.touch1,delete E.touch1),E.touch0)E.touch0[1]=this.__zoom.invert(E.touch0[0]);else if(E.end(),E.taps===2&&(I=_t(I,this),Math.hypot(f[0]-I[0],f[1]-I[1])<g)){var F=yt(this).on("dblclick.zoom");F&&F.apply(this,arguments)}}}return h.wheelDelta=function(y){return arguments.length?(r=typeof y=="function"?y:qe(+y),h):r},h.filter=function(y){return arguments.length?(t=typeof y=="function"?y:qe(!!y),h):t},h.touchable=function(y){return arguments.length?(i=typeof y=="function"?y:qe(!!y),h):i},h.extent=function(y){return arguments.length?(e=typeof y=="function"?y:qe([[+y[0][0],+y[0][1]],[+y[1][0],+y[1][1]]]),h):e},h.scaleExtent=function(y){return arguments.length?(o[0]=+y[0],o[1]=+y[1],h):[o[0],o[1]]},h.translateExtent=function(y){return arguments.length?(s[0][0]=+y[0][0],s[1][0]=+y[1][0],s[0][1]=+y[0][1],s[1][1]=+y[1][1],h):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},h.constrain=function(y){return arguments.length?(n=y,h):n},h.duration=function(y){return arguments.length?(a=+y,h):a},h.interpolate=function(y){return arguments.length?(c=y,h):c},h.on=function(){var y=l.on.apply(l,arguments);return y===l?h:y},h.clickDistance=function(y){return arguments.length?(m=(y=+y)*y,h):Math.sqrt(m)},h.tapDistance=function(y){return arguments.length?(g=+y,h):g},h}const $n=$.createContext(null),ff=$n.Provider,Ct={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,e)=>`Couldn't create edge for ${t?"target":"source"} handle id: "${t?e.targetHandle:e.sourceHandle}", edge id: ${e.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},wo=Ct.error001();function tt(t,e){const n=$.useContext($n);if(n===null)throw new Error(wo);return Yi(n,t,e)}const nt=()=>{const t=$.useContext($n);if(t===null)throw new Error(wo);return $.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe,destroy:t.destroy}),[t])},hf=t=>t.userSelectionActive?"none":"all";function df({position:t,children:e,className:n,style:r,...i}){const o=tt(hf),s=`${t}`.split("-");return R.createElement("div",{className:ht(["react-flow__panel",n,...s]),style:{...r,pointerEvents:o},...i},e)}function pf({proOptions:t,position:e="bottom-right"}){return t!=null&&t.hideAttribution?null:R.createElement(df,{position:e,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},R.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const gf=({x:t,y:e,label:n,labelStyle:r={},labelShowBg:i=!0,labelBgStyle:o={},labelBgPadding:s=[2,4],labelBgBorderRadius:a=2,children:c,className:l,...u})=>{const f=$.useRef(null),[d,p]=$.useState({x:0,y:0,width:0,height:0}),x=ht(["react-flow__edge-textwrapper",l]);return $.useEffect(()=>{if(f.current){const m=f.current.getBBox();p({x:m.x,y:m.y,width:m.width,height:m.height})}},[n]),typeof n>"u"||!n?null:R.createElement("g",{transform:`translate(${t-d.width/2} ${e-d.height/2})`,className:x,visibility:d.width?"visible":"hidden",...u},i&&R.createElement("rect",{width:d.width+2*s[0],x:-s[0],y:-s[1],height:d.height+2*s[1],className:"react-flow__edge-textbg",style:o,rx:a,ry:a}),R.createElement("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:f,style:r},n),c)};var mf=$.memo(gf);const _r=t=>({width:t.offsetWidth,height:t.offsetHeight}),ye=(t,e=0,n=1)=>Math.min(Math.max(t,e),n),Sr=(t={x:0,y:0},e)=>({x:ye(t.x,e[0][0],e[1][0]),y:ye(t.y,e[0][1],e[1][1])}),li=(t,e,n)=>t<e?ye(Math.abs(t-e),1,50)/50:t>n?-ye(Math.abs(t-n),1,50)/50:0,xo=(t,e)=>{const n=li(t.x,35,e.width-35)*20,r=li(t.y,35,e.height-35)*20;return[n,r]},bo=t=>{var e;return((e=t.getRootNode)==null?void 0:e.call(t))||(window==null?void 0:window.document)},yf=(t,e)=>({x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x2,e.x2),y2:Math.max(t.y2,e.y2)}),Er=({x:t,y:e,width:n,height:r})=>({x:t,y:e,x2:t+n,y2:e+r}),vf=({x:t,y:e,x2:n,y2:r})=>({x:t,y:e,width:n-t,height:r-e}),ui=t=>({...t.positionAbsolute||{x:0,y:0},width:t.width||0,height:t.height||0}),sr=(t,e)=>{const n=Math.max(0,Math.min(t.x+t.width,e.x+e.width)-Math.max(t.x,e.x)),r=Math.max(0,Math.min(t.y+t.height,e.y+e.height)-Math.max(t.y,e.y));return Math.ceil(n*r)},wf=t=>ft(t.width)&&ft(t.height)&&ft(t.x)&&ft(t.y),ft=t=>!isNaN(t)&&isFinite(t),j=Symbol.for("internals"),_o=["Enter"," ","Escape"],xf=(t,e)=>{},bf=t=>"nativeEvent"in t;function ar(t){var i,o;const e=bf(t)?t.nativeEvent:t,n=((o=(i=e.composedPath)==null?void 0:i.call(e))==null?void 0:o[0])||t.target;return["INPUT","SELECT","TEXTAREA"].includes(n==null?void 0:n.nodeName)||(n==null?void 0:n.hasAttribute("contenteditable"))||!!(n!=null&&n.closest(".nokey"))}const So=t=>"clientX"in t,Wt=(t,e)=>{var o,s;const n=So(t),r=n?t.clientX:(o=t.touches)==null?void 0:o[0].clientX,i=n?t.clientY:(s=t.touches)==null?void 0:s[0].clientY;return{x:r-((e==null?void 0:e.left)??0),y:i-((e==null?void 0:e.top)??0)}},mn=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0},Le=({id:t,path:e,labelX:n,labelY:r,label:i,labelStyle:o,labelShowBg:s,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:l,style:u,markerEnd:f,markerStart:d,interactionWidth:p=20})=>R.createElement(R.Fragment,null,R.createElement("path",{id:t,style:u,d:e,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:d}),p&&R.createElement("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}),i&&ft(n)&&ft(r)?R.createElement(mf,{x:n,y:r,label:i,labelStyle:o,labelShowBg:s,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:l}):null);Le.displayName="BaseEdge";function ke(t,e,n){return n===void 0?n:r=>{const i=e().edges.find(o=>o.id===t);i&&n(r,{...i})}}function Eo({sourceX:t,sourceY:e,targetX:n,targetY:r}){const i=Math.abs(n-t)/2,o=n<t?n+i:n-i,s=Math.abs(r-e)/2,a=r<e?r+s:r-s;return[o,a,i,s]}function No({sourceX:t,sourceY:e,targetX:n,targetY:r,sourceControlX:i,sourceControlY:o,targetControlX:s,targetControlY:a}){const c=t*.125+i*.375+s*.375+n*.125,l=e*.125+o*.375+a*.375+r*.125,u=Math.abs(c-t),f=Math.abs(l-e);return[c,l,u,f]}var Jt;(function(t){t.Strict="strict",t.Loose="loose"})(Jt||(Jt={}));var qt;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(qt||(qt={}));var We;(function(t){t.Partial="partial",t.Full="full"})(We||(We={}));var zt;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(zt||(zt={}));var yn;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(yn||(yn={}));var V;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(V||(V={}));function fi({pos:t,x1:e,y1:n,x2:r,y2:i}){return t===V.Left||t===V.Right?[.5*(e+r),n]:[e,.5*(n+i)]}function Ao({sourceX:t,sourceY:e,sourcePosition:n=V.Bottom,targetX:r,targetY:i,targetPosition:o=V.Top}){const[s,a]=fi({pos:n,x1:t,y1:e,x2:r,y2:i}),[c,l]=fi({pos:o,x1:r,y1:i,x2:t,y2:e}),[u,f,d,p]=No({sourceX:t,sourceY:e,targetX:r,targetY:i,sourceControlX:s,sourceControlY:a,targetControlX:c,targetControlY:l});return[`M${t},${e} C${s},${a} ${c},${l} ${r},${i}`,u,f,d,p]}const Nr=$.memo(({sourceX:t,sourceY:e,targetX:n,targetY:r,sourcePosition:i=V.Bottom,targetPosition:o=V.Top,label:s,labelStyle:a,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:f,style:d,markerEnd:p,markerStart:x,interactionWidth:m})=>{const[g,h,v]=Ao({sourceX:t,sourceY:e,sourcePosition:i,targetX:n,targetY:r,targetPosition:o});return R.createElement(Le,{path:g,labelX:h,labelY:v,label:s,labelStyle:a,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:f,style:d,markerEnd:p,markerStart:x,interactionWidth:m})});Nr.displayName="SimpleBezierEdge";const hi={[V.Left]:{x:-1,y:0},[V.Right]:{x:1,y:0},[V.Top]:{x:0,y:-1},[V.Bottom]:{x:0,y:1}},_f=({source:t,sourcePosition:e=V.Bottom,target:n})=>e===V.Left||e===V.Right?t.x<n.x?{x:1,y:0}:{x:-1,y:0}:t.y<n.y?{x:0,y:1}:{x:0,y:-1},di=(t,e)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2));function Sf({source:t,sourcePosition:e=V.Bottom,target:n,targetPosition:r=V.Top,center:i,offset:o}){const s=hi[e],a=hi[r],c={x:t.x+s.x*o,y:t.y+s.y*o},l={x:n.x+a.x*o,y:n.y+a.y*o},u=_f({source:c,sourcePosition:e,target:l}),f=u.x!==0?"x":"y",d=u[f];let p=[],x,m;const g={x:0,y:0},h={x:0,y:0},[v,b,w,_]=Eo({sourceX:t.x,sourceY:t.y,targetX:n.x,targetY:n.y});if(s[f]*a[f]===-1){x=i.x??v,m=i.y??b;const M=[{x,y:c.y},{x,y:l.y}],C=[{x:c.x,y:m},{x:l.x,y:m}];s[f]===d?p=f==="x"?M:C:p=f==="x"?C:M}else{const M=[{x:c.x,y:l.y}],C=[{x:l.x,y:c.y}];if(f==="x"?p=s.x===d?C:M:p=s.y===d?M:C,e===r){const B=Math.abs(t[f]-n[f]);if(B<=o){const y=Math.min(o-1,o-B);s[f]===d?g[f]=(c[f]>t[f]?-1:1)*y:h[f]=(l[f]>n[f]?-1:1)*y}}if(e!==r){const B=f==="x"?"y":"x",y=s[f]===a[B],A=c[B]>l[B],E=c[B]<l[B];(s[f]===1&&(!y&&A||y&&E)||s[f]!==1&&(!y&&E||y&&A))&&(p=f==="x"?M:C)}const k={x:c.x+g.x,y:c.y+g.y},D={x:l.x+h.x,y:l.y+h.y},W=Math.max(Math.abs(k.x-p[0].x),Math.abs(D.x-p[0].x)),H=Math.max(Math.abs(k.y-p[0].y),Math.abs(D.y-p[0].y));W>=H?(x=(k.x+D.x)/2,m=p[0].y):(x=p[0].x,m=(k.y+D.y)/2)}return[[t,{x:c.x+g.x,y:c.y+g.y},...p,{x:l.x+h.x,y:l.y+h.y},n],x,m,w,_]}function Ef(t,e,n,r){const i=Math.min(di(t,e)/2,di(e,n)/2,r),{x:o,y:s}=e;if(t.x===o&&o===n.x||t.y===s&&s===n.y)return`L${o} ${s}`;if(t.y===s){const l=t.x<n.x?-1:1,u=t.y<n.y?1:-1;return`L ${o+i*l},${s}Q ${o},${s} ${o},${s+i*u}`}const a=t.x<n.x?1:-1,c=t.y<n.y?-1:1;return`L ${o},${s+i*c}Q ${o},${s} ${o+i*a},${s}`}function cr({sourceX:t,sourceY:e,sourcePosition:n=V.Bottom,targetX:r,targetY:i,targetPosition:o=V.Top,borderRadius:s=5,centerX:a,centerY:c,offset:l=20}){const[u,f,d,p,x]=Sf({source:{x:t,y:e},sourcePosition:n,target:{x:r,y:i},targetPosition:o,center:{x:a,y:c},offset:l});return[u.reduce((g,h,v)=>{let b="";return v>0&&v<u.length-1?b=Ef(u[v-1],h,u[v+1],s):b=`${v===0?"M":"L"}${h.x} ${h.y}`,g+=b,g},""),f,d,p,x]}const Cn=$.memo(({sourceX:t,sourceY:e,targetX:n,targetY:r,label:i,labelStyle:o,labelShowBg:s,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:l,style:u,sourcePosition:f=V.Bottom,targetPosition:d=V.Top,markerEnd:p,markerStart:x,pathOptions:m,interactionWidth:g})=>{const[h,v,b]=cr({sourceX:t,sourceY:e,sourcePosition:f,targetX:n,targetY:r,targetPosition:d,borderRadius:m==null?void 0:m.borderRadius,offset:m==null?void 0:m.offset});return R.createElement(Le,{path:h,labelX:v,labelY:b,label:i,labelStyle:o,labelShowBg:s,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:l,style:u,markerEnd:p,markerStart:x,interactionWidth:g})});Cn.displayName="SmoothStepEdge";const Ar=$.memo(t=>{var e;return R.createElement(Cn,{...t,pathOptions:$.useMemo(()=>{var n;return{borderRadius:0,offset:(n=t.pathOptions)==null?void 0:n.offset}},[(e=t.pathOptions)==null?void 0:e.offset])})});Ar.displayName="StepEdge";function Nf({sourceX:t,sourceY:e,targetX:n,targetY:r}){const[i,o,s,a]=Eo({sourceX:t,sourceY:e,targetX:n,targetY:r});return[`M ${t},${e}L ${n},${r}`,i,o,s,a]}const Mr=$.memo(({sourceX:t,sourceY:e,targetX:n,targetY:r,label:i,labelStyle:o,labelShowBg:s,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:l,style:u,markerEnd:f,markerStart:d,interactionWidth:p})=>{const[x,m,g]=Nf({sourceX:t,sourceY:e,targetX:n,targetY:r});return R.createElement(Le,{path:x,labelX:m,labelY:g,label:i,labelStyle:o,labelShowBg:s,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:l,style:u,markerEnd:f,markerStart:d,interactionWidth:p})});Mr.displayName="StraightEdge";function Ze(t,e){return t>=0?.5*t:e*25*Math.sqrt(-t)}function pi({pos:t,x1:e,y1:n,x2:r,y2:i,c:o}){switch(t){case V.Left:return[e-Ze(e-r,o),n];case V.Right:return[e+Ze(r-e,o),n];case V.Top:return[e,n-Ze(n-i,o)];case V.Bottom:return[e,n+Ze(i-n,o)]}}function Mo({sourceX:t,sourceY:e,sourcePosition:n=V.Bottom,targetX:r,targetY:i,targetPosition:o=V.Top,curvature:s=.25}){const[a,c]=pi({pos:n,x1:t,y1:e,x2:r,y2:i,c:s}),[l,u]=pi({pos:o,x1:r,y1:i,x2:t,y2:e,c:s}),[f,d,p,x]=No({sourceX:t,sourceY:e,targetX:r,targetY:i,sourceControlX:a,sourceControlY:c,targetControlX:l,targetControlY:u});return[`M${t},${e} C${a},${c} ${l},${u} ${r},${i}`,f,d,p,x]}const vn=$.memo(({sourceX:t,sourceY:e,targetX:n,targetY:r,sourcePosition:i=V.Bottom,targetPosition:o=V.Top,label:s,labelStyle:a,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:f,style:d,markerEnd:p,markerStart:x,pathOptions:m,interactionWidth:g})=>{const[h,v,b]=Mo({sourceX:t,sourceY:e,sourcePosition:i,targetX:n,targetY:r,targetPosition:o,curvature:m==null?void 0:m.curvature});return R.createElement(Le,{path:h,labelX:v,labelY:b,label:s,labelStyle:a,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:f,style:d,markerEnd:p,markerStart:x,interactionWidth:g})});vn.displayName="BezierEdge";const kr=$.createContext(null),Af=kr.Provider;kr.Consumer;const Mf=()=>$.useContext(kr),kf=t=>"id"in t&&"source"in t&&"target"in t,$f=({source:t,sourceHandle:e,target:n,targetHandle:r})=>`reactflow__edge-${t}${e||""}-${n}${r||""}`,lr=(t,e)=>typeof t>"u"?"":typeof t=="string"?t:`${e?`${e}__`:""}${Object.keys(t).sort().map(r=>`${r}=${t[r]}`).join("&")}`,Cf=(t,e)=>e.some(n=>n.source===t.source&&n.target===t.target&&(n.sourceHandle===t.sourceHandle||!n.sourceHandle&&!t.sourceHandle)&&(n.targetHandle===t.targetHandle||!n.targetHandle&&!t.targetHandle)),If=(t,e)=>{if(!t.source||!t.target)return e;let n;return kf(t)?n={...t}:n={...t,id:$f(t)},Cf(n,e)?e:e.concat(n)},ur=({x:t,y:e},[n,r,i],o,[s,a])=>{const c={x:(t-n)/i,y:(e-r)/i};return o?{x:s*Math.round(c.x/s),y:a*Math.round(c.y/a)}:c},ko=({x:t,y:e},[n,r,i])=>({x:t*i+n,y:e*i+r}),fe=(t,e=[0,0])=>{if(!t)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(t.width??0)*e[0],r=(t.height??0)*e[1],i={x:t.position.x-n,y:t.position.y-r};return{...i,positionAbsolute:t.positionAbsolute?{x:t.positionAbsolute.x-n,y:t.positionAbsolute.y-r}:i}},$r=(t,e=[0,0])=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const n=t.reduce((r,i)=>{const{x:o,y:s}=fe(i,e).positionAbsolute;return yf(r,Er({x:o,y:s,width:i.width||0,height:i.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return vf(n)},$o=(t,e,[n,r,i]=[0,0,1],o=!1,s=!1,a=[0,0])=>{const c={x:(e.x-n)/i,y:(e.y-r)/i,width:e.width/i,height:e.height/i},l=[];return t.forEach(u=>{const{width:f,height:d,selectable:p=!0,hidden:x=!1}=u;if(s&&!p||x)return!1;const{positionAbsolute:m}=fe(u,a),g={x:m.x,y:m.y,width:f||0,height:d||0},h=sr(c,g),v=typeof f>"u"||typeof d>"u"||f===null||d===null,b=o&&h>0,w=(f||0)*(d||0);(v||b||h>=w||u.dragging)&&l.push(u)}),l},Co=(t,e)=>{const n=t.map(r=>r.id);return e.filter(r=>n.includes(r.source)||n.includes(r.target))},Io=(t,e,n,r,i,o=.1)=>{const s=e/(t.width*(1+o)),a=n/(t.height*(1+o)),c=Math.min(s,a),l=ye(c,r,i),u=t.x+t.width/2,f=t.y+t.height/2,d=e/2-u*l,p=n/2-f*l;return{x:d,y:p,zoom:l}},Ut=(t,e=0)=>t.transition().duration(e);function gi(t,e,n,r){return(e[n]||[]).reduce((i,o)=>{var s,a;return`${t.id}-${o.id}-${n}`!==r&&i.push({id:o.id||null,type:n,nodeId:t.id,x:(((s=t.positionAbsolute)==null?void 0:s.x)??0)+o.x+o.width/2,y:(((a=t.positionAbsolute)==null?void 0:a.y)??0)+o.y+o.height/2}),i},[])}function Tf(t,e,n,r,i,o){const{x:s,y:a}=Wt(t),l=e.elementsFromPoint(s,a).find(x=>x.classList.contains("react-flow__handle"));if(l){const x=l.getAttribute("data-nodeid");if(x){const m=Cr(void 0,l),g=l.getAttribute("data-handleid"),h=o({nodeId:x,id:g,type:m});if(h){const v=i.find(b=>b.nodeId===x&&b.type===m&&b.id===g);return{handle:{id:g,type:m,nodeId:x,x:(v==null?void 0:v.x)||n.x,y:(v==null?void 0:v.y)||n.y},validHandleResult:h}}}}let u=[],f=1/0;if(i.forEach(x=>{const m=Math.sqrt((x.x-n.x)**2+(x.y-n.y)**2);if(m<=r){const g=o(x);m<=f&&(m<f?u=[{handle:x,validHandleResult:g}]:m===f&&u.push({handle:x,validHandleResult:g}),f=m)}}),!u.length)return{handle:null,validHandleResult:To()};if(u.length===1)return u[0];const d=u.some(({validHandleResult:x})=>x.isValid),p=u.some(({handle:x})=>x.type==="target");return u.find(({handle:x,validHandleResult:m})=>p?x.type==="target":d?m.isValid:!0)||u[0]}const Df={source:null,target:null,sourceHandle:null,targetHandle:null},To=()=>({handleDomNode:null,isValid:!1,connection:Df,endHandle:null});function Do(t,e,n,r,i,o,s){const a=i==="target",c=s.querySelector(`.react-flow__handle[data-id="${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`),l={...To(),handleDomNode:c};if(c){const u=Cr(void 0,c),f=c.getAttribute("data-nodeid"),d=c.getAttribute("data-handleid"),p=c.classList.contains("connectable"),x=c.classList.contains("connectableend"),m={source:a?f:n,sourceHandle:a?d:r,target:a?n:f,targetHandle:a?r:d};l.connection=m,p&&x&&(e===Jt.Strict?a&&u==="source"||!a&&u==="target":f!==n||d!==r)&&(l.endHandle={nodeId:f,handleId:d,type:u},l.isValid=o(m))}return l}function Pf({nodes:t,nodeId:e,handleId:n,handleType:r}){return t.reduce((i,o)=>{if(o[j]){const{handleBounds:s}=o[j];let a=[],c=[];s&&(a=gi(o,s,"source",`${e}-${n}-${r}`),c=gi(o,s,"target",`${e}-${n}-${r}`)),i.push(...a,...c)}return i},[])}function Cr(t,e){return t||(e!=null&&e.classList.contains("target")?"target":e!=null&&e.classList.contains("source")?"source":null)}function On(t){t==null||t.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function Ff(t,e){let n=null;return e?n="valid":t&&!e&&(n="invalid"),n}function Po({event:t,handleId:e,nodeId:n,onConnect:r,isTarget:i,getState:o,setState:s,isValidConnection:a,edgeUpdaterType:c,onReconnectEnd:l}){const u=bo(t.target),{connectionMode:f,domNode:d,autoPanOnConnect:p,connectionRadius:x,onConnectStart:m,panBy:g,getNodes:h,cancelConnection:v}=o();let b=0,w;const{x:_,y:N}=Wt(t),M=u==null?void 0:u.elementFromPoint(_,N),C=Cr(c,M),k=d==null?void 0:d.getBoundingClientRect();if(!k||!C)return;let D,W=Wt(t,k),H=!1,B=null,y=!1,A=null;const E=Pf({nodes:h(),nodeId:n,handleId:e,handleType:C}),T=()=>{if(!p)return;const[I,F]=xo(W,k);g({x:I,y:F}),b=requestAnimationFrame(T)};s({connectionPosition:W,connectionStatus:null,connectionNodeId:n,connectionHandleId:e,connectionHandleType:C,connectionStartHandle:{nodeId:n,handleId:e,type:C},connectionEndHandle:null}),m==null||m(t,{nodeId:n,handleId:e,handleType:C});function P(I){const{transform:F}=o();W=Wt(I,k);const{handle:z,validHandleResult:L}=Tf(I,u,ur(W,F,!1,[1,1]),x,E,O=>Do(O,f,n,e,i?"target":"source",a,u));if(w=z,H||(T(),H=!0),A=L.handleDomNode,B=L.connection,y=L.isValid,s({connectionPosition:w&&y?ko({x:w.x,y:w.y},F):W,connectionStatus:Ff(!!w,y),connectionEndHandle:L.endHandle}),!w&&!y&&!A)return On(D);B.source!==B.target&&A&&(On(D),D=A,A.classList.add("connecting","react-flow__handle-connecting"),A.classList.toggle("valid",y),A.classList.toggle("react-flow__handle-valid",y))}function S(I){var F,z;(w||A)&&B&&y&&(r==null||r(B)),(z=(F=o()).onConnectEnd)==null||z.call(F,I),c&&(l==null||l(I)),On(D),v(),cancelAnimationFrame(b),H=!1,y=!1,B=null,A=null,u.removeEventListener("mousemove",P),u.removeEventListener("mouseup",S),u.removeEventListener("touchmove",P),u.removeEventListener("touchend",S)}u.addEventListener("mousemove",P),u.addEventListener("mouseup",S),u.addEventListener("touchmove",P),u.addEventListener("touchend",S)}const mi=()=>!0,zf=t=>({connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName}),Rf=(t,e,n)=>r=>{const{connectionStartHandle:i,connectionEndHandle:o,connectionClickStartHandle:s}=r;return{connecting:(i==null?void 0:i.nodeId)===t&&(i==null?void 0:i.handleId)===e&&(i==null?void 0:i.type)===n||(o==null?void 0:o.nodeId)===t&&(o==null?void 0:o.handleId)===e&&(o==null?void 0:o.type)===n,clickConnecting:(s==null?void 0:s.nodeId)===t&&(s==null?void 0:s.handleId)===e&&(s==null?void 0:s.type)===n}},Fo=$.forwardRef(({type:t="source",position:e=V.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:o=!0,id:s,onConnect:a,children:c,className:l,onMouseDown:u,onTouchStart:f,...d},p)=>{var k,D;const x=s||null,m=t==="target",g=nt(),h=Mf(),{connectOnClick:v,noPanClassName:b}=tt(zf,it),{connecting:w,clickConnecting:_}=tt(Rf(h,x,t),it);h||(D=(k=g.getState()).onError)==null||D.call(k,"010",Ct.error010());const N=W=>{const{defaultEdgeOptions:H,onConnect:B,hasDefaultEdges:y}=g.getState(),A={...H,...W};if(y){const{edges:E,setEdges:T}=g.getState();T(If(A,E))}B==null||B(A),a==null||a(A)},M=W=>{if(!h)return;const H=So(W);i&&(H&&W.button===0||!H)&&Po({event:W,handleId:x,nodeId:h,onConnect:N,isTarget:m,getState:g.getState,setState:g.setState,isValidConnection:n||g.getState().isValidConnection||mi}),H?u==null||u(W):f==null||f(W)},C=W=>{const{onClickConnectStart:H,onClickConnectEnd:B,connectionClickStartHandle:y,connectionMode:A,isValidConnection:E}=g.getState();if(!h||!y&&!i)return;if(!y){H==null||H(W,{nodeId:h,handleId:x,handleType:t}),g.setState({connectionClickStartHandle:{nodeId:h,type:t,handleId:x}});return}const T=bo(W.target),P=n||E||mi,{connection:S,isValid:I}=Do({nodeId:h,id:x,type:t},A,y.nodeId,y.handleId||null,y.type,P,T);I&&N(S),B==null||B(W),g.setState({connectionClickStartHandle:null})};return R.createElement("div",{"data-handleid":x,"data-nodeid":h,"data-handlepos":e,"data-id":`${h}-${x}-${t}`,className:ht(["react-flow__handle",`react-flow__handle-${e}`,"nodrag",b,l,{source:!m,target:m,connectable:r,connectablestart:i,connectableend:o,connecting:_,connectionindicator:r&&(i&&!w||o&&w)}]),onMouseDown:M,onTouchStart:M,onClick:v?C:void 0,ref:p,...d},c)});Fo.displayName="Handle";var wn=$.memo(Fo);const zo=({data:t,isConnectable:e,targetPosition:n=V.Top,sourcePosition:r=V.Bottom})=>R.createElement(R.Fragment,null,R.createElement(wn,{type:"target",position:n,isConnectable:e}),t==null?void 0:t.label,R.createElement(wn,{type:"source",position:r,isConnectable:e}));zo.displayName="DefaultNode";var fr=$.memo(zo);const Ro=({data:t,isConnectable:e,sourcePosition:n=V.Bottom})=>R.createElement(R.Fragment,null,t==null?void 0:t.label,R.createElement(wn,{type:"source",position:n,isConnectable:e}));Ro.displayName="InputNode";var Wo=$.memo(Ro);const Bo=({data:t,isConnectable:e,targetPosition:n=V.Top})=>R.createElement(R.Fragment,null,R.createElement(wn,{type:"target",position:n,isConnectable:e}),t==null?void 0:t.label);Bo.displayName="OutputNode";var Ho=$.memo(Bo);const Ir=()=>null;Ir.displayName="GroupNode";const Wf=t=>({selectedNodes:t.getNodes().filter(e=>e.selected),selectedEdges:t.edges.filter(e=>e.selected).map(e=>({...e}))}),Ke=t=>t.id;function Bf(t,e){return it(t.selectedNodes.map(Ke),e.selectedNodes.map(Ke))&&it(t.selectedEdges.map(Ke),e.selectedEdges.map(Ke))}const Oo=$.memo(({onSelectionChange:t})=>{const e=nt(),{selectedNodes:n,selectedEdges:r}=tt(Wf,Bf);return $.useEffect(()=>{const i={nodes:n,edges:r};t==null||t(i),e.getState().onSelectionChange.forEach(o=>o(i))},[n,r,t]),null});Oo.displayName="SelectionListener";const Hf=t=>!!t.onSelectionChange;function Of({onSelectionChange:t}){const e=tt(Hf);return t||e?R.createElement(Oo,{onSelectionChange:t}):null}const Lf=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset});function re(t,e){$.useEffect(()=>{typeof t<"u"&&e(t)},[t])}function U(t,e,n){$.useEffect(()=>{typeof e<"u"&&n({[t]:e})},[e])}const Vf=({nodes:t,edges:e,defaultNodes:n,defaultEdges:r,onConnect:i,onConnectStart:o,onConnectEnd:s,onClickConnectStart:a,onClickConnectEnd:c,nodesDraggable:l,nodesConnectable:u,nodesFocusable:f,edgesFocusable:d,edgesUpdatable:p,elevateNodesOnSelect:x,minZoom:m,maxZoom:g,nodeExtent:h,onNodesChange:v,onEdgesChange:b,elementsSelectable:w,connectionMode:_,snapGrid:N,snapToGrid:M,translateExtent:C,connectOnClick:k,defaultEdgeOptions:D,fitView:W,fitViewOptions:H,onNodesDelete:B,onEdgesDelete:y,onNodeDrag:A,onNodeDragStart:E,onNodeDragStop:T,onSelectionDrag:P,onSelectionDragStart:S,onSelectionDragStop:I,noPanClassName:F,nodeOrigin:z,rfId:L,autoPanOnConnect:O,autoPanOnNodeDrag:X,onError:G,connectionRadius:q,isValidConnection:Z,nodeDragThreshold:Q})=>{const{setNodes:K,setEdges:pt,setDefaultNodesAndEdges:lt,setMinZoom:gt,setMaxZoom:ut,setTranslateExtent:et,setNodeExtent:xt,reset:J}=tt(Lf,it),Y=nt();return $.useEffect(()=>{const st=r==null?void 0:r.map(Bt=>({...Bt,...D}));return lt(n,st),()=>{J()}},[]),U("defaultEdgeOptions",D,Y.setState),U("connectionMode",_,Y.setState),U("onConnect",i,Y.setState),U("onConnectStart",o,Y.setState),U("onConnectEnd",s,Y.setState),U("onClickConnectStart",a,Y.setState),U("onClickConnectEnd",c,Y.setState),U("nodesDraggable",l,Y.setState),U("nodesConnectable",u,Y.setState),U("nodesFocusable",f,Y.setState),U("edgesFocusable",d,Y.setState),U("edgesUpdatable",p,Y.setState),U("elementsSelectable",w,Y.setState),U("elevateNodesOnSelect",x,Y.setState),U("snapToGrid",M,Y.setState),U("snapGrid",N,Y.setState),U("onNodesChange",v,Y.setState),U("onEdgesChange",b,Y.setState),U("connectOnClick",k,Y.setState),U("fitViewOnInit",W,Y.setState),U("fitViewOnInitOptions",H,Y.setState),U("onNodesDelete",B,Y.setState),U("onEdgesDelete",y,Y.setState),U("onNodeDrag",A,Y.setState),U("onNodeDragStart",E,Y.setState),U("onNodeDragStop",T,Y.setState),U("onSelectionDrag",P,Y.setState),U("onSelectionDragStart",S,Y.setState),U("onSelectionDragStop",I,Y.setState),U("noPanClassName",F,Y.setState),U("nodeOrigin",z,Y.setState),U("rfId",L,Y.setState),U("autoPanOnConnect",O,Y.setState),U("autoPanOnNodeDrag",X,Y.setState),U("onError",G,Y.setState),U("connectionRadius",q,Y.setState),U("isValidConnection",Z,Y.setState),U("nodeDragThreshold",Q,Y.setState),re(t,K),re(e,pt),re(m,gt),re(g,ut),re(C,et),re(h,xt),null},yi={display:"none"},Yf={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Lo="react-flow__node-desc",Vo="react-flow__edge-desc",Xf="react-flow__aria-live",Uf=t=>t.ariaLiveMessage;function Gf({rfId:t}){const e=tt(Uf);return R.createElement("div",{id:`${Xf}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:Yf},e)}function qf({rfId:t,disableKeyboardA11y:e}){return R.createElement(R.Fragment,null,R.createElement("div",{id:`${Lo}-${t}`,style:yi},"Press enter or space to select a node.",!e&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),R.createElement("div",{id:`${Vo}-${t}`,style:yi},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!e&&R.createElement(Gf,{rfId:t}))}var Be=(t=null,e={actInsideInputWithModifier:!0})=>{const[n,r]=$.useState(!1),i=$.useRef(!1),o=$.useRef(new Set([])),[s,a]=$.useMemo(()=>{if(t!==null){const l=(Array.isArray(t)?t:[t]).filter(f=>typeof f=="string").map(f=>f.split("+")),u=l.reduce((f,d)=>f.concat(...d),[]);return[l,u]}return[[],[]]},[t]);return $.useEffect(()=>{const c=typeof document<"u"?document:null,l=(e==null?void 0:e.target)||c;if(t!==null){const u=p=>{if(i.current=p.ctrlKey||p.metaKey||p.shiftKey,(!i.current||i.current&&!e.actInsideInputWithModifier)&&ar(p))return!1;const m=wi(p.code,a);o.current.add(p[m]),vi(s,o.current,!1)&&(p.preventDefault(),r(!0))},f=p=>{if((!i.current||i.current&&!e.actInsideInputWithModifier)&&ar(p))return!1;const m=wi(p.code,a);vi(s,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(p[m]),p.key==="Meta"&&o.current.clear(),i.current=!1},d=()=>{o.current.clear(),r(!1)};return l==null||l.addEventListener("keydown",u),l==null||l.addEventListener("keyup",f),window.addEventListener("blur",d),()=>{l==null||l.removeEventListener("keydown",u),l==null||l.removeEventListener("keyup",f),window.removeEventListener("blur",d)}}},[t,r]),n};function vi(t,e,n){return t.filter(r=>n||r.length===e.size).some(r=>r.every(i=>e.has(i)))}function wi(t,e){return e.includes(t)?"code":"key"}function Yo(t,e,n,r){var a,c;const i=t.parentNode||t.parentId;if(!i)return n;const o=e.get(i),s=fe(o,r);return Yo(o,e,{x:(n.x??0)+s.x,y:(n.y??0)+s.y,z:(((a=o[j])==null?void 0:a.z)??0)>(n.z??0)?((c=o[j])==null?void 0:c.z)??0:n.z??0},r)}function Xo(t,e,n){t.forEach(r=>{var o;const i=r.parentNode||r.parentId;if(i&&!t.has(i))throw new Error(`Parent node ${i} not found`);if(i||n!=null&&n[r.id]){const{x:s,y:a,z:c}=Yo(r,t,{...r.position,z:((o=r[j])==null?void 0:o.z)??0},e);r.positionAbsolute={x:s,y:a},r[j].z=c,n!=null&&n[r.id]&&(r[j].isParent=!0)}})}function Ln(t,e,n,r){const i=new Map,o={},s=r?1e3:0;return t.forEach(a=>{var p;const c=(ft(a.zIndex)?a.zIndex:0)+(a.selected?s:0),l=e.get(a.id),u={...a,positionAbsolute:{x:a.position.x,y:a.position.y}},f=a.parentNode||a.parentId;f&&(o[f]=!0);const d=(l==null?void 0:l.type)&&(l==null?void 0:l.type)!==a.type;Object.defineProperty(u,j,{enumerable:!1,value:{handleBounds:d||(p=l==null?void 0:l[j])==null?void 0:p.handleBounds,z:c}}),i.set(a.id,u)}),Xo(i,n,o),i}function Uo(t,e={}){const{getNodes:n,width:r,height:i,minZoom:o,maxZoom:s,d3Zoom:a,d3Selection:c,fitViewOnInitDone:l,fitViewOnInit:u,nodeOrigin:f}=t(),d=e.initial&&!l&&u;if(a&&c&&(d||!e.initial)){const x=n().filter(g=>{var v;const h=e.includeHiddenNodes?g.width&&g.height:!g.hidden;return(v=e.nodes)!=null&&v.length?h&&e.nodes.some(b=>b.id===g.id):h}),m=x.every(g=>g.width&&g.height);if(x.length>0&&m){const g=$r(x,f),{x:h,y:v,zoom:b}=Io(g,r,i,e.minZoom??o,e.maxZoom??s,e.padding??.1),w=Rt.translate(h,v).scale(b);return typeof e.duration=="number"&&e.duration>0?a.transform(Ut(c,e.duration),w):a.transform(c,w),!0}}return!1}function Zf(t,e){return t.forEach(n=>{const r=e.get(n.id);r&&e.set(r.id,{...r,[j]:r[j],selected:n.selected})}),new Map(e)}function Kf(t,e){return e.map(n=>{const r=t.find(i=>i.id===n.id);return r&&(n.selected=r.selected),n})}function Je({changedNodes:t,changedEdges:e,get:n,set:r}){const{nodeInternals:i,edges:o,onNodesChange:s,onEdgesChange:a,hasDefaultNodes:c,hasDefaultEdges:l}=n();t!=null&&t.length&&(c&&r({nodeInternals:Zf(t,i)}),s==null||s(t)),e!=null&&e.length&&(l&&r({edges:Kf(e,o)}),a==null||a(e))}const ie=()=>{},Jf={zoomIn:ie,zoomOut:ie,zoomTo:ie,getZoom:()=>1,setViewport:ie,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:ie,fitBounds:ie,project:t=>t,screenToFlowPosition:t=>t,flowToScreenPosition:t=>t,viewportInitialized:!1},Qf=t=>({d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}),jf=()=>{const t=nt(),{d3Zoom:e,d3Selection:n}=tt(Qf,it);return $.useMemo(()=>n&&e?{zoomIn:i=>e.scaleBy(Ut(n,i==null?void 0:i.duration),1.2),zoomOut:i=>e.scaleBy(Ut(n,i==null?void 0:i.duration),1/1.2),zoomTo:(i,o)=>e.scaleTo(Ut(n,o==null?void 0:o.duration),i),getZoom:()=>t.getState().transform[2],setViewport:(i,o)=>{const[s,a,c]=t.getState().transform,l=Rt.translate(i.x??s,i.y??a).scale(i.zoom??c);e.transform(Ut(n,o==null?void 0:o.duration),l)},getViewport:()=>{const[i,o,s]=t.getState().transform;return{x:i,y:o,zoom:s}},fitView:i=>Uo(t.getState,i),setCenter:(i,o,s)=>{const{width:a,height:c,maxZoom:l}=t.getState(),u=typeof(s==null?void 0:s.zoom)<"u"?s.zoom:l,f=a/2-i*u,d=c/2-o*u,p=Rt.translate(f,d).scale(u);e.transform(Ut(n,s==null?void 0:s.duration),p)},fitBounds:(i,o)=>{const{width:s,height:a,minZoom:c,maxZoom:l}=t.getState(),{x:u,y:f,zoom:d}=Io(i,s,a,c,l,(o==null?void 0:o.padding)??.1),p=Rt.translate(u,f).scale(d);e.transform(Ut(n,o==null?void 0:o.duration),p)},project:i=>{const{transform:o,snapToGrid:s,snapGrid:a}=t.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),ur(i,o,s,a)},screenToFlowPosition:i=>{const{transform:o,snapToGrid:s,snapGrid:a,domNode:c}=t.getState();if(!c)return i;const{x:l,y:u}=c.getBoundingClientRect(),f={x:i.x-l,y:i.y-u};return ur(f,o,s,a)},flowToScreenPosition:i=>{const{transform:o,domNode:s}=t.getState();if(!s)return i;const{x:a,y:c}=s.getBoundingClientRect(),l=ko(i,o);return{x:l.x+a,y:l.y+c}},viewportInitialized:!0}:Jf,[e,n])};function Go(){const t=jf(),e=nt(),n=$.useCallback(()=>e.getState().getNodes().map(m=>({...m})),[]),r=$.useCallback(m=>e.getState().nodeInternals.get(m),[]),i=$.useCallback(()=>{const{edges:m=[]}=e.getState();return m.map(g=>({...g}))},[]),o=$.useCallback(m=>{const{edges:g=[]}=e.getState();return g.find(h=>h.id===m)},[]),s=$.useCallback(m=>{const{getNodes:g,setNodes:h,hasDefaultNodes:v,onNodesChange:b}=e.getState(),w=g(),_=typeof m=="function"?m(w):m;if(v)h(_);else if(b){const N=_.length===0?w.map(M=>({type:"remove",id:M.id})):_.map(M=>({item:M,type:"reset"}));b(N)}},[]),a=$.useCallback(m=>{const{edges:g=[],setEdges:h,hasDefaultEdges:v,onEdgesChange:b}=e.getState(),w=typeof m=="function"?m(g):m;if(v)h(w);else if(b){const _=w.length===0?g.map(N=>({type:"remove",id:N.id})):w.map(N=>({item:N,type:"reset"}));b(_)}},[]),c=$.useCallback(m=>{const g=Array.isArray(m)?m:[m],{getNodes:h,setNodes:v,hasDefaultNodes:b,onNodesChange:w}=e.getState();if(b){const N=[...h(),...g];v(N)}else if(w){const _=g.map(N=>({item:N,type:"add"}));w(_)}},[]),l=$.useCallback(m=>{const g=Array.isArray(m)?m:[m],{edges:h=[],setEdges:v,hasDefaultEdges:b,onEdgesChange:w}=e.getState();if(b)v([...h,...g]);else if(w){const _=g.map(N=>({item:N,type:"add"}));w(_)}},[]),u=$.useCallback(()=>{const{getNodes:m,edges:g=[],transform:h}=e.getState(),[v,b,w]=h;return{nodes:m().map(_=>({..._})),edges:g.map(_=>({..._})),viewport:{x:v,y:b,zoom:w}}},[]),f=$.useCallback(({nodes:m,edges:g})=>{const{nodeInternals:h,getNodes:v,edges:b,hasDefaultNodes:w,hasDefaultEdges:_,onNodesDelete:N,onEdgesDelete:M,onNodesChange:C,onEdgesChange:k}=e.getState(),D=(m||[]).map(A=>A.id),W=(g||[]).map(A=>A.id),H=v().reduce((A,E)=>{const T=E.parentNode||E.parentId,P=!D.includes(E.id)&&T&&A.find(I=>I.id===T);return(typeof E.deletable=="boolean"?E.deletable:!0)&&(D.includes(E.id)||P)&&A.push(E),A},[]),B=b.filter(A=>typeof A.deletable=="boolean"?A.deletable:!0),y=B.filter(A=>W.includes(A.id));if(H||y){const A=Co(H,B),E=[...y,...A],T=E.reduce((P,S)=>(P.includes(S.id)||P.push(S.id),P),[]);if((_||w)&&(_&&e.setState({edges:b.filter(P=>!T.includes(P.id))}),w&&(H.forEach(P=>{h.delete(P.id)}),e.setState({nodeInternals:new Map(h)}))),T.length>0&&(M==null||M(E),k&&k(T.map(P=>({id:P,type:"remove"})))),H.length>0&&(N==null||N(H),C)){const P=H.map(S=>({id:S.id,type:"remove"}));C(P)}}},[]),d=$.useCallback(m=>{const g=wf(m),h=g?null:e.getState().nodeInternals.get(m.id);return!g&&!h?[null,null,g]:[g?m:ui(h),h,g]},[]),p=$.useCallback((m,g=!0,h)=>{const[v,b,w]=d(m);return v?(h||e.getState().getNodes()).filter(_=>{if(!w&&(_.id===b.id||!_.positionAbsolute))return!1;const N=ui(_),M=sr(N,v);return g&&M>0||M>=v.width*v.height}):[]},[]),x=$.useCallback((m,g,h=!0)=>{const[v]=d(m);if(!v)return!1;const b=sr(v,g);return h&&b>0||b>=v.width*v.height},[]);return $.useMemo(()=>({...t,getNodes:n,getNode:r,getEdges:i,getEdge:o,setNodes:s,setEdges:a,addNodes:c,addEdges:l,toObject:u,deleteElements:f,getIntersectingNodes:p,isNodeIntersecting:x}),[t,n,r,i,o,s,a,c,l,u,f,p,x])}const th={actInsideInputWithModifier:!1};var eh=({deleteKeyCode:t,multiSelectionKeyCode:e})=>{const n=nt(),{deleteElements:r}=Go(),i=Be(t,th),o=Be(e);$.useEffect(()=>{if(i){const{edges:s,getNodes:a}=n.getState(),c=a().filter(u=>u.selected),l=s.filter(u=>u.selected);r({nodes:c,edges:l}),n.setState({nodesSelectionActive:!1})}},[i]),$.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])};function nh(t){const e=nt();$.useEffect(()=>{let n;const r=()=>{var o,s;if(!t.current)return;const i=_r(t.current);(i.height===0||i.width===0)&&((s=(o=e.getState()).onError)==null||s.call(o,"004",Ct.error004())),e.setState({width:i.width||500,height:i.height||500})};return r(),window.addEventListener("resize",r),t.current&&(n=new ResizeObserver(()=>r()),n.observe(t.current)),()=>{window.removeEventListener("resize",r),n&&t.current&&n.unobserve(t.current)}},[])}const Tr={position:"absolute",width:"100%",height:"100%",top:0,left:0},rh=(t,e)=>t.x!==e.x||t.y!==e.y||t.zoom!==e.k,Qe=t=>({x:t.x,y:t.y,zoom:t.k}),oe=(t,e)=>t.target.closest(`.${e}`),xi=(t,e)=>e===2&&Array.isArray(t)&&t.includes(2),bi=t=>{const e=t.ctrlKey&&mn()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*e},ih=t=>({d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler,userSelectionActive:t.userSelectionActive}),oh=({onMove:t,onMoveStart:e,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:i=!0,zoomOnPinch:o=!0,panOnScroll:s=!1,panOnScrollSpeed:a=.5,panOnScrollMode:c=qt.Free,zoomOnDoubleClick:l=!0,elementsSelectable:u,panOnDrag:f=!0,defaultViewport:d,translateExtent:p,minZoom:x,maxZoom:m,zoomActivationKeyCode:g,preventScrolling:h=!0,children:v,noWheelClassName:b,noPanClassName:w})=>{const _=$.useRef(),N=nt(),M=$.useRef(!1),C=$.useRef(!1),k=$.useRef(null),D=$.useRef({x:0,y:0,zoom:0}),{d3Zoom:W,d3Selection:H,d3ZoomHandler:B,userSelectionActive:y}=tt(ih,it),A=Be(g),E=$.useRef(0),T=$.useRef(!1),P=$.useRef();return nh(k),$.useEffect(()=>{if(k.current){const S=k.current.getBoundingClientRect(),I=uf().scaleExtent([x,m]).translateExtent(p),F=yt(k.current).call(I),z=Rt.translate(d.x,d.y).scale(ye(d.zoom,x,m)),L=[[0,0],[S.width,S.height]],O=I.constrain()(z,L,p);I.transform(F,O),I.wheelDelta(bi),N.setState({d3Zoom:I,d3Selection:F,d3ZoomHandler:F.on("wheel.zoom"),transform:[O.x,O.y,O.k],domNode:k.current.closest(".react-flow")})}},[]),$.useEffect(()=>{H&&W&&(s&&!A&&!y?H.on("wheel.zoom",S=>{if(oe(S,b))return!1;S.preventDefault(),S.stopImmediatePropagation();const I=H.property("__zoom").k||1;if(S.ctrlKey&&o){const Z=_t(S),Q=bi(S),K=I*Math.pow(2,Q);W.scaleTo(H,K,Z,S);return}const F=S.deltaMode===1?20:1;let z=c===qt.Vertical?0:S.deltaX*F,L=c===qt.Horizontal?0:S.deltaY*F;!mn()&&S.shiftKey&&c!==qt.Vertical&&(z=S.deltaY*F,L=0),W.translateBy(H,-(z/I)*a,-(L/I)*a,{internal:!0});const O=Qe(H.property("__zoom")),{onViewportChangeStart:X,onViewportChange:G,onViewportChangeEnd:q}=N.getState();clearTimeout(P.current),T.current||(T.current=!0,e==null||e(S,O),X==null||X(O)),T.current&&(t==null||t(S,O),G==null||G(O),P.current=setTimeout(()=>{n==null||n(S,O),q==null||q(O),T.current=!1},150))},{passive:!1}):typeof B<"u"&&H.on("wheel.zoom",function(S,I){if(!h&&S.type==="wheel"&&!S.ctrlKey||oe(S,b))return null;S.preventDefault(),B.call(this,S,I)},{passive:!1}))},[y,s,c,H,W,B,A,o,h,b,e,t,n]),$.useEffect(()=>{W&&W.on("start",S=>{var z,L;if(!S.sourceEvent||S.sourceEvent.internal)return null;E.current=(z=S.sourceEvent)==null?void 0:z.button;const{onViewportChangeStart:I}=N.getState(),F=Qe(S.transform);M.current=!0,D.current=F,((L=S.sourceEvent)==null?void 0:L.type)==="mousedown"&&N.setState({paneDragging:!0}),I==null||I(F),e==null||e(S.sourceEvent,F)})},[W,e]),$.useEffect(()=>{W&&(y&&!M.current?W.on("zoom",null):y||W.on("zoom",S=>{var F;const{onViewportChange:I}=N.getState();if(N.setState({transform:[S.transform.x,S.transform.y,S.transform.k]}),C.current=!!(r&&xi(f,E.current??0)),(t||I)&&!((F=S.sourceEvent)!=null&&F.internal)){const z=Qe(S.transform);I==null||I(z),t==null||t(S.sourceEvent,z)}}))},[y,W,t,f,r]),$.useEffect(()=>{W&&W.on("end",S=>{if(!S.sourceEvent||S.sourceEvent.internal)return null;const{onViewportChangeEnd:I}=N.getState();if(M.current=!1,N.setState({paneDragging:!1}),r&&xi(f,E.current??0)&&!C.current&&r(S.sourceEvent),C.current=!1,(n||I)&&rh(D.current,S.transform)){const F=Qe(S.transform);D.current=F,clearTimeout(_.current),_.current=setTimeout(()=>{I==null||I(F),n==null||n(S.sourceEvent,F)},s?150:0)}})},[W,s,f,n,r]),$.useEffect(()=>{W&&W.filter(S=>{const I=A||i,F=o&&S.ctrlKey;if((f===!0||Array.isArray(f)&&f.includes(1))&&S.button===1&&S.type==="mousedown"&&(oe(S,"react-flow__node")||oe(S,"react-flow__edge")))return!0;if(!f&&!I&&!s&&!l&&!o||y||!l&&S.type==="dblclick"||oe(S,b)&&S.type==="wheel"||oe(S,w)&&(S.type!=="wheel"||s&&S.type==="wheel"&&!A)||!o&&S.ctrlKey&&S.type==="wheel"||!I&&!s&&!F&&S.type==="wheel"||!f&&(S.type==="mousedown"||S.type==="touchstart")||Array.isArray(f)&&!f.includes(S.button)&&S.type==="mousedown")return!1;const z=Array.isArray(f)&&f.includes(S.button)||!S.button||S.button<=1;return(!S.ctrlKey||S.type==="wheel")&&z})},[y,W,i,o,s,l,f,u,A]),R.createElement("div",{className:"react-flow__renderer",ref:k,style:Tr},v)},sh=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function ah(){const{userSelectionActive:t,userSelectionRect:e}=tt(sh,it);return t&&e?R.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:e.width,height:e.height,transform:`translate(${e.x}px, ${e.y}px)`}}):null}function _i(t,e){const n=e.parentNode||e.parentId,r=t.find(i=>i.id===n);if(r){const i=e.position.x+e.width-r.width,o=e.position.y+e.height-r.height;if(i>0||o>0||e.position.x<0||e.position.y<0){if(r.style={...r.style},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,i>0&&(r.style.width+=i),o>0&&(r.style.height+=o),e.position.x<0){const s=Math.abs(e.position.x);r.position.x=r.position.x-s,r.style.width+=s,e.position.x=0}if(e.position.y<0){const s=Math.abs(e.position.y);r.position.y=r.position.y-s,r.style.height+=s,e.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function qo(t,e){if(t.some(r=>r.type==="reset"))return t.filter(r=>r.type==="reset").map(r=>r.item);const n=t.filter(r=>r.type==="add").map(r=>r.item);return e.reduce((r,i)=>{const o=t.filter(a=>a.id===i.id);if(o.length===0)return r.push(i),r;const s={...i};for(const a of o)if(a)switch(a.type){case"select":{s.selected=a.selected;break}case"position":{typeof a.position<"u"&&(s.position=a.position),typeof a.positionAbsolute<"u"&&(s.positionAbsolute=a.positionAbsolute),typeof a.dragging<"u"&&(s.dragging=a.dragging),s.expandParent&&_i(r,s);break}case"dimensions":{typeof a.dimensions<"u"&&(s.width=a.dimensions.width,s.height=a.dimensions.height),typeof a.updateStyle<"u"&&(s.style={...s.style||{},...a.dimensions}),typeof a.resizing=="boolean"&&(s.resizing=a.resizing),s.expandParent&&_i(r,s);break}case"remove":return r}return r.push(s),r},n)}function Zo(t,e){return qo(t,e)}function ch(t,e){return qo(t,e)}const Pt=(t,e)=>({id:t,type:"select",selected:e});function ce(t,e){return t.reduce((n,r)=>{const i=e.includes(r.id);return!r.selected&&i?(r.selected=!0,n.push(Pt(r.id,!0))):r.selected&&!i&&(r.selected=!1,n.push(Pt(r.id,!1))),n},[])}const Vn=(t,e)=>n=>{n.target===e.current&&(t==null||t(n))},lh=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,dragging:t.paneDragging}),Ko=$.memo(({isSelecting:t,selectionMode:e=We.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:i,onPaneClick:o,onPaneContextMenu:s,onPaneScroll:a,onPaneMouseEnter:c,onPaneMouseMove:l,onPaneMouseLeave:u,children:f})=>{const d=$.useRef(null),p=nt(),x=$.useRef(0),m=$.useRef(0),g=$.useRef(),{userSelectionActive:h,elementsSelectable:v,dragging:b}=tt(lh,it),w=()=>{p.setState({userSelectionActive:!1,userSelectionRect:null}),x.current=0,m.current=0},_=B=>{o==null||o(B),p.getState().resetSelectedElements(),p.setState({nodesSelectionActive:!1})},N=B=>{if(Array.isArray(n)&&(n!=null&&n.includes(2))){B.preventDefault();return}s==null||s(B)},M=a?B=>a(B):void 0,C=B=>{const{resetSelectedElements:y,domNode:A}=p.getState();if(g.current=A==null?void 0:A.getBoundingClientRect(),!v||!t||B.button!==0||B.target!==d.current||!g.current)return;const{x:E,y:T}=Wt(B,g.current);y(),p.setState({userSelectionRect:{width:0,height:0,startX:E,startY:T,x:E,y:T}}),r==null||r(B)},k=B=>{const{userSelectionRect:y,nodeInternals:A,edges:E,transform:T,onNodesChange:P,onEdgesChange:S,nodeOrigin:I,getNodes:F}=p.getState();if(!t||!g.current||!y)return;p.setState({userSelectionActive:!0,nodesSelectionActive:!1});const z=Wt(B,g.current),L=y.startX??0,O=y.startY??0,X={...y,x:z.x<L?z.x:L,y:z.y<O?z.y:O,width:Math.abs(z.x-L),height:Math.abs(z.y-O)},G=F(),q=$o(A,X,T,e===We.Partial,!0,I),Z=Co(q,E).map(K=>K.id),Q=q.map(K=>K.id);if(x.current!==Q.length){x.current=Q.length;const K=ce(G,Q);K.length&&(P==null||P(K))}if(m.current!==Z.length){m.current=Z.length;const K=ce(E,Z);K.length&&(S==null||S(K))}p.setState({userSelectionRect:X})},D=B=>{if(B.button!==0)return;const{userSelectionRect:y}=p.getState();!h&&y&&B.target===d.current&&(_==null||_(B)),p.setState({nodesSelectionActive:x.current>0}),w(),i==null||i(B)},W=B=>{h&&(p.setState({nodesSelectionActive:x.current>0}),i==null||i(B)),w()},H=v&&(t||h);return R.createElement("div",{className:ht(["react-flow__pane",{dragging:b,selection:t}]),onClick:H?void 0:Vn(_,d),onContextMenu:Vn(N,d),onWheel:Vn(M,d),onMouseEnter:H?void 0:c,onMouseDown:H?C:void 0,onMouseMove:H?k:l,onMouseUp:H?D:void 0,onMouseLeave:H?W:u,ref:d,style:Tr},f,R.createElement(ah,null))});Ko.displayName="Pane";function Jo(t,e){const n=t.parentNode||t.parentId;if(!n)return!1;const r=e.get(n);return r?r.selected?!0:Jo(r,e):!1}function Si(t,e,n){let r=t;do{if(r!=null&&r.matches(e))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function uh(t,e,n,r){return Array.from(t.values()).filter(i=>(i.selected||i.id===r)&&(!i.parentNode||i.parentId||!Jo(i,t))&&(i.draggable||e&&typeof i.draggable>"u")).map(i=>{var o,s;return{id:i.id,position:i.position||{x:0,y:0},positionAbsolute:i.positionAbsolute||{x:0,y:0},distance:{x:n.x-(((o=i.positionAbsolute)==null?void 0:o.x)??0),y:n.y-(((s=i.positionAbsolute)==null?void 0:s.y)??0)},delta:{x:0,y:0},extent:i.extent,parentNode:i.parentNode||i.parentId,parentId:i.parentNode||i.parentId,width:i.width,height:i.height,expandParent:i.expandParent}})}function fh(t,e){return!e||e==="parent"?e:[e[0],[e[1][0]-(t.width||0),e[1][1]-(t.height||0)]]}function Qo(t,e,n,r,i=[0,0],o){const s=fh(t,t.extent||r);let a=s;const c=t.parentNode||t.parentId;if(t.extent==="parent"&&!t.expandParent)if(c&&t.width&&t.height){const f=n.get(c),{x:d,y:p}=fe(f,i).positionAbsolute;a=f&&ft(d)&&ft(p)&&ft(f.width)&&ft(f.height)?[[d+t.width*i[0],p+t.height*i[1]],[d+f.width-t.width+t.width*i[0],p+f.height-t.height+t.height*i[1]]]:a}else o==null||o("005",Ct.error005()),a=s;else if(t.extent&&c&&t.extent!=="parent"){const f=n.get(c),{x:d,y:p}=fe(f,i).positionAbsolute;a=[[t.extent[0][0]+d,t.extent[0][1]+p],[t.extent[1][0]+d,t.extent[1][1]+p]]}let l={x:0,y:0};if(c){const f=n.get(c);l=fe(f,i).positionAbsolute}const u=a&&a!=="parent"?Sr(e,a):e;return{position:{x:u.x-l.x,y:u.y-l.y},positionAbsolute:u}}function Yn({nodeId:t,dragItems:e,nodeInternals:n}){const r=e.map(i=>({...n.get(i.id),position:i.position,positionAbsolute:i.positionAbsolute}));return[t?r.find(i=>i.id===t):r[0],r]}const Ei=(t,e,n,r)=>{const i=e.querySelectorAll(t);if(!i||!i.length)return null;const o=Array.from(i),s=e.getBoundingClientRect(),a={x:s.width*r[0],y:s.height*r[1]};return o.map(c=>{const l=c.getBoundingClientRect();return{id:c.getAttribute("data-handleid"),position:c.getAttribute("data-handlepos"),x:(l.left-s.left-a.x)/n,y:(l.top-s.top-a.y)/n,..._r(c)}})};function $e(t,e,n){return n===void 0?n:r=>{const i=e().nodeInternals.get(t);i&&n(r,{...i})}}function hr({id:t,store:e,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:o,multiSelectionActive:s,nodeInternals:a,onError:c}=e.getState(),l=a.get(t);if(!l){c==null||c("012",Ct.error012(t));return}e.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&s)&&(o({nodes:[l],edges:[]}),requestAnimationFrame(()=>{var u;return(u=r==null?void 0:r.current)==null?void 0:u.blur()})):i([t])}function hh(){const t=nt();return $.useCallback(({sourceEvent:n})=>{const{transform:r,snapGrid:i,snapToGrid:o}=t.getState(),s=n.touches?n.touches[0].clientX:n.clientX,a=n.touches?n.touches[0].clientY:n.clientY,c={x:(s-r[0])/r[2],y:(a-r[1])/r[2]};return{xSnapped:o?i[0]*Math.round(c.x/i[0]):c.x,ySnapped:o?i[1]*Math.round(c.y/i[1]):c.y,...c}},[])}function Xn(t){return(e,n,r)=>t==null?void 0:t(e,r)}function jo({nodeRef:t,disabled:e=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:o,selectNodesOnDrag:s}){const a=nt(),[c,l]=$.useState(!1),u=$.useRef([]),f=$.useRef({x:null,y:null}),d=$.useRef(0),p=$.useRef(null),x=$.useRef({x:0,y:0}),m=$.useRef(null),g=$.useRef(!1),h=$.useRef(!1),v=$.useRef(!1),b=hh();return $.useEffect(()=>{if(t!=null&&t.current){const w=yt(t.current),_=({x:C,y:k})=>{const{nodeInternals:D,onNodeDrag:W,onSelectionDrag:H,updateNodePositions:B,nodeExtent:y,snapGrid:A,snapToGrid:E,nodeOrigin:T,onError:P}=a.getState();f.current={x:C,y:k};let S=!1,I={x:0,y:0,x2:0,y2:0};if(u.current.length>1&&y){const z=$r(u.current,T);I=Er(z)}if(u.current=u.current.map(z=>{const L={x:C-z.distance.x,y:k-z.distance.y};E&&(L.x=A[0]*Math.round(L.x/A[0]),L.y=A[1]*Math.round(L.y/A[1]));const O=[[y[0][0],y[0][1]],[y[1][0],y[1][1]]];u.current.length>1&&y&&!z.extent&&(O[0][0]=z.positionAbsolute.x-I.x+y[0][0],O[1][0]=z.positionAbsolute.x+(z.width??0)-I.x2+y[1][0],O[0][1]=z.positionAbsolute.y-I.y+y[0][1],O[1][1]=z.positionAbsolute.y+(z.height??0)-I.y2+y[1][1]);const X=Qo(z,L,D,O,T,P);return S=S||z.position.x!==X.position.x||z.position.y!==X.position.y,z.position=X.position,z.positionAbsolute=X.positionAbsolute,z}),!S)return;B(u.current,!0,!0),l(!0);const F=i?W:Xn(H);if(F&&m.current){const[z,L]=Yn({nodeId:i,dragItems:u.current,nodeInternals:D});F(m.current,z,L)}},N=()=>{if(!p.current)return;const[C,k]=xo(x.current,p.current);if(C!==0||k!==0){const{transform:D,panBy:W}=a.getState();f.current.x=(f.current.x??0)-C/D[2],f.current.y=(f.current.y??0)-k/D[2],W({x:C,y:k})&&_(f.current)}d.current=requestAnimationFrame(N)},M=C=>{var T;const{nodeInternals:k,multiSelectionActive:D,nodesDraggable:W,unselectNodesAndEdges:H,onNodeDragStart:B,onSelectionDragStart:y}=a.getState();h.current=!0;const A=i?B:Xn(y);(!s||!o)&&!D&&i&&((T=k.get(i))!=null&&T.selected||H()),i&&o&&s&&hr({id:i,store:a,nodeRef:t});const E=b(C);if(f.current=E,u.current=uh(k,W,E,i),A&&u.current){const[P,S]=Yn({nodeId:i,dragItems:u.current,nodeInternals:k});A(C.sourceEvent,P,S)}};if(e)w.on(".drag",null);else{const C=wl().on("start",k=>{const{domNode:D,nodeDragThreshold:W}=a.getState();W===0&&M(k),v.current=!1;const H=b(k);f.current=H,p.current=(D==null?void 0:D.getBoundingClientRect())||null,x.current=Wt(k.sourceEvent,p.current)}).on("drag",k=>{var B,y;const D=b(k),{autoPanOnNodeDrag:W,nodeDragThreshold:H}=a.getState();if(k.sourceEvent.type==="touchmove"&&k.sourceEvent.touches.length>1&&(v.current=!0),!v.current){if(!g.current&&h.current&&W&&(g.current=!0,N()),!h.current){const A=D.xSnapped-(((B=f==null?void 0:f.current)==null?void 0:B.x)??0),E=D.ySnapped-(((y=f==null?void 0:f.current)==null?void 0:y.y)??0);Math.sqrt(A*A+E*E)>H&&M(k)}(f.current.x!==D.xSnapped||f.current.y!==D.ySnapped)&&u.current&&h.current&&(m.current=k.sourceEvent,x.current=Wt(k.sourceEvent,p.current),_(D))}}).on("end",k=>{if(!(!h.current||v.current)&&(l(!1),g.current=!1,h.current=!1,cancelAnimationFrame(d.current),u.current)){const{updateNodePositions:D,nodeInternals:W,onNodeDragStop:H,onSelectionDragStop:B}=a.getState(),y=i?H:Xn(B);if(D(u.current,!1,!1),y){const[A,E]=Yn({nodeId:i,dragItems:u.current,nodeInternals:W});y(k.sourceEvent,A,E)}}}).filter(k=>{const D=k.target;return!k.button&&(!n||!Si(D,`.${n}`,t))&&(!r||Si(D,r,t))});return w.call(C),()=>{w.on(".drag",null)}}}},[t,e,n,r,o,a,i,s,b]),c}function ts(){const t=nt();return $.useCallback(n=>{const{nodeInternals:r,nodeExtent:i,updateNodePositions:o,getNodes:s,snapToGrid:a,snapGrid:c,onError:l,nodesDraggable:u}=t.getState(),f=s().filter(v=>v.selected&&(v.draggable||u&&typeof v.draggable>"u")),d=a?c[0]:5,p=a?c[1]:5,x=n.isShiftPressed?4:1,m=n.x*d*x,g=n.y*p*x,h=f.map(v=>{if(v.positionAbsolute){const b={x:v.positionAbsolute.x+m,y:v.positionAbsolute.y+g};a&&(b.x=c[0]*Math.round(b.x/c[0]),b.y=c[1]*Math.round(b.y/c[1]));const{positionAbsolute:w,position:_}=Qo(v,b,r,i,void 0,l);v.position=_,v.positionAbsolute=w}return v});o(h,!0,!1)},[])}const he={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Ce=t=>{const e=({id:n,type:r,data:i,xPos:o,yPos:s,xPosOrigin:a,yPosOrigin:c,selected:l,onClick:u,onMouseEnter:f,onMouseMove:d,onMouseLeave:p,onContextMenu:x,onDoubleClick:m,style:g,className:h,isDraggable:v,isSelectable:b,isConnectable:w,isFocusable:_,selectNodesOnDrag:N,sourcePosition:M,targetPosition:C,hidden:k,resizeObserver:D,dragHandle:W,zIndex:H,isParent:B,noDragClassName:y,noPanClassName:A,initialized:E,disableKeyboardA11y:T,ariaLabel:P,rfId:S,hasHandleBounds:I})=>{const F=nt(),z=$.useRef(null),L=$.useRef(null),O=$.useRef(M),X=$.useRef(C),G=$.useRef(r),q=b||v||u||f||d||p,Z=ts(),Q=$e(n,F.getState,f),K=$e(n,F.getState,d),pt=$e(n,F.getState,p),lt=$e(n,F.getState,x),gt=$e(n,F.getState,m),ut=J=>{const{nodeDragThreshold:Y}=F.getState();if(b&&(!N||!v||Y>0)&&hr({id:n,store:F,nodeRef:z}),u){const st=F.getState().nodeInternals.get(n);st&&u(J,{...st})}},et=J=>{if(!ar(J)&&!T)if(_o.includes(J.key)&&b){const Y=J.key==="Escape";hr({id:n,store:F,unselect:Y,nodeRef:z})}else v&&l&&Object.prototype.hasOwnProperty.call(he,J.key)&&(F.setState({ariaLiveMessage:`Moved selected node ${J.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~o}, y: ${~~s}`}),Z({x:he[J.key].x,y:he[J.key].y,isShiftPressed:J.shiftKey}))};$.useEffect(()=>()=>{L.current&&(D==null||D.unobserve(L.current),L.current=null)},[]),$.useEffect(()=>{if(z.current&&!k){const J=z.current;(!E||!I||L.current!==J)&&(L.current&&(D==null||D.unobserve(L.current)),D==null||D.observe(J),L.current=J)}},[k,E,I]),$.useEffect(()=>{const J=G.current!==r,Y=O.current!==M,st=X.current!==C;z.current&&(J||Y||st)&&(J&&(G.current=r),Y&&(O.current=M),st&&(X.current=C),F.getState().updateNodeDimensions([{id:n,nodeElement:z.current,forceUpdate:!0}]))},[n,r,M,C]);const xt=jo({nodeRef:z,disabled:k||!v,noDragClassName:y,handleSelector:W,nodeId:n,isSelectable:b,selectNodesOnDrag:N});return k?null:R.createElement("div",{className:ht(["react-flow__node",`react-flow__node-${r}`,{[A]:v},h,{selected:l,selectable:b,parent:B,dragging:xt}]),ref:z,style:{zIndex:H,transform:`translate(${a}px,${c}px)`,pointerEvents:q?"all":"none",visibility:E?"visible":"hidden",...g},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:Q,onMouseMove:K,onMouseLeave:pt,onContextMenu:lt,onClick:ut,onDoubleClick:gt,onKeyDown:_?et:void 0,tabIndex:_?0:void 0,role:_?"button":void 0,"aria-describedby":T?void 0:`${Lo}-${S}`,"aria-label":P},R.createElement(Af,{value:n},R.createElement(t,{id:n,data:i,type:r,xPos:o,yPos:s,selected:l,isConnectable:w,sourcePosition:M,targetPosition:C,dragging:xt,dragHandle:W,zIndex:H})))};return e.displayName="NodeWrapper",$.memo(e)};const dh=t=>{const e=t.getNodes().filter(n=>n.selected);return{...$r(e,t.nodeOrigin),transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`,userSelectionActive:t.userSelectionActive}};function ph({onSelectionContextMenu:t,noPanClassName:e,disableKeyboardA11y:n}){const r=nt(),{width:i,height:o,x:s,y:a,transformString:c,userSelectionActive:l}=tt(dh,it),u=ts(),f=$.useRef(null);if($.useEffect(()=>{var x;n||(x=f.current)==null||x.focus({preventScroll:!0})},[n]),jo({nodeRef:f}),l||!i||!o)return null;const d=t?x=>{const m=r.getState().getNodes().filter(g=>g.selected);t(x,m)}:void 0,p=x=>{Object.prototype.hasOwnProperty.call(he,x.key)&&u({x:he[x.key].x,y:he[x.key].y,isShiftPressed:x.shiftKey})};return R.createElement("div",{className:ht(["react-flow__nodesselection","react-flow__container",e]),style:{transform:c}},R.createElement("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:i,height:o,top:a,left:s}}))}var gh=$.memo(ph);const mh=t=>t.nodesSelectionActive,es=({children:t,onPaneClick:e,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,deleteKeyCode:a,onMove:c,onMoveStart:l,onMoveEnd:u,selectionKeyCode:f,selectionOnDrag:d,selectionMode:p,onSelectionStart:x,onSelectionEnd:m,multiSelectionKeyCode:g,panActivationKeyCode:h,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:_,panOnScroll:N,panOnScrollSpeed:M,panOnScrollMode:C,zoomOnDoubleClick:k,panOnDrag:D,defaultViewport:W,translateExtent:H,minZoom:B,maxZoom:y,preventScrolling:A,onSelectionContextMenu:E,noWheelClassName:T,noPanClassName:P,disableKeyboardA11y:S})=>{const I=tt(mh),F=Be(f),z=Be(h),L=z||D,O=z||N,X=F||d&&L!==!0;return eh({deleteKeyCode:a,multiSelectionKeyCode:g}),R.createElement(oh,{onMove:c,onMoveStart:l,onMoveEnd:u,onPaneContextMenu:o,elementsSelectable:b,zoomOnScroll:w,zoomOnPinch:_,panOnScroll:O,panOnScrollSpeed:M,panOnScrollMode:C,zoomOnDoubleClick:k,panOnDrag:!F&&L,defaultViewport:W,translateExtent:H,minZoom:B,maxZoom:y,zoomActivationKeyCode:v,preventScrolling:A,noWheelClassName:T,noPanClassName:P},R.createElement(Ko,{onSelectionStart:x,onSelectionEnd:m,onPaneClick:e,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,panOnDrag:L,isSelecting:!!X,selectionMode:p},t,I&&R.createElement(gh,{onSelectionContextMenu:E,noPanClassName:P,disableKeyboardA11y:S})))};es.displayName="FlowRenderer";var yh=$.memo(es);function vh(t){return tt($.useCallback(n=>t?$o(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[t]))}function wh(t){const e={input:Ce(t.input||Wo),default:Ce(t.default||fr),output:Ce(t.output||Ho),group:Ce(t.group||Ir)},n={},r=Object.keys(t).filter(i=>!["input","default","output","group"].includes(i)).reduce((i,o)=>(i[o]=Ce(t[o]||fr),i),n);return{...e,...r}}const xh=({x:t,y:e,width:n,height:r,origin:i})=>!n||!r?{x:t,y:e}:i[0]<0||i[1]<0||i[0]>1||i[1]>1?{x:t,y:e}:{x:t-n*i[0],y:e-r*i[1]},bh=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions,onError:t.onError}),ns=t=>{const{nodesDraggable:e,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,updateNodeDimensions:o,onError:s}=tt(bh,it),a=vh(t.onlyRenderVisibleElements),c=$.useRef(),l=$.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const u=new ResizeObserver(f=>{const d=f.map(p=>({id:p.target.getAttribute("data-id"),nodeElement:p.target,forceUpdate:!0}));o(d)});return c.current=u,u},[]);return $.useEffect(()=>()=>{var u;(u=c==null?void 0:c.current)==null||u.disconnect()},[]),R.createElement("div",{className:"react-flow__nodes",style:Tr},a.map(u=>{var _,N,M;let f=u.type||"default";t.nodeTypes[f]||(s==null||s("003",Ct.error003(f)),f="default");const d=t.nodeTypes[f]||t.nodeTypes.default,p=!!(u.draggable||e&&typeof u.draggable>"u"),x=!!(u.selectable||i&&typeof u.selectable>"u"),m=!!(u.connectable||n&&typeof u.connectable>"u"),g=!!(u.focusable||r&&typeof u.focusable>"u"),h=t.nodeExtent?Sr(u.positionAbsolute,t.nodeExtent):u.positionAbsolute,v=(h==null?void 0:h.x)??0,b=(h==null?void 0:h.y)??0,w=xh({x:v,y:b,width:u.width??0,height:u.height??0,origin:t.nodeOrigin});return R.createElement(d,{key:u.id,id:u.id,className:u.className,style:u.style,type:f,data:u.data,sourcePosition:u.sourcePosition||V.Bottom,targetPosition:u.targetPosition||V.Top,hidden:u.hidden,xPos:v,yPos:b,xPosOrigin:w.x,yPosOrigin:w.y,selectNodesOnDrag:t.selectNodesOnDrag,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,selected:!!u.selected,isDraggable:p,isSelectable:x,isConnectable:m,isFocusable:g,resizeObserver:l,dragHandle:u.dragHandle,zIndex:((_=u[j])==null?void 0:_.z)??0,isParent:!!((N=u[j])!=null&&N.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!u.width&&!!u.height,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,ariaLabel:u.ariaLabel,hasHandleBounds:!!((M=u[j])!=null&&M.handleBounds)})}))};ns.displayName="NodeRenderer";var _h=$.memo(ns);const Sh=(t,e,n)=>n===V.Left?t-e:n===V.Right?t+e:t,Eh=(t,e,n)=>n===V.Top?t-e:n===V.Bottom?t+e:t,Ni="react-flow__edgeupdater",Ai=({position:t,centerX:e,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:o,onMouseOut:s,type:a})=>R.createElement("circle",{onMouseDown:i,onMouseEnter:o,onMouseOut:s,className:ht([Ni,`${Ni}-${a}`]),cx:Sh(e,r,t),cy:Eh(n,r,t),r,stroke:"transparent",fill:"transparent"}),Nh=()=>!0;var se=t=>{const e=({id:n,className:r,type:i,data:o,onClick:s,onEdgeDoubleClick:a,selected:c,animated:l,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:m,style:g,source:h,target:v,sourceX:b,sourceY:w,targetX:_,targetY:N,sourcePosition:M,targetPosition:C,elementsSelectable:k,hidden:D,sourceHandleId:W,targetHandleId:H,onContextMenu:B,onMouseEnter:y,onMouseMove:A,onMouseLeave:E,reconnectRadius:T,onReconnect:P,onReconnectStart:S,onReconnectEnd:I,markerEnd:F,markerStart:z,rfId:L,ariaLabel:O,isFocusable:X,isReconnectable:G,pathOptions:q,interactionWidth:Z,disableKeyboardA11y:Q})=>{const K=$.useRef(null),[pt,lt]=$.useState(!1),[gt,ut]=$.useState(!1),et=nt(),xt=$.useMemo(()=>`url('#${lr(z,L)}')`,[z,L]),J=$.useMemo(()=>`url('#${lr(F,L)}')`,[F,L]);if(D)return null;const Y=rt=>{var bt;const{edges:mt,addSelectedEdges:Lt,unselectNodesAndEdges:Vt,multiSelectionActive:Yt}=et.getState(),At=mt.find(Ee=>Ee.id===n);At&&(k&&(et.setState({nodesSelectionActive:!1}),At.selected&&Yt?(Vt({nodes:[],edges:[At]}),(bt=K.current)==null||bt.blur()):Lt([n])),s&&s(rt,At))},st=ke(n,et.getState,a),Bt=ke(n,et.getState,B),_e=ke(n,et.getState,y),Qt=ke(n,et.getState,A),jt=ke(n,et.getState,E),Nt=(rt,mt)=>{if(rt.button!==0)return;const{edges:Lt,isValidConnection:Vt}=et.getState(),Yt=mt?v:h,At=(mt?H:W)||null,bt=mt?"target":"source",Ee=Vt||Nh,Dn=mt,Ne=Lt.find(Xt=>Xt.id===n);ut(!0),S==null||S(rt,Ne,bt);const Pn=Xt=>{ut(!1),I==null||I(Xt,Ne,bt)};Po({event:rt,handleId:At,nodeId:Yt,onConnect:Xt=>P==null?void 0:P(Ne,Xt),isTarget:Dn,getState:et.getState,setState:et.setState,isValidConnection:Ee,edgeUpdaterType:bt,onReconnectEnd:Pn})},te=rt=>Nt(rt,!0),Ht=rt=>Nt(rt,!1),Ot=()=>lt(!0),ee=()=>lt(!1),ne=!k&&!s,Se=rt=>{var mt;if(!Q&&_o.includes(rt.key)&&k){const{unselectNodesAndEdges:Lt,addSelectedEdges:Vt,edges:Yt}=et.getState();rt.key==="Escape"?((mt=K.current)==null||mt.blur(),Lt({edges:[Yt.find(bt=>bt.id===n)]})):Vt([n])}};return R.createElement("g",{className:ht(["react-flow__edge",`react-flow__edge-${i}`,r,{selected:c,animated:l,inactive:ne,updating:pt}]),onClick:Y,onDoubleClick:st,onContextMenu:Bt,onMouseEnter:_e,onMouseMove:Qt,onMouseLeave:jt,onKeyDown:X?Se:void 0,tabIndex:X?0:void 0,role:X?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":O===null?void 0:O||`Edge from ${h} to ${v}`,"aria-describedby":X?`${Vo}-${L}`:void 0,ref:K},!gt&&R.createElement(t,{id:n,source:h,target:v,selected:c,animated:l,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:m,data:o,style:g,sourceX:b,sourceY:w,targetX:_,targetY:N,sourcePosition:M,targetPosition:C,sourceHandleId:W,targetHandleId:H,markerStart:xt,markerEnd:J,pathOptions:q,interactionWidth:Z}),G&&R.createElement(R.Fragment,null,(G==="source"||G===!0)&&R.createElement(Ai,{position:M,centerX:b,centerY:w,radius:T,onMouseDown:te,onMouseEnter:Ot,onMouseOut:ee,type:"source"}),(G==="target"||G===!0)&&R.createElement(Ai,{position:C,centerX:_,centerY:N,radius:T,onMouseDown:Ht,onMouseEnter:Ot,onMouseOut:ee,type:"target"})))};return e.displayName="EdgeWrapper",$.memo(e)};function Ah(t){const e={default:se(t.default||vn),straight:se(t.bezier||Mr),step:se(t.step||Ar),smoothstep:se(t.step||Cn),simplebezier:se(t.simplebezier||Nr)},n={},r=Object.keys(t).filter(i=>!["default","bezier"].includes(i)).reduce((i,o)=>(i[o]=se(t[o]||vn),i),n);return{...e,...r}}function Mi(t,e,n=null){const r=((n==null?void 0:n.x)||0)+e.x,i=((n==null?void 0:n.y)||0)+e.y,o=(n==null?void 0:n.width)||e.width,s=(n==null?void 0:n.height)||e.height;switch(t){case V.Top:return{x:r+o/2,y:i};case V.Right:return{x:r+o,y:i+s/2};case V.Bottom:return{x:r+o/2,y:i+s};case V.Left:return{x:r,y:i+s/2}}}function ki(t,e){return t?t.length===1||!e?t[0]:e&&t.find(n=>n.id===e)||null:null}const Mh=(t,e,n,r,i,o)=>{const s=Mi(n,t,e),a=Mi(o,r,i);return{sourceX:s.x,sourceY:s.y,targetX:a.x,targetY:a.y}};function kh({sourcePos:t,targetPos:e,sourceWidth:n,sourceHeight:r,targetWidth:i,targetHeight:o,width:s,height:a,transform:c}){const l={x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x+n,e.x+i),y2:Math.max(t.y+r,e.y+o)};l.x===l.x2&&(l.x2+=1),l.y===l.y2&&(l.y2+=1);const u=Er({x:(0-c[0])/c[2],y:(0-c[1])/c[2],width:s/c[2],height:a/c[2]}),f=Math.max(0,Math.min(u.x2,l.x2)-Math.max(u.x,l.x)),d=Math.max(0,Math.min(u.y2,l.y2)-Math.max(u.y,l.y));return Math.ceil(f*d)>0}function $i(t){var r,i,o,s,a;const e=((r=t==null?void 0:t[j])==null?void 0:r.handleBounds)||null,n=e&&(t==null?void 0:t.width)&&(t==null?void 0:t.height)&&typeof((i=t==null?void 0:t.positionAbsolute)==null?void 0:i.x)<"u"&&typeof((o=t==null?void 0:t.positionAbsolute)==null?void 0:o.y)<"u";return[{x:((s=t==null?void 0:t.positionAbsolute)==null?void 0:s.x)||0,y:((a=t==null?void 0:t.positionAbsolute)==null?void 0:a.y)||0,width:(t==null?void 0:t.width)||0,height:(t==null?void 0:t.height)||0},e,!!n]}const $h=[{level:0,isMaxLevel:!0,edges:[]}];function Ch(t,e,n=!1){let r=-1;const i=t.reduce((s,a)=>{var u,f;const c=ft(a.zIndex);let l=c?a.zIndex:0;if(n){const d=e.get(a.target),p=e.get(a.source),x=a.selected||(d==null?void 0:d.selected)||(p==null?void 0:p.selected),m=Math.max(((u=p==null?void 0:p[j])==null?void 0:u.z)||0,((f=d==null?void 0:d[j])==null?void 0:f.z)||0,1e3);l=(c?a.zIndex:0)+(x?m:0)}return s[l]?s[l].push(a):s[l]=[a],r=l>r?l:r,s},{}),o=Object.entries(i).map(([s,a])=>{const c=+s;return{edges:a,level:c,isMaxLevel:c===r}});return o.length===0?$h:o}function Ih(t,e,n){const r=tt($.useCallback(i=>t?i.edges.filter(o=>{const s=e.get(o.source),a=e.get(o.target);return(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&kh({sourcePos:s.positionAbsolute||{x:0,y:0},targetPos:a.positionAbsolute||{x:0,y:0},sourceWidth:s.width,sourceHeight:s.height,targetWidth:a.width,targetHeight:a.height,width:i.width,height:i.height,transform:i.transform})}):i.edges,[t,e]));return Ch(r,e,n)}const Th=({color:t="none",strokeWidth:e=1})=>R.createElement("polyline",{style:{stroke:t,strokeWidth:e},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),Dh=({color:t="none",strokeWidth:e=1})=>R.createElement("polyline",{style:{stroke:t,fill:t,strokeWidth:e},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),Ci={[yn.Arrow]:Th,[yn.ArrowClosed]:Dh};function Ph(t){const e=nt();return $.useMemo(()=>{var i,o;return Object.prototype.hasOwnProperty.call(Ci,t)?Ci[t]:((o=(i=e.getState()).onError)==null||o.call(i,"009",Ct.error009(t)),null)},[t])}const Fh=({id:t,type:e,color:n,width:r=12.5,height:i=12.5,markerUnits:o="strokeWidth",strokeWidth:s,orient:a="auto-start-reverse"})=>{const c=Ph(e);return c?R.createElement("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:a,refX:"0",refY:"0"},R.createElement(c,{color:n,strokeWidth:s})):null},zh=({defaultColor:t,rfId:e})=>n=>{const r=[];return n.edges.reduce((i,o)=>([o.markerStart,o.markerEnd].forEach(s=>{if(s&&typeof s=="object"){const a=lr(s,e);r.includes(a)||(i.push({id:a,color:s.color||t,...s}),r.push(a))}}),i),[]).sort((i,o)=>i.id.localeCompare(o.id))},rs=({defaultColor:t,rfId:e})=>{const n=tt($.useCallback(zh({defaultColor:t,rfId:e}),[t,e]),(r,i)=>!(r.length!==i.length||r.some((o,s)=>o.id!==i[s].id)));return R.createElement("defs",null,n.map(r=>R.createElement(Fh,{id:r.id,key:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient})))};rs.displayName="MarkerDefinitions";var Rh=$.memo(rs);const Wh=t=>({nodesConnectable:t.nodesConnectable,edgesFocusable:t.edgesFocusable,edgesUpdatable:t.edgesUpdatable,elementsSelectable:t.elementsSelectable,width:t.width,height:t.height,connectionMode:t.connectionMode,nodeInternals:t.nodeInternals,onError:t.onError}),is=({defaultMarkerColor:t,onlyRenderVisibleElements:e,elevateEdgesOnSelect:n,rfId:r,edgeTypes:i,noPanClassName:o,onEdgeContextMenu:s,onEdgeMouseEnter:a,onEdgeMouseMove:c,onEdgeMouseLeave:l,onEdgeClick:u,onEdgeDoubleClick:f,onReconnect:d,onReconnectStart:p,onReconnectEnd:x,reconnectRadius:m,children:g,disableKeyboardA11y:h})=>{const{edgesFocusable:v,edgesUpdatable:b,elementsSelectable:w,width:_,height:N,connectionMode:M,nodeInternals:C,onError:k}=tt(Wh,it),D=Ih(e,C,n);return _?R.createElement(R.Fragment,null,D.map(({level:W,edges:H,isMaxLevel:B})=>R.createElement("svg",{key:W,style:{zIndex:W},width:_,height:N,className:"react-flow__edges react-flow__container"},B&&R.createElement(Rh,{defaultColor:t,rfId:r}),R.createElement("g",null,H.map(y=>{const[A,E,T]=$i(C.get(y.source)),[P,S,I]=$i(C.get(y.target));if(!T||!I)return null;let F=y.type||"default";i[F]||(k==null||k("011",Ct.error011(F)),F="default");const z=i[F]||i.default,L=M===Jt.Strict?S.target:(S.target??[]).concat(S.source??[]),O=ki(E.source,y.sourceHandle),X=ki(L,y.targetHandle),G=(O==null?void 0:O.position)||V.Bottom,q=(X==null?void 0:X.position)||V.Top,Z=!!(y.focusable||v&&typeof y.focusable>"u"),Q=y.reconnectable||y.updatable,K=typeof d<"u"&&(Q||b&&typeof Q>"u");if(!O||!X)return k==null||k("008",Ct.error008(O,y)),null;const{sourceX:pt,sourceY:lt,targetX:gt,targetY:ut}=Mh(A,O,G,P,X,q);return R.createElement(z,{key:y.id,id:y.id,className:ht([y.className,o]),type:F,data:y.data,selected:!!y.selected,animated:!!y.animated,hidden:!!y.hidden,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,style:y.style,source:y.source,target:y.target,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerEnd:y.markerEnd,markerStart:y.markerStart,sourceX:pt,sourceY:lt,targetX:gt,targetY:ut,sourcePosition:G,targetPosition:q,elementsSelectable:w,onContextMenu:s,onMouseEnter:a,onMouseMove:c,onMouseLeave:l,onClick:u,onEdgeDoubleClick:f,onReconnect:d,onReconnectStart:p,onReconnectEnd:x,reconnectRadius:m,rfId:r,ariaLabel:y.ariaLabel,isFocusable:Z,isReconnectable:K,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth,disableKeyboardA11y:h})})))),g):null};is.displayName="EdgeRenderer";var Bh=$.memo(is);const Hh=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function Oh({children:t}){const e=tt(Hh);return R.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:e}},t)}function Lh(t){const e=Go(),n=$.useRef(!1);$.useEffect(()=>{!n.current&&e.viewportInitialized&&t&&(setTimeout(()=>t(e),1),n.current=!0)},[t,e.viewportInitialized])}const Vh={[V.Left]:V.Right,[V.Right]:V.Left,[V.Top]:V.Bottom,[V.Bottom]:V.Top},os=({nodeId:t,handleType:e,style:n,type:r=zt.Bezier,CustomComponent:i,connectionStatus:o})=>{var N,M,C;const{fromNode:s,handleId:a,toX:c,toY:l,connectionMode:u}=tt($.useCallback(k=>({fromNode:k.nodeInternals.get(t),handleId:k.connectionHandleId,toX:(k.connectionPosition.x-k.transform[0])/k.transform[2],toY:(k.connectionPosition.y-k.transform[1])/k.transform[2],connectionMode:k.connectionMode}),[t]),it),f=(N=s==null?void 0:s[j])==null?void 0:N.handleBounds;let d=f==null?void 0:f[e];if(u===Jt.Loose&&(d=d||(f==null?void 0:f[e==="source"?"target":"source"])),!s||!d)return null;const p=a?d.find(k=>k.id===a):d[0],x=p?p.x+p.width/2:(s.width??0)/2,m=p?p.y+p.height/2:s.height??0,g=(((M=s.positionAbsolute)==null?void 0:M.x)??0)+x,h=(((C=s.positionAbsolute)==null?void 0:C.y)??0)+m,v=p==null?void 0:p.position,b=v?Vh[v]:null;if(!v||!b)return null;if(i)return R.createElement(i,{connectionLineType:r,connectionLineStyle:n,fromNode:s,fromHandle:p,fromX:g,fromY:h,toX:c,toY:l,fromPosition:v,toPosition:b,connectionStatus:o});let w="";const _={sourceX:g,sourceY:h,sourcePosition:v,targetX:c,targetY:l,targetPosition:b};return r===zt.Bezier?[w]=Mo(_):r===zt.Step?[w]=cr({..._,borderRadius:0}):r===zt.SmoothStep?[w]=cr(_):r===zt.SimpleBezier?[w]=Ao(_):w=`M${g},${h} ${c},${l}`,R.createElement("path",{d:w,fill:"none",className:"react-flow__connection-path",style:n})};os.displayName="ConnectionLine";const Yh=t=>({nodeId:t.connectionNodeId,handleType:t.connectionHandleType,nodesConnectable:t.nodesConnectable,connectionStatus:t.connectionStatus,width:t.width,height:t.height});function Xh({containerStyle:t,style:e,type:n,component:r}){const{nodeId:i,handleType:o,nodesConnectable:s,width:a,height:c,connectionStatus:l}=tt(Yh,it);return!(i&&o&&a&&s)?null:R.createElement("svg",{style:t,width:a,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},R.createElement("g",{className:ht(["react-flow__connection",l])},R.createElement(os,{nodeId:i,handleType:o,style:e,type:n,CustomComponent:r,connectionStatus:l})))}function Ii(t,e){return $.useRef(null),nt(),$.useMemo(()=>e(t),[t])}const ss=({nodeTypes:t,edgeTypes:e,onMove:n,onMoveStart:r,onMoveEnd:i,onInit:o,onNodeClick:s,onEdgeClick:a,onNodeDoubleClick:c,onEdgeDoubleClick:l,onNodeMouseEnter:u,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:p,onSelectionContextMenu:x,onSelectionStart:m,onSelectionEnd:g,connectionLineType:h,connectionLineStyle:v,connectionLineComponent:b,connectionLineContainerStyle:w,selectionKeyCode:_,selectionOnDrag:N,selectionMode:M,multiSelectionKeyCode:C,panActivationKeyCode:k,zoomActivationKeyCode:D,deleteKeyCode:W,onlyRenderVisibleElements:H,elementsSelectable:B,selectNodesOnDrag:y,defaultViewport:A,translateExtent:E,minZoom:T,maxZoom:P,preventScrolling:S,defaultMarkerColor:I,zoomOnScroll:F,zoomOnPinch:z,panOnScroll:L,panOnScrollSpeed:O,panOnScrollMode:X,zoomOnDoubleClick:G,panOnDrag:q,onPaneClick:Z,onPaneMouseEnter:Q,onPaneMouseMove:K,onPaneMouseLeave:pt,onPaneScroll:lt,onPaneContextMenu:gt,onEdgeContextMenu:ut,onEdgeMouseEnter:et,onEdgeMouseMove:xt,onEdgeMouseLeave:J,onReconnect:Y,onReconnectStart:st,onReconnectEnd:Bt,reconnectRadius:_e,noDragClassName:Qt,noWheelClassName:jt,noPanClassName:Nt,elevateEdgesOnSelect:te,disableKeyboardA11y:Ht,nodeOrigin:Ot,nodeExtent:ee,rfId:ne})=>{const Se=Ii(t,wh),rt=Ii(e,Ah);return Lh(o),R.createElement(yh,{onPaneClick:Z,onPaneMouseEnter:Q,onPaneMouseMove:K,onPaneMouseLeave:pt,onPaneContextMenu:gt,onPaneScroll:lt,deleteKeyCode:W,selectionKeyCode:_,selectionOnDrag:N,selectionMode:M,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:C,panActivationKeyCode:k,zoomActivationKeyCode:D,elementsSelectable:B,onMove:n,onMoveStart:r,onMoveEnd:i,zoomOnScroll:F,zoomOnPinch:z,zoomOnDoubleClick:G,panOnScroll:L,panOnScrollSpeed:O,panOnScrollMode:X,panOnDrag:q,defaultViewport:A,translateExtent:E,minZoom:T,maxZoom:P,onSelectionContextMenu:x,preventScrolling:S,noDragClassName:Qt,noWheelClassName:jt,noPanClassName:Nt,disableKeyboardA11y:Ht},R.createElement(Oh,null,R.createElement(Bh,{edgeTypes:rt,onEdgeClick:a,onEdgeDoubleClick:l,onlyRenderVisibleElements:H,onEdgeContextMenu:ut,onEdgeMouseEnter:et,onEdgeMouseMove:xt,onEdgeMouseLeave:J,onReconnect:Y,onReconnectStart:st,onReconnectEnd:Bt,reconnectRadius:_e,defaultMarkerColor:I,noPanClassName:Nt,elevateEdgesOnSelect:!!te,disableKeyboardA11y:Ht,rfId:ne},R.createElement(Xh,{style:v,type:h,component:b,containerStyle:w})),R.createElement("div",{className:"react-flow__edgelabel-renderer"}),R.createElement(_h,{nodeTypes:Se,onNodeClick:s,onNodeDoubleClick:c,onNodeMouseEnter:u,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:p,selectNodesOnDrag:y,onlyRenderVisibleElements:H,noPanClassName:Nt,noDragClassName:Qt,disableKeyboardA11y:Ht,nodeOrigin:Ot,nodeExtent:ee,rfId:ne})))};ss.displayName="GraphView";var Uh=$.memo(ss);const dr=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Tt={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:dr,nodeExtent:dr,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Jt.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:xf,isValidConnection:void 0},Gh=()=>Ia((t,e)=>({...Tt,setNodes:n=>{const{nodeInternals:r,nodeOrigin:i,elevateNodesOnSelect:o}=e();t({nodeInternals:Ln(n,r,i,o)})},getNodes:()=>Array.from(e().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=e();t({edges:n.map(i=>({...r,...i}))})},setDefaultNodesAndEdges:(n,r)=>{const i=typeof n<"u",o=typeof r<"u",s=i?Ln(n,new Map,e().nodeOrigin,e().elevateNodesOnSelect):new Map;t({nodeInternals:s,edges:o?r:[],hasDefaultNodes:i,hasDefaultEdges:o})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:i,fitViewOnInit:o,fitViewOnInitDone:s,fitViewOnInitOptions:a,domNode:c,nodeOrigin:l}=e(),u=c==null?void 0:c.querySelector(".react-flow__viewport");if(!u)return;const f=window.getComputedStyle(u),{m22:d}=new window.DOMMatrixReadOnly(f.transform),p=n.reduce((m,g)=>{const h=i.get(g.id);if(h!=null&&h.hidden)i.set(h.id,{...h,[j]:{...h[j],handleBounds:void 0}});else if(h){const v=_r(g.nodeElement);!!(v.width&&v.height&&(h.width!==v.width||h.height!==v.height||g.forceUpdate))&&(i.set(h.id,{...h,[j]:{...h[j],handleBounds:{source:Ei(".source",g.nodeElement,d,l),target:Ei(".target",g.nodeElement,d,l)}},...v}),m.push({id:h.id,type:"dimensions",dimensions:v}))}return m},[]);Xo(i,l);const x=s||o&&!s&&Uo(e,{initial:!0,...a});t({nodeInternals:new Map(i),fitViewOnInitDone:x}),(p==null?void 0:p.length)>0&&(r==null||r(p))},updateNodePositions:(n,r=!0,i=!1)=>{const{triggerNodeChanges:o}=e(),s=n.map(a=>{const c={id:a.id,type:"position",dragging:i};return r&&(c.positionAbsolute=a.positionAbsolute,c.position=a.position),c});o(s)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:i,hasDefaultNodes:o,nodeOrigin:s,getNodes:a,elevateNodesOnSelect:c}=e();if(n!=null&&n.length){if(o){const l=Zo(n,a()),u=Ln(l,i,s,c);t({nodeInternals:u})}r==null||r(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:i,getNodes:o}=e();let s,a=null;r?s=n.map(c=>Pt(c,!0)):(s=ce(o(),n),a=ce(i,[])),Je({changedNodes:s,changedEdges:a,get:e,set:t})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:i,getNodes:o}=e();let s,a=null;r?s=n.map(c=>Pt(c,!0)):(s=ce(i,n),a=ce(o(),[])),Je({changedNodes:a,changedEdges:s,get:e,set:t})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:i,getNodes:o}=e(),s=n||o(),a=r||i,c=s.map(u=>(u.selected=!1,Pt(u.id,!1))),l=a.map(u=>Pt(u.id,!1));Je({changedNodes:c,changedEdges:l,get:e,set:t})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:i}=e();r==null||r.scaleExtent([n,i]),t({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:i}=e();r==null||r.scaleExtent([i,n]),t({maxZoom:n})},setTranslateExtent:n=>{var r;(r=e().d3Zoom)==null||r.translateExtent(n),t({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=e(),o=r().filter(a=>a.selected).map(a=>Pt(a.id,!1)),s=n.filter(a=>a.selected).map(a=>Pt(a.id,!1));Je({changedNodes:o,changedEdges:s,get:e,set:t})},setNodeExtent:n=>{const{nodeInternals:r}=e();r.forEach(i=>{i.positionAbsolute=Sr(i.position,n)}),t({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:i,height:o,d3Zoom:s,d3Selection:a,translateExtent:c}=e();if(!s||!a||!n.x&&!n.y)return!1;const l=Rt.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),u=[[0,0],[i,o]],f=s==null?void 0:s.constrain()(l,u,c);return s.transform(a,f),r[0]!==f.x||r[1]!==f.y||r[2]!==f.k},cancelConnection:()=>t({connectionNodeId:Tt.connectionNodeId,connectionHandleId:Tt.connectionHandleId,connectionHandleType:Tt.connectionHandleType,connectionStatus:Tt.connectionStatus,connectionStartHandle:Tt.connectionStartHandle,connectionEndHandle:Tt.connectionEndHandle}),reset:()=>t({...Tt})}),Object.is),as=({children:t})=>{const e=$.useRef(null);return e.current||(e.current=Gh()),R.createElement(ff,{value:e.current},t)};as.displayName="ReactFlowProvider";const cs=({children:t})=>$.useContext($n)?R.createElement(R.Fragment,null,t):R.createElement(as,null,t);cs.displayName="ReactFlowWrapper";const qh={input:Wo,default:fr,output:Ho,group:Ir},Zh={default:vn,straight:Mr,step:Ar,smoothstep:Cn,simplebezier:Nr},Kh=[0,0],Jh=[15,15],Qh={x:0,y:0,zoom:1},jh={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},td=$.forwardRef(({nodes:t,edges:e,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:o=qh,edgeTypes:s=Zh,onNodeClick:a,onEdgeClick:c,onInit:l,onMove:u,onMoveStart:f,onMoveEnd:d,onConnect:p,onConnectStart:x,onConnectEnd:m,onClickConnectStart:g,onClickConnectEnd:h,onNodeMouseEnter:v,onNodeMouseMove:b,onNodeMouseLeave:w,onNodeContextMenu:_,onNodeDoubleClick:N,onNodeDragStart:M,onNodeDrag:C,onNodeDragStop:k,onNodesDelete:D,onEdgesDelete:W,onSelectionChange:H,onSelectionDragStart:B,onSelectionDrag:y,onSelectionDragStop:A,onSelectionContextMenu:E,onSelectionStart:T,onSelectionEnd:P,connectionMode:S=Jt.Strict,connectionLineType:I=zt.Bezier,connectionLineStyle:F,connectionLineComponent:z,connectionLineContainerStyle:L,deleteKeyCode:O="Backspace",selectionKeyCode:X="Shift",selectionOnDrag:G=!1,selectionMode:q=We.Full,panActivationKeyCode:Z="Space",multiSelectionKeyCode:Q=mn()?"Meta":"Control",zoomActivationKeyCode:K=mn()?"Meta":"Control",snapToGrid:pt=!1,snapGrid:lt=Jh,onlyRenderVisibleElements:gt=!1,selectNodesOnDrag:ut=!0,nodesDraggable:et,nodesConnectable:xt,nodesFocusable:J,nodeOrigin:Y=Kh,edgesFocusable:st,edgesUpdatable:Bt,elementsSelectable:_e,defaultViewport:Qt=Qh,minZoom:jt=.5,maxZoom:Nt=2,translateExtent:te=dr,preventScrolling:Ht=!0,nodeExtent:Ot,defaultMarkerColor:ee="#b1b1b7",zoomOnScroll:ne=!0,zoomOnPinch:Se=!0,panOnScroll:rt=!1,panOnScrollSpeed:mt=.5,panOnScrollMode:Lt=qt.Free,zoomOnDoubleClick:Vt=!0,panOnDrag:Yt=!0,onPaneClick:At,onPaneMouseEnter:bt,onPaneMouseMove:Ee,onPaneMouseLeave:Dn,onPaneScroll:Ne,onPaneContextMenu:Pn,children:Br,onEdgeContextMenu:Xt,onEdgeDoubleClick:Ns,onEdgeMouseEnter:As,onEdgeMouseMove:Ms,onEdgeMouseLeave:ks,onEdgeUpdate:$s,onEdgeUpdateStart:Cs,onEdgeUpdateEnd:Is,onReconnect:Ts,onReconnectStart:Ds,onReconnectEnd:Ps,reconnectRadius:Fs=10,edgeUpdaterRadius:zs=10,onNodesChange:Rs,onEdgesChange:Ws,noDragClassName:Bs="nodrag",noWheelClassName:Hs="nowheel",noPanClassName:Hr="nopan",fitView:Os=!1,fitViewOptions:Ls,connectOnClick:Vs=!0,attributionPosition:Ys,proOptions:Xs,defaultEdgeOptions:Us,elevateNodesOnSelect:Gs=!0,elevateEdgesOnSelect:qs=!1,disableKeyboardA11y:Or=!1,autoPanOnConnect:Zs=!0,autoPanOnNodeDrag:Ks=!0,connectionRadius:Js=20,isValidConnection:Qs,onError:js,style:ta,id:Lr,nodeDragThreshold:ea,...na},ra)=>{const Fn=Lr||"1";return R.createElement("div",{...na,style:{...ta,...jh},ref:ra,className:ht(["react-flow",i]),"data-testid":"rf__wrapper",id:Lr},R.createElement(cs,null,R.createElement(Uh,{onInit:l,onMove:u,onMoveStart:f,onMoveEnd:d,onNodeClick:a,onEdgeClick:c,onNodeMouseEnter:v,onNodeMouseMove:b,onNodeMouseLeave:w,onNodeContextMenu:_,onNodeDoubleClick:N,nodeTypes:o,edgeTypes:s,connectionLineType:I,connectionLineStyle:F,connectionLineComponent:z,connectionLineContainerStyle:L,selectionKeyCode:X,selectionOnDrag:G,selectionMode:q,deleteKeyCode:O,multiSelectionKeyCode:Q,panActivationKeyCode:Z,zoomActivationKeyCode:K,onlyRenderVisibleElements:gt,selectNodesOnDrag:ut,defaultViewport:Qt,translateExtent:te,minZoom:jt,maxZoom:Nt,preventScrolling:Ht,zoomOnScroll:ne,zoomOnPinch:Se,zoomOnDoubleClick:Vt,panOnScroll:rt,panOnScrollSpeed:mt,panOnScrollMode:Lt,panOnDrag:Yt,onPaneClick:At,onPaneMouseEnter:bt,onPaneMouseMove:Ee,onPaneMouseLeave:Dn,onPaneScroll:Ne,onPaneContextMenu:Pn,onSelectionContextMenu:E,onSelectionStart:T,onSelectionEnd:P,onEdgeContextMenu:Xt,onEdgeDoubleClick:Ns,onEdgeMouseEnter:As,onEdgeMouseMove:Ms,onEdgeMouseLeave:ks,onReconnect:Ts??$s,onReconnectStart:Ds??Cs,onReconnectEnd:Ps??Is,reconnectRadius:Fs??zs,defaultMarkerColor:ee,noDragClassName:Bs,noWheelClassName:Hs,noPanClassName:Hr,elevateEdgesOnSelect:qs,rfId:Fn,disableKeyboardA11y:Or,nodeOrigin:Y,nodeExtent:Ot}),R.createElement(Vf,{nodes:t,edges:e,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:x,onConnectEnd:m,onClickConnectStart:g,onClickConnectEnd:h,nodesDraggable:et,nodesConnectable:xt,nodesFocusable:J,edgesFocusable:st,edgesUpdatable:Bt,elementsSelectable:_e,elevateNodesOnSelect:Gs,minZoom:jt,maxZoom:Nt,nodeExtent:Ot,onNodesChange:Rs,onEdgesChange:Ws,snapToGrid:pt,snapGrid:lt,connectionMode:S,translateExtent:te,connectOnClick:Vs,defaultEdgeOptions:Us,fitView:Os,fitViewOptions:Ls,onNodesDelete:D,onEdgesDelete:W,onNodeDragStart:M,onNodeDrag:C,onNodeDragStop:k,onSelectionDrag:y,onSelectionDragStart:B,onSelectionDragStop:A,noPanClassName:Hr,nodeOrigin:Y,rfId:Fn,autoPanOnConnect:Zs,autoPanOnNodeDrag:Ks,onError:js,connectionRadius:Js,isValidConnection:Qs,nodeDragThreshold:ea}),R.createElement(Of,{onSelectionChange:H}),Br,R.createElement(pf,{proOptions:Xs,position:Ys}),R.createElement(qf,{rfId:Fn,disableKeyboardA11y:Or})))});td.displayName="ReactFlow";const ed=t=>t.getNodes();function Yd(){return tt(ed,it)}function ls(t){return e=>{const[n,r]=$.useState(e),i=$.useCallback(o=>r(s=>t(o,s)),[]);return[n,r,i]}}const Xd=ls(Zo),Ud=ls(ch);var Dr={exports:{}};Dr.exports;(function(t){(function(){var e,n,r,i,o,s,a,c,l,u,f,d,p,x,m;r=Math.floor,u=Math.min,n=function(g,h){return g<h?-1:g>h?1:0},l=function(g,h,v,b,w){var _;if(v==null&&(v=0),w==null&&(w=n),v<0)throw new Error("lo must be non-negative");for(b==null&&(b=g.length);v<b;)_=r((v+b)/2),w(h,g[_])<0?b=_:v=_+1;return[].splice.apply(g,[v,v-v].concat(h)),h},s=function(g,h,v){return v==null&&(v=n),g.push(h),x(g,0,g.length-1,v)},o=function(g,h){var v,b;return h==null&&(h=n),v=g.pop(),g.length?(b=g[0],g[0]=v,m(g,0,h)):b=v,b},c=function(g,h,v){var b;return v==null&&(v=n),b=g[0],g[0]=h,m(g,0,v),b},a=function(g,h,v){var b;return v==null&&(v=n),g.length&&v(g[0],h)<0&&(b=[g[0],h],h=b[0],g[0]=b[1],m(g,0,v)),h},i=function(g,h){var v,b,w,_,N,M;for(h==null&&(h=n),_=(function(){M=[];for(var C=0,k=r(g.length/2);0<=k?C<k:C>k;0<=k?C++:C--)M.push(C);return M}).apply(this).reverse(),N=[],b=0,w=_.length;b<w;b++)v=_[b],N.push(m(g,v,h));return N},p=function(g,h,v){var b;if(v==null&&(v=n),b=g.indexOf(h),b!==-1)return x(g,0,b,v),m(g,b,v)},f=function(g,h,v){var b,w,_,N,M;if(v==null&&(v=n),w=g.slice(0,h),!w.length)return w;for(i(w,v),M=g.slice(h),_=0,N=M.length;_<N;_++)b=M[_],a(w,b,v);return w.sort(v).reverse()},d=function(g,h,v){var b,w,_,N,M,C,k,D,W;if(v==null&&(v=n),h*10<=g.length){if(_=g.slice(0,h).sort(v),!_.length)return _;for(w=_[_.length-1],k=g.slice(h),N=0,C=k.length;N<C;N++)b=k[N],v(b,w)<0&&(l(_,b,0,null,v),_.pop(),w=_[_.length-1]);return _}for(i(g,v),W=[],M=0,D=u(h,g.length);0<=D?M<D:M>D;0<=D?++M:--M)W.push(o(g,v));return W},x=function(g,h,v,b){var w,_,N;for(b==null&&(b=n),w=g[v];v>h;){if(N=v-1>>1,_=g[N],b(w,_)<0){g[v]=_,v=N;continue}break}return g[v]=w},m=function(g,h,v){var b,w,_,N,M;for(v==null&&(v=n),w=g.length,M=h,_=g[h],b=2*h+1;b<w;)N=b+1,N<w&&!(v(g[b],g[N])<0)&&(b=N),g[h]=g[b],h=b,b=2*h+1;return g[h]=_,x(g,M,h,v)},e=function(){g.push=s,g.pop=o,g.replace=c,g.pushpop=a,g.heapify=i,g.updateItem=p,g.nlargest=f,g.nsmallest=d;function g(h){this.cmp=h??n,this.nodes=[]}return g.prototype.push=function(h){return s(this.nodes,h,this.cmp)},g.prototype.pop=function(){return o(this.nodes,this.cmp)},g.prototype.peek=function(){return this.nodes[0]},g.prototype.contains=function(h){return this.nodes.indexOf(h)!==-1},g.prototype.replace=function(h){return c(this.nodes,h,this.cmp)},g.prototype.pushpop=function(h){return a(this.nodes,h,this.cmp)},g.prototype.heapify=function(){return i(this.nodes,this.cmp)},g.prototype.updateItem=function(h){return p(this.nodes,h,this.cmp)},g.prototype.clear=function(){return this.nodes=[]},g.prototype.empty=function(){return this.nodes.length===0},g.prototype.size=function(){return this.nodes.length},g.prototype.clone=function(){var h;return h=new g,h.nodes=this.nodes.slice(0),h},g.prototype.toArray=function(){return this.nodes.slice(0)},g.prototype.insert=g.prototype.push,g.prototype.top=g.prototype.peek,g.prototype.front=g.prototype.peek,g.prototype.has=g.prototype.contains,g.prototype.copy=g.prototype.clone,g}(),t!==null&&t.exports?t.exports=e:window.Heap=e}).call(oa)})(Dr);var nd=Dr.exports,In=nd;function rd(t,e,n){this.x=t,this.y=e,this.walkable=n===void 0?!0:n}var Pr=rd,id={Always:1,Never:2,IfAtMostOneObstacle:3,OnlyWhenNoObstacles:4},dt=id,us=Pr,je=dt;function It(t,e,n){var r;typeof t!="object"?r=t:(e=t.length,r=t[0].length,n=t),this.width=r,this.height=e,this.nodes=this._buildNodes(r,e,n)}It.prototype._buildNodes=function(t,e,n){var r,i,o=new Array(e);for(r=0;r<e;++r)for(o[r]=new Array(t),i=0;i<t;++i)o[r][i]=new us(i,r);if(n===void 0)return o;if(n.length!==e||n[0].length!==t)throw new Error("Matrix size does not fit");for(r=0;r<e;++r)for(i=0;i<t;++i)n[r][i]&&(o[r][i].walkable=!1);return o};It.prototype.getNodeAt=function(t,e){return this.nodes[e][t]};It.prototype.isWalkableAt=function(t,e){return this.isInside(t,e)&&this.nodes[e][t].walkable};It.prototype.isInside=function(t,e){return t>=0&&t<this.width&&e>=0&&e<this.height};It.prototype.setWalkableAt=function(t,e,n){this.nodes[e][t].walkable=n};It.prototype.getNeighbors=function(t,e){var n=t.x,r=t.y,i=[],o=!1,s=!1,a=!1,c=!1,l=!1,u=!1,f=!1,d=!1,p=this.nodes;if(this.isWalkableAt(n,r-1)&&(i.push(p[r-1][n]),o=!0),this.isWalkableAt(n+1,r)&&(i.push(p[r][n+1]),a=!0),this.isWalkableAt(n,r+1)&&(i.push(p[r+1][n]),l=!0),this.isWalkableAt(n-1,r)&&(i.push(p[r][n-1]),f=!0),e===je.Never)return i;if(e===je.OnlyWhenNoObstacles)s=f&&o,c=o&&a,u=a&&l,d=l&&f;else if(e===je.IfAtMostOneObstacle)s=f||o,c=o||a,u=a||l,d=l||f;else if(e===je.Always)s=!0,c=!0,u=!0,d=!0;else throw new Error("Incorrect value of diagonalMovement");return s&&this.isWalkableAt(n-1,r-1)&&i.push(p[r-1][n-1]),c&&this.isWalkableAt(n+1,r-1)&&i.push(p[r-1][n+1]),u&&this.isWalkableAt(n+1,r+1)&&i.push(p[r+1][n+1]),d&&this.isWalkableAt(n-1,r+1)&&i.push(p[r+1][n-1]),i};It.prototype.clone=function(){var t,e,n=this.width,r=this.height,i=this.nodes,o=new It(n,r),s=new Array(r);for(t=0;t<r;++t)for(s[t]=new Array(n),e=0;e<n;++e)s[t][e]=new us(e,t,i[t][e].walkable);return o.nodes=s,o};var od=It,ct={};function pr(t){for(var e=[[t.x,t.y]];t.parent;)t=t.parent,e.push([t.x,t.y]);return e.reverse()}ct.backtrace=pr;function sd(t,e){var n=pr(t),r=pr(e);return n.concat(r.reverse())}ct.biBacktrace=sd;function ad(t){var e,n=0,r,i,o,s;for(e=1;e<t.length;++e)r=t[e-1],i=t[e],o=r[0]-i[0],s=r[1]-i[1],n+=Math.sqrt(o*o+s*s);return n}ct.pathLength=ad;function Fr(t,e,n,r){var i=Math.abs,o=[],s,a,c,l,u,f;for(c=i(n-t),l=i(r-e),s=t<n?1:-1,a=e<r?1:-1,u=c-l;o.push([t,e]),!(t===n&&e===r);)f=2*u,f>-l&&(u=u-l,t=t+s),f<c&&(u=u+c,e=e+a);return o}ct.interpolate=Fr;function cd(t){var e=[],n=t.length,r,i,o,s,a,c;if(n<2)return e;for(a=0;a<n-1;++a)for(r=t[a],i=t[a+1],o=Fr(r[0],r[1],i[0],i[1]),s=o.length,c=0;c<s-1;++c)e.push(o[c]);return e.push(t[n-1]),e}ct.expandPath=cd;function ld(t,e){var n=e.length,r=e[0][0],i=e[0][1],o=e[n-1][0],s=e[n-1][1],a,c,l,u,f,d,p,x,m,g,h;for(a=r,c=i,f=[[a,c]],d=2;d<n;++d){for(x=e[d],l=x[0],u=x[1],m=Fr(a,c,l,u),h=!1,p=1;p<m.length;++p)if(g=m[p],!t.isWalkableAt(g[0],g[1])){h=!0;break}h&&(lastValidCoord=e[d-1],f.push(lastValidCoord),a=lastValidCoord[0],c=lastValidCoord[1])}return f.push([o,s]),f}ct.smoothenPath=ld;function ud(t){if(t.length<3)return t;var e=[],n=t[0][0],r=t[0][1],i=t[1][0],o=t[1][1],s=i-n,a=o-r,c,l,u,f,d,p;for(d=Math.sqrt(s*s+a*a),s/=d,a/=d,e.push([n,r]),p=2;p<t.length;p++)c=i,l=o,u=s,f=a,i=t[p][0],o=t[p][1],s=i-c,a=o-l,d=Math.sqrt(s*s+a*a),s/=d,a/=d,(s!==u||a!==f)&&e.push([c,l]);return e.push([i,o]),e}ct.compressPath=ud;var Ve={manhattan:function(t,e){return t+e},euclidean:function(t,e){return Math.sqrt(t*t+e*e)},octile:function(t,e){var n=Math.SQRT2-1;return t<e?n*t+e:n*e+t},chebyshev:function(t,e){return Math.max(t,e)}},fd=In,hd=ct,Un=Ve,tn=dt;function fs(t){t=t||{},this.allowDiagonal=t.allowDiagonal,this.dontCrossCorners=t.dontCrossCorners,this.heuristic=t.heuristic||Un.manhattan,this.weight=t.weight||1,this.diagonalMovement=t.diagonalMovement,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=tn.OnlyWhenNoObstacles:this.diagonalMovement=tn.IfAtMostOneObstacle:this.diagonalMovement=tn.Never),this.diagonalMovement===tn.Never?this.heuristic=t.heuristic||Un.manhattan:this.heuristic=t.heuristic||Un.octile}fs.prototype.findPath=function(t,e,n,r,i){var o=new fd(function(_,N){return _.f-N.f}),s=i.getNodeAt(t,e),a=i.getNodeAt(n,r),c=this.heuristic,l=this.diagonalMovement,u=this.weight,f=Math.abs,d=Math.SQRT2,p,x,m,g,h,v,b,w;for(s.g=0,s.f=0,o.push(s),s.opened=!0;!o.empty();){if(p=o.pop(),p.closed=!0,p===a)return hd.backtrace(a);for(x=i.getNeighbors(p,l),g=0,h=x.length;g<h;++g)m=x[g],!m.closed&&(v=m.x,b=m.y,w=p.g+(v-p.x===0||b-p.y===0?1:d),(!m.opened||w<m.g)&&(m.g=w,m.h=m.h||u*c(f(v-n),f(b-r)),m.f=m.g+m.h,m.parent=p,m.opened?o.updateItem(m):(o.push(m),m.opened=!0)))}return[]};var zr=fs,hs=zr;function xn(t){hs.call(this,t);var e=this.heuristic;this.heuristic=function(n,r){return e(n,r)*1e6}}xn.prototype=new hs;xn.prototype.constructor=xn;var dd=xn,pd=ct,Gn=dt;function ds(t){t=t||{},this.allowDiagonal=t.allowDiagonal,this.dontCrossCorners=t.dontCrossCorners,this.diagonalMovement=t.diagonalMovement,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=Gn.OnlyWhenNoObstacles:this.diagonalMovement=Gn.IfAtMostOneObstacle:this.diagonalMovement=Gn.Never)}ds.prototype.findPath=function(t,e,n,r,i){var o=[],s=this.diagonalMovement,a=i.getNodeAt(t,e),c=i.getNodeAt(n,r),l,u,f,d,p;for(o.push(a),a.opened=!0;o.length;){if(f=o.shift(),f.closed=!0,f===c)return pd.backtrace(c);for(l=i.getNeighbors(f,s),d=0,p=l.length;d<p;++d)u=l[d],!(u.closed||u.opened)&&(o.push(u),u.opened=!0,u.parent=f)}return[]};var gd=ds,ps=zr;function bn(t){ps.call(this,t),this.heuristic=function(e,n){return 0}}bn.prototype=new ps;bn.prototype.constructor=bn;var md=bn,Ti=In,Di=ct,qn=Ve,en=dt;function gs(t){t=t||{},this.allowDiagonal=t.allowDiagonal,this.dontCrossCorners=t.dontCrossCorners,this.diagonalMovement=t.diagonalMovement,this.heuristic=t.heuristic||qn.manhattan,this.weight=t.weight||1,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=en.OnlyWhenNoObstacles:this.diagonalMovement=en.IfAtMostOneObstacle:this.diagonalMovement=en.Never),this.diagonalMovement===en.Never?this.heuristic=t.heuristic||qn.manhattan:this.heuristic=t.heuristic||qn.octile}gs.prototype.findPath=function(t,e,n,r,i){var o=function(k,D){return k.f-D.f},s=new Ti(o),a=new Ti(o),c=i.getNodeAt(t,e),l=i.getNodeAt(n,r),u=this.heuristic,f=this.diagonalMovement,d=this.weight,p=Math.abs,x=Math.SQRT2,m,g,h,v,b,w,_,N,M=1,C=2;for(c.g=0,c.f=0,s.push(c),c.opened=M,l.g=0,l.f=0,a.push(l),l.opened=C;!s.empty()&&!a.empty();){for(m=s.pop(),m.closed=!0,g=i.getNeighbors(m,f),v=0,b=g.length;v<b;++v)if(h=g[v],!h.closed){if(h.opened===C)return Di.biBacktrace(m,h);w=h.x,_=h.y,N=m.g+(w-m.x===0||_-m.y===0?1:x),(!h.opened||N<h.g)&&(h.g=N,h.h=h.h||d*u(p(w-n),p(_-r)),h.f=h.g+h.h,h.parent=m,h.opened?s.updateItem(h):(s.push(h),h.opened=M))}for(m=a.pop(),m.closed=!0,g=i.getNeighbors(m,f),v=0,b=g.length;v<b;++v)if(h=g[v],!h.closed){if(h.opened===M)return Di.biBacktrace(h,m);w=h.x,_=h.y,N=m.g+(w-m.x===0||_-m.y===0?1:x),(!h.opened||N<h.g)&&(h.g=N,h.h=h.h||d*u(p(w-t),p(_-e)),h.f=h.g+h.h,h.parent=m,h.opened?a.updateItem(h):(a.push(h),h.opened=C))}}return[]};var Rr=gs,ms=Rr;function _n(t){ms.call(this,t);var e=this.heuristic;this.heuristic=function(n,r){return e(n,r)*1e6}}_n.prototype=new ms;_n.prototype.constructor=_n;var yd=_n,Pi=ct,Zn=dt;function ys(t){t=t||{},this.allowDiagonal=t.allowDiagonal,this.dontCrossCorners=t.dontCrossCorners,this.diagonalMovement=t.diagonalMovement,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=Zn.OnlyWhenNoObstacles:this.diagonalMovement=Zn.IfAtMostOneObstacle:this.diagonalMovement=Zn.Never)}ys.prototype.findPath=function(t,e,n,r,i){var o=i.getNodeAt(t,e),s=i.getNodeAt(n,r),a=[],c=[],l,u,f,d=this.diagonalMovement,p=0,x=1,m,g;for(a.push(o),o.opened=!0,o.by=p,c.push(s),s.opened=!0,s.by=x;a.length&&c.length;){for(f=a.shift(),f.closed=!0,l=i.getNeighbors(f,d),m=0,g=l.length;m<g;++m)if(u=l[m],!u.closed){if(u.opened){if(u.by===x)return Pi.biBacktrace(f,u);continue}a.push(u),u.parent=f,u.opened=!0,u.by=p}for(f=c.shift(),f.closed=!0,l=i.getNeighbors(f,d),m=0,g=l.length;m<g;++m)if(u=l[m],!u.closed){if(u.opened){if(u.by===p)return Pi.biBacktrace(u,f);continue}c.push(u),u.parent=f,u.opened=!0,u.by=x}}return[]};var vd=ys,vs=Rr;function Sn(t){vs.call(this,t),this.heuristic=function(e,n){return 0}}Sn.prototype=new vs;Sn.prototype.constructor=Sn;var wd=Sn,Kn=Ve,Fi=Pr,nn=dt;function ws(t){t=t||{},this.allowDiagonal=t.allowDiagonal,this.dontCrossCorners=t.dontCrossCorners,this.diagonalMovement=t.diagonalMovement,this.heuristic=t.heuristic||Kn.manhattan,this.weight=t.weight||1,this.trackRecursion=t.trackRecursion||!1,this.timeLimit=t.timeLimit||1/0,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=nn.OnlyWhenNoObstacles:this.diagonalMovement=nn.IfAtMostOneObstacle:this.diagonalMovement=nn.Never),this.diagonalMovement===nn.Never?this.heuristic=t.heuristic||Kn.manhattan:this.heuristic=t.heuristic||Kn.octile}ws.prototype.findPath=function(t,e,n,r,i){var o=new Date().getTime(),s=(function(m,g){return this.heuristic(Math.abs(g.x-m.x),Math.abs(g.y-m.y))}).bind(this),a=function(m,g){return m.x===g.x||m.y===g.y?1:Math.SQRT2},c=(function(m,g,h,v,b){if(this.timeLimit>0&&new Date().getTime()-o>this.timeLimit*1e3)return 1/0;var w=g+s(m,u)*this.weight;if(w>h)return w;if(m==u)return v[b]=[m.x,m.y],m;var _,N,M,C,k=i.getNeighbors(m,this.diagonalMovement);for(M=0,_=1/0;C=k[M];++M){if(this.trackRecursion&&(C.retainCount=C.retainCount+1||1,C.tested!==!0&&(C.tested=!0)),N=c(C,g+a(m,C),h,v,b+1),N instanceof Fi)return v[b]=[m.x,m.y],N;this.trackRecursion&&--C.retainCount===0&&(C.tested=!1),N<_&&(_=N)}return _}).bind(this),l=i.getNodeAt(t,e),u=i.getNodeAt(n,r),f=s(l,u),d,p,x;for(d=0;;++d){if(p=[],x=c(l,0,f,p,0),x===1/0)return[];if(x instanceof Fi)return p;f=x}return[]};var xd=ws,bd=In,zi=ct,xs=Ve;function Wr(t){t=t||{},this.heuristic=t.heuristic||xs.manhattan,this.trackJumpRecursion=t.trackJumpRecursion||!1}Wr.prototype.findPath=function(t,e,n,r,i){var o=this.openList=new bd(function(l,u){return l.f-u.f}),s=this.startNode=i.getNodeAt(t,e),a=this.endNode=i.getNodeAt(n,r),c;for(this.grid=i,s.g=0,s.f=0,o.push(s),s.opened=!0;!o.empty();){if(c=o.pop(),c.closed=!0,c===a)return zi.expandPath(zi.backtrace(a));this._identifySuccessors(c)}return[]};Wr.prototype._identifySuccessors=function(t){var e=this.grid,n=this.heuristic,r=this.openList,i=this.endNode.x,o=this.endNode.y,s,a,c,l,u,f=t.x,d=t.y,p,x,m,g,h,v=Math.abs;for(s=this._findNeighbors(t),l=0,u=s.length;l<u;++l)if(a=s[l],c=this._jump(a[0],a[1],f,d),c){if(p=c[0],x=c[1],h=e.getNodeAt(p,x),h.closed)continue;m=xs.octile(v(p-f),v(x-d)),g=t.g+m,(!h.opened||g<h.g)&&(h.g=g,h.h=h.h||n(v(p-i),v(x-o)),h.f=h.g+h.h,h.parent=t,h.opened?r.updateItem(h):(r.push(h),h.opened=!0))}};var Tn=Wr,bs=Tn,_d=dt;function ve(t){bs.call(this,t)}ve.prototype=new bs;ve.prototype.constructor=ve;ve.prototype._jump=function(t,e,n,r){var i=this.grid,o=t-n,s=e-r;if(!i.isWalkableAt(t,e))return null;if(this.trackJumpRecursion===!0&&(i.getNodeAt(t,e).tested=!0),i.getNodeAt(t,e)===this.endNode)return[t,e];if(o!==0){if(i.isWalkableAt(t,e-1)&&!i.isWalkableAt(t-o,e-1)||i.isWalkableAt(t,e+1)&&!i.isWalkableAt(t-o,e+1))return[t,e]}else if(s!==0){if(i.isWalkableAt(t-1,e)&&!i.isWalkableAt(t-1,e-s)||i.isWalkableAt(t+1,e)&&!i.isWalkableAt(t+1,e-s))return[t,e];if(this._jump(t+1,e,t,e)||this._jump(t-1,e,t,e))return[t,e]}else throw new Error("Only horizontal and vertical movements are allowed");return this._jump(t+o,e+s,t,e)};ve.prototype._findNeighbors=function(t){var e=t.parent,n=t.x,r=t.y,i=this.grid,o,s,a,c,l=[],u,f,d,p;if(e)o=e.x,s=e.y,a=(n-o)/Math.max(Math.abs(n-o),1),c=(r-s)/Math.max(Math.abs(r-s),1),a!==0?(i.isWalkableAt(n,r-1)&&l.push([n,r-1]),i.isWalkableAt(n,r+1)&&l.push([n,r+1]),i.isWalkableAt(n+a,r)&&l.push([n+a,r])):c!==0&&(i.isWalkableAt(n-1,r)&&l.push([n-1,r]),i.isWalkableAt(n+1,r)&&l.push([n+1,r]),i.isWalkableAt(n,r+c)&&l.push([n,r+c]));else for(u=i.getNeighbors(t,_d.Never),d=0,p=u.length;d<p;++d)f=u[d],l.push([f.x,f.y]);return l};var Sd=ve,_s=Tn,Ed=dt;function we(t){_s.call(this,t)}we.prototype=new _s;we.prototype.constructor=we;we.prototype._jump=function(t,e,n,r){var i=this.grid,o=t-n,s=e-r;if(!i.isWalkableAt(t,e))return null;if(this.trackJumpRecursion===!0&&(i.getNodeAt(t,e).tested=!0),i.getNodeAt(t,e)===this.endNode)return[t,e];if(o!==0&&s!==0){if(i.isWalkableAt(t-o,e+s)&&!i.isWalkableAt(t-o,e)||i.isWalkableAt(t+o,e-s)&&!i.isWalkableAt(t,e-s))return[t,e];if(this._jump(t+o,e,t,e)||this._jump(t,e+s,t,e))return[t,e]}else if(o!==0){if(i.isWalkableAt(t+o,e+1)&&!i.isWalkableAt(t,e+1)||i.isWalkableAt(t+o,e-1)&&!i.isWalkableAt(t,e-1))return[t,e]}else if(i.isWalkableAt(t+1,e+s)&&!i.isWalkableAt(t+1,e)||i.isWalkableAt(t-1,e+s)&&!i.isWalkableAt(t-1,e))return[t,e];return this._jump(t+o,e+s,t,e)};we.prototype._findNeighbors=function(t){var e=t.parent,n=t.x,r=t.y,i=this.grid,o,s,a,c,l=[],u,f,d,p;if(e)o=e.x,s=e.y,a=(n-o)/Math.max(Math.abs(n-o),1),c=(r-s)/Math.max(Math.abs(r-s),1),a!==0&&c!==0?(i.isWalkableAt(n,r+c)&&l.push([n,r+c]),i.isWalkableAt(n+a,r)&&l.push([n+a,r]),i.isWalkableAt(n+a,r+c)&&l.push([n+a,r+c]),i.isWalkableAt(n-a,r)||l.push([n-a,r+c]),i.isWalkableAt(n,r-c)||l.push([n+a,r-c])):a===0?(i.isWalkableAt(n,r+c)&&l.push([n,r+c]),i.isWalkableAt(n+1,r)||l.push([n+1,r+c]),i.isWalkableAt(n-1,r)||l.push([n-1,r+c])):(i.isWalkableAt(n+a,r)&&l.push([n+a,r]),i.isWalkableAt(n,r+1)||l.push([n+a,r+1]),i.isWalkableAt(n,r-1)||l.push([n+a,r-1]));else for(u=i.getNeighbors(t,Ed.Always),d=0,p=u.length;d<p;++d)f=u[d],l.push([f.x,f.y]);return l};var Nd=we,Ss=Tn,Ad=dt;function xe(t){Ss.call(this,t)}xe.prototype=new Ss;xe.prototype.constructor=xe;xe.prototype._jump=function(t,e,n,r){var i=this.grid,o=t-n,s=e-r;if(!i.isWalkableAt(t,e))return null;if(this.trackJumpRecursion===!0&&(i.getNodeAt(t,e).tested=!0),i.getNodeAt(t,e)===this.endNode)return[t,e];if(o!==0&&s!==0){if(this._jump(t+o,e,t,e)||this._jump(t,e+s,t,e))return[t,e]}else if(o!==0){if(i.isWalkableAt(t,e-1)&&!i.isWalkableAt(t-o,e-1)||i.isWalkableAt(t,e+1)&&!i.isWalkableAt(t-o,e+1))return[t,e]}else if(s!==0&&(i.isWalkableAt(t-1,e)&&!i.isWalkableAt(t-1,e-s)||i.isWalkableAt(t+1,e)&&!i.isWalkableAt(t+1,e-s)))return[t,e];return i.isWalkableAt(t+o,e)&&i.isWalkableAt(t,e+s)?this._jump(t+o,e+s,t,e):null};xe.prototype._findNeighbors=function(t){var e=t.parent,n=t.x,r=t.y,i=this.grid,o,s,a,c,l=[],u,f,d,p;if(e)if(o=e.x,s=e.y,a=(n-o)/Math.max(Math.abs(n-o),1),c=(r-s)/Math.max(Math.abs(r-s),1),a!==0&&c!==0)i.isWalkableAt(n,r+c)&&l.push([n,r+c]),i.isWalkableAt(n+a,r)&&l.push([n+a,r]),i.isWalkableAt(n,r+c)&&i.isWalkableAt(n+a,r)&&l.push([n+a,r+c]);else{var x;if(a!==0){x=i.isWalkableAt(n+a,r);var m=i.isWalkableAt(n,r+1),g=i.isWalkableAt(n,r-1);x&&(l.push([n+a,r]),m&&l.push([n+a,r+1]),g&&l.push([n+a,r-1])),m&&l.push([n,r+1]),g&&l.push([n,r-1])}else if(c!==0){x=i.isWalkableAt(n,r+c);var h=i.isWalkableAt(n+1,r),v=i.isWalkableAt(n-1,r);x&&(l.push([n,r+c]),h&&l.push([n+1,r+c]),v&&l.push([n-1,r+c])),h&&l.push([n+1,r]),v&&l.push([n-1,r])}}else for(u=i.getNeighbors(t,Ad.OnlyWhenNoObstacles),d=0,p=u.length;d<p;++d)f=u[d],l.push([f.x,f.y]);return l};var Md=xe,Es=Tn,kd=dt;function be(t){Es.call(this,t)}be.prototype=new Es;be.prototype.constructor=be;be.prototype._jump=function(t,e,n,r){var i=this.grid,o=t-n,s=e-r;if(!i.isWalkableAt(t,e))return null;if(this.trackJumpRecursion===!0&&(i.getNodeAt(t,e).tested=!0),i.getNodeAt(t,e)===this.endNode)return[t,e];if(o!==0&&s!==0){if(i.isWalkableAt(t-o,e+s)&&!i.isWalkableAt(t-o,e)||i.isWalkableAt(t+o,e-s)&&!i.isWalkableAt(t,e-s))return[t,e];if(this._jump(t+o,e,t,e)||this._jump(t,e+s,t,e))return[t,e]}else if(o!==0){if(i.isWalkableAt(t+o,e+1)&&!i.isWalkableAt(t,e+1)||i.isWalkableAt(t+o,e-1)&&!i.isWalkableAt(t,e-1))return[t,e]}else if(i.isWalkableAt(t+1,e+s)&&!i.isWalkableAt(t+1,e)||i.isWalkableAt(t-1,e+s)&&!i.isWalkableAt(t-1,e))return[t,e];return i.isWalkableAt(t+o,e)||i.isWalkableAt(t,e+s)?this._jump(t+o,e+s,t,e):null};be.prototype._findNeighbors=function(t){var e=t.parent,n=t.x,r=t.y,i=this.grid,o,s,a,c,l=[],u,f,d,p;if(e)o=e.x,s=e.y,a=(n-o)/Math.max(Math.abs(n-o),1),c=(r-s)/Math.max(Math.abs(r-s),1),a!==0&&c!==0?(i.isWalkableAt(n,r+c)&&l.push([n,r+c]),i.isWalkableAt(n+a,r)&&l.push([n+a,r]),(i.isWalkableAt(n,r+c)||i.isWalkableAt(n+a,r))&&l.push([n+a,r+c]),!i.isWalkableAt(n-a,r)&&i.isWalkableAt(n,r+c)&&l.push([n-a,r+c]),!i.isWalkableAt(n,r-c)&&i.isWalkableAt(n+a,r)&&l.push([n+a,r-c])):a===0?i.isWalkableAt(n,r+c)&&(l.push([n,r+c]),i.isWalkableAt(n+1,r)||l.push([n+1,r+c]),i.isWalkableAt(n-1,r)||l.push([n-1,r+c])):i.isWalkableAt(n+a,r)&&(l.push([n+a,r]),i.isWalkableAt(n,r+1)||l.push([n+a,r+1]),i.isWalkableAt(n,r-1)||l.push([n+a,r-1]));else for(u=i.getNeighbors(t,kd.IfAtMostOneObstacle),d=0,p=u.length;d<p;++d)f=u[d],l.push([f.x,f.y]);return l};var $d=be,Jn=dt,Cd=Sd,Id=Nd,Td=Md,Dd=$d;function Pd(t){return t=t||{},t.diagonalMovement===Jn.Never?new Cd(t):t.diagonalMovement===Jn.Always?new Id(t):t.diagonalMovement===Jn.OnlyWhenNoObstacles?new Td(t):new Dd(t)}var Fd=Pd,zd={Heap:In,Node:Pr,Grid:od,Util:ct,DiagonalMovement:dt,Heuristic:Ve,AStarFinder:zr,BestFirstFinder:dd,BreadthFirstFinder:gd,DijkstraFinder:md,BiAStarFinder:Rr,BiBestFirstFinder:yd,BiBreadthFirstFinder:vd,BiDijkstraFinder:wd,IDAStarFinder:xd,JumpPointFinder:Fd},de=zd,gr=function(e,n){switch(n){case"top":return{x:e.x,y:e.y-1};case"bottom":return{x:e.x,y:e.y+1};case"left":return{x:e.x-1,y:e.y};case"right":return{x:e.x+1,y:e.y}}},Ri=function(e,n,r){for(var i=e.getNodeAt(n.x,n.y);!i.walkable;){e.setWalkableAt(i.x,i.y,!0);var o=gr(i,r);i=e.getNodeAt(o.x,o.y)}},rn=function(e,n,r,i){var o=e.x/i,s=e.y/i,a=n/i,c=r/i;if(a<1)for(;a!==1;)a++,o++;else if(a>1)for(;a!==1;)a--,o--;if(c<1)for(;c!==1;)c++,s++;else if(c>1)for(;c!==1;)c--,s--;return{x:o,y:s}},Wi=function(e,n,r,i){var o=e.x*i,s=e.y*i,a=n,c=r;if(a<i)for(;a!==i;)a=a+i,o=o-i;else if(a>i)for(;a!==i;)a=a-i,o=o+i;if(c<i)for(;c!==i;)c=c+i,s=s-i;else if(c>i)for(;c!==i;)c=c-i,s=s+i;return{x:o,y:s}},on=function(e,n){return n===void 0&&(n=10),Math.round(e/n)*n},ae=function(e,n){return n===void 0&&(n=10),Math.floor(e/n)*n},Ft=function(e,n){return n===void 0&&(n=10),Math.ceil(e/n)*n},Bi=function(e,n){n===void 0&&(n=0);var r=Math.max(Math.round(e),n);return r=Number.isInteger(r)?r:n,r=r>=n?r:n,r},Rd=function(e,n,r,i,o){o===void 0&&(o=2);var s=e.xMin,a=e.yMin,c=e.width,l=e.height,u=Ft(c,o)/o+1,f=Ft(l,o)/o+1,d=new de.Grid(u,f);n.forEach(function(b){for(var w=rn(b.topLeft,s,a,o),_=rn(b.bottomRight,s,a,o),N=w.x;N<_.x;N++)for(var M=w.y;M<_.y;M++)d.setWalkableAt(N,M,!1)});var p=rn({x:on(r.x,o),y:on(r.y,o)},s,a,o),x=rn({x:on(i.x,o),y:on(i.y,o)},s,a,o),m=d.getNodeAt(p.x,p.y);Ri(d,m,r.position);var g=d.getNodeAt(x.x,x.y);Ri(d,g,i.position);var h=gr(m,r.position),v=gr(g,i.position);return{grid:d,start:h,end:v}},Wd=function(e,n,r){var i=[[e.x,e.y]].concat(r,[[n.x,n.y]]);return Bd(i)},Bd=function(e){for(var n=0,r=1,i=e[0],o=e[0],s="M"+o[n]+","+o[r]+"M",a=0;a<e.length;a++){var c=e[a],l=Hd(i[n],i[r],c[n],c[r]);s+=" "+l[n]+","+l[r],s+="Q"+c[n]+","+c[r],i=c}var u=e[e.length-1];return s+=" "+u[0]+","+u[1],s},Hd=function(e,n,r,i){var o=(e-r)/2+r,s=(n-i)/2+i;return[o,s]},Od=function(e,n,r){try{var i=new de.AStarFinder({diagonalMovement:de.DiagonalMovement.Always}),o=i.findPath(n.x,n.y,r.x,r.y,e),s=de.Util.smoothenPath(e,o);return o.length===0||s.length===0?null:{fullPath:o,smoothedPath:s}}catch{return null}},Gd=function(e,n,r){try{var i=new de.JumpPointFinder({diagonalMovement:de.DiagonalMovement.Never}),o=i.findPath(n.x,n.y,r.x,r.y,e),s=o;return o.length===0||s.length===0?null:{fullPath:o,smoothedPath:s}}catch{return null}},Ld=function(e,n,r){n===void 0&&(n=2),r===void 0&&(r=2);var i=Number.MIN_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER,c=e.map(function(h){var v,b,w=Math.max(h.width||0,1),_=Math.max(h.height||0,1),N={x:((v=h.positionAbsolute)==null?void 0:v.x)||0,y:((b=h.positionAbsolute)==null?void 0:b.y)||0},M={x:N.x-n,y:N.y-n},C={x:N.x-n,y:N.y+_+n},k={x:N.x+w+n,y:N.y-n},D={x:N.x+w+n,y:N.y+_+n};return r>0&&(M.x=ae(M.x,r),M.y=ae(M.y,r),C.x=ae(C.x,r),C.y=Ft(C.y,r),k.x=Ft(k.x,r),k.y=ae(k.y,r),D.x=Ft(D.x,r),D.y=Ft(D.y,r)),M.y<a&&(a=M.y),M.x<s&&(s=M.x),D.y>o&&(o=D.y),D.x>i&&(i=D.x),{id:h.id,width:w,height:_,topLeft:M,bottomLeft:C,topRight:k,bottomRight:D}}),l=n*2;i=Ft(i+l,r),o=Ft(o+l,r),s=ae(s-l,r),a=ae(a-l,r);var u={x:s,y:a},f={x:s,y:o},d={x:i,y:a},p={x:i,y:o},x=Math.abs(u.x-d.x),m=Math.abs(u.y-f.y),g={topLeft:u,bottomLeft:f,topRight:d,bottomRight:p,width:x,height:m,xMax:i,yMax:o,xMin:s,yMin:a};return{nodeBoxes:c,graphBox:g}},qd=function(e){var n=e.options,r=n===void 0?{}:n,i=e.nodes,o=i===void 0?[]:i,s=e.sourceX,a=e.sourceY,c=e.targetX,l=e.targetY,u=e.sourcePosition,f=e.targetPosition;try{var d=r.drawEdge,p=d===void 0?Wd:d,x=r.generatePath,m=x===void 0?Od:x,g=r.gridRatio,h=g===void 0?10:g,v=r.nodePadding,b=v===void 0?10:v;h=Bi(h),b=Bi(b);var w=Ld(o,b,h),_=w.graphBox,N=w.nodeBoxes,M={x:s,y:a,position:u},C={x:c,y:l,position:f},k=Rd(_,N,M,C,h),D=k.grid,W=k.start,H=k.end,B=m(D,W,H);if(B===null)return null;var y=B.fullPath,A=B.smoothedPath,E=A.map(function(X){var G=X[0],q=X[1],Z=Wi({x:G,y:q},_.xMin,_.yMin,h);return[Z.x,Z.y]}),T=p(M,C,E),P=Math.floor(y.length/2),S=y[P],I=S[0],F=S[1],z=Wi({x:I,y:F},_.xMin,_.yMin,h),L=z.x,O=z.y;return{svgPathString:T,edgeCenterX:L,edgeCenterY:O}}catch{return null}};export{Le as B,wn as H,V as P,as as R,Cn as S,Go as a,Yd as b,Xd as c,Ud as d,td as e,qd as g,Gd as p,tt as u};
@@ -0,0 +1 @@
1
+ .react-flow{direction:ltr}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:grab}.react-flow__node.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:#ffffff80;padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__minimap svg{display:block}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}