skypilot-nightly 1.0.0.dev20250905__py3-none-any.whl → 1.0.0.dev20251210__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.
- sky/__init__.py +12 -2
- sky/adaptors/aws.py +27 -22
- sky/adaptors/common.py +25 -2
- sky/adaptors/coreweave.py +278 -0
- sky/adaptors/do.py +8 -2
- sky/adaptors/gcp.py +11 -0
- sky/adaptors/ibm.py +5 -2
- sky/adaptors/kubernetes.py +64 -0
- sky/adaptors/nebius.py +3 -1
- sky/adaptors/primeintellect.py +1 -0
- sky/adaptors/seeweb.py +183 -0
- sky/adaptors/shadeform.py +89 -0
- sky/adaptors/slurm.py +478 -0
- sky/admin_policy.py +20 -0
- sky/authentication.py +157 -263
- sky/backends/__init__.py +3 -2
- sky/backends/backend.py +11 -3
- sky/backends/backend_utils.py +630 -185
- sky/backends/cloud_vm_ray_backend.py +1111 -928
- sky/backends/local_docker_backend.py +9 -5
- sky/backends/task_codegen.py +971 -0
- sky/backends/wheel_utils.py +18 -0
- sky/catalog/__init__.py +8 -3
- sky/catalog/aws_catalog.py +4 -0
- sky/catalog/common.py +19 -1
- sky/catalog/data_fetchers/fetch_aws.py +102 -80
- sky/catalog/data_fetchers/fetch_gcp.py +30 -3
- sky/catalog/data_fetchers/fetch_nebius.py +9 -6
- sky/catalog/data_fetchers/fetch_runpod.py +698 -0
- sky/catalog/data_fetchers/fetch_seeweb.py +329 -0
- sky/catalog/data_fetchers/fetch_shadeform.py +142 -0
- sky/catalog/kubernetes_catalog.py +36 -32
- sky/catalog/primeintellect_catalog.py +95 -0
- sky/catalog/runpod_catalog.py +5 -1
- sky/catalog/seeweb_catalog.py +184 -0
- sky/catalog/shadeform_catalog.py +165 -0
- sky/catalog/slurm_catalog.py +243 -0
- sky/check.py +87 -46
- sky/client/cli/command.py +1004 -434
- sky/client/cli/flags.py +4 -2
- sky/{volumes/utils.py → client/cli/table_utils.py} +111 -13
- sky/client/cli/utils.py +79 -0
- sky/client/common.py +12 -2
- sky/client/sdk.py +188 -65
- sky/client/sdk_async.py +34 -33
- sky/cloud_stores.py +82 -3
- sky/clouds/__init__.py +8 -0
- sky/clouds/aws.py +337 -129
- sky/clouds/azure.py +24 -18
- sky/clouds/cloud.py +47 -13
- sky/clouds/cudo.py +16 -13
- sky/clouds/do.py +9 -7
- sky/clouds/fluidstack.py +12 -5
- sky/clouds/gcp.py +14 -7
- sky/clouds/hyperbolic.py +12 -5
- sky/clouds/ibm.py +12 -5
- sky/clouds/kubernetes.py +80 -45
- sky/clouds/lambda_cloud.py +12 -5
- sky/clouds/nebius.py +23 -9
- sky/clouds/oci.py +19 -12
- sky/clouds/paperspace.py +4 -1
- sky/clouds/primeintellect.py +317 -0
- sky/clouds/runpod.py +85 -24
- sky/clouds/scp.py +12 -8
- sky/clouds/seeweb.py +477 -0
- sky/clouds/shadeform.py +400 -0
- sky/clouds/slurm.py +578 -0
- sky/clouds/ssh.py +6 -3
- sky/clouds/utils/scp_utils.py +61 -50
- sky/clouds/vast.py +43 -27
- sky/clouds/vsphere.py +14 -16
- sky/core.py +296 -195
- sky/dashboard/out/404.html +1 -1
- sky/dashboard/out/_next/static/KYAhEFa3FTfq4JyKVgo-s/_buildManifest.js +1 -0
- sky/dashboard/out/_next/static/chunks/1141-9c810f01ff4f398a.js +11 -0
- sky/dashboard/out/_next/static/chunks/1871-7e202677c42f43fe.js +6 -0
- sky/dashboard/out/_next/static/chunks/2260-7703229c33c5ebd5.js +1 -0
- sky/dashboard/out/_next/static/chunks/2369.fc20f0c2c8ed9fe7.js +15 -0
- sky/dashboard/out/_next/static/chunks/2755.edd818326d489a1d.js +26 -0
- sky/dashboard/out/_next/static/chunks/3294.ddda8c6c6f9f24dc.js +1 -0
- sky/dashboard/out/_next/static/chunks/3785.7e245f318f9d1121.js +1 -0
- sky/dashboard/out/_next/static/chunks/{6601-06114c982db410b6.js → 3800-b589397dc09c5b4e.js} +1 -1
- sky/dashboard/out/_next/static/chunks/3850-fd5696f3bbbaddae.js +1 -0
- sky/dashboard/out/_next/static/chunks/4725.172ede95d1b21022.js +1 -0
- sky/dashboard/out/_next/static/chunks/4937.a2baa2df5572a276.js +15 -0
- sky/dashboard/out/_next/static/chunks/6212-7bd06f60ba693125.js +13 -0
- sky/dashboard/out/_next/static/chunks/6856-da20c5fd999f319c.js +1 -0
- sky/dashboard/out/_next/static/chunks/6990-09cbf02d3cd518c3.js +1 -0
- sky/dashboard/out/_next/static/chunks/7359-c8d04e06886000b3.js +30 -0
- sky/dashboard/out/_next/static/chunks/7615-019513abc55b3b47.js +1 -0
- sky/dashboard/out/_next/static/chunks/8640.5b9475a2d18c5416.js +16 -0
- sky/dashboard/out/_next/static/chunks/8969-452f9d5cbdd2dc73.js +1 -0
- sky/dashboard/out/_next/static/chunks/9025.fa408f3242e9028d.js +6 -0
- sky/dashboard/out/_next/static/chunks/9353-8369df1cf105221c.js +1 -0
- sky/dashboard/out/_next/static/chunks/9360.a536cf6b1fa42355.js +31 -0
- sky/dashboard/out/_next/static/chunks/9847.3aaca6bb33455140.js +30 -0
- sky/dashboard/out/_next/static/chunks/pages/_app-68b647e26f9d2793.js +34 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-33f525539665fdfd.js +16 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-a7565f586ef86467.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters-9e5d47818b9bdadd.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/{config-dfb9bf07b13045f4.js → config-718cdc365de82689.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/infra/{[context]-6563820e094f68ca.js → [context]-12c559ec4d81fdbd.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/{infra-aabba60d57826e0f.js → infra-d187cd0413d72475.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-895847b6cf200b04.js +16 -0
- sky/dashboard/out/_next/static/chunks/pages/jobs/pools/[pool]-8d0f4655400b4eb9.js +21 -0
- sky/dashboard/out/_next/static/chunks/pages/jobs-e5a98f17f8513a96.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/plugins/[...slug]-4f46050ca065d8f8.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/users-2f7646eb77785a2c.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/volumes-ef19d49c6d0e8500.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/workspaces/{[name]-af76bb06dbb3954f.js → [name]-96e0f298308da7e2.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/{workspaces-7598c33a746cdc91.js → workspaces-cb4da3abe08ebf19.js} +1 -1
- sky/dashboard/out/_next/static/chunks/webpack-fba3de387ff6bb08.js +1 -0
- sky/dashboard/out/_next/static/css/c5a4cfd2600fc715.css +3 -0
- sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
- sky/dashboard/out/clusters/[cluster].html +1 -1
- sky/dashboard/out/clusters.html +1 -1
- sky/dashboard/out/config.html +1 -1
- sky/dashboard/out/index.html +1 -1
- sky/dashboard/out/infra/[context].html +1 -1
- sky/dashboard/out/infra.html +1 -1
- sky/dashboard/out/jobs/[job].html +1 -1
- sky/dashboard/out/jobs/pools/[pool].html +1 -1
- sky/dashboard/out/jobs.html +1 -1
- sky/dashboard/out/plugins/[...slug].html +1 -0
- sky/dashboard/out/users.html +1 -1
- sky/dashboard/out/volumes.html +1 -1
- sky/dashboard/out/workspace/new.html +1 -1
- sky/dashboard/out/workspaces/[name].html +1 -1
- sky/dashboard/out/workspaces.html +1 -1
- sky/data/data_utils.py +92 -1
- sky/data/mounting_utils.py +177 -30
- sky/data/storage.py +200 -19
- sky/data/storage_utils.py +10 -45
- sky/exceptions.py +18 -7
- sky/execution.py +74 -31
- sky/global_user_state.py +605 -191
- sky/jobs/__init__.py +2 -0
- sky/jobs/client/sdk.py +101 -4
- sky/jobs/client/sdk_async.py +31 -5
- sky/jobs/constants.py +15 -8
- sky/jobs/controller.py +726 -284
- sky/jobs/file_content_utils.py +128 -0
- sky/jobs/log_gc.py +193 -0
- sky/jobs/recovery_strategy.py +250 -100
- sky/jobs/scheduler.py +271 -173
- sky/jobs/server/core.py +367 -114
- sky/jobs/server/server.py +81 -35
- sky/jobs/server/utils.py +89 -35
- sky/jobs/state.py +1498 -620
- sky/jobs/utils.py +771 -306
- sky/logs/agent.py +40 -5
- sky/logs/aws.py +9 -19
- sky/metrics/utils.py +282 -39
- sky/models.py +2 -0
- sky/optimizer.py +7 -6
- sky/provision/__init__.py +38 -1
- sky/provision/aws/config.py +34 -13
- sky/provision/aws/instance.py +5 -2
- sky/provision/azure/instance.py +5 -3
- sky/provision/common.py +22 -0
- sky/provision/cudo/instance.py +4 -3
- sky/provision/do/instance.py +4 -3
- sky/provision/docker_utils.py +112 -28
- sky/provision/fluidstack/instance.py +6 -5
- sky/provision/gcp/config.py +6 -1
- sky/provision/gcp/instance.py +4 -2
- sky/provision/hyperbolic/instance.py +4 -2
- sky/provision/instance_setup.py +66 -20
- sky/provision/kubernetes/__init__.py +2 -0
- sky/provision/kubernetes/config.py +7 -44
- sky/provision/kubernetes/constants.py +0 -1
- sky/provision/kubernetes/instance.py +609 -213
- sky/provision/kubernetes/manifests/fusermount-server-daemonset.yaml +1 -2
- sky/provision/kubernetes/network.py +12 -8
- sky/provision/kubernetes/network_utils.py +8 -25
- sky/provision/kubernetes/utils.py +422 -422
- sky/provision/kubernetes/volume.py +150 -18
- sky/provision/lambda_cloud/instance.py +16 -13
- sky/provision/nebius/instance.py +6 -2
- sky/provision/nebius/utils.py +103 -86
- sky/provision/oci/instance.py +4 -2
- sky/provision/paperspace/instance.py +4 -3
- sky/provision/primeintellect/__init__.py +10 -0
- sky/provision/primeintellect/config.py +11 -0
- sky/provision/primeintellect/instance.py +454 -0
- sky/provision/primeintellect/utils.py +398 -0
- sky/provision/provisioner.py +45 -15
- sky/provision/runpod/__init__.py +2 -0
- sky/provision/runpod/instance.py +4 -3
- sky/provision/runpod/volume.py +69 -13
- sky/provision/scp/instance.py +307 -130
- sky/provision/seeweb/__init__.py +11 -0
- sky/provision/seeweb/config.py +13 -0
- sky/provision/seeweb/instance.py +812 -0
- sky/provision/shadeform/__init__.py +11 -0
- sky/provision/shadeform/config.py +12 -0
- sky/provision/shadeform/instance.py +351 -0
- sky/provision/shadeform/shadeform_utils.py +83 -0
- sky/provision/slurm/__init__.py +12 -0
- sky/provision/slurm/config.py +13 -0
- sky/provision/slurm/instance.py +572 -0
- sky/provision/slurm/utils.py +583 -0
- sky/provision/vast/instance.py +9 -4
- sky/provision/vast/utils.py +10 -6
- sky/provision/volume.py +164 -0
- sky/provision/vsphere/common/ssl_helper.py +1 -1
- sky/provision/vsphere/common/vapiconnect.py +2 -1
- sky/provision/vsphere/common/vim_utils.py +3 -2
- sky/provision/vsphere/instance.py +8 -6
- sky/provision/vsphere/vsphere_utils.py +8 -1
- sky/resources.py +11 -3
- sky/schemas/api/responses.py +107 -6
- sky/schemas/db/global_user_state/008_skylet_ssh_tunnel_metadata.py +34 -0
- sky/schemas/db/global_user_state/009_last_activity_and_launched_at.py +89 -0
- sky/schemas/db/global_user_state/010_save_ssh_key.py +66 -0
- sky/schemas/db/global_user_state/011_is_ephemeral.py +34 -0
- sky/schemas/db/kv_cache/001_initial_schema.py +29 -0
- sky/schemas/db/serve_state/002_yaml_content.py +34 -0
- sky/schemas/db/skypilot_config/001_initial_schema.py +30 -0
- sky/schemas/db/spot_jobs/002_cluster_pool.py +3 -3
- sky/schemas/db/spot_jobs/004_job_file_contents.py +42 -0
- sky/schemas/db/spot_jobs/005_logs_gc.py +38 -0
- sky/schemas/db/spot_jobs/006_controller_pid_started_at.py +34 -0
- sky/schemas/db/spot_jobs/007_config_file_content.py +34 -0
- sky/schemas/generated/jobsv1_pb2.py +86 -0
- sky/schemas/generated/jobsv1_pb2.pyi +254 -0
- sky/schemas/generated/jobsv1_pb2_grpc.py +542 -0
- sky/schemas/generated/managed_jobsv1_pb2.py +76 -0
- sky/schemas/generated/managed_jobsv1_pb2.pyi +278 -0
- sky/schemas/generated/managed_jobsv1_pb2_grpc.py +278 -0
- sky/schemas/generated/servev1_pb2.py +58 -0
- sky/schemas/generated/servev1_pb2.pyi +115 -0
- sky/schemas/generated/servev1_pb2_grpc.py +322 -0
- sky/serve/autoscalers.py +2 -0
- sky/serve/client/impl.py +55 -21
- sky/serve/constants.py +4 -3
- sky/serve/controller.py +17 -11
- sky/serve/load_balancing_policies.py +1 -1
- sky/serve/replica_managers.py +219 -142
- sky/serve/serve_rpc_utils.py +179 -0
- sky/serve/serve_state.py +63 -54
- sky/serve/serve_utils.py +145 -109
- sky/serve/server/core.py +46 -25
- sky/serve/server/impl.py +311 -162
- sky/serve/server/server.py +21 -19
- sky/serve/service.py +84 -68
- sky/serve/service_spec.py +45 -7
- sky/server/auth/loopback.py +38 -0
- sky/server/auth/oauth2_proxy.py +12 -7
- sky/server/common.py +47 -24
- sky/server/config.py +62 -28
- sky/server/constants.py +9 -1
- sky/server/daemons.py +109 -38
- sky/server/metrics.py +76 -96
- sky/server/middleware_utils.py +166 -0
- sky/server/plugins.py +222 -0
- sky/server/requests/executor.py +384 -145
- sky/server/requests/payloads.py +83 -19
- sky/server/requests/preconditions.py +15 -13
- sky/server/requests/request_names.py +123 -0
- sky/server/requests/requests.py +511 -157
- sky/server/requests/serializers/decoders.py +48 -17
- sky/server/requests/serializers/encoders.py +102 -20
- sky/server/requests/serializers/return_value_serializers.py +60 -0
- sky/server/requests/threads.py +117 -0
- sky/server/rest.py +116 -24
- sky/server/server.py +497 -179
- sky/server/server_utils.py +30 -0
- sky/server/stream_utils.py +219 -45
- sky/server/uvicorn.py +30 -19
- sky/setup_files/MANIFEST.in +6 -1
- sky/setup_files/alembic.ini +8 -0
- sky/setup_files/dependencies.py +64 -19
- sky/setup_files/setup.py +44 -44
- sky/sky_logging.py +13 -5
- sky/skylet/attempt_skylet.py +116 -24
- sky/skylet/configs.py +3 -1
- sky/skylet/constants.py +139 -29
- sky/skylet/events.py +74 -14
- sky/skylet/executor/__init__.py +1 -0
- sky/skylet/executor/slurm.py +189 -0
- sky/skylet/job_lib.py +143 -105
- sky/skylet/log_lib.py +252 -8
- sky/skylet/log_lib.pyi +47 -7
- sky/skylet/providers/ibm/node_provider.py +12 -8
- sky/skylet/providers/ibm/vpc_provider.py +13 -12
- sky/skylet/runtime_utils.py +21 -0
- sky/skylet/services.py +524 -0
- sky/skylet/skylet.py +27 -2
- sky/skylet/subprocess_daemon.py +104 -28
- sky/skypilot_config.py +99 -79
- sky/ssh_node_pools/constants.py +12 -0
- sky/ssh_node_pools/core.py +40 -3
- sky/ssh_node_pools/deploy/__init__.py +4 -0
- sky/ssh_node_pools/deploy/deploy.py +952 -0
- sky/ssh_node_pools/deploy/tunnel_utils.py +199 -0
- sky/ssh_node_pools/deploy/utils.py +173 -0
- sky/ssh_node_pools/server.py +20 -21
- sky/{utils/kubernetes/ssh_utils.py → ssh_node_pools/utils.py} +9 -6
- sky/task.py +221 -104
- sky/templates/aws-ray.yml.j2 +1 -0
- sky/templates/azure-ray.yml.j2 +1 -0
- sky/templates/cudo-ray.yml.j2 +1 -0
- sky/templates/do-ray.yml.j2 +1 -0
- sky/templates/fluidstack-ray.yml.j2 +1 -0
- sky/templates/gcp-ray.yml.j2 +1 -0
- sky/templates/hyperbolic-ray.yml.j2 +1 -0
- sky/templates/ibm-ray.yml.j2 +2 -1
- sky/templates/jobs-controller.yaml.j2 +3 -0
- sky/templates/kubernetes-ray.yml.j2 +204 -55
- sky/templates/lambda-ray.yml.j2 +1 -0
- sky/templates/nebius-ray.yml.j2 +3 -0
- sky/templates/oci-ray.yml.j2 +1 -0
- sky/templates/paperspace-ray.yml.j2 +1 -0
- sky/templates/primeintellect-ray.yml.j2 +72 -0
- sky/templates/runpod-ray.yml.j2 +1 -0
- sky/templates/scp-ray.yml.j2 +1 -0
- sky/templates/seeweb-ray.yml.j2 +171 -0
- sky/templates/shadeform-ray.yml.j2 +73 -0
- sky/templates/slurm-ray.yml.j2 +85 -0
- sky/templates/vast-ray.yml.j2 +2 -0
- sky/templates/vsphere-ray.yml.j2 +1 -0
- sky/templates/websocket_proxy.py +188 -43
- sky/usage/usage_lib.py +16 -4
- sky/users/model.conf +1 -1
- sky/users/permission.py +84 -44
- sky/users/rbac.py +31 -3
- sky/utils/accelerator_registry.py +6 -3
- sky/utils/admin_policy_utils.py +18 -5
- sky/utils/annotations.py +128 -6
- sky/utils/asyncio_utils.py +78 -0
- sky/utils/atomic.py +1 -1
- sky/utils/auth_utils.py +153 -0
- sky/utils/cli_utils/status_utils.py +12 -7
- sky/utils/cluster_utils.py +28 -6
- sky/utils/command_runner.py +283 -30
- sky/utils/command_runner.pyi +63 -7
- sky/utils/common.py +3 -1
- sky/utils/common_utils.py +55 -7
- sky/utils/config_utils.py +1 -14
- sky/utils/context.py +127 -40
- sky/utils/context_utils.py +73 -18
- sky/utils/controller_utils.py +229 -70
- sky/utils/db/db_utils.py +95 -18
- sky/utils/db/kv_cache.py +149 -0
- sky/utils/db/migration_utils.py +24 -7
- sky/utils/env_options.py +4 -0
- sky/utils/git.py +559 -1
- sky/utils/kubernetes/create_cluster.sh +15 -30
- sky/utils/kubernetes/delete_cluster.sh +10 -7
- sky/utils/kubernetes/generate_kind_config.py +6 -66
- sky/utils/kubernetes/gpu_labeler.py +13 -3
- sky/utils/kubernetes/k8s_gpu_labeler_job.yaml +2 -1
- sky/utils/kubernetes/k8s_gpu_labeler_setup.yaml +16 -16
- sky/utils/kubernetes/kubernetes_deploy_utils.py +187 -260
- sky/utils/kubernetes/rsync_helper.sh +11 -3
- sky/utils/kubernetes/ssh-tunnel.sh +7 -376
- sky/utils/kubernetes_enums.py +7 -15
- sky/utils/lock_events.py +4 -4
- sky/utils/locks.py +128 -31
- sky/utils/log_utils.py +0 -319
- sky/utils/resource_checker.py +13 -10
- sky/utils/resources_utils.py +53 -29
- sky/utils/rich_utils.py +8 -4
- sky/utils/schemas.py +138 -52
- sky/utils/subprocess_utils.py +17 -4
- sky/utils/thread_utils.py +91 -0
- sky/utils/timeline.py +2 -1
- sky/utils/ux_utils.py +35 -1
- sky/utils/volume.py +88 -4
- sky/utils/yaml_utils.py +9 -0
- sky/volumes/client/sdk.py +48 -10
- sky/volumes/server/core.py +59 -22
- sky/volumes/server/server.py +46 -17
- sky/volumes/volume.py +54 -42
- sky/workspaces/core.py +57 -21
- sky/workspaces/server.py +13 -12
- sky_templates/README.md +3 -0
- sky_templates/__init__.py +3 -0
- sky_templates/ray/__init__.py +0 -0
- sky_templates/ray/start_cluster +183 -0
- sky_templates/ray/stop_cluster +75 -0
- {skypilot_nightly-1.0.0.dev20250905.dist-info → skypilot_nightly-1.0.0.dev20251210.dist-info}/METADATA +343 -65
- skypilot_nightly-1.0.0.dev20251210.dist-info/RECORD +629 -0
- skypilot_nightly-1.0.0.dev20251210.dist-info/top_level.txt +2 -0
- sky/client/cli/git.py +0 -549
- sky/dashboard/out/_next/static/chunks/1121-408ed10b2f9fce17.js +0 -1
- sky/dashboard/out/_next/static/chunks/1141-943efc7aff0f0c06.js +0 -1
- sky/dashboard/out/_next/static/chunks/1836-37fede578e2da5f8.js +0 -40
- sky/dashboard/out/_next/static/chunks/3015-86cabed5d4669ad0.js +0 -1
- sky/dashboard/out/_next/static/chunks/3294.c80326aec9bfed40.js +0 -6
- sky/dashboard/out/_next/static/chunks/3785.4872a2f3aa489880.js +0 -1
- sky/dashboard/out/_next/static/chunks/3850-ff4a9a69d978632b.js +0 -1
- sky/dashboard/out/_next/static/chunks/4045.b30465273dc5e468.js +0 -21
- sky/dashboard/out/_next/static/chunks/4676-9da7fdbde90b5549.js +0 -10
- sky/dashboard/out/_next/static/chunks/4725.10f7a9a5d3ea8208.js +0 -1
- sky/dashboard/out/_next/static/chunks/5339.3fda4a4010ff4e06.js +0 -51
- sky/dashboard/out/_next/static/chunks/6135-4b4d5e824b7f9d3c.js +0 -1
- sky/dashboard/out/_next/static/chunks/649.b9d7f7d10c1b8c53.js +0 -45
- sky/dashboard/out/_next/static/chunks/6856-dca7962af4814e1b.js +0 -1
- sky/dashboard/out/_next/static/chunks/6990-08b2a1cae076a943.js +0 -1
- sky/dashboard/out/_next/static/chunks/7325.b4bc99ce0892dcd5.js +0 -6
- sky/dashboard/out/_next/static/chunks/754-d0da8ab45f9509e9.js +0 -18
- sky/dashboard/out/_next/static/chunks/7669.1f5d9a402bf5cc42.js +0 -36
- sky/dashboard/out/_next/static/chunks/8969-0be3036bf86f8256.js +0 -1
- sky/dashboard/out/_next/static/chunks/9025.c12318fb6a1a9093.js +0 -6
- sky/dashboard/out/_next/static/chunks/9037-fa1737818d0a0969.js +0 -6
- sky/dashboard/out/_next/static/chunks/pages/_app-ce361c6959bc2001.js +0 -34
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-1cbba24bd1bd35f8.js +0 -16
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-0b4b35dc1dfe046c.js +0 -16
- sky/dashboard/out/_next/static/chunks/pages/clusters-469814d711d63b1b.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-dd64309c3fe67ed2.js +0 -11
- sky/dashboard/out/_next/static/chunks/pages/jobs/pools/[pool]-07349868f7905d37.js +0 -16
- sky/dashboard/out/_next/static/chunks/pages/jobs-1f70d9faa564804f.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/users-018bf31cda52e11b.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/volumes-739726d6b823f532.js +0 -1
- sky/dashboard/out/_next/static/chunks/webpack-4fe903277b57b523.js +0 -1
- sky/dashboard/out/_next/static/css/4614e06482d7309e.css +0 -3
- sky/dashboard/out/_next/static/mS-4qZPSkRuA1u-g2wQhg/_buildManifest.js +0 -1
- sky/templates/kubernetes-ssh-jump.yml.j2 +0 -94
- sky/utils/kubernetes/cleanup-tunnel.sh +0 -62
- sky/utils/kubernetes/deploy_remote_cluster.py +0 -1299
- sky/utils/kubernetes/ssh_jump_lifecycle_manager.py +0 -191
- skypilot_nightly-1.0.0.dev20250905.dist-info/RECORD +0 -547
- skypilot_nightly-1.0.0.dev20250905.dist-info/top_level.txt +0 -1
- /sky/dashboard/out/_next/static/{mS-4qZPSkRuA1u-g2wQhg → KYAhEFa3FTfq4JyKVgo-s}/_ssgManifest.js +0 -0
- {skypilot_nightly-1.0.0.dev20250905.dist-info → skypilot_nightly-1.0.0.dev20251210.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20250905.dist-info → skypilot_nightly-1.0.0.dev20251210.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250905.dist-info → skypilot_nightly-1.0.0.dev20251210.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7669,7325],{27325:function(e,s,t){t.d(s,{Z:function(){return r}});/**
|
|
2
|
-
* @license lucide-react v0.407.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/let r=(0,t(60998).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},16826:function(e,s,t){t.d(s,{Z:function(){return r}});/**
|
|
7
|
-
* @license lucide-react v0.407.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/let r=(0,t(60998).Z)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},81260:function(e,s,t){t.d(s,{Z:function(){return r}});/**
|
|
12
|
-
* @license lucide-react v0.407.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/let r=(0,t(60998).Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},47603:function(e,s,t){t.d(s,{Z:function(){return r}});/**
|
|
17
|
-
* @license lucide-react v0.407.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/let r=(0,t(60998).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},1812:function(e,s,t){t.d(s,{X:function(){return l}});var r=t(85893),n=t(67294);let a=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let s=e.message;return s.includes("failed:")&&(s=s.split("failed:")[1].trim()),s},l=e=>{let{error:s,title:t="Error",onDismiss:l}=e,[i,o]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{s&&o(!1)},[s]),!s||i)return null;let c="string"==typeof s?s:a(s);return(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,r.jsx)("div",{className:"ml-3",children:(0,r.jsxs)("div",{className:"text-sm text-red-800",children:[(0,r.jsxs)("strong",{children:[t,":"]})," ",c]})})]}),(0,r.jsx)("button",{onClick:()=>{o(!0),l&&l()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,r.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},68764:function(e,s,t){t.d(s,{RM:function(){return o},SC:function(){return c},iA:function(){return l},pj:function(){return u},ss:function(){return d},xD:function(){return i}});var r=t(85893),n=t(67294),a=t(32350);let l=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("div",{className:"relative w-full overflow-auto",children:(0,r.jsx)("table",{ref:s,className:(0,a.cn)("w-full caption-bottom text-base",t),...n})})});l.displayName="Table";let i=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("thead",{ref:s,className:(0,a.cn)("[&_tr]:border-b",t),...n})});i.displayName="TableHeader";let o=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("tbody",{ref:s,className:(0,a.cn)("[&_tr:last-child]:border-0",t),...n})});o.displayName="TableBody",n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("tfoot",{ref:s,className:(0,a.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...n})}).displayName="TableFooter";let c=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("tr",{ref:s,className:(0,a.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...n})});c.displayName="TableRow";let d=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("th",{ref:s,className:(0,a.cn)("h-12 px-4 text-left align-middle font-medium text-[hsl(var(--text-strong))] [&:has([role=checkbox])]:pr-0",t),...n})});d.displayName="TableHead";let u=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("td",{ref:s,className:(0,a.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...n})});u.displayName="TableCell",n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,r.jsx)("caption",{ref:s,className:(0,a.cn)("mt-4 text-base text-muted-foreground",t),...n})}).displayName="TableCaption"},27669:function(e,s,t){t.r(s),t.d(s,{Users:function(){return B}});var r=t(85893),n=t(67294),a=t(45697),l=t.n(a),i=t(55739),o=t(41664),c=t.n(o),d=t(11163),u=t(30803),m=t(68764),x=t(53081),h=t(23266),p=t(68969),g=t(6378),f=t(36856),b=t(51214),j=t(94545),v=t(36989),y=t(60998);/**
|
|
22
|
-
* @license lucide-react v0.407.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/let w=(0,y.Z)("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);var N=t(13626),k=t(81260);/**
|
|
27
|
-
* @license lucide-react v0.407.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/let C=(0,y.Z)("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]),_=(0,y.Z)("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var S=t(16826),R=t(70282),E=t(43767);/**
|
|
32
|
-
* @license lucide-react v0.407.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/let D=(0,y.Z)("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),I=(0,y.Z)("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);var Z=t(47603),L=t(27325);t(6135);var F=t(23001),U=t(37673),T=t(47145),A=t(50326),M=t(1812);let z=(e,s)=>e&&e.includes("@")?e.split("@")[0]:e||"N/A",P=(e,s)=>e&&e.includes("@")?e:s||"-",V=b.nb.REFRESH_INTERVAL,q=e=>{let{message:s,onDismiss:t}=e;return s?(0,r.jsx)("div",{className:"bg-green-50 border border-green-200 rounded p-4 mb-6",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)("svg",{className:"h-5 w-5 text-green-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}),(0,r.jsx)("div",{className:"ml-3",children:(0,r.jsx)("p",{className:"text-sm font-medium text-green-800",children:s})})]}),t&&(0,r.jsx)("div",{className:"ml-auto pl-3",children:(0,r.jsx)("div",{className:"-mx-1.5 -my-1.5",children:(0,r.jsxs)("button",{type:"button",onClick:t,className:"inline-flex rounded-md bg-green-50 p-1.5 text-green-500 hover:bg-green-100 focus:outline-none focus:ring-2 focus:ring-green-600 focus:ring-offset-2 focus:ring-offset-green-50",children:[(0,r.jsx)("span",{className:"sr-only",children:"Dismiss"}),(0,r.jsx)("svg",{className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})]})})})]})}):null};function B(){let e=(0,d.useRouter)(),[s,t]=(0,n.useState)(!1),a=(0,n.useRef)(null),l=(0,F.X)(),[o,c]=(0,n.useState)(!1),[m,f]=(0,n.useState)({username:"",password:"",role:"user"}),[b,j]=(0,n.useState)(!1),[v,y]=(0,n.useState)({open:!1,message:"",userName:""}),[R,E]=(0,n.useState)(null),[D,I]=(0,n.useState)(!1),[Z,L]=(0,n.useState)(!1),[U,z]=(0,n.useState)(!1),[P,B]=(0,n.useState)(null),[K,$]=(0,n.useState)(!1),[J,W]=(0,n.useState)(null),[Q,X]=(0,n.useState)("import"),[Y,G]=(0,n.useState)(!1),[ee,es]=(0,n.useState)(null),[et,er]=(0,n.useState)(""),[en,ea]=(0,n.useState)(!1),[el,ei]=(0,n.useState)(null),[eo,ec]=(0,n.useState)(!1),[ed,eu]=(0,n.useState)(null),[em,ex]=(0,n.useState)(null),[eh,ep]=(0,n.useState)(!1),[eg,ef]=(0,n.useState)(null),[eb,ej]=(0,n.useState)(null),[ev,ey]=(0,n.useState)(void 0),[ew,eN]=(0,n.useState)("users"),[ek,eC]=(0,n.useState)(!1),[e_,eS]=(0,n.useState)(!1),[eR,eE]=(0,n.useState)(null),[eD,eI]=(0,n.useState)(!1),[eZ,eL]=(0,n.useState)(""),[eF,eU]=(0,n.useState)("");(0,n.useEffect)(()=>{e.isReady&&("service-accounts"===e.query.tab?eN("service-accounts"):eN("users"))},[e.isReady,e.query.tab]),(0,n.useEffect)(()=>{(async function(){try{let e=await T.x.get("/api/health");if(e.ok){let s=await e.json();ey(!!s.basic_auth_enabled)}else ey(!1)}catch(e){ey(!1)}})()},[]);let eT=(0,n.useCallback)(async()=>{if(R&&Date.now()-R.timestamp<3e5)return R;I(!0);try{let e=await T.x.get("/users/role");if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to get user role")}let s=await e.json(),t={role:s.role,name:s.name,id:s.id,timestamp:Date.now()};return E(t),I(!1),t}catch(e){throw I(!1),e}},[R]);(0,n.useEffect)(()=>{eT().catch(()=>{console.error("Failed to get user role")})},[eT]);let eA=async(e,s)=>{try{let t=await eT();if("admin"!==t.role)return y({open:!0,message:e,userName:t.name.toLowerCase()}),!1;return s(),!0}catch(e){return console.error("Failed to check user role:",e),y({open:!0,message:"Error: ".concat(e.message),userName:""}),!1}},eM=()=>{g.default.invalidate(x.R),g.default.invalidate(h.getClusters),g.default.invalidate(p.getManagedJobs,[{allUsers:!0}]),a.current&&a.current()},ez=async()=>{if(!m.username||!m.password){ej(Error("Username and password are required.")),c(!1);return}j(!0),ej(null),ef(null);try{let e=await T.x.post("/users/create",m);if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to create user")}ef('User "'.concat(m.username,'" created successfully!')),c(!1),f({username:"",password:"",role:"user"}),eM()}catch(e){ej(e),c(!1),f({username:"",password:"",role:"user"})}finally{j(!1)}},eP=async e=>{let s=e.target.files[0];s&&(B(s),W(null))},eV=async()=>{if(!P){alert("Please select a CSV file first.");return}$(!0);try{let e=new FileReader;e.onload=async e=>{try{let s=e.target.result,t=await T.x.post("/users/import",{csv_content:s});if(!t.ok){let e=await t.json();throw Error(e.detail||"Failed to import users")}let r=await t.json(),n="Import completed. ".concat(r.success_count," users created successfully.");r.error_count>0&&(n+="\n".concat(r.error_count," failed."),r.creation_errors.length>0&&(n+="\nErrors: ".concat(r.creation_errors.slice(0,3).join(", ")),r.creation_errors.length>3&&(n+=" and ".concat(r.creation_errors.length-3," more...")))),W({message:n}),r.success_count>0&&eM()}catch(e){alert("Error importing users: ".concat(e.message))}finally{$(!1)}},e.readAsText(P)}catch(e){alert("Error reading file: ".concat(e.message)),$(!1)}},eq=async e=>{es(e),er(""),G(!0)},eB=async()=>{if(!et){ej(Error("Please enter a new password."));return}ea(!0),ei(null);try{let e=await T.x.post("/users/update",{user_id:ee.userId,password:et});if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to reset password")}ef('Password reset successfully for user "'.concat(ee.usernameDisplay,'"!')),G(!1),es(null),er("")}catch(e){G(!1),es(null),er(""),ei(null),ej(e)}finally{ea(!1)}},eO=async()=>{if(ed){ep(!0),ex(null);try{let e=await T.x.post("/users/delete",{user_id:ed.userId});if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to delete user")}ef('User "'.concat(ed.usernameDisplay,'" deleted successfully!')),ec(!1),eu(null),eM()}catch(e){ec(!1),eu(null),ex(null),ej(e)}finally{ep(!1)}}},eH=()=>{ec(!1),eu(null)},eK=()=>{G(!1),es(null),er("")};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)("button",{className:"leading-none mr-6 pb-2 px-2 border-b-2 ".concat("users"===ew?"text-sky-blue border-sky-500":"text-gray-500 hover:text-gray-700 border-transparent"),onClick:()=>{eN("users"),e.push("/users",void 0,{shallow:!0})},children:"Users"}),(0,r.jsx)("button",{className:"leading-none pb-2 px-2 border-b-2 ".concat("service-accounts"===ew?"text-sky-blue border-sky-500":"text-gray-500 hover:text-gray-700 border-transparent"),onClick:()=>{eN("service-accounts"),e.push("/users?tab=service-accounts",void 0,{shallow:!0})},children:"Service Accounts"})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[s&&(0,r.jsxs)("div",{className:"flex items-center mr-2",children:[(0,r.jsx)(i.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),"users"===ew&&ev&&(null==R?void 0:R.role)==="admin"&&(0,r.jsx)("button",{onClick:async()=>{await eA("cannot create users",()=>{c(!0)})},className:"text-sky-blue hover:text-sky-blue-bright flex items-center rounded px-2 py-1 mr-2",title:"Create New User",children:"+ New User"}),"users"===ew&&ev&&(null==R?void 0:R.role)==="admin"&&(0,r.jsxs)("button",{onClick:async()=>{await eA("cannot import users",()=>{z(!0)})},className:"text-sky-blue hover:text-sky-blue-bright flex items-center rounded px-2 py-1 mr-2",title:"Import/Export Users",children:[(0,r.jsx)(w,{className:"h-4 w-4 mr-1"}),"Import/Export"]}),(0,r.jsxs)("button",{onClick:eM,disabled:s,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,r.jsx)(N.Z,{className:"h-4 w-4 mr-1.5"}),!l&&(0,r.jsx)("span",{children:"Refresh"})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"relative flex-1 max-w-md",children:[(0,r.jsx)("input",{type:"text",placeholder:"users"===ew?"Search users by name, email, or role":"Search by service account name, or created by",value:"users"===ew?eZ:eF,onChange:e=>{"users"===ew?eL(e.target.value):eU(e.target.value)},className:"h-8 w-full px-3 pr-8 text-sm border border-gray-300 rounded-md focus:ring-1 focus:ring-sky-500 focus:border-sky-500 outline-none"}),("users"===ew&&eZ||"service-accounts"===ew&&eF)&&(0,r.jsx)("button",{onClick:()=>{"users"===ew?eL(""):eU("")},className:"absolute right-2 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600",title:"Clear search",children:(0,r.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),"service-accounts"===ew&&(0,r.jsxs)("button",{onClick:()=>{eA("cannot create service account tokens",()=>{eC(!0)})},className:"ml-4 bg-sky-600 hover:bg-sky-700 text-white flex items-center rounded-md px-3 py-1 text-sm font-medium transition-colors duration-200",title:"Create Service Account",children:[(0,r.jsx)(k.Z,{className:"h-4 w-4 mr-2"}),"Create Service Account"]})]}),(0,r.jsxs)("div",{className:"fixed top-20 right-4 z-[9999] max-w-md",children:[(0,r.jsx)(q,{message:eg,onDismiss:()=>ef(null)}),(0,r.jsx)(M.X,{error:eb,title:"Error",onDismiss:()=>ej(null)})]}),"users"===ew?(0,r.jsx)(O,{refreshInterval:V,setLoading:t,refreshDataRef:a,checkPermissionAndAct:eA,roleLoading:D,onResetPassword:eq,onDeleteUser:e=>{eA("cannot delete users",()=>{eu(e),ec(!0)})},basicAuthEnabled:ev,currentUserRole:null==R?void 0:R.role,currentUserId:null==R?void 0:R.id,searchQuery:eZ,setSearchQuery:eL}):(0,r.jsx)(H,{checkPermissionAndAct:eA,userRoleCache:R,setCreateSuccess:ef,setCreateError:ej,showCreateDialog:ek,setShowCreateDialog:eC,showRotateDialog:e_,setShowRotateDialog:eS,tokenToRotate:eR,setTokenToRotate:eE,rotating:eD,setRotating:eI,searchQuery:eF,setSearchQuery:eU}),(0,r.jsx)(A.Vq,{open:o,onOpenChange:e=>{c(e),e||ej(null)},children:(0,r.jsxs)(A.cZ,{className:"sm:max-w-md",children:[(0,r.jsx)(A.fK,{children:(0,r.jsx)(A.$N,{children:"Create User"})}),(0,r.jsxs)("div",{className:"flex flex-col gap-4 py-4",children:[(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Username"}),(0,r.jsx)("input",{className:"border rounded px-3 py-2 w-full",placeholder:"Username",value:m.username,onChange:e=>f({...m,username:e.target.value})})]}),(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Password"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{className:"border rounded px-3 py-2 w-full pr-10",placeholder:"Password",type:Z?"text":"password",value:m.password,onChange:e=>f({...m,password:e.target.value})}),(0,r.jsx)("button",{type:"button",className:"absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400 hover:text-gray-600",onClick:()=>L(!Z),children:Z?(0,r.jsx)(C,{className:"h-4 w-4"}):(0,r.jsx)(_,{className:"h-4 w-4"})})]})]}),(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Role"}),(0,r.jsxs)("select",{className:"border rounded px-3 py-2 w-full",value:m.role,onChange:e=>f({...m,role:e.target.value}),children:[(0,r.jsx)("option",{value:"user",children:"User"}),(0,r.jsx)("option",{value:"admin",children:"Admin"})]})]})]}),(0,r.jsxs)(A.cN,{children:[(0,r.jsx)("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2",onClick:()=>c(!1),disabled:b,children:"Cancel"}),(0,r.jsx)("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-sky-600 text-white hover:bg-sky-700 h-10 px-4 py-2",onClick:ez,disabled:b,children:b?"Creating...":"Create"})]})]})}),(0,r.jsx)(A.Vq,{open:v.open,onOpenChange:e=>{y(s=>({...s,open:e})),e||ej(null)},children:(0,r.jsxs)(A.cZ,{className:"sm:max-w-md transition-all duration-200 ease-in-out",children:[(0,r.jsxs)(A.fK,{children:[(0,r.jsx)(A.$N,{children:"Permission Denied"}),(0,r.jsx)(A.Be,{children:D?(0,r.jsxs)("div",{className:"flex items-center py-2",children:[(0,r.jsx)(i.Z,{size:16,className:"mr-2"}),(0,r.jsx)("span",{children:"Checking permissions..."})]}):(0,r.jsx)(r.Fragment,{children:v.userName?(0,r.jsxs)(r.Fragment,{children:[v.userName," is logged in as non-admin and ",v.message,"."]}):v.message})})]}),(0,r.jsx)(A.cN,{children:(0,r.jsx)(u.z,{variant:"outline",onClick:()=>y(e=>({...e,open:!1})),disabled:D,children:"OK"})})]})}),(0,r.jsx)(A.Vq,{open:U,onOpenChange:e=>{z(e),e||ej(null)},children:(0,r.jsxs)(A.cZ,{className:"sm:max-w-lg",children:[(0,r.jsx)(A.fK,{children:(0,r.jsx)(A.$N,{children:"Import/Export Users"})}),(0,r.jsxs)("div",{className:"flex border-b border-gray-200 mb-4",children:[(0,r.jsx)("button",{className:"px-4 py-2 text-sm font-medium ".concat("import"===Q?"border-b-2 border-sky-500 text-sky-600":"text-gray-500 hover:text-gray-700"),onClick:()=>X("import"),children:"Import"}),(0,r.jsx)("button",{className:"px-4 py-2 text-sm font-medium ".concat("export"===Q?"border-b-2 border-sky-500 text-sky-600":"text-gray-500 hover:text-gray-700"),onClick:()=>X("export"),children:"Export"})]}),(0,r.jsx)("div",{className:"flex flex-col gap-4 py-4",children:"import"===Q?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"CSV File"}),(0,r.jsx)("input",{type:"file",accept:".csv",onChange:eP,className:"border rounded px-3 py-2 w-full"}),(0,r.jsxs)("p",{className:"text-xs text-gray-500",children:["CSV should have columns: username, password, role",(0,r.jsx)("br",{}),"Supports both plain text passwords and exported password hashes."]})]}),J&&(0,r.jsx)("div",{className:"p-3 bg-green-50 border border-green-200 rounded text-green-700 text-sm",children:J.message})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Export Users to CSV"}),(0,r.jsx)("p",{className:"text-xs text-gray-500",children:"Download all users as a CSV file with password hashes."}),(0,r.jsxs)("div",{className:"p-3 bg-amber-50 border border-amber-200 rounded",children:[(0,r.jsx)("p",{className:"text-sm text-amber-700",children:"⚠️ This will export all users with columns: username, password (hashed), role"}),(0,r.jsx)("p",{className:"text-xs text-amber-600 mt-1",children:"Password hashes can be imported directly for system backups."})]})]})})}),(0,r.jsxs)(A.cN,{children:[(0,r.jsx)("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2",onClick:()=>z(!1),disabled:K,children:"Cancel"}),"import"===Q?(0,r.jsx)("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-sky-600 text-white hover:bg-sky-700 h-10 px-4 py-2",onClick:eV,disabled:K||!P,children:K?"Importing...":"Import"}):(0,r.jsxs)("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-sky-600 text-white hover:bg-sky-700 h-10 px-4 py-2",onClick:async()=>{try{let e=await T.x.get("/users/export");if(!e.ok){let s=await e.json();throw Error(s.detail||"Failed to export users")}let s=await e.json(),t=s.csv_content,r=new Blob([t],{type:"text/csv;charset=utf-8;"}),n=URL.createObjectURL(r),a=document.createElement("a");a.href=n;let l=new Date,i=e=>String(e).padStart(2,"0"),o=l.getFullYear(),c=i(l.getMonth()+1),d=i(l.getDate()),u=i(l.getHours()),m=i(l.getMinutes()),x=i(l.getSeconds());a.download="users_export_".concat(o,"-").concat(c,"-").concat(d,"-").concat(u,"-").concat(m,"-").concat(x,".csv"),a.click(),URL.revokeObjectURL(n),alert("Successfully exported ".concat(s.user_count," users to CSV file."))}catch(e){alert("Error exporting users: ".concat(e.message))}},children:[(0,r.jsx)(S.Z,{className:"h-4 w-4 mr-1"}),"Export"]})]})]})}),(0,r.jsx)(A.Vq,{open:Y,onOpenChange:e=>{e||(eK(),ej(null))},children:(0,r.jsxs)(A.cZ,{className:"sm:max-w-md",children:[(0,r.jsxs)(A.fK,{children:[(0,r.jsx)(A.$N,{children:"Reset Password"}),(0,r.jsxs)(A.Be,{children:["Enter a new password for"," ",(null==ee?void 0:ee.usernameDisplay)||"this user","."]})]}),(0,r.jsx)("div",{className:"flex flex-col gap-4 py-4",children:(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"New Password"}),(0,r.jsx)("input",{type:"password",className:"border rounded px-3 py-2 w-full",placeholder:"Enter new password",value:et,onChange:e=>er(e.target.value),autoFocus:!0})]})}),(0,r.jsxs)(A.cN,{children:[(0,r.jsx)(u.z,{variant:"outline",onClick:eK,disabled:en,children:"Cancel"}),(0,r.jsx)(u.z,{variant:"default",onClick:eB,disabled:en||!et,className:"bg-sky-600 text-white hover:bg-sky-700",children:en?"Resetting...":"Reset Password"})]})]})}),(0,r.jsx)(A.Vq,{open:eo,onOpenChange:e=>{e||(eH(),ej(null))},children:(0,r.jsxs)(A.cZ,{className:"sm:max-w-md",children:[(0,r.jsxs)(A.fK,{children:[(0,r.jsx)(A.$N,{children:"Delete User"}),(0,r.jsxs)(A.Be,{children:['Are you sure you want to delete user "',(null==ed?void 0:ed.usernameDisplay)||"this user",'"? This action cannot be undone.']})]}),(0,r.jsxs)(A.cN,{children:[(0,r.jsx)(u.z,{variant:"outline",onClick:eH,disabled:eh,children:"Cancel"}),(0,r.jsx)(u.z,{variant:"destructive",onClick:eO,disabled:eh,children:eh?"Deleting...":"Delete"})]})]})})]})}function O(e){let{refreshInterval:s,setLoading:t,refreshDataRef:a,checkPermissionAndAct:l,roleLoading:o,onResetPassword:d,onDeleteUser:u,basicAuthEnabled:b,currentUserRole:y,currentUserId:w,searchQuery:N,setSearchQuery:k}=e,[C,_]=(0,n.useState)([]),[S,L]=(0,n.useState)(!0),[F,A]=(0,n.useState)(!1),[M,V]=(0,n.useState)({key:"username",direction:"ascending"}),[q,B]=(0,n.useState)(null),[O,H]=(0,n.useState)(""),K=(0,n.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&e&&t(!0),e&&L(!0);try{let s=await g.default.get(x.R),r=(s||[]).map(e=>({...e,usernameDisplay:z(e.username,e.userId),fullEmailID:P(e.username,e.userId),clusterCount:-1,jobCount:-1}));_(r),A(!0),t&&e&&t(!1),e&&L(!1);let[n,a]=await Promise.all([g.default.get(h.getClusters),g.default.get(p.getManagedJobs,[{allUsers:!0}])]),l=a.jobs||[],i=(s||[]).map(e=>{let s=(n||[]).filter(s=>s.user_hash===e.userId),t=(l||[]).filter(s=>s.user_hash===e.userId);return{...e,usernameDisplay:z(e.username,e.userId),fullEmailID:P(e.username,e.userId),clusterCount:s.length,jobCount:t.length}});_(i)}catch(s){console.error("Failed to fetch or process user data:",s),_([]),A(!0),t&&e&&t(!1),e&&L(!1)}},[t]);(0,n.useEffect)(()=>{a&&(a.current=()=>K(!0))},[a,K]),(0,n.useEffect)(()=>{(async()=>{A(!1),L(!0),await f.ZP.preloadForPage("users"),K(!0)})();let e=setInterval(()=>{K(!1)},s);return()=>clearInterval(e)},[K,s]);let $=(0,n.useMemo)(()=>{let e=C;if(null==N?void 0:N.trim()){let s=N.toLowerCase();e=C.filter(e=>{var t,r,n;return(null===(t=e.usernameDisplay)||void 0===t?void 0:t.toLowerCase().includes(s))||(null===(r=e.fullEmailID)||void 0===r?void 0:r.toLowerCase().includes(s))||(null===(n=e.role)||void 0===n?void 0:n.toLowerCase().includes(s))})}return(0,j.R0)(e,M.key,M.direction)},[C,M,N]),J=e=>{let s="ascending";M.key===e&&"ascending"===M.direction&&(s="descending"),V({key:e,direction:s})},W=e=>M.key===e?"ascending"===M.direction?" ↑":" ↓":"",Q=async(e,s)=>{await l("cannot edit user role",()=>{B(e),H(s)})},X=()=>{B(null),H("")},Y=async e=>{if(!e||!O){console.error("User ID or role is missing."),alert("Error: User ID or role is missing.");return}L(!0);try{let s=await T.x.post("/users/update",{user_id:e,role:O});if(!s.ok){let e=await s.json();throw Error(e.detail||"Failed to update role")}g.default.invalidate(x.R),await K(!0),X()}catch(e){console.error("Failed to update user role:",e),alert("Error updating role: ".concat(e.message))}finally{L(!1)}};return S&&0===C.length&&!F?(0,r.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,r.jsx)(i.Z,{})}):F?$&&0!==$.length?(0,r.jsx)(U.Zb,{children:(0,r.jsx)("div",{className:"overflow-x-auto rounded-lg",children:(0,r.jsxs)(m.iA,{className:"min-w-full",children:[(0,r.jsx)(m.xD,{children:(0,r.jsxs)(m.SC,{children:[(0,r.jsxs)(m.ss,{onClick:()=>J("usernameDisplay"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/6",children:["Name",W("usernameDisplay")]}),(0,r.jsxs)(m.ss,{onClick:()=>J("fullEmailID"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/6",children:["User ID",W("fullEmailID")]}),(0,r.jsxs)(m.ss,{onClick:()=>J("role"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/6",children:["Role",W("role")]}),(0,r.jsxs)(m.ss,{onClick:()=>J("created_at"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/6",children:["Joined",W("created_at")]}),(0,r.jsxs)(m.ss,{onClick:()=>J("clusterCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/6",children:["Clusters",W("clusterCount")]}),(0,r.jsxs)(m.ss,{onClick:()=>J("jobCount"),className:"sortable whitespace-nowrap cursor-pointer hover:bg-gray-50 w-1/6",children:["Jobs",W("jobCount")]}),(b||"admin"===y)&&(0,r.jsx)(m.ss,{className:"whitespace-nowrap w-1/7",children:"Actions"})]})}),(0,r.jsx)(m.RM,{children:$.map(e=>(0,r.jsxs)(m.SC,{children:[(0,r.jsx)(m.pj,{className:"truncate",title:e.username,children:e.usernameDisplay}),(0,r.jsx)(m.pj,{className:"truncate",title:e.fullEmailID,children:e.fullEmailID}),(0,r.jsx)(m.pj,{className:"truncate",title:e.role,children:(0,r.jsx)("div",{className:"flex items-center gap-2",children:q===e.userId?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("select",{value:O,onChange:e=>H(e.target.value),className:"block w-auto p-1 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-sky-blue focus:border-sky-blue sm:text-sm",children:[(0,r.jsx)("option",{value:"admin",children:"Admin"}),(0,r.jsx)("option",{value:"user",children:"User"})]}),(0,r.jsx)("button",{onClick:()=>Y(e.userId),className:"text-green-600 hover:text-green-800 p-1",title:"Save",children:(0,r.jsx)(R.Z,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:X,className:"text-gray-500 hover:text-gray-700 p-1",title:"Cancel",children:(0,r.jsx)(E.Z,{className:"h-4 w-4"})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"capitalize",children:e.role}),"admin"===y&&(0,r.jsx)("button",{onClick:()=>Q(e.userId,e.role),className:"text-blue-600 hover:text-blue-700 p-1",title:"Edit role",children:(0,r.jsx)(D,{className:"h-3 w-3"})})]})})}),(0,r.jsx)(m.pj,{className:"truncate",children:e.created_at?(0,r.jsx)(v.Zg,{date:new Date(1e3*e.created_at)}):"-"}),(0,r.jsx)(m.pj,{children:-1===e.clusterCount?(0,r.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-400 rounded text-xs font-medium flex items-center",children:[(0,r.jsx)(i.Z,{size:10,className:"mr-1"}),"Loading..."]}):(0,r.jsx)(c(),{href:"/clusters?user=".concat(encodeURIComponent(e.userId)),className:"px-2 py-0.5 rounded text-xs font-medium transition-colors duration-200 cursor-pointer inline-block ".concat(e.clusterCount>0?"bg-blue-100 text-blue-600 hover:bg-blue-200 hover:text-blue-700":"bg-gray-100 text-gray-500 hover:bg-gray-200 hover:text-gray-700"),title:"View ".concat(e.clusterCount," cluster").concat(1!==e.clusterCount?"s":""," for ").concat(e.usernameDisplay),children:e.clusterCount})}),(0,r.jsx)(m.pj,{children:-1===e.jobCount?(0,r.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-400 rounded text-xs font-medium flex items-center",children:[(0,r.jsx)(i.Z,{size:10,className:"mr-1"}),"Loading..."]}):(0,r.jsx)(c(),{href:"/jobs?user=".concat(encodeURIComponent(e.userId)),className:"px-2 py-0.5 rounded text-xs font-medium transition-colors duration-200 cursor-pointer inline-block ".concat(e.jobCount>0?"bg-green-100 text-green-600 hover:bg-green-200 hover:text-green-700":"bg-gray-100 text-gray-500 hover:bg-gray-200 hover:text-gray-700"),title:"View ".concat(e.jobCount," job").concat(1!==e.jobCount?"s":""," for ").concat(e.usernameDisplay),children:e.jobCount})}),(b||"admin"===y)&&(0,r.jsx)(m.pj,{className:"relative",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[b&&(0,r.jsx)("button",{onClick:"admin"===y||e.userId===w?async()=>{d(e)}:void 0,className:"admin"===y||e.userId===w?"text-blue-600 hover:text-blue-700 p-1":"text-gray-300 cursor-not-allowed p-1",title:"admin"===y||e.userId===w?"Reset Password":"You can only reset your own password",disabled:"admin"!==y&&e.userId!==w,children:(0,r.jsx)(I,{className:"h-4 w-4"})}),"admin"===y&&(0,r.jsx)("button",{onClick:()=>u(e),className:"text-red-600 hover:text-red-700 p-1",title:"Delete User",children:(0,r.jsx)(Z.Z,{className:"h-4 w-4"})})]})})]},e.userId))})]})})}):(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)("p",{className:"text-lg font-semibold text-gray-500",children:(null==N?void 0:N.trim())?"No users match your search.":"No users found."}),(0,r.jsx)("p",{className:"text-sm text-gray-400 mt-1",children:(null==N?void 0:N.trim())?"Try adjusting your search terms.":"There are currently no users to display."})]}):(0,r.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,r.jsx)(i.Z,{}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading users..."})]})}function H(e){let{checkPermissionAndAct:s,userRoleCache:t,setCreateSuccess:a,setCreateError:l,showCreateDialog:o,setShowCreateDialog:d,showRotateDialog:u,setShowRotateDialog:x,tokenToRotate:f,setTokenToRotate:b,rotating:j,setRotating:y,searchQuery:w,setSearchQuery:k}=e,[C,_]=(0,n.useState)([]),[S,F]=(0,n.useState)(!0),[M,z]=(0,n.useState)(!1),[P,V]=(0,n.useState)(null),[q,B]=(0,n.useState)(null),[O,H]=(0,n.useState)({token_name:"",expires_in_days:30}),[K,$]=(0,n.useState)(""),[J,W]=(0,n.useState)(!1),[Q,X]=(0,n.useState)(!1),[Y,G]=(0,n.useState)(""),[ee,es]=(0,n.useState)(null),[et,er]=(0,n.useState)(null),[en,ea]=(0,n.useState)(null),[el,ei]=(0,n.useState)(""),[eo,ec]=(0,n.useState)([]),ed=async()=>{try{F(!0);let e=await T.x.get("/users/service-account-tokens");if(!e.ok){console.error("Failed to fetch tokens"),_([]),ec([]);return}let s=await e.json();_(s||[]);let[t,r]=await Promise.all([g.default.get(h.getClusters),g.default.get(p.getManagedJobs,[{allUsers:!0}])]),n=t||[],a=(null==r?void 0:r.jobs)||[],l=(s||[]).map(e=>{let s=e.service_account_user_id,t=n.filter(e=>e.user_hash===s),r=a.filter(e=>e.user_hash===s);return{...e,clusterCount:t.length,jobCount:r.length,primaryRole:e.service_account_roles&&e.service_account_roles.length>0?e.service_account_roles[0]:"user"}});ec(l)}catch(e){console.error("Error fetching tokens and counts:",e),_([]),ec([])}finally{F(!1)}};(0,n.useEffect)(()=>{ed()},[]);let eu=async(e,t)=>{await s("cannot edit service account role",()=>{ea(e),ei(t)})},em=()=>{ea(null),ei("")},ex=async e=>{if(!e||!el){console.error("Token ID or role is missing."),l(Error("Token ID or role is missing."));return}F(!0);try{let s=await T.x.post("/users/service-account-tokens/update-role",{token_id:e,role:el});if(!s.ok){let e=await s.json();throw Error(e.detail||"Failed to update role")}a("Service account role updated successfully!"),await ed(),em()}catch(e){console.error("Failed to update service account role:",e),l(e)}finally{F(!1)}},eh=async e=>{try{await navigator.clipboard.writeText(e),G("Copied!"),setTimeout(()=>G(""),2e3)}catch(e){console.error("Failed to copy:",e)}},ep=async()=>{if(!O.token_name.trim()){l(Error("Token name is required"));return}W(!0);try{let e={token_name:O.token_name.trim(),expires_in_days:""===O.expires_in_days?null:O.expires_in_days},s=await T.x.post("/users/service-account-tokens",e);if(s.ok){let e=await s.json();es(e.token),H({token_name:"",expires_in_days:30}),await ed()}else{let e=await s.json();throw Error(e.detail||"Failed to create token")}}catch(e){l(e)}finally{W(!1)}},eg=async()=>{if(P){X(!0),B(null);try{let e=await T.x.post("/users/service-account-tokens/delete",{token_id:P.token_id});if(e.ok)a('Service account "'.concat(P.token_name,'" deleted successfully!')),z(!1),V(null),B(null),await ed();else{let s=await e.json();throw Error(s.detail||"Failed to delete service account")}}catch(e){z(!1),V(null),B(null),l(e)}finally{X(!1)}}},ef=async()=>{if(f){y(!0);try{let e={token_id:f.token_id,expires_in_days:""===K?null:parseInt(K)},s=await T.x.post("/users/service-account-tokens/rotate",e);if(s.ok){let e=await s.json();er(e.token),await ed()}else{let e=await s.json();throw Error(e.detail||"Failed to rotate token")}}catch(e){l(e)}finally{y(!1)}}},eb=eo.filter(e=>{var s,t,r,n;if(!(null==w?void 0:w.trim()))return!0;let a=w.toLowerCase();return(null===(s=e.token_name)||void 0===s?void 0:s.toLowerCase().includes(a))||(null===(t=e.creator_name)||void 0===t?void 0:t.toLowerCase().includes(a))||(null===(r=e.service_account_name)||void 0===r?void 0:r.toLowerCase().includes(a))||(null===(n=e.primaryRole)||void 0===n?void 0:n.toLowerCase().includes(a))});return S&&0===eo.length?(0,r.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,r.jsx)(i.Z,{size:32}),(0,r.jsx)("span",{className:"ml-3",children:"Loading tokens..."})]}):(0,r.jsxs)(r.Fragment,{children:[0===eb.length?(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)(I,{className:"mx-auto h-12 w-12 text-gray-400"}),(0,r.jsx)("h3",{className:"mt-2 text-sm font-medium text-gray-900",children:(null==w?void 0:w.trim())?"No tokens match your search":"No service accounts"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:(null==w?void 0:w.trim())?"Try adjusting your search terms.":"No service accounts have been created yet."})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(U.Zb,{children:(0,r.jsxs)(m.iA,{children:[(0,r.jsx)(m.xD,{children:(0,r.jsxs)(m.SC,{children:[(0,r.jsx)(m.ss,{children:"Name"}),(0,r.jsx)(m.ss,{children:"Created by"}),(0,r.jsx)(m.ss,{children:"Role"}),(0,r.jsx)(m.ss,{children:"Clusters"}),(0,r.jsx)(m.ss,{children:"Jobs"}),(0,r.jsx)(m.ss,{children:"Created"}),(0,r.jsx)(m.ss,{children:"Last used"}),(0,r.jsx)(m.ss,{children:"Expires"}),(0,r.jsx)(m.ss,{children:"Actions"})]})}),(0,r.jsx)(m.RM,{children:eb.map(e=>(0,r.jsxs)(m.SC,{children:[(0,r.jsx)(m.pj,{className:"truncate",title:e.token_name,children:e.token_name}),(0,r.jsx)(m.pj,{className:"truncate",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{children:e.creator_name||"Unknown"}),e.creator_user_hash!==(null==t?void 0:t.id)&&(0,r.jsx)("span",{className:"ml-2 px-1.5 py-0.5 text-xs bg-gray-100 text-gray-600 rounded",children:"Other"})]})}),(0,r.jsx)(m.pj,{className:"truncate",children:(0,r.jsx)("div",{className:"flex items-center gap-2",children:en===e.token_id?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("select",{value:el,onChange:e=>ei(e.target.value),className:"block w-auto p-1 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-sky-blue focus:border-sky-blue sm:text-sm",children:[(0,r.jsx)("option",{value:"admin",children:"Admin"}),(0,r.jsx)("option",{value:"user",children:"User"})]}),(0,r.jsx)("button",{onClick:()=>ex(e.token_id),className:"text-green-600 hover:text-green-800 p-1",title:"Save",children:(0,r.jsx)(R.Z,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:em,className:"text-gray-500 hover:text-gray-700 p-1",title:"Cancel",children:(0,r.jsx)(E.Z,{className:"h-4 w-4"})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"capitalize",children:e.primaryRole}),((null==t?void 0:t.role)==="admin"||e.creator_user_hash===(null==t?void 0:t.id))&&(0,r.jsx)("button",{onClick:()=>eu(e.token_id,e.primaryRole),className:"text-blue-600 hover:text-blue-700 p-1",title:"Edit role",children:(0,r.jsx)(D,{className:"h-3 w-3"})})]})})}),(0,r.jsx)(m.pj,{children:(0,r.jsx)(c(),{href:"/clusters?user=".concat(encodeURIComponent(e.service_account_user_id)),className:"px-2 py-0.5 rounded text-xs font-medium transition-colors duration-200 cursor-pointer inline-block ".concat(e.clusterCount>0?"bg-blue-100 text-blue-600 hover:bg-blue-200 hover:text-blue-700":"bg-gray-100 text-gray-500 hover:bg-gray-200 hover:text-gray-700"),title:"View ".concat(e.clusterCount," cluster").concat(1!==e.clusterCount?"s":""," for ").concat(e.token_name),children:e.clusterCount})}),(0,r.jsx)(m.pj,{children:(0,r.jsx)(c(),{href:"/jobs?user=".concat(encodeURIComponent(e.service_account_user_id)),className:"px-2 py-0.5 rounded text-xs font-medium transition-colors duration-200 cursor-pointer inline-block ".concat(e.jobCount>0?"bg-green-100 text-green-600 hover:bg-green-200 hover:text-green-700":"bg-gray-100 text-gray-500 hover:bg-gray-200 hover:text-gray-700"),title:"View ".concat(e.jobCount," job").concat(1!==e.jobCount?"s":""," for ").concat(e.token_name),children:e.jobCount})}),(0,r.jsx)(m.pj,{className:"truncate",children:e.created_at?(0,r.jsx)(v.Zg,{date:new Date(1e3*e.created_at)}):"Never"}),(0,r.jsx)(m.pj,{className:"truncate",children:e.last_used_at?(0,r.jsx)(v.Zg,{date:new Date(1e3*e.last_used_at)}):"Never"}),(0,r.jsx)(m.pj,{className:"truncate",children:e.expires_at?new Date(1e3*e.expires_at)<new Date?(0,r.jsx)("span",{className:"text-red-600",children:"Expired"}):(0,r.jsx)(v.Zg,{date:new Date(1e3*e.expires_at)}):"Never"}),(0,r.jsx)(m.pj,{children:(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[((null==t?void 0:t.role)==="admin"||e.creator_user_hash===(null==t?void 0:t.id))&&(0,r.jsx)(v.WH,{content:"Rotate token",className:"capitalize text-sm text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{s("cannot rotate service account tokens",()=>{b(e),x(!0)})},className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:(0,r.jsx)(N.Z,{className:"h-4 w-4"})})}),((null==t?void 0:t.role)==="admin"||e.creator_user_hash===(null==t?void 0:t.id))&&(0,r.jsx)(v.WH,{content:"Delete ".concat(e.token_name),className:"capitalize text-sm text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{s("cannot delete service account tokens",()=>{V(e),z(!0)})},className:"text-red-600 hover:text-red-800 font-medium inline-flex items-center",children:(0,r.jsx)(Z.Z,{className:"h-4 w-4"})})})]})})]},e.token_id))})]})})}),(0,r.jsx)(A.Vq,{open:o,onOpenChange:e=>{d(e),e||(es(null),l(null))},children:(0,r.jsxs)(A.cZ,{className:"sm:max-w-2xl",children:[(0,r.jsxs)(A.fK,{children:[(0,r.jsx)(A.$N,{children:"Create Service Account"}),(0,r.jsx)(A.Be,{children:"Create a new service account with an API token for programmatic access to SkyPilot."})]}),(0,r.jsx)("div",{className:"flex flex-col gap-4 py-4",children:ee?(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"p-4 bg-green-50 border border-green-200 rounded-lg",children:[(0,r.jsxs)("div",{className:"flex items-center mb-3",children:[(0,r.jsx)("h4",{className:"text-sm font-medium text-green-900",children:"⚠️ Service account created successfully - save this token now!"}),(0,r.jsx)(v.WH,{content:Y?"Copied!":"Copy token",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>eh(ee),className:"flex items-center text-green-600 hover:text-green-800 transition-colors duration-200 p-1 ml-2",children:Y?(0,r.jsx)(R.Z,{className:"w-4 h-4"}):(0,r.jsx)(L.Z,{className:"w-4 h-4"})})})]}),(0,r.jsx)("p",{className:"text-sm text-green-700 mb-3",children:"This service account token will not be shown again. Please copy and store it securely."}),(0,r.jsx)("div",{className:"bg-white border border-green-300 rounded-md p-3",children:(0,r.jsx)("code",{className:"text-sm text-gray-800 font-mono break-all block",children:ee})})]})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Service Account Name"}),(0,r.jsx)("input",{className:"border rounded px-3 py-2 w-full",placeholder:"e.g., ci-pipeline, monitoring-system",value:O.token_name,onChange:e=>H({...O,token_name:e.target.value})})]}),(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Expiration (days)"}),(0,r.jsx)("input",{type:"number",className:"border rounded px-3 py-2 w-full",placeholder:"e.g., 30",min:"0",max:"365",value:O.expires_in_days||"",onChange:e=>H({...O,expires_in_days:e.target.value?parseInt(e.target.value):null})}),(0,r.jsx)("p",{className:"text-xs text-gray-500",children:"Leave empty or enter 0 to never expire. Maximum 365 days."})]})]})}),(0,r.jsx)(A.cN,{children:ee?(0,r.jsx)("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-sky-600 text-white hover:bg-sky-700 h-10 px-4 py-2",onClick:()=>{d(!1),es(null)},children:"Close"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2",onClick:()=>{d(!1),es(null)},disabled:J,children:"Cancel"}),(0,r.jsx)("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-sky-600 text-white hover:bg-sky-700 h-10 px-4 py-2",onClick:ep,disabled:J||!O.token_name.trim(),children:J?"Creating...":"Create Token"})]})})]})}),(0,r.jsx)(A.Vq,{open:M,onOpenChange:e=>{z(e),e||(V(null),l(null))},children:(0,r.jsxs)(A.cZ,{className:"sm:max-w-md",children:[(0,r.jsxs)(A.fK,{children:[(0,r.jsx)(A.$N,{children:"Delete Service Account Token"}),(0,r.jsxs)(A.Be,{children:['Are you sure you want to delete the service account "',null==P?void 0:P.token_name,'"',(null==P?void 0:P.creator_user_hash)!==(null==t?void 0:t.id)&&(null==t?void 0:t.role)==="admin"?" owned by ".concat(null==P?void 0:P.creator_name):"","? This action cannot be undone and will immediately revoke access for any systems using this token."]})]}),(0,r.jsxs)(A.cN,{children:[(0,r.jsx)("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2",onClick:()=>{z(!1),V(null)},disabled:Q,children:"Cancel"}),(0,r.jsx)("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-red-600 text-white hover:bg-red-700 h-10 px-4 py-2",onClick:eg,disabled:Q,children:Q?"Deleting...":"Delete Token"})]})]})}),(0,r.jsx)(A.Vq,{open:u,onOpenChange:e=>{x(e),e||(b(null),$(""),er(null),l(null))},children:(0,r.jsxs)(A.cZ,{className:"sm:max-w-2xl",children:[(0,r.jsxs)(A.fK,{children:[(0,r.jsx)(A.$N,{children:"Rotate Service Account Token"}),(0,r.jsxs)(A.Be,{children:['Rotate the service account token "',null==f?void 0:f.token_name,'"',(null==f?void 0:f.creator_user_hash)!==(null==t?void 0:t.id)&&(null==t?void 0:t.role)==="admin"?" owned by ".concat(null==f?void 0:f.creator_name):"",". This will generate a new token value and invalidate the current one."]})]}),(0,r.jsx)("div",{className:"flex flex-col gap-4 py-4",children:et?(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"p-4 bg-green-50 border border-green-200 rounded-lg",children:[(0,r.jsxs)("div",{className:"flex items-center mb-3",children:[(0,r.jsx)("h4",{className:"text-sm font-medium text-green-900",children:"\uD83D\uDD04 Service account token rotated successfully - save this new token now!"}),(0,r.jsx)(v.WH,{content:Y?"Copied!":"Copy token",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>eh(et),className:"flex items-center text-green-600 hover:text-green-800 transition-colors duration-200 p-1 ml-2",children:Y?(0,r.jsx)(R.Z,{className:"w-4 h-4"}):(0,r.jsx)(L.Z,{className:"w-4 h-4"})})})]}),(0,r.jsx)("p",{className:"text-sm text-green-700 mb-3",children:"This new token replaces the old one. Please copy and store it securely. The old token is now invalid."}),(0,r.jsx)("div",{className:"bg-white border border-green-300 rounded-md p-3",children:(0,r.jsx)("code",{className:"text-sm text-gray-800 font-mono break-all block",children:et})})]})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"New Expiration (days)"}),(0,r.jsx)("input",{type:"number",className:"border rounded px-3 py-2 w-full",placeholder:"Leave empty to preserve current expiration",min:"0",max:"365",value:K,onChange:e=>$(e.target.value)}),(0,r.jsx)("p",{className:"text-xs text-gray-500",children:"Leave empty to preserve current expiration. Enter number of days for new expiration, or enter 0 to set to never expire. Maximum 365 days."})]}),(0,r.jsx)("div",{className:"p-3 bg-amber-50 border border-amber-200 rounded",children:(0,r.jsx)("p",{className:"text-sm text-amber-700",children:"⚠️ Any systems using the current token will need to be updated with the new token."})})]})}),(0,r.jsx)(A.cN,{children:et?(0,r.jsx)("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-green-600 text-white hover:bg-green-700 h-10 px-4 py-2",onClick:()=>{x(!1),b(null),$(""),er(null)},children:"Close"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2",onClick:()=>{x(!1),b(null),$(""),er(null)},disabled:j,children:"Cancel"}),(0,r.jsx)("button",{className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-sky-600 text-white hover:bg-sky-700 h-10 px-4 py-2",onClick:ef,disabled:j,children:j?"Rotating...":"Rotate Token"})]})})]})})]})}O.propTypes={refreshInterval:l().number.isRequired,setLoading:l().func.isRequired,refreshDataRef:l().shape({current:l().func}).isRequired,checkPermissionAndAct:l().func.isRequired,roleLoading:l().bool.isRequired,onResetPassword:l().func.isRequired,onDeleteUser:l().func.isRequired,basicAuthEnabled:l().bool,currentUserRole:l().string,currentUserId:l().string}},94545:function(e,s,t){function r(e){return e.startsWith("sky-jobs-controller-")}function n(e,s,t){return null===s?e:[...e].sort((e,r)=>e[s]<r[s]?"ascending"===t?-1:1:e[s]>r[s]?"ascending"===t?1:-1:0)}t.d(s,{R0:function(){return n},Ym:function(){return r}})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8969],{68969:function(e,t,o){o.d(t,{Ce:function(){return p},NJ:function(){return h},UA:function(){return u},aT:function(){return i},getManagedJobs:function(){return l},jh:function(){return b},vs:function(){return d}});var r=o(67294),a=o(15821),n=o(93225),c=o(6378),s=o(47145);async function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var t;let{allUsers:o=!0,nameMatch:r,userMatch:a,workspaceMatch:c,poolMatch:l,page:i,limit:d,statuses:u}=e,h={all_users:o,verbose:!0};void 0!==r&&(h.name_match=r),void 0!==a&&(h.user_match=a),void 0!==c&&(h.workspace_match=c),void 0!==l&&(h.pool_match=l),void 0!==i&&(h.page=i),void 0!==d&&(h.limit=d),void 0!==u&&u.length>0&&(h.statuses=u);let p=(await s.x.post("/jobs/queue",h)).headers.get("X-Skypilot-Request-ID"),b=await s.x.get("/api/get?request_id=".concat(p));if(500===b.status){try{let e=await b.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);if(t.type&&t.type===n.iW)return{jobs:[],total:0,controllerStopped:!0}}catch(e){console.error("Error parsing JSON:",e)}}catch(e){console.error("Error parsing JSON:",e)}return{jobs:[],total:0,controllerStopped:!1}}let g=await b.json(),f=g.return_value?JSON.parse(g.return_value):[],m=Array.isArray(f)?f:(null==f?void 0:f.jobs)||[],_=Array.isArray(f)?m.length:null!==(t=null==f?void 0:f.total)&&void 0!==t?t:m.length,y=(null==f?void 0:f.total_no_filter)||_,w=(null==f?void 0:f.status_counts)||{};return{jobs:m.map(e=>{var t;let o=0;e.end_at&&e.submitted_at?o=e.end_at-e.submitted_at:e.submitted_at&&(o=Date.now()/1e3-e.submitted_at);let r=[];e.submitted_at&&r.push({type:"PENDING",timestamp:e.submitted_at}),e.start_at&&r.push({type:"RUNNING",timestamp:e.start_at}),e.end_at&&r.push({type:e.status,timestamp:e.end_at});let a="",n="",c="",s="",l="";try{if(a=e.cloud||"",c=e.cluster_resources,n=e.region||"",a&&(s=a,n&&(s+="/".concat(n))),l=s,e.accelerators){let t=Object.entries(e.accelerators).map(e=>{let[t,o]=e;return"".concat(o,"x").concat(t)}).join(", ");t&&(l+=" (".concat(t,")"))}}catch(t){c=e.cluster_resources}return{id:e.job_id,task_job_id:e._job_id,task:e.task_name,name:e.job_name,job_duration:e.job_duration,total_duration:o,workspace:e.workspace,status:e.status,requested_resources:e.resources,resources_str:c,resources_str_full:e.cluster_resources_full||c,cloud:a,region:e.region,infra:s,full_infra:l,recoveries:e.recovery_count,details:e.details||e.failure_reason,user:e.user_name,user_hash:e.user_hash,submitted_at:e.submitted_at?new Date(1e3*e.submitted_at):null,events:r,dag_yaml:e.user_yaml,entrypoint:e.entrypoint,git_commit:(null===(t=e.metadata)||void 0===t?void 0:t.git_commit)||"-",pool:e.pool,pool_hash:e.pool_hash,current_cluster_name:e.current_cluster_name,job_id_on_pool_cluster:e.job_id_on_pool_cluster}}),total:_,totalNoFilter:y,controllerStopped:!1,statusCounts:w}}catch(e){return console.error("Error fetching managed job data:",e),{jobs:[],total:0,totalNoFilter:0,controllerStopped:!1,statusCounts:{}}}}async function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{allUsers:t=!0,nameMatch:o,userMatch:r,workspaceMatch:a,poolMatch:n,page:c=1,limit:s=10,useClientPagination:i=!0}=e;try{if(!i)return await l(e);let d=await l({allUsers:t,nameMatch:o,userMatch:r,workspaceMatch:a,poolMatch:n});if(d.controllerStopped||!d.jobs)return d;let u=d.jobs,h=u.length,p=(c-1)*s;return{jobs:u.slice(p,p+s),total:h,controllerStopped:!1}}catch(e){return console.error("Error fetching managed job data with client pagination:",e),{jobs:[],total:0,controllerStopped:!1}}}async function d(){try{let e=(await s.x.post("/jobs/pool_status",{pool_names:null})).headers.get("X-Skypilot-Request-ID"),t=await s.x.get("/api/get?request_id=".concat(e));if(500===t.status){try{let e=await t.json();if(e.detail&&e.detail.error)try{let t=JSON.parse(e.detail.error);if(t.type&&t.type===n.iW)return{pools:[],controllerStopped:!0}}catch(e){console.error("Failed to parse error JSON:",e)}}catch(e){console.error("Failed to parse response JSON:",e)}throw Error("Server error")}let o=await t.json(),r=o.return_value?JSON.parse(o.return_value):[],a={jobs:[]};try{let e=await l({allUsers:!0});e.controllerStopped||(a=e)}catch(e){console.warn("Failed to fetch jobs for pool job counts:",e)}let c={},i=["SUCCEEDED","FAILED","FAILED_SETUP","FAILED_PRECHECKS","FAILED_NO_RESOURCE","FAILED_CONTROLLER","CANCELLED"];return a.jobs&&Array.isArray(a.jobs)&&a.jobs.forEach(e=>{let t=e.pool,o=e.status;t&&!i.includes(o)&&(c[t]||(c[t]={}),c[t][o]=(c[t][o]||0)+1)}),{pools:r.map(e=>({...e,jobCounts:c[e.name]||{}})),controllerStopped:!1}}catch(e){throw console.error("Error fetching pools:",e),e}}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,[o,a]=(0,r.useState)(null),[n,s]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{(async function(){if(e)try{var t;s(!0);let o=await c.default.get(l,[{allUsers:!0}]),r=null==o?void 0:null===(t=o.jobs)||void 0===t?void 0:t.find(t=>String(t.id)===String(e));r?a({jobs:[r],controllerStopped:o.controllerStopped||!1}):a({jobs:[],controllerStopped:o.controllerStopped||!1})}catch(e){console.error("Error fetching single managed job data:",e),a({jobs:[],controllerStopped:!1})}finally{s(!1)}})()},[e,t]),{jobData:o,loading:n}}async function h(e){let t,{jobId:o,controller:r=!1,signal:c,onNewLog:s}=e,l=Date.now(),i=new Promise(e=>{let o=()=>{let r=Date.now()-l;r>=3e4?e({timeout:!0}):t=setTimeout(o,3e4-r)};t=setTimeout(o,3e4)}),d=window.location.origin,u="".concat(d).concat(n.f4),h=(async()=>{try{let e=(await fetch("".concat(u,"/jobs/logs"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({controller:r,follow:!1,job_id:o,tail:1e4}),...c?{signal:c}:{}})).body.getReader();try{for(;;){let{done:t,value:o}=await e.read();if(t)break;l=Date.now();let r=new TextDecoder().decode(o);s(r)}}finally{if(!c||!c.aborted)try{e.cancel()}catch(e){"AbortError"!==e.name&&console.warn("Error canceling reader:",e)}t&&clearTimeout(t)}return{timeout:!1}}catch(e){if(t&&clearTimeout(t),"AbortError"===e.name)return{timeout:!1};throw e}})(),p=await Promise.race([h,i]);if(t&&clearTimeout(t),p.timeout){(0,a.C)("Log request for job ".concat(o," timed out after ").concat(30,"s of inactivity"),"warning");return}}async function p(e,t,o){let r="",c="",s="",l={};if("restartcontroller"===e)r="Restarting",c="restarted",s="jobs/queue",l={all_users:!0,refresh:!0},t="controller";else throw Error("Invalid action: ".concat(e));(0,a.C)("".concat(r," job ").concat(t,"..."),"info");let i=window.location.origin,d="".concat(i).concat(n.f4);try{try{let e=(await fetch("".concat(d,"/").concat(s),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).headers.get("X-Skypilot-Request-ID"),i=await fetch("".concat(d,"/api/get?request_id=").concat(e));if(200===i.status)(0,a.C)("Job ".concat(t," ").concat(c," successfully."),"success");else if(500===i.status)try{let e=await i.json();if(e.detail&&e.detail.error)try{let c=JSON.parse(e.detail.error);c.type&&c.type===n.Bo?(0,a.C)("".concat(r," job ").concat(t," is not supported!"),"error",1e4):c.type&&c.type===n.mF?(0,a.C)("Cluster ".concat(o," does not exist."),"error"):c.type&&c.type===n.iW?(0,a.C)("Cluster ".concat(o," is not up."),"error"):(0,a.C)("".concat(r," job ").concat(t," failed: ").concat(c.type),"error")}catch(o){(0,a.C)("".concat(r," job ").concat(t," failed: ").concat(e.detail.error),"error")}else(0,a.C)("".concat(r," job ").concat(t," failed with no details."),"error")}catch(e){(0,a.C)("".concat(r," job ").concat(t," failed with parse error."),"error")}else(0,a.C)("".concat(r," job ").concat(t," failed with status ").concat(i.status,"."),"error")}catch(e){console.error("Fetch error:",e),(0,a.C)("Network error ".concat(r," job ").concat(t,": ").concat(e.message),"error")}}catch(e){console.error("Error in handleStop:",e),(0,a.C)("Critical error ".concat(r," job ").concat(t,": ").concat(e.message),"error")}}async function b(e){let{jobId:t=null,name:o=null,controller:r=!1}=e;try{let e=await s.x.fetch("/jobs/download_logs",{job_id:t,name:o,controller:r,refresh:!1}),c=Object.values(e||{});if(!c.length){(0,a.C)("No logs found to download.","warning");return}let l=window.location.origin,i="".concat(l).concat(n.f4,"/download"),d=await fetch("".concat(i,"?relative=items"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder_paths:c})});if(!d.ok){let e=await d.text();throw Error("Download failed: ".concat(d.status," ").concat(e))}let u=await d.blob(),h=window.URL.createObjectURL(u),p=document.createElement("a"),b=new Date().toISOString().replace(/[:.]/g,"-"),g=t?"job-".concat(t):o?"job-".concat(o):"job";p.href=h,p.download="managed-".concat(g,"-").concat(r?"controller-logs":"logs","-").concat(b,".zip"),document.body.appendChild(p),p.click(),p.remove(),window.URL.revokeObjectURL(h)}catch(e){console.error("Error downloading managed job logs:",e),(0,a.C)("Error downloading managed job logs: ".concat(e.message),"error")}}},15821:function(e,t,o){o.d(t,{C:function(){return r}});function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,r=document.getElementById("toast-container");r||((r=document.createElement("div")).id="toast-container",r.className="fixed top-0 right-0 p-4 z-[9999] flex flex-col items-end space-y-2",document.body.appendChild(r));let a=document.createElement("div");switch(a.className="rounded-md border-l-4 p-4 shadow-md flex items-center justify-between max-w-md w-full mb-2 pointer-events-auto",t){case"success":a.className+=" bg-green-100 border-green-500 text-green-800";break;case"error":a.className+=" bg-red-100 border-red-500 text-red-800";break;case"warning":a.className+=" bg-yellow-100 border-yellow-500 text-yellow-800";break;default:a.className+=" bg-blue-100 border-blue-500 text-blue-800"}return a.innerHTML='\n <div class="flex-1 mr-2">\n <p class="text-sm font-medium">'.concat(e,'</p>\n </div>\n <button class="text-gray-500 hover:text-gray-700 focus:outline-none" aria-label="Close toast">\n <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>\n </button>\n '),r.appendChild(a),a.querySelector("button").addEventListener("click",()=>{r.removeChild(a)}),setTimeout(()=>{r.contains(a)&&r.removeChild(a)},o),a}},6378:function(e,t,o){o.r(t),o.d(t,{DashboardCache:function(){return a},dashboardCache:function(){return n}});let r=o(51214).ej.DEFAULT_TTL;class a{setPreloader(e){this.preloader=e}async get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.ttl||r,n=!1!==o.refreshOnAccess,c=this._generateKey(e,t),s=e.name||"anonymous",l=this.cache.get(c),i=Date.now();if(l&&i-l.lastUpdated<a){let o=Math.round((i-l.lastUpdated)/1e3);if(this._debug("Cache HIT for ".concat(s," (age: ").concat(o,"s, TTL: ").concat(Math.round(a/1e3),"s)")),n&&(this.cache.set(c,{data:l.data,lastUpdated:i}),this._debug("Cache TTL refreshed for ".concat(s))),!this.backgroundJobs.has(c)){var d;(null===(d=this.preloader)||void 0===d?void 0:d.wasRecentlyPreloaded(e,t))?this._debug("Skipping background refresh for ".concat(s," - recently preloaded")):this._refreshInBackground(e,t,c)}return l.data}try{let o=await e(...t);return this.cache.set(c,{data:o,lastUpdated:i}),o}catch(e){if(l)return console.warn("Failed to fetch fresh data for ".concat(c,", returning stale data:"),e),l.data;throw e}}invalidate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=this._generateKey(e,t);this.cache.delete(o),this.backgroundJobs.delete(o)}invalidateFunction(e){let t=e.name||"anonymous",o=[];for(let e of this.cache.keys())e.startsWith("".concat(t,"_"))&&o.push(e);o.forEach(e=>{this.cache.delete(e),this.backgroundJobs.delete(e)})}clear(){this.cache.clear(),this.backgroundJobs.clear()}getStats(){return{cacheSize:this.cache.size,backgroundJobs:this.backgroundJobs.size,keys:Array.from(this.cache.keys())}}getDetailedStats(){let e=Date.now(),t=[];for(let[o,r]of this.cache.entries()){let a=e-r.lastUpdated;t.push({key:o,age:Math.round(a/1e3),lastUpdated:new Date(r.lastUpdated).toISOString(),hasBackgroundJob:this.backgroundJobs.has(o)})}return{cacheSize:this.cache.size,backgroundJobs:this.backgroundJobs.size,entries:t.sort((e,t)=>e.age-t.age)}}setDebugMode(e){this.debugMode=e}_debug(e){for(var t=arguments.length,o=Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];this.debugMode&&console.log("[DashboardCache] ".concat(e),...o)}_refreshInBackground(e,t,o){this.backgroundJobs.set(o,!0),e(...t).then(e=>{this.cache.set(o,{data:e,lastUpdated:Date.now()})}).catch(e=>{console.warn("Background refresh failed for ".concat(o,":"),e)}).finally(()=>{this.backgroundJobs.delete(o)})}_generateKey(e,t){let o=function(e){let t=5381;for(let o=0;o<e.length;o++)t=(t<<5)+t+e.charCodeAt(o);return t>>>0}(e.toString()),r=t.length>0?JSON.stringify(t):"";return"".concat(o,"_").concat(r)}constructor(){this.cache=new Map,this.backgroundJobs=new Map,this.debugMode=!1,this.preloader=null}}let n=new a;t.default=n}}]);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9025],{99333:function(e,n,r){r.d(n,{Z:function(){return l}});/**
|
|
2
|
-
* @license lucide-react v0.407.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/let l=(0,r(60998).Z)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},54042:function(e,n,r){r.r(n),r.d(n,{Config:function(){return p}});var l=r(85893),s=r(67294),t=r(11163),a=r(30803),i=r(37673),o=r(17324),c=r(1812),d=r(55739),u=r(99333),m=r(1272),f=r(36989),x=r(47145);function h(){let[e,n]=(0,s.useState)(null),[r,t]=(0,s.useState)(null),a=async()=>{let e=await x.x.get("/api/health"),r=await e.json();r.version&&n(r.version),r.commit&&t(r.commit)};return((0,s.useEffect)(()=>{a()},[]),e)?(0,l.jsx)(f.Md,{content:r?"Commit: ".concat(r):"Commit information not available",className:"text-sm text-muted-foreground",children:(0,l.jsxs)("div",{className:"text-sm text-gray-500 cursor-help border-b border-dotted border-gray-400 inline-block",children:["Version: ",e]})}):null}var v=r(17853),g=r(83454);function p(){let e=(0,t.useRouter)(),[n,r]=(0,s.useState)(""),[f,p]=(0,s.useState)(!0),[j,b]=(0,s.useState)(!1),[y,w]=(0,s.useState)(null),[N,k]=(0,s.useState)(!1),[L,A]=(0,s.useState)(!1),C=(0,s.useRef)(null);(0,s.useEffect)(()=>{E(),(async()=>{A(await (0,v.TO)())})()},[]),(0,s.useEffect)(()=>()=>{C.current&&clearTimeout(C.current)},[]);let E=async()=>{p(!0),w(null);try{let e=await (0,o.iE)();0===Object.keys(e).length?r(""):r(m.ZP.dump(e,{indent:2}))}catch(e){console.error("Error loading config:",e),w(e)}finally{p(!1)}},S=async()=>{b(!0),w(null),C.current&&(clearTimeout(C.current),C.current=null);try{let e=await x.x.get("/users/role");if(!e.ok){let n=await e.json();throw Error(n.detail||"Failed to get user role")}let r=await e.json(),l=r.role;if("admin"!=l){w(Error("".concat(r.name," is logged in as non-admin and cannot edit config"))),b(!1);return}let s=m.ZP.load(n);if(null==s&&(s={}),"object"!=typeof s||Array.isArray(s)){let e="Invalid config structure: Configuration must be a mapping (key-value pairs) in YAML format.";Array.isArray(s),e="Invalid config structure: Configuration must be a mapping (key-value pairs) in YAML format.",w(Error(e)),b(!1);return}await (0,o.rF)(s),k(!0),C.current=setTimeout(()=>{k(!1),C.current=null},5e3)}catch(e){console.error("Error saving config:",e),w(e)}finally{b(!1)}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4 h-5",children:[(0,l.jsx)("div",{className:"text-base flex items-center",children:(0,l.jsx)("span",{className:"text-sky-blue",children:"SkyPilot API Server"})}),(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)("div",{className:"text-sm flex items-center",children:(f||j)&&(0,l.jsxs)("div",{className:"flex items-center mr-4",children:[(0,l.jsx)(d.Z,{size:15,className:"mt-0"}),(0,l.jsx)("span",{className:"ml-2 text-gray-500",children:j?"Applying...":"Loading..."})]})}),L&&(0,l.jsxs)("button",{onClick:()=>{let e=(0,v.ki)(),n=g.env.SKYPILOT_RELEASE_NAME||"skypilot";window.open("".concat(e,"/d/skypilot-apiserver-overview/skypilot-api-server?orgId=1&from=now-1h&to=now&timezone=browser&var-app=").concat("".concat(n,"-api")),"_blank")},className:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-sky-blue-bright border border-transparent rounded-md shadow-sm hover:bg-sky-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-sky-blue mr-4",children:[(0,l.jsx)("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}),"View API Server Metrics"]}),(0,l.jsx)(h,{})]})]}),(0,l.jsxs)(i.Zb,{className:"w-full",children:[(0,l.jsx)(i.Ol,{children:(0,l.jsx)(i.ll,{className:"text-base font-normal flex items-center justify-between",children:(0,l.jsx)("span",{children:"Edit SkyPilot API Server Configuration"})})}),(0,l.jsxs)(i.aY,{className:"space-y-4",children:[(0,l.jsxs)("p",{className:"text-sm text-gray-600 mb-3",children:["Refer to the"," ",(0,l.jsx)("a",{href:"https://docs.skypilot.co/en/latest/reference/config.html",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:"SkyPilot Docs"})," ","for details. The configuration should be in YAML format."]}),N&&(0,l.jsx)("div",{className:"bg-green-50 border border-green-200 rounded p-4 mb-6",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)("div",{className:"flex-shrink-0",children:(0,l.jsx)("svg",{className:"h-5 w-5 text-green-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}),(0,l.jsx)("div",{className:"ml-3",children:(0,l.jsx)("p",{className:"text-sm font-medium text-green-800",children:"Configuration saved successfully!"})})]}),(0,l.jsx)("div",{className:"ml-auto pl-3",children:(0,l.jsx)("div",{className:"-mx-1.5 -my-1.5",children:(0,l.jsxs)("button",{type:"button",onClick:()=>{k(!1),C.current&&(clearTimeout(C.current),C.current=null)},className:"inline-flex rounded-md bg-green-50 p-1.5 text-green-500 hover:bg-green-100 focus:outline-none focus:ring-2 focus:ring-green-600 focus:ring-offset-2 focus:ring-offset-green-50",children:[(0,l.jsx)("span",{className:"sr-only",children:"Dismiss"}),(0,l.jsx)("svg",{className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})]})})})]})}),y&&(0,l.jsx)("div",{className:"mb-6",children:(0,l.jsx)(c.X,{error:y,title:"Failed to apply new configuration",onDismiss:()=>w(null)})}),(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)("textarea",{value:n,onChange:e=>r(e.target.value),className:"w-full h-96 p-3 border border-gray-300 rounded font-mono text-sm resize-vertical focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:f?"Loading configuration...":"# Enter SkyPilot configuration in YAML format\n# Example:\n# kubernetes:\n# allowed_contexts: [default, my-context]",disabled:f||j})}),(0,l.jsxs)("div",{className:"flex justify-end space-x-3 pt-3",children:[(0,l.jsx)(a.z,{variant:"outline",onClick:()=>{e.push("/workspaces")},disabled:j,children:"Cancel"}),(0,l.jsx)(a.z,{onClick:S,disabled:f||j,className:"inline-flex items-center bg-sky-600 hover:bg-sky-700 text-white",children:j?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.Z,{size:16,className:"mr-2"}),"Applying..."]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(u.Z,{className:"w-4 h-4 mr-1.5"}),"Apply"]})})]})]})]})]})}},1812:function(e,n,r){r.d(n,{X:function(){return a}});var l=r(85893),s=r(67294);let t=e=>{if(!(null==e?void 0:e.message))return"An unexpected error occurred.";let n=e.message;return n.includes("failed:")&&(n=n.split("failed:")[1].trim()),n},a=e=>{let{error:n,title:r="Error",onDismiss:a}=e,[i,o]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{n&&o(!1)},[n]),!n||i)return null;let c="string"==typeof n?n:t(n);return(0,l.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex",children:[(0,l.jsx)("div",{className:"flex-shrink-0",children:(0,l.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsx)("div",{className:"ml-3",children:(0,l.jsxs)("div",{className:"text-sm text-red-800",children:[(0,l.jsxs)("strong",{children:[r,":"]})," ",c]})})]}),(0,l.jsx)("button",{onClick:()=>{o(!0),a&&a()},className:"flex-shrink-0 ml-4 text-red-400 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-red-50 rounded","aria-label":"Dismiss error",children:(0,l.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}},17853:function(e,n,r){r.d(n,{TO:function(){return t},ki:function(){return a}});let l=null,s=null,t=async()=>null!==l?l:s||(s=(async()=>{try{let e="".concat(window.location.origin,"/grafana"),n=await fetch("".concat(e,"/api/health"),{method:"GET",credentials:"include",headers:{Accept:"application/json"},signal:AbortSignal.timeout(5e3)});return 200==n.status}catch(e){return console.debug("Grafana availability check failed:",e),l=!1,!1}finally{s=null}})()),a=()=>"".concat(window.location.origin,"/grafana")},12003:function(e,n,r){r.d(n,{j:function(){return a}});var l=r(90512);let s=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,t=l.W,a=(e,n)=>r=>{var l;if((null==n?void 0:n.variants)==null)return t(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:a,defaultVariants:i}=n,o=Object.keys(a).map(e=>{let n=null==r?void 0:r[e],l=null==i?void 0:i[e];if(null===n)return null;let t=s(n)||s(l);return a[e][t]}),c=r&&Object.entries(r).reduce((e,n)=>{let[r,l]=n;return void 0===l||(e[r]=l),e},{});return t(e,o,null==n?void 0:null===(l=n.compoundVariants)||void 0===l?void 0:l.reduce((e,n)=>{let{class:r,className:l,...s}=n;return Object.entries(s).every(e=>{let[n,r]=e;return Array.isArray(r)?r.includes({...i,...c}[n]):({...i,...c})[n]===r})?[...e,r,l]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}}}]);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9037],{39037:function(e,s,t){t.r(s),t.d(s,{ClusterTable:function(){return I},Clusters:function(){return _},Status2Actions:function(){return W},enabledActions:function(){return F},handleVSCodeConnection:function(){return H}});var r=t(85893),a=t(67294),l=t(11163),n=t(55739),c=t(36989),i=t(41664),o=t.n(i),u=t(30803),d=t(37673),h=t(68764),x=t(23266),p=t(17324),m=t(94545),f=t(13626),j=t(60998);/**
|
|
2
|
-
* @license lucide-react v0.407.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/let g=(0,j.Z)("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]),v=(0,j.Z)("SquareCode",[["path",{d:"M10 9.5 8 12l2 2.5",key:"3mjy60"}],["path",{d:"m14 9.5 2 2.5-2 2.5",key:"1bir2l"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);t(6135);var w=t(92128),y=t(99307),b=t(23001),k=t(88950),N=t(6378),C=t(36856);t(1272);var S=t(20546);let L=[{label:"Status",value:"status"},{label:"Cluster",value:"cluster"},{label:"User",value:"user"},{label:"Workspace",value:"workspace"},{label:"Infra",value:"infra"}],M=(e,s)=>{let t="",r="";return e>=0&&(t=e+"m",r=" "),s&&(t+="".concat(r,"(down)")),""===t&&(t="-"),t},R=(e,s)=>{if(e&&e.includes("@")){let t=e.split("@")[0];return s&&s!==t?"".concat(t," (").concat(s,")"):t}let t=e||s||"N/A";return s&&s!==t?"".concat(t," (").concat(s,")"):t},E=e=>{if(!e||0===e)return"-";let s=e=Math.floor(e),t="",r=0;for(let e of[{value:31536e3,label:"y"},{value:2592e3,label:"mo"},{value:86400,label:"d"},{value:3600,label:"h"},{value:60,label:"m"},{value:1,label:"s"}])if(s>=e.value&&r<2){let a=Math.floor(s/e.value);t+="".concat(a).concat(e.label," "),s%=e.value,r++}return t.trim()||"0s"};function _(){let e=(0,l.useRouter)(),[s,t]=(0,a.useState)(!1),i=a.useRef(null),[u,d]=(0,a.useState)(!1),[h,m]=(0,a.useState)(!1),[j,g]=(0,a.useState)(null),[v,y]=(0,a.useState)(()=>!!e.isReady&&"true"===e.query.history),[k,S]=(0,a.useState)(!0),M=(0,b.X)(),[E,_]=(0,a.useState)([]),[H,O]=(0,a.useState)({status:[],cluster:[],user:[],workspace:[],infra:[]}),[F,V]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(e.isReady){A();let s="true"===e.query.history;v!==s&&(S(!1),y(s),setTimeout(()=>S(!0),50))}},[e.isReady,e.query.history]),(0,a.useEffect)(()=>{(async()=>{try{await C.ZP.preloadForPage("clusters");let e=await N.default.get(p.fX),s=Object.keys(e),t=await N.default.get(x.getClusters),r=[...new Set(t.map(e=>e.workspace||"default").filter(e=>e))],a=new Set(s);r.includes("default")&&a.has("default"),r.forEach(e=>a.add(e));let l=[...new Set(t.map(e=>({userId:e.user_hash||e.user,username:e.user})).filter(e=>e.userId)).values()],n=new Map;l.forEach(e=>{n.set(e.userId,{userId:e.userId,username:e.username,display:R(e.username,e.userId)})}),V(!0)}catch(e){console.error("Error fetching data for filters:",e),V(!0)}})()},[]);let W=s=>{let t={...e.query},r=[],a=[],l=[];s.map((e,s)=>{var t;r.push(null!==(t=e.property.toLowerCase())&&void 0!==t?t:""),a.push(e.operator),l.push(e.value)}),t.property=r,t.operator=a,t.value=l,e.replace({pathname:e.pathname,query:t},void 0,{shallow:!0})},Z=s=>{let t={...e.query};t.history=s.toString(),e.replace({pathname:e.pathname,query:t},void 0,{shallow:!0})},A=()=>{let s={...e.query},t=s.property,r=s.operator,a=s.value;if(void 0===t)return;let l=[],n=Array.isArray(t)?t.length:1,c=new Map;if(c.set("",""),c.set("status","Status"),c.set("cluster","Cluster"),c.set("user","User"),c.set("workspace","Workspace"),c.set("infra","Infra"),1===n)l.push({property:c.get(t),operator:r,value:a});else for(let e=0;e<n;e++)l.push({property:c.get(t[e]),operator:r[e],value:a[e]});_(l)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-1 min-h-[20px]",children:[(0,r.jsx)("div",{className:"flex items-center gap-2",children:(0,r.jsx)(o(),{href:"/clusters",className:"text-sky-blue hover:underline leading-none text-base",children:"Sky Clusters"})}),(0,r.jsx)("div",{className:"w-full sm:w-auto",children:(0,r.jsx)(q,{propertyList:L,valueList:H,setFilters:_,updateURLParams:W,placeholder:"Filter clusters"})}),(0,r.jsxs)("div",{className:"flex items-center gap-2 ml-auto",children:[(0,r.jsxs)("label",{className:"flex items-center cursor-pointer",children:[(0,r.jsx)("input",{type:"checkbox",checked:v,onChange:e=>{let s=e.target.checked;y(s),Z(s)},className:"sr-only"}),(0,r.jsx)("div",{className:"relative inline-flex h-5 w-9 items-center rounded-full ".concat(k?"transition-colors":""," ").concat(v?"bg-sky-600":"bg-gray-300"),children:(0,r.jsx)("span",{className:"inline-block h-3 w-3 transform rounded-full bg-white ".concat(k?"transition-transform":""," ").concat(v?"translate-x-5":"translate-x-1")})}),(0,r.jsx)("span",{className:"ml-2 text-sm text-gray-700",children:"Show history (Last 30 days)"})]}),s&&(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(n.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500 text-sm",children:"Loading..."})]}),(0,r.jsxs)("button",{onClick:()=>{N.default.invalidate(x.getClusters),N.default.invalidate(x.uR),N.default.invalidate(p.fX),V(!1),C.ZP.preloadForPage("clusters",{force:!0}).then(()=>{V(!0)}),i.current&&i.current()},disabled:s,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,r.jsx)(f.Z,{className:"h-4 w-4 mr-1.5"}),!M&&(0,r.jsx)("span",{children:"Refresh"})]})]})]}),(0,r.jsx)(z,{filters:E,setFilters:_,updateURLParams:W}),(0,r.jsx)(I,{refreshInterval:c.yc,setLoading:t,refreshDataRef:i,filters:E,showHistory:v,onOpenSSHModal:e=>{g(e),d(!0)},onOpenVSCodeModal:e=>{g(e),m(!0)},setOptionValues:O,preloadingComplete:F}),(0,r.jsx)(w.Oh,{isOpen:u,onClose:()=>d(!1),cluster:j}),(0,r.jsx)(w._R,{isOpen:h,onClose:()=>m(!1),cluster:j})]})}function I(e){let{refreshInterval:s,setLoading:t,refreshDataRef:l,filters:i,showHistory:p,onOpenSSHModal:f,onOpenVSCodeModal:j,setOptionValues:g,preloadingComplete:v}=e,[w,b]=(0,a.useState)([]),[k,C]=(0,a.useState)({key:null,direction:"ascending"}),[L,R]=(0,a.useState)(!1),[_,I]=(0,a.useState)(!0),[H,O]=(0,a.useState)(1),[F,V]=(0,a.useState)(10),q=e=>{let s={status:[],cluster:[],user:[],workspace:[],infra:[]},t=(e,s)=>{e.includes(s)||e.push(s)};return e.map(e=>{t(s.status,e.status),t(s.cluster,e.cluster),t(s.user,e.user),t(s.workspace,e.workspace),t(s.infra,e.infra)}),s},z=a.useCallback(async()=>{t(!0),R(!0);try{let e=await N.default.get(x.getClusters);if(p){let s=await N.default.get(x.uR),t=e.map(e=>({...e,isHistorical:!1})),r=s.map(e=>({...e,isHistorical:!0})),a=[...t];r.forEach(s=>{e.some(e=>e.cluster_hash===s.cluster_hash)||a.push(s)}),g(q(a)),b(a)}else{let s=e.map(e=>({...e,isHistorical:!1}));g(q(s)),b(s)}}catch(e){console.error("Error fetching cluster data:",e),g(q([])),b([])}t(!1),R(!1),I(!1)},[t,p,g]),Z=(e,s)=>{var t;let{property:r,operator:a,value:l}=s;if(!l)return!0;if(!r){let s=l.toLowerCase();return Object.values(e).some(e=>null==e?void 0:e.toString().toLowerCase().includes(s))}let n=null===(t=e[r.toLowerCase()])||void 0===t?void 0:t.toString().toLowerCase(),c=l.toString().toLowerCase();switch(a){case"=":return n===c;case":":return null==n?void 0:n.includes(c);default:return!0}},A=a.useMemo(()=>{let e=0===i.length?w:w.filter(e=>{let s=null;for(let t=0;t<i.length;t++){let r=Z(e,i[t]);s=null===s?r:s&&r}return s});return(0,m.R0)(e,k.key,k.direction)},[w,k,i]);a.useEffect(()=>{l&&(l.current=z)},[l,z]),(0,a.useEffect)(()=>{b([]);let e=!0;if(v){z();let t=setInterval(()=>{e&&z()},s);return()=>{e=!1,clearInterval(t)}}return()=>{e=!1}},[s,z,v]),(0,a.useEffect)(()=>{O(1)},[w.length]);let P=e=>{let s="ascending";k.key===e&&"ascending"===k.direction&&(s="descending"),C({key:e,direction:s})},B=e=>k.key===e?"ascending"===k.direction?" ↑":" ↓":"",U=Math.ceil(A.length/F),D=(H-1)*F,X=D+F,T=A.slice(D,X);return(0,r.jsxs)("div",{children:[(0,r.jsx)(d.Zb,{children:(0,r.jsx)("div",{className:"overflow-x-auto rounded-lg",children:(0,r.jsxs)(h.iA,{className:"min-w-full",children:[(0,r.jsx)(h.xD,{children:(0,r.jsxs)(h.SC,{children:[(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>P("status"),children:["Status",B("status")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>P("cluster"),children:["Cluster",B("cluster")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>P("user"),children:["User",B("user")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>P("workspace"),children:["Workspace",B("workspace")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>P("infra"),children:["Infra",B("infra")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>P("resources_str"),children:["Resources",B("resources_str")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>P("time"),children:["Started",B("time")]}),p&&(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>P("duration"),children:["Duration",B("duration")]}),(0,r.jsxs)(h.ss,{className:"sortable whitespace-nowrap",onClick:()=>P("autostop"),children:["Autostop",B("autostop")]}),(0,r.jsx)(h.ss,{className:"md:sticky md:right-0 md:bg-white",children:"Actions"})]})}),(0,r.jsx)(h.RM,{children:L&&_?(0,r.jsx)(h.SC,{children:(0,r.jsx)(h.pj,{colSpan:9,className:"text-center py-6 text-gray-500",children:(0,r.jsxs)("div",{className:"flex justify-center items-center",children:[(0,r.jsx)(n.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]})})}):T.length>0?T.map((e,s)=>(0,r.jsxs)(h.SC,{children:[(0,r.jsx)(h.pj,{children:(0,r.jsx)(y.OE,{status:e.status})}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(o(),{href:"/clusters/".concat(e.isHistorical?e.cluster_hash:e.cluster||e.name),className:"text-blue-600",children:e.cluster||e.name})}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(S.H,{username:e.user,userHash:e.user_hash})}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(o(),{href:"/workspaces",className:"text-gray-700 hover:text-blue-600 hover:underline",children:e.workspace||"default"})}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(c.Md,{content:e.full_infra||e.infra,className:"text-sm text-muted-foreground",children:(0,r.jsxs)("span",{children:[(0,r.jsx)(o(),{href:"/infra",className:"text-blue-600 hover:underline",children:e.cloud}),e.infra.includes("(")&&(0,r.jsx)("span",{children:" "+e.infra.substring(e.infra.indexOf("("))})]})})}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(c.Md,{content:e.resources_str_full||e.resources_str,className:"text-sm text-muted-foreground",children:(0,r.jsx)("span",{children:e.resources_str})})}),(0,r.jsx)(h.pj,{children:(0,r.jsx)(c.Zg,{date:e.time})}),p&&(0,r.jsx)(h.pj,{children:E(e.duration)}),(0,r.jsx)(h.pj,{children:e.isHistorical?"-":M(e.autostop,e.to_down)}),(0,r.jsx)(h.pj,{className:"text-left md:sticky md:right-0 md:bg-white",children:!e.isHistorical&&(0,r.jsx)(W,{cluster:e.cluster,status:e.status,onOpenSSHModal:f,onOpenVSCodeModal:j})})]},s)):(0,r.jsx)(h.SC,{children:(0,r.jsx)(h.pj,{colSpan:9,className:"text-center py-6 text-gray-500",children:p?"No clusters found":"No active clusters"})})})]})})}),w.length>0&&(0,r.jsx)("div",{className:"flex justify-end items-center py-2 px-4 text-sm text-gray-700",children:(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"mr-2",children:"Rows per page:"}),(0,r.jsxs)("div",{className:"relative inline-block",children:[(0,r.jsxs)("select",{value:F,onChange:e=>{V(parseInt(e.target.value,10)),O(1)},className:"py-1 pl-2 pr-6 appearance-none outline-none cursor-pointer border-none bg-transparent",style:{minWidth:"40px"},children:[(0,r.jsx)("option",{value:10,children:"10"}),(0,r.jsx)("option",{value:30,children:"30"}),(0,r.jsx)("option",{value:50,children:"50"}),(0,r.jsx)("option",{value:100,children:"100"}),(0,r.jsx)("option",{value:200,children:"200"})]}),(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-500 absolute right-0 top-1/2 transform -translate-y-1/2 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),(0,r.jsx)("div",{children:"".concat(D+1," - ").concat(Math.min(X,A.length)," of ").concat(A.length)}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(u.z,{variant:"ghost",size:"icon",onClick:()=>{O(e=>Math.max(e-1,1))},disabled:1===H,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-left",children:(0,r.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),(0,r.jsx)(u.z,{variant:"ghost",size:"icon",onClick:()=>{O(e=>Math.min(e+1,U))},disabled:H===U||0===U,className:"text-gray-500 h-8 w-8 p-0",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"chevron-right",children:(0,r.jsx)("path",{d:"M9 18l6-6-6-6"})})})]})]})})]})}let H=(e,s)=>{s&&s(e)},O=(e,s)=>{s?s(e):window.open("ssh://".concat(e))},F=e=>"RUNNING"===e?["connect","VSCode"]:[],V={connect:(0,r.jsx)(g,{className:"w-4 h-4 text-gray-500 inline-block"}),VSCode:(0,r.jsx)(v,{className:"w-4 h-4 text-gray-500 inline-block"})};function W(e){let{withLabel:s=!1,cluster:t,status:a,onOpenSSHModal:l,onOpenVSCodeModal:n}=e,i=F(a),o=(0,b.X)(),u=e=>{switch(e){case"connect":O(t,l);break;case"VSCode":H(t,n);break;default:return}};return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"flex items-center space-x-4",children:Object.entries(V).map(e=>{let t,a,[l,n]=e;switch(l){case"connect":t="Connect",a="Connect with SSH";break;case"VSCode":t="VSCode",a="Open in VS Code"}return(s||(t=""),i.includes(l))?(0,r.jsx)(c.WH,{content:a,className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("button",{onClick:()=>u(l),className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center",children:[n,!o&&(0,r.jsx)("span",{className:"ml-1.5",children:t})]})},l):(0,r.jsx)(c.WH,{content:a,className:"capitalize text-sm text-muted-foreground",children:(0,r.jsxs)("span",{className:"opacity-30 flex items-center cursor-not-allowed text-sm",title:l,children:[n,!o&&(0,r.jsx)("span",{className:"ml-1.5",children:t})]})},l)})})})}let q=e=>{let{propertyList:s=[],valueList:t,setFilters:l,updateURLParams:n,placeholder:c="Filter clusters"}=e,i=(0,a.useRef)(null),o=(0,a.useRef)(null),[u,d]=(0,a.useState)(!1),[h,x]=(0,a.useState)(""),[p,m]=(0,a.useState)("status"),[f,j]=(0,a.useState)([]);(0,a.useEffect)(()=>{let e=e=>{o.current&&!o.current.contains(e.target)&&i.current&&!i.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,a.useEffect)(()=>{let e=[];if(t&&"object"==typeof t)switch(p){case"status":e=t.status||[];break;case"user":e=t.user||[];break;case"cluster":e=t.cluster||[];break;case"workspace":e=t.workspace||[];break;case"infra":e=t.infra||[]}""!==h.trim()&&(e=e.filter(e=>e&&e.toString().toLowerCase().includes(h.toLowerCase()))),j(e)},[p,t,h]);let g=e=>{let t=s.find(s=>s.value===e);return t?t.label:e},v=e=>{l(s=>{let t=[...s,{property:g(p),operator:":",value:e}];return n(t),t}),d(!1),x(""),i.current.focus()};return(0,r.jsxs)("div",{className:"flex flex-row border border-gray-300 rounded-md overflow-visible",children:[(0,r.jsx)("div",{className:"border-r border-gray-300 flex-shrink-0",children:(0,r.jsxs)(k.Ph,{onValueChange:m,value:p,children:[(0,r.jsx)(k.i4,{"aria-label":"Filter Property",className:"focus:ring-0 focus:ring-offset-0 border-none rounded-l-md rounded-r-none w-20 sm:w-24 md:w-32 h-8 text-xs sm:text-sm",children:(0,r.jsx)(k.ki,{placeholder:"Status"})}),(0,r.jsx)(k.Bw,{children:s.map((e,s)=>(0,r.jsx)(k.Ql,{value:e.value,children:e.label},"property-item-".concat(s)))})]})}),(0,r.jsxs)("div",{className:"relative flex-1",children:[(0,r.jsx)("input",{type:"text",ref:i,placeholder:c,value:h,onChange:e=>{x(e.target.value),u||d(!0)},onFocus:()=>{d(!0)},onKeyDown:e=>{"Enter"===e.key&&""!==h.trim()?(l(e=>{let s=[...e,{property:g(p),operator:":",value:h}];return n(s),s}),x(""),d(!1)):"Escape"===e.key&&(d(!1),i.current.blur())},className:"h-8 w-full sm:w-96 px-3 pr-8 text-sm border-none rounded-l-none rounded-r-md focus:ring-0 focus:outline-none",autoComplete:"off"}),h&&(0,r.jsx)("button",{onClick:()=>{x(""),d(!1)},className:"absolute right-2 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600",title:"Clear filter",tabIndex:-1,children:(0,r.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),u&&f.length>0&&(0,r.jsx)("div",{ref:o,className:"absolute z-50 mt-1 w-full bg-white border border-gray-200 rounded-md shadow-lg max-h-60 overflow-y-auto",style:{zIndex:9999},children:f.map((e,s)=>(0,r.jsx)("div",{className:"px-3 py-2 cursor-pointer hover:bg-gray-50 text-sm ".concat(s!==f.length-1?"border-b border-gray-100":""),onClick:()=>v(e),children:(0,r.jsx)("span",{className:"text-sm text-gray-700",children:e})},"".concat(e,"-").concat(s)))})]})]})},z=e=>{let{filters:s=[],setFilters:t,updateURLParams:a}=e,l=e=>{t(s=>{let t=s.filter((s,t)=>t!==e);return a(t),t})};return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"flex items-center gap-4 py-2 px-2",children:(0,r.jsxs)("div",{className:"flex flex-wrap items-content gap-2",children:[s.map((e,s)=>(0,r.jsx)(Z,{filter:e,onRemove:()=>l(s)},"filteritem-".concat(s))),s.length>0&&(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("button",{onClick:()=>{a([]),t([])},className:"rounded-full px-4 py-1 text-sm text-gray-700 bg-gray-200 hover:bg-gray-300",children:"Clear filters"})})]})})})},Z=e=>{let{filter:s,onRemove:t}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"flex items-center text-blue-600 bg-blue-100 px-1 py-1 rounded-full text-sm",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 px-2",children:[(0,r.jsx)("span",{children:"".concat(s.property," ")}),(0,r.jsx)("span",{children:"".concat(s.operator," ")}),(0,r.jsx)("span",{children:" ".concat(s.value)})]}),(0,r.jsx)("button",{onClick:()=>t(),className:"p-0.5 ml-1 transform text-gray-400 hover:text-gray-600 bg-blue-500 hover:bg-blue-600 rounded-full flex flex-col items-center",title:"Clear filter",children:(0,r.jsx)("svg",{className:"h-3 w-3",fill:"none",stroke:"white",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:5,d:"M6 18L18 6M6 6l12 12"})})})]})})}}}]);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{83454:function(e,t,n){"use strict";var o,r;e.exports=(null==(o=n.g.process)?void 0:o.env)&&"object"==typeof(null==(r=n.g.process)?void 0:r.env)?n.g.process:n(77663)},91118:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(32586)}])},19606:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return s},noSSR:function(){return l}});let o=n(10260);n(85893),n(67294);let r=o._(n(6119));function i(e){return{default:(null==e?void 0:e.default)||e}}function l(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){let n=r.default,o={loading:e=>{let{error:t,isLoading:n,pastDelay:o}=e;return null}};e instanceof Promise?o.loader=()=>e:"function"==typeof e?o.loader=e:"object"==typeof e&&(o={...o,...e});let s=(o={...o,...t}).loader;return(o.loadableGenerated&&(o={...o,...o.loadableGenerated},delete o.loadableGenerated),"boolean"!=typeof o.ssr||o.ssr)?n({...o,loader:()=>null!=s?s().then(i):Promise.resolve(i(()=>null))}):(delete o.webpack,delete o.modules,l(n,o))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},16725:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return o}});let o=n(10260)._(n(67294)).default.createContext(null)},6119:function(e,t,n){"use strict";/**
|
|
2
|
-
@copyright (c) 2017-present James Kyle <me@thejameskyle.com>
|
|
3
|
-
MIT License
|
|
4
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
5
|
-
a copy of this software and associated documentation files (the
|
|
6
|
-
"Software"), to deal in the Software without restriction, including
|
|
7
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
8
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
9
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
10
|
-
the following conditions:
|
|
11
|
-
The above copyright notice and this permission notice shall be
|
|
12
|
-
included in all copies or substantial portions of the Software.
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
14
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
15
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
16
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
17
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
18
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
19
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
|
|
20
|
-
*/Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return h}});let o=n(10260)._(n(67294)),r=n(16725),i=[],l=[],s=!1;function a(e){let t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then(e=>(n.loading=!1,n.loaded=e,e)).catch(e=>{throw n.loading=!1,n.error=e,e}),n}class c{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let n=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),i=null;function a(){if(!i){let t=new c(e,n);i={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return i.promise()}if(!s){let e=n.webpack?n.webpack():n.modules;e&&l.push(t=>{for(let n of e)if(t.includes(n))return a()})}function u(e,t){!function(){a();let e=o.default.useContext(r.LoadableContext);e&&Array.isArray(n.modules)&&n.modules.forEach(t=>{e(t)})}();let l=o.default.useSyncExternalStore(i.subscribe,i.getCurrentValue,i.getCurrentValue);return o.default.useImperativeHandle(t,()=>({retry:i.retry}),[]),o.default.useMemo(()=>{var t;return l.loading||l.error?o.default.createElement(n.loading,{isLoading:l.loading,pastDelay:l.pastDelay,timedOut:l.timedOut,error:l.error,retry:i.retry}):l.loaded?o.default.createElement((t=l.loaded)&&t.default?t.default:t,e):null},[e,l])}return u.preload=()=>a(),u.displayName="LoadableComponent",o.default.forwardRef(u)}(a,e)}function d(e,t){let n=[];for(;e.length;){let o=e.pop();n.push(o(t))}return Promise.all(n).then(()=>{if(e.length)return d(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{d(i).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let n=()=>(s=!0,t());d(l,e).then(n,n)})),window.__NEXT_PRELOADREADY=u.preloadReady;let h=u},93225:function(e,t,n){"use strict";n.d(t,{$m:function(){return a},Bo:function(){return l},GW:function(){return r},Z2:function(){return c},f4:function(){return o},iW:function(){return s},mF:function(){return i}}),n(83454);let o=function(){{let e=window.location.pathname,t=e.indexOf("/dashboard");if(-1!==t){let n=e.substring(0,t);return"".concat(n,"/internal/dashboard")}return"/internal/dashboard"}}(),r=function(){{let e=window.location.pathname,t=e.indexOf("/dashboard");return -1!==t?e.substring(0,t+10):"/dashboard"}}();"/api/v1".replace(/^http/,"ws");let i="ClusterDoesNotExist",l="NotSupportedError",s="ClusterNotUpError",a=["AWS","Azure","GCP","IBM","Lambda","SCP","OCI","RunPod","VAST","vSphere","Cudo","FluidStack","Paperspace","DO","Nebius"],c=Object.fromEntries([...a.map(e=>[e.toLowerCase(),e]),["kubernetes","Kubernetes"],["ssh","SSH Node Pool"]])},6556:function(e,t,n){"use strict";n.d(t,{n:function(){return l}});var o=n(67294);let r="skypilot-dashboard-first-visit",i="skypilot-dashboard-tour-completed";function l(){let[e,t]=(0,o.useState)(!1),[n,l]=(0,o.useState)(!1),[s,a]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{a(!0);let e=localStorage.getItem(r),n=localStorage.getItem(i);e||(t(!0),localStorage.setItem(r,"true")),n&&l(!0)},[]),{isFirstVisit:!!s&&e,tourCompleted:!!s&&n,shouldShowTourPrompt:s&&e&&!n,shouldPulseHelpButton:s&&e&&!n,markTourCompleted:()=>{localStorage.setItem(i,"true"),l(!0)},resetFirstVisit:()=>{localStorage.removeItem(r),localStorage.removeItem(i),t(!0),l(!1)},isClient:s}}},94849:function(e,t,n){"use strict";let o,r;n.d(t,{C:function(){return t5},r:function(){return t3}});var i,l,s=n(85893),a=n(67294),c=n(11163);function u(e){return e instanceof HTMLElement}function d(e){return"function"==typeof e}function h(e){return"string"==typeof e}function f(e){return void 0===e}class p{on(e,t,n,o=!1){var r;return f(this.bindings)&&(this.bindings={}),f(this.bindings[e])&&(this.bindings[e]=[]),null==(r=this.bindings[e])||r.push({handler:t,ctx:n,once:o}),this}once(e,t,n){return this.on(e,t,n,!0)}off(e,t){if(f(this.bindings)||f(this.bindings[e]))return this;if(f(t))delete this.bindings[e];else{var n;null==(n=this.bindings[e])||n.forEach((n,o)=>{if(n.handler===t){var r;null==(r=this.bindings[e])||r.splice(o,1)}})}return this}trigger(e,...t){if(!f(this.bindings)&&this.bindings[e]){var n;null==(n=this.bindings[e])||n.forEach((n,o)=>{let{ctx:r,handler:i,once:l}=n;if(i.apply(r||this,t),l){var s;null==(s=this.bindings[e])||s.splice(o,1)}})}return this}}function m(){return(m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(null,arguments)}function g(e,t){if(null==e)return{};var n={};for(var o in e)if(({}).hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}let y={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};function b(e,t){return t}function v(e,t){return e.filter(e=>void 0!==e)}function x(e){return"object"!=typeof e||null===e?0:Array.isArray(e)?2:!function(e){if(!E.has(Object.prototype.toString.call(e)))return!1;let{constructor:t}=e;if(void 0===t)return!0;let n=t.prototype;return!!(null!==n&&"object"==typeof n&&E.has(Object.prototype.toString.call(n))&&n.hasOwnProperty("isPrototypeOf"))}(e)?e instanceof Set?3:e instanceof Map?4:5:1}function w(e){return{*[Symbol.iterator](){for(let t of e)for(let e of t)yield e}}}y.defaultMerge,(i=l||(l={}))[i.NOT=0]="NOT",i[i.RECORD=1]="RECORD",i[i.ARRAY=2]="ARRAY",i[i.SET=3]="SET",i[i.MAP=4]="MAP",i[i.OTHER=5]="OTHER";let E=new Set(["[object Object]","[object Module]"]),S={mergeRecords:function(e,t,n){let o={};for(let r of function(e){let t=new Set;for(let n of e)for(let e of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(e);return t}(e)){let i=[];for(let t of e)"object"==typeof t&&Object.prototype.propertyIsEnumerable.call(t,r)&&i.push(t[r]);if(0===i.length)continue;let l=t.metaDataUpdater(n,{key:r,parents:e}),s=$(i,t,l);s!==y.skip&&("__proto__"===r?Object.defineProperty(o,r,{value:s,configurable:!0,enumerable:!0,writable:!0}):o[r]=s)}return o},mergeArrays:function(e){return e.flat()},mergeSets:function(e){return new Set(w(e))},mergeMaps:function(e){return new Map(w(e))},mergeOthers:function(e){return e.at(-1)}};function T(...e){return(function(e,t){var n,o,r;let i={defaultMergeFunctions:S,mergeFunctions:m({},S,Object.fromEntries(Object.entries(e).filter(([e,t])=>Object.hasOwn(S,e)).map(([e,t])=>!1===t?[e,S.mergeOthers]:[e,t]))),metaDataUpdater:null!=(n=e.metaDataUpdater)?n:b,deepmerge:l,useImplicitDefaultMerging:null!=(o=e.enableImplicitDefaultMerging)&&o,filterValues:!1===e.filterValues?void 0:null!=(r=e.filterValues)?r:v,actions:y};function l(...e){return $(e,i,void 0)}return l})({})(...e)}function $(e,t,n){var o;let r=null!=(o=null==t.filterValues?void 0:t.filterValues(e,n))?o:e;if(0===r.length)return;if(1===r.length)return k(r,t,n);let i=x(r[0]);if(0!==i&&5!==i){for(let e=1;e<r.length;e++)if(x(r[e])!==i)return k(r,t,n)}switch(i){case 1:return function(e,t,n){let o=t.mergeFunctions.mergeRecords(e,t,n);return o===y.defaultMerge||t.useImplicitDefaultMerging&&void 0===o&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords?t.defaultMergeFunctions.mergeRecords(e,t,n):o}(r,t,n);case 2:return function(e,t,n){let o=t.mergeFunctions.mergeArrays(e,t,n);return o===y.defaultMerge||t.useImplicitDefaultMerging&&void 0===o&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays?t.defaultMergeFunctions.mergeArrays(e):o}(r,t,n);case 3:return function(e,t,n){let o=t.mergeFunctions.mergeSets(e,t,n);return o===y.defaultMerge||t.useImplicitDefaultMerging&&void 0===o&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets?t.defaultMergeFunctions.mergeSets(e):o}(r,t,n);case 4:return function(e,t,n){let o=t.mergeFunctions.mergeMaps(e,t,n);return o===y.defaultMerge||t.useImplicitDefaultMerging&&void 0===o&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps?t.defaultMergeFunctions.mergeMaps(e):o}(r,t,n);default:return k(r,t,n)}}function k(e,t,n){let o=t.mergeFunctions.mergeOthers(e,t,n);return o===y.defaultMerge||t.useImplicitDefaultMerging&&void 0===o&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):o}function _(e){let t=Object.getOwnPropertyNames(e.constructor.prototype);for(let n=0;n<t.length;n++){let o=t[n],r=e[o];"constructor"!==o&&"function"==typeof r&&(e[o]=r.bind(e))}return e}class C{constructor(e){}}class O{constructor(e,t){}}function P(e){return h(e)&&""!==e?"-"!==e.charAt(e.length-1)?`${e}-`:e:""}function A(e){return null==e||!e.element||!e.on}function L(){let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)})}let M=["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),I=Math.min,R=Math.max,q=Math.round,B=Math.floor,H=e=>({x:e,y:e}),j={left:"right",right:"left",bottom:"top",top:"bottom"},D={start:"end",end:"start"};function F(e,t){return"function"==typeof e?e(t):e}function N(e){return e.split("-")[0]}function V(e){return e.split("-")[1]}function W(e){return"x"===e?"y":"x"}function z(e){return"y"===e?"height":"width"}function U(e){return["top","bottom"].includes(N(e))?"y":"x"}function Y(e,t,n){void 0===n&&(n=!1);let o=V(e),r=W(U(e)),i=z(r),l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=K(l)),[l,K(l)]}function G(e){return e.replace(/start|end/g,e=>D[e])}function K(e){return e.replace(/left|right|bottom|top/g,e=>j[e])}function J(e){return"number"!=typeof e?m({top:0,right:0,bottom:0,left:0},e):{top:e,right:e,bottom:e,left:e}}function X(e){let{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}let Z=["crossAxis","alignment","allowedPlacements","autoAlignment"],Q=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],ee=["mainAxis","crossAxis","limiter"];function et(e,t,n){let o,{reference:r,floating:i}=e,l=U(t),s=W(U(t)),a=z(s),c=N(t),u="y"===l,d=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,f=r[a]/2-i[a]/2;switch(c){case"top":o={x:d,y:r.y-i.height};break;case"bottom":o={x:d,y:r.y+r.height};break;case"right":o={x:r.x+r.width,y:h};break;case"left":o={x:r.x-i.width,y:h};break;default:o={x:r.x,y:r.y}}switch(V(t)){case"start":o[s]-=f*(n&&u?-1:1);break;case"end":o[s]+=f*(n&&u?-1:1)}return o}let en=async(e,t,n)=>{let{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),a=await (null==l.isRTL?void 0:l.isRTL(t)),c=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=et(c,o,a),h=o,f={},p=0;for(let n=0;n<s.length;n++){let{name:i,fn:g}=s[n],{x:y,y:b,data:v,reset:x}=await g({x:u,y:d,initialPlacement:o,placement:h,strategy:r,middlewareData:f,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=y?y:u,d=null!=b?b:d,f=m({},f,{[i]:m({},f[i],v)}),x&&p<=50&&(p++,"object"==typeof x&&(x.placement&&(h=x.placement),x.rects&&(c=!0===x.rects?await l.getElementRects({reference:e,floating:t,strategy:r}):x.rects),{x:u,y:d}=et(c,h,a)),n=-1)}return{x:u,y:d,placement:h,strategy:r,middlewareData:f}};async function eo(e,t){var n;void 0===t&&(t={});let{x:o,y:r,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=F(t,e),p=J(f),m=s[h?"floating"===d?"reference":"floating":d],g=X(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:a})),y="floating"===d?{x:o,y:r,width:l.floating.width,height:l.floating.height}:l.reference,b=await (null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),v=await (null==i.isElement?void 0:i.isElement(b))&&await (null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},x=X(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:a}):y);return{top:(g.top-x.top+p.top)/v.y,bottom:(x.bottom-g.bottom+p.bottom)/v.y,left:(g.left-x.left+p.left)/v.x,right:(x.right-g.right+p.right)/v.x}}function er(){return"undefined"!=typeof window}function ei(e){return ea(e)?(e.nodeName||"").toLowerCase():"#document"}function el(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function es(e){var t;return null==(t=(ea(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ea(e){return!!er()&&(e instanceof Node||e instanceof el(e).Node)}function ec(e){return!!er()&&(e instanceof Element||e instanceof el(e).Element)}function eu(e){return!!er()&&(e instanceof HTMLElement||e instanceof el(e).HTMLElement)}function ed(e){return!!er()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof el(e).ShadowRoot)}function eh(e){let{overflow:t,overflowX:n,overflowY:o,display:r}=ey(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function ef(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function ep(e){let t=em(),n=ec(e)?ey(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function em(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function eg(e){return["html","body","#document"].includes(ei(e))}function ey(e){return el(e).getComputedStyle(e)}function eb(e){return ec(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ev(e){if("html"===ei(e))return e;let t=e.assignedSlot||e.parentNode||ed(e)&&e.host||es(e);return ed(t)?t.host:t}function ex(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);let r=function e(t){let n=ev(t);return eg(n)?t.ownerDocument?t.ownerDocument.body:t.body:eu(n)&&eh(n)?n:e(n)}(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=el(r);if(i){let e=ew(l);return t.concat(l,l.visualViewport||[],eh(r)?r:[],e&&n?ex(e):[])}return t.concat(r,ex(r,[],n))}function ew(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eE(e){let t=ey(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,r=eu(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,s=q(n)!==i||q(o)!==l;return s&&(n=i,o=l),{width:n,height:o,$:s}}function eS(e){return ec(e)?e:e.contextElement}function eT(e){let t=eS(e);if(!eu(t))return H(1);let n=t.getBoundingClientRect(),{width:o,height:r,$:i}=eE(t),l=(i?q(n.width):n.width)/o,s=(i?q(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}let e$=H(0);function ek(e){let t=el(e);return em()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:e$}function e_(e,t,n,o){var r;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=eS(e),s=H(1);t&&(o?ec(o)&&(s=eT(o)):s=eT(e));let a=(void 0===(r=n)&&(r=!1),o&&(!r||o===el(l))&&r)?ek(l):H(0),c=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,d=i.width/s.x,h=i.height/s.y;if(l){let e=el(l),t=o&&ec(o)?el(o):o,n=e,r=ew(n);for(;r&&o&&t!==n;){let e=eT(r),t=r.getBoundingClientRect(),o=ey(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,l=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,u*=e.y,d*=e.x,h*=e.y,c+=i,u+=l,r=ew(n=el(r))}}return X({width:d,height:h,x:c,y:u})}function eC(e,t){let n=eb(e).scrollLeft;return t?t.left+n:e_(es(e)).left+n}function eO(e,t,n){void 0===n&&(n=!1);let o=e.getBoundingClientRect();return{x:o.left+t.scrollLeft-(n?0:eC(e,o)),y:o.top+t.scrollTop}}function eP(e,t,n){let o;if("viewport"===t)o=function(e,t){let n=el(e),o=es(e),r=n.visualViewport,i=o.clientWidth,l=o.clientHeight,s=0,a=0;if(r){i=r.width,l=r.height;let e=em();(!e||e&&"fixed"===t)&&(s=r.offsetLeft,a=r.offsetTop)}return{width:i,height:l,x:s,y:a}}(e,n);else if("document"===t)o=function(e){let t=es(e),n=eb(e),o=e.ownerDocument.body,r=R(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=R(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),l=-n.scrollLeft+eC(e),s=-n.scrollTop;return"rtl"===ey(o).direction&&(l+=R(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:s}}(es(e));else if(ec(t))o=function(e,t){let n=e_(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=eu(e)?eT(e):H(1),l=e.clientWidth*i.x;return{width:l,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{let n=ek(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return X(o)}function eA(e){return"static"===ey(e).position}function eL(e,t){if(!eu(e)||"fixed"===ey(e).position)return null;if(t)return t(e);let n=e.offsetParent;return es(e)===n&&(n=n.ownerDocument.body),n}function eM(e,t){let n=el(e);if(ef(e))return n;if(!eu(e)){let t=ev(e);for(;t&&!eg(t);){if(ec(t)&&!eA(t))return t;t=ev(t)}return n}let o=eL(e,t);for(;o&&["table","td","th"].includes(ei(o))&&eA(o);)o=eL(o,t);return o&&eg(o)&&eA(o)&&!ep(o)?n:o||function(e){let t=ev(e);for(;eu(t)&&!eg(t);){if(ep(t))return t;if(ef(t))break;t=ev(t)}return null}(e)||n}let eI=async function(e){let t=this.getOffsetParent||eM,n=this.getDimensions,o=await n(e.floating);return{reference:function(e,t,n){let o=eu(t),r=es(t),i="fixed"===n,l=e_(e,!0,i,t),s={scrollLeft:0,scrollTop:0},a=H(0);if(o||!o&&!i){if(("body"!==ei(t)||eh(r))&&(s=eb(t)),o){let e=e_(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else r&&(a.x=eC(r))}let c=!r||o||i?H(0):eO(r,s);return{x:l.left+s.scrollLeft-a.x-c.x,y:l.top+s.scrollTop-a.y-c.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},eR={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e,i="fixed"===r,l=es(o),s=!!t&&ef(t.floating);if(o===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},c=H(1),u=H(0),d=eu(o);if((d||!d&&!i)&&(("body"!==ei(o)||eh(l))&&(a=eb(o)),eu(o))){let e=e_(o);c=eT(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}let h=!l||d||i?H(0):eO(l,a,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-a.scrollTop*c.y+u.y+h.y}},getDocumentElement:es,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e,i=[..."clippingAncestors"===n?ef(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let o=ex(e,[],!1).filter(e=>ec(e)&&"body"!==ei(e)),r=null,i="fixed"===ey(e).position,l=i?ev(e):e;for(;ec(l)&&!eg(l);){let t=ey(l),n=ep(l);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&!!r&&["absolute","fixed"].includes(r.position)||eh(l)&&!n&&function e(t,n){let o=ev(t);return!(o===n||!ec(o)||eg(o))&&("fixed"===ey(o).position||e(o,n))}(e,l))?o=o.filter(e=>e!==l):r=t,l=ev(l)}return t.set(e,o),o}(t,this._c):[].concat(n),o],l=i[0],s=i.reduce((e,n)=>{let o=eP(t,n,r);return e.top=R(o.top,e.top),e.right=I(o.right,e.right),e.bottom=I(o.bottom,e.bottom),e.left=R(o.left,e.left),e},eP(t,l,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:eM,getElementRects:eI,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=eE(e);return{width:t,height:n}},getScale:eT,isElement:ec,isRTL:function(e){return"rtl"===ey(e).direction}},eq=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:o,placement:r,rects:i,platform:l,elements:s,middlewareData:a}=t,{element:c,padding:u=0}=F(e,t)||{};if(null==c)return{};let d=J(u),h={x:n,y:o},f=W(U(r)),p=z(f),g=await l.getDimensions(c),y="y"===f,b=y?"clientHeight":"clientWidth",v=i.reference[p]+i.reference[f]-h[f]-i.floating[p],x=h[f]-i.reference[f],w=await (null==l.getOffsetParent?void 0:l.getOffsetParent(c)),E=w?w[b]:0;E&&await (null==l.isElement?void 0:l.isElement(w))||(E=s.floating[b]||i.floating[p]);let S=E/2-g[p]/2-1,T=I(d[y?"top":"left"],S),$=I(d[y?"bottom":"right"],S),k=E-g[p]-$,_=E/2-g[p]/2+(v/2-x/2),C=R(T,I(_,k)),O=!a.arrow&&null!=V(r)&&_!==C&&i.reference[p]/2-(_<T?T:$)-g[p]/2<0,P=O?_<T?_-T:_-k:0;return{[f]:h[f]+P,data:m({[f]:C,centerOffset:_-C-P},O&&{alignmentOffset:P}),reset:O}}}),eB=(e,t,n)=>{let o=new Map,r=m({platform:eR},n),i=m({},r.platform,{_c:o});return en(e,t,m({},r,{platform:i}))};function eH(){}function ej(e){return e()}function eD(){return Object.create(null)}function eF(e){e.forEach(ej)}function eN(e){return"function"==typeof e}function eV(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function eW(e,t){e.appendChild(t)}function ez(e,t,n){e.insertBefore(t,n||null)}function eU(e){e.parentNode&&e.parentNode.removeChild(e)}function eY(e){return document.createElement(e)}function eG(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function eK(e){return document.createTextNode(e)}function eJ(){return eK(" ")}function eX(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function eZ(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}let eQ=["width","height"];function e0(e,t){let n=Object.getOwnPropertyDescriptors(e.__proto__);for(let o in t)null==t[o]?e.removeAttribute(o):"style"===o?e.style.cssText=t[o]:"__value"===o?e.value=e[o]=t[o]:n[o]&&n[o].set&&-1===eQ.indexOf(o)?e[o]=t[o]:eZ(e,o,t[o])}function e1(e,t,n){e.classList.toggle(t,!!n)}function e2(){if(!o)throw Error("Function called outside component initialization");return o}function e4(e){e2().$$.after_update.push(e)}let e6=[],e3=[],e5=[],e9=[],e8=Promise.resolve(),e7=!1;function te(e){e5.push(e)}let tt=new Set,tn=0;function to(){if(0!==tn)return;let e=o;do{try{for(;tn<e6.length;){let e=e6[tn];tn++,o=e,function(e){if(null!==e.fragment){e.update(),eF(e.before_update);let t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(te)}}(e.$$)}}catch(e){throw e6.length=0,tn=0,e}for(o=null,e6.length=0,tn=0;e3.length;)e3.pop()();for(let e=0;e<e5.length;e+=1){let t=e5[e];tt.has(t)||(tt.add(t),t())}e5.length=0}while(e6.length);for(;e9.length;)e9.pop()();e7=!1,tt.clear(),o=e}let tr=new Set;function ti(){r={r:0,c:[],p:r}}function tl(){r.r||eF(r.c),r=r.p}function ts(e,t){e&&e.i&&(tr.delete(e),e.i(t))}function ta(e,t,n,o){e&&e.o?tr.has(e)||(tr.add(e),r.c.push(()=>{tr.delete(e),o&&(n&&e.d(1),o())}),e.o(t)):o&&o()}function tc(e){return(null==e?void 0:e.length)!==void 0?e:Array.from(e)}function tu(e){e&&e.c()}function td(e,t,n){let{fragment:o,after_update:r}=e.$$;o&&o.m(t,n),te(()=>{let t=e.$$.on_mount.map(ej).filter(eN);e.$$.on_destroy?e.$$.on_destroy.push(...t):eF(t),e.$$.on_mount=[]}),r.forEach(te)}function th(e,t){let n=e.$$;null!==n.fragment&&(!function(e){let t=[],n=[];e5.forEach(o=>-1===e.indexOf(o)?t.push(o):n.push(o)),n.forEach(e=>e()),e5=t}(n.after_update),eF(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function tf(e,t,n,r,i,l,s=null,a=[-1]){let c=o;o=e;let u=e.$$={fragment:null,ctx:[],props:l,update:eH,not_equal:i,bound:eD(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(c?c.$$.context:[])),callbacks:eD(),dirty:a,skip_bound:!1,root:t.target||c.$$.root};s&&s(u.root);let d=!1;if(u.ctx=n?n(e,t.props||{},(t,n,...o)=>{let r=o.length?o[0]:n;return u.ctx&&i(u.ctx[t],u.ctx[t]=r)&&(!u.skip_bound&&u.bound[t]&&u.bound[t](r),d)&&(-1===e.$$.dirty[0]&&(e6.push(e),e7||(e7=!0,e8.then(to)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31),n}):[],u.update(),d=!0,eF(u.before_update),u.fragment=!!r&&r(u.ctx),t.target){if(t.hydrate){let e=Array.from(t.target.childNodes);u.fragment&&u.fragment.l(e),e.forEach(eU)}else u.fragment&&u.fragment.c();t.intro&&ts(e.$$.fragment),td(e,t.target,t.anchor),to()}o=c}class tp{constructor(){this.$$=void 0,this.$$set=void 0}$destroy(){th(this,1),this.$destroy=eH}$on(e,t){if(!eN(t))return eH;let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&0!==Object.keys(e).length&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function tm(e){let t,n,o,r,i;return{c(){eZ(t=eY("button"),"aria-label",n=e[3]?e[3]:null),eZ(t,"class",o=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`),t.disabled=e[2],eZ(t,"tabindex","0"),eZ(t,"type","button")},m(n,o){ez(n,t,o),t.innerHTML=e[5],r||(i=eX(t,"click",function(){eN(e[0])&&e[0].apply(this,arguments)}),r=!0)},p(r,[i]){e=r,32&i&&(t.innerHTML=e[5]),8&i&&n!==(n=e[3]?e[3]:null)&&eZ(t,"aria-label",n),18&i&&o!==(o=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`)&&eZ(t,"class",o),4&i&&(t.disabled=e[2])},i:eH,o:eH,d(e){e&&eU(t),r=!1,i()}}}function tg(e,t,n){let o,r,i,l,s,a,{config:c,step:u}=t;function h(e){return d(e)?e=e.call(u):e}return e.$$set=e=>{"config"in e&&n(6,c=e.config),"step"in e&&n(7,u=e.step)},e.$$.update=()=>{192&e.$$.dirty&&(n(0,o=c.action?c.action.bind(u.tour):null),n(1,r=c.classes),n(2,i=!!c.disabled&&h(c.disabled)),n(3,l=c.label?h(c.label):null),n(4,s=c.secondary),n(5,a=c.text?h(c.text):null))},[o,r,i,l,s,a,c,u]}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");class ty extends tp{constructor(e){super(),tf(this,e,tg,tm,eV,{config:6,step:7})}}function tb(e,t,n){let o=e.slice();return o[2]=t[n],o}function tv(e){let t,n;let o=tc(e[1]),r=[];for(let t=0;t<o.length;t+=1)r[t]=tx(tb(e,o,t));let i=e=>ta(r[e],1,1,()=>{r[e]=null});return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=eK("")},m(e,o){for(let t=0;t<r.length;t+=1)r[t]&&r[t].m(e,o);ez(e,t,o),n=!0},p(e,n){if(3&n){let l;for(l=0,o=tc(e[1]);l<o.length;l+=1){let i=tb(e,o,l);r[l]?(r[l].p(i,n),ts(r[l],1)):(r[l]=tx(i),r[l].c(),ts(r[l],1),r[l].m(t.parentNode,t))}for(ti(),l=o.length;l<r.length;l+=1)i(l);tl()}},i(e){if(!n){for(let e=0;e<o.length;e+=1)ts(r[e]);n=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)ta(r[e]);n=!1},d(e){e&&eU(t),function(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}(r,e)}}}function tx(e){let t,n;return t=new ty({props:{config:e[2],step:e[0]}}),{c(){tu(t.$$.fragment)},m(e,o){td(t,e,o),n=!0},p(e,n){let o={};2&n&&(o.config=e[2]),1&n&&(o.step=e[0]),t.$set(o)},i(e){n||(ts(t.$$.fragment,e),n=!0)},o(e){ta(t.$$.fragment,e),n=!1},d(e){th(t,e)}}}function tw(e){let t,n;let o=e[1]&&tv(e);return{c(){t=eY("footer"),o&&o.c(),eZ(t,"class","shepherd-footer")},m(e,r){ez(e,t,r),o&&o.m(t,null),n=!0},p(e,[n]){e[1]?o?(o.p(e,n),2&n&&ts(o,1)):((o=tv(e)).c(),ts(o,1),o.m(t,null)):o&&(ti(),ta(o,1,1,()=>{o=null}),tl())},i(e){n||(ts(o),n=!0)},o(e){ta(o),n=!1},d(e){e&&eU(t),o&&o.d()}}}function tE(e,t,n){let o;let{step:r}=t;return e.$$set=e=>{"step"in e&&n(0,r=e.step)},e.$$.update=()=>{1&e.$$.dirty&&n(1,o=r.options.buttons)},[r,o]}class tS extends tp{constructor(e){super(),tf(this,e,tE,tw,eV,{step:0})}}function tT(e){let t,n,o,r,i;return{c(){t=eY("button"),(n=eY("span")).textContent="\xd7",eZ(n,"aria-hidden","true"),eZ(t,"aria-label",o=e[0].label?e[0].label:"Close Tour"),eZ(t,"class","shepherd-cancel-icon"),eZ(t,"type","button")},m(o,l){ez(o,t,l),eW(t,n),r||(i=eX(t,"click",e[1]),r=!0)},p(e,[n]){1&n&&o!==(o=e[0].label?e[0].label:"Close Tour")&&eZ(t,"aria-label",o)},i:eH,o:eH,d(e){e&&eU(t),r=!1,i()}}}function t$(e,t,n){let{cancelIcon:o,step:r}=t;return e.$$set=e=>{"cancelIcon"in e&&n(0,o=e.cancelIcon),"step"in e&&n(2,r=e.step)},[o,e=>{e.preventDefault(),r.cancel()},r]}class tk extends tp{constructor(e){super(),tf(this,e,t$,tT,eV,{cancelIcon:0,step:2})}}function t_(e){let t;return{c(){eZ(t=eY("h3"),"id",e[1]),eZ(t,"class","shepherd-title")},m(n,o){ez(n,t,o),e[3](t)},p(e,[n]){2&n&&eZ(t,"id",e[1])},i:eH,o:eH,d(n){n&&eU(t),e[3](null)}}}function tC(e,t,n){let{labelId:o,element:r,title:i}=t;return e4(()=>{d(i)&&n(2,i=i()),n(0,r.innerHTML=i,r)}),e.$$set=e=>{"labelId"in e&&n(1,o=e.labelId),"element"in e&&n(0,r=e.element),"title"in e&&n(2,i=e.title)},[r,o,i,function(e){e3[e?"unshift":"push"](()=>{n(0,r=e)})}]}class tO extends tp{constructor(e){super(),tf(this,e,tC,t_,eV,{labelId:1,element:0,title:2})}}function tP(e){let t,n;return t=new tO({props:{labelId:e[0],title:e[2]}}),{c(){tu(t.$$.fragment)},m(e,o){td(t,e,o),n=!0},p(e,n){let o={};1&n&&(o.labelId=e[0]),4&n&&(o.title=e[2]),t.$set(o)},i(e){n||(ts(t.$$.fragment,e),n=!0)},o(e){ta(t.$$.fragment,e),n=!1},d(e){th(t,e)}}}function tA(e){let t,n;return t=new tk({props:{cancelIcon:e[3],step:e[1]}}),{c(){tu(t.$$.fragment)},m(e,o){td(t,e,o),n=!0},p(e,n){let o={};8&n&&(o.cancelIcon=e[3]),2&n&&(o.step=e[1]),t.$set(o)},i(e){n||(ts(t.$$.fragment,e),n=!0)},o(e){ta(t.$$.fragment,e),n=!1},d(e){th(t,e)}}}function tL(e){let t,n,o;let r=e[2]&&tP(e),i=e[3]&&e[3].enabled&&tA(e);return{c(){t=eY("header"),r&&r.c(),n=eJ(),i&&i.c(),eZ(t,"class","shepherd-header")},m(e,l){ez(e,t,l),r&&r.m(t,null),eW(t,n),i&&i.m(t,null),o=!0},p(e,[o]){e[2]?r?(r.p(e,o),4&o&&ts(r,1)):((r=tP(e)).c(),ts(r,1),r.m(t,n)):r&&(ti(),ta(r,1,1,()=>{r=null}),tl()),e[3]&&e[3].enabled?i?(i.p(e,o),8&o&&ts(i,1)):((i=tA(e)).c(),ts(i,1),i.m(t,null)):i&&(ti(),ta(i,1,1,()=>{i=null}),tl())},i(e){o||(ts(r),ts(i),o=!0)},o(e){ta(r),ta(i),o=!1},d(e){e&&eU(t),r&&r.d(),i&&i.d()}}}function tM(e,t,n){let o,r,{labelId:i,step:l}=t;return e.$$set=e=>{"labelId"in e&&n(0,i=e.labelId),"step"in e&&n(1,l=e.step)},e.$$.update=()=>{2&e.$$.dirty&&(n(2,o=l.options.title),n(3,r=l.options.cancelIcon))},[i,l,o,r]}class tI extends tp{constructor(e){super(),tf(this,e,tM,tL,eV,{labelId:0,step:1})}}function tR(e){let t;return{c(){eZ(t=eY("div"),"class","shepherd-text"),eZ(t,"id",e[1])},m(n,o){ez(n,t,o),e[3](t)},p(e,[n]){2&n&&eZ(t,"id",e[1])},i:eH,o:eH,d(n){n&&eU(t),e[3](null)}}}function tq(e,t,n){let{descriptionId:o,element:r,step:i}=t;return e4(()=>{let{text:e}=i.options;d(e)&&(e=e.call(i)),u(e)?r.appendChild(e):n(0,r.innerHTML=e,r)}),e.$$set=e=>{"descriptionId"in e&&n(1,o=e.descriptionId),"element"in e&&n(0,r=e.element),"step"in e&&n(2,i=e.step)},[r,o,i,function(e){e3[e?"unshift":"push"](()=>{n(0,r=e)})}]}class tB extends tp{constructor(e){super(),tf(this,e,tq,tR,eV,{descriptionId:1,element:0,step:2})}}function tH(e){let t,n;return t=new tI({props:{labelId:e[1],step:e[2]}}),{c(){tu(t.$$.fragment)},m(e,o){td(t,e,o),n=!0},p(e,n){let o={};2&n&&(o.labelId=e[1]),4&n&&(o.step=e[2]),t.$set(o)},i(e){n||(ts(t.$$.fragment,e),n=!0)},o(e){ta(t.$$.fragment,e),n=!1},d(e){th(t,e)}}}function tj(e){let t,n;return t=new tB({props:{descriptionId:e[0],step:e[2]}}),{c(){tu(t.$$.fragment)},m(e,o){td(t,e,o),n=!0},p(e,n){let o={};1&n&&(o.descriptionId=e[0]),4&n&&(o.step=e[2]),t.$set(o)},i(e){n||(ts(t.$$.fragment,e),n=!0)},o(e){ta(t.$$.fragment,e),n=!1},d(e){th(t,e)}}}function tD(e){let t,n;return t=new tS({props:{step:e[2]}}),{c(){tu(t.$$.fragment)},m(e,o){td(t,e,o),n=!0},p(e,n){let o={};4&n&&(o.step=e[2]),t.$set(o)},i(e){n||(ts(t.$$.fragment,e),n=!0)},o(e){ta(t.$$.fragment,e),n=!1},d(e){th(t,e)}}}function tF(e){let t,n,o,r;let i=!f(e[2].options.title)||e[2].options.cancelIcon&&e[2].options.cancelIcon.enabled,l=!f(e[2].options.text),s=Array.isArray(e[2].options.buttons)&&e[2].options.buttons.length,a=i&&tH(e),c=l&&tj(e),u=s&&tD(e);return{c(){t=eY("div"),a&&a.c(),n=eJ(),c&&c.c(),o=eJ(),u&&u.c(),eZ(t,"class","shepherd-content")},m(e,i){ez(e,t,i),a&&a.m(t,null),eW(t,n),c&&c.m(t,null),eW(t,o),u&&u.m(t,null),r=!0},p(e,[r]){4&r&&(i=!f(e[2].options.title)||e[2].options.cancelIcon&&e[2].options.cancelIcon.enabled),i?a?(a.p(e,r),4&r&&ts(a,1)):((a=tH(e)).c(),ts(a,1),a.m(t,n)):a&&(ti(),ta(a,1,1,()=>{a=null}),tl()),4&r&&(l=!f(e[2].options.text)),l?c?(c.p(e,r),4&r&&ts(c,1)):((c=tj(e)).c(),ts(c,1),c.m(t,o)):c&&(ti(),ta(c,1,1,()=>{c=null}),tl()),4&r&&(s=Array.isArray(e[2].options.buttons)&&e[2].options.buttons.length),s?u?(u.p(e,r),4&r&&ts(u,1)):((u=tD(e)).c(),ts(u,1),u.m(t,null)):u&&(ti(),ta(u,1,1,()=>{u=null}),tl())},i(e){r||(ts(a),ts(c),ts(u),r=!0)},o(e){ta(a),ta(c),ta(u),r=!1},d(e){e&&eU(t),a&&a.d(),c&&c.d(),u&&u.d()}}}function tN(e,t,n){let{descriptionId:o,labelId:r,step:i}=t;return e.$$set=e=>{"descriptionId"in e&&n(0,o=e.descriptionId),"labelId"in e&&n(1,r=e.labelId),"step"in e&&n(2,i=e.step)},[o,r,i]}class tV extends tp{constructor(e){super(),tf(this,e,tN,tF,eV,{descriptionId:0,labelId:1,step:2})}}function tW(e){let t;return{c(){eZ(t=eY("div"),"class","shepherd-arrow"),eZ(t,"data-popper-arrow","")},m(e,n){ez(e,t,n)},d(e){e&&eU(t)}}}function tz(e){let t,n,o,r,i,l,s,a;let c=e[4].options.arrow&&e[4].options.attachTo&&e[4].options.attachTo.element&&e[4].options.attachTo.on&&tW();o=new tV({props:{descriptionId:e[2],labelId:e[3],step:e[4]}});let u=[{"aria-describedby":r=f(e[4].options.text)?null:e[2]},{"aria-labelledby":i=e[4].options.title?e[3]:null},e[1],{open:"true"}],d={};for(let e=0;e<u.length;e+=1)d=function(e,t){for(let n in t)e[n]=t[n];return e}(d,u[e]);return{c(){t=eY("dialog"),c&&c.c(),n=eJ(),tu(o.$$.fragment),e0(t,d),e1(t,"shepherd-has-cancel-icon",e[5]),e1(t,"shepherd-has-title",e[6]),e1(t,"shepherd-element",!0)},m(r,i){ez(r,t,i),c&&c.m(t,null),eW(t,n),td(o,t,null),e[13](t),l=!0,s||(a=eX(t,"keydown",e[7]),s=!0)},p(e,[s]){e[4].options.arrow&&e[4].options.attachTo&&e[4].options.attachTo.element&&e[4].options.attachTo.on?c||((c=tW()).c(),c.m(t,n)):c&&(c.d(1),c=null);let a={};4&s&&(a.descriptionId=e[2]),8&s&&(a.labelId=e[3]),16&s&&(a.step=e[4]),o.$set(a),e0(t,d=function(e,t){let n={},o={},r={$$scope:1},i=e.length;for(;i--;){let l=e[i],s=t[i];if(s){for(let e in l)e in s||(o[e]=1);for(let e in s)r[e]||(n[e]=s[e],r[e]=1);e[i]=s}else for(let e in l)r[e]=1}for(let e in o)e in n||(n[e]=void 0);return n}(u,[(!l||20&s&&r!==(r=f(e[4].options.text)?null:e[2]))&&{"aria-describedby":r},(!l||24&s&&i!==(i=e[4].options.title?e[3]:null))&&{"aria-labelledby":i},2&s&&e[1],{open:"true"}])),e1(t,"shepherd-has-cancel-icon",e[5]),e1(t,"shepherd-has-title",e[6]),e1(t,"shepherd-element",!0)},i(e){l||(ts(o.$$.fragment,e),l=!0)},o(e){ta(o.$$.fragment,e),l=!1},d(n){n&&eU(t),c&&c.d(),th(o),e[13](null),s=!1,a()}}}function tU(e){return e.split(" ").filter(e=>!!e.length)}function tY(e,t,n){var o;let r,i,l,{classPrefix:s,element:a,descriptionId:c,firstFocusableElement:u,focusableElements:d,labelId:f,lastFocusableElement:p,step:m,dataStepId:g}=t;return o=()=>{n(1,g={[`data-${s}shepherd-step-id`]:m.id}),n(9,d=a.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]')),n(8,u=d[0]),n(10,p=d[d.length-1])},e2().$$.on_mount.push(o),e4(()=>{l!==m.options.classes&&(function(e){if(h(e)){let t=tU(e);t.length&&a.classList.remove(...t)}}(l),function(e){if(h(e)){let t=tU(e);t.length&&a.classList.add(...t)}}(l=m.options.classes))}),e.$$set=e=>{"classPrefix"in e&&n(11,s=e.classPrefix),"element"in e&&n(0,a=e.element),"descriptionId"in e&&n(2,c=e.descriptionId),"firstFocusableElement"in e&&n(8,u=e.firstFocusableElement),"focusableElements"in e&&n(9,d=e.focusableElements),"labelId"in e&&n(3,f=e.labelId),"lastFocusableElement"in e&&n(10,p=e.lastFocusableElement),"step"in e&&n(4,m=e.step),"dataStepId"in e&&n(1,g=e.dataStepId)},e.$$.update=()=>{16&e.$$.dirty&&(n(5,r=m.options&&m.options.cancelIcon&&m.options.cancelIcon.enabled),n(6,i=m.options&&m.options.title))},[a,g,c,f,m,r,i,e=>{let{tour:t}=m;switch(e.keyCode){case 9:if(0===d.length){e.preventDefault();break}e.shiftKey?(document.activeElement===u||document.activeElement.classList.contains("shepherd-element"))&&(e.preventDefault(),p.focus()):document.activeElement===p&&(e.preventDefault(),u.focus());break;case 27:t.options.exitOnEsc&&(e.preventDefault(),e.stopPropagation(),m.cancel());break;case 37:t.options.keyboardNavigation&&(e.preventDefault(),e.stopPropagation(),t.back());break;case 39:t.options.keyboardNavigation&&(e.preventDefault(),e.stopPropagation(),t.next())}},u,d,p,s,()=>a,function(e){e3[e?"unshift":"push"](()=>{n(0,a=e)})}]}class tG extends tp{constructor(e){super(),tf(this,e,tY,tz,eV,{classPrefix:11,element:0,descriptionId:2,firstFocusableElement:8,focusableElements:9,labelId:3,lastFocusableElement:10,step:4,dataStepId:1,getElement:12})}get getElement(){return this.$$.ctx[12]}}class tK extends p{constructor(e,t={}){return super(),this._resolvedAttachTo=void 0,this._resolvedExtraHighlightElements=void 0,this.classPrefix=void 0,this.el=void 0,this.target=void 0,this.tour=void 0,this.tour=e,this.classPrefix=this.tour.options?P(this.tour.options.classPrefix):"",this.styles=e.styles,this._resolvedAttachTo=null,_(this),this._setOptions(t),this}cancel(){this.tour.cancel(),this.trigger("cancel")}complete(){this.tour.complete(),this.trigger("complete")}destroy(){this.cleanup&&this.cleanup(),this.cleanup=null,u(this.el)&&(this.el.remove(),this.el=null),this._updateStepTargetOnHide(),this.trigger("destroy")}getTour(){return this.tour}hide(){var e;null==(e=this.tour.modal)||e.hide(),this.trigger("before-hide"),this.el&&(this.el.hidden=!0),this._updateStepTargetOnHide(),this.trigger("hide")}_resolveExtraHiglightElements(){return this._resolvedExtraHighlightElements=this.options.extraHighlights?this.options.extraHighlights.flatMap(e=>Array.from(document.querySelectorAll(e))):[],this._resolvedExtraHighlightElements}_resolveAttachToOptions(){return this._resolvedAttachTo=function(e){let t=e.options.attachTo||{},n=Object.assign({},t);if(d(n.element)&&(n.element=n.element.call(e)),h(n.element)){try{n.element=document.querySelector(n.element)}catch(e){}n.element||console.error(`The element for this Shepherd step was not found ${t.element}`)}return n}(this),this._resolvedAttachTo}_getResolvedAttachToOptions(){return null===this._resolvedAttachTo?this._resolveAttachToOptions():this._resolvedAttachTo}isOpen(){return!!(this.el&&!this.el.hidden)}show(){return d(this.options.beforeShowPromise)?Promise.resolve(this.options.beforeShowPromise()).then(()=>this._show()):Promise.resolve(this._show())}updateStepOptions(e){Object.assign(this.options,e),this.shepherdElementComponent&&this.shepherdElementComponent.$set({step:this})}getElement(){return this.el}getTarget(){return this.target}_createTooltipContent(){let e=`${this.id}-description`,t=`${this.id}-label`;return this.shepherdElementComponent=new tG({target:this.tour.options.stepsContainer||document.body,props:{classPrefix:this.classPrefix,descriptionId:e,labelId:t,step:this,styles:this.styles}}),this.shepherdElementComponent.getElement()}_scrollTo(e){let{element:t}=this._getResolvedAttachToOptions();d(this.options.scrollToHandler)?this.options.scrollToHandler(t):t instanceof Element&&"function"==typeof t.scrollIntoView&&t.scrollIntoView(e)}_getClassOptions(e){let t=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions,n=e.classes?e.classes:"",o=t&&t.classes?t.classes:"";return Array.from(new Set([...n.split(" "),...o.split(" ")])).join(" ").trim()}_setOptions(e={}){let t=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;t=T({},t||{}),this.options=Object.assign({arrow:!0},t,e,{floatingUIOptions:T(t.floatingUIOptions||{},e.floatingUIOptions||{})});let{when:n}=this.options;this.options.classes=this._getClassOptions(e),this.destroy(),this.id=this.options.id||`step-${L()}`,n&&Object.keys(n).forEach(e=>{this.on(e,n[e],this)})}_setupElements(){f(this.el)||this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&function(e){let{event:t,selector:n}=e.options.advanceOn||{};if(!t)return console.error("advanceOn was defined, but no event name was passed.");{let o=t=>{if(e.isOpen()){let o=e.el&&t.currentTarget===e.el;(!f(n)&&t.currentTarget.matches(n)||o)&&e.tour.next()}},r=null;if(!f(n)&&!(r=document.querySelector(n)))return console.error(`No element was found for the selector supplied to advanceOn: ${n}`);r?(r.addEventListener(t,o),e.on("destroy",()=>r.removeEventListener(t,o))):(document.body.addEventListener(t,o,!0),e.on("destroy",()=>document.body.removeEventListener(t,o,!0)))}}(this),function(e){e.cleanup&&e.cleanup();let t=e._getResolvedAttachToOptions(),n=t.element,o=function(e,t){var n,o,r,i,l,s,a,c;let u={strategy:"absolute"};u.middleware=[];let d=!!t.options.arrow&&!!t.el&&t.el.querySelector(".shepherd-arrow"),h=A(e),f=null==(n=e.on)?void 0:n.includes("auto"),p=(null==e||null==(o=e.on)?void 0:o.includes("-start"))||(null==e||null==(r=e.on)?void 0:r.includes("-end"));if(!h){if(f?u.middleware.push({name:"autoPlacement",options:l={crossAxis:!0,alignment:p?null==e||null==(i=e.on)?void 0:i.split("-").pop():null},async fn(e){var t,n,o,r;let{rects:i,middlewareData:s,placement:a,platform:c,elements:u}=e,d=F(l,e),{crossAxis:h=!1,alignment:f,allowedPlacements:p=M,autoAlignment:m=!0}=d,y=g(d,Z),b=void 0!==f||p===M?((r=f||null)?[...p.filter(e=>V(e)===r),...p.filter(e=>V(e)!==r)]:p.filter(e=>N(e)===e)).filter(e=>!r||V(e)===r||!!m&&G(e)!==e):p,v=await eo(e,y),x=(null==(t=s.autoPlacement)?void 0:t.index)||0,w=b[x];if(null==w)return{};let E=Y(w,i,await (null==c.isRTL?void 0:c.isRTL(u.floating)));if(a!==w)return{reset:{placement:b[0]}};let S=[v[N(w)],v[E[0]],v[E[1]]],T=[...(null==(n=s.autoPlacement)?void 0:n.overflows)||[],{placement:w,overflows:S}],$=b[x+1];if($)return{data:{index:x+1,overflows:T},reset:{placement:$}};let k=T.map(e=>{let t=V(e.placement);return[e.placement,t&&h?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),_=(null==(o=k.filter(e=>e[2].slice(0,V(e[0])?2:3).every(e=>e<=0))[0])?void 0:o[0])||k[0][0];return _!==a?{data:{index:x+1,overflows:T},reset:{placement:_}}:{}}}):u.middleware.push((void 0===s&&(s={}),{name:"flip",options:s,async fn(e){var t,n,o,r,i;let{placement:l,middlewareData:a,rects:c,initialPlacement:u,platform:d,elements:h}=e,f=F(s,e),{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:x=!0}=f,w=g(f,Q);if(null!=(t=a.arrow)&&t.alignmentOffset)return{};let E=N(l),S=U(u),T=N(u)===u,$=await (null==d.isRTL?void 0:d.isRTL(h.floating)),k=y||(T||!x?[K(u)]:function(e){let t=K(e);return[G(e),t,G(t)]}(u)),_="none"!==v;!y&&_&&k.push(...function(e,t,n,o){let r=V(e),i=function(e,t,n){let o=["left","right"],r=["right","left"];switch(e){case"top":case"bottom":if(n)return t?r:o;return t?o:r;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(N(e),"start"===n,o);return r&&(i=i.map(e=>e+"-"+r),t&&(i=i.concat(i.map(G)))),i}(u,x,v,$));let C=[u,...k],O=await eo(e,w),P=[],A=(null==(n=a.flip)?void 0:n.overflows)||[];if(p&&P.push(O[E]),m){let e=Y(l,c,$);P.push(O[e[0]],O[e[1]])}if(A=[...A,{placement:l,overflows:P}],!P.every(e=>e<=0)){let e=((null==(o=a.flip)?void 0:o.index)||0)+1,t=C[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(r=A.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:r.placement;if(!n)switch(b){case"bestFit":{let e=null==(i=A.filter(e=>{if(_){let t=U(e.placement);return t===S||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:i[0];e&&(n=e);break}case"initialPlacement":n=u}if(l!==n)return{reset:{placement:n}}}return{}}})),u.middleware.push({name:"shift",options:c={limiter:(void 0===a&&(a={}),{options:a,fn(e){let{x:t,y:n,placement:o,rects:r,middlewareData:i}=e,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=F(a,e),u={x:t,y:n},d=U(o),h=W(d),f=u[h],p=u[d],g=F(l,e),y="number"==typeof g?{mainAxis:g,crossAxis:0}:m({mainAxis:0,crossAxis:0},g);if(s){let e="y"===h?"height":"width",t=r.reference[h]-r.floating[e]+y.mainAxis,n=r.reference[h]+r.reference[e]-y.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var b,v;let e="y"===h?"width":"height",t=["top","left"].includes(N(o)),n=r.reference[d]-r.floating[e]+(t&&(null==(b=i.offset)?void 0:b[d])||0)+(t?0:y.crossAxis),l=r.reference[d]+r.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[d])||0)-(t?y.crossAxis:0);p<n?p=n:p>l&&(p=l)}return{[h]:f,[d]:p}}}),crossAxis:!0},async fn(e){let{x:t,y:n,placement:o}=e,r=F(c,e),{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}}}=r,a=g(r,ee),u={x:t,y:n},d=await eo(e,a),h=U(N(o)),f=W(h),p=u[f],y=u[h];if(i){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=p+d[e],o=p-d[t];p=R(n,I(p,o))}if(l){let e="y"===h?"top":"left",t="y"===h?"bottom":"right",n=y+d[e],o=y-d[t];y=R(n,I(y,o))}let b=s.fn(m({},e,{[f]:p,[h]:y}));return m({},b,{data:{x:b.x-t,y:b.y-n}})}}),d){let e="object"==typeof t.options.arrow?t.options.arrow:{padding:4};u.middleware.push(eq({element:d,padding:p?e.padding:0}))}f||(u.placement=e.on)}return T(u,t.options.floatingUIOptions||{})}(t,e),r=A(t);r&&(n=document.body,e.shepherdElementComponent.getElement().classList.add("shepherd-centered")),e.cleanup=function(e,t,n,o){let r;void 0===o&&(o={});let{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=o,u=eS(e),d=i||l?[...u?ex(u):[],...ex(t)]:[];d.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});let h=u&&a?function(e,t){let n,o=null,r=es(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function l(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),i();let{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(s||t(),!d||!h)return;let f=B(u),p=B(r.clientWidth-(c+d)),g={rootMargin:-f+"px "+-p+"px "+-B(r.clientHeight-(u+h))+"px "+-B(c)+"px",threshold:R(0,I(1,a))||1},y=!0;function b(e){let t=e[0].intersectionRatio;if(t!==a){if(!y)return l();t?l(!1,t):n=setTimeout(()=>{l(!1,1e-7)},1e3)}y=!1}try{o=new IntersectionObserver(b,m({},g,{root:r.ownerDocument}))}catch(e){o=new IntersectionObserver(b,g)}o.observe(e)}(!0),i}(u,n):null,f=-1,p=null;s&&(p=new ResizeObserver(e=>{let[o]=e;o&&o.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let g=c?e_(e):null;return c&&function t(){let o=e_(e);g&&(o.x!==g.x||o.y!==g.y||o.width!==g.width||o.height!==g.height)&&n(),g=o,r=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{i&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==h||h(),null==(e=p)||e.disconnect(),p=null,c&&cancelAnimationFrame(r)}}(n,e.el,()=>{if(!e.el){null==e.cleanup||e.cleanup();return}(function(e,t,n,o){eB(e,t.el,n).then(({x:e,y:n,placement:r,middlewareData:i})=>(t.el&&(o?Object.assign(t.el.style,{position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}):Object.assign(t.el.style,{position:"absolute",left:`${e}px`,top:`${n}px`}),t.el.dataset.popperPlacement=r,function(e,t){let n=e.querySelector(".shepherd-arrow");if(u(n)&&t.arrow){let{x:e,y:o}=t.arrow;Object.assign(n.style,{left:null!=e?`${e}px`:"",top:null!=o?`${o}px`:""})}}(t.el,i)),t)).then(e=>new Promise(t=>{setTimeout(()=>t(e),300)})).then(e=>{null!=e&&e.el&&e.el.focus({preventScroll:!0})})})(n,e,o,r)}),e.target=t.element}(this)}_show(){var e;this.trigger("before-show"),this._resolveAttachToOptions(),this._resolveExtraHiglightElements(),this._setupElements(),this.tour.modal||this.tour.setupModal(),null==(e=this.tour.modal)||e.setupForStep(this),this._styleTargetElementForStep(this),this.el&&(this.el.hidden=!1),this.options.scrollTo&&setTimeout(()=>{this._scrollTo(this.options.scrollTo)}),this.el&&(this.el.hidden=!1);let t=this.shepherdElementComponent.getElement(),n=this.target||document.body,o=this._resolvedExtraHighlightElements;n.classList.add(`${this.classPrefix}shepherd-enabled`),n.classList.add(`${this.classPrefix}shepherd-target`),t.classList.add("shepherd-enabled"),null==o||o.forEach(e=>{e.classList.add(`${this.classPrefix}shepherd-enabled`),e.classList.add(`${this.classPrefix}shepherd-target`)}),this.trigger("show")}_styleTargetElementForStep(e){let t=e.target,n=e._resolvedExtraHighlightElements;if(!t)return;let o=e.options.highlightClass;o&&(t.classList.add(o),null==n||n.forEach(e=>e.classList.add(o))),t.classList.remove("shepherd-target-click-disabled"),null==n||n.forEach(e=>e.classList.remove("shepherd-target-click-disabled")),!1===e.options.canClickTarget&&(t.classList.add("shepherd-target-click-disabled"),null==n||n.forEach(e=>e.classList.add("shepherd-target-click-disabled")))}_updateStepTargetOnHide(){let e=this.target||document.body,t=this._resolvedExtraHighlightElements,n=this.options.highlightClass;n&&(e.classList.remove(n),null==t||t.forEach(e=>e.classList.remove(n))),e.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`),null==t||t.forEach(e=>{e.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`)})}}function tJ(e){let t,n,o,r,i;return{c(){t=eG("svg"),eZ(n=eG("path"),"d",e[2]),eZ(t,"class",o=`${e[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)},m(o,l){ez(o,t,l),eW(t,n),e[11](t),r||(i=eX(t,"touchmove",e[3]),r=!0)},p(e,[r]){4&r&&eZ(n,"d",e[2]),2&r&&o!==(o=`${e[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)&&eZ(t,"class",o)},i:eH,o:eH,d(n){n&&eU(t),e[11](null),r=!1,i()}}}function tX(e,t,n){let o,r,{element:i,openingProperties:l}=t,s=!1;function a(){n(4,l=[{width:0,height:0,x:0,y:0,r:0}])}function c(){n(1,s=!1),f()}function u(e=0,t=0,o=0,r=0,i,s,c){if(s){let a=[s,...c||[]];for(let s of(n(4,l=[]),a)){if(!s||a.indexOf(s)!==a.lastIndexOf(s))continue;let{y:n,height:c}=function(e,t){let n=e.getBoundingClientRect(),o=n.y||n.top,r=n.bottom||o+n.height;if(t){let e=t.getBoundingClientRect(),n=e.y||e.top,i=e.bottom||n+e.height;o=Math.max(o,n),r=Math.min(r,i)}let i=Math.max(r-o,0);return{y:o,height:i}}(s,i),{x:u,width:d,left:h}=s.getBoundingClientRect();a.some(e=>{if(e===s)return!1;let t=e.getBoundingClientRect();return u>=t.left&&u+d<=t.right&&n>=t.top&&n+c<=t.bottom})||l.push({width:d+2*e,height:c+2*e,x:(u||h)+o-e,y:n+r-e,r:t})}}else a()}function d(){n(1,s=!0)}a();let h=e=>{e.preventDefault()};function f(){o&&(cancelAnimationFrame(o),o=void 0),window.removeEventListener("touchmove",h,{passive:!1})}return e.$$set=e=>{"element"in e&&n(0,i=e.element),"openingProperties"in e&&n(4,l=e.openingProperties)},e.$$.update=()=>{16&e.$$.dirty&&n(2,r=function(e){let t="",{innerWidth:n,innerHeight:o}=window;return e.forEach(e=>{let{width:n,height:o,x:r=0,y:i=0,r:l=0}=e,{topLeft:s=0,topRight:a=0,bottomRight:c=0,bottomLeft:u=0}="number"==typeof l?{topLeft:l,topRight:l,bottomRight:l,bottomLeft:l}:l;t+=`M${r+s},${i}\
|
|
21
|
-
a${s},${s},0,0,0-${s},${s}\
|
|
22
|
-
V${o+i-u}\
|
|
23
|
-
a${u},${u},0,0,0,${u},${u}\
|
|
24
|
-
H${n+r-c}\
|
|
25
|
-
a${c},${c},0,0,0,${c}-${c}\
|
|
26
|
-
V${i+a}\
|
|
27
|
-
a${a},${a},0,0,0-${a}-${a}\
|
|
28
|
-
Z`}),`M${n},${o}\
|
|
29
|
-
H0\
|
|
30
|
-
V0\
|
|
31
|
-
H${n}\
|
|
32
|
-
V${o}\
|
|
33
|
-
Z\
|
|
34
|
-
${t}`.replace(/\s/g,"")}(l))},[i,s,r,e=>{e.stopPropagation()},l,()=>i,a,c,u,function(e){f(),e.tour.options.useModalOverlay?(function(e){let{modalOverlayOpeningPadding:t,modalOverlayOpeningRadius:n,modalOverlayOpeningXOffset:r=0,modalOverlayOpeningYOffset:i=0}=e.options,l=function(e){let t={top:0,left:0};if(!e)return t;let n=e.ownerDocument.defaultView;for(;n!==window.top;){var o,r,i;let e=null==(o=n)?void 0:o.frameElement;if(e){let n=e.getBoundingClientRect();t.top+=n.top+(null!=(r=n.scrollTop)?r:0),t.left+=n.left+(null!=(i=n.scrollLeft)?i:0)}n=n.parent}return t}(e.target),s=function e(t){if(!t)return null;let n=t instanceof HTMLElement&&window.getComputedStyle(t).overflowY;return"hidden"!==n&&"visible"!==n&&t.scrollHeight>=t.clientHeight?t:e(t.parentElement)}(e.target),a=()=>{o=void 0,u(t,n,r+l.left,i+l.top,s,e.target,e._resolvedExtraHighlightElements),o=requestAnimationFrame(a)};a(),window.addEventListener("touchmove",h,{passive:!1})}(e),d()):c()},d,function(e){e3[e?"unshift":"push"](()=>{n(0,i=e)})}]}class tZ extends tp{constructor(e){super(),tf(this,e,tX,tJ,eV,{element:0,openingProperties:4,getElement:5,closeModalOpening:6,hide:7,positionModal:8,setupForStep:9,show:10})}get getElement(){return this.$$.ctx[5]}get closeModalOpening(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[7]}get positionModal(){return this.$$.ctx[8]}get setupForStep(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}}class tQ extends p{constructor(){super(),this.activeTour=void 0,_(this)}}class t0 extends p{constructor(e={}){return super(),this.trackedEvents=["active","cancel","complete","show"],this.classPrefix=void 0,this.currentStep=void 0,this.focusedElBeforeOpen=void 0,this.id=void 0,this.modal=void 0,this.options=void 0,this.steps=void 0,_(this),this.options=Object.assign({},{exitOnEsc:!0,keyboardNavigation:!0},e),this.classPrefix=P(this.options.classPrefix),this.steps=[],this.addSteps(this.options.steps),["active","cancel","complete","inactive","show","start"].map(e=>{(e=>{this.on(e,t=>{(t=t||{}).tour=this,t1.trigger(e,t)})})(e)}),this._setTourID(e.id),this}addStep(e,t){let n=e;return n instanceof tK?n.tour=this:n=new tK(this,n),f(t)?this.steps.push(n):this.steps.splice(t,0,n),n}addSteps(e){return Array.isArray(e)&&e.forEach(e=>{this.addStep(e)}),this}back(){let e=this.steps.indexOf(this.currentStep);this.show(e-1,!1)}async cancel(){if(this.options.confirmCancel){let e=this.options.confirmCancelMessage||"Are you sure you want to stop the tour?";(d(this.options.confirmCancel)?await this.options.confirmCancel():window.confirm(e))&&this._done("cancel")}else this._done("cancel")}complete(){this._done("complete")}getById(e){return this.steps.find(t=>t.id===e)}getCurrentStep(){return this.currentStep}hide(){let e=this.getCurrentStep();if(e)return e.hide()}isActive(){return t1.activeTour===this}next(){let e=this.steps.indexOf(this.currentStep);e===this.steps.length-1?this.complete():this.show(e+1,!0)}removeStep(e){let t=this.getCurrentStep();this.steps.some((t,n)=>{if(t.id===e)return t.isOpen()&&t.hide(),t.destroy(),this.steps.splice(n,1),!0}),t&&t.id===e&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}show(e=0,t=!0){let n=h(e)?this.getById(e):this.steps[e];n&&(this._updateStateBeforeShow(),d(n.options.showOn)&&!n.options.showOn()?this._skipStep(n,t):(this.currentStep=n,this.trigger("show",{step:n,previous:this.currentStep}),n.show()))}async start(){this.trigger("start"),this.focusedElBeforeOpen=document.activeElement,this.currentStep=null,this.setupModal(),this._setupActiveTour(),this.next()}_done(e){let t=this.steps.indexOf(this.currentStep);if(Array.isArray(this.steps)&&this.steps.forEach(e=>e.destroy()),!function(e){if(e){let{steps:t}=e;t.forEach(e=>{e.options&&!1===e.options.canClickTarget&&e.options.attachTo&&(u(e.target)&&e.target.classList.remove("shepherd-target-click-disabled"),e._resolvedExtraHighlightElements&&e._resolvedExtraHighlightElements.forEach(e=>{u(e)&&e.classList.remove("shepherd-target-click-disabled")}))})}}(this),this.trigger(e,{index:t}),t1.activeTour=null,this.trigger("inactive",{tour:this}),this.modal&&this.modal.hide(),("cancel"===e||"complete"===e)&&this.modal){let e=document.querySelector(".shepherd-modal-overlay-container");e&&(e.remove(),this.modal=null)}u(this.focusedElBeforeOpen)&&this.focusedElBeforeOpen.focus()}_setupActiveTour(){this.trigger("active",{tour:this}),t1.activeTour=this}setupModal(){this.modal=new tZ({target:this.options.modalContainer||document.body,props:{styles:this.styles}})}_skipStep(e,t){let n=this.steps.indexOf(e);n===this.steps.length-1?this.complete():this.show(t?n+1:n-1,t)}_updateStateBeforeShow(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()}_setTourID(e){let t=this.options.tourName||"tour",n=e||L();this.id=`${t}--${n}`}}let t1=new tQ,t2="undefined"==typeof window;t1.Step=t2?C:tK,t1.Tour=t2?O:t0;var t4=n(6556);let t6=(0,a.createContext)(null);function t3(){let e=(0,a.useContext)(t6);if(!e)throw Error("useTour must be used within a TourProvider");return e}function t5(e){let{children:t}=e,n=(0,a.useRef)(null),o=(0,c.useRouter)(),{isFirstVisit:r,markTourCompleted:i}=(0,t4.n)(),[l,u]=(0,a.useState)(!1),[d,h]=(0,a.useState)(!1),[f,p]=(0,a.useState)(!1),m=(0,a.useRef)(!1),g=()=>{n.current&&(h(!0),p(!0),n.current.start(),setTimeout(()=>{p(!1)},1e3))};(0,a.useEffect)(()=>{if(!n.current){n.current=new t1.Tour({useModalOverlay:!1,defaultStepOptions:{cancelIcon:{enabled:!0},scrollTo:{behavior:"smooth",block:"center"},arrow:!1,highlightClass:"shepherd-highlight",when:{show(){var e,t,n;let o=null===(e=t1.activeTour)||void 0===e?void 0:e.getCurrentStep(),r=null==o?void 0:o.getElement(),i=null==r?void 0:r.querySelector(".shepherd-footer"),l=document.createElement("span");if(l.className="shepherd-progress",l.innerText="".concat((null===(t=t1.activeTour)||void 0===t?void 0:t.steps.indexOf(o))+1," of ").concat(null===(n=t1.activeTour)||void 0===n?void 0:n.steps.length),null==i||i.insertBefore(l,i.firstChild),r){let e=r.offsetHeight;if(document.documentElement.style.setProperty("--shepherd-dialog-height","".concat(e+20,"px")),window.innerWidth<768){let e=null;for(let t of[".fixed.top-14.left-0.w-64","div.fixed.w-64.bg-white.border-r",".fixed.w-64.transform",'[class*="fixed"][class*="w-64"][class*="bg-white"]','div[class*="fixed"][class*="top-14"][class*="left-0"][class*="w-64"]'])if(e=document.querySelector(t))break;if(!e)for(let t of document.querySelectorAll("div.fixed")){let n=t.getBoundingClientRect();if(256===n.width&&0===n.left&&n.top>=50){e=t;break}}if(e&&e instanceof HTMLElement){let t=r.getBoundingClientRect().top-56;e.style.setProperty("height","".concat(t,"px"),"important"),e.style.setProperty("max-height","".concat(t,"px"),"important")}}}let s=null==o?void 0:o.getTarget();s&&s instanceof HTMLElement&&(s.style.outline="3px solid #3b82f6",s.style.outlineOffset="2px",s.style.borderRadius="8px",s.style.position="relative",s.style.zIndex="9999",s.setAttribute("data-shepherd-highlighted","true"))},hide(){let e=document.querySelector('[data-shepherd-highlighted="true"]');e&&e instanceof HTMLElement&&(e.style.outline="",e.style.outlineOffset="",e.style.borderRadius="",e.style.boxShadow="",e.style.position="",e.style.zIndex="",e.removeAttribute("data-shepherd-highlighted")),document.documentElement.style.removeProperty("--shepherd-dialog-height");let t=document.querySelector(".fixed.top-14.left-0.w-64")||document.querySelector("div.fixed.w-64.bg-white.border-r")||document.querySelector(".fixed.w-64.transform")||document.querySelector('[class*="fixed"][class*="w-64"][class*="bg-white"]');t&&t instanceof HTMLElement&&(t.style.removeProperty("height"),t.style.removeProperty("max-height"))}}}});let e=document.createElement("style");e.id="shepherd-global-custom-style",e.textContent='\n .shepherd-element {\n /* Uniform 1px border using inner box-shadow so corners stay consistent */\n border: none !important;\n border-radius: 10px !important;\n z-index: 30000 !important;\n box-shadow: 0 0 0 1px #d1d5db inset, 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;\n overflow: visible !important;\n background-clip: padding-box !important;\n }\n\n .shepherd-title {\n font-weight: bold;\n color: #111827;\n margin: 0;\n }\n\n .shepherd-element .shepherd-header {\n padding: 1rem 1rem 0.5rem 1rem;\n }\n\n .shepherd-element .shepherd-text {\n padding: 0.5rem 1rem 1rem 1rem;\n }\n\n /* Fix mobile menu gap when tour dialog is present */\n @media (max-width: 767px) {\n /* Very specific selector to override Tailwind\'s h-[calc(100vh-56px)] class */\n div.fixed.top-14.left-0.w-64.bg-white.border-r.shadow-lg.z-50.transform,\n .fixed.top-14.left-0.w-64.bg-white.shadow-lg.z-50,\n div[class*="fixed"][class*="top-14"][class*="left-0"][class*="w-64"][class*="bg-white"][class*="shadow-lg"][class*="z-50"] {\n height: calc(100vh - 56px - var(--shepherd-dialog-height, 200px)) !important;\n max-height: calc(100vh - 56px - var(--shepherd-dialog-height, 200px)) !important;\n }\n\n /* Target the mobile menu by its exact class combination from the HTML */\n .fixed.w-64.bg-white.border-r.border-gray-200.shadow-lg.z-50.transform,\n .fixed[class*="w-64"][class*="bg-white"][class*="border-r"][class*="shadow-lg"][class*="z-50"][class*="transform"] {\n height: calc(100vh - 56px - var(--shepherd-dialog-height, 200px)) !important;\n }\n\n /* Even more specific - target by multiple class combinations */\n .fixed.top-14.left-0[class*="w-64"],\n div.fixed[class*="top-14"][class*="left-0"][class*="w-64"] {\n height: calc(100vh - 56px - var(--shepherd-dialog-height, 200px)) !important;\n }\n\n /* Super aggressive approach - use high specificity to override Tailwind */\n body div.fixed.w-64:not(.shepherd-element),\n html body div.fixed.w-64:not(.shepherd-element) {\n height: calc(100vh - 56px - var(--shepherd-dialog-height, 200px)) !important;\n }\n\n /* Fallback selectors for other mobile menu patterns */\n nav[data-state="open"],\n .mobile-menu.open,\n [data-mobile-menu="true"] {\n height: calc(100vh - var(--shepherd-dialog-height, 200px)) !important;\n max-height: calc(100vh - var(--shepherd-dialog-height, 200px)) !important;\n }\n\n /* Ensure mobile menu content flows properly */\n .fixed.w-64 nav,\n .fixed[class*="w-64"] nav {\n height: 100% !important;\n overflow-y: auto !important;\n }\n }\n\n ',document.getElementById("shepherd-global-custom-style")||document.head.appendChild(e),n.current.on("complete",()=>{let e=document.querySelector('[data-shepherd-highlighted="true"]');e&&e instanceof HTMLElement&&(e.style.outline="",e.style.outlineOffset="",e.style.borderRadius="",e.style.boxShadow="",e.style.position="",e.style.zIndex="",e.removeAttribute("data-shepherd-highlighted"));let t=document.getElementById("shepherd-column-overlay");t&&t.remove();let n=document.getElementById("shepherd-column-anchor");n&&n.remove();let o=document.getElementById("shepherd-user-column-overlay");o&&o.remove();let r=document.getElementById("shepherd-user-column-anchor");r&&r.remove();let l=document.getElementById("shepherd-global-custom-style");l&&l.remove(),document.documentElement.style.removeProperty("--shepherd-dialog-height");let s=document.querySelector(".fixed.top-14.left-0.w-64")||document.querySelector("div.fixed.w-64.bg-white.border-r")||document.querySelector(".fixed.w-64.transform")||document.querySelector('[class*="fixed"][class*="w-64"][class*="bg-white"]');s&&s instanceof HTMLElement&&(s.style.removeProperty("height"),s.style.removeProperty("max-height")),h(!1),p(!1),i()}),n.current.on("cancel",()=>{let e=document.querySelector('[data-shepherd-highlighted="true"]');e&&e instanceof HTMLElement&&(e.style.outline="",e.style.outlineOffset="",e.style.borderRadius="",e.style.boxShadow="",e.style.position="",e.style.zIndex="",e.removeAttribute("data-shepherd-highlighted"));let t=document.getElementById("shepherd-column-overlay");t&&t.remove();let n=document.getElementById("shepherd-column-anchor");n&&n.remove();let o=document.getElementById("shepherd-user-column-overlay");o&&o.remove();let r=document.getElementById("shepherd-user-column-anchor");r&&r.remove();let l=document.getElementById("shepherd-global-custom-style");l&&l.remove(),document.documentElement.style.removeProperty("--shepherd-dialog-height");let s=document.querySelector(".fixed.top-14.left-0.w-64")||document.querySelector("div.fixed.w-64.bg-white.border-r")||document.querySelector(".fixed.w-64.transform")||document.querySelector('[class*="fixed"][class*="w-64"][class*="bg-white"]');s&&s instanceof HTMLElement&&(s.style.removeProperty("height"),s.style.removeProperty("max-height")),h(!1),p(!1),i()}),[{title:"\uD83D\uDC4B Welcome to SkyPilot!",text:"\n <p>SkyPilot is a system for managing AI workloads on any cluster and cloud infrastructure.</p>\n ",buttons:[{text:"Skip Tour",action(){this.cancel()},classes:"shepherd-button-secondary"},{text:"Start Tour",action(){this.next()}}]},{title:"Clusters",text:"\n <p>Spin up <strong>Sky Clusters</strong> on any infrastructure you have access to.</p>\n <p>Easily SSH into any node, connect an IDE, or queue development jobs.</p>\n ",attachTo:{element:'a[href="/dashboard/clusters"]',on:"bottom",offset:{skidding:0,distance:10}},beforeShowPromise:function(){return new Promise(e=>{let t=()=>{let t=window.innerWidth<768,n=document.querySelector('[data-testid="mobile-menu-button"], button[aria-label*="menu"], button[aria-label*="Menu"], .mobile-menu-button, [role="button"][aria-expanded]');if(t&&n&&!("true"===n.getAttribute("aria-expanded")||n.classList.contains("open")||document.querySelector('nav[data-state="open"], .mobile-menu.open, [data-mobile-menu="true"]'))){n instanceof HTMLElement&&n.click(),setTimeout(()=>{e()},300);return}e()};"/dashboard/clusters"!==o.pathname?(m.current=!0,o.push("/clusters").then(()=>{m.current=!1,setTimeout(t,200)})):t()})},when:{show(){var e,t,n;let o=null===(e=t1.activeTour)||void 0===e?void 0:e.getCurrentStep(),r=null==o?void 0:o.getElement(),i=null==r?void 0:r.querySelector(".shepherd-footer"),l=document.createElement("span");if(l.className="shepherd-progress",l.innerText="".concat((null===(t=t1.activeTour)||void 0===t?void 0:t.steps.indexOf(o))+1," of ").concat(null===(n=t1.activeTour)||void 0===n?void 0:n.steps.length),null==i||i.insertBefore(l,i.firstChild),r){let e=r.offsetHeight;if(document.documentElement.style.setProperty("--shepherd-dialog-height","".concat(e+20,"px")),window.innerWidth<768){let e=null;for(let t of[".fixed.top-14.left-0.w-64","div.fixed.w-64.bg-white.border-r",".fixed.w-64.transform",'[class*="fixed"][class*="w-64"][class*="bg-white"]','div[class*="fixed"][class*="top-14"][class*="left-0"][class*="w-64"]'])if(e=document.querySelector(t))break;if(!e)for(let t of document.querySelectorAll("div.fixed")){let n=t.getBoundingClientRect();if(256===n.width&&0===n.left&&n.top>=50){e=t;break}}if(e&&e instanceof HTMLElement){let t=r.getBoundingClientRect().top-56;e.style.setProperty("height","".concat(t,"px"),"important"),e.style.setProperty("max-height","".concat(t,"px"),"important")}}}let s=document.querySelector('a[href="/dashboard/clusters"]');s&&s instanceof HTMLElement&&(s.style.outline="3px solid #3b82f6",s.style.outlineOffset="2px",s.style.borderRadius="8px",s.style.position="relative",s.style.zIndex="9999",s.setAttribute("data-shepherd-highlighted","true"))},hide(){let e=document.querySelector('[data-shepherd-highlighted="true"]');e&&e instanceof HTMLElement&&(e.style.outline="",e.style.outlineOffset="",e.style.borderRadius="",e.style.boxShadow="",e.style.position="",e.style.zIndex="",e.removeAttribute("data-shepherd-highlighted")),document.documentElement.style.removeProperty("--shepherd-dialog-height");let t=document.querySelector(".fixed.top-14.left-0.w-64")||document.querySelector("div.fixed.w-64.bg-white.border-r")||document.querySelector(".fixed.w-64.transform")||document.querySelector('[class*="fixed"][class*="w-64"][class*="bg-white"]');t&&t instanceof HTMLElement&&(t.style.removeProperty("height"),t.style.removeProperty("max-height"))}},buttons:[{text:"Back",action(){this.back()},classes:"shepherd-button-secondary"},{text:"Next",action(){this.next()}}]},{title:"SkyPilot is infra-agnostic",text:"\n <p>Run compute on any hyperscaler, neocloud, or Kubernetes cluster — all within a unified system.</p>\n ",attachTo:{element:function(){let e=document.getElementById("shepherd-column-anchor");if(e)return e;let t=Array.from(document.querySelectorAll("thead th")).find(e=>e.textContent&&"Infra"===e.textContent.trim());if(t){let e=t.closest("table"),n=Array.from(t.parentElement.children).indexOf(t);if(e){let t=e.querySelectorAll("tbody tr"),o=null;for(let e=t.length-1;e>=0;e--){let r=t[e].children[n];if(r){o=r;break}}if(o)return o}return t}return document.querySelector("table")||"body"},on:"bottom",offset:{skidding:0,distance:15}},beforeShowPromise:function(){return new Promise(e=>{let t=()=>{let t=Array.from(document.querySelectorAll("thead th")).find(e=>e.textContent&&"Infra"===e.textContent.trim());if(t&&t instanceof HTMLElement){let o=t.closest("table");if(o){let r=t.getBoundingClientRect(),i=window.innerWidth,l=o.closest('.overflow-x-auto, .overflow-auto, [style*="overflow"]')||o.parentElement;if((r.right>i||r.left<0)&&l&&l instanceof HTMLElement){let o=l.getBoundingClientRect(),i=t.offsetLeft-o.width/2+r.width/2;l.scrollTo({left:Math.max(0,i),behavior:"smooth"}),setTimeout(()=>{n(),e()},300);return}n()}}e()},n=()=>{let e=Array.from(document.querySelectorAll("thead th")).find(e=>e.textContent&&"Infra"===e.textContent.trim());if(e&&e instanceof HTMLElement){let t=e.closest("table");if(t){let n=Array.from(e.parentElement.children).indexOf(e),o=e.getBoundingClientRect(),r=t.querySelectorAll("tbody tr"),i=o;r.forEach(e=>{let t=e.children[n];t&&(i=t.getBoundingClientRect())});let l=i.bottom+4,s=document.createElement("div");s.id="shepherd-column-anchor",s.style.position="fixed",s.style.left="".concat(o.left+o.width/2,"px"),s.style.top="".concat(l,"px"),s.style.width="1px",s.style.height="1px",s.style.zIndex="9999",s.style.pointerEvents="none",s.style.backgroundColor="transparent",s.style.transform="translate(-50%, -50%)",document.body.appendChild(s)}}};"/dashboard/clusters"!==window.location.pathname?(m.current=!0,o.push("/clusters").then(()=>{m.current=!1,setTimeout(t,200)})):t()})},when:{show(){var e,t,n;let o=null===(e=t1.activeTour)||void 0===e?void 0:e.getCurrentStep(),r=null==o?void 0:o.getElement(),i=null==r?void 0:r.querySelector(".shepherd-footer"),l=document.createElement("span");if(l.className="shepherd-progress",l.innerText="".concat((null===(t=t1.activeTour)||void 0===t?void 0:t.steps.indexOf(o))+1," of ").concat(null===(n=t1.activeTour)||void 0===n?void 0:n.steps.length),null==i||i.insertBefore(l,i.firstChild),r){let e=r.offsetHeight;if(document.documentElement.style.setProperty("--shepherd-dialog-height","".concat(e+20,"px")),window.innerWidth<768){let e=null;for(let t of[".fixed.top-14.left-0.w-64","div.fixed.w-64.bg-white.border-r",".fixed.w-64.transform",'[class*="fixed"][class*="w-64"][class*="bg-white"]','div[class*="fixed"][class*="top-14"][class*="left-0"][class*="w-64"]'])if(e=document.querySelector(t))break;if(!e)for(let t of document.querySelectorAll("div.fixed")){let n=t.getBoundingClientRect();if(256===n.width&&0===n.left&&n.top>=50){e=t;break}}if(e&&e instanceof HTMLElement){let t=r.getBoundingClientRect().top-56;e.style.setProperty("height","".concat(t,"px"),"important"),e.style.setProperty("max-height","".concat(t,"px"),"important")}}}setTimeout(()=>{let e=Array.from(document.querySelectorAll("thead th")).find(e=>e.textContent&&"Infra"===e.textContent.trim());if(e&&e instanceof HTMLElement){let t=e.closest("table");if(t){let n=Array.from(e.parentElement.children).indexOf(e),o=e.getBoundingClientRect(),r=t.querySelectorAll("tbody tr"),i=o;r.forEach(e=>{let t=e.children[n];t&&(i=t.getBoundingClientRect())});let l=document.createElement("div");l.id="shepherd-column-overlay",l.style.position="fixed",l.style.left="".concat(o.left-4,"px"),l.style.top="".concat(o.top-4,"px"),l.style.width="".concat(o.width+8,"px"),l.style.height="".concat(i.bottom-o.top+8,"px"),l.style.outline="3px solid #3b82f6",l.style.outlineOffset="2px",l.style.borderRadius="8px",l.style.zIndex="9998",l.style.pointerEvents="none",l.style.backgroundColor="transparent",document.body.appendChild(l)}}},100)},hide(){let e=document.getElementById("shepherd-column-overlay");e&&e.remove();let t=document.getElementById("shepherd-column-anchor");t&&t.remove(),document.documentElement.style.removeProperty("--shepherd-dialog-height");let n=document.querySelector(".fixed.top-14.left-0.w-64")||document.querySelector("div.fixed.w-64.bg-white.border-r")||document.querySelector(".fixed.w-64.transform")||document.querySelector('[class*="fixed"][class*="w-64"][class*="bg-white"]');n&&n instanceof HTMLElement&&(n.style.removeProperty("height"),n.style.removeProperty("max-height"));let o=document.getElementById("shepherd-global-custom-style");o&&o.remove()}},buttons:[{text:"Back",action(){this.back()},classes:"shepherd-button-secondary"},{text:"Next",action(){this.next()}}]},{title:"Multi-user support",text:"\n <p>SkyPilot supports multiple users in an organization.</p>\n <p>Each user can have their own clusters and jobs, with proper access controls.</p>\n ",attachTo:{element:function(){let e=document.getElementById("shepherd-user-column-anchor");if(e)return e;let t=Array.from(document.querySelectorAll("thead th")).find(e=>e.textContent&&"User"===e.textContent.trim());if(t){let e=t.closest("table"),n=Array.from(t.parentElement.children).indexOf(t);if(e){let t=e.querySelectorAll("tbody tr"),o=null;for(let e=t.length-1;e>=0;e--){let r=t[e].children[n];if(r){o=r;break}}if(o)return o}return t}return document.querySelector("table")||"body"},on:"bottom",offset:{skidding:0,distance:15}},beforeShowPromise:function(){return new Promise(e=>{let t=()=>{let t=Array.from(document.querySelectorAll("thead th")).find(e=>e.textContent&&"User"===e.textContent.trim());if(t&&t instanceof HTMLElement){let o=t.closest("table");if(o){let r=t.getBoundingClientRect(),i=window.innerWidth,l=o.closest('.overflow-x-auto, .overflow-auto, [style*="overflow"]')||o.parentElement;if((r.right>i||r.left<0)&&l&&l instanceof HTMLElement){let o=l.getBoundingClientRect(),i=t.offsetLeft-o.width/2+r.width/2;l.scrollTo({left:Math.max(0,i),behavior:"smooth"}),setTimeout(()=>{n(),e()},300);return}n()}}e()},n=()=>{let e=Array.from(document.querySelectorAll("thead th")).find(e=>e.textContent&&"User"===e.textContent.trim());if(e&&e instanceof HTMLElement){let t=e.closest("table");if(t){let n=Array.from(e.parentElement.children).indexOf(e),o=e.getBoundingClientRect(),r=t.querySelectorAll("tbody tr"),i=o;r.forEach(e=>{let t=e.children[n];t&&(i=t.getBoundingClientRect())});let l=i.bottom+4,s=document.createElement("div");s.id="shepherd-user-column-anchor",s.style.position="fixed",s.style.left="".concat(o.left+o.width/2,"px"),s.style.top="".concat(l,"px"),s.style.width="1px",s.style.height="1px",s.style.zIndex="9999",s.style.pointerEvents="none",s.style.backgroundColor="transparent",s.style.transform="translate(-50%, -50%)",document.body.appendChild(s)}}};"/dashboard/clusters"!==window.location.pathname?(m.current=!0,o.push("/clusters").then(()=>{m.current=!1,setTimeout(t,200)})):t()})},when:{show(){var e,t,n;let o=null===(e=t1.activeTour)||void 0===e?void 0:e.getCurrentStep(),r=null==o?void 0:o.getElement(),i=null==r?void 0:r.querySelector(".shepherd-footer"),l=document.createElement("span");if(l.className="shepherd-progress",l.innerText="".concat((null===(t=t1.activeTour)||void 0===t?void 0:t.steps.indexOf(o))+1," of ").concat(null===(n=t1.activeTour)||void 0===n?void 0:n.steps.length),null==i||i.insertBefore(l,i.firstChild),r){let e=r.offsetHeight;if(document.documentElement.style.setProperty("--shepherd-dialog-height","".concat(e+20,"px")),window.innerWidth<768){let e=null;for(let t of[".fixed.top-14.left-0.w-64","div.fixed.w-64.bg-white.border-r",".fixed.w-64.transform",'[class*="fixed"][class*="w-64"][class*="bg-white"]','div[class*="fixed"][class*="top-14"][class*="left-0"][class*="w-64"]'])if(e=document.querySelector(t))break;if(!e)for(let t of document.querySelectorAll("div.fixed")){let n=t.getBoundingClientRect();if(256===n.width&&0===n.left&&n.top>=50){e=t;break}}if(e&&e instanceof HTMLElement){let t=r.getBoundingClientRect().top-56;e.style.setProperty("height","".concat(t,"px"),"important"),e.style.setProperty("max-height","".concat(t,"px"),"important")}}}setTimeout(()=>{let e=Array.from(document.querySelectorAll("thead th")).find(e=>e.textContent&&"User"===e.textContent.trim());if(e&&e instanceof HTMLElement){let t=e.closest("table");if(t){let n=Array.from(e.parentElement.children).indexOf(e),o=e.getBoundingClientRect(),r=t.querySelectorAll("tbody tr"),i=o;r.forEach(e=>{let t=e.children[n];t&&(i=t.getBoundingClientRect())});let l=document.createElement("div");l.id="shepherd-user-column-overlay",l.style.position="fixed",l.style.left="".concat(o.left-4,"px"),l.style.top="".concat(o.top-4,"px"),l.style.width="".concat(o.width+8,"px"),l.style.height="".concat(i.bottom-o.top+8,"px"),l.style.outline="3px solid #3b82f6",l.style.outlineOffset="2px",l.style.borderRadius="8px",l.style.zIndex="9998",l.style.pointerEvents="none",l.style.backgroundColor="transparent",document.body.appendChild(l)}}},100)},hide(){let e=document.getElementById("shepherd-user-column-overlay");e&&e.remove();let t=document.getElementById("shepherd-user-column-anchor");t&&t.remove(),document.documentElement.style.removeProperty("--shepherd-dialog-height");let n=document.querySelector(".fixed.top-14.left-0.w-64")||document.querySelector("div.fixed.w-64.bg-white.border-r")||document.querySelector(".fixed.w-64.transform")||document.querySelector('[class*="fixed"][class*="w-64"][class*="bg-white"]');n&&n instanceof HTMLElement&&(n.style.removeProperty("height"),n.style.removeProperty("max-height"));let o=document.getElementById("shepherd-global-custom-style");o&&o.remove()}},buttons:[{text:"Back",action(){this.back()},classes:"shepherd-button-secondary"},{text:"Next",action(){this.next()}}]},{title:"Spin up compute in seconds",text:'\n <p>Spin up clusters using the Python SDK or the CLI.</p>\n <div class="space-y-2">\n <div class="rounded-lg border text-card-foreground shadow-sm p-3 bg-gray-50">\n <div class="flex items-center justify-between">\n <pre class="text-sm w-full whitespace-pre-wrap">\n <code class="block">sky launch</code>\n </pre>\n <button class="inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-8 w-8 rounded-full" onclick="copyDashboardCodeBlock(this)" title="Copy to clipboard">\n <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-4 w-4">\n <rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect>\n <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path>\n </svg>\n </button>\n </div>\n </div>\n <div class="rounded-lg border text-card-foreground shadow-sm p-3 bg-gray-50">\n <div class="flex items-center justify-between">\n <pre class="text-sm w-full whitespace-pre-wrap">\n <code class="block">sky launch --gpus L4:8</code>\n </pre>\n <button class="inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-8 w-8 rounded-full" onclick="copyDashboardCodeBlock(this)" title="Copy to clipboard">\n <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-4 w-4">\n <rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect>\n <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path>\n </svg>\n </button>\n </div>\n </div>\n <div class="rounded-lg border text-card-foreground shadow-sm p-3 bg-gray-50">\n <div class="flex items-center justify-between">\n <pre class="text-sm w-full whitespace-pre-wrap">\n <code class="block">sky launch --num-nodes 10 --cpus 32+</code>\n </pre>\n <button class="inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-8 w-8 rounded-full" onclick="copyDashboardCodeBlock(this)" title="Copy to clipboard">\n <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy h-4 w-4">\n <rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect>\n <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path>\n </svg>\n </button>\n </div>\n </div>\n </div>\n ',buttons:[{text:"Back",action(){this.back()},classes:"shepherd-button-secondary"},{text:"Next",action(){this.next()}}]},{title:"Jobs",text:"\n <p>Use <strong>Managed Jobs</strong> for long-running workloads.</p>\n <p>They provide automatic recovery against failures, such as recovering from preemptions or transient errors.</p>\n ",attachTo:{element:function(){return document.querySelector('a[href="/dashboard/jobs"]')||document.querySelector('a[href="/dashboard/jobs"]')||'a[href="/dashboard/jobs"]'},on:"bottom",offset:{skidding:0,distance:10}},beforeShowPromise:function(){return new Promise(e=>{(()=>{let t=window.innerWidth<768,n=document.querySelector('[data-testid="mobile-menu-button"], button[aria-label*="menu"], button[aria-label*="Menu"], .mobile-menu-button, [role="button"][aria-expanded]');if(t&&n&&!("true"===n.getAttribute("aria-expanded")||n.classList.contains("open")||document.querySelector('nav[data-state="open"], .mobile-menu.open, [data-mobile-menu="true"]'))){n instanceof HTMLElement&&n.click(),setTimeout(()=>{e()},300);return}e()})()})},buttons:[{text:"Back",action(){this.back()},classes:"shepherd-button-secondary"},{text:"Next",action(){this.next()}}]},{title:"Bring one or many infrastructure",text:"\n <p>SkyPilot combines your Kubernetes clusters, cloud VMs, or on-premise nodes into a unified compute pool.</p>\n <p>You can monitor them in this page.</p>\n ",attachTo:{element:function(){return document.querySelector('a[href="/dashboard/infra"]')||document.querySelector('a[href="/dashboard/infra"]')||'a[href="/dashboard/infra"]'},on:"bottom",offset:{skidding:0,distance:10}},beforeShowPromise:function(){return new Promise(e=>{(()=>{let t=window.innerWidth<768,n=document.querySelector('[data-testid="mobile-menu-button"], button[aria-label*="menu"], button[aria-label*="Menu"], .mobile-menu-button, [role="button"][aria-expanded]');if(t&&n&&!("true"===n.getAttribute("aria-expanded")||n.classList.contains("open")||document.querySelector('nav[data-state="open"], .mobile-menu.open, [data-mobile-menu="true"]'))){n instanceof HTMLElement&&n.click(),setTimeout(()=>{e()},300);return}e()})()})},buttons:[{text:"Back",action(){this.back()},classes:"shepherd-button-secondary"},{text:"Next",action(){this.next()}}]},{title:"Workspaces",text:"\n <p>For team deployments, admins can use Workspaces to manage teams or projects.</p>\n ",attachTo:{element:'a[href="/dashboard/workspaces"]',on:"bottom",offset:{skidding:0,distance:10}},beforeShowPromise:function(){return new Promise(e=>{(()=>{let t=window.innerWidth<768,n=document.querySelector('[data-testid="mobile-menu-button"], button[aria-label*="menu"], button[aria-label*="Menu"], .mobile-menu-button, [role="button"][aria-expanded]');if(t&&n&&!("true"===n.getAttribute("aria-expanded")||n.classList.contains("open")||document.querySelector('nav[data-state="open"], .mobile-menu.open, [data-mobile-menu="true"]'))){n instanceof HTMLElement&&n.click(),setTimeout(()=>{e()},300);return}e()})()})},buttons:[{text:"Back",action(){this.back()},classes:"shepherd-button-secondary"},{text:"Next",action(){this.next()}}]},{title:"Users",text:"\n <p>SkyPilot provides user management with RBAC and SSO support. Admins can manage users in this page.</p>\n ",attachTo:{element:'a[href="/dashboard/users"]',on:"bottom",offset:{skidding:0,distance:10}},beforeShowPromise:function(){return new Promise(e=>{(()=>{let t=window.innerWidth<768,n=document.querySelector('[data-testid="mobile-menu-button"], button[aria-label*="menu"], button[aria-label*="Menu"], .mobile-menu-button, [role="button"][aria-expanded]');if(t&&n&&!("true"===n.getAttribute("aria-expanded")||n.classList.contains("open")||document.querySelector('nav[data-state="open"], .mobile-menu.open, [data-mobile-menu="true"]'))){n instanceof HTMLElement&&n.click(),setTimeout(()=>{e()},300);return}e()})()})},buttons:[{text:"Back",action(){this.back()},classes:"shepherd-button-secondary"},{text:"Next",action(){this.next()}}]},{title:"\uD83C\uDF89 Tour complete!",text:'\n <p>We invite you to to explore the rest of the dashboard.</p>\n <p>To get started with SkyPilot, refer to <a href="https://docs.skypilot.co/en/latest/getting-started/quickstart.html">Quickstart</a>. You can restart this tour by clicking the <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="inline-block h-4 w-4 align-middle"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><path d="M12 17h.01"></path></svg> icon in the bottom right corner.</p>\n <p>Have questions? Join Slack to directly chat with the SkyPilot team.</p>\n ',buttons:[{text:"Finish",action(){this.complete()},classes:"shepherd-button-secondary"},{text:"Join Slack",action(){window.open("https://slack.skypilot.co/","_blank"),this.complete()}}]}].forEach(e=>{n.current.addStep(e)})}return r&&!l&&(g(),u(!0)),()=>{n.current&&n.current.complete()}},[r]),(0,a.useEffect)(()=>{if(!d||f)return;let e=e=>{if(!m.current){if(window.confirm("The tour is currently in progress. Do you want to abort the tour and navigate away?\n\nYou can resume the tour by clicking the question mark on the bottom right."))n.current&&n.current.cancel();else throw o.events.emit("routeChangeError"),"Route change aborted by user during tour."}},t=e=>(e.preventDefault(),e.returnValue="The tour is currently in progress. Are you sure you want to leave?",e.returnValue);return o.events.on("routeChangeStart",e),window.addEventListener("beforeunload",t),()=>{o.events.off("routeChangeStart",e),window.removeEventListener("beforeunload",t)}},[d,f,o]);let y={startTour:g,completeTour:()=>{n.current&&n.current.complete(),p(!1)},tour:n.current};return(0,s.jsx)(t6.Provider,{value:y,children:t})}window.copyDashboardCodeBlock=function(e){let t=e.closest(".bg-gray-50").querySelector("pre").querySelector("code.block").textContent;navigator.clipboard.writeText(t).then(()=>{let t=e.innerHTML;e.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check h-5 w-5 text-green-600"><path d="m9 12 2 2 4-4"/></svg>',setTimeout(()=>{e.innerHTML=t},2e3)})}},32586:function(e,t,n){"use strict";n.r(t);var o=n(85893),r=n(67294),i=n(5152),l=n.n(i),s=n(45697),a=n.n(s);n(36501);var c=n(93225),u=n(94849);let d=l()(()=>Promise.all([n.e(616),n.e(6130),n.e(7411),n.e(6989),n.e(3850),n.e(6135),n.e(2350)]).then(n.bind(n,6135)).then(e=>e.Layout),{loadableGenerated:{webpack:()=>[6135]},ssr:!1});function h(e){let{Component:t,pageProps:n}=e;return(0,r.useEffect)(()=>{let e=document.createElement("link");e.rel="icon",e.href="".concat(c.GW,"/favicon.ico"),document.head.appendChild(e)},[]),(0,o.jsx)(u.C,{children:(0,o.jsx)(d,{highlighted:n.highlighted,children:(0,o.jsx)(t,{...n})})})}h.propTypes={Component:a().elementType.isRequired,pageProps:a().object.isRequired},t.default=h},36501:function(){},77663:function(e){!function(){var t={229:function(e){var t,n,o,r=e.exports={};function i(){throw Error("setTimeout has not been defined")}function l(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:l}catch(e){n=l}}();var a=[],c=!1,u=-1;function d(){c&&o&&(c=!1,o.length?a=o.concat(a):u=-1,a.length&&h())}function h(){if(!c){var e=s(d);c=!0;for(var t=a.length;t;){for(o=a,a=[];++u<t;)o&&o[u].run();u=-1,t=a.length}o=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===l||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}r.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];a.push(new f(e,t)),1!==a.length||c||s(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(e){return[]},r.binding=function(e){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw Error("process.chdir is not supported")},r.umask=function(){return 0}}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}},l=!0;try{t[e](i,i.exports,o),l=!1}finally{l&&delete n[e]}return i.exports}o.ab="//";var r=o(229);e.exports=r}()},5152:function(e,t,n){e.exports=n(19606)},11163:function(e,t,n){e.exports=n(26036)},92703:function(e,t,n){"use strict";var o=n(50414);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,l){if(l!==o){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},45697:function(e,t,n){e.exports=n(92703)()},50414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],function(){return t(91118),t(26036)}),_N_E=e.O()}]);
|